code stringlengths 3 1.05M | repo_name stringlengths 4 116 | path stringlengths 4 991 | language stringclasses 9
values | license stringclasses 15
values | size int32 3 1.05M |
|---|---|---|---|---|---|
<?php
/**
* Created by JetBrains PhpStorm.
* User: etienne.lejariel
* Date: 03/07/15
* Time: 09:46
* To change this template use File | Settings | File Templates.
*/
namespace Enneite\SwaggerBundle\Tests\Creator;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Enneite\SwaggerBundle\Creator\ApiControll... | enneite/swagger-bundle | Tests/Creator/ApiControllerCreatorTest.php | PHP | mit | 23,086 |
var notify = require('gulp-notify'),
path = require('path');
var c = exports;
c.all = allFiles;
c.target = targetFolder;
c.TARGET_FOLDER = "./dist";
// fonts
c.FOLDER_FONTS = './node_modules/font-awesome/fonts/*';
c.TARGET_FOLDER_FONTS = 'fonts';
// images
c.FOLDER_IMAGES = './resources/images/*... | bekk/bekkboard | GUI/tasks/config.js | JavaScript | mit | 1,991 |
import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
import { SnotifyService } from '../../services/snotify.service';
import { SnotifyToast } from '../../models/snotify-toast.model';
import { Subscription } from 'rxjs';
import { SnotifyNotifications } from '../../interfaces/snotify-notificat... | artemsky/ng-snotify | projects/ng-snotify/src/lib/components/snotify/snotify.component.ts | TypeScript | mit | 3,726 |
using AzureBot.Services.Impl;
using AzureBot.Services.Interfaces;
using AzureBot.UnitTests.Mocks;
using Microsoft.Bot.Connector;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AzureBot.Un... | jjcollinge/AzureBot | AzureBot.UnitTests/Tests/ValidationTest.cs | C# | mit | 2,999 |
'use strict';
var isArray = Array.isArray;
module.exports = function (t, a) {
var el1, el2, el3, result, nodes, c1, c2;
if (typeof document === 'undefined') return;
el1 = document.createElement('p');
el2 = document.createElement('div');
result = t.call(document, el2, el1, 'Test', null);
a(isArray(result), tr... | egovernment/eregistrations-demo | node_modules/dom-ext/test/document/#/normalize.js | JavaScript | mit | 876 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2017-08-17 20:30
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('app_pessoa', '0004_auto_20170817_1727'),
]
operati... | LEDS/X-data | Xdata/app_pessoa/migrations/0005_auto_20170817_1730.py | Python | mit | 559 |
class AvailabilitiesController < ApplicationController
before_action :authorise_booking_manager!
def show
@search = SlotSearch.new(search_params)
@slots = @search.results
end
private
def search_params
params
.fetch(:search, {})
.permit(:date, :room, :available)
.merge(
... | guidance-guarantee-programme/tesco_planner | app/controllers/availabilities_controller.rb | Ruby | mit | 589 |
#include "Build.h"
#include "Profiler.h"
#include "config/Git.h"
#include "config/Version.h"
#include <sstream>
#include <vector>
//OS
#if defined(PR_OS_LINUX)
#define PR_OS_NAME "Linux"
#elif defined(PR_OS_WINDOWS_32)
#define PR_OS_NAME "Microsoft Windows 32 Bit"
#elif defined(PR_OS_WINDOWS_64)
#define PR_OS_NAME "M... | PearCoding/PearRay | src/base/config/Build.cpp | C++ | mit | 4,753 |
<?php
class Contact_model extends CI_Model
{
function insert($arr = ''){
if(empty($arr)) return ;
$sql = "insert into contact (name,email,message,ceatetime,ip) VALUES ('{$arr['name']}','{$arr['email']}','{$arr['message']}','".date('Y-m-d H:i:s')."','{$arr['ip']}')";
$this->db->query($sql);
... | 0372/blog | blog/front/models/Contact_model.php | PHP | mit | 327 |
package br.edu.fjn.maternidade.application.impl;
import java.util.List;
import br.edu.fjn.maternidade.application.SecretarioApplication;
import br.edu.fjn.maternidade.domain.secretario.Secretario;
import br.edu.fjn.maternidade.domain.secretario.SecretarioRepository;
import br.edu.fjn.maternidade.domain.usuario.Usuari... | aldaypinheiro/maternidade-core | src/br/edu/fjn/maternidade/application/impl/SecretarioApplicationImpl.java | Java | mit | 1,940 |
<?php
session_start(); // declare that sessions are being used
session_unset(); // unset sessions
session_destroy(); // now destory them and remove them from the users browser
header('Location: http://thewebbster.info/get/loginForm.php?logout=yes');... | chwebb1/InsecureGetLoginFormPHP | logout.php | PHP | mit | 413 |
lock '3.4.0'
set :application, "people"
set :repo_url, "git://github.com/netguru/people.git"
set :deploy_to, ENV['DEPLOY_PATH']
set :docker_links, %w(postgres_ambassador:postgres)
set :docker_additional_options, -> { "--env-file #{shared_path}/.env" }
set :docker_apparmor_profile, "docker-ptrace"
namespace :docker ... | netguru/people | config/deploy.rb | Ruby | mit | 532 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import re
import uuid
from . import utils
from .exceptions import (RevisionNotFound, RevisionAlreadyExists,
NoRevisionsFound, GoingTooFar, AlreadyHere)
def init(directory: str):
print('Creating directory', directory)
os.mkdir(... | ALFminecraft/migro | migro/main.py | Python | mit | 4,923 |
require 'spec_helper'
# TODO: the usual respond_to? method doesn't seem to work on Thor objects.
# Why not? For now, we'll check against instance_methods.
RSpec.describe Moose::Inventory::Cli::Host do
before(:all) do
# Set up the configuration object
@mockarg_parts = {
config: File.join(spec_root, 'c... | RusDavies/moose-inventory | spec/lib/moose_inventory/cli/host_addgroup_spec.rb | Ruby | mit | 8,359 |
$(function() {
//switch the menu style in a area of site
$(window).on("scroll", function() {
var black_opacity = $("#top-session");
var projetos = $("#projetos");
var contatos = $("#contato");
var offsetblack_opacity = black_opacity.offset();
var offsetprojetos = projetos.offset();
var offsetcontatos = ... | gabrieldev525/me | js/script-jquery.js | JavaScript | mit | 1,335 |
<script type="text/javascript">
$(document).ready(function(){
$("#new-user").submit(function(e){
e.preventDefault();
if($("input[name=user_confirm_password]").val() != $("input[name=user_password]").val()){
$("input[name=user_password]").css("border-bottom", "1px solid red");
$("input[name=user_confir... | lds-ulbra-torres/projeto-slave | application/views/users/CreateUserView.php | PHP | mit | 1,898 |
Items = new Mongo.Collection('items');
Items.allow({
insert: function(userId, doc) {
return !!userId;
},
update: function(userId, doc) {
return !!userId;
},
remove: function(userId, doc) {
return !!userId;
}
});
ItemSchema = new SimpleSchema({
name: {
type: String,
label: "Item Name"... | mrogach2350/rpgLoot | collections/items.js | JavaScript | mit | 1,589 |
package handler
import (
"encoding/json"
"io/ioutil"
"net/http"
"net/url"
"strings"
"github.com/playlyfe/go-graphql"
"golang.org/x/net/context"
)
//Shortcuts for the Content-Type header
const (
ContentTypeJSON = "application/json"
ContentTypeGraphQL = "application/graphql"
ContentTypeForm... | krypton97/HandleGraphQL | handler.go | GO | mit | 4,325 |
/**
* The slideshow controller.
* Get settings and initialise PrismSlider for each layer,
* add controls and events, then call slideTo method on click.
* @return {Object} The set of public methods.
*/
var slideshow = (function(window, undefined) {
'use strict';
/**
* Enum navigation classes, attributes a... | claudiocalautti/prism-slider | js/slideshow3.js | JavaScript | mit | 5,466 |
// JavaScript Variables and Objects
// I paired by myself on this challenge.
// __________________________________________
// Write your code below.
var secretNumber = 7
var password = 'just open the door'
var allowedIn = false
var members = ['John', 'Joe', 'Mike', 'Mary']
// ______________________________________... | robertreith/phase-0 | week-7/variables-objects.js | JavaScript | mit | 1,472 |
// Chargement des données (en queuing pour plus de rapidité)
queue(1)
.defer(d3.json, "/dataviz/rgph2014/tunisiageo.json")
.defer(d3.csv, "/dataviz/rgph2014/rgph2014.csv")
.awaitAll(function(error, results){
var topology = results[0]
var governorates = topojson.feature(topology, topology.objects... | mahrsi/mahrsi.github.io | dataviz/rgph2014/rgph2014.js | JavaScript | mit | 3,263 |
# frozen_string_literal: true
module PeopleHelper
def private_information(info, name: false)
if name
session[:privacy_mode] ? info.initials : info.full_name
else
session[:privacy_mode] ? 'hidden' : info
end
end
alias pii private_information
def address_fields_to_sentence(person)
pe... | BlueRidgeLabs/kimball | app/helpers/people_helper.rb | Ruby | mit | 541 |
// @flow
import React, { Component } from 'react';
import type { Children } from 'react';
import { Sidebar } from '../components';
export default class App extends Component {
props: {
children: Children
};
render() {
return (
<div>
<Sidebar />
<div className="main-panel">
... | hlynn93/basic_ims | app/containers/App.js | JavaScript | mit | 385 |
import styled from 'styled-components';
import { colors } from '@keen.io/colors';
export const Wrapper = styled.div`
padding: 20px;
border-top: solid 1px ${colors.gray[300]};
`;
export const Container = styled.div`
display: flex;
gap: 20px;
`;
export const TitleContainer = styled.div`
min-width: 100px;
`;
| keen/explorer | src/components/BrowserPreview/components/DashboardsConnection/DashboardsConnection.styles.ts | TypeScript | mit | 320 |
/*
Copyright (c) 2014 code.fm
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, s... | groestl/ductive | test-src/ductive/parse/SimpleCompleterTests.java | Java | mit | 9,237 |
using BasicMessaging.Domain.Places.Models;
using Brickweave.Cqrs;
namespace BasicMessaging.Domain.Places.Commands
{
public class CreatePlace : ICommand<Place>
{
public CreatePlace(string name)
{
Name = name;
}
public string Name { get; }
}
}
| agartee/Brickweave | samples/2. BasicMessaging/src/BasicMessaging.Domain/Places/Commands/CreatePlace.cs | C# | mit | 303 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2016 Christian Schudt
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the r... | jeozey/XmppServerTester | xmpp-extensions/src/main/java/rocks/xmpp/extensions/muc/model/Actor.java | Java | mit | 1,690 |
package net.tofweb.starlite;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.Test;
public class CostBlockManagerTest {
private CellSpace space;
@Before
public void setup() {
space = n... | LynnOwens/starlite | src/test/java/net/tofweb/starlite/CostBlockManagerTest.java | Java | mit | 1,036 |
export * from './components';
export * from './questions.module'; | dormd/ng2-countries-trivia | src/app/modules/questions/index.ts | TypeScript | mit | 65 |
<!--
Safe sample
input : reads the field UserData from the variable $_GET
sanitize : cast via + = 0
File : unsafe, use of untrusted data in the function setInterval
-->
<!--Copyright 2015 Bertrand STIVALET
Permission is hereby granted, without written agreement or royalty fee, to
use, copy, modify, and distribute ... | stivalet/PHP-Vulnerability-test-suite | XSS/CWE_79/safe/CWE_79__GET__CAST-cast_int_sort_of__Use_untrusted_data_script-window_SetInterval.php | PHP | mit | 1,289 |
<?php
/*
* This file is part of App/Validation.
*
* (c) Alexandre Gomes Gaigalas <alexandre@gaigalas.net>
*
* For the full copyright and license information, please view the "LICENSE.md"
* file that was distributed with this source code.
*/
namespace App\Validation\Rules\SubdivisionCode;
use App\Validation\Ru... | Javier-Solis/admin-project | app/Validation/Rules/SubdivisionCode/SvSubdivisionCode.php | PHP | mit | 1,011 |
package kusto
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
... | Azure/azure-sdk-for-go | services/kusto/mgmt/2019-01-21/kusto/dataconnections.go | GO | mit | 27,128 |
require 'rails_helper'
RSpec.describe Parties::EmailsController, type: :request do
describe '#edit' do
before { signin_party }
subject! { get '/party/email/edit' }
it { expect(response).to be_success }
end
describe '#update' do
before { signin_party }
context 'success' do
subject { put... | JRF-tw/sunshine.jrf.org.tw | spec/requests/parties/emails_controller_spec.rb | Ruby | mit | 1,540 |
package jsettlers.graphics.map.controls.original.panel.button;
import jsettlers.common.images.EImageLinkType;
import jsettlers.common.images.OriginalImageLink;
import jsettlers.common.material.EMaterialType;
import jsettlers.graphics.action.Action;
import jsettlers.graphics.localization.Labels;
import jsettlers.graphi... | JKatzwinkel/settlers-remake | jsettlers.graphics/src/jsettlers/graphics/map/controls/original/panel/button/MaterialButton.java | Java | mit | 1,533 |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v0/enums/frequency_cap_level.proto
package enums // import "google.golang.org/genproto/googleapis/ads/googleads/v0/enums"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppre... | cloudfoundry-community/firehose-to-syslog | vendor/google.golang.org/genproto/googleapis/ads/googleads/v0/enums/frequency_cap_level.pb.go | GO | mit | 5,878 |
//
// 2_2_DefineVariables.cpp
// CPP
//
// Created by akshay raj gollahalli on 2/02/16.
// Copyright © 2016 akshay raj gollahalli. All rights reserved.
//
#include <cstdio>
int main(int argc, char ** argv) {
int someNumber = 10;
/*
this can also be written as
int someNumber;
someNumber = 10;
*/
const int... | akshaybabloo/CPP-Notes | 2_Basics/2_2_DefineVariables.cpp | C++ | mit | 519 |
from django import forms
from django.contrib.auth.forms import AuthenticationForm
from django.utils.translation import ugettext_lazy as _
class EmailAuthenticationForm(AuthenticationForm):
"""Email authentication Form
increase the size of the username field to fit long emails"""
# TODO: consider to change... | theteam/django-theteamcommon | src/theteamcommon/forms.py | Python | mit | 770 |
module.exports = {
Shape: require('./lib/shape'),
Node: require('./lib/node'),
Error: require('./lib/node_error'),
MemorySource: require('./lib/memory_source'),
};
| LastLeaf/datree | index.js | JavaScript | mit | 180 |
<?php
/* FOSUserBundle:Profile:show.html.twig */
class __TwigTemplate_2d974d2be07c528b56adfa6823dca8b997fac47403b46447cbcad246a9aa4057 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = $this->env->loadTemplate("FOSUserBundle... | efrax/IMDER | app/cache/dev/twig/2d/97/4d2be07c528b56adfa6823dca8b997fac47403b46447cbcad246a9aa4057.php | PHP | mit | 1,239 |
<?php
/*
* Skeleton Bundle
* This file is part of the BardisCMS.
*
* (c) George Bardis <george@bardis.info>
*
*/
namespace BardisCMS\SkeletonBundle\Repository;
use Doctrine\ORM\EntityRepository;
class SkeletonRepository extends EntityRepository {
// Function to retrieve the pages of a category with pagin... | bardius/the-web-dev-ninja-blog | src/BardisCMS/SkeletonBundle/Repository/SkeletonRepository.php | PHP | mit | 12,435 |
namespace Rib.Deployer.Steps.FileSystem
{
using System;
using NUnit.Framework;
[TestFixture]
public class HasDestFsSettingsTests
{
[Test]
public void HasDestFsSettingsNullTest() => Assert.Throws<ArgumentException>(() => new HasDestFsSettings("name", "src", null));
[Test]... | riberk/Rib.Deployer | Solution/Rib.Deployer.Steps.FileSystem.Tests/HasDestFsSettingsTests.cs | C# | mit | 636 |
// Code generated by ffjson <https://github.com/pquerna/ffjson>. DO NOT EDIT.
// source: vestingbalance.go
package types
import (
"bytes"
"fmt"
fflib "github.com/pquerna/ffjson/fflib/v1"
)
// MarshalJSON marshal bytes to json - template
func (j *VestingBalance) MarshalJSON() ([]byte, error) {
var buf fflib.Buffe... | denkhaus/bitshares | types/vestingbalance_ffjson.go | GO | mit | 7,613 |
require "pact_broker/domain/pact"
module PactBroker
module Pacts
class PlaceholderPact < PactBroker::Domain::Pact
def initialize
consumer = OpenStruct.new(name: "placeholder-consumer", labels: [OpenStruct.new(name: "placeholder-consumer-label")])
@provider = OpenStruct.new(name: "placeholde... | pact-foundation/pact_broker | lib/pact_broker/pacts/placeholder_pact.rb | Ruby | mit | 776 |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
// This can be removed if you use __autoload() in config.php OR use Modular Extensions
require_once APPPATH . '/libraries/REST_Controller.php';
class Services extends REST_Controller
{
public function __construct()
{
parent::__construct();
$t... | vny1422/Asumu | application/controllers/Services.php | PHP | mit | 17,633 |
from discrete import *
f = factorial(100)
s = str(f)
print sum([int(s[i]) for i in range(len(s))])
| jreese/euler | python/problem20.py | Python | mit | 101 |
package de.mineformers.investiture.allomancy.network;
import de.mineformers.investiture.allomancy.impl.misting.temporal.SpeedBubble;
import de.mineformers.investiture.network.Message;
import net.minecraft.util.math.BlockPos;
import java.util.UUID;
/**
* Updates a metal extractor tile entity
*/
public class SpeedBu... | PaleoCrafter/Allomancy | src/main/java/de/mineformers/investiture/allomancy/network/SpeedBubbleUpdate.java | Java | mit | 875 |
// Copyright (c) 2011-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "qvalidatedlineedit.h"
#include "vikingcoinaddressvalidator.h"
#include "guiconstants.h"
QValidatedLineEdit::QValid... | i3lome/failfial | src/qt/qvalidatedlineedit.cpp | C++ | mit | 2,162 |
/*
* Copyright 1997-2015 Optimatika (www.optimatika.se)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, mo... | jpalves/ojAlgo | src/org/ojalgo/matrix/store/IdentityStore.java | Java | mit | 3,940 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XOMNI.SDK.Core.ApiAccess;
using XOMNI.SDK.Core.Providers;
namespace XOMNI.SDK.Private.ApiAccess.Catalog.ItemPrice
{
internal class BatchPrice : ApiAccessBase
{
protected override s... | nseckinoral/xomni-sdk-dotnet | src/XOMNI.SDK.Private/ApiAccess/Catalog/ItemPrice/BatchPrice.cs | C# | mit | 1,322 |
// All code points in the `Sora_Sompeng` script as per Unicode v8.0.0:
[
0x110D0,
0x110D1,
0x110D2,
0x110D3,
0x110D4,
0x110D5,
0x110D6,
0x110D7,
0x110D8,
0x110D9,
0x110DA,
0x110DB,
0x110DC,
0x110DD,
0x110DE,
0x110DF,
0x110E0,
0x110E1,
0x110E2,
0x110E3,
0x110E4,
0x110E5,
0x110E6,
0x110E7,
0x110E... | mathiasbynens/unicode-data | 8.0.0/scripts/Sora_Sompeng-code-points.js | JavaScript | mit | 424 |
using System;
namespace Dust
{
public interface IServiceAspect<TRequest, TResponse>
{
TResponse Process(TRequest request, Func<TRequest, TResponse> serviceOperation);
}
} | pjtown/dusty-web-services | Dust/IServiceAspect.cs | C# | mit | 176 |
namespace nUpdate.Administration.Core.Operations.Panels
{
partial class ScriptExecuteOperationPanel
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ress... | ProgTrade/nUpdate | nUpdate.Administration/Core/Operations/Panels/ScriptExecuteOperationPanel.Designer.cs | C# | mit | 8,690 |
import cPickle as pickle
import numpy as np
import os
import sys
sys.path.append('../')
import gp
from uitools import UITools
class Manager(object):
def __init__(self, output_dir):
'''
'''
self._data_path = '/home/d/dojo_xp/data/'
self._output_path = os.path.join(self._data_path, 'ui_out', output_... | VCG/gp | ui/manager.py | Python | mit | 12,894 |
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software w... | MylesIsCool/ViaVersion | api-legacy/src/main/java/us/myles/ViaVersion/api/boss/BossColor.java | Java | mit | 1,520 |
require 'test_helper'
module Disclaimer
class DocumentsHelperTest < ActionView::TestCase
end
end
| reggieb/Disclaimer | test/unit/helpers/disclaimer/documents_helper_test.rb | Ruby | mit | 102 |
require "active_support/core_ext/string/inflections"
module GreatPretender
class Pretender
def initialize(mockup)
@mockup = mockup
end
def to_module
pretenders = load_pretenders
Module.new do
define_method(:method_missing) do |method_name, *args, &block|
pretender =... | BackForty/great_pretender | lib/great_pretender/pretender.rb | Ruby | mit | 1,831 |
{{-- Master Layout --}}
@extends('cortex/foundation::frontarea.layouts.default')
{{-- Page Title --}}
@section('title')
{{ extract_title(Breadcrumbs::render()) }}
@endsection
{{-- Scripts --}}
@push('inline-scripts')
{!! JsValidator::formRequest(Cortex\Auth\Http\Requests\Frontarea\TenantRegistrationProcessReq... | rinvex/cortex-fort | resources/views/frontarea/pages/tenant-registration.blade.php | PHP | mit | 10,976 |
/**
* The AnalysisShapeUploadView module.
*
* @return AnalysisShapeUploadView class (extends Backbone.View).
*/
define(
[
'backbone',
'mps',
'turf',
'map/services/ShapefileService',
'helpers/geojsonUtilsHelper'
],
function(Backbone, mps, turf, ShapefileService, geojsonUtilsHelper) {
'u... | Vizzuality/gfw-climate | app/assets/javascripts/map/views/tabs/AnalysisShapeUploadView.js | JavaScript | mit | 3,022 |
class Api::V1::CharactersController < ApplicationController
def show
character = Character.find(params[:id])
response = Api::V1::CharacterSerializer.new(character)
render(json: response)
end
def index
if params[:name]
character = Character.find_by(name: params[:name])
if character.ni... | mbroadwater/shadowrun | app/controllers/api/v1/characters_controller.rb | Ruby | mit | 806 |
package eu.thog92.isbrh.example;
import eu.thog92.isbrh.ISBRH;
import eu.thog92.isbrh.render.ITextureHandler;
import eu.thog92.isbrh.render.TextureLoader;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.t... | Thog/ISBRH | src/main/java/eu/thog92/isbrh/example/BlockExample.java | Java | mit | 2,078 |
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <unistd.h>
#include <uuid/uuid.h>
#include <vector>
#include <scxcorelib/scxcmn.h>
#include <scxcorelib/scxprocess.h>
#include <scxcorelib/stringaid.h>
#include <testutils/scxunit.h>
#include <testutils/providertestutils.h>
#include "Con... | HenryRawas/Docker-Provider | test/code/providers/Container_ContainerStatistics_Class_Provider_UnitTest.cpp | C++ | mit | 3,861 |
package ru.vyarus.dropwizard.orient.configuration;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.JsonNode;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import com.orientechnologies.common.parser.OSystemVariableResolver;
import com.ori... | xvik/dropwizard-orient-server | src/main/java/ru/vyarus/dropwizard/orient/configuration/OrientServerConfiguration.java | Java | mit | 9,795 |
new Vue({
el: document.querySelector('.page-app-detail'),
data: {
selectedApp: {}
},
created() {
this._loadApp();
},
methods: {
refreshSecret() {
axios.post(`${AppConf.apiHost}/app/${serverData.appId}/refresh_secret`)
.then(res => {
this.selectedApp.AppSecret = res.data;
... | hstarorg/simple-sso | src/assets/js/app-detail.js | JavaScript | mit | 506 |
// This is an open source non-commercial project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* SearchContext.cs --
* Ars Magna project, http://arsmagna.ru
* -------------------------------------------------------
* Status: poor
*/
#region Using ... | amironov73/ManagedIrbis2 | OldSource/Libs/ManagedIrbis/Source/Search/Infrastructure/SearchContext.cs | C# | mit | 1,370 |
import DetailsList from '@components/details-list.vue'
describe('DetailsList Component', () => {
let wrapper
let options
beforeEach(() => {
options = {
propsData: {
id: '01-01',
},
}
wrapper = createWrapper(DetailsList, options)
})
it('is a Vue instance', () => {
expect... | patrickcate/dutch-art-daily | __tests__/unit/components/details-list.spec.js | JavaScript | mit | 745 |
using System.Collections.Generic;
using System.Linq;
using PivotalTrackerDotNet.Domain;
using RestSharp;
using Parallel = System.Threading.Tasks.Parallel;
namespace PivotalTrackerDotNet
{
public class StoryService : AAuthenticatedService, IStoryService
{
private const string SpecifiedIterati... | Charcoals/PivotalTracker.NET | PivotalTrackerDotNet/StoryService.cs | C# | mit | 17,068 |
using System;
using System.Globalization;
using System.Reflection;
using System.Windows.Media;
namespace DataServer
{
public static class ColorReflector
{
public static void SetFromHex(this Color c, string hex) {
var c1 = ToColorFromHex(hex);
c.A = c1.A;
c.R = c1.R;... | TNOCS/csTouch | framework/csCommonSense/Types/DataServer/PoI/ColorReflector.cs | C# | mit | 2,540 |
require 'ox'
module UPS
module Builders
# The {InternationalProductInvoiceBuilder} class builds UPS XML International invoice Produt Objects.
#
# @author Calvin Hughes
# @since 0.9.3
# @attr [String] name The Containing XML Element Name
# @attr [Hash] opts The international invoice product pa... | veeqo/ups-ruby | lib/ups/builders/international_invoice_product_builder.rb | Ruby | mit | 1,835 |
require "octaccord/version"
require "octaccord/errors"
require "octaccord/command"
require "octaccord/formatter"
require "octaccord/iteration"
require "extensions"
module Octaccord
# Your code goes here...
end
| nomlab/octaccord | lib/octaccord.rb | Ruby | mit | 213 |
# Rushy Panchal
"""
See https://bittrex.com/Home/Api
"""
import urllib
import time
import requests
import hmac
import hashlib
BUY_ORDERBOOK = 'buy'
SELL_ORDERBOOK = 'sell'
BOTH_ORDERBOOK = 'both'
PUBLIC_SET = ['getmarkets', 'getcurrencies', 'getticker', 'getmarketsummaries', 'getorderbook',
'getmarkethistor... | panchr/python-bittrex | bittrex/bittrex.py | Python | mit | 9,819 |
package co.edu.eafit.solver.lib.systemsolver.iterative;
public enum ENorm {
One, Infinite, Euclidean
}
| halzate93/solver | lib/src/co/edu/eafit/solver/lib/systemsolver/iterative/ENorm.java | Java | mit | 105 |
/**
* CacheStorage
* ============
*/
var fs = require('fs');
var dropRequireCache = require('../fs/drop-require-cache');
/**
* CacheStorage — хранилище для кэша.
* @name CacheStorage
* @param {String} filename Имя файла, в котором хранится кэш (в формате JSON).
* @constructor
*/
function CacheStorage(filename) ... | 1999/enb | lib/cache/cache-storage.js | JavaScript | mit | 2,450 |
#include "stdafx.h"
#include "FrustumCone.h"
using namespace glm;
FrustumCone::FrustumCone()
{
}
FrustumCone::~FrustumCone()
{
}
void FrustumCone::update(mat4 rotprojmatrix)
{
leftBottom = getDir(vec2(-1, -1), rotprojmatrix);
rightBottom = getDir(vec2(1, -1), rotprojmatrix);
leftTop = getDir(vec2(-1, 1)... | achlubek/vengineandroidndk | app/src/main/cpp/FrustumCone.cpp | C++ | mit | 549 |
import hexchat
import re
__module_name__ = 'BanSearch'
__module_author__ = 'TingPing'
__module_version__ = '2'
__module_description__ = 'Search for bans/quiets matching a user'
banhook = 0
quiethook = 0
endbanhook = 0
endquiethook = 0
banlist = []
quietlist = []
regexescapes = {'[':r'\[', ']':r'\]', '.':r'\.'}
ircr... | TingPing/plugins | HexChat/bansearch.py | Python | mit | 5,101 |
package pathtree
// Items ...
type Items map[string]Items
// Add recursively adds a slice of strings to an Items map and makes parent
// keys as needed.
func (i Items) Add(path []string) {
if len(path) > 0 {
if v, ok := i[path[0]]; ok {
v.Add(path[1:])
} else {
result := make(Items)
result.Add(path[1:])... | marcusolsson/passtray | pathtree/tree.go | GO | mit | 353 |
<?php
namespace DiabloDB\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesCommands;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
abstract class Controller extends BaseController
{
use DispatchesCommands, ValidatesRequests;
}
| taskforcedev/DiabloDB | app/Http/Controllers/Controller.php | PHP | mit | 305 |
/**
* Module dependencies
*/
var mongoose = require('mongoose')
, Schema = mongoose.Schema;
/**
* @constructor
*/
var MongooseStore = function (Session) {
this.Session = Session;
};
/**
* Load data
*/
// for koa-generic-session
MongooseStore.prototype.get = function *(sid, parse) {
try {
var data = y... | rfink/koa-session-mongoose | index.js | JavaScript | mit | 2,003 |
module DynamicModel
module Type
class Date < DynamicModel::Type::Base
end
end
end | rmoliva/dynamic_model | lib/dynamic_model/type/date.rb | Ruby | mit | 93 |
export function mapToCssModules (className, cssModule) {
if (!cssModule) return className
return className.split(' ').map(c => cssModule[c] || c).join(' ')
}
| suranartnc/graphql-blogs-app | .core/app/utils/coreui.js | JavaScript | mit | 162 |
const alter = require('../lib/alter.js');
const _ = require('lodash');
const Chainable = require('../lib/classes/chainable');
const argType = require('../handlers/lib/arg_type.js');
module.exports = new Chainable('condition', {
args: [
{
name: 'inputSeries',
types: ['seriesList']
},
{
n... | istresearch/PulseTheme | kibana/src/core_plugins/timelion/server/series_functions/condition.js | JavaScript | mit | 2,900 |
package entity;
import javax.persistence.*;
@Entity
@Table(name = "tag", schema = "streambot", catalog = "")
public class TagEntity {
@Id
@Column(name = "ID", nullable = false)
private long id;
@ManyToOne
@JoinColumn(name = "ServerID", nullable = false)
private GuildEntity guild;
@Basic... | Gyoo/Discord-Streambot | src/main/java/entity/TagEntity.java | Java | mit | 1,494 |
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2014 The FutCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "init.h"
#include "util.h"
#inclu... | Futcoin/Futcoin | src/bitcoinrpc.cpp | C++ | mit | 48,271 |
interface CalculatePositionOptions {
horizontalPosition: string;
verticalPosition: string;
matchTriggerWidth: boolean;
previousHorizontalPosition?: string;
previousVerticalPosition?: string;
renderInPlace: boolean;
dropdown: any;
}
export type CalculatePositionResultStyle = {
top?: number;
left?: numb... | cibernox/ember-basic-dropdown | addon/utils/calculate-position.ts | TypeScript | mit | 9,067 |
<?php
/*
* This file is part of the API Platform project.
*
* (c) Kévin Dunglas <dunglas@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace ApiPlatform\Metadata\Resource\Factory;
use A... | api-platform/core | src/Metadata/Resource/Factory/ResourceNameCollectionFactoryInterface.php | PHP | mit | 652 |
using System;
using System.Collections.Generic;
using System.Reflection;
using Xunit.Sdk;
namespace Oryza.TestBase.Xunit.Extensions
{
public class ClassData : DataAttribute
{
private readonly Type _type;
public ClassData(Type type)
{
if (!typeof (IEnumerable<object[]>).IsA... | sonbua/Oryza | src/Oryza.TestBase/Xunit.Extensions/ClassData.cs | C# | mit | 682 |
__inline('ajax.js');
__inline('amd.js');
__inline('appendToHead.js');
__inline('bind.js');
__inline('copyProperties.js');
__inline('counter.js');
__inline('derive.js');
__inline('each.js');
__inline('hasOwnProperty.js');
__inline('inArray.js');
__inline('isArray.js');
__inline('isEmpty.js');
__inline('isFunction.js');
... | hao123-fe/her-runtime | src/javascript/util/util.js | JavaScript | mit | 459 |
package dsl
import (
"fmt"
"github.com/emicklei/melrose/core"
"github.com/emicklei/melrose/notify"
)
// At is called from expr after patching []. One-based
func (v variable) At(index int) interface{} {
m, ok := v.store.Get(v.Name)
if !ok {
return nil
}
if intArray, ok := m.([]int); ok {
if index < 1 || i... | emicklei/melrose | dsl/var_delegates.go | GO | mit | 2,696 |
'use strict';
var _ = require('lodash');
var fs = require('fs');
var path = require('path');
var util = require('util');
var async = require('./async');
/**
* Read a directory recursively.
* The directory will be read depth-first and will return paths relative
* to the base directory. It will only result in file... | wbyoung/jsi-blowtorch | lib/fs-extras.js | JavaScript | mit | 4,456 |
class Bitcask
require 'zlib'
require 'stringio'
$LOAD_PATH << File.expand_path(File.dirname(__FILE__))
require 'bitcask/hint_file'
require 'bitcask/data_file'
require 'bitcask/keydir'
require 'bitcask/errors'
require 'bitcask/version'
include Enumerable
TOMBSTONE = "bitcask_tombstone"
# Opens... | aphyr/bitcask-ruby | lib/bitcask.rb | Ruby | mit | 3,087 |
'use strict'
/*
MIT License
Copyright (c) 2016 Ilya Shaisultanov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, ... | diversario/node-ssdp | lib/index.js | JavaScript | mit | 13,902 |
<?php
namespace App;
use App\Models\User;
use RuntimeException;
class UserSettingForm {
private string $setting_name;
private ?User $current_user;
private bool $can_save;
public const INPUT_MAP = [
'cg_defaultguide' => [
'type' => 'select',
'options' => [
'desc' => 'Choose your prefe... | ponydevs/MLPVC-RR | app/UserSettingForm.php | PHP | mit | 7,139 |
using System.Web.Mvc;
namespace SOURCE.BackOffice.Web.Controllers.Modularity
{
public class BaseController : Controller
{
protected string Rubrique { get; set; }
protected string Page { get; set; }
protected string Secteur { get; set; }
public BaseController()
... | apo-j/Projects_Working | S/SOURCE/SOURCE.BackOffice/SOURCE.BackOffice.Web.Controllers/Modularity/BaseController.cs | C# | mit | 1,754 |
import signal
import subprocess
import sys
import time
import numba
import numpy as np
import SharedArray as sa
sys.path.append('./pymunk')
import pymunk as pm
max_creatures = 50
@numba.jit
def _find_first(vec, item):
for i in range(len(vec)):
if vec[i] == item:
return i
return -1
@numb... | brains-on-art/culture | culture_logic.py | Python | mit | 7,076 |
//go:build go1.16
// +build go1.16
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the cod... | Azure/azure-sdk-for-go | sdk/resourcemanager/azuredata/armazuredata/zz_generated_response_types.go | GO | mit | 5,207 |
#
# Author:: MJ Rossetti (@s2t2)
# Cookbook Name:: trailmix
# Recipe:: mail
#
# Install sendmail package.
package "sendmail"
package "sendmail-cf"
# Upload sendmail configuration files.
template "/etc/mail/local-host-names" do
source "mail/local-host-names.erb"
owner "root"
group "root"
end
template "/etc/ma... | s2t2/trailmix-solo | site-cookbooks/trailmix/recipes/mail.rb | Ruby | mit | 700 |
package main.java.util;
/**
*
* @author mancim
*/
public class Sorter implements SortUtil,AscSortUtil{
}
| stoiandan/msg-code | Marius/Day6/src/main/java/util/Sorter.java | Java | mit | 118 |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("03M... | Avarea/Programming-Fundamentals | IntroAndSyntax/03Megapixels/Properties/AssemblyInfo.cs | C# | mit | 1,395 |
# frozen_string_literal: true
class FixSangerSequencingSubmissionCascadesForOracle < ActiveRecord::Migration[4.2]
def change
# Oracle does not support on_update so we need to remove and re-add it to keep
# consistent with the MySQL installations
remove_foreign_key :sanger_sequencing_samples, column: :su... | tablexi/nucore-open | vendor/engines/sanger_sequencing/db/migrate/20160802202924_fix_sanger_sequencing_submission_cascades_for_oracle.rb | Ruby | mit | 467 |
var express = require('express');
var scraptcha = require('scraptcha');
// Scraptcha images source information.
var imageInformation = {path: __dirname + "/images/green/",
filePrefix: "i_cha_",
fileExtension: ".gif"};
// Initialize the Scraptcha data.
sc... | deckerld/scraptcha | test/file-server.js | JavaScript | mit | 847 |
package observerSampleJavaAPI;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
NameArrayObservable na = new NameArrayObservable();
NameArrayObserver nav = new NameArrayObserver();
na.addObserver(nav);
Scanner sc = new Scanner(System.in);
System.out.print... | dmpe/Semester2and5-Examples | src-semester2/observerSampleJavaAPI/Main.java | Java | mit | 467 |