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 logging
from copy import copy
from six import iteritems, reraise
import sys
from .base import Singleton
from .utils import APP_DIR, rel, merge
class BaseConfigMixin(dict):
def __setitem__(self, key, value):
self.__dict__[key.lower()] = value
def __getitem__(self, key):
return self.__d... | translationexchange/tml-python | tml/config.py | Python | mit | 10,511 |
<?php
namespace Mleczek\CBuilder\Tests\Package;
use DI\Container;
use DI\ContainerBuilder;
use Mleczek\CBuilder\Constraint\Parser;
use Mleczek\CBuilder\Environment\Config;
use Mleczek\CBuilder\Package\Exceptions\InvalidTypeException;
use Mleczek\CBuilder\Package\Exceptions\UnrecognizedArchitectureException;
use Mlecz... | mleczek/cbuilder | tests/Package/PackageTest.php | PHP | mit | 14,684 |
package securbank.authentication;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;... | Nikh13/securbank | src/main/java/securbank/authentication/CustomAuthenticationSuccessHandler.java | Java | mit | 1,123 |
from ..osid import records as osid_records
class HierarchyRecord(osid_records.OsidRecord):
"""A record for a ``Hierarchy``.
The methods specified by the record type are available through the
underlying object.
"""
class HierarchyQueryRecord(osid_records.OsidRecord):
"""A record for a ``Hier... | birdland/dlkit-doc | dlkit/hierarchy/records.py | Python | mit | 848 |
/**
* @ignore
* Add indent and outdent command identifier for KISSY Editor.
* @author yiminghe@gmail.com
*/
/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
KISSY.add(function (S, require) {
var Editor = require('... | tedyhy/SCI | kissy-1.4.9/src/editor/sub-modules/plugin/dent-cmd/src/dent-cmd.js | JavaScript | mit | 10,700 |
package main
import (
"database/sql"
"fmt"
"github.com/jrallison/go-workers"
"github.com/lib/pq"
"log"
"time"
)
func WorkerExtractPgerror(err error) (*string, error) {
pgerr, ok := err.(pq.PGError)
if ok {
msg := pgerr.Get('M')
return &msg, nil
}
if err.Error() == "driver: bad connection" {
msg := "co... | mmcgrana/pgpin | worker.go | GO | mit | 3,817 |
require 'test_helper'
class GiftRegistryTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| robertleelittleiii/silverweb_bridereg | test/models/gift_registry_test.rb | Ruby | mit | 126 |
/************************************************************************************
Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.3 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
which is pr... | michel-zimmer/smartpad-hoverboard | Assets/OVR/Scripts/OVRManager.cs | C# | mit | 20,634 |
"""
homeassistant.components.device_tracker.tplink
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Device tracker platform that supports scanning a TP-Link router for device
presence.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/device_tracker.tplink.ht... | pottzer/home-assistant | homeassistant/components/device_tracker/tplink.py | Python | mit | 9,226 |
require 'rails_helper'
feature 'User can visit the home page' do
scenario 'and see upcoming events on the home page' do
events = create_list(:event_with_registrations, 2)
visit root_path
expect(page).to have_content('Upcoming events')
expect(page).to have_content(events.first.title)
expect(page)... | stephen144/ypreg | spec/features/user_visits_site_spec.rb | Ruby | mit | 1,800 |
// # Settings Test
// Test the various tabs on the settings page
/*globals CasperTest, casper */
// These classes relate to elements which only appear when a given tab is loaded.
// These are used to check that a switch to a tab is complete, or that we are on the right tab.
var generalTabDetector = '.settings-content... | Unitech/Ghost | core/test/functional/client/settings_test.js | JavaScript | mit | 16,580 |
// Modify the previous program to skip duplicates:
// n=4, k=2 → (1 2), (1 3), (1 4), (2 3), (2 4), (3 4)
namespace CombinationsWithouthDuplicates
{
using System;
public class CombinationsWithouthDuplicates
{
public static void Main()
{
Console.WriteLine("Enter n:");
... | marianamn/Telerik-Academy-Activities | Homeworks/15. DSA/02. Recursion/CombinationsWithouthDuplicates/CombinationsWithouthDuplicates.cs | C# | mit | 1,140 |
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace Org.OpenAPITools.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class ResponseTimeMonitorData {
/// <summary>
/// Gets or... | cliffano/swaggy-jenkins | clients/csharp-dotnet2/generated/src/main/CsharpDotNet2/Org/OpenAPITools/Model/ResponseTimeMonitorData.cs | C# | mit | 1,733 |
#!/usr/bin/env python3
# Copyright 2014 BitPay Inc.
# Copyright 2016-2019 The Bitcoin Core developers
# Copyright 2015-2019 The Auroracoin developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test framework for auroracoin ... | aurarad/auroracoin | test/util/auroracoin-util-test.py | Python | mit | 6,651 |
/*
* Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com>
*/
package play;
import play.core.j.JavaModeConverter$;
/**
* High-level API to access Play global features.
*/
public class Play {
/**
* Returns the currently running application.
*/
public static Application application() {
... | jyotikamboj/container | pf-framework/src/play/src/main/java/play/Play.java | Java | mit | 1,294 |
/**
* Copyright (c) LambdaCraft Modding Team, 2013
* 版权许可:LambdaCraft 制作小组, 2013.
* http://lambdacraft.half-life.cn/
*
* LambdaCraft is open-source. It is distributed under the terms of the
* LambdaCraft Open Source License. It grants rights to read, modify, compile
* or run the code. It does *NOT* grant the r... | LambdaInnovation/LambdaCraft-Legacy | src/main/java/cn/lambdacraft/crafting/block/generator/TileGeneratorBase.java | Java | mit | 2,075 |
<?php
// NOTE for template develoepers: SQL and most other databases are either latin characters only, or Unicode for their
// identifiers, so you don't need to worry about encoding issues for identifiers.
?>
// this function is required for objects that implement the
// IteratorAggregate interface
publi... | spekary/qcubed-orm | codegen/templates/db_orm/class_gen/json_methods.tpl.php | PHP | mit | 5,513 |
// Utility namespace for InPhO JavaScript. Contains dynamic URL builder.
var inpho = inpho || {};
inpho.util = inpho.util || {};
/* inpho.util.url
* Takes a path for the inpho rest API and builds an absolute URL based on the
* current host and protocol.
*
* // running on http://inphodev.cogs.indiana.edu:8080
* >... | iSumitG/topic-explorer | www/lib/inpho/util.js | JavaScript | mit | 1,940 |
namespace TestingPerformance
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
public partial class Address
{
public Address()
{
Emp... | TsvetanKT/TelerikHomeworks | Databases/09.EntityFrameworkPerformance/TestingPerformance/TelerikAcademyEntities/Address.cs | C# | mit | 672 |
'use strict';
var EMBED_WIDTH = 600;
var EMBED_HEIGHT = 300;
var mustache = require('mustache'),
url = require('url');
var cache = require('./cache');
exports.getEmbedCode = function getEmbedCode(_, request, response) {
var params = url.parse(request.url, true).query;
if (!params.url) {
respond('', 400, response... | SockDrawer/SockSite | oembed.js | JavaScript | mit | 1,976 |
module SnakeCase
VERSION = "0.0.1"
end
| FluffyJack/snake_case | lib/snake_case/version.rb | Ruby | mit | 41 |
// 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... | ChristCoin7/christcoin | src/bitcoinrpc.cpp | C++ | mit | 48,589 |
//https://gist.github.com/Ninputer/2227226 https://gist.github.com/chenshuo/2232954
//ÇëʵÏÖÏÂÃæµÄº¯Êý£¬ÊäÈë²ÎÊýbaseStrÊÇÒ»¸ö£¨¿ÉÒÔ¸ü¸ÄµÄ£©×Ö·û´®£¬Ç뽫ÆäÖÐËùÓÐÁ¬Ðø³öÏֵĶà¸ö¿Õ¸ñ¶¼Ìæ»»³ÉÒ»¸ö¿Õ¸ñ£¬µ¥Ò»¿Õ¸ñÐè±£Áô¡£
//ÇëÖ±½ÓʹÓÃbaseStrµÄ¿Õ¼ä£¬ÈçÐ迪±ÙеĴ洢¿Õ¼ä£¬²»Äܳ¬¹ýo(N)£¨×¢ÒâÊÇСo£¬NÊÇ×Ö·û´®µÄ³¤¶È£©¡£·µ»ØÖµÊÇÌæ»»ºó... | lizhenghn123/myAlgorithmStudy | trim_continuous_space/trim_continuous_space.cpp | C++ | mit | 1,862 |
'use strict';
angular.module('myContacts.contacts', ['ngRoute', 'firebase'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/contacts', {
templateUrl: 'contacts/contacts.html',
controller: 'ContactsController'
});
}])
.controller('ContactsController', ['$scope', '$firebaseArra... | joryschmidt/angular-contacts-app | app/contacts/contacts.js | JavaScript | mit | 4,767 |
import { omit, parse } from 'search-params'
import { MatchOptions, MatchResponse, RouteNode } from './RouteNode'
import { TestMatch } from 'path-parser'
const getPath = (path: string): string => path.split('?')[0]
const getSearch = (path: string): string => path.split('?')[1] || ''
const matchChildren = (
nodes: R... | troch/route-node | src/matchChildren.ts | TypeScript | mit | 3,921 |
from ..models import Job
import datetime
class JobContainer():
def __init__(self):
self.organization = None
self.title = None
self.division = None
self.date_posted = None
self.date_closing = None
self.date_collected = None
self.url_detail = None
sel... | rgscherf/gainful2 | parsing/parsinglib/jobcontainer.py | Python | mit | 2,667 |
var expect = require('chai').expect;
// NOTE: we run tests in chrome only, because we mainly test server API functionality.
describe('[Raw API] beforeEach/afterEach hooks', function () {
it('Should run hooks for all tests', function () {
var test1Err = null;
return runTests('./testcafe-fixtures/ru... | helen-dikareva/testcafe-phoenix | test/functional/fixtures/api/raw/before-after-each-hooks/test.js | JavaScript | mit | 2,401 |
import { computed, reactive, toRefs } from '@vue/composition-api'
import { Frame as GameSetting } from '@xmcl/gamesetting'
import { useBusy, useSemaphore } from './useSemaphore'
import { useService, useServiceOnly } from './useService'
import { useStore } from './useStore'
import { useCurrentUser } from './useUser'
imp... | InfinityStudio/ILauncher | src/renderer/hooks/useInstance.ts | TypeScript | mit | 10,224 |
require 'spec_helper'
describe Urmum do
it 'should have a version number' do
Urmum::VERSION.should_not be_nil
end
end
| dgmstuart/urmum | spec/urmum_spec.rb | Ruby | mit | 127 |
<?php
namespace App\Http\Controllers;
class PageController extends Controller
{
public function index($request, $response)
{
return $this->twigView->render($response, "auth/index.twig");
}
}
| Rodz3rd2/my-framework | app/Http/Controllers/PageController.php | PHP | mit | 198 |
# encoding: utf-8
require 'spec_helper'
RSpec.describe Github::Client::Gists, '#get' do
let(:gist_id) { 1 }
before {
stub_get(request_path).to_return(body: body, status: status,
headers: {content_type: "application/json; charset=utf-8"})
}
after { reset_authentication_for(subject) }
context "re... | samphilipd/github | spec/github/client/gists/get_spec.rb | Ruby | mit | 1,482 |
/**
* @title Check last password reset
* @overview Check the last time that a user changed his or her account password.
* @gallery true
* @category access control
*
* This rule will check the last time that a user changed his or her account password.
*
*/
function checkLastPasswordReset(user, context, callback... | auth0/rules | src/rules/check-last-password-reset.js | JavaScript | mit | 675 |
import { router } from 'router';
$('body').ready(function() {
router.start();
}); | fasttakerbg/Final-Project | public/scripts/main.js | JavaScript | mit | 87 |
using System;
using A4CoreBlog.Data.Services.Contracts;
using A4CoreBlog.Data.UnitOfWork;
using AutoMapper;
using A4CoreBlog.Data.Models;
using System.Linq;
using AutoMapper.QueryableExtensions;
namespace A4CoreBlog.Data.Services.Implementations
{
public class SystemImageService : ISystemImageService
{
... | yasenm/a4-netcore | A4CoreBlog/A4CoreBlog.Data.Services/Implementations/SystemImageService.cs | C# | mit | 1,409 |
/**
* Simple script to detect misc CSS @support's.
* If not... Redirect to: /upgrade
*
* To minify (example):
* uglifyjs detect_support.js -o detect_support.min.js -c -m
*/
(function detectSupport() {
var upradeURL = '/upgrade',
/**
* List your CSS @support tests.
* On the upgr... | iEFdev/browser-upgrade-page | upgrade/js/detect_support.js | JavaScript | mit | 1,304 |
package net.airvantage.sched.app;
import java.util.Properties;
import java.util.concurrent.TimeUnit;
import javax.sql.DataSource;
import org.apache.commons.dbcp2.ConnectionFactory;
import org.apache.commons.dbcp2.DriverManagerConnectionFactory;
import org.apache.commons.dbcp2.PoolableConnection;
import org.apache.co... | AirVantage/av-sched | src/main/java/net/airvantage/sched/app/ServiceLocator.java | Java | mit | 12,317 |
module foo {
exports foo;
} | opengl-8080/Samples | java/java9/jigsaw/src/main/java/module-info.java | Java | mit | 33 |
package org.knowm.xchange.btcchina.dto.trade.response;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
import java.math.BigDecimal;
import org.junit.Test;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.knowm.xchange.btcchina.dto.trade.BTCChinaMarketDepthOrder;
public class ... | mmithril/XChange | xchange-btcchina/src/test/java/org/knowm/xchange/btcchina/dto/trade/response/BTCChinaGetMarketDepthResponseTest.java | Java | mit | 1,445 |
package com.cezarykluczynski.stapi.auth.common.factory;
import com.cezarykluczynski.stapi.model.common.dto.RequestSortClauseDTO;
import com.cezarykluczynski.stapi.model.common.dto.RequestSortDTO;
import com.cezarykluczynski.stapi.model.common.dto.enums.RequestSortDirectionDTO;
import com.google.common.collect.Lists;
i... | cezarykluczynski/stapi | auth/src/main/java/com/cezarykluczynski/stapi/auth/common/factory/RequestSortDTOFactory.java | Java | mit | 784 |
package com.bah.app;
import com.bah.ml.classifiers.Perceptron;
import org.apache.commons.cli.*;
import org.apache.log4j.BasicConfigurator;
import java.util.Arrays;
import java.util.logging.Level;
import java.util.logging.Logger;
public class perceptron {
private static final Logger log = Logger.getLogger(percept... | jaybkun/machine-learning-library | src/main/java/com/bah/app/perceptron.java | Java | mit | 3,562 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace ParcelTracker
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
... | Vyacheslav-1991/parceltracker | ParcelTracker/Program.cs | C# | mit | 487 |
using System.Collections.Generic;
namespace TemplateApp.Data.Models
{
public class Subsidiary : EntityBase
{
//
// Constructor
public Subsidiary()
{
Locations = new HashSet<Location>();
Subsidiaries = new HashSet<Subsidiary>();
Divisions = ne... | panchaldineshb/Sarabi | TemplateApp/TemplateApp.Data/Models/Subsidiary.cs | C# | mit | 843 |
'use strict';
describe('Controller: SitenewCtrl', function () {
// load the controller's module
beforeEach(module('uiApp'));
var SitenewCtrl,
scope;
// Initialize the controller and a mock scope
beforeEach(inject(function ($controller, $rootScope) {
scope = $rootScope.$new();
SitenewCtrl = $co... | Ecotrust/floodplain-restoration | ui/test/spec/controllers/sitenew.js | JavaScript | mit | 513 |
import React, {Component} from 'react';
import LanguageSwitcher from './LanguageSwitcher';
import Navigation from './Navigation';
import $ from 'jquery';
const Translate = require('react-i18nify').Translate;
export default class Menu extends Component{
constructor(){
super();
let self = this;
this.sta... | lhew/manguezal-test | src/components/Menu.js | JavaScript | mit | 2,593 |
<?php if (!defined('PRETZEL_EXCEPTION_SERVER')) exit('No Pretzel No (Server) Exception');
class Pretzel_Exception_Server_IllegalValueForType extends Pretzel_Exception_Server
{
} | smotyn/Pretzel | src/Pretzel/Exception/Server/IllegalValueForType.php | PHP | mit | 180 |
define(
['polygonjs/math/Color'],
function (Color) {
"use strict";
var Surface = function (opts) {
opts = opts || {};
this.width = opts.width || 640;
this.height = opts.height || 480;
this.cx = this.width / 2;
this.cy = this.height / ... | WebSeed/PolygonJS | polygonjs/surfaces/CanvasSurface.js | JavaScript | mit | 3,361 |
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... | g-yonchev/TelerikAcademy | Homeworks/C# 1/02.PrimitiveDataTypesHW/05. BooleanVariable/Properties/AssemblyInfo.cs | C# | mit | 1,414 |
import java.util.*;
public class PowerSet
{
public static Set<Set<Integer>> powerset(Set<Integer> set) {
Set<Set<Integer>> ps = new HashSet<Set<Integer>>();
if(set.isEmpty()) {
Set<Integer> emptySet = new HashSet<Integer>();
ps.add(emptySet);
return ps;
}
List<Integer> list = new Ar... | leejay-schmidt/java-libs | FunJavaPrograms/PowerSet.java | Java | mit | 1,040 |
// © 2015 skwas
using System;
using System.IO;
using System.Linq;
using System.Reflection;
using ColossalFramework.Plugins;
using ColossalFramework.Steamworks;
using ICities;
namespace skwas.CitiesSkylines
{
/// <summary>
/// Base class for mod implementations. Takes mod info from the type and assembly (AssemblyIn... | skwasjer/CSModBase | ModBase.cs | C# | mit | 4,864 |
package nona.gameengine2d.maths;
public class Vector4f extends Vector {
public Vector4f() {
super(4);
}
public Vector4f(float x, float y, float z, float w) {
super(x, y, z, w);
}
public Vector4f(float[] v) {
super(v);
}
public Vector4f(Vector4f r) {
super(r);
}
@Override
public Vector norma... | LeonardVollmann/GameEngine2D | src/nona/gameengine2d/maths/Vector4f.java | Java | mit | 421 |
<?php
namespace Acme\MenusBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class DefaultControllerTest extends WebTestCase
{
public function testIndex()
{
$client = static::createClient();
$crawler = $client->request('GET', '/hello/Fabien');
$this->asser... | oshanrube/iva | src/Acme/MenusBundle/Tests/Controller/DefaultControllerTest.php | PHP | mit | 399 |
'use strict';
var handler = {
fragments: null,
tab: null,
tabId: 0,
windowId: 0,
captureCmd: '',
initContextMenu: function () {},
queryActiveTab: function (callback) {
chrome.tabs.query({
active: true,
lastFocusedWindow: true
}, function (tabs) {
var tab = tabs && tabs[0] ... | bubkoo/crx-element-capture | src/js/background.js | JavaScript | mit | 4,787 |
<?php return array(
'plugin.connectedSite.ConnectedServices'=>'Services connectés',
);
| christophehurpeau/Springbok-Framework-Plugins | connectedSite/config/lang.fr.php | PHP | mit | 89 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ASPPatterns.Chap5.DependencyInjection.Model
{
public class Product
{
public void AdjustPriceWith(IProductDiscountStrategy discount)
{
}
}
}
| liqipeng/helloGithub | Book-Code/ASP.NET Design Pattern/ASPPatternsc05/ASPPatterns.Chap5.DependencyInjection/ASPPatterns.Chap5.DependencyInjection.Model/Product.cs | C# | mit | 289 |
class Tagging
include DataMapper::Resource
property :id, Serial
property :tag_id, Integer, :nullable => false
property :taggable_id, Integer, :nullable => false
property :taggable_type, String, :nullable => false
property :tag_context, String, :nullable => false
belongs_to :tag
... | bterlson/dm-more | dm-tags/lib/dm-tags/tagging.rb | Ruby | mit | 428 |
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("_0... | todorm85/TelerikAcademy | Courses/Programming/C# Part 2/08. Text Files/01. Odd lines/Properties/AssemblyInfo.cs | C# | mit | 1,402 |
package com.vk.api.sdk.objects.users;
import com.google.gson.annotations.SerializedName;
import java.util.Objects;
/**
* UserXtrCounters object
*/
public class UserXtrCounters extends UserFull {
@SerializedName("counters")
private UserCounters counters;
public UserCounters getCounters() {
retu... | kokorin/vk-java-sdk | sdk/src/main/java/com/vk/api/sdk/objects/users/UserXtrCounters.java | Java | mit | 1,010 |
declare module "electron-builder-http/out/CancellationToken" {
/// <reference types="node" />
import { EventEmitter } from "events"
export class CancellationToken extends EventEmitter {
private parentCancelHandler
private _cancelled
readonly cancelled: boolean
private _parent
parent: Cancella... | eyang414/superFriend | electronApp/node_modules/electron-builder-http/out/electron-builder-http.d.ts | TypeScript | mit | 11,265 |
<?php
/* :menu:show.html.twig */
class __TwigTemplate_c6c87740e1e23e28cd7ec08186f946f29f7e280dd27072f88536dcc022e66357 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
// line 1
$this->parent = $this->loadTemplate("base.html.twig",... | mwveliz/sitio | app/prod/cache/twig/b4/b462afc70965e9a17df2a81b97874458452b1f180b2dd42f516196f0e7c44238.php | PHP | mit | 9,504 |
<?php
declare(strict_types=1);
/**
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files m... | dakota/cakephp | src/View/Widget/MultiCheckboxWidget.php | PHP | mit | 9,482 |
package de.henningBrinkmann.mybatisSample.mapper;
import org.apache.ibatis.annotations.Select;
import de.henningBrinkmann.mybatisSample.xmltv.Description;
public interface DescriptionMapper {
void insertDescription(Description description);
@Select("SELECT * FROM mybatissample.description WHERE `value` = #{value... | hebrinkmann/mybatis | src/main/java/de/henningBrinkmann/mybatisSample/mapper/DescriptionMapper.java | Java | mit | 378 |
package com.chernowii.hero4;
import android.app.Activity;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.... | KonradIT/goprohero | GoProHERO4Controller/app/src/main/java/com/chernowii/hero4/OCVideo.java | Java | mit | 4,726 |
const isAsync = (caller) => caller && caller.ASYNC;
module.exports = api => {
const ASYNC = api.caller(isAsync);
return {
babelrc: false,
plugins: [
['./babel-plugin-$-identifiers-and-imports', { ASYNC }],
['macros', { async: { ASYNC } }],
// use dead code elimination to clean up if(fals... | sithmel/iter-tools | generate/babel-generate.config.js | JavaScript | mit | 456 |
import unittest
from tweet_dns.sources.source_base import SourceBase
class SourceBaseTest(unittest.TestCase):
def test_regex(self):
text = """
1.1.1.1
192.168.0.1
127.0.0.1
255.255.255.255
256.
1.1..1
1.200.3.4
... | AstromechZA/TweetDNS | tests/sources/source_base_test.py | Python | mit | 579 |
#!/usr/bin/env python3
# Copyright (c) 2017-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test that the wallet resends transactions periodically."""
from collections import defaultdict
import t... | afk11/bitcoin | test/functional/wallet_resendwallettransactions.py | Python | mit | 3,194 |
using System;
using System.Linq;
using System.Threading.Tasks;
using Baseline;
using Marten.Testing.Events;
using Marten.Testing.Events.Projections;
using Marten.Testing.Harness;
using Shouldly;
namespace Marten.Testing.Examples
{
public class event_store_quickstart
{
public void capture_events()
... | JasperFx/Marten | src/Marten.Testing/Examples/event_store_quickstart.cs | C# | mit | 7,180 |
import React from 'react';
import PropTypes from 'prop-types';
import Post from './Post';
const Posts = ({ posts }) => (
<div>
{posts
.filter(post => post.frontmatter.title.length > 0)
.map((post, index) => <Post key={index} post={post} />)}
</div>
);
Posts.propTypes = {
posts: PropTypes.arrayO... | kbariotis/kostasbariotis.com | src/components/blog/Posts.js | JavaScript | mit | 367 |
require 'bio-ucsc'
describe "Bio::Ucsc::Hg18::BurgeRnaSeqGemMapperAlignBreastAllRawSignal" do
describe "#find_by_interval" do
context "given range chr1:1-10,000" do
it 'returns a record (r.chrom == "chr1")' do
Bio::Ucsc::Hg18::DBConnection.default
Bio::Ucsc::Hg18::DBConnection.connect
... | misshie/bioruby-ucsc-api | spec/hg18/burgernaseqgemmapperalignbreastallrawsignal_spec.rb | Ruby | mit | 527 |
/**
The MIT License (MIT) * Copyright (c) 2016 铭飞科技
* 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, m... | shentt3214/mcms | src/main/java/com/mingsoft/people/dao/IPeopleUserDao.java | Java | mit | 1,907 |
from BeautifulSoup import BeautifulSoup as b
from collections import Counter
import urllib2, numpy
import matplotlib.pyplot as plt
response = urllib2.urlopen('http://en.wikipedia.org/wiki/List_of_Question_Time_episodes')
html = response.read()
soup = b(html)
people = []
tables = soup.findAll('table','wikitable')[2:... | dunkenj/DimbleData | QTstats.py | Python | mit | 1,981 |
'use strict';
const Promise = require('bluebird');
const { Transform } = require('readable-stream');
const vfs = require('vinyl-fs');
module.exports = function assets(src, dest, options = {}) {
const { parser, env } = options;
Reflect.deleteProperty(options, 'parser');
Reflect.deleteProperty(options, 'env');
... | oddbird/sassdoc-theme-herman | lib/utils/assets.js | JavaScript | mit | 801 |
// 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 <boost/assign/list_of.hpp> // for 'map_list_of()'
#include <boost/foreach.hpp>
#include "checkpoints.h"
#include "d... | Skryptex/Nexus-Proof-of-Stake-Coin | src/checkpoints.cpp | C++ | mit | 18,523 |
package berkeleydb
/*
#cgo LDFLAGS: -ldb
#include <db.h>
#include "bdb.h"
*/
import "C"
type Environment struct {
environ *C.DB_ENV
}
func NewEnvironment() (*Environment, error) {
var env *C.DB_ENV
err := C.db_env_create(&env, 0)
if err > 0 {
return nil, createError(err)
}
return &Environment{env}, nil
}
f... | technosophos/perkdb | berkeleydb/environment.go | GO | mit | 633 |
<div class="form-group has-warning">
{!! Form::label(
App\Import\Flap\POS_Member\Import::OPTIONS_CATEGORY,
'*任務名稱',
['class' => 'control-label'])
!!}
{!! Form::text(
'name',
$task->name,
['id'=> 'name', 'class' => 'form-control', 'required' => true, 'plac... | jocoonopa/lubri | resources/views/flap/posmember/import_task/_formAct.blade.php | PHP | mit | 3,704 |
<?php
namespace Vibs\EvesymBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Industryactivityproducts
*
* @ORM\Table(name="industryActivityProducts", indexes={@ORM\Index(name="ix_industryActivityProducts_typeID", columns={"typeID"}), @ORM\Index(name="ix_industryActivityProducts_productTypeID", columns={"produ... | vladibalan/evesym | Entity/Industryactivityproducts.php | PHP | mit | 3,604 |
class Admin::ToursController < Admin::ApplicationController
before_action :set_tour, only: [:show, :edit, :update, :destroy]
def index
@tours = Tour.includes(:city).newest.page(params[:page])
end
def show;end
def new
@tour = Tour.new
end
def edit
end
def create
@tour = Tour.new(tour_p... | mpakus/excurso | app/controllers/admin/tours_controller.rb | Ruby | mit | 1,106 |
<?php
/**
* This file is part of Laravel Desktop Notifier.
*
* (c) Nuno Maduro <enunomaduro@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace NunoMaduro\LaravelDesktopNotifier;
use Joli\JoliNotif\Notificatio... | nunomaduro/laravel-desktop-notifier | src/Notification.php | PHP | mit | 620 |
'use strict';
function injectJS(src, cb) {
var script = document.createElement('script');
script.setAttribute('type', 'text/javascript');
script.onreadystatechange = script.onload = function () {
var readyState = script.readyState;
if (!readyState || readyState == 'loaded' || readyState == 'complete' || readySt... | elpadi/js-library | dist/utils.js | JavaScript | mit | 496 |
/**
* Created by desen on 2017/7/24.
*/
function isArray(value) {
if (typeof Array.isArray === "function") {
return Array.isArray(value);
} else {
return Object.prototype.toString.call(value) === "[object Array]";
}
}
// 进行虚拟DOm的类型的判断
function isVtext(vNode) {
return true;
}
| enmeen/2017studyPlan | someDemo/虚拟DOM实现/util.js | JavaScript | mit | 307 |
package mankind;
public class Worker extends Human {
Double weekSalary;
Double workHoursPerDay;
public Worker(String firstName, String lastName, Double weekSalary, Double workHoursPerDay) {
super(firstName, lastName);
this.weekSalary = weekSalary;
this.workHoursPerDay = workHoursPerDay;
}
public Double ... | akkirilov/SoftUniProject | 04_DB Frameworks_Hibernate+Spring Data/03_OOP Principles EX/src/mankind/Worker.java | Java | mit | 539 |
# -*- coding: utf-8 -*-
"""
Utils has nothing to do with models and views.
"""
from datetime import datetime
from flask import current_app
def get_current_time():
return datetime.utcnow()
def format_date(value, format='%Y-%m-%d %H:%M:%S'):
return value.strftime(format)
def get_resource_as_string(name... | vovantics/flask-bluebone | app/utils.py | Python | mit | 427 |
# Copyright (c) 2016 kamyu. All rights reserved.
#
# Google Code Jam 2016 Round 1A - Problem B. Rank and File
# https://code.google.com/codejam/contest/4304486/dashboard#s=p1
#
# Time: O(N^2)
# Space: O(N^2), at most N^2 numbers in the Counter
#
from collections import Counter
def rank_and_file():
N = input()
... | kamyu104/GoogleCodeJam-2016 | Round 1A/rank-and-file.py | Python | mit | 774 |
package workspace;
import java.util.Collection;
import javax.swing.JComponent;
import renderable.RenderableBlock;
/** WorkspaceWidgets are components within the workspace other than blocks that
* include bars, buttons, factory drawers, and single instance widgets such as
* the MiniMap and the TrashCan.
*/
pu... | boubre/BayouBot | Workspace/src/workspace/WorkspaceWidget.java | Java | mit | 3,255 |
package com.knesek.springmockedtests.service.impl;
import com.knesek.springmockedtests.TestAppConfig;
import com.knesek.springmockedtests.com.knesek.springmockedtests.util.MockedBeans;
import com.knesek.springmockedtests.model.User;
import com.knesek.springmockedtests.repository.UserRepository;
import com.knesek.sprin... | knes1/springmockedtests | src/test/java/com/knesek/springmockedtests/service/impl/UserServiceImplIntegrationTest.java | Java | mit | 3,082 |
import babel from 'rollup-plugin-babel';
export default {
plugins: [babel()]
};
| alexeyraspopov/message-script | rollup.config.js | JavaScript | mit | 83 |
import * as _ from 'lodash';
import * as vscode from 'vscode';
import {Mode, ModeName} from './mode';
import NormalMode from './modeNormal';
import InsertMode from './modeInsert';
import VisualMode from './modeVisual';
import Configuration from '../configuration';
type ModeChangedHandler = (mode: Mode) => void;
expo... | AndersenJ/Vim | src/mode/modeHandler.ts | TypeScript | mit | 2,801 |
<?
/**
*/
require_once(dirname(__FILE__).'/DbManager_MySQL.php');
/**
* @package SmartDatabase
* @ignore
*/
class DbManager_Tests extends DbManager_MySQL{
public function TestAll(){
$passed = 0; $failed = 0;
$result = $this->TestWhereClause1(); if($result['passed']) $passed++; else $failed++;
$result = $th... | cirkuitnet/PHP-SmartDB | DbManagers/DbManager_Tests.php | PHP | mit | 16,042 |
package ru.VirtaMarketAnalyzer.parser;
import org.junit.jupiter.api.Test;
import ru.VirtaMarketAnalyzer.data.Country;
import ru.VirtaMarketAnalyzer.data.Region;
import ru.VirtaMarketAnalyzer.main.Wizard;
import java.io.IOException;
import java.util.List;
import static org.junit.jupiter.api.Assertions.*;
class CityI... | cobr123/VirtaMarketAnalyzer | src/test/java/ru/VirtaMarketAnalyzer/parser/CityInitParserTest.java | Java | mit | 708 |
var lang = navigator.language;
exports.set_lang=function(_lang,msgs){
lang = _lang || navigator.language;
if(lang.indexOf('en')===0){
lang = 'en';
}else if(lang.indexOf('es')===0){
lang = 'es';
}else{
lang = 'en';
}
var nodes = document.querySelectorAll('[msg]');
for(var i = 0; i < nodes.leng... | Technogi/website | src/scripts/msg.js | JavaScript | mit | 1,145 |
<?php
include("session.php");
$debug=$_GET['d'];
?>
<!DOCTYPE html>
<!-------------------------------------------- LICENSE (MIT) -------------------------------------------------
Copyright (c) 2015 Conor Walsh
Website: http://www.conorwalsh.net
GitHu... | conorwalsh/SEM | Web/nonadmin.php | PHP | mit | 6,313 |
'use strict';
const postcodeApi = require('../index.js');
const sinon = require('sinon');
const chai = require('chai');
const expect = chai.expect;
const sinonChai = require('sinon-chai');
const requestApi = require('../lib/requestApi.js');
before(() => {
chai.use(sinonChai);
});
var sandbox;
beforeEach(() => {
s... | joostdebruijn/node-postcode-nl | test/helpers.followNext.js | JavaScript | mit | 6,658 |
<?php
/**
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyr... | LCabreroG/opensource | vendor/cakephp/cakephp/src/ORM/Behavior/CounterCacheBehavior.php | PHP | mit | 8,607 |
import test from 'ava';
import { actionTest } from 'redux-ava';
import {
ADD_POST_REQUEST,
DELETE_POST_REQUEST,
} from '../constants';
import {
addPostRequest,
deletePostRequest,
} from '../PostActions';
const post = { name: 'Prashant', title: 'Hello Mern', cuid: 'f34gb2bh24b24b2', content: "All cats meow 'm... | Skrpk/mern-sagas | client/modules/Post/__tests__/PostActions.spec.js | JavaScript | mit | 657 |
<?php
class User_Form_Validate_PasswordMatch extends Zend_Validate_Abstract {
const NOT_MATCH = 'notMatch';
protected $_messageTemplates = array(
self::NOT_MATCH => 'Geslo in ponovi geslo se ne ujemata'
);
public function isValid($value, $context = null) {
$value = (string) $value;
$this->_setValue($valu... | freshcrm/fresh-crm | plugins/User/lib/User/Form/Validate/PasswordMatch.php | PHP | mit | 590 |
version https://git-lfs.github.com/spec/v1
oid sha256:ba1edb37cd9663c92048dc14cd2f7e9e81d2ce7364194e973ba9e1238f9198a2
size 878
| yogeshsaroya/new-cdnjs | ajax/libs/extjs/4.2.1/src/lang/Number.min.js | JavaScript | mit | 128 |
package xyz.hotchpotch.jutaime.throwable.matchers;
import java.util.Objects;
import org.hamcrest.Matcher;
import xyz.hotchpotch.jutaime.throwable.Testee;
/**
* スローされた例外を検査する {@code Matcher} です。<br>
* この {@code Matcher} は、スローされた例外そのものの型やメッセージが期待されたものかを検査します。<br>
* 検査対象のオペレーションが正常終了した場合は、不合格と判定します。<br>
... | nmby/jUtaime | project/src/main/java/xyz/hotchpotch/jutaime/throwable/matchers/RaiseExact.java | Java | mit | 3,077 |
/**
* Module dependencies
*/
var uuid = require('uuid');
var utils = require('../utils');
var safeRequire = utils.safeRequire;
var helpers = utils.helpers;
var couchbase = safeRequire('couchbase');
var CouchBase;
exports.initialize = function (schema, callback) {
var db, opts;
opts = schema.settings || {};
... | biggora/caminte | lib/adapters/couchbase.js | JavaScript | mit | 9,831 |
var ObjectExplorer = require('../')
var explorer = document.getElementById('explorer')
var add = document.getElementById('add')
var obj = {
a: 10,
b: true,
reg: /foo/g,
dat: new Date('2013-08-29'),
str: "fooo, bar"
}
obj.self = obj
obj.arr = [obj, obj, obj]
obj.longArr = []
for (i = 0; i < 500; i++) obj.long... | ForbesLindesay/object-explorer | demo/client.js | JavaScript | mit | 503 |
package service
import (
"fmt"
"jarvis/log"
"os/exec"
"strings"
"time"
)
type CommandResult struct {
Text string
Error error
}
type Docker struct{}
func (d Docker) RunShInContainer(command string, timeout time.Duration) (string, error) {
log.Info("Executing command '%v' in container 'ubuntu'", command)
re... | mhoc/jarvis | src/jarvis/service/docker_service.go | GO | mit | 1,804 |
var global = window;
var Stack = require('lib/swing/stack'),
Card = require('lib/swing/card');
global.gajus = global.gajus || {};
global.gajus.Swing = {
Stack: Stack,
Card: Card
};
module.exports = {
Stack: Stack,
Card: Card
};
| unbug/generator-webappstarter | app/templates/app/src/lib/swing/swing.js | JavaScript | mit | 242 |