repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
aajungroth/testing-toyproblems | _powerSet/spec.js | 1159 | describe('powerSet', function() {
var result;
var expected;
beforeEach(function() {
// Something do to before each test
});
it('should pass a basic test', function() {
expect(1).to.equal(1);
});
it('should return an array for the power set of jump', function() {
this.timeout(30... | mit |
encrypted-systems/Warehouse | application/views/index_polish_view.php | 2326 | <?php $this->load->view('template/header_view.php'); ?>
<!-- hero area (the grey one with a slider -->
<section id="hero" class="clearfix">
<!-- responsive FlexSlider image slideshow -->
<div class="wrapper">
<div class="row">
<div class="grid_5">
... | mit |
Terricide/ReVision | src/ReVision.Forms/WebSocket/WebSocketHandler.cs | 3066 | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net.WebSockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace ReVision.Forms
{
public class WebSocketHandler : IDisposable
{
public WebSocket Socket;
p... | mit |
microfleet/core | packages/plugin-amqp/src/plugin.ts | 4401 | import type * as _ from '@microfleet/plugin-validator'
import type * as __ from '@microfleet/plugin-logger'
import { strict as assert } from 'assert'
import { resolve } from 'path'
import { NotFoundError, NotPermittedError, ConnectionError } from 'common-errors'
import { PluginInterface } from '@microfleet/core-types'... | mit |
Romakita/ts-express-decorators | packages/graphql/typegraphql/test/app/services/UsersRepository.ts | 694 | import {Adapter, InjectAdapter} from "@tsed/adapters";
import {Injectable} from "@tsed/di";
import {deserialize} from "@tsed/json-mapper";
import {User} from "../graphql/auth/User";
@Injectable()
export class UsersRepository {
@InjectAdapter("users", User)
adapter: Adapter<User>;
async $onInit() {
const acc... | mit |
egumerlock/skillnest | App/Components/MainMapView.js | 11613 | import Icon from 'react-native-vector-icons/Ionicons';
import MapView from 'react-native-maps';
import Spinner from 'react-native-spinkit';
import AnimatedRatingStars from './Helpers/AnimatedRatingStars'
import TeacherProfile from './TeacherProfile'
import User from './User'
import React, { Component } from 'react';
va... | mit |
crossroads/crm_super_tags | db/migrate/20101103072142_add_select_options_to_customfields.rb | 212 | class AddSelectOptionsToCustomfields < ActiveRecord::Migration
def self.up
add_column :customfields, :select_options, :text
end
def self.down
remove_column :customfields, :select_options
end
end
| mit |
zorqie/bfests | src/services/index.js | 584 | 'use strict';
const tickets = require('./tickets');
const fans = require('./fans');
const gig = require('./gig');
const act = require('./act');
const venue = require('./venue');
const message = require('./message');
const authentication = require('./authentication');
const user = require('./user');
module.exports = fu... | mit |
tzpBingo/github-trending | codespace/python/tencentcloud/market/v20191010/errorcodes.py | 815 | # -*- coding: utf8 -*-
# Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... | mit |
coinsite/PikachuCoin | src/qt/guiutil.cpp | 13547 | #include "guiutil.h"
#include "bitcoinaddressvalidator.h"
#include "walletmodel.h"
#include "bitcoinunits.h"
#include "util.h"
#include "init.h"
#include "base58.h"
#include <QString>
#include <QDateTime>
#include <QDoubleValidator>
#include <QFont>
#include <QLineEdit>
#include <QUrl>
#include <QTextDocument> // For ... | mit |
isfit/alexandrie | db/migrate/20160221112719_create_join_table_gangs_positions.rb | 269 | class CreateJoinTableGangsPositions < ActiveRecord::Migration[5.0]
def change
create_join_table :gangs, :positions, table_name: :alexandrie_gangs_positions do |t|
# t.index [:gang_id, :position_id]
# t.index [:position_id, :gang_id]
end
end
end
| mit |
pierrelb/RMG-Java | source/RMG/jing/rxn/ReactionTemplate.java | 63739 | ////////////////////////////////////////////////////////////////////////////////
//
// RMG - Reaction Mechanism Generator
//
// Copyright (c) 2002-2011 Prof. William H. Green (whgreen@mit.edu) and the
// RMG Team (rmg_dev@mit.edu)
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of ... | mit |
venanciolm/afirma-ui-miniapplet_x_x | afirma_ui_miniapplet/src/main/java/com/lowagie/text/pdf/PdfObject.java | 11448 | /*
* $Id: PdfObject.java 3912 2009-04-26 08:38:15Z blowagie $
*
* Copyright 1999, 2000, 2001, 2002 Bruno Lowagie
*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the L... | mit |
GaretJax/pop-analysis-suite | pas/conf/suite_template/contrib/popc_1.3.1beta_xdr/lib/combox_client.cc | 2470 | #include <timer.h>
#include <stdio.h>
#include <signal.h>
#define LOOP 10
#define MSGSIZE 7111
int main(int argc, char **argv)
{
if (argc<2)
{
printf("Usage: combox_client <address> [encoding]\n");
return 1;
}
signal(SIGPIPE, SIG_IGN);
paroc_combox_factory *fact=paroc_combox_factory::GetInstance();
char p... | mit |
lucasbrendel/Badger | Badger/ViewModels/IBadgerDashboardViewModel.cs | 204 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Badger.ViewModels
{
interface IBadgerDashboardViewModel
{
}
}
| mit |
jamro/jsbattle | packages/jsbattle-server/test/unit/services/ScriptStore.spec.js | 6699 | "use strict";
const serviceConfig = require('../../../app/lib/serviceConfig.js');
const { ServiceBroker } = require("moleculer");
const { ValidationError } = require("moleculer").Errors;
const { MoleculerClientError } = require("moleculer").Errors;
const crypto = require("crypto");
const path = require('path');
const... | mit |
exercism/xjavascript | exercises/linked-list/linked-list.spec.js | 1821 | var LinkedList = require('./linked-list');
describe('LinkedList', function () {
it('push/pop', function () {
var list = new LinkedList();
list.push(10);
list.push(20);
expect(list.pop()).toBe(20);
expect(list.pop()).toBe(10);
});
xit('push/shift', function () {
var list = new LinkedList()... | mit |
mailru/dbr | condition_test.go | 1898 | package dbr
import (
"testing"
"github.com/mailru/dbr/dialect"
"github.com/stretchr/testify/assert"
)
func TestCondition(t *testing.T) {
for _, test := range []struct {
cond Builder
query string
value []interface{}
}{
{
cond: Eq("col", 1),
query: "`col` = ?",
value: []interface{}{1},
},
{... | mit |
JeroenNoten/Laravel-AdminLTE | tests/Helpers/LayoutHelperTest.php | 12661 | <?php
use JeroenNoten\LaravelAdminLte\Helpers\LayoutHelper;
class LayoutHelperTest extends TestCase
{
public function testMakeBodyData()
{
// Test without config.
$data = LayoutHelper::makeBodyData();
$this->assertEquals('', $data);
// Test with default config values.
... | mit |
dleute/symfony-training | src/Train/MainBundle/Controller/DefaultController.php | 1510 | <?php
namespace Train\MainBundle\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Train\MainBundle\Entity\Product;
class ... | mit |
darindragomirow/DevJobs | DevJobs.Models/Contracts/IDeletable.cs | 283 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DevJobs.Models.Contracts
{
public interface IDeletable
{
bool IsDeleted { get; set; }
DateTime? DeletedOn { get; set; }
}
}
| mit |
Galavantier/doxycotin | src/JSDoxygen.js | 32333 | // Helpful for debug output.
var tablevel = 0;
function tabOutput(output){
var tabs = "";
for (var i = 0; i < tablevel; i++) {
tabs += " ";
};
console.log(tabs + output);
}
/*--------------------------------------------Main------------------------------------------*/
//More intuitive command l... | mit |
ciena-frost/ember-frost-bunsen | addon/components/array-container.js | 11913 | import {utils} from 'bunsen-core'
const {getLabel} = utils
import Ember from 'ember'
const {Component, get, isPresent, typeOf} = Ember
import computed, {readOnly} from 'ember-computed-decorators'
import {HookMixin} from 'ember-hook'
import {singularize} from 'ember-inflector'
import PropTypeMixin, {PropTypes} from 'emb... | mit |
connor557/rubymine | lib/server/map.rb | 3331 | module Server
module Map
# Represents a single chunk of the Minecraft map. Note that +x+ points
# south, +z+ points west, and +y+ points upwards.
class Chunk
# @return the start position of the region, in world block coordinates
#
# @example Find which chunk is affected
# ChunkX... | mit |
EemeliSyynimaa/picross | engine/graphics.py | 314 | # -*- coding: utf-8 -*-
from pyglet.gl import *
def scale_image(image, width, height):
image.get_texture()
gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MAG_FILTER,
gl.GL_NEAREST)
image.width = width
image.height = height
return image
| mit |
sindresorhus/gravatar-url | index.test-d.ts | 1241 | import {expectType, expectError} from 'tsd';
import gravatarUrl from './index.js';
expectType<string>(gravatarUrl('sindresorhus@gmail.com'));
expectType<string>(gravatarUrl('sindresorhus@gmail.com', {default: '404'}));
expectType<string>(gravatarUrl('sindresorhus@gmail.com', {default: 'blank'}));
expectType<string>(
... | mit |
xixizhang96/Example | myweb/demo/demo备注.php | 16508 | <?php
error_reporting(0);
define("IObit","IObit");
if (@!$include){
$pResUrl = './';
$pRootUrl = '../../../';
}
include $pRootUrl.'include/common.inc.php';
//指定ref参数 以下两种模式根据情况选其一
if (empty($_GET['ref'])) $_GET['ref'] = ''; //指定ref参数 可覆盖
//$_GET['ref'] = ''; //指定ref参数 不可覆盖
//创建浮点计算,取 购买人... | mit |
ministryofjustice/apvs-internal-web | test/unit/services/domain/test-claim-deduction.js | 1422 | const ClaimDeduction = require('../../../../app/services/domain/claim-deduction')
const ValidationError = require('../../../../app/services/errors/validation-error')
const expect = require('chai').expect
const deductionTypeEnum = require('../../../../app/constants/deduction-type-enum')
let claimDeduction
describe('ser... | mit |
kamalmahmudi/sia | src/main/java/id/ac/itb/model/PengaturanSemester.java | 9240 | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package id.ac.itb.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.io.Serializable;
import java.util.Da... | mit |
ljharb/node-comments | test/samples/2.multi.js | 143 | /* nested multiline comment /**
here is a line with tabs
here is a line with spaces
*/ var hereIsAVar = 7; /* and a single line comment */
| mit |
EvgenyOrekhov/Clean-Feed-for-VK.com | src/popup.js | 2581 | import { init } from "actus";
import defaultActions from "actus-default-actions";
import defaultSettings from "./defaultSettings.json";
function addClickHandlers(actions) {
const map = {
"is-disabled": actions["is-disabled"].toggle,
groups: actions.toggleGroups,
mygroups: actions.mygroups.toggle,
pe... | mit |
shepherdwind/css-hot-loader | examples/ts-example/webpack.config.js | 2312 | const webpack = require('webpack'); // webpack itself
const path = require('path'); // nodejs dependency when dealing with paths
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const tslintConfig = require('./tslint.json');
const AutoPrefixer = require('autoprefixer');
let config = { // config object... | mit |
rickdberg/database | odp_data_age_depth.py | 1287 | # -*- coding: utf-8 -*-
"""
Created on Fri Aug 5 16:14:54 2016
@author: rickdberg
# File loader to create table in MySQL database with original headers from single csv file
"""
import numpy as np
import pandas as pd
from sqlalchemy import create_engine
# Connect to database
engine = create_engine("mysql://root:neoge... | mit |
davidakachaos/little-tw-helper | units/ram.rb | 291 | # Represents a ram
class Ram < Unit
WOOD = 300
CLAY = 200
IRON = 200
POPULATION = 5
ATTACK = 2
DEF_INF = 20
DEF_HORSE = 50
DEF_ARCH = 20
SPEED = 30
CARRY = 0
BUILD_REQ = { workshop: 1 }
def building_time_factor
village.buildings[:workshop].time_factor
end
end
| mit |
chaddanna/d1-baseball | conference-overview.php | 22332 | <?php require 'header.php'; ?>
<div id="wrap" class="container conference-overview">
<div class="player-header">
<div class="team-logo pull-left">
<img src="img/sec-logo.png" alt="" data-rjs="2">
</div>
<div class="team-header-left">
<h1 class="team-title">Southeastern Conference</h1>
... | mit |
kostyakch/rhino | src/Application/BackBundle/Controller/HelpController.php | 271 | <?php
namespace Application\BackBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class HelpController extends Controller {
public function indexAction($folder='content') {
return $this->render('BackBundle:Help:index.html.twig');
}
}
| mit |
ccpgames/eve-metrics | web2py/gluon/contrib/login_methods/gae_google_account.py | 1069 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of web2py Web Framework (Copyrighted, 2007-2009).
Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu>.
License: GPL v2
Thanks to Hans Donner <hans.donner@pobox.com> for GaeGoogleAccount.
"""
from google.appengine.api import users
... | mit |
kalinmarkov/SoftUni | JS Core/JS Fundamentals/02. Lab - Control-Flow Logic/8. Fruit or Vegetable.js | 511 | function food(word) {
switch (word) {
case 'banana':
case 'apple':
case 'kiwi':
case 'cherry':
case 'lemon':
case 'grapes':
case 'peach':
console.log('fruit');
break;
case 'tomato':
case 'cucumber':
case 'pepper... | mit |
ScreenBasedSimulator/ScreenBasedSimulator2 | src/main/java/mil/tatrc/physiology/datamodel/bind/CircuitCalculatorData.java | 1184 | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2015... | mit |
madeso/prettygood | dotnet/Tagger/AutoTagger.Designer.py | 9616 | namespace Tagger
{
partial class AutoTagger
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param ... | mit |
ISO-tech/sw-d8 | web/2005-2/549/549_13_CinderellaMan.php | 6313 | <html>
<head>
<title>
Seabiscuit in boxing gloves
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php include "../../legacy-includes/Script.htmlf" ?>
</head>
<body bgcolor="#FFFFCC" text="000000" link="990000" vlink="660000" alink="003366" leftmargin="0" topmargin="0">
<table widt... | mit |
Azure/azure-sdk-for-python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_01_01/operations/_blob_services_operations.py | 13580 | # coding=utf-8
# --------------------------------------------------------------------------
# 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 ... | mit |
MicroPyramid/Django-CRM | accounts/migrations/0005_auto_20190212_1334.py | 1498 | # Generated by Django 2.1.5 on 2019-02-12 08:04
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("contacts", "0002_auto_20190212_1334"),
("leads", "0004_auto_20190212_1334"),
... | mit |
PeterPalmer/SvgSpinner | SvgSpinner/Scripts/raphael.d.ts | 13860 | // Type definitions for Raphael 2.1
// Project: http://raphaeljs.com
// Definitions by: https://github.com/CheCoxshall
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
interface BoundingBox {
x: number;
y: number;
x2: number;
y2: number;
width: number;
height: number;
}
inte... | mit |
arquio/apollo-server | packages/apollo-server-koa/src/koaApollo.ts | 1981 | import * as koa from 'koa';
import {
GraphQLOptions,
HttpQueryError,
runHttpQuery,
} from 'apollo-server-core';
import * as GraphiQL from 'apollo-server-module-graphiql';
export interface KoaGraphQLOptionsFunction {
(ctx: koa.Context): GraphQLOptions | Promise<GraphQLOptions>;
}
export interface KoaHandler {
... | mit |
calonso-conabio/buscador | app/lib/taxon_describers/conabio.rb | 566 | module TaxonDescribers
class Conabio < Base
def self.describer_name
'CONABIO'
end
def self.describe(taxon)
if cat = taxon.scat
page = conabio_service.search(cat.catalogo_id)
if page.blank?
TaxonDescribers::ConabioViejo.describe(taxon)
else
page
... | mit |
xingoxu/works | index-src/js/nextpageajax.js | 1549 | /**
* @author xingo
* @date 2016-03-07 version 0.1
* @description 首页无限向下加载
* @update
*
*/
define([], function() {
var limitHeight = 200;
var getCurrentPage = function() {
return $('#page-nav').children('.current').text();
};
var taskid = 0;
var processing = false;
var handler = function() {
clearTi... | mit |
dcturner/tk_relic | js/relics/relic.js | 687 | Relic = {};
Relic['shaders'] = [];
relic_update = function() {};
Relic.RelicScene = function(name) {
// collada
_this = this;
this.name = name;
this.ready = false;
// COLLADA
this.relicLoader = new THREE.ColladaLoader();
this.relicLoader.load("relicAssets/carbon/geo/main.dae", function(geo) {
_this.relicCon... | mit |
gumblex/zhconv | docs/conf.py | 9825 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# zhconv documentation build configuration file, created by
# sphinx-quickstart on Tue Jan 17 19:18:49 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# aut... | mit |
paulvickery/hypothesis-testing-calculator | Android/HypothesisTestingAndroid/Properties/AssemblyInfo.cs | 1024 | using System.Reflection;
using System.Runtime.CompilerServices;
using Android.App;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle ("HypothesisTestingAndroid")]
[assembly: AssemblyDescription ("")]
[assembly: A... | mit |
redPanther/hyperion.ng | src/hyperiond/main.cpp | 8877 | #include <cassert>
#include <csignal>
#include <unistd.h>
#include <stdlib.h>
#ifndef __APPLE__
/* prctl is Linux only */
#include <sys/prctl.h>
#endif
#include <exception>
#include <QCoreApplication>
#include <QApplication>
#include <QLocale>
#include <QFile>
#include <QString>
#include <QResource>
#include <QDir>
... | mit |
RaynaldM/autohelp | AutoHelp/Helpers/DocServiceFactory.cs | 573 | using System;
using System.Web.Configuration;
using System.Web.Hosting;
using AutoHelp.domain.Services;
namespace AutoHelp.Helpers
{
public static class DocServiceFactory
{
public static DocServices CreatServices()
{
// get value from web config
var assemblyPath = WebCo... | mit |
blakmatrix/node-zendesk | lib/client/ticketaudits.js | 769 | //TicketAudits.js: Client for the zendesk API.
var util = require('util'),
Client = require('./client').Client;
var TicketAudits = exports.TicketAudits = function (options) {
this.jsonAPINames = [ 'audits', 'audit' ];
this.sideLoadMap = [
{ field: 'author_id', name: 'author', dataset: 'users'... | mit |
jonathanlee46/online-connect | db/migrate/201506010000_create_users.rb | 202 | class CreateUsers < ActiveRecord::Migration
def change
create_table :users do |t|
t.string :name
t.string :password_hash
t.string :email
t.timestamps
end
end
end
| mit |
BePark/laravel-confirm | src/Services/ConfirmService.php | 1478 | <?php
namespace BePark\Libs\Confirm\Services;
use BePark\Libs\Confirm\ValueObjects\ConfirmMessage;
use Illuminate\Http\Request;
/**
* Allow to play in an easier way with confirmation
*/
class ConfirmService
{
/**
* Ask people to confirm their choice, using url (and get) instead of form (and post)
* @param Con... | mit |
github/codeql | javascript/ql/test/library-tests/frameworks/EventEmitter/tst.js | 1228 | var emitter = require('events').EventEmitter;
var em = new emitter();
// Splitting different channels
em.addListener('FirstEvent', function (first) {});
em.on('SecondEvent', function (second) {});
em.emit('FirstEvent', 'FirstData');
em.emit('SecondEvent', 'SecondData');
// Splitting different emitters.
var em2 = ne... | mit |
Lansoweb/request-id | src/RequestId.php | 3242 | <?php
declare(strict_types=1);
namespace LosMiddleware\RequestId;
use InvalidArgumentException;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Ramsey\Uuid\Uuid;
use Ramsey\Uuid\UuidInterfac... | mit |
rug-compling/hmm-reps | inference/hmm_splitmerge.py | 2891 | import logging
import numpy as np
from util.log_domain import logzero, sselogsum
__author__ = 'sim'
class HMMsplitmerge:
# @profile
def get_loss(self, N, forward, backward, ll, norm_emission_counts):
"""
:param forward: forward trellis
:param backward: backward trellis
:par... | mit |
ikatyang/dts-element | src/types/array-type.ts | 910 | import * as ts from 'typescript';
import { IType } from '../collections';
import { ElementKind } from '../constants';
import {
create_element,
is_element,
IElement,
IElementOptions,
} from '../element';
import { transform } from '../transform';
export interface IArrayTypeOptions extends IElementOptions {
typ... | mit |
flesire/ontrack | ontrack-extension-jenkins/src/main/java/net/nemerosa/ontrack/extension/jenkins/JenkinsConfiguration.java | 2123 | package net.nemerosa.ontrack.extension.jenkins;
import lombok.Data;
import net.nemerosa.ontrack.model.support.UserPasswordConfiguration;
import net.nemerosa.ontrack.model.form.Form;
import net.nemerosa.ontrack.model.form.Password;
import net.nemerosa.ontrack.model.form.Text;
import net.nemerosa.ontrack.model.support.C... | mit |
dmillerw/MineLua | src/main/java/me/dmillerw/minelua/lib/mapping/FieldMapping.java | 884 | package me.dmillerw.minelua.lib.mapping;
/**
* @author dmillerw
*/
public class FieldMapping {
public final String owner;
public final String name;
public FieldMapping(String owner, String name) {
this.owner = owner;
this.name = name;
}
@Override
public String toString() {
... | mit |
lszhu/saleSys | client/templates/order/disposal.js | 24269 | Template.orderDisposalItem.helpers({
disposalSummary: function() {
var data = Template.currentData();
//console.log('disposal: ', JSON.stringify(data));
var disposal = _.extend(data.disposal, {
delivery: data.delivery,
capital: data.capital
});
return createMessageContent(disposal);
... | mit |
alphagov/notifications-api | tests/app/dao/test_uploads_dao.py | 14177 | from datetime import datetime, timedelta
from freezegun import freeze_time
from app.dao.uploads_dao import (
dao_get_uploaded_letters_by_print_date,
dao_get_uploads_by_service_id,
)
from app.models import JOB_STATUS_IN_PROGRESS, LETTER_TYPE
from tests.app.db import (
create_job,
create_notification,
... | mit |
machine-intelligence/rl-teacher-atari | human-feedback-api/human_feedback_site/urls.py | 912 | from django.conf.urls import include, url
from django.contrib import admin
admin.autodiscover()
import human_feedback_api.views
# Examples:
# url(r'^$', 'human_comparison_site.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
urlpatterns = [
url(r'^$', human_feedback_api.views.index, name='inde... | mit |
frankydoge/blok | src/bloks/Grid/Row.js | 1120 | import React from 'react'
import PropTypes from 'prop-types'
import cx from 'classnames'
import '../../blok.css'
const Row = (props) => {
const {
children,
className,
color,
font,
size,
tag,
textAlign
} = props
var rowClass = cx ({
'row': true,
[`color-background-${color}`]: c... | mit |
jcummings/MarshallU-Wordpress-Roots-Theme | functions.php | 1338 | <?php
/**
* Roots includes
*/
require_once locate_template('/lib/utils.php'); // Utility functions
require_once locate_template('/lib/init.php'); // Initial theme setup and constants
require_once locate_template('/lib/sidebar.php'); // Sidebar class
require_once locate_template('/lib/conf... | mit |
cy6erskunk/2pane-github-diff | dist/js/diff.min.js | 21660 | (function(content_before, content_after, diff_model) {
/* jshint unused: false */
var DOM = {
addClassToNode: function (node, className) {
if (node && className) {
if (node.classList) {
node.classList.add(className);
} else if ( ! (new RegExp('(^| +)' + className +'(... | mit |
leifos/simiir | simiir/query_generators/single_reversed_tri_interleaved_generator.py | 1404 | from ifind.common.query_ranker import QueryRanker
from ifind.common.query_generation import SingleQueryGeneration
from simiir.query_generators.base_generator import BaseQueryGenerator
from query_generators.single_term_generator_reversed import SingleTermQueryGeneratorReversed
from query_generators.tri_term_generator i... | mit |
twistor/flysystem-stream-wrapper | src/Flysystem/Exception/TriggerErrorException.php | 311 | <?php
namespace Twistor\Flysystem\Exception;
use League\Flysystem\Exception;
class TriggerErrorException extends Exception
{
protected $defaultMessage;
public function formatMessage($function)
{
return sprintf($this->message ? $this->message : $this->defaultMessage, $function);
}
}
| mit |
jehovahsays/hiddenwiki | examples/chat/node_modules/php-embed/src/node_php_jsserver_class.cc | 6153 | // This is a thin wrapper object to allow javascript to call
// php_register_variable_* inside an initialization callback.
// Copyright (c) 2015 C. Scott Ananian <cscott@cscott.net>
#include "src/node_php_jsserver_class.h"
extern "C" {
#include "main/php.h"
#include "main/php_variables.h"
#include "Zend/zend.h"
#incl... | mit |
adam-boduch/coyote | app/Repositories/Contracts/CurrencyRepositoryInterface.php | 226 | <?php
namespace Coyote\Repositories\Contracts;
interface CurrencyRepositoryInterface extends RepositoryInterface
{
/**
* @param string $currency
* @return float
*/
public function latest($currency);
}
| mit |
CedricDumont/NMemory.Next | Main/Source/NMemory/Services/AnonymousTypeKeyInfoService.cs | 2915 | // ----------------------------------------------------------------------------------
// <copyright file="AnonymousTypeKeyInfoService.cs" company="NMemory Team">
// Copyright (C) NMemory Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and ass... | mit |
JGL/Reactickles3 | docs/TouchDemonstration/sketch.js | 867 | function setup() {
createCanvas(windowWidth,windowHeight); //make a fullscreen canvas, thanks to: http://codepen.io/grayfuse/pen/wKqLGL
ellipseMode(RADIUS); //https://p5js.org/reference/#/p5/ellipseMode draw with a radius rather than a width
}
function draw() {
background(0); //black background
stroke('red'); //... | mit |
andreabiggi/bivsg | src/Acme/ProvaBundle/AcmeProvaBundle.php | 126 | <?php
namespace Acme\ProvaBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class AcmeProvaBundle extends Bundle
{
}
| mit |
scala-rules/rule-engine | engine-core/src/main/scala/org/scalarules/facts/facts.scala | 1351 | package org.scalarules.facts
import org.scalarules.engine.{ErrorEvaluation, Evaluation, ListFactEvaluation, SingularFactEvaluation}
import scala.language.existentials
trait Fact[+A] {
def name: String
def description: String
def toEval: Evaluation[A]
def valueType: String
override def toString: String =... | mit |
alexyz/vcswatcher | src/vcsw/RepositoryJTable.java | 4397 | package vcsw;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.util.List;
import javax.swing.*;
import javax.swing.RowSorter.SortKey;
import javax.swing.table.*;
import vcsw.Main;
import vcsw.Repository;
import static vcsw.Main.*;
public class RepositoryJTable extends JTable {
public s... | mit |
yurri92/MPLS-inventory-management | MPLSinventory/ip_address_tools.py | 1735 | import sys
PYTHON2 = sys.version_info[0] < 3
if PYTHON2:
from ipaddr import IPv4Network, IPv4Address
class IPv4Interface(IPv4Network):
# def __init__(self, config):
# super(IPv4Interface, self).__init__(config)
@property
def network(self):
return IPv4Network(s... | mit |
JunichiIto/ruby-for-beginners | test/samples_test.rb | 7312 | require 'minitest/autorun'
class SamplesTest < Minitest::Test
def assert_syntax(code)
# http://stackoverflow.com/a/18749289/1058763
stderr = $stderr
$stderr.reopen(IO::NULL)
RubyVM::InstructionSequence.compile(code)
$stderr.reopen(stderr)
assert true
end
def test_samples
assert_syntax... | mit |
luhmann/redis-casper | logger.js | 691 |
var winston = require('winston');
var logger = new winston.Logger({
transports: [
new winston.transports.File({
level: 'info',
filename: './logs/all-logs.log',
handleExceptions: true,
json: true,
maxsize: 5242880, //5MB
maxFiles: 5,
... | mit |
edbiler/BazaarCorner | module/janrain/include/phpfox.class.php | 451 | <?php
/**
* [PHPFOX_HEADER]
*/
defined('PHPFOX') or exit('NO DICE!');
/**
*
*
* @copyright [PHPFOX_COPYRIGHT]
* @author Raymond_Benc
* @package Phpfox_Module
* @version $Id: phpfox.class.php 2628 2011-05-25 13:06:52Z Raymond_Benc $
*/
class Module_Janrain
{
public static $aDevelopers = array(
ar... | mit |
Pietervdw/sageone-api-wrapper | src/SageOneApi.Tests/AccountTests.cs | 1119 | using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SageOneApi.Models;
namespace SageOneApi.Tests
{
[TestClass]
public class AccountTests : TestBase
{
[TestMethod]
public void GetAllAccounts()
{
var accounts = Api.AccountRequest.Get(true);
... | mit |
oswaldderiemaecker/feed-io | src/FeedIo/Rule/ModifiedSince.php | 1184 | <?php
/*
* This file is part of the feed-io package.
*
* (c) Alexandre Debril <alex.debril@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace FeedIo\Rule;
use FeedIo\Feed\NodeInterface;
use FeedIo\DateRuleAbstra... | mit |
himulawang/observer | js/store/db_store.js | 1164 | /**
* Created by ila on 5/24/2015.
*/
"use strict"
class DBStore {
static exportDB() {
let waitList = [];
let data = {};
return localforage.keys().then(function(keys) {
keys.forEach(function(key) {
let promiseChild = new Promise(function(resolve, reject) {
... | mit |
Karasiq/scalajs-highcharts | src/main/scala/com/highstock/config/PlotOptionsParetoPathfinderMarker.scala | 5373 | /**
* Automatically generated file. Please do not edit.
* @author Highcharts Config Generator by Karasiq
* @see [[http://api.highcharts.com/highstock]]
*/
package com.highstock.config
import scalajs.js, js.`|`
import com.highcharts.CleanJsObject
import com.highcharts.HighchartsUtils._
/**
* @note JavaScript... | mit |
prasetyaningyudi/layangsworo | application/views/instansi_rekam_view.php | 806 | <!-- content goes here -->
<div class="my-content">
<div class="row">
<div class="col-lg-12">
<div class="panel panel-brown">
<div class="panel-heading">
<div class="panel-title">Rekam Instansi</div>
</div>
<div class="panel-body">
<form action="" id="instansiform" method="post" class="f... | mit |
mactookmyname/ttn-imdbot | src/data/omdb.js | 2230 | import request from 'request-promise';
import _ from 'lodash';
import { SERIES_DURATION } from '../config';
import stripYear from '../utils/stripYear';
import getTitle from './titles';
/**
* Attemps to get imdb info based on the following logic:
* 1. exact title match yields one result
* 2. exact type (series, mov... | mit |
Ullfis/aurelia-mdc-bridge | dist/native-modules/button/icon-toggle/icon-toggle.js | 3626 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(d... | mit |
portchris/NaturalRemedyCompany | src/app/code/community/Ess/M2ePro/Model/Connector/Connection/Response/Message.php | 1657 | <?php
/*
* @author M2E Pro Developers Team
* @copyright M2E LTD
* @license Commercial use is forbidden
*/
class Ess_M2ePro_Model_Connector_Connection_Response_Message extends Ess_M2ePro_Model_Response_Message
{
const SENDER_KEY = 'sender';
const CODE_KEY = 'code';
const SENDER_SYSTEM = '... | mit |
solzimer/nsyslog | test/test_shm.js | 433 | const cluster = require('../lib/cluster');
if(cluster.isMaster) {
const Shm = require('../lib/shm');
cluster.fork("./test_shm.js",[]);
setTimeout(()=>{
Shm.hpush('fork','flow1',{data:'data1'});
Shm.hpush('fork','flow1',{data:'data2'});
Shm.hpush('fork','flow1',{data:'data3'});
},1000);
}
else {
const Shm =... | mit |
julianh2o/Podbase | app/util/Stopwatch.java | 2136 | // Copyright 2013 Julian Hartline <julianh2o@gmail.com>
//
// This code is available under the MIT license.
// See the LICENSE file for details.
package util;
import java.io.File;
import java.nio.file.Path;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
imp... | mit |
cuikangyi/alipay_cash_register_server | Application/YunfuApi/Controller/DeviceController.class.php | 1841 | <?php
/**
* Created by PhpStorm.
* User: Kangyi
* Date: 2015/1/17
* Time: 11:30
*/
namespace YunfuApi\Controller;
use Think\Controller;
class DeviceController extends Controller{
public function index(){
$result['is_success'] = 'F';
$result['error_msg'] = '弃用';
returnXml($result);
... | mit |
ManifestWebDesign/dabl-query | src/DBManager.php | 4298 | <?php
/**
* @link https://github.com/ManifestWebDesign/DABL
* @link http://manifestwebdesign.com/redmine/projects/dabl
* @author Manifest Web Design
* @license MIT License
*/
namespace Dabl\Query;
use Dabl\Adapter\DABLPDO;
use PDOException;
use RuntimeException;
/**
* Database Management class. Handles conn... | mit |
uwoseis/zephyr | zephyr/middleware/fields.py | 4782 | from __future__ import print_function, unicode_literals, division, absolute_import
from future import standard_library
standard_library.install_aliases()
from builtins import range
import numpy as np
import scipy.sparse as sp
from ..backend import BaseModelDependent
import SimPEG
class HelmFields(SimPEG.Fields.Fields... | mit |
toanphuoc/tkvacation_client | js/controller/tours_controller.js | 160 | app.controller('DestinationTourController', ['$scope', '$routeParams', function ($scope, $routeParams) {
var id = $routeParams.desId;
console.log(id);
}]); | mit |
linpaul2004/JavaWorkspace | Lab0513/src/chapter12/MyThread.java | 354 | package chapter12;
public class MyThread extends Thread {
private String name;
public MyThread(String name) {
this.name = name;
}
public void run() {
while (true) {
System.out.println("Helo! I am " + name);
try {
Thread.sleep((long) Math.random() * 2000);
} catch (InterruptedException e) {
e... | mit |
FireEngineRed/framework | src/Illuminate/Foundation/Testing/Concerns/InteractsWithPages.php | 23422 | <?php
namespace Illuminate\Foundation\Testing\Concerns;
use Closure;
use Exception;
use Illuminate\Support\Str;
use InvalidArgumentException;
use Illuminate\Http\UploadedFile;
use Symfony\Component\DomCrawler\Form;
use Symfony\Component\DomCrawler\Crawler;
use Illuminate\Foundation\Testing\HttpException;
use PHPUnit_... | mit |
cleentfaar/CLTriggerBundle | Tests/DependencyInjection/ExtensionTest.php | 615 | <?php
namespace CL\Bundle\TriggerBundle\Tests\DependencyInjection;
use CL\Bundle\TriggerBundle\DependencyInjection\CLTriggerExtension;
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase;
class ExtensionTest extends AbstractExtensionTestCase
{
/**
* @test
*/
public functio... | mit |
angry-glass-studios/notation-android | scripts/support/test.rb | 425 | def build_test_database
puts "Building test database"
unless File.exist?("#{DATABASE_TEST_PATH}")
system "mkdir -p #{DATABASE_TEST_PATH}"
end
if File.exist?("#{DATABASE_TEST_PATH}/#{DATABASE_NAME}")
system "rm #{DATABASE_TEST_PATH}/#{DATABASE_NAME}"
end
Dir["#{DATABASE_PATH}/sc*"].each {|file|
... | mit |
katyaeka2710/python2017005 | account/migrations/0001_initial.py | 3176 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-26 19:03
from __future__ import unicode_literals
from django.db import migrations, models
import django_countries.fields
import localflavor.us.models
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0008... | mit |
TypesInCode/jTemplates | src/Node/boundNode.types.ts | 1088 | import { Injector } from "../Utils/injector";
import { IDestroyable } from "../Utils/utils.types";
import { NodeRefType } from "./nodeRef";
import { INodeRef, INodeRefBase } from "./nodeRef.types";
export type FunctionOr<T> = {(...args: Array<any>): T | Promise<T> } | T;
export type NodeRefEvents = {
[name: strin... | mit |