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 |
|---|---|---|---|---|---|
require 'ox'
module UPS
module Builders
# The {InternationalProductInvoiceBuilder} class builds UPS XML International invoice Produt Objects.
#
# @author Calvin Hughes
# @since 0.9.3
# @attr [String] name The Containing XML Element Name
# @attr [Hash] opts The international invoice product pa... | veeqo/ups-ruby | lib/ups/builders/international_invoice_product_builder.rb | Ruby | mit | 1,835 |
require "octaccord/version"
require "octaccord/errors"
require "octaccord/command"
require "octaccord/formatter"
require "octaccord/iteration"
require "extensions"
module Octaccord
# Your code goes here...
end
| nomlab/octaccord | lib/octaccord.rb | Ruby | mit | 213 |
# Rushy Panchal
"""
See https://bittrex.com/Home/Api
"""
import urllib
import time
import requests
import hmac
import hashlib
BUY_ORDERBOOK = 'buy'
SELL_ORDERBOOK = 'sell'
BOTH_ORDERBOOK = 'both'
PUBLIC_SET = ['getmarkets', 'getcurrencies', 'getticker', 'getmarketsummaries', 'getorderbook',
'getmarkethistor... | panchr/python-bittrex | bittrex/bittrex.py | Python | mit | 9,819 |
package co.edu.eafit.solver.lib.systemsolver.iterative;
public enum ENorm {
One, Infinite, Euclidean
}
| halzate93/solver | lib/src/co/edu/eafit/solver/lib/systemsolver/iterative/ENorm.java | Java | mit | 105 |
/**
* CacheStorage
* ============
*/
var fs = require('fs');
var dropRequireCache = require('../fs/drop-require-cache');
/**
* CacheStorage — хранилище для кэша.
* @name CacheStorage
* @param {String} filename Имя файла, в котором хранится кэш (в формате JSON).
* @constructor
*/
function CacheStorage(filename) ... | 1999/enb | lib/cache/cache-storage.js | JavaScript | mit | 2,450 |
#include "stdafx.h"
#include "FrustumCone.h"
using namespace glm;
FrustumCone::FrustumCone()
{
}
FrustumCone::~FrustumCone()
{
}
void FrustumCone::update(mat4 rotprojmatrix)
{
leftBottom = getDir(vec2(-1, -1), rotprojmatrix);
rightBottom = getDir(vec2(1, -1), rotprojmatrix);
leftTop = getDir(vec2(-1, 1)... | achlubek/vengineandroidndk | app/src/main/cpp/FrustumCone.cpp | C++ | mit | 549 |
import hexchat
import re
__module_name__ = 'BanSearch'
__module_author__ = 'TingPing'
__module_version__ = '2'
__module_description__ = 'Search for bans/quiets matching a user'
banhook = 0
quiethook = 0
endbanhook = 0
endquiethook = 0
banlist = []
quietlist = []
regexescapes = {'[':r'\[', ']':r'\]', '.':r'\.'}
ircr... | TingPing/plugins | HexChat/bansearch.py | Python | mit | 5,101 |
package pathtree
// Items ...
type Items map[string]Items
// Add recursively adds a slice of strings to an Items map and makes parent
// keys as needed.
func (i Items) Add(path []string) {
if len(path) > 0 {
if v, ok := i[path[0]]; ok {
v.Add(path[1:])
} else {
result := make(Items)
result.Add(path[1:])... | marcusolsson/passtray | pathtree/tree.go | GO | mit | 353 |
<?php
namespace DiabloDB\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesCommands;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
abstract class Controller extends BaseController
{
use DispatchesCommands, ValidatesRequests;
}
| taskforcedev/DiabloDB | app/Http/Controllers/Controller.php | PHP | mit | 305 |
/**
* Module dependencies
*/
var mongoose = require('mongoose')
, Schema = mongoose.Schema;
/**
* @constructor
*/
var MongooseStore = function (Session) {
this.Session = Session;
};
/**
* Load data
*/
// for koa-generic-session
MongooseStore.prototype.get = function *(sid, parse) {
try {
var data = y... | rfink/koa-session-mongoose | index.js | JavaScript | mit | 2,003 |
module DynamicModel
module Type
class Date < DynamicModel::Type::Base
end
end
end | rmoliva/dynamic_model | lib/dynamic_model/type/date.rb | Ruby | mit | 93 |
export function mapToCssModules (className, cssModule) {
if (!cssModule) return className
return className.split(' ').map(c => cssModule[c] || c).join(' ')
}
| suranartnc/graphql-blogs-app | .core/app/utils/coreui.js | JavaScript | mit | 162 |
package entity;
import javax.persistence.*;
@Entity
@Table(name = "tag", schema = "streambot", catalog = "")
public class TagEntity {
@Id
@Column(name = "ID", nullable = false)
private long id;
@ManyToOne
@JoinColumn(name = "ServerID", nullable = false)
private GuildEntity guild;
@Basic... | Gyoo/Discord-Streambot | src/main/java/entity/TagEntity.java | Java | mit | 1,494 |
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2014 The FutCoin 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"
#inclu... | Futcoin/Futcoin | src/bitcoinrpc.cpp | C++ | mit | 48,271 |
interface CalculatePositionOptions {
horizontalPosition: string;
verticalPosition: string;
matchTriggerWidth: boolean;
previousHorizontalPosition?: string;
previousVerticalPosition?: string;
renderInPlace: boolean;
dropdown: any;
}
export type CalculatePositionResultStyle = {
top?: number;
left?: numb... | cibernox/ember-basic-dropdown | addon/utils/calculate-position.ts | TypeScript | mit | 9,067 |
<?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\Metadata\Resource\Factory;
use A... | api-platform/core | src/Metadata/Resource/Factory/ResourceNameCollectionFactoryInterface.php | PHP | mit | 652 |
using System;
using System.Collections.Generic;
using System.Reflection;
using Xunit.Sdk;
namespace Oryza.TestBase.Xunit.Extensions
{
public class ClassData : DataAttribute
{
private readonly Type _type;
public ClassData(Type type)
{
if (!typeof (IEnumerable<object[]>).IsA... | sonbua/Oryza | src/Oryza.TestBase/Xunit.Extensions/ClassData.cs | C# | mit | 682 |
__inline('ajax.js');
__inline('amd.js');
__inline('appendToHead.js');
__inline('bind.js');
__inline('copyProperties.js');
__inline('counter.js');
__inline('derive.js');
__inline('each.js');
__inline('hasOwnProperty.js');
__inline('inArray.js');
__inline('isArray.js');
__inline('isEmpty.js');
__inline('isFunction.js');
... | hao123-fe/her-runtime | src/javascript/util/util.js | JavaScript | mit | 459 |
package dsl
import (
"fmt"
"github.com/emicklei/melrose/core"
"github.com/emicklei/melrose/notify"
)
// At is called from expr after patching []. One-based
func (v variable) At(index int) interface{} {
m, ok := v.store.Get(v.Name)
if !ok {
return nil
}
if intArray, ok := m.([]int); ok {
if index < 1 || i... | emicklei/melrose | dsl/var_delegates.go | GO | mit | 2,696 |
'use strict';
var _ = require('lodash');
var fs = require('fs');
var path = require('path');
var util = require('util');
var async = require('./async');
/**
* Read a directory recursively.
* The directory will be read depth-first and will return paths relative
* to the base directory. It will only result in file... | wbyoung/jsi-blowtorch | lib/fs-extras.js | JavaScript | mit | 4,456 |
class Bitcask
require 'zlib'
require 'stringio'
$LOAD_PATH << File.expand_path(File.dirname(__FILE__))
require 'bitcask/hint_file'
require 'bitcask/data_file'
require 'bitcask/keydir'
require 'bitcask/errors'
require 'bitcask/version'
include Enumerable
TOMBSTONE = "bitcask_tombstone"
# Opens... | aphyr/bitcask-ruby | lib/bitcask.rb | Ruby | mit | 3,087 |
'use strict'
/*
MIT License
Copyright (c) 2016 Ilya Shaisultanov
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, ... | diversario/node-ssdp | lib/index.js | JavaScript | mit | 13,902 |
<?php
namespace App;
use App\Models\User;
use RuntimeException;
class UserSettingForm {
private string $setting_name;
private ?User $current_user;
private bool $can_save;
public const INPUT_MAP = [
'cg_defaultguide' => [
'type' => 'select',
'options' => [
'desc' => 'Choose your prefe... | ponydevs/MLPVC-RR | app/UserSettingForm.php | PHP | mit | 7,139 |
using System.Web.Mvc;
namespace SOURCE.BackOffice.Web.Controllers.Modularity
{
public class BaseController : Controller
{
protected string Rubrique { get; set; }
protected string Page { get; set; }
protected string Secteur { get; set; }
public BaseController()
... | apo-j/Projects_Working | S/SOURCE/SOURCE.BackOffice/SOURCE.BackOffice.Web.Controllers/Modularity/BaseController.cs | C# | mit | 1,754 |
import signal
import subprocess
import sys
import time
import numba
import numpy as np
import SharedArray as sa
sys.path.append('./pymunk')
import pymunk as pm
max_creatures = 50
@numba.jit
def _find_first(vec, item):
for i in range(len(vec)):
if vec[i] == item:
return i
return -1
@numb... | brains-on-art/culture | culture_logic.py | Python | mit | 7,076 |
//go:build go1.16
// +build go1.16
// 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 | sdk/resourcemanager/azuredata/armazuredata/zz_generated_response_types.go | GO | mit | 5,207 |
#
# Author:: MJ Rossetti (@s2t2)
# Cookbook Name:: trailmix
# Recipe:: mail
#
# Install sendmail package.
package "sendmail"
package "sendmail-cf"
# Upload sendmail configuration files.
template "/etc/mail/local-host-names" do
source "mail/local-host-names.erb"
owner "root"
group "root"
end
template "/etc/ma... | s2t2/trailmix-solo | site-cookbooks/trailmix/recipes/mail.rb | Ruby | mit | 700 |
package main.java.util;
/**
*
* @author mancim
*/
public class Sorter implements SortUtil,AscSortUtil{
}
| stoiandan/msg-code | Marius/Day6/src/main/java/util/Sorter.java | Java | mit | 118 |
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("03M... | Avarea/Programming-Fundamentals | IntroAndSyntax/03Megapixels/Properties/AssemblyInfo.cs | C# | mit | 1,395 |
# frozen_string_literal: true
class FixSangerSequencingSubmissionCascadesForOracle < ActiveRecord::Migration[4.2]
def change
# Oracle does not support on_update so we need to remove and re-add it to keep
# consistent with the MySQL installations
remove_foreign_key :sanger_sequencing_samples, column: :su... | tablexi/nucore-open | vendor/engines/sanger_sequencing/db/migrate/20160802202924_fix_sanger_sequencing_submission_cascades_for_oracle.rb | Ruby | mit | 467 |
var express = require('express');
var scraptcha = require('scraptcha');
// Scraptcha images source information.
var imageInformation = {path: __dirname + "/images/green/",
filePrefix: "i_cha_",
fileExtension: ".gif"};
// Initialize the Scraptcha data.
sc... | deckerld/scraptcha | test/file-server.js | JavaScript | mit | 847 |
package observerSampleJavaAPI;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
NameArrayObservable na = new NameArrayObservable();
NameArrayObserver nav = new NameArrayObserver();
na.addObserver(nav);
Scanner sc = new Scanner(System.in);
System.out.print... | dmpe/Semester2and5-Examples | src-semester2/observerSampleJavaAPI/Main.java | Java | mit | 467 |
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 |
/************************************************************************************
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 |
// 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 |
/**
* 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 |
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 |
module foo {
exports foo;
} | opengl-8080/Samples | java/java9/jigsaw/src/main/java/module-info.java | Java | mit | 33 |
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 |
'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 |
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 |