repo_name
stringlengths
4
116
path
stringlengths
4
379
size
stringlengths
1
7
content
stringlengths
3
1.05M
license
stringclasses
15 values
OreCruncher/ThermalRecycling
src/main/java/org/blockartistry/mod/ThermalRecycling/util/Matrix2D.java
2111
/* This file is part of ThermalRecycling, licensed under the MIT License (MIT). * * Copyright (c) OreCruncher * * 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, incl...
mit
bdjnk/cerebral
packages/cerebral-provider-forms/src/helpers/resetForm.test.js
1110
/* eslint-env mocha */ import resetForm from './resetForm' import assert from 'assert' describe('resetForm', () => { it('should reset form', () => { const form = resetForm({ name: { value: 'Ben', defaultValue: '' } }) assert.equal(form.name.value, '') assert.equal(form.nam...
mit
ubpb/alma_api
spec/spec_helper.rb
687
if ENV["CODECLIMATE_REPO_TOKEN"] require "codeclimate-test-reporter" CodeClimate::TestReporter.start else require "simplecov" SimpleCov.start end require "alma_api" require "hashdiff" require "yaml" begin require "pry" rescue LoadError end RSpec.configure do |config| # begin --- rspec 3.1 generator con...
mit
nelson-liu/paraphrase-id-tensorflow
tests/util/test_pooling.py
1709
import tensorflow as tf from numpy.testing import assert_allclose import numpy as np from duplicate_questions.util.pooling import mean_pool from ..common.test_case import DuplicateTestCase class TestUtilsPooling(DuplicateTestCase): def test_mean_pool_with_sequence_length(self): with tf.Session(): ...
mit
johnny-miyake/handle_as
lib/sample/app/controllers/application_controller.rb
280
class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception handle_as_gateway_timeout RuntimeError before_action ->{raise "hoge"} end
mit
Gogra/Majespay-UFC
src/Majespay/Ufc/Transaction/TransactionProcessException.php
108
<?php namespace Majespay\Ufc\Transaction; class TransactionProcessException extends \Exception { }
mit
henrikfroehling/TraktApiSharp
Source/Lib/TraktApiSharp/Objects/Get/Users/Implementations/TraktUserComment.cs
2099
namespace TraktApiSharp.Objects.Get.Users { using Basic; using Enums; using Episodes; using Lists; using Movies; using Seasons; using Shows; /// <summary>A Trakt user comment.</summary> public class TraktUserComment : ITraktUserComment { /// <summary> /// Gets o...
mit
Lugdunum3D/Lugdunum
src/lug/Graphics/Vulkan/API/Semaphore.cpp
1005
#include <lug/Graphics/Vulkan/API/Semaphore.hpp> #include <lug/Graphics/Vulkan/API/Device.hpp> namespace lug { namespace Graphics { namespace Vulkan { namespace API { Semaphore::Semaphore(VkSemaphore semaphore, const Device* device) : _semaphore(semaphore), _device(device) {} Semaphore::Semaphore(Semaphore&& semaph...
mit
crowning-/dash
src/qt/dash.cpp
25069
// Copyright (c) 2011-2015 The Bitcoin Core developers // Copyright (c) 2014-2017 The Dash Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #if defined(HAVE_CONFIG_H) #include "config/dash-config.h" #endif #inclu...
mit
goldrush/goldrush
app/helpers/contract_term_helper.rb
56
# -*- encoding: utf-8 -*- module ContractTermHelper end
mit
chav1961/purelib
src/main/java/chav1961/purelib/streams/char2byte/asm/macro/Macros.java
44625
package chav1961.purelib.streams.char2byte.asm.macro; import java.io.Closeable; import java.io.IOException; import java.io.Reader; import java.lang.reflect.Array; import java.util.Arrays; import chav1961.purelib.basic.AndOrTree; import chav1961.purelib.basic.exceptions.CalculationException; import chav1961....
mit
choijun/Javier-Package-Demo
importer/importer.php
33591
<?php defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); if(!class_exists('WXR_Importer')){ require dirname( __FILE__ ) . '/verdor/humanmade/WordPress-Importer/plugin.php'; } //defined('IMPORT_DEBUG') or define('IMPORT_DEBUG', true); class LaStudio_Importer { protected $fetch_attachments = true; prote...
mit
tagniam/Turn
src/Game.cpp
13845
#include <iostream> #include <ctime> #include <fstream> #include <string> #include <limits> #include "../include/Game.h" #include "../include/Common.h" #include "../include/Console.h" #include "../include/PlayerTypes/PlayerTypes.h" #include "../include/EnemyTypes/EnemyTypes.h" using namespace std; using namespace C...
mit
gregsdennis/Manatee.Json
Manatee.Json/Path/IJsonPathOperator.cs
138
namespace Manatee.Json.Path { internal interface IJsonPathOperator { JsonArray Evaluate(JsonArray json, JsonValue root); } }
mit
arnegroskurth/Symgrid
Grid/DataSource/ArrayDataSource.php
6491
<?php namespace ArneGroskurth\Symgrid\Grid\DataSource; use ArneGroskurth\Symgrid\Grid\AbstractColumn; use ArneGroskurth\Symgrid\Grid\AbstractDataSource; use ArneGroskurth\Symgrid\Grid\ArraysTrait; use ArneGroskurth\Symgrid\Grid\ColumnList; use ArneGroskurth\Symgrid\Grid\Column\BoolColumn; use ArneGroskurth\Symgrid\Gr...
mit
Phalanxia/Pastel-Dreams
app/main.js
547
requirejs(["config"], function() { requirejs([ // Libraries "underscore", "backbone", "marionette", "jquery", // Scripts "app", "client", // Maid Libraries "lib/maid/windowing" // Templates ], function (_, Backbone, Marionette, $, Maid, Client, windowing) { Client(); Maid.addRegions({ s...
mit
turingincomplete/MatchboxChip8
tests/interpreterTests.js
43764
var assert = require('assert'); var rewire = require('rewire'); var MatchboxChip8 = rewire('../src/MatchboxChip8'); describe('interpreter', function() { it('00E0 - should clear the display', function() { var testProgram = [ 0x00, 0xe0, ]; var interpreter = new Matc...
mit
thecodefish/WebDriverModels
WebDriverModels.Tests/Properties/AssemblyInfo.cs
1454
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: AssemblyTi...
mit
finagram/finagram
src/main/scala/ru/finagram/api/json/AnswerSerializer.scala
2410
package ru.finagram.api.json import org.json4s.JsonAST.{ JInt, JObject } import org.json4s.JsonDSL._ import org.json4s.{ DefaultFormats, Extraction, Formats, JValue, Serializer, TypeInfo } import ru.finagram.api._ object AnswerSerializer extends Serializer[Answer] { private val AnswerClass = classOf[Answer] ove...
mit
ErikVerheul/jenkins
core/src/main/java/jenkins/model/lazy/AbstractLazyLoadRunMap.java
19309
/* * The MIT License * * Copyright (c) 2012, CloudBees, Inc. * * 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, c...
mit
julianmendez/desktop-search
search-core/src/main/java/com/semantic/lucene/fields/image/PixelSizeField.java
979
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.semantic.lucene.fields.image; import com.semantic.lucene.util.IFieldProperty; import org.apache.lucene.document.Document; ...
mit
npakai/enhavo
src/Enhavo/Bundle/NewsletterBundle/Strategy/DoubleOptInStrategy.php
6842
<?php /** * DoubleOptInStrategy.php * * @since 21/09/16 * @author gseidel */ namespace Enhavo\Bundle\NewsletterBundle\Strategy; use Enhavo\Bundle\NewsletterBundle\Form\Resolver; use Enhavo\Bundle\NewsletterBundle\Model\SubscriberInterface; use Enhavo\Bundle\NewsletterBundle\Storage\LocalStorage; use Enhavo\Bundl...
mit
positive-js/mosaic
packages/mosaic/sidepanel/sidepanel-config.ts
1110
import { InjectionToken } from '@angular/core'; /** Injection token that can be used to access the data that was passed in to a sidepanel. */ export const MC_SIDEPANEL_DATA = new InjectionToken<any>('McSidepanelData'); export enum McSidepanelPosition { Right = 'right', Left = 'left', Top = 'top', Bot...
mit
LeonardoCiaccio/Awesome.Bookmarklets
bookmarklets/dailymotion.downloader/dailymotion.downloader.js
2866
/* Recupera i links per il download su Dailymotion */ ( function(){ "use strict"; var reSearch = /http(?:s?):\\\/\\\/www\.dailymotion\.com\\\/cdn\\\/[a-zA-Z\-_0-9]{9,16}\\\/video\\\/[a-zA-Z\-_0-9]{3,12}\.[a-z0-9]{3,4}\?auth\=[a-zA-Z\-_0-9]{9,60}/g, reFormat = /[A-Z]{1,3}[0-9]{2,4}\-[0-9]{2,...
mit
nrser/qb
lib/qb/execution.rb
1988
# encoding: UTF-8 # frozen_string_literal: true # Requirements # ======================================================================= # Stdlib # ----------------------------------------------------------------------- # Deps # ----------------------------------------------------------------------- # Need mutable ...
mit
TeamworkGuy2/JTreeWalker
src/twg2/treeLike/IndexedTreeConsumer.java
265
package twg2.treeLike; /** * @param <T> the tree branch element type * @author TeamworkGuy2 * @since 2015-5-27 */ @FunctionalInterface public interface IndexedTreeConsumer<T> { public void accept(T branch, int index, int size, int depth, T parentBranch); }
mit
mbj/request
spec/unit/request/protocol/class_methods/get_spec.rb
685
require 'spec_helper' describe Request::Protocol, '.get' do let(:object) { described_class } subject { object.get(input) } context 'with "http"' do let(:input) { 'http' } it { should eql(Request::Protocol::HTTP) } end context 'with "https"' do let(:input) { 'https' } it { should eql(Reques...
mit
dougkoellmer/dougkoellmer_com
project/src/com/dougkoellmer/server/entities/ServerGrid.java
790
package com.dougkoellmer.server.entities; import java.util.logging.Logger; import com.dougkoellmer.shared.homecells.S_HomeCell; import swarm.server.entities.BaseServerGrid; import swarm.shared.json.A_JsonFactory; import swarm.shared.json.I_JsonObject; public class ServerGrid extends BaseServerGrid { private stati...
mit
zekewang918/QuitSmoking
bbs/source/plugin/mobile/api/1/seccode.php
1818
<?php /** * [Discuz!] (C)2001-2099 Comsenz Inc. * This is NOT a freeware, use is subject to license terms * * $Id: seccode.php 27959 2012-02-17 09:52:22Z monkey $ */ if(!defined('IN_MOBILE_API')) { exit('Access Denied'); } include_once 'misc.php'; class mobile_api { function ...
mit
goodzsq/cocos_template
src/lib/cocos/component/DrawRect.js
1309
/** * DrawingBoard */ var Component = cc.Component.extend({ ctor: function(option){ this._super(); this.setName(option.name || 'DrawRect'); this._data = {}; }, onEnter: function(){ this._super(); var owner = this.getOwner(); this.drawNode = cc.DrawNode.create(); this.drawNode.zIndex = ...
mit
rkusa/hierarchical-router
test/client.js
2693
/*global suite, test, teardown */ var expect = require('chai').expect var router = require('./app/app') var stack = [] router.on('execute', function(path) { stack.push(path) }) teardown(function() { stack = [] }) suite('Client-Side', function() { test('initialize properly', function(done) { router.start('...
mit
yonjah/hapi-flow-server
modules/runTimeout.js
682
'use strict'; // return a function that runs func in a minimum fixed timeout, // function will not be called until previous call is complete. module.exports = (function runTimeout (func, timeout) { var running = false, timer = 0, cb = function () { running =false; }, runner = function () { timer = clea...
mit
Klaital/HeatFlow
src/ublas_testing.cpp
484
#include <boost/numeric/ublas/vector.hpp> #include <boost/numeric/ublas/matrix.hpp> #include <boost/numeric/ublas/io.hpp> #include <iostream> using namespace boost::numeric::ublas; /* "y = Ax" example */ int main() { vector<double> x (2); x(0) = 1; x(1) = 2; matrix<double> A(2,2); A(0,0) = 0; A(0...
mit
berrygoudswaard/cakephp
src/Controller/Component/PaginatorComponent.php
15501
<?php /** * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyr...
mit
Waavi/url-shortener
tests/FactoryTest.php
889
<?php namespace Waavi\UrlShortener\Test; class FactoryTest extends TestCase { /** * @test */ public function it_creates_google_driver() { $factory = $this->app['urlshortener.factory']; $driver = $factory->make('google'); $this->assertInstanceOf(\Waavi\UrlShortener\Drive...
mit
ArcticWarriors/snobot-2017
RobotCode/snobot2017/src/com/snobot2017/joystick/IOperatorJoystick.java
1267
package com.snobot2017.joystick; import com.snobot.lib.modules.IJoystick; /** * Joystick for interacting with the Gear Boss * * @author jbnol * */ public interface IOperatorJoystick extends IJoystick { enum GearBossPositions { NONE, UP, DOWN } /** * Is the catch rope button pressed...
mit
drazenzadravec/projects
nice/sdk/json/Skills/UpdateCampaignResponse.js
41
var UpdateCampaignResponse_Skills = { };
mit
plyschik/s3blog
src/AppBundle/Entity/Tag.php
4065
<?php namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; use Symfony\Component\Validator\Constraints as Assert; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; /** * @ORM\Table(name="tag") * @ORM\Entity(repositoryClass="AppBundle\Repository\TagReposi...
mit
andelf/rust-sdl2_gfx
src/sdl2_gfx/lib.rs
288
/*! A binding for SDL2_gfx. */ extern crate libc; extern crate num; extern crate sdl2; extern crate sdl2_sys as sys; extern crate c_vec; // Setup linking for all targets. #[link(name="SDL2_gfx")] extern {} pub mod primitives; pub mod rotozoom; pub mod framerate; pub mod imagefilter;
mit
tpolecat/doobie
modules/core/src/test/scala/doobie/util/YoloSuite.scala
657
// Copyright (c) 2013-2020 Rob Norris and Contributors // This software is licensed under the MIT License (MIT). // For more information see LICENSE or https://opensource.org/licenses/MIT package doobie package util import cats.effect.IO import doobie.util.yolo._ class YoloSuite extends munit.FunSuite { // Kind o...
mit
laserlemon/periscope
spec/support/adapters/active_record/database_cleaner.rb
221
require File.expand_path("../connection", __FILE__) require "database_cleaner" DatabaseCleaner["active_record"].strategy = :truncation RSpec.configure do |config| config.before do DatabaseCleaner.clean end end
mit
rahuldhawani/whatsOnGmail
app/components/version/version-directive.js
203
'use strict'; angular.module('gmailChat.version.version-directive', []) .directive('appVersion', ['version', function(version) { return function(scope, elm, attrs) { elm.text(version); }; }]);
mit
rcos/Observatory3
Gruntfile.js
22225
// Generated on 2016-03-12 using generator-angular-fullstack 3.4.0 'use strict'; module.exports = function (grunt) { var localConfig; try { localConfig = require('./server/config/local.env'); } catch(e) { localConfig = {}; } // Load grunt tasks automatically, when needed require('jit-grunt')(grunt...
mit
Autlo/stdlib
test/int.js
427
'use strict'; var assert = require('assert'); var int = require('../src/int'); describe('Int', function () { describe('#toHex', function () { it('Should pad hex string with zeros if needed', function () { assert.strictEqual(int.toHex(1), '01'); }); it('Should convert integer t...
mit
anthonyreilly/NetCoreForce
src/NetCoreForce.Models/SfContentVersionHistory.cs
3586
// SF API version v50.0 // Custom fields included: False // Relationship objects included: True using System; using NetCoreForce.Client.Models; using NetCoreForce.Client.Attributes; using Newtonsoft.Json; namespace NetCoreForce.Models { ///<summary> /// Content Version History ///<para>SObject Name: ContentVersion...
mit
cuckata23/wurfl-data
data/sie_cf6c_ver1.php
186
<?php return array ( 'id' => 'sie_cf6c_ver1', 'fallback' => 'sie_cf62_ver1', 'capabilities' => array ( 'model_name' => 'CF6C', 'streaming_real_media' => 'none', ), );
mit
kocsismate/php-di-container-benchmarks
src/Fixture/B/FixtureB231.php
99
<?php declare(strict_types=1); namespace DiContainerBenchmarks\Fixture\B; class FixtureB231 { }
mit
MazaloOksana/MovieSerch
MovieSearch/MovieSearch/App_Start/FilterConfig.cs
265
using System.Web; using System.Web.Mvc; namespace MovieSearch { public class FilterConfig { public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); } } }
mit
ovac/hubtel-payment
tests/Unit/Api/ApiTest.php
6594
<?php /** * @package OVAC/Hubtel-Payment * @link https://github.com/ovac/hubtel-payment * * @author Ariama O. Victor (OVAC) <contact@ovac4u.com> * @link http://ovac4u.com * * @license https://github.com/ovac/hubtel-payment/blob/master/LICENSE * @copyright (c) 2017, RescopeNet, Inc ...
mit
codeborne/selenide
src/test/java/com/codeborne/selenide/conditions/NotTest.java
2863
package com.codeborne.selenide.conditions; import com.codeborne.selenide.CheckResult; import com.codeborne.selenide.Condition; import com.codeborne.selenide.Driver; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.Mockito; import org...
mit
instructure/ims-lti
lib/ims/lti/serializers/membership_service/membership_serializer.rb
213
module IMS::LTI::Serializers::MembershipService class MembershipSerializer < IMS::LTI::Serializers::Base set_attribute :id, key: :@id set_attributes :status, :role has_serializable :member end end
mit
djedi23/meteor-presentation
server/init.js
1027
Meteor.startup(function(){ if (! modules.collections.Presentations.findOne({name:'mypresentation'})) { modules.collections.Presentations.insert({ name: 'mypresentation', steps: [ {id:"s1", x:-1000, y:-1500, md: "rrezy: reactive prezentation", style:"clean", worldStyle:"clear" }, {id:...
mit
neonbug/meexo-common
src/assets/admin_assets/js/ckeditor/config.js
411
/** * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: // config.language = 'fr'; // config.uiColor = '#...
mit
promlow/books-and-tutorials
accel-cpp/5/fail.cpp
380
#include "fail.h" #include "grade.h" using std::list; list<Student_info> extract_fails(list<Student_info>& students) { list<Student_info> fails; list<Student_info>::iterator iter = students.begin(); while (iter != students.end()) { if (fgrade(*iter)) { fails.push_back(*iter); iter = students.e...
mit
postfix/gocrud
helper/helper.go
1465
package helper import ( "net/http" "github.com/manishrjain/gocrud/api" "github.com/manishrjain/gocrud/req" "github.com/manishrjain/gocrud/x" ) type Entity struct { Id string `json:"id,omitempty"` Kind string `json:"kind,omitempty"` Data map[string]interface{} `json:"dat...
mit
oriondean/typescript-angular-bitcoin-exchange
client/src/app/order-depth/order-depth-order.ts
104
export class OrderDepthOrder { constructor(public price: number, public quantity: number) { } }
mit
devkimchi/HAL-Swagger-Sample
src/HalSwaggerSample.HalApiApp/App_Start/WebApiConfig.cs
1355
using System; using System.Web.Http; using Autofac; using Autofac.Integration.WebApi; using Owin; namespace HalSwaggerSample.HalApiApp { /// <summary> /// This represents the config entity for Web API. /// </summary> public static class WebApiConfig { /// <summary> /// Configures...
mit
endjin/Endjin.Licensing
Solutions/Endjin.Licensing.Demo.ClientApp/Properties/AssemblyInfo.cs
1497
using System.Reflection; 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("Endjin.Licensing.Demo.ClientApp")] [assem...
mit
txstate-etc/attendance
app/models/membership.rb
3839
class Membership < ActiveRecord::Base attr_accessible :active, :sourcedid belongs_to :site, :inverse_of => :memberships belongs_to :user, :inverse_of => :memberships has_many :userattendances, :dependent => :destroy has_and_belongs_to_many :sections, :after_add => :react_to_recordedstatus_change, :a...
mit
apita1973/oauthexample
api.go
2092
package main import ( "errors" "fmt" "io/ioutil" "log" "net/http" "code.google.com/p/gcfg" "github.com/codegangsta/martini" "golang.org/x/net/context" "golang.org/x/oauth2" ) type Config struct { Oauth struct { ClientID string ClientSecret string } } var ( cfg Config conf *oauth2.Config st...
mit
azer/domloader
build/domloader-v1.0rc9.js
28639
var domloader = (function(globals,undefined){ var jsbuild = (function(){ var cache = {}; function Module(){ this.exports = null; this.fileName = null; this.id = null; this.workingDir = null; this.wrapper = null; }; Module.prototype.call = function(){ this.export...
mit
antonhedstrom/node-spnl-logger
public/assets/js/screens/scr.userprofile.js
1090
define([ 'app', 'marionette', 'tpl!./templates/main', // Models '../models/user.model', // Views '../views/userprofile', '../views/user-menu' ], function( App, Marionette, MainTemplate, // Models UserModel, // Views UserProfileView, UserMenuView ) { var Layout = Backbone.Marionet...
mit
kenkov/kovlang-corpus
scripts/chartype.py
11907
#! /usr/bin/env python # coding:utf-8 import unicodedata import re class CharException(TypeError): def __init__(self, sent): self.sent = sent def __str__(self): return "need a single Unicode character as parameter\ : {}".format(self.sent) class CharTypeException(TypeError): def __in...
mit
benz2012/derby-dashboard
server/routes/data/alumni.js
5904
const express = require('express') const { get, update } = require('../../database') const params = require('../../database/params') const { errorEnd, applyKeyMapToObj, markdownToHTML } = require('./utility') const router = express.Router() // Shared Functions const keyMap = { name: 'Name', email: 'Email', ple...
mit
Hawatel/hawatel_search_jobs
spec/reed_spec.rb
3162
require 'spec_helper' require 'ostruct' xdescribe HawatelSearchJobs::Api::Reed do before(:each) do HawatelSearchJobs.configure do |config| config.reed[:api] = "reed.co.uk/api" config.reed[:clientid] = '' config.reed[:page_size] = 100 end end context 'APIs returned jobs' do ...
mit
nellypeneva/SoftUniProjects
01_ProgrFundamentalsMay/11_Data-Types-Exercises/07_ExchangeVariableValues/Properties/AssemblyInfo.cs
1426
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("07...
mit
jszoo/cat-mvc
mvc/httpHelper.js
3986
/* * httpHelper * author: ruleechen * contact: rulee@live.cn * create date: 2014.7.25 * description: migrate from expressjs [https://github.com/strongloop/express/blob/master/lib/utils.js] */ 'use strict'; var mime = require('send').mime, crc32 = require('buffer-crc32'), crypto = require('crypto'), basena...
mit
PlayArShop/mobile-application
Assets/Games/StMichel/Scripts/TriggerBasketGoal.cs
328
using UnityEngine; using UnityEngine.UI; using System.Collections; public class TriggerBasketGoal : MonoBehaviour { void OnCollisionEnter (Collision col) { if(col.gameObject.name == "Cracker" || col.gameObject.name == "nextCracker") { //Destroy(col.gameObject); GameOver.score++; } } void Update () {...
mit
AVSystem/scex
scex-core/src/test/scala/com/avsystem/scex/compiler/ScexCompilerTest.scala
14233
package com.avsystem.scex package compiler import com.avsystem.scex.compiler.ParameterizedClass.StaticInnerGeneric import com.avsystem.scex.compiler.ScexCompiler.CompilationFailedException import com.avsystem.scex.compiler.overriding.{Base, Klass, Specialized} import com.avsystem.scex.util.{PredefinedAccessSpecs, Simp...
mit
rtnews/rtsfnt
node_modules/@nebular/theme/components/helpers.js
542
/** * @license * Copyright Akveo. All Rights Reserved. * Licensed under the MIT License. See License.txt in the project root for license information. */ /** * @license * Copyright Akveo. All Rights Reserved. * Licensed under the MIT License. See License.txt in the project root for license information. */ export...
mit
matheus23/RuinsOfRevenge
src/org/matheusdev/util/MissingJSONContentException.java
1386
/* * Copyright (c) 2013 matheusdev * * 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,...
mit
jeremysklarsky/movie-demo
db/migrate/20150408014912_create_critic_reviews.rb
278
class CreateCriticReviews < ActiveRecord::Migration def change create_table :critic_reviews do |t| t.integer :critic_id t.integer :movie_id t.integer :score t.string :excerpt t.string :link t.timestamps null: false end end end
mit
ebnibrahem/m5
app/_c/admin/setting.php
1227
<?php namespace M5\Controllers\Admin; use M5\MVC\App; use M5\MVC\Controller as BaseController; use M5\Library\Bread; use M5\Library\Page; use M5\Library\Session; use M5\Library\Clean; use M5\Library\Auth; use M5\MVC\Model; class Setting extends BaseController { private $tbl = "preferences"; private $class_label =...
mit
tarnfeld/snowey
example/example.rb
315
#!/usr/bin/env ruby require 'socket' opts = { :address => "0.0.0.0", :port => 2478 } connection = TCPSocket.open opts[:address], opts[:port] # Get ID connection.print "ID twtmore" puts connection.gets # Get INFO connection.print "INFO twtmore" puts connection.gets # Close the connection connection.close
mit
conveyal/analysis-ui
pages/regions/[regionId]/projects/[projectId]/modifications/[modificationId].js
2145
import dynamic from 'next/dynamic' import {useCallback} from 'react' import {useDispatch, useSelector} from 'react-redux' import {loadBundle} from 'lib/actions' import getFeedsRoutesAndStops from 'lib/actions/get-feeds-routes-and-stops' import { saveToServer, setLocally, loadModification } from 'lib/actions/modi...
mit
gerich-home/ROI-Web-School
CRM/Web/Global.asax.cs
501
namespace Crm { using System.Web; using System.Web.Http; using System.Web.Mvc; using System.Web.Routing; using Web; public class MvcApplication : HttpApplication { protected void Application_Start() { AreaRegistration.RegisterAllAreas(); WebApiConfig.Register(Glob...
mit
LiveSplit/LiveSplit
LiveSplit/LiveSplit.Core/Model/TimeStamp.cs
4246
using System; using System.Collections.Generic; using System.Linq; using System.Diagnostics; using System.Threading; using System.Threading.Tasks; namespace LiveSplit.Model { public sealed class TimeStamp { public static double PersistentDrift { get; set; } public static double NewDrift { get;...
mit
agrc/deq-spills
scripts/deq_spills_pallet.py
1435
#!/usr/bin/env python # * coding: utf8 * ''' deq_spills_pallet.py A module containing the pallet plugin for the deq-spills project. ''' from os.path import join from forklift.models import Pallet class DEQSpillsPallet(Pallet): def build(self, configuration): self.arcgis_services = [('DEQSpills/MapServi...
mit
from-nibly/wyre
test/server/listen.js
1553
/*! * wyre: the new way to do websockets * Copyright(c) 2015 Jordan S Davidson <thatoneemail@gmail.com> * MIT Licensed */ var assert = require('assert'), Client = require('../../lib/index.js').Client, Server = require('../../lib/index.js').Server, MultiDone = require('../multiDone.js'), ClosingDone = requir...
mit
GTMAP-OS/helium
client/src/main/java/cn/gtmap/helium/client/converter/ValueConverter.java
842
package cn.gtmap.helium.client.converter; import cn.gtmap.helium.client.exception.WrongAppConfigException; /** * Author: <a href="mailto:yingxiufeng@gtmap.cn">yingxiufeng</a> * Date: 2016/6/18 9:42 */ public interface ValueConverter<T> { /** * 将属性值转换为目标数据类型. * * @param key 键 * @param val...
mit
zigiphp/zigiphp-2
App/serviceProviders/validatorServiceProvider.php
93
<?php /** * @return \App\Validator */ return function () { return new \App\Validator(); };
mit
grecosoft/NetFusion
netfusion/src/Common/NetFusion.Common/Extensions/Reflection/CreationExtensions.cs
3451
using System; using System.Collections.Generic; using System.Linq; namespace NetFusion.Common.Extensions.Reflection { /// <summary> /// Extension methods for creating object instances and for checking /// related type properties. /// </summary> public static class CreationExtensions { ...
mit
TooTallNate/NodObjC
examples/nsapplescript.js
781
var $ = require('../'); // import the "Foundation" framework and its dependencies $.import('Foundation'); // create the mandatory NSAutoreleasePool instance var pool = $.NSAutoreleasePool('alloc')('init'); // create an NSString of the applescript command that will be run var command = $('tell (system info) to return...
mit
coe/WinkModule
winkfragment/src/main/java/jp/coe/winkfragment/camera/GraphicOverlay.java
6373
/* * Copyright (C) The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicab...
mit
dwickstrom/Manager
src/MageTest/Manager/FixtureFallback.php
1904
<?php namespace MageTest\Manager; /** * Class FixtureFallback * * @package MageTest\Manager */ final class FixtureFallback { /** * Where project specific fixtures should be stored */ const CUSTOM_DIRECTORY_LOCATION = 'tests/fixtures'; /** * Where default fixtures are stored */ ...
mit
michel98/RA1
RA-KimberlyMichelEstradaBlanco/WebApplication1/Properties/AssemblyInfo.cs
1475
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // La información general sobre un ensamblado se controla mediante el siguiente // conjunto de atributos. Cambie los valores de estos atributos para modificar la información // asociada a un ensamblado. [assembly: A...
mit
liangzhifeng/yo
lib/proxyRoute.js
2376
/*! * yo * Copyright(c) 2015 Hbomb * MIT Licensed */ 'use strict'; /** * 模块依赖 * @private */ var _ = require('lodash'); var fs = require('fs'); var md5 = require('./util').md5; //接口配置字典 exports.interfacesConfig = {}; /** * 解析接口信息,配置初始化接口路由 * @param {[type]} app web APP * @param {Array} interfaces 接口信息...
mit
xuan6/admin_dashboard_local_dev
node_modules/react-icons-kit/entypo/fastForward.js
558
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var fastForward = exports.fastForward = { "viewBox": "0 0 20 20", "children": [{ "name": "path", "attribs": { "d": "M9.244,9.52L2.041,4.571C1.469,4.188,1,4.469,1,5.196v9.609c0,0.725,0.469,1.006,1.041,0.625l7.203-4.951\r\n\tc0,0,0.279-0.199,...
mit
angular/angular-cli-stress-test
src/app/components/comp-2863/comp-2863.component.spec.ts
847
/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { Comp2863Component } from './comp...
mit
N00bface/Real-Dolmen-Stage-Opdrachten
stageopdracht/src/main/resources/static/vendors/gentelella/vendors/echarts/test/ut/core/utHelper.js
4361
/* * Copyright (c) 2017. MIT-license for Jari Van Melckebeke * Note that there was a lot of educational work in this project, * this project was (or is) used for an assignment from Realdolmen in Belgium. * Please just don't abuse my work */ (function (context) { /** * @public * @type {Object} ...
mit
MisterToolbox/bittrex-api
lib/bittrex/summary.rb
914
require 'time' module Bittrex class Summary attr_reader :market, :name, :high, :low, :volume, :last, :base_volume, :raw, :created_at alias_method :vol, :volume alias_method :base_vol, :base_volume def initialize(attrs = {}, market = nil) @market = market @name = attrs[...
mit
nikolai-b/rocket_pants
lib/rocket_pants/rspec_matchers.rb
4065
module RocketPants module RSpecMatchers extend RSpec::Matchers::DSL def self.normalised_error(e) if e.is_a?(String) || e.is_a?(Symbol) Errors[e] else e end end KEYS_TO_DELETE = %w(url root instance_options).freeze def self.normalise_urls(object) if object....
mit
ev34j/ev34j
ev34j-core/src/main/java/com/ev34j/core/buttons/ev3/ButtonType.java
604
package com.ev34j.core.buttons.ev3; import static java.lang.String.format; public enum ButtonType { UP(103), DOWN(108), LEFT(105), RIGHT(106), ENTER(28), BACKSPACE(14); private final int value; ButtonType(final int value) { this.value = value; } public int getValue() { return this.value; }...
mit
Vibek/Human_intention
feature_extraction_package/src/Dead_ball.cpp
5535
#include <ros/ros.h> #include <tf/transform_listener.h> #include <stdio.h> #include <fstream> using namespace std; #define PI 3.14159265 int main(int argc, char** argv){ ros::init(argc, argv, "my_tf_listener"); ros::NodeHandle node; tf::TransformListener listener; ros::Rate rate(10.0); vector<double> right_h...
mit
rvalenciano/personal_page
config/session.js
1802
/** * Session * * Sails session integration leans heavily on the great work already done by Express, but also unifies * Socket.io with the Connect session store. It uses Connect's cookie parser to normalize configuration * differences between Express and Socket.io and hooks into Sails' middleware interpreter to ...
mit
scholster/QueskeyDev
src/Queskey/FrontEndBundle/Controller/CourseController.php
4300
<?php namespace Queskey\FrontEndBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; class CourseController extends Controller { private $loggedInUser; function __construct() { $session = new \Symfony\Component\HttpFoundation\Session\Session(); $session-...
mit
h8every1/yii2-requirejs-view
assets/JqueryAsset.php
210
<?php namespace h8every1\requirejsview\assets; class JqueryAsset extends RequireJsAssetBundle { public $sourcePath = '@bower/jquery/dist'; public $js = [ 'jquery' => ['jquery.min.js'], ]; }
mit
ascartabelli/lamb
src/__tests__/custom_matchers.js
1193
function isSparseArray (array) { return Array.isArray(array) && Object.keys(array).filter(function (v) { return String(v >>> 0) === v; }).length !== array.length; } function isSparseArrayCheckNeeded (a, b) { return isSparseArray(a) && Array.isArray(b) || isSparseArray(b) && Array.isArray(a); } exp...
mit
kevinjruffe/tick-tock
notificationSender.php
1161
<?php // Grab keys and info for database connection. require_once '/var/www/html/kevinruffe.com/keys.php'; // Create the database connection. $dsn = "mysql:host=$host;dbname=$dbname;charset=$charset"; $pdo = new PDO($dsn, $username, $password); // Find current time info. $currentHour = date('g'); $currentMinutes = i...
mit
a11n/devfest-2016-realm
app/src/main/java/gdg/devfest/passwordmanager/framework/Injector.java
77
package gdg.devfest.passwordmanager.framework; public interface Injector {}
mit