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
/* This script generates mock data for local development. This way you don't have to point to an actual API, but you can enjoy realistic, but randomized data, and rapid page loads due to local, static data. */ /* eslint-disable no-console */ import jsf from 'json-schema-faker'; import {schema} from './mockData...
davefud/js-dev-env
buildScripts/generateMockData.js
JavaScript
mit
604
import logging import ConfigParser from collections import namedtuple # User Configuration Handler class ConfigHandler: # Some Config Constants FILE_NAME = 'app.cfg' FILE_MODE = 'wb' CONSUMER_SECTION = 'Consumer Info' ACCESS_SECTION = 'Access Info' MENTION_SECTION = 'Mention Info' CONSUMER_KEY = '...
Th3BFG/hex-note
HexNote/confighandler.py
Python
mit
1,649
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MathML { public abstract class MathMLElement : IMathMLNode { [MathMLAttributeName("id")] [MathMLAttributeOrderIndex(1)] [DefaultValue("")] public string...
BenjaminTMilnes/MathML
MathML/MathMLElement.cs
C#
mit
1,408
import { NgModule } from '@angular/core'; import { SharedModule } from '../shared/shared.module'; import { NgBusyModule } from 'ng-busy'; import { SurvivalRoutingModule } from './survival-routing.module'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { CommonModule } from '@angular/common'; ...
brevinL/longevity-visualizer-front-end
src/app/survival/survival.module.ts
TypeScript
mit
1,553
package fi.csc.chipster.sessionworker; public class SupportRequest { private String message; private String mail; private String session; private String app; private String log; public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public ...
chipster/chipster-web-server
src/main/java/fi/csc/chipster/sessionworker/SupportRequest.java
Java
mit
748
using System; namespace RecurringInterval { public abstract class Interval { protected Interval(Period period) { Period = period; } public int TotalDays => (int)EndDate.Subtract(StartDate).TotalDays + 1; public DateTime StartDate { get; protect...
ribbles/RecurringInterval
RecurringInterval/Interval.cs
C#
mit
786
/* global describe,it */ var getSlug = require('../lib/speakingurl'); describe('getSlug symbols', function () { 'use strict'; it('should convert symbols', function (done) { getSlug('Foo & Bar | Baz') .should.eql('foo-and-bar-or-baz'); getSlug('Foo & Bar | Baz', { ...
jotamaggi/react-calendar-app
node_modules/speakingurl/test/test-lang.js
JavaScript
mit
12,387
#include "SoundSource.hpp" #include "../Entity/Entity.hpp" #include "../Hymn.hpp" #include "../Audio/SoundFile.hpp" #include "../Audio/SoundBuffer.hpp" #include "../Manager/Managers.hpp" #include "../Manager/ResourceManager.hpp" using namespace Component; SoundSource::SoundSource() { alGenSources(1, &source); ...
Chainsawkitten/HymnToBeauty
src/Engine/Component/SoundSource.cpp
C++
mit
1,089
[?php if ('NONE' != $fieldset): ?] <h2 class="titleSection">[?php echo __($fieldset, array(), '<?php echo $this->getI18nCatalogue() ?>') ?]</h2> [?php endif; ?] <div class="fieldSection"> <fieldset id="sf_fieldset_[?php echo preg_replace('/[^a-z0-9_]/', '_', strtolower($fieldset)) ?]"> [?php foreach ...
retrofox/sfPropelMooDooPlugin
trunk/plugin/data/generator/sfPropelModule/mooDooAdmin/template/templates/_form_fieldset.php
PHP
mit
1,025
/*global module:false*/ module.exports = function(grunt) { // Project configuration. grunt.initConfig({ // Metadata. pkg: grunt.file.readJSON('package.json'), banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' + '<%= grunt.template.today("yyyy-mm-dd") %>\n' + '<%= pkg.homep...
jussiip/wamefork
Gruntfile.js
JavaScript
mit
2,290
Resetme::Application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both thread web serv...
hidnasio/resetme
config/environments/production.rb
Ruby
mit
3,251
/** * Using Rails-like standard naming convention for endpoints. * GET /things -> index * POST /things -> create * GET /things/:id -> show * PUT /things/:id -> update * DELETE /things/:id -> destroy */ import {notFound, invalidData} from ...
fixjs/user-management-app
src/apis/user-group.api.js
JavaScript
mit
3,703
<?php namespace Korsmakolnikov\InternalBundle\DependencyInjection; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Class DependencyFactory * @package Korsmakolnikov\InternalBundle\DependencyInjection */ class DependencyFactory...
korsmakolnikov/InternalBundle
DependencyInjection/DependencyFactory.php
PHP
mit
2,196
var express = require('express'); var app = express(); var uid = require('uid'); var databaseUrl = 'mongodb://dev:angular@ds047107.mongolab.com:47107/getitrightdev'; var collections = ['active_users']; var db = require('mongojs').connect(databaseUrl, collections); app.use(express.static('public')); app.use(express.jso...
getitrightio/getitright-server
app/server.js
JavaScript
mit
1,356
<?php namespace Veta\HomeworkBundle\Controller; use RedCode\TreeBundle\Controller\TreeAdminController; class CategoryAdminController extends TreeAdminController { }
eltrubetskaya/blog
src/Veta/HomeworkBundle/Controller/CategoryAdminController.php
PHP
mit
168
// 74: String - `endsWith()` // To do: make all tests pass, leave the assert lines unchanged! var assert = require("assert"); describe('`str.endsWith(searchString)` determines whether `str` ends with `searchString`.', function() { const s = 'el fin'; describe('1st parameter, the string to search for', function(...
jostw/es6-katas
tests/74-string-ends-with.js
JavaScript
mit
2,438
# frozen_string_literal: true require 'spec_helper' module Steam module Networking describe Packet do it 'requies a tcp body' do expect do Packet.new(nil) end.to raise_error(RuntimeError) expect do Packet.new('') end.to raise_error(RuntimeError) en...
fastpeek/steam
spec/steam/networking/packet_spec.rb
Ruby
mit
2,516
require 'spec_helper' describe AridCache do describe 'results' do before :each do Company.destroy_all @company1 = Company.make(:name => 'a') @company2 = Company.make(:name => 'b') Company.class_caches do ordered_by_name { Company.all(:order => 'name ASC') } end Company...
kjvarga/arid_cache
spec/arid_cache/arid_cache_spec.rb
Ruby
mit
2,815
#include <iostream> #include <algorithm> #include <vector> #include <string> using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) #define dump(x) cerr << #x << " = " << (x) << endl; int n=16; int a[16] = {0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15}; int dp[100]; ...
k-ori/algorithm-playground
src/dp/longest-increasing-subsequence/longest-increasing-subsequence-org.cpp
C++
mit
823
<?php namespace Pandora\MainBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; class PandoraMainBundle extends Bundle { }
Kilo3/pandora
src/Pandora/MainBundle/PandoraMainBundle.php
PHP
mit
130
package io.cucumber.core.backend; /** * Marks a glue class as being scenario scoped. * <p> * Instances of scenario scoped glue can not be used between scenarios and will * be removed from the glue. This is useful when the glue holds a reference to a * scenario scoped object (e.g. a method closure). */ public int...
cucumber/cucumber-jvm
core/src/main/java/io/cucumber/core/backend/ScenarioScoped.java
Java
mit
742
require_relative "helper" setup do machine = MicroMachine.new(:pending) machine.when(:confirm, pending: :confirmed) machine.when(:reset, confirmed: :pending) machine.on(:pending) { @state = "Pending" } machine.on(:confirmed) { @state = "Confirmed" } machine.on(:any) { @current = @state } machin...
soveran/micromachine
test/callbacks.rb
Ruby
mit
1,352
var merge = require('merge'); var clone = require('clone'); var Field = require('./field'); var maxCounter = require('../mixins/max-counter'); module.exports = function() { return merge.recursive(Field(), { props: { placeholder: { type:String, required:false, default:'' }, disabled: ...
matfish2/vue-formular
lib/components/fields/textarea.js
JavaScript
mit
2,395
package jnesulator.core.nes.audio; public class TriangleTimer extends Timer { private static int periodadd = 1; private static int[] triangle = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; private int divider = 0; public TriangleTimer() { pe...
thomas-kendall/jnesulator
jnesulator-core/src/main/java/jnesulator/core/nes/audio/TriangleTimer.java
Java
mit
1,785
<?php namespace Ghw\UserBundle\Controller; use Symfony\Component\HttpFoundation\RedirectResponse; use FOS\UserBundle\Controller\RegistrationController as BaseController; class LoginController extends BaseController { public function loginAction() { $request = $this->container->get('request'); ...
deuxnids/Wiloma
src/Ghw/UserBundle/Controller/LoginController.php
PHP
mit
1,652
import i18n from 'mi18n' import Sortable from 'sortablejs' import h, { indexOfNode } from '../common/helpers' import dom from '../common/dom' import { ANIMATION_SPEED_SLOW, ANIMATION_SPEED_FAST } from '../constants' import { merge } from '../common/utils' const defaults = Object.freeze({ type: 'field', displayType...
Draggable/formeo
src/js/components/panels.js
JavaScript
mit
9,240
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DiscordSharp.Commands { public abstract class IModule { /// <summary> /// The name of the module. /// </summary> public virtual string Name { get; set; ...
Luigifan/DiscordSharp
DiscordSharp.Commands/IModule.cs
C#
mit
1,662
/* * Copyright (c) 2012 VMware, Inc. All Rights Reserved. * * 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, ...
s2js/probes
test/stats/mean-test.js
JavaScript
mit
3,493
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("01...
ni4ka7a/TelerikAcademyHomeworks
DataStructuresAndAlgorithms/05.AdvancedDataStructures/01.PriorityQueueImplementation/Properties/AssemblyInfo.cs
C#
mit
1,436
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace RevStack.Client.API.Membership { public interface IValidation { void Validate(Object obj); bool IsValid { get; } Exception Exception { get; } Validation...
MISInteractive/revstack-net
src/REVStack.Client/API/Membership/IValidation.cs
C#
mit
359
/** * Copyright (c) 2010 by Gabriel Birke * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the 'Software'), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, ...
kurbmedia/transit-legacy
app/assets/javascripts/libs/sanitize.js
JavaScript
mit
9,555
export default { actions: { edit: '編集', save: 'セーブ', cancel: 'キャンセル', new: '新しい', list: 'リスト', }, }
HospitalRun/hospitalrun-frontend
src/shared/locales/ja/translations/actions/index.ts
TypeScript
mit
156
const router = require('express').Router() const albumsQueries = require('../../db/albums') const albumsRoutes = require('./albums') const usersQueries = require('../../db/users') const usersRoutes = require('./users') const reviewsQueries = require('../../db/reviews') const {getSimpleDate} = require('../utils') route...
hhhhhaaaa/phase-4-challenge
src/server/routes/index.js
JavaScript
mit
4,027
# Abstract model class Abstract < ActiveRecordShared belongs_to :study_subject, :counter_cache => true with_options :class_name => 'User', :primary_key => 'uid' do |u| u.belongs_to :entry_1_by, :foreign_key => 'entry_1_by_uid' u.belongs_to :entry_2_by, :foreign_key => 'entry_2_by_uid' u.belongs_to :merged_by,...
ccls/ccls_engine
app/models/abstract.rb
Ruby
mit
5,798
package com.tehreh1uneh.cloudstorage.common.messages.files; import com.tehreh1uneh.cloudstorage.common.messages.base.Message; import com.tehreh1uneh.cloudstorage.common.messages.base.MessageType; import java.io.File; import java.util.ArrayList; public class FilesListResponse extends Message { private final Arra...
tehreh1uneh/CloudStorage
common/src/main/java/com/tehreh1uneh/cloudstorage/common/messages/files/FilesListResponse.java
Java
mit
701
class PagesController < ApplicationController def home @emptyphoto = Photo.new @top5 = Photo.popular end end
jannewaren/toukoaalto_generator
app/controllers/pages_controller.rb
Ruby
mit
126
require "active_record" require "authem/token" module Authem class Session < ::ActiveRecord::Base self.table_name = :authem_sessions belongs_to :subject, polymorphic: true before_create do self.token ||= Authem::Token.generate self.ttl ||= 30.days self.expires_at ||= ttl_from_now ...
rwz/authem2
lib/authem/session.rb
Ruby
mit
784
require 'rails_helper' include OmniauthHelpers describe Users::SignIn do describe '#call' do it 'returns object with user_id and organisation_id' do auth = create_auth sign_in = Users::SignIn.new(auth: auth) membership = sign_in.call expect(membership.user_id).to eq(User.first.id) ...
netguru/props
spec/services/sign_in_spec.rb
Ruby
mit
1,728
using System; using System.IO; using System.IO.Abstractions; using System.Linq; using System.Net; using System.Net.Http; using System.Text; using NSubstitute; using PactNet.Mocks.MockHttpService; using PactNet.Mocks.MockHttpService.Models; using PactNet.Mocks.MockHttpService.Validators; using PactNet.Models...
mvdbuuse/pact-net
PactNet.Tests/PactVerifierTests.cs
C#
mit
27,525
// Karma configuration // Generated on Thu Jul 30 2015 17:38:26 GMT-0700 (PDT) // we try our best... let browsers; switch (process.platform) { case 'darwin': // ensured by the npm module ... but may not work on non-consumer // oses. process.env.CHROME_BIN = require('puppeteer').executablePa...
kbase/kbase-ui
test/unit-tests/karma.conf.js
JavaScript
mit
4,283
<?php /* * This file is part of the TraitorBundle, an RunOpenCode project. * * (c) 2017 RunOpenCode * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace RunOpenCode\Bundle\Traitor\Traits; use Symfony\Component\EventDispatche...
RunOpenCode/traitor-bundle
src/RunOpenCode/Bundle/Traitor/Traits/EventDispatcherAwareTrait.php
PHP
mit
734
let path = require('path'); let glob = require('glob'); let fs = require('fs'); let net = require('net'); let webpack = require('webpack'); let HtmlWebpackPlugin = require('html-webpack-plugin'); let ExtractTextPlugin = require('extract-text-webpack-plugin'); let slash = require('slash'); let autoprefixer = require("au...
IveChen/saber-cli
build/util.js
JavaScript
mit
6,228
<?php /** * UserFrosting (http://www.userfrosting.com) * * @link https://github.com/userfrosting/UserFrosting * @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License) */ namespace UserFrosting\Sprinkle\Core\Throttle; /** * ThrottleRule Class * * Represen...
splitt3r/UserFrosting
app/sprinkles/core/src/Throttle/ThrottleRule.php
PHP
mit
4,106
import java.util.ArrayList; import java.util.Arrays; import java.util.InputMismatchException; import java.util.List; /** * Created by liuxz on 17-3-19. */ public class Leet54SpiralMatrix { public List<Integer> spiralOrder(int[][] matrix) { List<Integer> res = new ArrayList<>(); int n = matrix.le...
LiuXiaozeeee/OnlineJudge
src/Leet54SpiralMatrix.java
Java
mit
1,600
<?php require_once("support/config.php"); if(!isLoggedIn()){ toLogin(); die(); } if(!AllowUser(array(1))){ redirect("index.php"); } $to_do=""; // var_dump($_GET['id']); // die; if(!empty($_GET['id'])){ $to_do=$con->myQuery("SELECT ev.stat_id,ev.event_s...
sgtsi-jenny/crmv2
frm_to_do.php
PHP
mit
10,845
import React from 'react'; import { Image, Text, View } from 'react-native'; import Example from '../../shared/example'; const Spacer = () => <View style={{ height: '1rem' }} />; const Heading = ({ children }) => ( <Text accessibilityRole="heading" children={children} style={{ fontSize: '1rem', fontWeig...
necolas/react-native-web
packages/examples/pages/text/index.js
JavaScript
mit
15,012
package org.wycliffeassociates.translationrecorder.project; import android.os.Parcel; import android.os.Parcelable; /** * Created by sarabiaj on 4/17/2017. */ public class TakeInfo implements Parcelable { ProjectSlugs mSlugs; int mChapter; int mStartVerse; int mEndVerse; int mTake; public...
WycliffeAssociates/translationRecorder
translationRecorder/app/src/main/java/org/wycliffeassociates/translationrecorder/project/TakeInfo.java
Java
mit
5,206
def ReadLines(filename): content = [] with open(filename) as f: content = [x.rstrip() for x in f.readlines()] return content
aawc/cryptopals
sets/1/challenges/common/read_lines.py
Python
mit
136
const ACCOUNTS = [ 'all', 'default', 'kai-tfsa', 'kai-rrsp', 'kai-spouse-rrsp', 'kai-non-registered', 'kai-charles-schwab', 'crystal-non-registered', 'crystal-tfsa', 'crystal-rrsp', 'crystal-spouse-rrsp' ]; export default ACCOUNTS;
kaiguogit/growfolio
client/src/constants/accounts.js
JavaScript
mit
276
package charlotte.tools; import java.util.Arrays; import java.util.List; public class QueueData<T> { private LinkNode<T> _top; private LinkNode<T> _last; private int _count; public QueueData(T[] entries) { this(Arrays.asList(entries)); } public QueueData(List<T> entries) { this(); for(T entry : entries...
stackprobe/Java
charlotte/tools/QueueData.java
Java
mit
1,092
import React from 'react'; import PropTypes from 'prop-types'; import serialize from 'serialize-javascript'; import filterWithRules from '../../internal/utils/objects/filterWithRules'; import values from '../values'; // Filter the config down to the properties that are allowed to be included // in the HTML response. c...
ueno-llc/starter-kit-universally
config/components/ClientConfig.js
JavaScript
mit
1,126
using Nucleus.Logs; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Nucleus.Game { /// <summary> /// Interface for components, status effects, items etc. that /// modify critical hit chance /// </summary> public interfac...
pnjeffries/Nucleus
Nucleus/Nucleus.Game/Components/ICritChanceModifier.cs
C#
mit
617
<?php /** * This file is part of Student-List application. * * @author foobar1643 <foobar76239@gmail.com> * @copyright 2016 foobar1643 * @package Students\Utility * @license https://github.com/foobar1643/student-list/blob/master/LICENSE.md MIT License */ namespace Students\Utility; use Students\Interfaces\Conf...
foobar1643/student-list
src/Utility/Configuration.php
PHP
mit
5,398
import React from 'react'; import ReactDOM from 'react-dom'; import { Router, Route, browserHistory } from 'react-router'; import * as firebase from "firebase"; import './css/index.css'; import PetPage from './pet'; import Welcome from './welcome'; import AddPet from './add-pet'; import MainLayout from './main-layout'...
beleidy/Pet-Land
src/index.js
JavaScript
mit
986
// ----------------------------------------------------------------------- // Licensed to The .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // ----------------------------------------------------------------------- // This is a generated file. //...
SteveSyfuhs/Kerberos.NET
Kerberos.NET/Entities/Krb/KrbAsRep.generated.cs
C#
mit
1,321
package com.dranawhite.mybatis.Service; /** * @author dranawhite 2017/9/30 * @version 1.0 */ public class PersonService { }
dranawhite/test-java
test-framework/test-mybatis/src/main/java/com/dranawhite/mybatis/Service/PersonService.java
Java
mit
129
from wdom.server import start from wdom.document import set_app from wdom.tag import Div, H1, Input class MyElement(Div): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.h1 = H1(parent=self) self.h1.textContent = 'Hello, WDOM' self.input = Input(parent=se...
miyakogi/wdom
docs/guide/samples/wdom2.py
Python
mit
526
#include<iostream> int* f(int* fst, int* lst, int v) { std::cout << "in f function, pointers are copied" << std::endl; std::cout << "&fst == " << &fst << ", &lst == " << &lst << std::endl; std::cout << "fst == " << fst << ", lst == " << lst << std::endl; while(fst != lst && *fst != v) { ++f...
sylsaint/cpp_learning
tcpppl/arguments_passing.cc
C++
mit
881
const { ArgumentError } = require('rest-facade'); const Auth0RestClient = require('../Auth0RestClient'); const RetryRestClient = require('../RetryRestClient'); /** * Abstracts interaction with the stats endpoint. */ class StatsManager { /** * @param {object} options The client options. * @param {s...
auth0/node-auth0
src/management/StatsManager.js
JavaScript
mit
3,012
const initialState = { minimoPalpite: 2, valorMaximoAposta: 500, valorMinimoAposta: 5, } function BancaReducer(state= initialState, action) { return state; } export default BancaReducer
sysbet/sysbet-mobile
src/reducers/sistema/banca.js
JavaScript
mit
205
// Package acceptlang provides a Martini handler and primitives to parse // the Accept-Language HTTP header values. // // See the HTTP header fields specification for more details // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4). // // Example // // Use the handler to automatically parse the Accept-L...
martini-contrib/acceptlang
handler.go
GO
mit
3,280
context 'LPUSH' do include CompatibilityTesting setup do @original = Redis.new @compatible = Moneta.new :Memory mirror :lpush, 'test:lpush', 'foo' end test 'when list does not exist' do assert_compatible :lpush, 'test:nx', 'foo' end test 'when list has items already' do assert_compati...
colstrom/redislike
tests/compatibility/redislike/lists/lpush.rb
Ruby
mit
473
using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; using MonoGame.Extended; using MonoGame.Extended.ViewportAdapters; using LudumDare38.Managers; namespace LudumDare38.Scenes { public abstract class SceneBase { ...
Phantom-Ignition/LudumDare38
LudumDare38/Scenes/SceneBase.cs
C#
mit
2,014
export default { "hljs-comment": { "color": "#776977" }, "hljs-quote": { "color": "#776977" }, "hljs-variable": { "color": "#ca402b" }, "hljs-template-variable": { "color": "#ca402b" }, "hljs-attribute": { "color": "#ca402b" }, "hljs-ta...
conorhastings/react-syntax-highlighter
src/styles/hljs/atelier-heath-light.js
JavaScript
mit
1,709
package org.analogweb.core; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsNull.nullValue; import static org.junit.Assert.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import org.analogweb.InvocationMetadata; import org.analogweb.RequestContext; ...
analogweb/core
src/test/java/org/analogweb/core/PathVariableValueResolverTest.java
Java
mit
4,964
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using MySql.Data.MySqlClient; using Jam; using System.IO; public partial class UIControls_ImageCover : JamUIControl { public UIControls_ImageCover() { m_Code = 56;...
hardsky/music-head
web/UIControls/ImageCover.ascx.cs
C#
mit
7,390
require 'test_helper' # silence_warnings trick around require can be removed once # https://github.com/hipchat/hipchat-rb/pull/174 # gets merged and released silence_warnings do require 'hipchat' end class HipchatNotifierTest < ActiveSupport::TestCase test "should send hipchat notification if properly configured...
trevorturk/exception_notification
test/exception_notifier/hipchat_notifier_test.rb
Ruby
mit
5,526
module Log2irc class Channel class << self # hostname or ip def move(to, hostname_ip) if channels[to].nil? channels[to] = {} Log2irc.bot.join(to) end ip, hostname = remove(hostname_ip) channels[to][ip] = { hostname: hostname, last...
l3akage/log2irc
lib/log2irc/channel.rb
Ruby
mit
3,230
class DropFactualPages < ActiveRecord::Migration[5.0] def up drop_table :factual_pages end def down raise ActiveRecord::IrreversibleMigration end end
artsy/bearden
db/migrate/20170223222333_drop_factual_pages.rb
Ruby
mit
167
/** * @license * Based on https://github.com/lodash/lodash/blob/master/perf/perf.js * Available under MIT license <https://lodash.com/license> */ var Benchmark = require('benchmark') var formatNumber = Benchmark.formatNumber var tcParser = require('type-check').parseType var tcChecker = require('type-check').parsed...
fanatid/yatc
perf/perf.js
JavaScript
mit
3,879
package server import ( "bytes" "context" "net/http" "net/http/httptest" "testing" "github.com/influxdata/influxdb/chronograf" "github.com/influxdata/influxdb/chronograf/mocks" "github.com/julienschmidt/httprouter" ) func TestService_Queries(t *testing.T) { tests := []struct { name string Source...
mark-rushakoff/influxdb
chronograf/server/queries_test.go
GO
mit
3,837
using System; using System.Collections.Generic; using System.Data.Entity; using System.Linq; using System.Text; using System.Threading.Tasks; using OpenORPG.Database.DAL; using Server.Game.Combat; using Server.Game.Database; using Server.Game.Database.Models.ContentTemplates; using Server.Game.Entities; using Server.I...
hilts-vaughan/OpenORPG
OpenORPG.Server/Game/Items/SkillbookItem.cs
C#
mit
1,487
module Gandi class Domain class Host include Gandi::GandiObjectMethods #The hostname of the Host attr_reader :hostname def initialize(hostname, attributes = nil) @hostname = hostname @attributes = attributes || info end #Delete a host. ...
pickabee/gandi
lib/gandi/domain/host.rb
Ruby
mit
1,820
#!/bin/python3 import sys time = input().strip() # 12AM = 00:00 # 12PM = 12:00 # 01PM = 13:00 meridian = time[-2:] time = time[:-2] hour, minute, second = time.split(":") hour = int(hour, 10) if meridian == "PM": if hour != 12: hour += 12 else: if hour == 12: hour = 0 print("{:0>2d}:{}:{}"...
costincaraivan/hackerrank
algorithms/warmup/python3/time_conversion.py
Python
mit
351
""" Test suite for the cppext library. The script can be executed on its own or incorporated into a larger test suite. However the tests are run, be aware of which version of the package is actually being tested. If the package is installed in site-packages, that version takes precedence over the version in this proje...
mdklatt/cppext-python
test/test_cppext.py
Python
mit
1,176
/* * Copyright (c) 2017 Andrew Kelley * * This file is part of zig, which is MIT licensed. * See http://opensource.org/licenses/MIT */ #include "bigfloat.hpp" #include "bigint.hpp" #include "buffer.hpp" #include "softfloat.hpp" #include <stdio.h> #include <math.h> #include <errno.h> void bigfloat_init_128(BigFl...
Dimenus/zig
src/bigfloat.cpp
C++
mit
5,573
<?php namespace Doctrineum\Tests\Entity\TestsOfTests; use Doctrine\ORM\EntityManager; use Doctrineum\Tests\Entity\AbstractDoctrineEntitiesTest; /** * @codeCoverageIgnore */ class DoctrineEntityUnknownSqlDriverNegativeTest extends AbstractDoctrineEntitiesTest { protected function getSqlExtensionName(): string ...
jaroslavtyc/doctrineum-entity
Doctrineum/Tests/Entity/TestsOfTests/DoctrineEntityUnknownSqlDriverNegativeTest.php
PHP
mit
807
<?php class Bug extends Eloquent { public $table = 'bugs'; public static $rules = array( 'page'=>'required', 'prio'=>'required', 'message'=>'required' ); public function user() { return $this->belongsTo('User'); } }
murum/baxacykel
app/models/Bug.php
PHP
mit
243
require 'thread_safe' module ActiveModel class Serializer extend ActiveSupport::Autoload autoload :Configuration autoload :ArraySerializer autoload :Adapter include Configuration class << self attr_accessor :_attributes attr_accessor :_attributes_keys attr_accessor :_associ...
Yakrware/active_model_serializers
lib/active_model/serializer.rb
Ruby
mit
7,560
@extends('app') @section('title',$profile->user->name.'的主页') {{--@section('header-css') <link rel="stylesheet" href="/css/profile.css"> <link rel="stylesheet" href="/css/search.css"> @endsection--}} {{--@section('header-js') <script src="/js/source/vue.js"></script> <script src="/js/source/vue-resource....
GeekGhc/ISpace
resources/views/profile/post.blade.php
PHP
mit
2,510
import { types } from './types'; interface FetchCafeRequested { type: types.FETCH_CAFE_REQUESTED; payload: number; } interface FetchCafeSucceeded { type: types.FETCH_CAFE_SUCCEEDED; payload: any; } interface FetchCafeFailed { type: types.FETCH_CAFE_FAILED; payload: any; } export type FetchCafeAction = | Fetc...
mjlaufer/cafe-tour-client
src/client/components/screens/CafeDetail/actions/index.ts
TypeScript
mit
691
namespace E06_BirthdayCelebrations.Models { public class Robot : SocietyMember { private string model; public Robot(string id, string model) : base(id) { this.Model = model; } public string Model { get { return this.model; }...
Rusev12/Software-University-SoftUni
C# OOP Advanced/01-Interfaces-and-Abstraction/E06-BirthdayCelebrations/Models/Robot.cs
C#
mit
397
# flake8: noqa # -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Event.is_published' db.add_column('event_rsvp_event', 'is_published', ...
bitmazk/django-event-rsvp
event_rsvp/migrations/0008_auto__add_field_event_is_published.py
Python
mit
7,470
<?php namespace Bit3\FakerCli\Command; use Faker\Factory; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; class ...
bit3/faker-cli
src/Command/GenerateCommand.php
PHP
mit
7,146
<h4><b>Statistics Summary</b></h4> <br> <p><b>A) Gender Student Distribution</b></p> <hr> <table class="table table-striped table-responsive table-hover"> <thead id="gender_table_head"> </thead> <tbody id="gender_table_body"> </tbody> </table> <br> <p><b>B) Muslim Student Distribution</b></p> <hr> <...
stinkymonkeyph/Studenizer
resources/views/components/tables/data_summary.blade.php
PHP
mit
9,401
import { generate } from "randomstring" import { NON_EXECUTABLE_FILE_MODE, EXECUTABLE_FILE_MODE, } from "../src/patch/parse" import { assertNever } from "../src/assertNever" export interface File { contents: string mode: number } export interface Files { [filePath: string]: File } export interface TestCase...
ds300/patch-package
property-based-tests/testCases.ts
TypeScript
mit
5,362
using System.Collections.Generic; namespace CSharp2nem.ResponseObjects.Account { public class ExistingAccount { public class Cosignatory { public string Address { get; set; } public int HarvestedBlocks { get; set; } public long Balance { get; set; } ...
NemProject/csharp2nem
NemApi/Wrapper/ResponseObjects/Account/ExistingAccountData.cs
C#
mit
2,257
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("05...
helena999/SoftUni-Assignments
00. Programming Basics/05. Console-Input-Output-Homework/05.FormattingNumbers/Properties/AssemblyInfo.cs
C#
mit
1,416
# coding: utf-8 from numpy import matrix from oneVsAll import oneVsAll from numpy import loadtxt, savetxt from predictOneVsAll import predictOneVsAll def train(): num_labels = 34 print '... Training' X = matrix(loadtxt('X.dat')) / 255.0 y = matrix(loadtxt('y.dat')).transpose() the_lambda = 0.1 ...
skyduy/zfverify
Verify-Manual-python/train/core/train.py
Python
mit
950
#!/usr/bin/env python import queue class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None self.size = 1 self.self_count = 1 def treeBuilder(nodeString): nodeList = nodeString[1:-1].split(',') nodeQueue = queue.Queue() if nodeList...
eroicaleo/LearningPython
interview/leet/tree.py
Python
mit
2,092
using System; using LanguageExt.Common; using System.Threading.Tasks; using static LanguageExt.Prelude; using System.Diagnostics.Contracts; using System.Runtime.CompilerServices; using LanguageExt.Effects.Traits; using LanguageExt.Pipes; using LanguageExt.Thunks; namespace LanguageExt { /// <summary> /// Synch...
louthy/language-ext
LanguageExt.Core/Effects/Eff/Eff.cs
C#
mit
6,359
using MathSite.BasicAdmin.ViewModels.SharedModels.Posts; namespace MathSite.BasicAdmin.ViewModels.News { public class NewsViewModel : PostViewModel { } }
YarGU-Demidov/math-site
src/MathSite.BasicAdmin.ViewModels/News/NewsViewModel.cs
C#
mit
169
<?php if (!is_array($module)): ?> <p>404. No such module.</p> <?php else: ?> <h1>Module: <?= $module['name'] ?></h1> <h2>Description</h2> <p>File: <code><?= $module['filename'] ?></code></p> <p><?= nl2br($module['doccomment']) ?></p> <h2>Details</h2> <table> ...
guni12/siteshop
src/CCModules/view.tpl.php
PHP
mit
3,244
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. using Microsoft.Azure.Management.Fluent; using Microsoft.Azure.Management.KeyVault.Fluent.Models; using Microsoft.Azure.Management.ResourceManager.Fluent; using ...
hovsepm/azure-libraries-for-net
Samples/KeyVault/ManageKeyVault.cs
C#
mit
6,663
class Solution { public int solution (String S) { int length = S.length(); // Such index only exists if the length of the string is odd if (length % 2 == 0) { return -1; } int middle = length / 2; for (int i = middle - 1, j = middle + 1; i >= 0 && j < length; i--, j++) { if (S.c...
shengmin/coding-problem
codility/task-1/Driver.java
Java
mit
810
package fsb.semantics.empeagerpso; import java.util.Set; import ags.constraints.AtomicPredicateDictionary; import ags.constraints.Formula; import fsb.ast.MProgram; import fsb.ast.Statement; import fsb.ast.Statement.StatType; import fsb.ast.tvl.ArithValue; import fsb.ast.tvl.DeterArithValue; import fsb.explore.Action...
hetmeter/awmm
fender-sb-bdd/branches/three valued logic branch/fender-sb-bdd/src/fsb/semantics/empeagerpso/EmpEagerAbsState.java
Java
mit
5,589
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package jenkins.plugins.pivot.render; import java.util.ArrayList; import java.util.List; /** * 2-dimension matrix utility * @author zijiang */ public final class Matrix2D { private int[][] data; ...
gougoujiang/programmable-section
src/main/java/jenkins/plugins/pivot/render/Matrix2D.java
Java
mit
2,516
<?php /** * This file is part of Git-Live * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. * * @category GitCommand * @package Git-Live * @subpackage Core * @author akito<akito-artisan@five-foxes.com> * @author suzunone<suzunone.elev...
Git-Live/git-live
tests/Tests/GitLive/Command/Hotfix/HotfixPushCommandTest.php
PHP
mit
4,654
package com.jinwen.thread.multithread.synchronize.example2; public class HasSelfPrivateNum { private int num = 0; synchronized public void addI(String username) { try { if (username.equals("a")) { num = 100; System.out.println("a set over"); ...
jinchen92/JavaBasePractice
src/com/jinwen/thread/multithread/synchronize/example2/HasSelfPrivateNum.java
Java
mit
611
package app_error import "log" func Fatal(err error) { if err != nil { log.Fatal(err) } }
Jurevic/FaceGrinder
pkg/api/v1/helper/app_error/app_error.go
GO
mit
96