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 |
|---|---|---|---|---|---|
export interface IContact {
id?: number;
email: string;
listName: string;
name: string;
}
| SimpleCom/simplecom-web | src/interfaces/contacts.interface.ts | TypeScript | mit | 98 |
// The MIT License (MIT)
//
// Copyright (c) Andrew Armstrong/FacticiusVir 2020
//
// 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... | FacticiusVir/SharpVk | src/SharpVk/Interop/ExternalMemoryImageCreateInfo.gen.cs | C# | mit | 1,882 |
using System;
namespace Sherlock
{
/// <summary>
/// A reader than can read values from a pipe.
/// </summary>
/// <typeparam name="T">The type of value to read.</typeparam>
public interface IPipeReader<T> : IDisposable
{
/// <summary>
/// Attempts to read a value from the pipe... | tessellator/sherlock | Sherlock/IPipeReader.cs | C# | mit | 742 |
# Load DSL and set up stages
require 'capistrano/setup'
# Include default deployment tasks
require 'capistrano/deploy'
# Include tasks from other gems included in your Gemfile
require 'capistrano/rvm'
require 'capistrano/bundler'
require 'capistrano/rails'
require 'capistrano/rails/migrations'
require 'capistrano/ngi... | a11ejandro/project_prototype | Capfile.rb | Ruby | mit | 501 |
var mongoose = require('mongoose');
var bcrypt = require('bcrypt');
var saltRounds = 10;
var userSchema = new mongoose.Schema({
email: {
type: String,
index: {unique: true}
},
password: String,
name: String
});
//hash password
userSchema.methods.generateHash = function(password){
return bcrypt.hashSync(passw... | zymokey/mission-park | models/user/user.js | JavaScript | mit | 541 |
<?php
namespace Wolphy\Jobs;
use Illuminate\Bus\Queueable;
abstract class Job
{
/*
|--------------------------------------------------------------------------
| Queueable Jobs
|--------------------------------------------------------------------------
|
| This job base class provides a centra... | lezhnev74/wolphy | app/Jobs/Job.php | PHP | mit | 538 |
<?php
namespace RectorPrefix20210615;
if (\class_exists('t3lib_collection_StaticRecordCollection')) {
return;
}
class t3lib_collection_StaticRecordCollection
{
}
\class_alias('t3lib_collection_StaticRecordCollection', 't3lib_collection_StaticRecordCollection', \false);
| RectorPHP/Rector | vendor/ssch/typo3-rector/stubs/t3lib_collection_StaticRecordCollection.php | PHP | mit | 276 |
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die m... | Aniel/RedditImageDownloader | RedditImageDownloader.GUI/Properties/AssemblyInfo.cs | C# | mit | 2,715 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
__author__ = 'ar'
from layers_basic import LW_Layer, default_data_format
from layers_convolutional import conv_output_length
###############################################
class _LW_Pooling1D(LW_Layer):
input_dim = 3
def __init__(self, pool_size=2, strides=None, padd... | SummaLabs/DLS | app/backend/core/models-keras-2x-api/lightweight_layers/layers_pooling.py | Python | mit | 7,111 |
class CreateEventTypes < ActiveRecord::Migration
def change
create_table :event_types do |t|
t.string :name, :limit => 80
t.timestamps
end
end
end
| nac13k/iAdmin | db/migrate/20140408042944_create_event_types.rb | Ruby | mit | 172 |
module.exports = {
'throttle': 10,
'hash': true,
'gzip': false,
'baseDir': 'public',
'buildDir': 'build',
'prefix': ''
}; | wunderlist/bilder-aws | lib/defaults.js | JavaScript | mit | 133 |
import type { FormatRelativeFn } from '../../../types'
// Source: https://www.unicode.org/cldr/charts/32/summary/te.html
const formatRelativeLocale = {
lastWeek: "'గత' eeee p", // CLDR #1384
yesterday: "'నిన్న' p", // CLDR #1393
today: "'ఈ రోజు' p", // CLDR #1394
tomorrow: "'రేపు' p", // CLDR #1395
nextWeek... | date-fns/date-fns | src/locale/te/_lib/formatRelative/index.ts | TypeScript | mit | 557 |
/*
*
* BitcoinLikeKeychain
* ledger-core
*
* Created by Pierre Pollastri on 17/01/2017.
*
* The MIT License (MIT)
*
* Copyright (c) 2016 Ledger
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* ... | LedgerHQ/lib-ledger-core | core/src/wallet/bitcoin/keychains/BitcoinLikeKeychain.hpp | C++ | mit | 4,962 |
<?php
namespace AppBundle\Repository;
/**
* Buyers_PropertiesRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class Buyers_PropertiesRepository extends \Doctrine\ORM\EntityRepository
{
}
| asimo124/MLSSite | src/AppBundle/Repository/Buyers_PropertiesRepository.php | PHP | mit | 257 |
#!/usr/bin/env ruby
#Example handler file..
infile = ARGV.first
outfile = File.basename(infile, ".tif") + ".jpg.tif"
system("~/cm/processing_scripts/rgb_to_jpeg_tif.rb --internal-mask #{infile} #{outfile}")
| spruceboy/jays_geo_tools | examples/sample_handler_for_do_several_at_once.rb | Ruby | mit | 210 |
using Newtonsoft.Json;
using ProtoBuf;
using ITK.ModelManager;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Steam.Models
{
[Model("SteamPlayerBans")]
[ProtoContract]
[JsonObject(MemberSerialization.OptIn)]
public class Pl... | inlinevoid/Overust | Steam/Models/PlayerBans.cs | C# | mit | 2,083 |
var modules = {
"success" : [
{id: 1, name:"控制台", code:"console", protocol:"http", domain:"console.ecc.com", port:"18333", created:'2017-03-08 00:00:00', creator:'1', modified:'2017-03-08 00:00:00', modifier:'1'},
{id: 2, name:"服务中心", code:"service-center", protocol:"http", domain:"sc.ecc.com", port:"18222", creat... | chinakite/wukong | data/datas/modules.js | JavaScript | mit | 545 |
const {
createServer,
plugins: { queryParser, serveStatic }
} = require('restify');
const { join } = require('path');
const fetch = require('node-fetch');
const proxy = require('http-proxy-middleware');
const { PORT = 5000 } = process.env;
const server = createServer();
server.use(queryParser());
server.get('/',... | billba/botchat | packages/embed/hostDevServer.js | JavaScript | mit | 1,094 |
/**
* @author: * @date: 2016/1/21
*/
define(["core/js/layout/Panel"],
function (Panel) {
var view = Panel.extend({
/*Panel的配置项 start*/
title:"表单-",
help:"内容",
brief:"摘要",
/*Panel 配置 End*/
oninitialized:function(triggerEvent){
... | huangfeng19820712/hfast | example/view/tree/treeAndTable.js | JavaScript | mit | 2,606 |
<!--
Safe sample
input : get the $_GET['userData'] in an array
sanitize : settype (float)
File : unsafe, use of untrusted data in a comment
-->
<!--Copyright 2015 Bertrand STIVALET
Permission is hereby granted, without written agreement or royalty fee, to
use, copy, modify, and distribute this software and its doc... | stivalet/PHP-Vulnerability-test-suite | XSS/CWE_79/safe/CWE_79__array-GET__CAST-func_settype_float__Unsafe_use_untrusted_data-comment.php | PHP | mit | 1,367 |
$('#modalUploader').on('show.bs.modal', function (event) {
var uploader = new qq.FileUploaderBasic({
element: document.getElementById('file-uploader-demo1'),
button: document.getElementById('areaSubir'),
action: '/Files/Upload',
params: { ruta: $('#RutaActual').val() },
allo... | walalm/MVC-Azure-Explorer | MVC_Azure_Explorer/MVC_Azure_Explorer/Scripts/UtilsFileManager.js | JavaScript | mit | 2,111 |
// setToken when re-connecting
var originalReconnect = Meteor.connection.onReconnect;
Meteor.connection.onReconnect = function() {
setToken();
if(originalReconnect) {
originalReconnect();
}
};
if(Meteor.status().connected) {
setToken();
}
function setToken() {
var firewallHumanToken = Cookie.get('sikka-... | meteorhacks/sikka | lib/client/core.js | JavaScript | mit | 631 |
using System.Collections.ObjectModel;
using System.ComponentModel;
using GalaSoft.MvvmLight.Command;
namespace Treehopper.Mvvm.ViewModels
{
/// <summary>
/// A delegate called when the selected board changes
/// </summary>
/// <param name="sender">The caller</param>
/// <param name="e">The new... | treehopper-electronics/treehopper-sdk | NET/Demos/WPF/DeviceManager/ViewModels/ISelectorViewModel.cs | C# | mit | 2,665 |
import React from 'react';
import ReactDOM from 'react-dom';
import componentOrElement from 'react-prop-types/lib/componentOrElement';
import ownerDocument from './utils/ownerDocument';
import getContainer from './utils/getContainer';
/**
* The `<Portal/>` component renders its children into a new "subtree" outside o... | HPate-Riptide/react-overlays | src/Portal.js | JavaScript | mit | 3,227 |
dojo.provide("plugins.dijit.SyncDialog");
// HAS A
dojo.require("dijit.Dialog");
dojo.require("dijit.form.Button");
dojo.require("dijit.form.ValidationTextBox");
// INHERITS
dojo.require("plugins.core.Common");
dojo.declare( "plugins.dijit.SyncDialog",
[ dijit._Widget, dijit._Templated, plugins.core.Common ], {
/... | agua/aguadev | html/plugins/dijit/SyncDialog.js | JavaScript | mit | 5,315 |
namespace TraktApiSharp.Objects.Basic.Json.Factories
{
using Objects.Basic.Json.Reader;
using Objects.Basic.Json.Writer;
using Objects.Json;
internal class CommentLikeJsonIOFactory : IJsonIOFactory<ITraktCommentLike>
{
public IObjectJsonReader<ITraktCommentLike> CreateObjectReader() => new... | henrikfroehling/TraktApiSharp | Source/Lib/TraktApiSharp/Objects/Basic/Json/Factories/CommentLikeJsonIOFactory.cs | C# | mit | 583 |
package com.sdl.selenium.extjs3.button;
import com.sdl.selenium.bootstrap.button.Download;
import com.sdl.selenium.extjs3.ExtJsComponent;
import com.sdl.selenium.web.SearchType;
import com.sdl.selenium.web.WebLocator;
public class DownloadLink extends ExtJsComponent implements Download {
public Download... | sdl/Testy | src/main/java/com/sdl/selenium/extjs3/button/DownloadLink.java | Java | mit | 1,642 |
angular.module('perCapita.controllers', [])
.controller('AppCtrl', ['$scope', '$rootScope', '$ionicModal', '$timeout', '$localStorage', '$ionicPlatform', 'AuthService',
function ($scope, $rootScope, $ionicModal, $timeout, $localStorage, $ionicPlatform, AuthService) {
$scope.loginData = $localStorage.getOb... | vjuylov/percapita-mobile | www/js/controllers/controllers.js | JavaScript | mit | 8,105 |
var http = require("http");
var querystring = require("querystring"); // 核心模块
var SBuffer=require("../tools/SBuffer");
var common=require("../tools/common");
var zlib=require("zlib");
var redis_pool=require("../tools/connection_pool");
var events = require('events');
var util = require('util');
function ProxyAgent(... | RazarDessun/fastProxy | test/test_timeout2.js | JavaScript | mit | 11,087 |
/*
* The MIT License
*
* Copyright 2016 njacinto.
*
* 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... | njacinto/Utils | src/main/java/org/nfpj/utils/arrays/ArrayFilterIterator.java | Java | mit | 3,840 |
import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class IosHeart extends React.Component {
render() {
if(this.props.bare) {
return <g>
<path d="M359.385,80C319.966,80,277.171,97.599,256,132.8C234.83,97.599,192.034,80,152.615,80C83.647,80,32,123.238,32,195.779
c0,... | fbfeix/react-icons | src/icons/IosHeart.js | JavaScript | mit | 1,031 |
<?php
/*
$Id$
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2010 osCommerce
Released under the GNU General Public License
*/
require('includes/application_top.php');
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SPECIALS);
$breadcrumb->add(NAVBAR_TITL... | gliss/oscommerce-bootstrap | catalog/specials.php | PHP | mit | 3,956 |
<?php
declare(strict_types=1);
namespace Atk4\Ui\Demos;
use Atk4\Ui\Crud;
use Atk4\Ui\UserAction\ExecutorFactory;
// Test for hasOne Lookup as dropdown control.
/** @var \Atk4\Ui\App $app */
require_once __DIR__ . '/../init-app.php';
$model = new Product($app->db);
$model->addCondition($model->fieldName()->name, ... | atk4/ui | demos/_unit-test/lookup.php | PHP | mit | 709 |
import React, {PropTypes} from 'react';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import * as courseActions from '../../actions/courseActions';
import CourseForm from './CourseForm';
import {authorsFormattedForDropdown} from '../../selectors/selectors';
import toastr from 'toastr';
... | vitaliykrushinsky/react-redux-demo | src/components/course/ManageCoursePage.js | JavaScript | mit | 3,176 |
AmazonTemplateDescriptionCategorySpecificGridRowRenderer = Class.create(AmazonTemplateDescriptionCategorySpecificRenderer, {
// ---------------------------------------
attributeHandler: null,
// ---------------------------------------
process: function()
{
if (this.specificHand... | portchris/NaturalRemedyCompany | src/js/M2ePro/Amazon/Template/Description/Category/Specific/Grid/RowRenderer.js | JavaScript | mit | 28,752 |
Rails.application.config.middleware.use OmniAuth::Builder do
provider :provider, ENV["KEY"], ENV["SECRET"]
end
| mariochavez/mac_generators | lib/generators/authentication/omniauth/templates/omniauth.rb | Ruby | mit | 113 |
package controller.server;
import controller.LibraryService;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import java.rmi.RemoteException;
public class RMIServer {
public static void main(String[] args) throws RemoteException, NamingException {
Li... | niralittle/LibraryApp | src/controller/server/RMIServer.java | Java | mit | 533 |
define([
'angular'
], function (ng) {
'use strict';
return ng.module('backgroundModule', []);
});
| lukasz-si/resume | app/components/background-code/module.js | JavaScript | mit | 112 |
const pkg = state => state.pkg
const app = state => state.app
const device = state => state.app.device
const sidebar = state => state.app.sidebar
const effect = state => state.app.effect
const menuitems = state => state.menu.items
const componententry = state => {
return state.menu.item.filter(c => c.meta && c.meta.l... | blushft/wespk | client/src/store/getters.js | JavaScript | mit | 435 |
using System;
using System.Collections.Generic;
using System.Linq;
using BlackBox.Service;
using EbInstanceModel;
using IFC2X3;
namespace BlackBox.Predefined
{
public partial class BbProduct : BbBase
{
[EarlyBindingInstance]
public virtual IfcRelAggregates IfcRelAggregates { get; protected se... | donghoon/ifctoolkit | BlackBox/Predefined/BbProduct/BbProduct.cs | C# | mit | 2,469 |
using UnityEngine;
public class Crouch : MonoBehaviour {
public float crouchColliderProportion = 0.75f;
private bool crouching;
private float colliderCenterY, centerOffsetY;
private ChipmunkBoxShape box;
private Jump jump;
private Sneak sneak;
private WalkAbs move;
private AnimateTiledConfig crouchAC;
v... | fabri1983/marioBadClone | Assets/Scripts/States/Crouch.cs | C# | mit | 2,429 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.applicationinsights.models;
import com.azure.core.annotation.Immutable;
import com.azure.core.util.logging.ClientLogger;
import ... | Azure/azure-sdk-for-java | sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/UserAssignedIdentity.java | Java | mit | 1,557 |
/*
* 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.
*/
angular.module('MetronicApp').controller('UsuariosCtrl', function ($scope, GetSv, $rootScope, PostSv,toaster) {
$scope.usuarios =... | JoPaRoRo/Fleet | web/js/controllers/usuarios.js | JavaScript | mit | 1,854 |
#include <vector>
#include <memory>
#include <iostream>
using namespace std;
shared_ptr<vector<int>> make() {
return make_shared<vector<int>>();
}
shared_ptr<vector<int>> read(shared_ptr<vector<int>> p) {
cout << "Enter values: " << endl;
int x;
while (cin >> x) {
p->push_back(x);
}
return p;
}
void print... | mcshen99/learningCpp | learningCpp/primer12_7.cpp | C++ | mit | 458 |
/*
* This file exports the configuration Express.js back to the application
* so that it can be used in other parts of the product.
*/
var path = require('path');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var session = require('express-ses... | kurtbradd/facebook-music-recommender | config/express-config.js | JavaScript | mit | 1,002 |
(function() {
chai.should();
describe("Dropzone", function() {
var getMockFile, xhr;
getMockFile = function() {
return {
status: Dropzone.ADDED,
accepted: true,
name: "test file name",
size: 123456,
type: "text/html"
};
};
xhr = null;
beforeEa... | webfatorial/dropzone | test/test.js | JavaScript | mit | 82,314 |
/**
* generated by Xtext
*/
package dk.itu.smdp.group2.ui.outline;
import org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider;
/**
* Customization of the default outline structure.
*
* see http://www.eclipse.org/Xtext/documentation.html#outline
*/
@SuppressWarnings("all")
public class Questiona... | rasmusgreve/questionaire | dk.itu.smdp.group2.questionaire.ui/xtend-gen/dk/itu/smdp/group2/ui/outline/QuestionaireOutlineTreeProvider.java | Java | mit | 382 |
<?php
/*
* ghz.me url shortener
* when a long url hz.
*
* (c) 2014 Sam Thompson <contact@samt.us>
* License: MIT
*/
define('ROOT_PATH', __DIR__ . '/');
require ROOT_PATH . 'loader.php';
$app = new Ghz\App();
// Handle our two cases:
// - Redirect (when requestiong anything except BASEPATH)
// - Save URL when p... | samt/ghz | index.php | PHP | mit | 2,503 |
namespace LadderLogic.Controller.State
{
using Surface;
public class CursorState : State
{
public CursorState () : base(StateType.CursorState)
{
}
#region implemented abstract members of State
public override bool Handle (State previous, Segment prevSegment, Segment newSegment, bool left)
{
base.H... | cpipero/ArduinoLadder | Controller/State/CursorState.cs | C# | mit | 411 |
# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::Network::Mgmt::V2019_12_01
module Models
#
# A load balancer probe.
#
class Probe < SubResource
include MsRestAzure
... | Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2019-12-01/generated/azure_mgmt_network/models/probe.rb | Ruby | mit | 6,258 |
<?php
namespace Juice\UploadBundle\Form\Type;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class BaseFileType extends AbstractUploadType
{
public function buildView(FormView $view, FormInterface $form, array $optio... | dakkor71/UploadBundle | Form/Type/BaseFileType.php | PHP | mit | 462 |
<?php
namespace TFE\LibrairieBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
class AccompagnementModifierType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilde... | durandludovic/tfe | src/TFE/LibrairieBundle/Form/AccompagnementModifierType.php | PHP | mit | 647 |
using Dufry.Comissoes.Domain.Validation;
namespace Dufry.Comissoes.Domain.Interfaces.Validation
{
public interface IValidation<in TEntity>
{
ValidationResult Valid(TEntity entity);
}
} | robertohermes/Comissoes | Dufry.Comissoes.Domain/Interfaces/Validation/IValidation.cs | C# | mit | 208 |
import {HttpClient} from '@angular/common/http';
import {Injectable} from '@angular/core';
import {Observable, ReplaySubject, throwError} from 'rxjs';
import {map, tap, switchMap} from 'rxjs/operators';
import {SocketService} from './sockets';
import {StorageService} from './storage';
@Injectable({
provide... | swimmadude66/YTRadio | src/client/services/auth.ts | TypeScript | mit | 2,997 |
package com.lightspeedhq.ecom;
import com.lightspeedhq.ecom.domain.LightspeedEComError;
import feign.FeignException;
import lombok.Getter;
/**
*
* @author stevensnoeijen
*/
public class LightspeedEComErrorException extends FeignException {
@Getter
private LightspeedEComError error;
public LightspeedE... | Falkplan/lightspeedecom-api | lightspeedecom-api/src/main/java/com/lightspeedhq/ecom/LightspeedEComErrorException.java | Java | mit | 528 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="eu_ES" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About POPCoin</source>
<translation>POPCoin-i buruz</translation>
<... | popcointeam/popcoin | src/qt/locale/bitcoin_eu_ES.ts | TypeScript | mit | 99,892 |
import sys
tagging_filepath = sys.argv[1]
following_filepath = sys.argv[2]
delim = '\t'
if len(sys.argv) > 3:
delim = sys.argv[3]
graph = {}
for line in open(tagging_filepath):
entry = line.rstrip().split('\t')
src = entry[0]
dst = entry[1]
if not src in graph: graph[src] = {}
graph[src][dst]... | yamaguchiyuto/icwsm15 | tag_follow_disagreement.py | Python | mit | 857 |
/*
* The Plaid API
*
* The Plaid REST API. Please see https://plaid.com/docs/api for more details.
*
* API version: 2020-09-14_1.78.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package plaid
import (
"encoding/json"
)
// WalletTransactionExecuteResponse WalletTra... | plaid/plaid-go | plaid/model_wallet_transaction_execute_response.go | GO | mit | 5,790 |
chrome.app.runtime.onLaunched.addListener(function(){
chrome.app.window.create('index.html', {
bounds: {
width: Math.round(window.screen.availWidth - 100),
height: Math.round(window.screen.availHeight - 100)
}
});
}); | pioul/Minimalist-Markdown-Editor-for-Chrome | src/js/background.js | JavaScript | mit | 230 |
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
require "yaml"
shared_examples "a bullet" do
let(:capacity) { 2 }
subject do
described_class.new(:machines => machines, :guns => capacity)
end
describe :fire do
it "spawns correct number of threads" do
bullets = ["first", "second... | dqminh/bullet | spec/bullet_spec.rb | Ruby | mit | 2,702 |
#!/usr/bin/env python
#
# Copyright 2010 Facebook
#
# 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 applicable la... | Agnishom/ascii-art-007 | facebook.py | Python | mit | 20,087 |
FactoryGirl.define do
factory :transaction do |t|
t.description "Test transaction"
t.association :account_from, :factory => :foo_account
t.association :account_to, :factory => :foo_account
t.amount 10.00
end
factory :invoice_payment, :parent => :transaction do
auxilliary_model :factory => :i... | logicleague/double_booked | spec/factories/transaction_factory.rb | Ruby | mit | 340 |
require 'moosex/types'
require 'moosex/attribute/modifiers'
module MooseX
class Attribute
include MooseX::Types
attr_reader :attr_symbol, :methods, :attribute_map
def is ; @attribute_map[:is] ; end
def writter ; @attribute_map[:writter] ; end
def reader ; @attribute_map[:reader] ; end
... | peczenyj/MooseX | lib/moosex/attribute.rb | Ruby | mit | 7,509 |
/*
* Copyright (c) 2011-2016, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
* 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... | bladestery/Sapphire | example_apps/AndroidStudioMinnie/sapphire/src/main/java/boofcv/alg/filter/binary/ContourTracer.java | Java | mit | 6,808 |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的常规信息通过以下
// 特性集控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Console.Server")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: Ass... | IKende/IKendeLib | BeetleDemo/Examples/Console/Console.Server/Console.Server/Properties/AssemblyInfo.cs | C# | mit | 1,324 |
using Microsoft.SPOT.Hardware;
namespace GrFamily.MainBoard
{
/// <summary>
/// LEDNX
/// </summary>
public class Led
{
/// <summary>LEDªÚ±³ê½s</summary>
protected readonly OutputPort LedPort;
/// <summary>
/// RXgN^
/// </summary>
... | netmf-lib-grfamily/GrFamilyLibrary | Library/MainBoard/Peach/Led.cs | C# | mit | 733 |
module ngFoundation.directives {
//@NgDirective('topBarSection')
class TopBarSectionDirective implements ng.IDirective {
template = '<section class="top-bar-section" ng-transclude></section>';
restrict = "E";
transclude = true;
replace = true;
}
} | rewso/angular-foundation | src/directives/topBarSection.ts | TypeScript | mit | 272 |
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
describe "Three20" do
it "fails" do
fail "hey buddy, you should probably rename this file and start specing for real"
end
end
| jwang/three20-gem | spec/three20_spec.rb | Ruby | mit | 201 |
if (Zepto.ajax.restore) {
Zepto.ajax.restore();
}
sinon.stub(Zepto, "ajax")
.yieldsTo("success", {
responseStatus : 200,
responseDetails : null,
responseData : {
feed: {
link : "http://github.com",
title : "GitHub Public Timeline",
entries : [
{ title ... | tristandunn/reading | spec/javascripts/fixtures/github.com.js | JavaScript | mit | 753 |
#include "estimation/sensors/make_interpolator.hh"
namespace estimation {
geometry::spatial::TimeInterpolator make_accel_interpolator(
const std::vector<TimedMeasurement<jet_filter::AccelMeasurement>>&
accel_meas,
const ImuModel& imu_model) {
std::vector<geometry::spatial::TimeControlPoint> points;
... | jpanikulam/experiments | estimation/sensors/make_interpolator.cc | C++ | mit | 1,053 |
# coding=utf-8
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
import threading
from typing import Optional, Tuple
from pyqrllib.pyqrllib import bin2hstr
from pyqryptonight.pyqryptonight import StringToUInt256, UInt256ToString
fr... | jleni/QRL | src/qrl/core/ChainManager.py | Python | mit | 23,847 |
<?php
namespace Nitrapi\Common\Exceptions;
class NitrapiHttpErrorException extends NitrapiException
{
} | nitrado/Nitrapi-PHP | lib/Nitrapi/Common/Exceptions/NitrapiHttpErrorException.php | PHP | mit | 105 |
var baseURL;
$.validator.addMethod("alfanumerico", function(value, element) {
return this.optional(element) || /^[-._a-z0-9\- ]+$/i.test(value);
}, "Este campo es alfanumerico.");
$("#frmGuardaTipoDocumento").validate({
rules : {
descripcion : "required",
codigo : {required:true,alfanumerico:true},
... | javiervilcapaza/inst | inst/src/main/webapp/resources/scripts/mantenimientoInterno/tipoDocumentoFormulario.js | JavaScript | mit | 1,492 |
export { default } from 'ember-flexberry-designer/controllers/fd-interface-edit-form/new';
| Flexberry/ember-flexberry-designer | app/controllers/fd-interface-edit-form/new.js | JavaScript | mit | 91 |
<?php
use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServicePr... | growu/growu-website | routes/api.php | PHP | mit | 591 |
package com.board.gd.domain.stock;
import lombok.Data;
import java.util.List;
import java.util.stream.Collectors;
/**
* Created by gd.godong9 on 2017. 5. 19.
*/
@Data
public class StockResult {
private Long id;
private String name;
private String code;
public static StockResult getStockResult(Sto... | godong9/spring-board | board/src/main/java/com/board/gd/domain/stock/StockResult.java | Java | mit | 777 |
<?php
/**
* General purpose and commonly used PHP interface definitions
*
* @author Михаил Красильников <m.krasilnikov@yandex.ru>
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Mekras\Interfaces\Http\Message;
use Psr\Http\Message\RequestInterface;
/**
* HTTP request factory
*
* Object can cre... | mekras/interfaces | lib/Http/Message/RequestFactory.php | PHP | mit | 775 |
<!--
Unsafe sample
input : get the UserData field of $_SESSION
Uses a number_float_filter via filter_var function
File : unsafe, use of untrusted data in CSS
-->
<!--Copyright 2015 Bertrand STIVALET
Permission is hereby granted, without written agreement or royalty fee, to
use, copy, modify, and distribute this so... | stivalet/PHP-Vulnerability-test-suite | XSS/CWE_79/unsafe/CWE_79__SESSION__func_FILTER-CLEANING-number_float_filter__Unsafe_use_untrusted_data-style.php | PHP | mit | 1,407 |
var today = new Date();
console.log(today); | johnvoon/launch_school | 210/lesson5/date_ex1.js | JavaScript | mit | 43 |
var RocketBoots = {
isInitialized : false,
readyFunctions : [],
components : {},
loadedScripts: [],
version: {full: "0.7.0", major: 0, minor: 7, patch: 0, codeName: "sun-master"},
_autoLoadRequirements: true,
_initTimer : null,
_MAX_ATTEMPTS : 300,
_BOOTING_ELEMENT_ID : "booting-up-rocket-boots",
_: null, //... | Lukenickerson/rocketboots | scripts/rocketboots/core.js | JavaScript | mit | 8,886 |
<?php
namespace ErenMustafaOzdal\LaravelModulesBase;
use Illuminate\Database\Eloquent\Model;
class Neighborhood extends Model
{
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'neighborhoods';
/**
* The attributes that are mass assignable.
... | erenmustafaozdal/laravel-modules-base | src/Neighborhood.php | PHP | mit | 1,262 |
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 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 "init.h"
#include "util.h"
#include "sync.h"
#include "ui_interface.h"
#includ... | net-bits/Netbits | src/bitcoinrpc.cpp | C++ | mit | 46,782 |
#!/usr/bin/env python3
# Copyright (c) 2015-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Utilities for manipulating blocks and transactions."""
import struct
import time
import unittest
from... | yenliangl/bitcoin | test/functional/test_framework/blocktools.py | Python | mit | 9,688 |
#include "StdAfx.h"
#include "Distance Joint Description.h"
#include "Spring Description.h"
#include "Distance Joint.h"
#include <NxDistanceJointDesc.h>
using namespace StillDesign::PhysX;
DistanceJointDescription::DistanceJointDescription() : JointDescription( new NxDistanceJointDesc() )
{
}
Dista... | danteinforno/PhysX.Net | PhysX.Net/PhysX.Net/Source/Distance Joint Description.cpp | C++ | mit | 1,564 |
using UnityEngine;
using UnityEditor;
using System.Collections;
using UForms.Attributes;
namespace UForms.Controls.Fields
{
/// <summary>
///
/// </summary>
[ExposeControl( "Object Field", "Fields" )]
public class ObjectField : AbstractField< Object >
{
/// <summary>
/// ... | kilguril/UForms | Assets/UForms/Runtime/Editor/Controls/Fields/ObjectField.cs | C# | mit | 2,890 |
using Microsoft.AspNetCore.Http;
using System.Linq;
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http.Internal;
using Microsoft.Extensions.Primitives;
using System.Globalization;
namespace TCPServer... | stratisproject/TCPServer | TCPServer/ServerImplemetation/TCPRequest.cs | C# | mit | 4,306 |
from .DiscreteFactor import State, DiscreteFactor
from .CPD import TabularCPD
from .JointProbabilityDistribution import JointProbabilityDistribution
__all__ = ['TabularCPD',
'DiscreteFactor',
'State'
]
| khalibartan/pgmpy | pgmpy/factors/discrete/__init__.py | Python | mit | 236 |
/*
Ql builtin and external frmt command.
format text
*/
package frmt
import (
"clive/cmd"
"clive/cmd/opt"
"clive/nchan"
"clive/zx"
"errors"
"fmt"
"io"
"strings"
"unicode"
)
type parFmt {
rc chan string
ec chan bool
}
func startPar(out io.Writer, indent0, indent string, max int) *parFmt {
rc := make(ch... | sbinet-staging/clive | cmd/oldql/frmt/frmt.go | GO | mit | 2,706 |
({
baseUrl: "../linesocial/public/js",
paths: {
jquery: "public/js/libs/jquery-1.9.1.js"
},
name: "main",
out: "main-built.js"
}) | jackygrahamez/LineSocialPublic | build.js | JavaScript | mit | 157 |
<?php
namespace Usolv\TrackingBundle\Form\Model;
use Doctrine\Common\Collections\ArrayCollection;
class TimeRecordSearch
{
protected $project;
public function setProject($project)
{
$this->project = $project;
return $this;
}
public function getProject()
{
return $this->project;
}... | LeQuangAnh/USVTracking | src/Usolv/TrackingBundle/Form/Model/TimeRecordSearch.php | PHP | mit | 325 |
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Fieldset, Layout
from django import forms
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.auth.models import User
from django.contrib.auth.password_validation import validate_password
from django.core.exceptions impo... | eduardoedson/scp | usuarios/forms.py | Python | mit | 8,823 |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Freeform - Control Panel
*
* The Control Panel master class that handles all of the CP requests and displaying.
*
* @package Solspace:Freeform
* @author Solspace, Inc.
* @copyright Copyright (c) 2008-2014, Solspace, Inc.
* @link... | cfox89/EE-Integration-to-API | system/expressionengine/third_party/freeform/mcp.freeform.php | PHP | mit | 159,782 |
/* exported Qualifications */
function Qualifications(skills, items) {
var requirements = {
'soldier': {
meta: {
passPercentage: 100
},
classes: {
'Heavy Assault': {
certifications: [
{ skill: skills.heavyAssault.flakArmor, level: 3 }
],
equipment: []
},
'Li... | stevenbenner/ps2-equipment-check | js/qualifications.js | JavaScript | mit | 12,343 |
package addonloader.util;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.util.Properties;
/**
* Simple wrapper around {@link Properites},
* allowing to easily access objects.
* @author Engine... | Enginecrafter77/LMPluger | src/addonloader/util/ObjectSettings.java | Java | mit | 1,423 |
print ARGF.read.gsub!(/\B[a-z]+\B/) {|x| x.split('').sort_by{rand}.join}
| J-Y/RubyQuiz | ruby_quiz/quiz76_sols/solutions/Himadri Choudhury/scramble.rb | Ruby | mit | 73 |
import { useEffect, useRef, useState } from "react"
import * as React from "react"
import {
RelayPaginationProp,
RelayRefetchProp,
createPaginationContainer,
} from "react-relay"
import { graphql } from "relay-runtime"
import Waypoint from "react-waypoint"
import { Box, Flex, Spacer, Spinner } from "@artsy/palett... | artsy/force | src/v2/Apps/Conversation/Components/Conversation.tsx | TypeScript | mit | 11,098 |
package ch.bisi.koukan.job;
import ch.bisi.koukan.provider.XMLExchangeRatesProvider;
import ch.bisi.koukan.repository.DataAccessException;
import ch.bisi.koukan.repository.ExchangeRatesRepository;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import javax.xml.stream.XMLInputFactory;
impo... | bisignam/koukan | src/main/java/ch/bisi/koukan/job/ECBDataLoaderScheduler.java | Java | mit | 3,982 |
<?php namespace JetMinds\Job\Updates;
use Schema;
use October\Rain\Database\Schema\Blueprint;
use October\Rain\Database\Updates\Migration;
class CreateResumesTable extends Migration
{
public function up()
{
Schema::create('jetminds_job_resumes', function(Blueprint $table) {
$table->engine ... | jetmindsgroup/job-plugin | updates/create_resumes_table.php | PHP | mit | 1,311 |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xam... | SpartaHack/SpartaHack2016-Windows | 2017/SpartaHack/SpartaHack/MainPage.xaml.cs | C# | mit | 6,063 |
using System;
using System.Diagnostics;
namespace Oragon.Architecture.IO.Path
{
partial class PathHelpers
{
#region Private Classes
private sealed class RelativeFilePath : RelativePathBase, IRelativeFilePath
{
#region Internal Constructors
internal RelativeFilePath(string pathString)
: base(pathStr... | luizcarlosfaria/Oragon.Architecture | [source]/Oragon.Architecture/IO/Path/PathHelpers+RelativeFilePath.cs | C# | mit | 4,445 |