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
// Copyright (c) 2015-2017 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <zmq/zmqabstractnotifier.h> #include <util.h> CZMQAbstractNotifier::~CZMQAbstractNotifier() { assert(!psocket)...
globaltoken/globaltoken
src/zmq/zmqabstractnotifier.cpp
C++
mit
636
// Copyright (c) 2012 Ecma International. All rights reserved. // Ecma International makes this code available under the terms and conditions set // forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the // "Use Terms"). Any redistribution of this code must retain the above // copyright and this n...
PiotrDabkowski/Js2Py
tests/test_cases/built-ins/Array/prototype/reduce/15.4.4.21-2-15.js
JavaScript
mit
1,201
import builder = require('botbuilder'); export module Helpers { export class API { public static async DownloadJson(url:string, post:boolean=false, options:any=undefined): Promise<string>{ return new Promise<string>(resolve => { var XMLHttpRequest = require("xmlhttprequest")....
meulta/babylonjsbot
Common/Helpers.ts
TypeScript
mit
983
using System; using System.Collections.Generic; using System.Linq; using System.Web; using WingtipToys.Models; namespace WingtipToys.Logic { public class AddProducts { public bool AddProduct(string ProductName, string ProductDesc, string ProductPrice, string ProductCategory, string ProductImagePath) ...
zacblazic/wingtip-toys
WingtipToys/Logic/AddProducts.cs
C#
mit
934
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.security.fluent; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.c...
Azure/azure-sdk-for-java
sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecureScoreControlDefinitionsClient.java
Java
mit
3,054
<?php namespace Seahinet\Catalog\Indexer; use Seahinet\Catalog\Model\Collection\Product; use Seahinet\Catalog\Model\Product as ProductModel; use Seahinet\Catalog\Model\Collection\Category; use Seahinet\Lib\Db\Sql\Ddl\Column\UnsignedInteger; use Seahinet\Lib\Indexer\Handler\AbstractHandler; use Seahinet\Lib\I...
peachyang/py_website
app/code/Catalog/Indexer/Url.php
PHP
mit
5,418
package org.superboot.service; import com.querydsl.core.types.Predicate; import org.springframework.data.domain.Pageable; import org.superboot.base.BaseException; import org.superboot.base.BaseResponse; /** * <b> 错误日志服务接口 </b> * <p> * 功能描述: * </p> */ public interface ErrorLogService { /** * 按照微服务模块进行分组...
7040210/SuperBoot
super-boot-global/src/main/java/org/superboot/service/ErrorLogService.java
Java
mit
1,147
$(function () { var $container = $('#container'); var certificatesInfo = $container.data('certinfo'); var runDate = $container.data('rundate'); $('#created_date').html(runDate); var sorted_certificates = Object.keys(certificatesInfo) .sort(function( a, b ) { return certificatesInfo[a].info.days_le...
JensDebergh/certificate-dashboard
public/js/tls-dashboard/scripts.js
JavaScript
mit
2,250
from PIL import Image import matplotlib.pyplot as plt import matplotlib.image as mpimg import numpy as np img1 = Image.open('multipage.tif') # The following approach seems to be having issue with the # current TIFF format data print('The size of each frame is:') print(img1.size) # Plots first frame print('Frame 1'...
johnrocamora/ImagePy
max_tiff.py
Python
mit
1,346
package com.InfinityRaider.AgriCraft.utility; import com.InfinityRaider.AgriCraft.items.ItemAgricraft; import com.InfinityRaider.AgriCraft.items.ItemNugget; import com.InfinityRaider.AgriCraft.reference.Data; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import ...
HenryLoenwind/AgriCraft
src/main/java/com/InfinityRaider/AgriCraft/utility/OreDictHelper.java
Java
mit
5,607
/** * Module dependencies. */ var express = require('express'); var path = require('path'); var api = require('./lib/api'); var seo = require('./lib/seo'); var app = module.exports = express(); app.set('port', process.env.PORT || 3000); app.set('views', __dirname + '/views'); app.use(expre...
brettshollenberger/rootstrikers
server/app.js
JavaScript
mit
1,520
#include <iostream> #include <string> #include <forward_list> using namespace std; void insert(forward_list<string>& fst, const string& to_find, const string& to_add); int main() { forward_list<string> fst{ "pen", "pineapple", "apple", "pen" }; insert(fst, "pen", "and"); for (auto& i : fst) cout << ...
sanerror/sanerror-Cpp-Primer-Answers
ch9/ex9_28.cpp
C++
mit
682
/* * MIT License * * Copyright (c) 2017 Alessandro Arcangeli <alessandroarcangeli.rm@gmail.com> * * 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...
mrkoopa/jfbx
java/mrkoopa/jfbx/FbxCameraStereo.java
Java
mit
1,258
using System; using System.Collections.Generic; using System.Data; using System.Data.Common; using System.Diagnostics; using System.Linq; using System.Linq.Expressions; using System.Text; using System.Threading; using System.Threading.Tasks; namespace LinqToDB.Data { using Linq; using Common; using ...
ronnyek/linq2db
Source/LinqToDB/Data/DataConnection.QueryRunner.cs
C#
mit
17,014
/* * Copyright 2004 The WebRTC Project Authors. All rights reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing ...
koobonil/Boss2D
Boss2D/addon/webrtc-jumpingyang001_for_boss/rtc_base/win32socketserver.cc
C++
mit
22,653
class R: def __init__(self, c): self.c = c self.is_star = False def match(self, c): return self.c == '.' or self.c == c class Solution(object): def isMatch(self, s, p): """ :type s: str :type p: str :rtype: bool """ rs = [] "...
SF-Zhou/LeetCode.Solutions
solutions/regular_expression_matching.py
Python
mit
1,032
namespace GameBoySharp.Domain.Contracts { public interface IContiguousMemory : IReadableMemory, IWriteableMemory { } }
taspeotis/GameBoySharp
GameBoySharp.Domain/Contracts/IContiguousMemory.cs
C#
mit
133
public class App { public static void main(String[] args) { System.out.println("Old man, look at my life..."); } }
zelark/test
src/main/java/App.java
Java
mit
119
var score = 0; var scoreText; var map_x = 14; var map_y = 10; var game = new Phaser.Game(map_x * 16, map_y * 16, Phaser.AUTO, '', { preload: preload, create: create, update: update }); function preload() { // game.scale.maxWidth = 600; // game.scale.maxHeight = 600; game.scale.scaleMode = Phaser.ScaleMan...
henripal/henripal.github.io
game/game.js
JavaScript
mit
3,879
package com.thebluealliance.androidclient.gcm.notifications; import android.app.Notification; import android.content.Context; import android.content.Intent; import android.content.res.Resources; import android.support.v4.app.NotificationCompat; import android.util.Log; import android.view.LayoutInflater; import androi...
Adam8234/the-blue-alliance-android
android/src/main/java/com/thebluealliance/androidclient/gcm/notifications/ScoreNotification.java
Java
mit
11,766
import { expect } from 'chai'; import { Curry } from './curry'; describe('curry', () => { it('should curry the method with default arity', () => { class MyClass { @Curry() add(a: any, b?: any) { return a + b; } } const myClass = new MyClass(); const add5 = myClass.add(5); ...
steelsojka/lodash-decorators
src/curry.spec.ts
TypeScript
mit
1,375
module Fog module XenServer class Compute module Models class CrashDumps < Collection model Fog::XenServer::Compute::Models::CrashDump end end end end end
fog/fog-xenserver
lib/fog/xenserver/compute/models/crash_dumps.rb
Ruby
mit
204
using UnityEngine; using UnityEngine.UI; using System.Collections; public class DebugWindow : MonoBehaviour { public Text textWindow; string freshInput; // Use this for initialization void Start () { if (textWindow == null) throw new UnityException ("Debug Window has no text box to output to."); } // Up...
tlsteenWoo/UnityNeedler
New Unity Project/Assets/Game/Scripts/DebugWindow.cs
C#
mit
505
// Copyright (c) Pomelo Foundation. All rights reserved. // Licensed under the MIT. See LICENSE in the project root for license information. using System.Collections.Generic; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.Storage; using Pomelo.EntityFrameworkCore.MySql.Query.ExpressionT...
PomeloFoundation/Pomelo.EntityFrameworkCore.MySql
src/EFCore.MySql.Json.Microsoft/Query/Internal/MySqlJsonMicrosoftMemberTranslatorPlugin.cs
C#
mit
1,377
export { default } from 'ember-flexberry-gis/services/map-store';
Flexberry/ember-flexberry-gis
app/services/map-store.js
JavaScript
mit
66
#!/usr/bin/env python3 from __future__ import print_function, division import numpy as np from sht.grids import standard_grid, get_cartesian_grid def test_grids(): L = 10 thetas, phis = standard_grid(L) # Can't really test much here assert thetas.size == L assert phis.size == L**2 grid = ge...
praveenv253/sht
tests/test_grids.py
Python
mit
386
var Keyboard_Space = new function(){ this.initKeyboard = function(testing){ testmode = testing; return new Keyboard(); } var Keyboard = function(){ for(var i = 0; i < numChains; i++) currentSounds.push([]); var this_obj = this; Zip_Space...
Dan12/Launchpad
app/assets/javascripts/keyboard.js
JavaScript
mit
13,120
angular.module('booksAR') .directive('userNavbar', function(){ return{ restrict: 'E', templateUrl: './app/components/directives/user/user-navbar.html' }; }) .directive('userBooksTable', function(){ return{ restrict: 'E', templateUrl: './app/components/directives/user/user-books...
AlejandroAcostaT/TypewriterAR
frontend/app/components/directives/user/user.js
JavaScript
mit
1,158
# Filters added to this controller apply to all controllers in the application. # Likewise, all the methods added will be available for all controllers. class ApplicationController < ActionController::Base helper :all helper_method :current_user_session, :current_user filter_parameter_logging :password, :password...
markbates/warp_drive
test_apps/enterprise/app/controllers/application_controller.rb
Ruby
mit
1,267
<?php namespace App\AAS_Bundle\Entity; use Doctrine\ORM\Mapping as ORM; use App\AAS_Bundle\Utils\AAS as AAS; /** * Person */ class Person { /** * @var integer */ private $id; /** * @var string */ private $surname; /** * @var string */ ...
mrkonovalov/AAS
src/App/AAS_Bundle/Entity/Person.php
PHP
mit
8,735
import chalk = require("chalk"); import { take, select } from "redux-saga/effects"; import path = require("path"); import moment = require("moment"); import { titleize } from "inflection"; import { parallel } from "mesh"; import { weakMemo } from "../memo"; import AnsiUp from "ansi_up"; import { reader } from "../mona...
crcn/aerial
packages/aerial-common2/src/log/console.ts
TypeScript
mit
4,631
<?php namespace Payname\Security; use Payname\Exception\ApiCryptoException; /** * Class Crypto * Extract from https://github.com/illuminate/encryption */ class Crypto { /** * The algorithm used for encryption. * * @var string */ private static $cipher = 'AES-128-CBC'; /** * En...
tplessis/Payname-php-sdk
src/Payname/Security/Crypto.php
PHP
mit
3,450
""" Visualize possible stitches with the outcome of the validator. """ import math import random import matplotlib.pyplot as plt import networkx as nx import numpy as np from mpl_toolkits.mplot3d import Axes3D import stitcher SPACE = 25 TYPE_FORMAT = {'a': '^', 'b': 's', 'c': 'v'} def show(graphs, request, title...
tmetsch/graph_stitcher
stitcher/vis.py
Python
mit
5,618
package de.verygame.surface.screen.base; import com.badlogic.gdx.InputMultiplexer; import com.badlogic.gdx.graphics.g2d.PolygonSpriteBatch; import com.badlogic.gdx.utils.viewport.Viewport; import java.util.Map; /** * @author Rico Schrage * * Context which can contain several subscreens. */ public class SubScreen...
VeryGame/gdx-surface
gdx-surface/src/main/java/de/verygame/surface/screen/base/SubScreenContext.java
Java
mit
4,133
const { InventoryError, NotFoundError } = require('../../errors') const checkExists = (data) => { return (entity) => { if (!entity) throw new NotFoundError(`${data} not found`) return entity } } module.exports = (sequelize, DataTypes) => { const Pokemon = sequelize.define('Pokemon', { name: DataTy...
gcaraciolo/pokemon-challenge
src/database/models/Pokemon.js
JavaScript
mit
1,131
// File auto generated by STUHashTool using static STULib.Types.Generic.Common; namespace STULib.Types.Dump { [STU(0x6250465B)] public class STU_6250465B : STUInstance { [STUField(0x6674CA34)] public string m_6674CA34; [STUField(0xDC05EA3B)] public ulong m_DC05EA3B; [S...
kerzyte/OWLib
STULib/Types/Dump/STU_6250465B.cs
C#
mit
381
class DeluxePublisher::Settings < ActiveRecord::Base set_table_name 'deluxe_publisher_settings' end
PaulRaye/Deluxe-Publisher
app/models/deluxe_publisher/settings.rb
Ruby
mit
101
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. package com.azure.core.http.policy; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.logging.LogLevel; import reactor.core.publisher.Mono; /** * Manages logging HTTP requests in {@link HttpLogg...
Azure/azure-sdk-for-java
sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpRequestLogger.java
Java
mit
1,343
import React from 'react' import { Hero } from '../../components' const HeroContainer = () => ( <Hero /> ) export default HeroContainer
saelili/F3C_Website
app/containers/Hero/HeroContainer.js
JavaScript
mit
140
/* * 2007-2016 [PagSeguro Internet Ltda.] * * NOTICE OF LICENSE * * 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 requir...
girinoboy/lojacasamento
pagseguro-api/src/main/java/br/com/uol/pagseguro/api/common/domain/Document.java
Java
mit
1,173
# -*- coding: utf-8 -*- # django-simple-help # simple_help/admin.py from __future__ import unicode_literals from django.contrib import admin try: # add modeltranslation from modeltranslation.translator import translator from modeltranslation.admin import TabbedDjangoJqueryTranslationAdmin except ImportErro...
DCOD-OpenSource/django-simple-help
simple_help/admin.py
Python
mit
1,108
using UnityEngine; using System.Collections; public class MuteButton : MonoBehaviour { public Sprite MuteSprite; public Sprite PlaySprite; // Use this for initialization void Start () { } // Update is called once per frame void Update () { } }
incredible-drunk/incredible-drunk
Assets/MuteButton.cs
C#
mit
269
using UnityEngine; using System.Collections; public class CameraShake : MonoBehaviour { // Transform of the camera to shake. Grabs the gameObject's transform // if null. public Transform camTransform; // How long the object should shake for. public float shakeDuration = 0f; // Amplitude of the shake. A larg...
hakur/shooter
Assets/Shooter/Scripts/Shooter/CameraShake.cs
C#
mit
924
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; namespace MyW...
Microsoft-Build-2016/CodeLabs-WebDev
Module3-DeploymentAndAzure/Source/MyWebApp/src/MyWebApp/Startup.cs
C#
mit
2,018
# -*- coding: utf-8 -*- import sys from io import BytesIO import argparse from PIL import Image from .api import crop_resize parser = argparse.ArgumentParser( description='crop and resize an image without aspect ratio distortion.') parser.add_argument('image') parser.add_argument('-w', '-W', '--width', metavar='<...
codeif/crimg
crimg/bin.py
Python
mit
1,481
'use strict'; let sounds = new Map(); let playSound = path => { let sound = sounds.get(path); if (sound) { sound.play(); } else { sound = new Audio(path); sound.play(); } }; export default playSound;
attilahorvath/infinitree
src/infinitree/play_sound.js
JavaScript
mit
224
using System; using System.Windows.Input; namespace RFiDGear.ViewModel { /// <summary> /// Description of RelayCommand. /// </summary> public class RelayCommand : ICommand { public event EventHandler CanExecuteChanged { add { CommandManager.RequerySuggested += value; } remove { CommandManager.RequerySu...
c3rebro/RFiDGear
PluginSystem/DataAccessLayer/RelayCommand.cs
C#
mit
985
package com.etop.service; import com.etop.dao.UserDAO; import com.etop.pojo.User; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.io.Serializable; import java.util.HashMap; import java.util.List; import java.util.Map; /** * 用户服务,与dao进行对接 * <...
brucevsked/vskeddemolist
vskeddemos/projects/shirodemo/SpringMVC_Shiro/src/com/etop/service/UserService.java
Java
mit
930
from __future__ import print_function import os import sys import subprocess import pkg_resources try: import pkg_resources _has_pkg_resources = True except: _has_pkg_resources = False try: import svn.local _has_svn_local = True except: _has_svn_local = False def test_helper(): return...
MetaPlot/MetaPlot
metaplot/helpers.py
Python
mit
4,900
package states; import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.awt.image.BufferedImage; import java.util.ArrayList; import database.DeleteGame; import database.LoadGame; import game.Game; import graphics.ButtonAction; import graphics.Text; import graphics.UIButton; import graphics....
BrunoMarchi/Chess_Game-LCP_2017
ChessGame/src/states/MenuState.java
Java
mit
11,128
# frozen_string_literal: true module HelperFunctions def log_in email = 'test@sumofus.org' password = 'password' User.create! email: email, password: password visit '/users/sign_in' fill_in 'user_email', with: email fill_in 'user_password', with: password click_button 'Log in' end de...
SumOfUs/Champaign
spec/support/helper_functions.rb
Ruby
mit
1,244
import { Directive, Input, OnChanges, SimpleChanges } from '@angular/core'; import { AbstractControl, NG_VALIDATORS, Validator, ValidatorFn, Validators } from '@angular/forms'; export function forbiddenNameValidator(nameRe: RegExp): ValidatorFn { return (control: AbstractControl): {[key: string]: any} => { const...
TaylorPzreal/curriculum-vitae
src/app/func/sign-up/forbidden-name.directive.ts
TypeScript
mit
1,223
namespace TransferCavityLock2012 { partial class LockControlPanel { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. ...
jstammers/EDMSuite
TransferCavityLock2012/LockControlPanel.Designer.cs
C#
mit
18,415
from django.db import models from .workflow import TestStateMachine class TestModel(models.Model): name = models.CharField(max_length=100) state = models.CharField(max_length=20, null=True, blank=True) state_num = models.IntegerField(null=True, blank=True) other_state = models.CharField(max_length=20...
andrewebdev/django-ostinato
ostinato/tests/statemachine/models.py
Python
mit
509
<?php namespace Fisharebest\Localization\Locale; use Fisharebest\Localization\Territory\TerritoryNi; /** * Class LocaleEsNi * * @author Greg Roach <fisharebest@gmail.com> * @copyright (c) 2015 Greg Roach * @license GPLv3+ */ class LocaleEsNi extends LocaleEs { public function territory() { retur...
fweber1/Annies-Ancestors
webtrees/vendor/fisharebest/localization/src/Locale/LocaleEsNi.php
PHP
mit
344
require 'builder' module MWS module API class Fulfillment < Base include Feeds ## Takes an array of hash AmazonOrderID,FulfillmentDate,CarrierName,ShipperTrackingNumber,sku,quantity ## Returns true if all the orders were updated successfully ## Otherwise raises an exception def...
tinabme/ruby-mws
lib/ruby-mws/api/fulfillment.rb
Ruby
mit
1,850
import { NgModule } from '@angular/core'; import { SharedModule } from '../shared/shared.module'; import { HelloRoutingModule } from './hello-routing.module'; import { HelloComponent } from './hello.component'; @NgModule({ imports: [ SharedModule, HelloRoutingModule, ], declarations: [ HelloCompone...
rangle/angular2-starter
src/app/hello/hello.module.ts
TypeScript
mit
361
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('geokey_sapelli', '0005_sapellifield_truefalse'), ] operations = [ migrations.AddField( model_name='sapelliprojec...
ExCiteS/geokey-sapelli
geokey_sapelli/migrations/0006_sapelliproject_sapelli_fingerprint.py
Python
mit
468
using UnityEngine; using System.Collections; public class HurtSusukeOnContact : MonoBehaviour { public int damageToGive; public float bounceOnEnemy; private Rigidbody2D myRigidbody2D; // Use this for initialization void Start () { myRigidbody2D = transform.parent.GetComponent<Rigidbody2D> (); } // Up...
SafeRamen/Nerd-Quest
Nerd Quest/Assets/Scripts/HurtSusukeOnContact.cs
C#
mit
611
 #include "Internal.hpp" #include <LuminoEngine/Graphics/Texture.hpp> #include <LuminoEngine/Rendering/Material.hpp> #include <LuminoEngine/Mesh/Mesh.hpp> #include <LuminoEngine/Visual/StaticMeshComponent.hpp> namespace ln { //============================================================================= ...
lriki/Lumino
src/LuminoEngine/src/Visual/StaticMeshComponent.cpp
C++
mit
2,432
<?php namespace App\Controllers\Admin; use BaseController; use DB, View, Datatables, Input, Redirect, Str, Validator, Image, File; use App\Models\Music; class MusicController extends BaseController { private $upload_path = "uploads/music/"; public function getList() { $music_count = Music::count(); $data = ar...
benhanks040888/subud
app/controllers/admin/MusicController.php
PHP
mit
3,793
package org.jabref.logic.importer.fetcher; import java.io.IOException; import java.net.URL; import java.util.Collections; import java.util.List; import java.util.Optional; import org.jabref.logic.formatter.bibtexfields.ClearFormatter; import org.jabref.logic.formatter.bibtexfields.NormalizePagesFormatter; import org....
zellerdev/jabref
src/main/java/org/jabref/logic/importer/fetcher/DoiFetcher.java
Java
mit
3,259
from __future__ import division, print_function #, unicode_literals """ Multiples of 3 and 5 If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. """ import numpy as np # Setup. nu...
Who8MyLunch/euler
problem_001.py
Python
mit
632
s="the quick brown fox jumped over the lazy dog" t = s.split(" ") for v in t: print(v) r = s.split("e") for v in r: print(v) x = s.split() for v in x: print(v) # 2-arg version of split not supported # y = s.split(" ",7) # for v in y: # print v
naitoh/py2rb
tests/strings/split.py
Python
mit
266
module Xronor class DSL module Checker class ValidationError < StandardError end def required(name, value) invalid = false if value case value when String invalid = value.strip.empty? when Array, Hash invalid = value.empty? ...
dtan4/xronor
lib/xronor/dsl/checker.rb
Ruby
mit
483
var mongoose = require('mongoose'); var statuses = ['open', 'closed', 'as_expected']; var priorities = ['major','regular','minor','enhancement']; var Comment = new mongoose.Schema( { comment: String, username: String, name: String, dca: {type: Date, default: Dat...
baliganikhil/Storm
models/bug.js
JavaScript
mit
1,110
#include "EngineImplDefine.h" void BlendColor::Init(D3DCOLOR defaultColor, D3DCOLOR disabledColor, D3DCOLOR hiddenColor) { for (decltype(States.size()) i = 0; i != States.size(); ++i) { States[i] = defaultColor; } States[STATE_DISABLED] = disabledColor; States[STATE_HIDDEN] = hiddenColor; Current = hiddenColo...
ss-torres/UI-Editor
UI Editor/DrawEngine/EngineImplDefine.cpp
C++
mit
1,118
class AddColumnToRequestSchema < ActiveRecord::Migration def change add_column :request_schemata, :name, :string, null: false, default: "" end end
opentie/opentie-app
db/migrate/20150502043108_add_column_to_request_schema.rb
Ruby
mit
155
ActionController::Routing::Routes.draw do |map| map.resources :companies, :member => { :filter_available_members => :get, :delete_member => :post, :add_members => :post, :filter_available_projects => :get, :delete_project => :post, :add_projects => :post } end
splendeo/chiliproject_companies
config/routes.rb
Ruby
mit
283
class AddVersionToComponents < ActiveRecord::Migration def change add_column :components, :version, :float end end
e-nable/LimbForge
db/migrate/20160829013357_add_version_to_components.rb
Ruby
mit
123
using GalaSoft.MvvmLight; namespace Operation.WPF.ViewModels { public interface IViewModelFactory { T ResolveViewModel<T>() where T : ViewModelBase; } }
ElijahReva/operations-research-wpf
Operation.WPF/ViewModels/IViewModelFactory.cs
C#
mit
181
using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class MageTurret : Turret { [SerializeField] float range; [SerializeField] float baseDamage = 0.00f; float currentDamage = 0.00f; [SerializeField] float damageIncrease; [SerializeFiel...
GoldenArmor/HostileKingdom
Assets/Turrets/MageTower/Scripts/MageTurret.cs
C#
mit
4,399
#include "Namespace_Base.h" #include <co/Coral.h> #include <co/IComponent.h> #include <co/IPort.h> #include <co/IInterface.h> namespace co { //------ co.Namespace has a facet named 'namespace', of type co.INamespace ------// co::IInterface* Namespace_co_INamespace::getInterface() { return co::typeOf<co::INamespace>...
coral-framework/coral
src/core/generated/Namespace_Base.cpp
C++
mit
1,595
/*** AppView ***/ define(function(require, exports, module) { var View = require('famous/core/View'); var Surface = require('famous/core/Surface'); var Transform = require('famous/core/Transform'); var StateModifier = require('famous/modifiers/StateModifier'); var SlideshowView = require('views/Sl...
M1Reeder/famous-example-server
app/public/sandbox/index/views/ProjectView.js
JavaScript
mit
599
<?php /** * Go! AOP framework * * @copyright Copyright 2013, Lisachenko Alexander <lisachenko.it@gmail.com> * * This source file is subject to the license that is bundled * with this source code in the file LICENSE. */ namespace Demo\Example; /** * Human class example */ class HumanDemo { /** * Eat...
latamautos/goaop
demos/Demo/Example/HumanDemo.php
PHP
mit
880
using Microsoft.AspNet.Http; using Microsoft.AspNet.Routing; using Migrap.AspNet.Multitenant; using System; using System.Collections.Generic; namespace Migrap.AspNet.Routing { public class TenantRouteConstraint : IRouteConstraint { public const string TenantKey = "tenant"; private readonly ISet<st...
migrap/Migrap.AspNet.Multitenant
src/Migrap.AspNet.Multitenant/Routing/TenantRouteConstraint.cs
C#
mit
1,080
import numpy as np __author__ = 'David John Gagne <djgagne@ou.edu>' def main(): # Contingency Table from Wilks (2011) Table 8.3 table = np.array([[50, 91, 71], [47, 2364, 170], [54, 205, 3288]]) mct = MulticlassContingencyTable(table, n_classes=table.shape[0], ...
djgagne/hagelslag
hagelslag/evaluation/MulticlassContingencyTable.py
Python
mit
2,908
"use strict"; var ArrayCollection_1 = require('./ArrayCollection'); exports.ArrayCollection = ArrayCollection_1.ArrayCollection; var ArrayList_1 = require('./ArrayList'); exports.ArrayList = ArrayList_1.ArrayList; var SequenceBase_1 = require('./SequenceBase'); exports.SequenceBase = SequenceBase_1.SequenceBase; var Bu...
swhitf/paladin-core
dist/collections/internal/index.js
JavaScript
mit
1,324
<?php /** * Provides low-level debugging, error and exception functionality * * @copyright Copyright (c) 2007-2011 Will Bond, others * @author Will Bond [wb] <will@flourishlib.com> * @author Will Bond, iMarc LLC [wb-imarc] <will@imarc.net> * @author Nick Trew [nt] * @license http://flourishlib.c...
mkrause/roy
_example/thirdparty/flourish/fCore.php
PHP
mit
39,704
// Copyright (c) 2014 blinkbox Entertainment Limited. All rights reserved. package com.blinkboxbooks.android.list; import android.content.Context; import android.database.ContentObserver; import android.database.Cursor; import android.database.MergeCursor; import android.support.v4.content.AsyncTaskLoader; import andr...
blinkboxbooks/android-app
app/src/main/java/com/blinkboxbooks/android/list/LibraryLoader.java
Java
mit
5,766
<?php return array ( 'id' => 'samsung_d500_ver1_sub6226', 'fallback' => 'samsung_d500_ver1', 'capabilities' => array ( 'max_data_rate' => '40', ), );
cuckata23/wurfl-data
data/samsung_d500_ver1_sub6226.php
PHP
mit
165
using System; using System.Net.Http; using System.Runtime.CompilerServices; using System.Threading.Tasks; using Castle.Core; using DotJEM.Json.Storage.Adapter; using DotJEM.Pipelines; using DotJEM.Web.Host.Diagnostics.Performance; using DotJEM.Web.Host.Providers.Concurrency; using DotJEM.Web.Host.Providers.Services.Di...
dotJEM/web-host
src/DotJEM.Web.Host/Providers/Services/ContentService.cs
C#
mit
7,585
package com.gdgand.rxjava.rxjavasample.hotandcold; import android.app.Application; import com.gdgand.rxjava.rxjavasample.hotandcold.di.component.ApplicationComponent; import com.gdgand.rxjava.rxjavasample.hotandcold.di.component.DaggerApplicationComponent; import com.gdgand.rxjava.rxjavasample.hotandcold.di.module.Ap...
gdgand/android-rxjava
2016-06-15_hot_and_cold/app/src/main/java/com/gdgand/rxjava/rxjavasample/hotandcold/SampleApplication.java
Java
mit
911
'use strict' var solc = require('solc/wrapper') var compileJSON = function () { return '' } var missingInputs = [] module.exports = function (self) { self.addEventListener('message', function (e) { var data = e.data switch (data.cmd) { case 'loadVersion': delete self.Module // NOTE: w...
Yann-Liang/browser-solidity
src/app/compiler/compiler-worker.js
JavaScript
mit
1,202
//Express, Mongo & Environment specific imports var express = require('express'); var morgan = require('morgan'); var serveStatic = require('serve-static'); var bodyParser = require('body-parser'); var cookieParser = require('cookie-parser'); var compression = require('compression'); var errorHandler = require('errorha...
rpelger/books-app-mean
app.js
JavaScript
mit
1,664
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl...
DREEBIT/ng-messenger
src/components/conversation-header/conversation-header.component.js
JavaScript
mit
1,657
const describe = require("mocha").describe; const it = require("mocha").it; const assert = require("chai").assert; const HttpError = require("./HttpError"); describe("HttpError", function () { it("should be instance of Error", function () { const testSubject = new HttpError(); assert.isOk(testSubject instan...
danielireson/formplug-serverless
src/error/HttpError.spec.js
JavaScript
mit
343
import { inject, injectable } from 'inversify'; import TYPES from '../../di/types'; import * as i from '../../i'; import { RunOptions } from '../../models'; import { IInputConfig } from '../../user-extensibility'; import { BaseInputManager } from '../base-input-manager'; var NestedError = require('nested-error-stacks')...
yosplz/neoman
src/lib/input-managers/custom/custom-input-manager.ts
TypeScript
mit
928
<?php if (!file_exists('./../include/config.php')){ header('Location:install.php'); } include('./../include/config.php'); include('./../include/functions.php'); if (isset($_POST['step'])) $step = intval($_POST['step']); else{ $step = 0; } ?> <!DOCTYPE html> <html> <head> <title>SPC - DB Upgrade</title> ...
50thomatoes50/simple-photos-contest
install/upgrade.php
PHP
mit
3,262
package io.blitz.curl.exception; /** * Exceptions thrown when a validation error occur during a test execution * @author ghermeto */ public class ValidationException extends BlitzException { /** * Constructs an instance of <code>ValidationException</code> with the * specified error and reason messag...
blitz-io/blitz-java
src/main/java/io/blitz/curl/exception/ValidationException.java
Java
mit
473
/** * jQuery object. * @external jQuery * @see {@link http://api.jquery.com/jQuery/} */ /** * The jQuery plugin namespace. * @external "jQuery.fn" * @see {@link http://docs.jquery.com/Plugins/Authoring The jQuery Plugin Guide} */ /** * The plugin global configuration object. * @external "jQuery.vulcanup" *...
vulcan-estudios/vulcanup
src/js/vulcanup.js
JavaScript
mit
7,069
const test = require('tape') const nlp = require('../_lib') test('match min-max', function(t) { let doc = nlp('hello1 one hello2').match('#Value{7,9}') t.equal(doc.out(), '', 'match was too short') doc = nlp('hello1 one two three four five hello2').match('#Value{3}') t.equal(doc.out(), 'one two three', 'exact...
nlp-compromise/compromise
tests/match/min-max.test.js
JavaScript
mit
888
# encoding: utf-8 require 'webmock/rspec' require 'vcr' require_relative '../lib/spotifiery' VCR.configure do |config| config.cassette_library_dir = 'spec/fixtures/vcr_cassettes' config.hook_into :webmock end
cicloon/spotifiery
spec/spec_helper.rb
Ruby
mit
218
class Tweet < ActiveRecord::Base # Remember to create a migration! belongs_to :user end
WoodhamsBD/lil_twitter
app/models/tweet.rb
Ruby
mit
93
using System.IO; using System.Runtime.InteropServices; internal static class Example { [STAThread()] public static void Main() { SolidEdgeFramework.Application objApplication = null; SolidEdgeAssembly.AssemblyDocument objAssemblyDocument = null; SolidEdgeAssembly.StructuralFrames o...
SolidEdgeCommunity/docs
docfx_project/snippets/SolidEdgeAssembly.StructuralFrame.DeleteHoleLocation.cs
C#
mit
1,219
#!/usr/bin/env ruby require 'json' SRC_RANDOM = Random.new(1984) MAX_VALUES = Hash.new(1).update "rcat" => 50, "vcat" => 50, "infq" => 5, "kws" => 10 MRG_VALUES = { "dev" => ["oth","oth","oth","oth","oth","oth"], "bwsm" => ["ff", "sf", "op", "ng", "kq", "an", "ms", "kk", "mo"], "pos" => [2, 4, 5, 6, 7], "mob...
bsm/flood
qfy/testdata/generate.rb
Ruby
mit
1,184
package com.lht.dot.ui.view; import android.content.Context; import android.support.annotation.Nullable; import android.support.v7.widget.RecyclerView; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; import com.bumptech.glide.Glide; /** * Created by lht-Mac on 2017/7/11....
LiuHongtao/Dot
app/src/main/java/com/lht/dot/ui/view/PhotoShotRecyclerView.java
Java
mit
1,901
function ones(rows, columns) { columns = columns || rows; if (typeof rows === 'number' && typeof columns === 'number') { const matrix = []; for (let i = 0; i < rows; i++) { matrix.push([]); for (let j = 0; j < columns; j++) { matrix[i].push(1); ...
arnellebalane/matrix.js
source/matrix.ones.js
JavaScript
mit
455
<?php namespace LolApi\Classes\TournamentProvider; /** * TournamentCodeParameters * * @author Javier */ class TournamentCodeParameters { // ~ maptype ~ const MAPTYPE_SUMMONERS_RIFT='SUMMONERS_RIFT'; const MAPTYPE_TWISTED_TREELINE='TWISTED_TREELINE'; const MAPTYPE_HOWLING_ABYSS='HOWLING_ABYSS'; ...
javierglch/HexaniaBlogSymfony
src/LolApi/Classes/TournamentProvider/TournamentCodeParameters.php
PHP
mit
2,170
/* * The MIT License * * Copyright 2015 Adam Kowalewski. * * 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,...
OtwartaPlatformaWyborcza/OPW-backend-JavaEE
opw/src/main/java/com/adamkowalewski/opw/entity/OpwLink.java
Java
mit
5,602