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
import * as React from 'react' import {Component, ComponentClass, createElement} from 'react' import * as PropTypes from 'prop-types' import {connect} from 'react-redux' import {Store} from '../store' import ComputedState from '../model/ComputedState' function connectToStore<P>(component:ComponentClass<P>):ComponentCl...
kenfehling/react-router-nested-history
src/react/connectToStore.tsx
TypeScript
mit
921
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { enableProdMode } from '@angular/core'; import { AppModule } from './app/app.module'; enableProdMode(); platformBrowserDynamic().bootstrapModule(AppModule);
fabricadecodigo/angular2-examples
ToDoAppWithFirebase/src/main.ts
TypeScript
mit
242
from behave import given, when, then from genosdb.models import User from genosdb.exceptions import UserNotFound # 'mongodb://localhost:27017/') @given('a valid user with values {username}, {password}, {email}, {first_name}, {last_name}') def step_impl(context, username, password, email, first_name, last_name): ...
jonrf93/genos
dbservices/tests/functional_tests/steps/user_service_steps.py
Python
mit
1,685
using Mokkosu.AST; using System.Collections.Generic; using System.Text; namespace Mokkosu.ClosureConversion { class ClosureConversionResult { public Dictionary<string, MExpr> FunctionTable { get; private set; } public MExpr Main { get; private set; } public ClosureConversionResult(Dic...
lambdataro/Mokkosu
VS2013/MokkosuCore/ClosureConversion/ClosureConversionResult.cs
C#
mit
870
package com.ov3rk1ll.kinocast.ui.util.glide; import com.ov3rk1ll.kinocast.data.ViewModel; public class ViewModelGlideRequest { private ViewModel viewModel; private int screenWidthPx; private String type; public ViewModelGlideRequest(ViewModel viewModel, int screenWidthPx, String type) { this...
ov3rk1ll/KinoCast
app/src/main/java/com/ov3rk1ll/kinocast/ui/util/glide/ViewModelGlideRequest.java
Java
mit
609
package stat import ( "fmt" "time" // "encoding/json" ) type RevStat struct { RevId string `json:"RevId"` UserName string `json:"UserName"` WordCount int `json:"WordCount"` ModDate string `json:"ModDate"` WordFreq []WordPair `json:"WordFreq"` } type DocStat struct { FileId string...
Kimau/GoDriveTracker
stat/stat.go
GO
mit
964
package ru.lanbilling.webservice.wsdl; import java.util.ArrayList; import java.util.List; import javax.annotation.Generated; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; ...
kanonirov/lanb-client
src/main/java/ru/lanbilling/webservice/wsdl/GetClientDocumentsResponse.java
Java
mit
2,281
#include "ToolbarPanel.h" #include "StagePanel.h" #include "SelectSpritesOP.h" #include "Context.h" namespace coceditor { ToolbarPanel::ToolbarPanel(wxWindow* parent) : ee::ToolbarPanel(parent, Context::Instance()->stage) { Context* context = Context::Instance(); // addChild(new ee::UniversalCMPT(this, wxT("paste...
xzrunner/easyeditor
coceditor/src/coceditor/ToolbarPanel.cpp
C++
mit
785
using System.IO; using System.Diagnostics; using NDepend.Path; namespace NDepend.Test.Unit { public static class DirForTest { public static IAbsoluteDirectoryPath ExecutingAssemblyDir { get { // If this following line doesn't work, it is because of ShadowCopyCache with NUnit ...
psmacchia/NDepend.Path
NDepend.Path.Tests/DirForTest.cs
C#
mit
3,806
require 'statsample' module Grid class Row attr_reader :top_y, :bottom_y def initialize(item) @data = [] self << item end def <<(item) @data << item @top_y = quartiles_meam(@data.map(&:y)) @bottom_y = quartiles_meam(@data.map{|item| item.y + item.height}) end ...
xli/ewall
lib/grid/row.rb
Ruby
mit
746
/* ======================================== * File Name : B.cpp * Creation Date : 16-11-2020 * Last Modified : Po 16. listopadu 2020, 01:03:10 * Created By : Karel Ha <mathemage@gmail.com> * URL : https://codeforces.com/problemset/problem/1296/B * Points Gained (in case of online contest) : AC...
mathemage/CompetitiveProgramming
codeforces/div3/1296/B/B.cpp
C++
mit
1,574
# frozen_string_literal: true module Wardrobe module Plugins module Validation module Refinements refine NilClass do def filled? 'must be filled' end def empty? # Nil is valid as empty end end end end end end
agensdev/wardrobe
lib/wardrobe/plugins/validation/refinements/nil_class.rb
Ruby
mit
315
from rest_framework.filters import ( FilterSet ) from trialscompendium.trials.models import Treatment class TreatmentListFilter(FilterSet): """ Filter query list from treatment database table """ class Meta: model = Treatment fields = {'id': ['exact', 'in'], 'no_r...
nkoech/trialscompendium
trialscompendium/trials/api/treatment/filters.py
Python
mit
934
import React, { Component } from 'react'; class Main extends Component { render() { return ( <main className='Main'> <h1 className='Main-headline'>Web solutions focused on<br/>Simplicity & Reliability.</h1> <h2 className='Main-subhead'>Bleeding edge technology paired with amazing <em>talent...
qubed-inc/qubed-io
src/Main/index.js
JavaScript
mit
466
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("Se...
paully21/SendGridWebHookExample
Website/Properties/AssemblyInfo.cs
C#
mit
1,401
'use strict'; angular.module('main', ['ngRoute', 'ngResource', 'ui.route', 'main.system', 'main.index', 'main.events']); angular.module('main.system', []); angular.module('main.index', []); angular.module('main.events', []); 'use strict'; //Setting HTML5 Location Mode angular.module('main').config(['$locationProvide...
NevadaCountyHackers/hackers-web-app
public/dist/app.js
JavaScript
mit
1,912
/** * StaticText.js * Text that cannot be changed after loaded by the game */ import GamePiece from './GamePiece.js'; import Info from './Info.js'; import Text from './Text.js'; export default class StaticText extends Text { constructor (config) { super(config); this.static = true; } }
javisaurusrex/zookillsoccer
modules/js/StaticText.js
JavaScript
mit
305
<?php /* * This file is part of the API Platform project. * * (c) Kévin Dunglas <dunglas@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); namespace ApiPlatform\Core\Tests\Metadata\Property\Fact...
vincentchalamon/core
tests/Metadata/Property/Factory/CachedPropertyNameCollectionFactoryTest.php
PHP
mit
5,079
<?php namespace Tests\Behat\Mink; use Behat\Mink\Session; /** * @group unittest */ class SessionTest extends \PHPUnit_Framework_TestCase { private $driver; private $selectorsHandler; private $session; protected function setUp() { $this->driver = $this->getMoc...
lrt/lrt
vendor/behat/mink/tests/Behat/Mink/SessionTest.php
PHP
mit
3,095
<?php namespace DuxCms\Model; use Think\Model; /** * 扩展字段数据操作 */ class FieldDataModel extends Model { //设置操作表 public function setTable($name) { $this->trueTableName = $this->tablePrefix.'ext_'.$name; } /** * 获取列表 * @return array 列表 */ public function loadList($where,$limit...
coneycode/cmsForMePad
Application/DuxCms/Model/FieldDataModel.class.php
PHP
mit
8,135
""" WSGI config for Carkinos project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETT...
LeeYiFang/Carkinos
src/Carkinos/wsgi.py
Python
mit
393
# Smallest Integer # I worked on this challenge by myself. # smallest_integer is a method that takes an array of integers as its input # and returns the smallest integer in the array # # +list_of_nums+ is an array of integers # smallest_integer(list_of_nums) should return the smallest integer in +list_of_nums+ # # If...
jonwhuang/phase-0
week-4/smallest-integer/my_solution.rb
Ruby
mit
753
require_relative 'spec_helper' include LanguageSwitcher I18n.available_locales = [:pt, :en] describe "LanguageSwitcher" do it "should be able to switch to a language" do language(:pt){ I18n.locale.should == :pt } language(:en){ I18n.locale.should == :en } end it "should not be able to switch to a lan...
teonimesic/language_switcher
spec/language_switcher_spec.rb
Ruby
mit
682
import React from 'react'; import { string, node } from 'prop-types'; import classNames from 'classnames'; const TileAction = ({ children, className, ...rest }) => { return ( <div className={classNames('tile-action', className)} {...rest}> {children} </div> ); }; /** * TileAction property types. *...
Landish/react-spectre-css
src/components/TileAction/TileAction.js
JavaScript
mit
489
<?php /** * @link https://github.com/tigrov/yii2-country * @author Sergei Tigrov <rrr-r@ya.ru> */ namespace tigrov\country; /** * This is the model class for table "city_translation". * * @property integer $geoname_id * @property string $language_code * @property string $value */ class CityTranslation extend...
Tigrov/yii2-country
src/CityTranslation.php
PHP
mit
473
/** * This program and the accompanying materials * are made available under the terms of the License * which accompanies this distribution in the file LICENSE.txt */ package com.archimatetool.editor.actions; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import...
archimatetool/archi
com.archimatetool.editor/src/com/archimatetool/editor/actions/CheckForNewVersionAction.java
Java
mit
4,513
using System; using System.Collections.Generic; using EspaceClient.BackOffice.Domaine.Results; using EspaceClient.BackOffice.Silverlight.Business.Depots; using EspaceClient.BackOffice.Silverlight.Business.Interfaces; using EspaceClient.BackOffice.Silverlight.Infrastructure.Services; using EspaceClient.FrontOffice.Domai...
apo-j/Projects_Working
EC/espace-client-dot-net/EspaceClient.BackOffice.Silverlight.Data/Depots/DepotPieceJointe.cs
C#
mit
5,620
from io import BytesIO from django import forms from django.http import HttpResponse from django.template import Context, Template from braces.views import LoginRequiredMixin from django.views.generic import DetailView, ListView from django.views.decorators.http import require_http_methods from django.contrib import...
mooja/ssip3
app/members/views.py
Python
mit
4,530
import {Component} from "@angular/core"; @Component({ moduleId: module.id, selector: 'ptc-footer', templateUrl: 'footer.component.html' }) export class FooterComponent{ }
puncha/java-petclinic
src/main/webapp/resources/ng2/app/footer/footer.component.ts
TypeScript
mit
177
<?php namespace Pinq\Iterators\Generators; use Pinq\Iterators\Standard\IIterator; /** * Implementation of the adapter iterator for Pinq\Iterators\IIterator using the generator * * @author Elliot Levin <elliotlevin@hotmail.com> */ class IIteratorAdapter extends Generator { /** * @var IIterator */ ...
TimeToogo/Pinq
Source/Iterators/Generators/IIteratorAdapter.php
PHP
mit
671
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...
wateret/coreclr
src/jit/codegenarmarch.cpp
C++
mit
135,282
<nav class="sr-only"> <div class="modal-header"> <div class="row"> <h1 class="h1 col-xs-10 col-sm-10 col-md-11 col-lg-11"><a href="/">WSJ Sections</a></h1> <a href="" class=" col-xs-1 col-sm-1 col-md-1 col-lg-1" ng-click="NC.cancel()">close </a> </div> <div class="...
daniel-rodas/wsj
fuel/app/views/angular/navigation.php
PHP
mit
2,375
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; namespace AnalyzeThis { internal static class RegexExtensions { public static bool TryGetMatch(this Regex regex, string input, out Match match) ...
tastott/AnalyzeThis
src/AnalyzeThis/RegexExtensions.cs
C#
mit
541
M.profile("generators"); function* forOfBlockScope() { let a = [1, 2, 3, 4, 5, 6, 7, 8]; let b = [10, 11, 12, 13, 14, 15, 16]; const funs = []; for (const i of a) { let j = 0; funs.push(function* iter() { yield `fo1: ${i} ${j++}`; }); } for (var i of a) { var j = 0; funs.push(func...
awto/effectfuljs
packages/core/test/samples/for-of-stmt/closures-in.js
JavaScript
mit
4,231
<?php /* * This file is a part of the NeimheadhBootstrapBundle project. * * (c) 2017 by Neimheadh * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Neimheadh\Bundle\CodeManipulationBundle\Model\File; use Symfony\Component...
neimheadh/code-manipulation-bundle
Model/File/FileInterface.php
PHP
mit
2,489
package fPPPrograms; import java.util.Scanner; public class LeapYear { public static void main(String[] args) { System.out.println("Enter a year to determine whether it is a leap year or not?"); Scanner yourInput = new Scanner(System.in); int year = yourInput.nextInt(); //String y = year%400 == ...
haftommit/FPP.github.io
FPPSecondProject/src/week1lesson2/Q2.java
Java
mit
545
<?php namespace BigD\UbicacionBundle\Form\EventListener; use Doctrine\ORM\EntityRepository; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvents; use Symfony\Component\Form\FormFactoryInterface; use Symfony\Component\PropertyAcces...
matudelatower/BigD
src/BigD/UbicacionBundle/Form/EventListener/AddCityFieldSubscriber.php
PHP
mit
3,120
// This code will add an event listener to each anchor of the topbar after being dynamically replaced by "interchange" $("body").on("click", function(event){ // If the active element is one of the topbar's links continues if($(event.target).hasClass("topbarLink")) { // The parent li element of the current acti...
joseAyudarte91/aterbe_web_project
js/commons/activateCurrentLink.js
JavaScript
mit
1,381
const elixir = require('laravel-elixir'); elixir((mix) => { // Mix all Sass files into one mix.sass('app.scss'); // Mix all vendor scripts together mix.scripts( [ 'jquery/dist/jquery.min.js', 'bootstrap-sass/assets/javascripts/bootstrap.min.js', 'bootstrap-s...
jamesgifford/perfectlydopey
gulpfile.js
JavaScript
mit
1,236
require 'spec_helper' describe User do context 'fields' do it { should have_field(:email).of_type(String)} it { should have_field(:encrypted_password).of_type(String)} it { should have_field(:roles).of_type(Array)} end context 'Mass assignment' do it { should allow_mass_assignment_of(:email)...
techvision/brails
spec/models/user_spec.rb
Ruby
mit
661
import {Map} from 'immutable'; export function getInteractiveLayerIds(mapStyle) { let interactiveLayerIds = []; if (Map.isMap(mapStyle) && mapStyle.has('layers')) { interactiveLayerIds = mapStyle.get('layers') .filter(l => l.get('interactive')) .map(l => l.get('id')) .toJS(); } else if (Ar...
RanaRunning/rana
web/src/components/MapGL/utils/style-utils.js
JavaScript
mit
480
package machinelearningservices // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the cod...
Azure/azure-sdk-for-go
services/machinelearningservices/mgmt/2021-04-01/machinelearningservices/enums.go
GO
mit
32,878
#include "utfgrid_encode.h" #include <unordered_map> #include <glog/logging.h> #include <jsoncpp/json/value.h> #include <mapnik/unicode.hpp> struct value_to_json_visitor { Json::Value operator() (const mapnik::value_null& val) {return Json::Value();} Json::Value operator() (const mapnik::value_bool& val) {re...
sputnik-maps/maps-express
src/utfgrid_encode.cpp
C++
mit
4,103
package me.moodcat.api; import java.util.Arrays; import java.util.List; import java.util.Locale; import java.util.stream.Collectors; import lombok.Getter; import me.moodcat.database.embeddables.VAVector; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; /** * A...
MoodCat/MoodCat.me-Core
src/main/java/me/moodcat/api/Mood.java
Java
mit
3,192
<?php $lang = array( 'addons' => 'Add-ons', 'accessories' => 'Accessories', 'modules' => 'Modules', 'extensions' => 'Extensions', 'plugins' => 'Plugins', 'accessory' => 'Accessory', 'module' => 'Module', 'extension' => 'Extension', 'rte_tool' => 'Rich Text Editor...
cfox89/EE-Integration-to-API
system/expressionengine/language/english/addons_lang.php
PHP
mit
2,255
import time import multiprocessing from flask import Flask app = Flask(__name__) backProc = None def testFun(): print('Starting') while True: time.sleep(3) print('looping') time.sleep(3) print('3 Seconds Later') @app.route('/') def root(): return 'Started a background pr...
wikomega/wikodemo
test.py
Python
mit
1,073
package forscher.nocket.page.gen.ajax; import gengui.annotations.Eager; import java.io.Serializable; public class AjaxTargetUpdateTestInner implements Serializable { private String feld1; private String feld2; public String getEagerFeld1() { return feld1; } @Eager public void setEa...
Nocket/nocket
examples/java/forscher/nocket/page/gen/ajax/AjaxTargetUpdateTestInner.java
Java
mit
518
''' Created by auto_sdk on 2014-12-17 17:22:51 ''' from top.api.base import RestApi class SubusersGetRequest(RestApi): def __init__(self,domain='gw.api.taobao.com',port=80): RestApi.__init__(self,domain, port) self.user_nick = None def getapiname(self): return 'taobao.subusers.get'
CooperLuan/devops.notes
taobao/top/api/rest/SubusersGetRequest.py
Python
mit
303
var textDivTopIndex = -1; /** * Creates a div that contains a textfiled, a plus and a minus button * @param {String | undefined} textContent string to be added to the given new textField as value * @returns new div */ function createTextDiv( textContent ) { textDivTopIndex++; var newTextDiv = document.create...
amdor/skyscraper_fes
DOMBuilder/InputElementBuilder.js
JavaScript
mit
2,501
using System.Collections.Generic; using System.Text.Json.Serialization; namespace MtgApiManager.Lib.Dto.Set { internal class RootSetListDto : IMtgResponse { [JsonPropertyName("sets")] public List<SetDto> Sets { get; set; } } }
MagicTheGathering/mtg-sdk-dotnet
src/MtgApiManager.Lib/Dto/Set/RootSetListDto.cs
C#
mit
258
# frozen_string_literal: true RSpec.describe Faraday::Response::RaiseError do let(:conn) do Faraday.new do |b| b.response :raise_error b.adapter :test do |stub| stub.get('ok') { [200, { 'Content-Type' => 'text/html' }, '<body></body>'] } stub.get('bad-request') { [400, { 'X-Reason' =>...
lostisland/faraday
spec/faraday/response/raise_error_spec.rb
Ruby
mit
7,602
class CreateBudgetsUsers < ActiveRecord::Migration def change create_table :budgets_users do |t| t.integer :user_id t.integer :budget_id t.timestamps end end end
FAMM/manatee
db/migrate/20140311222555_create_budgets_users.rb
Ruby
mit
193
package org.anodyneos.xp.tagext; import javax.servlet.jsp.el.ELException; import org.anodyneos.xp.XpContext; import org.anodyneos.xp.XpException; import org.anodyneos.xp.XpOutput; import org.xml.sax.SAXException; /** * @author jvas */ public interface XpTag { void doTag(XpOutput out) throws XpException, ELEx...
jvasileff/aos-xp
src.java/org/anodyneos/xp/tagext/XpTag.java
Java
mit
480
'use strict'; /** * Stripe library * * @module core/lib/c_l_stripe * @license MIT * @copyright 2016 Chris Turnbull <https://github.com/christurnbull> */ module.exports = function(app, db, lib) { return { /** * Donate */ donate: function(inObj, cb) { var number, expiry, cvc, currency; ...
christurnbull/MEANr-api
src/core/lib/c_l_stripePay.js
JavaScript
mit
2,158
using System; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Xunit; namespace MR.AspNetCore.Jobs.Server { public class InfiniteRetryProcessorTest { [Fact] public async Task Process_ThrowingProcessingCanceledException_Returns() { // Arr...
mrahhal/MR.AspNetCore.Jobs
test/MR.AspNetCore.Jobs.Tests/Server/InfiniteRetryProcessorTest.cs
C#
mit
891
// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually #pragma once #include <common/common.h> START_ATF_NAMESPACE struct _notify_raceboss_cry_msg_request_zocl { char wszCryMsg[10][65]; }; END_ATF_NAMESPACE
goodwinxp/Yorozuya
library/ATF/_notify_raceboss_cry_msg_request_zocl.hpp
C++
mit
284
/* artifact generator: C:\My\wizzi\v5\node_modules\wizzi-js\lib\artifacts\js\module\gen\main.js primary source IttfDocument: c:\my\wizzi\v5\plugins\wizzi-core\src\ittf\root\legacy.js.ittf */ 'use strict'; module.exports = require('wizzi-legacy-v4');
wizzifactory/wizzi-core
legacy.js
JavaScript
mit
259
#!/bin/env node 'use strict'; var winston = require('winston'), path = require('path'), mcapi = require('mailchimp-api'), Parser = require('./lib/parser'), ApiWrapper = require('./lib/api-wrapper'); var date = new Date(); date = date.toJSON().replace(/(-|:)/g, '.'); winston.remove(winston.transports.Con...
napcoder/sxla-mailchimp-importer
app.js
JavaScript
mit
959
module.exports = { normalizeEntityName: function() {}, afterInstall: function() { this.addBowerPackageToProject('jsoneditor'); } };
jayphelps/ember-jsoneditor
blueprints/ember-jsoneditor/index.js
JavaScript
mit
143
import AMD from '../../amd/src/amd.e6'; import Core from '../../core/src/core.e6'; import Event from '../../event/src/event.e6'; import Detect from '../../detect/src/detect.e6'; import Module from '../../modules/src/base.es6'; import ModulesApi from '../../modules/src/api.e6'; window.Moff = new Core(); window.Moff.amd...
kfuzaylov/moff
packages/loader/src/loader.e6.js
JavaScript
mit
477
# == Schema Information # # Table name: templates # # id :integer not null, primary key # name :string # image :string # description :text # created_at :datetime not null # updated_at :datetime not null # require 'rails_helper' RSpec.describe Template, type: :mod...
abarrak/card-mine-api
spec/models/template_spec.rb
Ruby
mit
561
namespace RapidFTP.Chilkat.Tests.Utilities { using System.Diagnostics; using RapidFTP.Models; using RapidFTP.Utilities; using Xunit; using Xunit.Extensions; public class UnixPathTest { [InlineData("/lv1", 1)] [InlineData("/lv1/lv2", 2)] [InlineData("/lv1/lv2/", 2)...
khoale/RapidFTP
src/RapidFTP.Chilkat.Tests/Utilities/UnixPathTest.cs
C#
mit
1,453
package org.real2space.neumann.evaris.core.structure; /** * Project Neumann * * @author RealTwo-Space * @version 0 * * created 2016/11/01 * added "extends Ring<F>" 2016/11/9 */ public interface Field<F> extends Ring<F> { /* * Multiply this member by an inverse of "other". */ public void d...
RealTwo-Space/Neumann
neumann/src/org/real2space/neumann/evaris/core/structure/Field.java
Java
mit
426
# coding: utf-8 import unittest from config_reader import ConfigReader class TestConfigReader(unittest.TestCase): def setUp(self): self.config = ConfigReader(""" <root> <person> <name>山田</name> <age>15</age> </person> ...
orangain/jenkins-docker-sample
tests.py
Python
mit
681
inside = lambda x, y: 4*x*x+y*y <= 100 def coll(sx, sy, dx, dy): m = 0 for p in range(32): m2 = m + 2**(-p) if inside(sx + dx * m2, sy + dy * m2): m = m2 return (sx + dx*m, sy + dy*m) def norm(x, y): l = (x*x + y*y)**0.5 return (x/l, y/l) sx, sy = 0, 10.1 dx, dy = 1.4, -19.7 for ...
jokkebk/euler
p144.py
Python
mit
538
/** * Module dependencies */ const express = require('express'); const cluster = require('cluster'); const numCPUs = require('os').cpus().length; const compression = require('compression'); const helmet = require('helmet'); const hpp = require('hpp'); const config = require('./config'); const api = require('./api'); ...
pazguille/haysubte
index.js
JavaScript
mit
1,517
class UsersController < ApplicationController def new end def create user = User.new( email: params[:email], password: params[:password], password_confirmation: params[:password_confirmation]) if user.save session[:user_id] = user.id ...
acolletti21/braintree-store
app/controllers/users_controller.rb
Ruby
mit
504
#include <vector> #include <iostream> struct point { double x; double y; }; int main() { // Generate a lot of uniformly distributed 2d points in the range -1,-1 to +1,+1. enum { numXSamples = 10000 }; enum { numYSamples = 10000 }; std::vector<point> points; points.reserve(numXSamples * numYSamples); for(int x...
EOSIO/eos
libraries/wasm-jit/Test/Benchmark/Benchmark.cpp
C++
mit
944
class CreateVersions < ActiveRecord::Migration def change create_table :versions do |t| t.string :item_type, :null => false t.integer :item_id, :null => false t.string :event, :null => false t.string :whodunnit t.text :object t.string :locale t.datetime...
kostyakch/rhinoart_cms
db/migrate/20141229155334_create_versions.rb
Ruby
mit
399
using System; using System.Drawing; using System.Windows; using System.Windows.Controls; using System.Windows.Forms; using System.Windows.Input; using MahApps.Metro.Controls; using NHotkey; using NHotkey.Wpf; using QuickHelper.ViewModels; using QuickHelper.Windows; using Application = System.Windows.Application; using...
aburok/quick-helper
QuickHelper/MainWindow.xaml.cs
C#
mit
3,762
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("Tr...
luetm/TrackR
TrackR.Client/Properties/AssemblyInfo.cs
C#
mit
1,388
package fs.command; import fs.App; import fs.Disk; import fs.util.FileUtils; import java.util.Arrays; /** * * @author José Andrés García Sáenz <jags9415@gmail.com> */ public class CreateFileCommand extends Command { public final static String COMMAND = "mkfile"; @Override public void execute(Str...
leomv09/FileSystem
src/fs/command/CreateFileCommand.java
Java
mit
1,247
import { A, O } from 'b-o-a'; import { State } from '../types/state'; import currentPage$ from '../props/current-page'; import signIn$ from '../props/sign-in'; import spots$ from '../props/spots'; import spotForm$ from '../props/spot-form'; import stampRallies$ from '../props/stamp-rallies'; import stampRally$ from '...
bouzuya/rally-rxjs
src/props/index.ts
TypeScript
mit
1,793
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Copyright (c) 2011-2012 Litecoin Developers // Copyright (c) 2013-2013 Bluecoin Developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.o...
dallen6/bluecoin
src/netbase.cpp
C++
mit
32,522
'use strict'; /* * * angular-socialshare v0.0.2 * * ♡ CopyHeart 2014 by Dayanand Prabhu http://djds4rce.github.io * * Copying is an act of love. Please copy. * */ angular.module('djds4rce.angular-socialshare', []) .factory('$FB', ['$window', function($window) { return { init: function(fbId) { ...
khiettran/gofar
public/scripts/libs/bower/angular-socialshare.js
JavaScript
mit
14,491
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml; using System.Xml.Linq; using System.Globalization; namespace DevTreks.Extensions { /// <summary> ///Purpose: Serialize and deserialize a food nutrition cost object. /// This calculator is u...
kpboyle1/devtreks
src/DevTreks.Extensions/MN1/Statistics/MNC1Calculator.cs
C#
mit
8,301
angular.module('myApp.toDoController', []). controller('ToDoCtrl', ['$scope', '$state', '$http', '$route', function ($scope, $state, $http, $route) { $scope.$state = $state; $scope.addToDo = function() { // Just in case... if ($scope.toDoList.length > 50) { alert("Exceeded to-do limit!!!"); retu...
The-Lando-System/personal-website
app/to-do/toDoController.js
JavaScript
mit
2,424
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. package com.azure.data.cosmos.internal.query; import com.azure.data.cosmos.BadRequestException; import com.azure.data.cosmos.BridgeInternal; import com.azure.data.cosmos.CommonsBridgeInternal; import com.azure.data.cosmos.i...
navalev/azure-sdk-for-java
sdk/cosmos/microsoft-azure-cosmos/src/main/java/com/azure/data/cosmos/internal/query/DocumentQueryExecutionContextFactory.java
Java
mit
11,381
using System; using System.Collections.Generic; using System.Linq; using System.Text; using FlatRedBall; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework; namespace Anfloga.Rendering { public class BloomRenderer : IEffectsRenderer { public int Height { get; set; } public i...
vchelaru/Anfloga
Anfloga/Anfloga/Rendering/BloomRenderer.cs
C#
mit
3,162
import CommuniqueApp from './communique-app'; CommuniqueApp.open();
kramerc/communique
lib/browser/main.js
JavaScript
mit
68
using System.Collections.Generic; using System.IO; using Reinforced.Typings.Fluent; using Xunit; namespace Reinforced.Typings.Tests.SpecificCases { public partial class SpecificTestCases { [Fact] public void ReferencesPart6ByDanielWest() { /** * Specific test ca...
reinforced/Reinforced.Typings
Reinforced.Typings.Tests/SpecificCases/SpecificTestCases.ReferencesPart6ByDanielWest.cs
C#
mit
1,466
package com.avsystem.scex.util.function; import org.apache.commons.codec.digest.HmacAlgorithms; import org.apache.commons.codec.digest.HmacUtils; import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.StringUtils; import java.util.Collection; public class StringUtilImpl implements StringU...
AVSystem/scex
scex-util/src/main/scala/com/avsystem/scex/util/function/StringUtilImpl.java
Java
mit
5,283
require 'minitest_helper' require 'mocha/setup' module Sidekiq module Statistic describe 'Middleware' do def to_number(i) i.match('\.').nil? ? Integer(i) : Float(i) rescue i.to_s end before { Sidekiq.redis(&:flushdb) } let(:date){ Time.now.utc.to_date } let(:actual) do ...
business-of-fashion/sidekiq-statistic
test/test_sidekiq/middleware_test.rb
Ruby
mit
4,165
package work.notech.poker.room; import work.notech.poker.logic.Cards; import java.util.List; public class GameRoom { private Integer roomIds; private List<Integer> clientIds; private Cards cards; public Integer getRoomIds() { return roomIds; } public void setRoomIds(Integer roomIds)...
wangzhaoming/Poker
code/poker-server/src/main/java/work/notech/poker/room/GameRoom.java
Java
mit
671
// Take well-formed json from a sensu check result a context rich html document to be mail to // one or more addresses. // // LICENSE: // Copyright 2016 Yieldbot. <devops@yieldbot.com> // Released under the MIT License; see LICENSE // for details. package main import ( "bytes" "fmt" "github.com/codegangsta/c...
yieldbot/sensumailer
cmd/handler-mailer/main.go
GO
mit
2,623
module.exports = [ 'babel-polyfill', 'react', 'react-redux', 'react-router', 'react-dom', 'redux', 'redux-thunk', 'seamless-immutable', 'react-router-redux', 'history', 'lodash', 'styled-components', 'prop-types', ];
CheerfulYeti/React-Redux-Starter-Kit
webpack.vendor.js
JavaScript
mit
243
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\DataCollector; use Symfony\Component\HttpF...
ondrejmirtes/symfony
src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php
PHP
mit
8,681
package com.sunilson.pro4.activities; import android.app.DatePickerDialog; import android.app.TimePickerDialog; import android.content.Intent; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v7.widget.Toolbar; import android.view.View; import android.widget.CompoundButton; i...
sunilson/My-Ticker-Android
Android App/app/src/main/java/com/sunilson/pro4/activities/AddLivetickerActivity.java
Java
mit
11,353
import nextConnect from 'next-connect' import auth from '../../middleware/auth' import { deleteUser, updateUserByUsername } from '../../lib/db' const handler = nextConnect() handler .use(auth) .get((req, res) => { // You do not generally want to return the whole user object // because it may contain sensi...
flybayer/next.js
examples/with-passport-and-next-connect/pages/api/user.js
JavaScript
mit
1,087
import { injectReducer } from 'STORE/reducers' export default store => ({ path : 'checkHistoryList.html', getComponent(nextState, cb) { require.ensure([], (require) => { const CheckHistoryList = require('VIEW/CheckHistoryList').default const reducer = require('REDUCER/checkHistoryList').default ...
OwlAford/IFP
src/routes/main/checkHistoryList.js
JavaScript
mit
449
<?php declare(strict_types=1); namespace ShlinkMigrations; use Doctrine\DBAL\Exception; use Doctrine\DBAL\Platforms\MySQLPlatform; use Doctrine\DBAL\Platforms\SqlitePlatform; use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\SchemaException; use Doctrine\Migrations\AbstractMigration; use function is_subclas...
shlinkio/shlink
data/migrations/Version20160819142757.php
PHP
mit
1,364
<?php namespace RectorPrefix20210615; if (\class_exists('Tx_Extbase_Property_TypeConverter_AbstractFileFolderConverter')) { return; } class Tx_Extbase_Property_TypeConverter_AbstractFileFolderConverter { } \class_alias('Tx_Extbase_Property_TypeConverter_AbstractFileFolderConverter', 'Tx_Extbase_Property_TypeConve...
RectorPHP/Rector
vendor/ssch/typo3-rector/stubs/Tx_Extbase_Property_TypeConverter_AbstractFileFolderConverter.php
PHP
mit
364
;(function() { angular.module('app.core') .config(config); /* @ngInject */ function config($stateProvider, $locationProvider, $urlRouterProvider) { $stateProvider /** * @name landing * @type {route} * @description First page for incoming users, and for default routing ...
radiant-persimmons/mockr
src/client/app/core/config/routes.config.js
JavaScript
mit
3,748
using System; using System.Collections.Generic; using System.Linq; using System.Net.Sockets; namespace CommonTypes { /// <summary> /// BrokerSite hides the replication in a site making the calls transparent. /// </summary> [Serializable] public class BrokerSiteFrontEnd : IBroker { ...
pasadinhas/dad-project
SESDAD/CommonTypes/BrokerSiteFrontEnd.cs
C#
mit
4,968
import Route from '@ember/routing/route'; import { A } from '@ember/array'; import { hash } from 'rsvp'; import EmberObject from '@ember/object' export default Route.extend({ model: function() { return hash({ exampleModel: EmberObject.create(), disableSubmit: false, selectedLanguage: null, ...
Emerson/ember-form-master-2000
tests/dummy/app/routes/application.js
JavaScript
mit
2,343
import lowerCaseFirst from 'lower-case-first'; import {handles} from 'marty'; import Override from 'override-decorator'; function addHandlers(ResourceStore) { const {constantMappings} = this; return class ResourceStoreWithHandlers extends ResourceStore { @Override @handles(constantMappings.getMany.done) ...
taion/flux-resource-marty
src/store.js
JavaScript
mit
3,040
<?php namespace proyecto\backendBundle\Entity; /** * Entidad Respuesta * @author Javier Burguillo Sánchez */ class Respuesta { /** * @var integer */ private $id; /** * @var string */ private $respuesta; /** * @var \proyecto\backendBundle\Entity\Subpregunta */ ...
jburgui/proyecto2.0
src/proyecto/backendBundle/Entity/Respuesta.php
PHP
mit
2,024
$('.js-toggle-menu').click(function(e){ e.preventDefault(); $(this).siblings().toggle(); }); $('.nav--primary li').click(function(){ $(this).find('ul').toggleClass('active'); });
sudojesse/sdb
js/main.js
JavaScript
mit
182
/* * This file is part of Sponge, licensed under the MIT License (MIT). * * Copyright (c) SpongePowered <https://www.spongepowered.org> * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Softwar...
SpongePowered/SpongeCommon
src/main/java/org/spongepowered/common/mixin/core/network/NetworkManagerMixin.java
Java
mit
3,754
function solve(message) { let tagValidator = /^<message((?:\s+[a-z]+="[A-Za-z0-9 .]+"\s*?)*)>((?:.|\n)+?)<\/message>$/; let tokens = tagValidator.exec(message); if (!tokens) { console.log("Invalid message format"); return; } let [match, attributes, body] = tokens; let attribute...
kalinmarkov/SoftUni
JS Core/JS Fundamentals/Exams/03. XML Messenger.js
JavaScript
mit
1,486