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 |
|---|---|---|---|---|---|
'use strict';
// Disable eval and Buffer.
window.eval = global.eval = global.Buffer = function() {
throw new Error("Can't use eval and Buffer.");
}
const Electron = require('electron')
const IpcRenderer = Electron.ipcRenderer;
var Urlin = null; // element of input text
window.addEventListener('load', ()=> {
... | yujakudo/glasspot | app/header.js | JavaScript | mit | 639 |
var roshamboApp = angular.module('roshamboApp', []),
roshambo=
[
{
name:'Rock',
src:'img/rock.png'
},
{
name:'Paper',
src:'img/paper.png'
},
{
name:'Scissors',
src:'img/scissors.png'
}
],
roshamboMap=roshambo.reduce(function... | timfulmer/jswla-advanced | app/app.js | JavaScript | mit | 1,479 |
"use strict";
module.exports = {
"wires.json": {
":path/": `./path-`,
},
"path-test.js"() {
module.exports = `parent`;
},
"/child": {
"wires-defaults.json": {
":path/": `./defaults-`,
},
"wires.json": {
":path/": `./child-`,
},... | jaubourg/wires | test/units/common/dirRoutesOverride.dirunit.js | JavaScript | mit | 790 |
import random
class ai:
def __init__(self, actions, responses):
self.IN = actions
self.OUT = responses
def get_act(self, action, valres):
if action in self.IN:
mList = {}
for response in self.OUT:
if self.IN[self.OUT.index(response)] == ... | iTecAI/Stixai | Module/Stixai.py | Python | mit | 1,343 |
<?php
return array (
'id' => 'mot_e398b_ver2',
'fallback' => 'mot_e398_ver1',
'capabilities' =>
array (
'model_name' => 'E398B',
),
);
| cuckata23/wurfl-data | data/mot_e398b_ver2.php | PHP | mit | 150 |
/** moduleBank constants * */
import { ModuleCode } from '../types/modules';
export const FETCH_MODULE = 'FETCH_MODULE' as const; // Action to fetch modules
export const FETCH_MODULE_LIST = 'FETCH_MODULE_LIST' as const;
export const UPDATE_MODULE_TIMESTAMP = 'UPDATE_MODULE_TIMESTAMP' as const;
export const REMOVE_LRU... | nusmodifications/nusmods | website/src/actions/constants.ts | TypeScript | mit | 1,288 |
# pylint: disable-msg=too-many-lines
"""OPP Hardware interface.
Contains the hardware interface and drivers for the Open Pinball Project
platform hardware, including the solenoid, input, incandescent, and neopixel
boards.
"""
import asyncio
from collections import defaultdict
from typing import Dict, List, Set, Union,... | missionpinball/mpf | mpf/platforms/opp/opp.py | Python | mit | 53,276 |
/*
* This file is part of Sponge, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Softwar... | SpongePowered/SpongeForge | src/main/java/org/spongepowered/mod/mixin/core/client/gui/GuiOptionsMixin_Forge.java | Java | mit | 3,185 |
from django.db import models
from constituencies.models import Constituency
from uk_political_parties.models import Party
from elections.models import Election
class Person(models.Model):
name = models.CharField(blank=False, max_length=255)
remote_id = models.CharField(blank=True, max_length=255, null=True)... | JustinWingChungHui/electionleaflets | electionleaflets/apps/people/models.py | Python | mit | 1,603 |
//
// IsExtraAttribute.cs
//
// Author:
// Aaron Bockover <aaron.bockover@gmail.com>
//
// Copyright 2015 Aaron Bockover. 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 ... | abock/conservatorio | Conservatorio/Rdio/IsExtraAttribute.cs | C# | mit | 1,359 |
#include <iostream>
using namespace std;
int main(int argc, char const *argv[]) {
int n= 20;
label:
cout << n << endl;
n--;
if(n > 0){
goto label;
}
std::cout << "endle" << '\n';
std::cout << "string euqals: " << (strcmp("hello", "hello")) << '\n';
if(strcmp("hello", "hello")... | gubaojian/trylearn | cplus/1/go.cpp | C++ | mit | 386 |
using System;
using System.Collections.Generic;
using System.Linq;
namespace Slack.Api
{
public static class ProfileHelper
{
public static User GetProfile(ICollection<User> users, string userId)
{
if (users == null)
{
throw new ArgumentNullException(name... | vamone/Slack-Notification-Desktop-App | Slack.Api/ProfileHelper.cs | C# | mit | 850 |
package com.integpg.synapse.actions;
import com.integpg.logger.FileLogger;
import java.io.IOException;
import java.util.Json;
public class CompositeAction extends Action {
private String[] _actions;
public CompositeAction(Json json) {
_actions = (String[]) json.get("Actions");
ActionHa... | kmcloutier/synapse | src/com/integpg/synapse/actions/CompositeAction.java | Java | mit | 998 |
package be.idoneus.hipchat.buildbot.hipchat.server;
public class Paths {
public static String PATH_CAPABILITIES = "";
public static String PATH_INSTALL = "install";
public static String PATH_WEBHOOK_ROOM_MESSAGE = "webhooks/room_message";
public static String PATH_GLANCES = "glances";
}
| Idoneus/buildbot | buildbot-core/src/main/java/be/idoneus/hipchat/buildbot/hipchat/server/Paths.java | Java | mit | 305 |
using WJStore.Domain.Interfaces.Validation;
namespace WJStore.Domain.Validation
{
public class ValidationRule<TEntity> : IValidationRule<TEntity>
{
private readonly ISpecification<TEntity> _specificationRule;
public ValidationRule(ISpecification<TEntity> specificationRule, string errorMessage... | MrWooJ/WJStore | WJStore.Domain/Validation/ValidationRule.cs | C# | mit | 626 |
using CharacterGen.Feats;
using CharacterGen.Abilities;
using CharacterGen.Races;
using System.Collections.Generic;
using System.Linq;
namespace CharacterGen.Domain.Selectors.Selections
{
internal class RacialFeatSelection
{
public string Feat { get; set; }
public int MinimumHitDieRequirement ... | DnDGen/CharacterGen | CharacterGen.Domain/Selectors/Selections/RacialFeatSelection.cs | C# | mit | 2,497 |
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v1.0.0-rc5-master-76c6299
*/
goog.provide('ng.material.components.backdrop');
goog.require('ng.material.core');
/*
* @ngdoc module
* @name material.components.backdrop
* @description Backdrop
*/
/**
* @ngdoc directive
* @na... | devMonkies/FSwebApp | bower_components/angular-material/modules/closure/backdrop/backdrop.js | JavaScript | mit | 2,440 |
<?php
namespace Oreades\PaymentPayplugBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class OreadesPaymentPayplugBundle extends Bundle
{
}
| Oreades/PaymentPayplugBundle | OreadesPaymentPayplugBundle.php | PHP | mit | 150 |
#ifndef __tc_function_h__
#define __tc_function_h__
#include <atomic>
namespace tc {
#define TC_FUNCTION_TD_0 typename R
#define TC_FUNCTION_TD_1 TC_FUNCTION_TD_0 , typename A1
#define TC_FUNCTION_TD_2 TC_FUNCTION_TD_1 , typename A2
#define TC_FUNCTION_TD_3 TC_FUNCTION_TD_2 , typename A3
#define TC_FUNCTION_TD_4 TC_... | aoziczero/deprecated-libtc | srcs/tc.common/function.hpp | C++ | mit | 8,097 |
const errors = require('@tryghost/errors');
const should = require('should');
const sinon = require('sinon');
const fs = require('fs-extra');
const moment = require('moment');
const Promise = require('bluebird');
const path = require('path');
const LocalFileStore = require('../../../../../core/server/adapters/storage/L... | janvt/Ghost | test/unit/server/adapters/storage/LocalFileStorage.test.js | JavaScript | mit | 9,369 |
import { ReactElement } from "react";
import Heading from "components/Heading";
import styles from "./PackageSassDoc.module.scss";
export interface SectionTitleProps {
packageName: string;
type: "Variables" | "Functions" | "Mixins";
}
export default function SectionTitle({
packageName,
type,
}: SectionTitle... | mlaursen/react-md | packages/documentation/src/components/PackageSassDoc/SectionTitle.tsx | TypeScript | mit | 505 |
package in.clayfish.printful.models;
import java.io.Serializable;
import java.util.List;
import in.clayfish.printful.models.info.AddressInfo;
import in.clayfish.printful.models.info.ItemInfo;
/**
* @author shuklaalok7
* @since 24/12/2016
*/
public class ShippingRequest implements Serializable {
/**
* Re... | clayfish/printful4j | client/src/main/java/in/clayfish/printful/models/ShippingRequest.java | Java | mit | 1,115 |
import UnexpectedHtmlLike from 'unexpected-htmllike';
import React from 'react';
import REACT_EVENT_NAMES from '../reactEventNames';
const PENDING_TEST_EVENT_TYPE = { dummy: 'Dummy object to identify a pending event on the test renderer' };
function getDefaultOptions(flags) {
return {
diffWrappers: flags.exactl... | bruderstein/unexpected-react | src/assertions/AssertionGenerator.js | JavaScript | mit | 22,599 |
class MakeDagJsonLongText < ActiveRecord::Migration[5.1]
def change
change_column :phylo_trees, :dag_json, :longtext
end
end
| chanzuckerberg/idseq-web | db/migrate/20181113172609_make_dag_json_long_text.rb | Ruby | mit | 133 |
// Generated by CoffeeScript 1.7.1
(function() {
var $, CSV, ES, TEXT, TRM, TYPES, alert, badge, create_readstream, debug, echo, help, info, log, njs_fs, rainbow, route, rpr, urge, warn, whisper;
njs_fs = require('fs');
TYPES = require('coffeenode-types');
TEXT = require('coffeenode-text');
TRM = require(... | loveencounterflow/timetable | lib/scratch/test-fast-csv.js | JavaScript | mit | 2,430 |
"use strict";
var request = require(__dirname + "/request");
var db = require(__dirname + "/db");
/**
* Steam utils
*/
var steamapi = {};
/**
* Request to our api
* @param {string} type
* @param {string[]} ids
* @param {function} callback
*/
steamapi.request = function (type, ids, callback) {
if (!ids.len... | brainfoolong/rcon-web-admin | src/steamapi.js | JavaScript | mit | 3,790 |
//THREEJS RELATED VARIABLES
var scene,
camera, fieldOfView, aspectRatio, nearPlane, farPlane,
gobalLight, shadowLight, backLight,
renderer,
container,
controls;
//SCREEN & MOUSE VARIABLES
var HEIGHT, WIDTH, windowHalfX, windowHalfY,
mousePos = { x: 0, y: 0 },
oldMousePos = {x:0, y:0},
... | exildev/webpage | exile_ui/static/404/js/index.js | JavaScript | mit | 10,479 |
import { Widget, startAppLoop, Url, History } from 'cx/ui';
import { Timing, Debug } from 'cx/util';
import { Store } from 'cx/data';
import Routes from './routes';
import 'whatwg-fetch';
import "./index.scss";
let stop;
const store = new Store();
if(module.hot) {
// accept itself
module.hot.accept();
// re... | codaxy/employee-directory-demo | client/app/index.js | JavaScript | mit | 755 |
require 'thor'
module EcsDeployer
class CLI < Thor
class_option :profile, type: :string
class_option :region, type: :string
no_commands do
def prepare
@aws_options = {}
@aws_options[:profile] = options[:profile] if options[:profile]
@aws_options[:region] = options[:region] ... | naomichi-y/ecs_deployer | lib/ecs_deployer/cli.rb | Ruby | mit | 2,077 |
from settings.common import Common
class Dev(Common):
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'ffrpg.sql', # Or path to database file if using sqlite3.
#... | Critical-Impact/ffrpg-gen | django/settings/dev.py | Python | mit | 650 |
package pl.edu.uwm.wmii.visearch.clustering;
/*
*
* Z linii poleceń
* /usr/local/mahout/bin/mahout kmeans -i kmeans/data1/in -c kmeans/data1/cl -o kmeans/data1/out -x 10 -k 2 -ow -cl
* opcja -ow nadpisuje katalog wyjściowy (nie trzeba ręcznie kasować)
* opcja -cl generuje katalog clusteredPoints, zawierający... | pgorecki/visearch | projects/clustering/src/pl/edu/uwm/wmii/visearch/clustering/KMeans.java | Java | mit | 12,415 |
<?php
defined('BASEPATH') or exit('No direct script access allowed');
use Omnipay\Omnipay;
class Authorize_sim_gateway extends App_gateway
{
public function __construct()
{
/**
* Call App_gateway __construct function
*/
parent::__construct();
/**
* REQUIRED
... | cmaciasg/test | application/libraries/gateways/Authorize_sim_gateway.php | PHP | mit | 4,944 |
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Xml.Linq;
namespace Cassette
{
class AssetSerializer : IBundleVisitor
{
readonly XElement container;
public AssetSerializer(XElement container)
{
this.c... | BluewireTechnologies/cassette | src/Cassette/AssetSerializer.cs | C# | mit | 1,634 |
# google_search.rb
# Author: William Woodruff
# ------------------------
# A Cinch plugin that provides Google interaction for yossarian-bot.
# ------------------------
# This code is licensed by William Woodruff under the MIT License.
# http://opensource.org/licenses/MIT
require 'json'
require 'open-uri'
requ... | lightarrow47/yossarian-bot | plugins/google_search.rb | Ruby | mit | 1,278 |
import React from 'react';
import { default as TriggersContainer } from './TriggersContainer';
import { mount } from 'enzyme';
const emptyDispatch = () => null;
const emptyActions = { setGeoJSON: () => null };
describe('(Container) TriggersContainer', () => {
it('Renders a TriggersContainer', () => {
const _com... | maartenlterpstra/GeoWeb-FrontEnd | src/containers/TriggersContainer.spec.js | JavaScript | mit | 474 |
module Pageflow
class EntryDuplicate < Struct.new(:original_entry)
def create!
create_entry
copy_draft
copy_memberships
new_entry
end
def self.of(entry)
new(entry)
end
private
attr_reader :new_entry
def create_entry
@new_entry = Entry.create!(new_a... | grgr/pageflow | app/models/pageflow/entry_duplicate.rb | Ruby | mit | 973 |
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'page_object_on_demand'
| tomazy/page_object_on_demand | spec/spec_helper.rb | Ruby | mit | 91 |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Student_records_model extends CI_Model {
public function __construct()
{
parent::__construct();
}
public function get_stud_assessment($stud_id, $course, $stud_year, $semester, $scheme)
{
$array = array('stud_id' => $stud_id, 'st... | dyunas/Stdnt-Assmnt | application/modules/Cashier/models/Student_Records/Student_records_model.php | PHP | mit | 4,725 |
<?php
namespace Main\MainBundle\Entity;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\User\UserProviderInterface;
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
use Doctrine\... | riki343/main | src/Main/MainBundle/Entity/UserRepository.php | PHP | mit | 1,615 |
// The command line tool for running Revel apps.
package main
import (
"flag"
"fmt"
"io"
"os"
"strings"
"text/template"
)
// Cribbed from the genius organization of the "go" command.
type Command struct {
Run func(args []string)
UsageLine, Short, Long string
}
func (cmd *Command) Name() st... | yext/revel | revel/rev.go | GO | mit | 2,397 |
Rails.application.routes.draw do
root 'application#index'
# resources :mylist, defaults: { format: :json }
resources :mylist, only: [:show, :index, :create], param: :res_id, defaults: { format: :json }
resources :mylist, only: [:destroy], param: :res_id
# resources :mylist, param: :res_id, defaults: { form... | mystycs/My-Favorite-Taco-Joint | config/routes.rb | Ruby | mit | 1,900 |
using com.microsoft.dx.officewopi.Models;
using com.microsoft.dx.officewopi.Models.Wopi;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Net.Http;
using System.Runtime.Caching;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Task... | OfficeDev/PnP-WOPI | com.microsoft.dx.officewopi/Utils/WopiUtil.cs | C# | mit | 16,313 |
window.NavigationStore = function() {
function isSet(menu) {
return localStorage["navigation_" + menu] !== undefined;
}
function fetch(menu) {
return localStorage["navigation_" + menu] == "true" || false;
}
function set(menu, value) {
localStorage["navigation_" + menu] = value;
}
return {
... | appsignal/appsignal-docs | source/assets/javascripts/navigation_store.js | JavaScript | mit | 377 |
<?php
class Productos_model extends CI_Model{
function __construct()
{
parent::__construct();
$this->load->database();
}
function get_destacados($por_pagina,$segmento)
{
$consulta = $this->db->query("SELECT * FROM Producto WHERE Destacado=1 LIMIT $segmento, $por_pag... | dfergar/PHP_practica2 | application/models/Productos_model.php | PHP | mit | 3,985 |
import { describe, it, beforeEach, afterEach } from 'mocha';
import { expect } from 'chai';
import startApp from 'my-app/tests/helpers/start-app';
import { run } from '@ember/runloop';
describe('Acceptance | foo', function () {
let application;
beforeEach(function () {
application = startApp();
});
after... | emberjs/ember.js | node-tests/fixtures/acceptance-test/mocha.js | JavaScript | mit | 526 |
<?php
namespace ShopBundle\Entity;
use Doctrine\ORM\EntityRepository;
/**
* CustomerRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class CustomerRepository extends EntityRepository
{
}
| GitHubTai/MijnPizza | src/ShopBundle/Entity/CustomerRepository.php | PHP | mit | 258 |
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Red_Folder.com.Models.Activity
{
public class PluralsightActivity: IActivity
{
[JsonProperty("courses")]
public List<Course> Courses;
}
}
| Red-Folder/red-folder.com | src/Red-Folder.com/Models/Activity/PluralsightActivity.cs | C# | mit | 300 |
#include "3d/Base.h"
#include "3d/C3DEffect.h"
#include "3d/C3DElementNode.h"
#include "3d/C3DEffectManager.h"
#include "3d/C3DElementNode.h"
namespace cocos3d
{
static C3DEffectManager* __effectManagerInstance = NULL;
C3DEffectManager::C3DEffectManager()
{
}
C3DEffectManager::~C3DEffectManager()
{
__effectManager... | mcodegeeks/OpenKODE-Framework | 01_Develop/libXMCocos2D-v3/Source/3d/C3DEffectManager.cpp | C++ | mit | 5,124 |
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACCOUNT_SID"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)
number = client.lookups.phone_numbers("+16502530000... | teoreteetik/api-snippets | lookups/lookup-get-cname-example-1/lookup-get-cname-example-1.6.x.py | Python | mit | 417 |
class CreateLaDepartmentWatcherEvents < ActiveRecord::Migration
def change
create_table :la_department_watcher_events do |t|
t.string :type
t.datetime :start_at
t.datetime :end_at
t.text :text_description
t.datetime :notify_sent_at
t.string :notify_sent_to
t.text :agents_... | luigi-sk/la-department-watcher | db/migrate/20140205165029_create_la_department_watcher_events.rb | Ruby | mit | 372 |
# encoding: utf-8
module Humanoid #:nodoc:
module Criterion #:nodoc:
module Inclusion
# Adds a criterion to the +Criteria+ that specifies values that must all
# be matched in order to return results. Similar to an "in" clause but the
# underlying conditional logic is an "AND" and not an "OR". Th... | delano/humanoid | lib/humanoid/criterion/inclusion.rb | Ruby | mit | 3,086 |
import {IFilesystem} from './Filesystem';
export type Node = Directory | string;
export type Directory = {[name: string]: Node};
export class MockFilesystem implements IFilesystem {
files: Directory = {};
constructor(files?: Directory) {
this.files = files || {};
}
private get(path: string, ... | sbj42/roze | src/db/MockFilesystem.test.ts | TypeScript | mit | 3,297 |
#include <progress_bar.hh>
PROGRESS_BAR
::
PROGRESS_BAR(int x, int y, int w, int h, void(*opf)(void), void(*orf)(void), int ea, int ia, int l)
:
WIDGET(x,y,w,h,opf,orf)
{
this->ext_angle = ea;
this->int_angle = ia;
this->level = l;
}
| oktail/borealos | libs/lib_ihm/src/progress_bar.cpp | C++ | mit | 247 |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @module
* @description
* This module provides a set of common Pipes.
*/
import {AsyncPipe} from './async_p... | matsko/angular | packages/common/src/pipes/index.ts | TypeScript | mit | 1,312 |
package net.crowmagnumb.database;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
public class SqlColumn implements SqlComponent {
private final String _name;
private final SqlColumnType _type;
private SqlTable _table;
private f... | SamSix/s6-db | src/main/java/net/crowmagnumb/database/SqlColumn.java | Java | mit | 4,933 |
namespace VocaDb.Model.Domain.Tags {
public interface ITagUsageFactory<T> where T : TagUsage {
T CreateTagUsage(Tag tag);
}
}
| cazzar/VocaDbTagger | VocaDbModel/Domain/Tags/ITagUsageFactory.cs | C# | mit | 137 |
import json
f = open('text-stripped-3.json')
out = open('text-lines.json', 'w')
start_obj = json.load(f)
end_obj = {'data': []}
characters_on_stage = []
currently_speaking = None
last_scene = '1.1'
for i in range(len(start_obj['data'])):
obj = start_obj['data'][i]
if obj['type'] == 'entrance':
if obj['characte... | SyntaxBlitz/syntaxblitz.github.io | mining-lear/process/step6.py | Python | mit | 1,654 |
import removeClass from 'tui-code-snippet/domUtil/removeClass';
import addClass from 'tui-code-snippet/domUtil/addClass';
import { HookCallback } from '@t/editor';
import { Emitter } from '@t/event';
import { ExecCommand, HidePopup, TabInfo } from '@t/ui';
import i18n from '@/i18n/i18n';
import { cls } from '@/utils/do... | nhnent/tui.editor | apps/editor/src/ui/components/toolbar/imagePopupBody.ts | TypeScript | mit | 5,214 |
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("p04... | stefankon/CShomeworkAndLabIssues | CSharp-List-More-Exercises/p04.UnunionLists/Properties/AssemblyInfo.cs | C# | mit | 1,403 |
let mongoose = require('mongoose')
let userSchema = mongoose.Schema({
// userModel properties here...
local: {
email: {
type: String,
required: true
},
password: {
type: String,
required: true
}
},
facebook: {
id: ... | linghuaj/node-social-auth | app/models/user.js | JavaScript | mit | 1,581 |
using DragonSpark.Sources.Parameterized;
using System;
namespace DragonSpark.Aspects.Specifications
{
sealed class SpecificationConstructor : AdapterConstructorSource<ISpecification>
{
public static IParameterizedSource<Type, Func<object, ISpecification>> Default { get; } = new SpecificationConstructor().ToCache(... | DevelopersWin/VoteReporter | Framework/DragonSpark/Aspects/Specifications/SpecificationConstructor.cs | C# | mit | 460 |
// File auto generated by STUHashTool
using static STULib.Types.Generic.Common;
namespace STULib.Types.Dump {
[STU(0xF92E0197)]
public class STU_F92E0197 : STUInstance {
[STUField(0xDAE04657)]
public float m_DAE04657;
[STUField(0x96960C7F)]
public float m_96960C7F;
[ST... | kerzyte/OWLib | STULib/Types/Dump/STU_F92E0197.cs | C# | mit | 446 |
package com.sunnyface.popularmovies;
import android.content.Intent;
import android.databinding.DataBindingUtil;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.ActivityOptionsCompat;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
impor... | kikoseijo/AndroidPopularMovies | app/src/main/java/com/sunnyface/popularmovies/MainActivity.java | Java | mit | 3,149 |
Photos = new orion.collection('photos', {
singularName: 'photo',
pluralName: 'photos',
link: {
title: 'Photos'
},
tabular: {
columns: [
{data: 'title', title: 'Title'},
{data: 'state', title: 'State'},
//ToDo: Thumbnail
orion.attributeColumn('markdown', 'body', 'Content'),
... | JavaScript-NZ/javascript-website-v2 | app/lib/collections/2_photos.js | JavaScript | mit | 1,358 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Rajdeep's Programs Repository</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
<link href="... | rajdeep26/MyProgramRepository | ShowPrograms.php | PHP | mit | 7,658 |
/**
* \file NETGeographicLib\PolyPanel.cs
* \brief NETGeographicLib.PolygonArea example
*
* NETGeographicLib is copyright (c) Scott Heiman (2013)
* GeographicLib is Copyright (c) Charles Karney (2010-2012)
* <charles@karney.com> and licensed under the MIT/X11 License.
* For more information, see
* https://geogr... | geographiclib/geographiclib | dotnet/Projections/PolyPanel.cs | C# | mit | 6,048 |
from django.conf.urls import url, include
from django.contrib import admin
from django.contrib.auth.decorators import login_required
from .views import UploadBlackListView, DemoView, UdateBlackListView
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^upload-blacklist$', login_required(Upload... | nirvaris/nirvaris-djangofence | djangofence/urls.py | Python | mit | 566 |
'use strict';
module.exports.name = 'cssnano/postcss-minify-font-values';
module.exports.tests = [{
message: 'should unquote font names',
fixture: 'h1{font-family:"Helvetica Neue"}',
expected: 'h1{font-family:Helvetica Neue}'
}, {
message: 'should unquote and join identifiers with a slash, if numeric',... | pieter-lazzaro/cssnano | tests/modules/postcss-font-family.js | JavaScript | mit | 3,673 |
#include <cstdlib>
#include <stdexcept>
#include <vector>
#include <algorithm>
#include "Platform.h"
#include "T3000.h"
#include "Position.h"
#include "Selection.h"
using namespace T3000;
void CTstat8HelySystem::MoveForInsertDelete(bool insertion, Sci::Position startChange, Sci::Position length) {
if (insertio... | temcocontrols/T3000_Building_Automation_System | T3000/Tstat8HelpSystem/CTstat8HelpSystem.cpp | C++ | mit | 10,412 |
using AlgorithmsLibrary;
using Xunit;
namespace Tests
{
public class QuickFindTests
{
[Fact]
public void IsConnected_NotConnectedByDefault()
{
var algorithm = new QuickFind(2);
Assert.Equal(0, algorithm.Result[0]);
Assert.Equal(1, algor... | Sufflavus/Algorithms | Source/Tests/QuickFindTests.cs | C# | mit | 1,178 |
function Tw2VectorSequencer()
{
this.name = '';
this.start = 0;
this.value = vec3.create();
this.operator = 0;
this.functions = [];
this._tempValue = vec3.create();
}
Tw2VectorSequencer.prototype.GetLength = function () {
var length = 0;
for (var i = 0; i < this.functions.length; ++i)... | reactormonk/ccpwgl | src/curves/Tw2VectorSequencer.js | JavaScript | mit | 1,489 |
using commercetools.Common;
namespace commercetools.Zones
{
/// <summary>
/// Extensions
/// </summary>
public static class Extensions
{
/// <summary>
/// Creates an instance of the ZoneManager.
/// </summary>
/// <returns>ZoneManager</returns>
public static... | commercetools/commercetools-dotnet-sdk | commercetools.NET/Zones/Extensions.cs | C# | mit | 434 |
#region License
// Microsoft Public License (Ms-PL)
//
// This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.
//
// 1. Definitions
//
// The terms "reproduce," "reproduction," "derivative works," and "d... | Julien-Mialon/StormXamarin | StormXamarin/Storm.Mvvm/Funq/ServiceKey.cs | C# | mit | 3,739 |
// Include gulp
var gulp = require('gulp');
// Include Our Plugins
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var header = require('gulp-header');
var footer = require('gulp-footer');
// Build Task
gulp.task('default', function() {
gulp.src([ "src/... | tyler-johnson/Legends | gulpfile.js | JavaScript | mit | 1,023 |
import requests
from flask import session, Blueprint, redirect
from flask import request
from grano import authz
from grano.lib.exc import BadRequest
from grano.lib.serialisation import jsonify
from grano.views.cache import validate_cache
from grano.core import db, url_for, app
from grano.providers import github, twi... | clkao/grano | grano/views/sessions_api.py | Python | mit | 5,328 |
package com.dasa.approval.service;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;
import com.dasa.approva... | GenSolutionRep/Note | src/main/java/com/dasa/approval/service/ApprovalService.java | Java | mit | 3,931 |
var myTimeout = 12000;
Storage.prototype.setObject = function(key, value) {
this.setItem(key, JSON.stringify(value));
};
Storage.prototype.getObject = function(key) {
var value = this.getItem(key);
return value && JSON.parse(value);
};
// Обеспечиваем поддержу XMLHttpRequest`а в IE
var xmlVersions = new Array(
... | schoolphp/library | Core/fw.js | JavaScript | mit | 2,095 |
/**
* grunt-webfont: fontforge engine
*
* @requires fontforge, ttfautohint 1.00+ (optional), eotlitetool.py
* @author Artem Sapegin (http://sapegin.me)
*/
module.exports = function(o, allDone) {
'use strict';
var fs = require('fs');
var path = require('path');
var temp = require('temp');
var async = require... | jnaO/grunt-webfont | tasks/engines/fontforge.js | JavaScript | mit | 2,457 |
#include <iostream>
#include <vector>
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
class Solution {
public:
TreeNode* mergeTrees(TreeNode* t1, TreeNode* t2) {
if (t1 == NULL) return t2;
if (... | chasingegg/Online_Judge | leetcode/617_Merge-Two-Binary-Trees/MergeTrees.cpp | C++ | mit | 558 |
<?php
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 Christian Zenker <dev@xopn.de>
*
* 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 limitati... | czenker/wichtlr | lib/Czenker/Wichtlr/ConsoleHelper/Reindeer.php | PHP | mit | 6,574 |
<?php
/**
* MarkaCategory form base class.
*
* @method MarkaCategory getObject() Returns the current form's model object
*
* @package sf_sandbox
* @subpackage form
* @author Your name here
* @version SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
*/
abstrac... | verkri/designermarka | lib/form/doctrine/base/BaseMarkaCategoryForm.class.php | PHP | mit | 1,491 |
require 'csv'
@file_name = ARGV[0]
file = File.new('inputs/' + @file_name, 'r')
n_lines = 0
@headers = nil
@contents = {}
@dates = []
def parse_headers(fields)
@headers = fields.slice(1..(fields.length-1))
@headers = @headers.map(&:chomp)
@headers.each do |name|
@contents[name] = []
end
end
def parse_line(fi... | cyrusinnovation/american_ebola_response | data_sources/parse_individual.rb | Ruby | mit | 1,137 |
package com.github.programmerr47.chords.representation.adapter.item;
/**
* Simple expansion of interface {@link AdapterItem} for organization of
* "selection mode".
*
* @author Michael Spitsin
* @since 2014-10-08
*/
public abstract class SelectionModeAdapterItem implements AdapterItem {
protected boolean is... | programmerr47/guitar-chords | app/src/main/java/com/github/programmerr47/chords/representation/adapter/item/SelectionModeAdapterItem.java | Java | mit | 1,102 |
package br.com.trustsystems.demo.provider;
import br.com.trustsystems.persistence.Persistent;
import br.com.trustsystems.persistence.dao.IUnitOfWork;
import br.com.trustsystems.persistence.provider.jpa.JpaPersistenceProvider;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotat... | trust-wenderson/super-dao-demo | src/main/java/br/com/trustsystems/demo/provider/DatabasePersistenceProvider.java | Java | mit | 1,812 |
// <copyright file="Size2D.cs" company="Shkyrockett" >
// Copyright © 2005 - 2020 Shkyrockett. All rights reserved.
// </copyright>
// <author id="shkyrockett">Shkyrockett</author>
// <license>
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
// </license>
/... | Shkyrockett/engine | Engine.Geometry/Primitives/Size2D.cs | C# | mit | 46,593 |
class Model < ActiveRecord::Base
# Relationships to other Entities
has_many :products
validates_presence_of :name
validates_length_of :name, :within => 2..32
validates_uniqueness_of :name
end
| joshcarr/minimal-commerce | app/models/model.rb | Ruby | mit | 211 |
'use strict';
var fs = require('fs'),
path = require('path');
// path.basename('/foo/bar/baz/asdf/quux.html', '.html') = quux
// path.dirname('/foo/bar/baz/asdf/quux.html') = /foo/bar/baz/asdf/
// path.parse('/home/user/dir/file.txt')
// returns
// {
// root : "/",
// dir : "/ho... | hanakin/rotory | src/model/layers/index.js | JavaScript | mit | 2,763 |
var NULL = null;
function NOP() {}
function NOT_IMPLEMENTED() { throw new Error("not implemented."); }
function int(x) {
return x|0;
}
function pointer(src, offset, length) {
offset = src.byteOffset + offset * src.BYTES_PER_ELEMENT;
if (typeof length === "number") {
return new src.constructor(src.buffer, o... | mohayonao/libogg.js | include/stdlib.js | JavaScript | mit | 777 |
var _ = require('../../util')
var handlers = {
text: require('./text'),
radio: require('./radio'),
select: require('./select'),
checkbox: require('./checkbox')
}
module.exports = {
priority: 800,
twoWay: true,
handlers: handlers,
/**
* Possible elements:
* <select>
* <textarea>
* <... | goforward01/follow_vue | src/directives/model/index.js | JavaScript | mit | 1,765 |
var classes = [
{
"name": "Hal\\Report\\Html\\Reporter",
"interface": false,
"methods": [
{
"name": "__construct",
"role": null,
"public": true,
"private": false,
"_type": "Hal\\Metric\\FunctionMetric... | phpmetrics/website | report/v2/js/classes.js | JavaScript | mit | 98,017 |
(function() {
'use strict';
var jhiAlert = {
template: '<div class="alerts" ng-cloak="">' +
'<div ng-repeat="alert in $ctrl.alerts" ng-class="[alert.position, {\'toast\': alert.toast}]">' +
'<uib-alert ng-cloak="" type="{{alert.type}}" close="alert.cl... | gcorreageek/noctem | src/main/webapp/app/components/alert/alert.directive.js | JavaScript | mit | 864 |
<header class="main-header">
<!-- Logo -->
<a href="" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"><b>G'</b>GO</span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg"><b>Gaspi'</b>GO</span>
</a>
<!-- Header Navbar:... | Theo-Drappier/dip-purple | views/base/header.php | PHP | mit | 1,870 |
<h2>Listing <span class='muted'>Names</span></h2>
<br>
<?php if ($names): ?>
<table class="table table-striped">
<thead>
<tr>
<th>Name</th>
<th> </th>
</tr>
</thead>
<tbody>
<?php foreach ($names as $item): ?> <tr>
<td><?php echo $item->name; ?></td>
<td>
<div class="btn-toolbar">
<di... | miyahira/fuelphp_test | fuel/app/views/name/index.php | PHP | mit | 1,036 |
using System;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Data.Common;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Xml;
using System.Xml.Serialization;
using SubSonic;
using SubSonic.Utilities;... | saludnqn/consultorio | DalSic/generated/LabTempResultadoEncabezadoController.cs | C# | mit | 7,089 |
# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::Cosmosdb::Mgmt::V2015_04_08
module Models
#
# An Azure Cosmos DB MongoDB database.
#
class MongoDBDatabase < Resource
... | Azure/azure-sdk-for-ruby | management/azure_mgmt_cosmosdb/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase.rb | Ruby | mit | 2,741 |
<?php
namespace r7r\ste;
/**
* Class Calc contains static methods needed by <ste:calc />
*/
class Calc
{
private function __construct()
{
}
/**
* Parse a mathematical expression with the shunting yard algorithm (https://en.wikipedia.org/wiki/Shunting-yard_algorithm)
*
* We could also... | kch42/ste | src/ste/Calc.php | PHP | mit | 5,679 |
var EVENTS, ProxyClient, _r, bindSocketSubscriber, getSystemAddresses, io, mazehallGridRegister;
_r = require('kefir');
io = require('socket.io-client');
EVENTS = require('./events');
ProxyClient = function(server, hosts) {
server.on('listening', function() {
return bindSocketSubscriber(server, hosts);
});
... | mazehall/mazehall-proxy | lib/client.js | JavaScript | mit | 1,895 |
var Router = require('restify-router').Router;
var db = require("../../../../db");
var ProductionOrderManager = require("dl-module").managers.sales.ProductionOrderManager;
var resultFormatter = require("../../../../result-formatter");
var passport = require('../../../../passports/jwt-passport');
const apiVersion = '1.0... | danliris/dl-production-webapi | src/routers/v1/sales/reports/sales-monthly-report-router.js | JavaScript | mit | 9,361 |
<?php
namespace Audith\Providers\Nexway\Data\Response\OrderApi;
/**
* @author Shahriyar Imanov <shehi@imanov.me>
*/
class getCrossUpSell extends \Audith\Providers\Nexway\Data\Response\OrderApi
{
/**
* @var array
* @see http://wsdocs.nexway.com/APIGuide/index.html?url=responsecodetype1.html
*/
... | AudithSoftworks/Nexway-Merchant-API-PHP-Client | src/Audith/Providers/Nexway/Data/Response/OrderApi/getCrossUpSell.php | PHP | mit | 1,028 |
package pl.edu.mimuw.cloudatlas.agent.modules.network;
import java.net.InetAddress;
import pl.edu.mimuw.cloudatlas.agent.modules.framework.SimpleMessage;
public final class SendDatagramMessage extends SimpleMessage<byte[]> {
private InetAddress target;
private int port;
public SendDatagramMessage(byte[] content,... | konradxyz/cloudatlas | src/pl/edu/mimuw/cloudatlas/agent/modules/network/SendDatagramMessage.java | Java | mit | 518 |