code stringlengths 2 1.05M |
|---|
var CompositeDisposable = require('atom').CompositeDisposable;
module.exports = {
subscriptions: null,
activate: function(state) {
var _this = this;
this.subscriptions = new CompositeDisposable;
return this.subscriptions.add(atom.commands.add('atom-workspace', {
'atom-bemme... |
import React from 'react'
import { patchData } from '../../helpers'
class ChangeTranscript extends React.Component {
constructor(){
super()
this.confirm = this.confirm.bind(this)
this.blacklistTranscript = this.blacklistTranscript.bind(this)
this.state = {
confirmChange:false,
}
}
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const mysql = require("mysql");
const config_1 = require("./config");
let pool = mysql.createPool(Object.assign({}, config_1.db));
exports.default = pool;
//# sourceMappingURL=db.js.map |
'use strict';
var Hoopla = require('hoopla');
var Request = require('./messages/Request');
var Response = require('./messages/Response');
var HttpRequestEvent = require('./events/HttpRequestEvent');
var HttpResponseEvent = require('./events/HttpResponseEvent');
var encodeAttributes = require('./utilities/encodeAttribut... |
import { getRenderedVm, createVue, destroyVM } from '../utils'
import CellBox from 'components/cell-box'
describe('component cell-box testing', () => {
let vm
afterEach(() => {
destroyVM(vm)
})
it('should render correct classes', () => {
vm = getRenderedVm(CellBox, {})
expect(vm.$el.className).toE... |
"use strict";
module.exports = {
AdonError: require('./errors/AdonError'),
command: {
CommandError: require('./errors/command/CommandError'),
CommandInvalidError: require('./errors/command/CommandInvalidError'),
CommandNotFoundError: require('./errors/command/CommandNotFoundError')
},
database: {
DatabaseE... |
/*
* @name jQuery.bootcomplete
* @projectDescription Lightweight AJAX autocomplete for Bootstrap 3
* @author Rick Somers | http://getwebhelp.com/bootcomplete
* @modified Danyel Cabello to use client side filtering
* @version 1.0
* @license MIT License
*
*/
(function ( $ ) {
$.fn.bootcomplete = function(options) ... |
const fonts = [
'Arial',
'Arial Black',
'Comic Sans MS',
'Courier New',
'Helvetica Neue',
'Helvetica',
'Impact',
'Lucida Grande',
'Tahoma',
'Times New Roman',
'Verdana'
];
export default {
install(Leylim) {
let isOpen = false;
let isProcessed = false;
let _selection = null;
con... |
describe('select callback', function() {
var options;
beforeEach(function() {
affix('#cal');
options = {
defaultDate: '2014-05-25',
selectable: true
};
});
afterEach(function() {
$('#cal').njCalendar('destroy');
});
[ false, true ].forEach(function(isRTL) {
describe('when isRTL is ' + isRTL, f... |
(function() {
var modalTemplate,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
modalTemplate = "<div class=\"modal\" tabindex=\"-1\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n </div>\n </div>\n</div>";
window.RemoteModalView = (function() ... |
const path = require('path');
const webpack = require('webpack');
const config = require('../src/config');
const rootPath = path.resolve(__dirname, '../');
const srcPath = path.join(rootPath, '/src/');
const distPath = path.join(rootPath, '/build/');
const webpackConfig = {
devtool: false,
entry: {
main: ['ba... |
'use strict'
var op = require('pitch-op')
// pitch to pitch classes
function pitchClasses (gamut) { return gamut.map(op.pitchClass) }
// simplify interval
function simplify (gamut) { return gamut.map(op.simplify) }
// return pitch heights: distance from C0 or interval semitones
function heights (gamut) { return gam... |
var convict = require('convict');
var fs = require('fs');
var path = require('path');
const config = convict({
cron: {
doc: 'Cron schedule for capturing images',
format: String,
default: '0,10,20,30,40,50 * * * *',
env: 'CRON',
arg: 'cron'
},
dropbox: {
... |
{
if (props.x === 297) {
return React.createElement(
"div",
{
className: "_1o_8 _44ra _5cyn"
},
React.createElement(AdsPECampaignGroupEditorContainer133, {
x: 296
})
);
}
}
|
/**
* autoNumeric.js
* @author: Bob Knothe
* @author: Sokolov Yura
* @version: 1.9.39 - 2015-07-17 GMT 5:00 PM / 19:00
*
* Created by Robert J. Knothe on 2010-10-25. Please report any bugs to https://github.com/BobKnothe/autoNumeric
* Contributor by Sokolov Yura on 2010-11-07
*
* Copyright (c) 2011 Robert J. K... |
import React, { Component } from 'react'
import axios from 'axios'
import Layout from '../../components/Layout'
import Footer from '../../components/Footer'
import Button from '../../components/Button'
import s from './Posts.css'
/** Content from a .md file */
import {key, user, userAvatar, title, atCreated, viewrs, c... |
/*
gulpfile.js
gulp task runner for angular BeersApp
Copyright (c) 2015
Patrick Crager
*/
'use strict';
// required modules
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
rename = require('gulp-rename'),
minifyCSS = ... |
{
var s = scale
.scaleSequential(function(t) {
return t;
})
.domain([-1, 100, 200]);
test.deepEqual(s.domain(), [-1, 100]);
test.end();
}
|
var reflux = require("reflux");
var imagesApi = require("../api/imagesApi");
var _ = require("lodash");
var Actions = reflux.createActions({
"load": {children: ["completed", "failed"]}
});
Actions.load.listen( function() {
imagesApi.getImages().then((res) => {
var sample = _.sample(res.data, 1... |
ZRF = {
JUMP: 0,
IF: 1,
FORK: 2,
FUNCTION: 3,
IN_ZONE: 4,
FLAG: 5,
SET_FLAG: 6,
POS_FLAG: 7,
SET_POS_FLAG: 8,
ATTR: 9,
SET_ATTR: 10,
PROMOTE: 11,
MODE: 12,
ON_BOARD_DIR: 13,
... |
import { handleActions } from 'redux-actions';
import { mergeSubReducers } from 'utils/immutableReducerUtils.js';
import { Mission as InitialState } from 'store/mission/missionModels.js';
// Sub reducers and actions
import missionList from 'store/mission/missionList/missionListReducers.js';
import selectedMission fro... |
/**
* class CssoCompressor
*
* Engine for CSS minification. You will need `csso` Node module installed:
*
* npm install csso
*
*
* ##### SUBCLASS OF
*
* [[Template]]
**/
'use strict';
// 3rd-party
var csso; // initialized later
// internal
var Template = require('../templ... |
if(!Array.prototype.indexOf)Array.prototype.indexOf=function(o,m,r){m=+m||0;for(var q=this.length;m<q;m++)if(this[m]===o||r&&this[m]==o)return m;return-1};
(function(){var o={},m=[],r=[],q=1200,v=function(a,e){$.extend(a,e)},z=function(a,e){a=a.attr("id");for(var b=o[a],c=0;c<b.length;c++)b[c].paint(a,e)},x=function(a,... |
(function(c){function g(b,a){this.element=b;this.options=c.extend({},h,a);c(this.element).data("max-height",this.options.maxHeight);c(this.element).data("height-margin",this.options.heightMargin);delete this.options.maxHeight;if(this.options.embedCSS&&!k){var d=".readmore-js-toggle, .readmore-js-section { "+this.option... |
/**
*
*
*/
angular.module('MRT').directive('termSearchPageview', termSearchPageview);
function termSearchPageview($parse) {
var directive = {
restrict: 'AE',
templateUrl: 'pension/tpls/term/term-search-pageview.html',
replace: false,
//our data source would be an array
... |
'use strict';
let Helpers = rootRequire('helpers');
let logger = new Helpers().logger;
var className = 'CURRENCIES'
class Currencies {
constructor (currencies, ratesApi) {
//Save the current array of currencies in memory so API is only called
//once. WISH: Test the performance
this.currencies = currencies || ... |
#!/usr/bin/env node
/*
In the blog, it says to add the folloing to the package.json scripts.
Instead, we'll do the work in this script and call it from package.json
"relay": "curl https://graphql-demo.kriasoft.com/schema -o ./src/graphql.schema && relay-compiler --src ./src --schema ./src/graphql.schema
M... |
"use strict"
const { withCategories } = require("../../scripts/lib/rules")
require("../../scripts/update-docs-headers")
require("../../scripts/update-docs-index")
module.exports = {
base: "/eslint-plugin-eslint-comments/",
title: "eslint-plugin-eslint-comments",
description: "Additional ESLint rules for E... |
/*@ngInject*/
function UserService($window, $log, Restangular, $state) {
const self = this;
if ($window.localStorage.mcuser) {
try {
self.mcuser = angular.fromJson($window.localStorage.mcuser);
} catch (err) {
$log.log('Error parse mcuser in localStorage');
se... |
// Eloquent JavaScript
// Run this file in your terminal using
// `node my_solution.js`.
// Make sure it works before moving on!
// Program Structure
// Write your own variable and do something to it.
var x = 5
console.log(x*x)
// Write a short program that asks for a user to input
// their favorite food. Afte... |
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Drawer from '@material-ui/core/Drawer';
import CssBaseline from '@material-ui/core/CssBaseline';
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
import List from '@material-ui/core/Li... |
import React from 'react';
import PropTypes from 'prop-types';
import Card from '@material-ui/core/Card';
import Box from '@material-ui/core/Box';
import List from '@material-ui/core/List';
import TeamTasksListItem from './TeamTasksListItem';
const TeamTasksProject = props => props.project.teamTasks.length ? (
<Box ... |
'use strict';
var h = require('..');
// translations:
var tr = h.translator;
tr.ruleFor('goal', function(item) {
return {
name: item.value
};
});
tr.ruleFor('item', function(goal) {
return {
value: goal.name
};
});
var goal = { name: 'some item name' };
var item = { value: 'some item name' };
cons... |
module.exports = {
entry: {
app: [
'webpack-dev-server/client?http://localhost:9000',
'./src/index.js',
]
},
output: {
path: __dirname,
publicPath: '/',
filename: '[name].bundle.js'
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
... |
exports.up = function(knex, Promise) {
return knex.schema.createTableIfNotExists('users', function (table) {
table.increments('id')
table.bigInteger('passportId')
table.string('name')
table.string('shortlist')
table.timestamps()
})
};
exports.down = function(knex, Promise) {
return knex.schema.dr... |
export class Tooltip {
constructor () {
this._div = document.getElementById('tooltip')
}
set (x, y, offsetX, offsetY, html) {
this._div.innerHTML = html
// Assign display: block so that the offsetWidth is valid
this._div.style.display = 'block'
// Prevent the div from overflowing the page w... |
var request = require('supertest-as-promised');
var api = require('../server.js');
var host = process.env.API_TEST_HOST || api;
var mongoose = require('mongoose');
// var host = 'http://localhost:3000';
var _ = require('lodash');
request = request(host);
describe('Admnistracion de tiquetes [/tickets]', function() {
... |
app.controller( 'PlayerListController', PlayerListController );
function PlayerListController( $scope, rconService, $interval )
{
$scope.Output = [];
$scope.OrderBy = '-ConnectedSeconds';
$scope.Refresh = function ()
{
rconService.getPlayers($scope, function ( players )
{
$scope.Players = players;
});
... |
/* global beforeEach, describe, process, afterEach, it, require */
'use strict';
const initCommand = require('../src/init');
const assert = require('chai').assert;
const fs = require('fs');
const mockFs = require('mock-fs');
const path = require('path');
const sinon = require('sinon');
const toml = require('toml');
... |
/****************************************************************************
Copyright (c) 2008-2010 Ricardo Quesada
Copyright (c) 2011-2012 cocos2d-x.org
Copyright (c) 2013-2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a cop... |
'use strict';
module.exports = function(app) {
app.directive('headerDirective', function() {
return {
restrict: 'AC',
templateUrl: '../templates/header_directive_template.html'
}
});
};
|
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React from 'react';
import {Router} from 'react-routing';
import http from './core/HttpClient';
import App from './components/App';
import ContentPage from './components/ContentPage';
import ContactPage from './components/ContactPage';
imp... |
var test = require('tape');
var View = require('..');
test('view init', function (t) {
var view = View();
view.init();
t.ok(view, 'All is well with `view`');
t.end();
});
test('view events', function (t) {
document.body = document.createElement('body');
document.body.appendChild(document.creat... |
import 'whatwg-fetch';
/**
* Utility function that returns a function that can be called by sagas
* to parse a network response JSON.
*
* @param {object} response A response from a network request
*
* @return {function}
*/
export function parseResponse(response) {
return () => {
return response.json();
... |
'use strict';
/*globals eventsApp,alert*/
eventsApp.directive('greeting', function () {
return {
restrict: 'E',
replace: true,
transclude: true,
template: "<div><button class='btn btn-default' ng-click='sayHello()'>Say Hello</button><div ng-transclude></div></div>",
controller: function($scope) {... |
"use strict";
const chai = require('chai');
const expect = chai.expect;
// 1 red: design what the function looks like in terms of how it is tested
function timeString(string) {
return '?';
}
describe('timeString test', function() {
it('Returns single output when string is inputed', function() {
expect(timeS... |
var config = require('../../config');
var gulp = require('gulp-help')(require('gulp'));
var revReplace = require('gulp-rev-replace');
var path = require('path');
// 3) Update asset references with reved filenames in compiled css + js
gulp.task('rev-update-references', false, ['rev-iconfont-work... |
/*
* Copyright (c) 2014.
*
* @author Andy Tang
*/
(function GameSquareSpec(whereIt) {
'use strict';
describe('GameSquare Model', function gameSquareModelSpec() {
var GameSquareModel;
var GameObjectModel;
var SaberModel;
var CharacterModel;
beforeEach(module('jsWar... |
var systemNormalize = System.normalize;
System.normalize = function (name, parentName, parentAddress) {
if (name.indexOf('availpro-') > -1) {
var defaultJSExtension = this.defaultJSExtensions ? '.js' : '';
name = this.baseURL + this.paths['availpro-*'].replace(new RegExp('availpro-\\*', 'g'), name... |
'use strict';
/* Services */
angular.module('alienMail.services', ['ngResource']).
factory('Messages', function($resource){
return $resource('/messages/:messageId.json', {}, {
query: {method:'GET', params:{messageId:'summaries'}, isArray:true}
});
});
|
'use strict';
var React = require('react');
var d3 = require('d3');
var BarContainer = require('./BarContainer');
module.exports = React.createClass({
displayName: 'DataSeries',
propTypes: {
_data: React.PropTypes.array,
series: React.PropTypes.array,
colors: React.PropTypes.func,... |
'use strict';
/*jshint -W079 */
var expect = require('chai').expect;
var victim = require('../src/muton');
describe('When entering user properties and feature instructions', function () {
it('should ignore null user properties', function () {
var instructions = {
feature1: {
... |
// @flow
// Copyright (c) 2016 Uber Technologies, Inc.
//
// 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/LICENSE-2.0
//
// Unless required by applicable la... |
version https://git-lfs.github.com/spec/v1
oid sha256:3dbc8ecec3670ca22d0e94e29ec4be517714202962d7e0a84e1ca18c0ecd7f48
size 282868
|
import createRouter from '@alias/blog-router'
const router = createRouter()
export default { router }
|
version https://git-lfs.github.com/spec/v1
oid sha256:023b957e9bfe0310712c45b750a8a14c27828409753a561ef2fb876566260455
size 637
|
'use strict';
// Declare app level module which depends on filters, and services
var autoExpo = angular.module('autoExpoApp', [
'ngRoute',
'autoExpoAppControllers',
'autoExpoAppDirectives',
'autoExpoAppServices'
]);
autoExpo.config(['$routeProvider',
function($routeProvider) {
$routeProvider.when('/', {
te... |
/*
说明: 请勿修改 header.js 和 footer.js
用途: 自动拼接暴露方式
命令: grunt release 中 concat
*/
(function(global, factory) {
if (typeof exports === 'object' && typeof module !== 'undefined') {
module.exports = factory();
} else if (typeof define === 'function' && define.amd) {
define(factory);
} el... |
function initialize(complete) {
// Configure Backbone to talk with Rails
Backbone.ajax = function() {
Backbone.$.ajaxSetup.call(Backbone.$, {
beforeSend: function(jqXHR){
var token = $("meta[name='csrf-token']").attr('content');
jqXHR.setRequestHeader('X-CSRF-Token', token);
}
})... |
const _ = require('lodash')
const { Todo } = require('../../models/todo')
const router = require('express').Router()
const { ObjectID } = require('mongodb')
const { authenticate } = require('../authenticate')
router.post('/todos', authenticate, (req, res) => {
let { text } = req.body
let _creator = req.user._id
... |
define(function(require) {
'use strict';
var q = require('q');
var AppObj = require('js/app/obj');
var Display = require('js/display/obj');
var logger = AppObj.logger.get('root/js/apps/user/profile/controller');
AppObj.module('UserApp.Profile', function(Profile, AppObj, Backbone, Marionette, $, _) {
... |
module.exports = [
// html tags
{
name: 'empty html',
data: '<html></html>'
},
{
name: 'html with attribute',
data: '<html lang="en"></html>'
},
{
name: 'html with empty head and body',
data: '<html><head></head><body></body></html>'
},
{
name: 'html with empty head',
dat... |
import {applyMiddleware, combineReducers, compose, createStore} from "redux";
import promiseMiddleware from "redux-promise-middleware";
import {reducer as formReducer} from "redux-form";
export default function(middleware, todoListReducer, todoFormReducer) {
const reducer = combineReducers({list: todoListReducer, fo... |
/**
* Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>
* Build: `lodash modularize underscore exports="node" -o ./underscore/`
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
* Copyright 2009-2013 Jeremy Ashkenas, DocumentClou... |
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var AuthorSchema = Schema({
first_name: {type: String, required: true, max: 100},
family_name: {type: String, require: true, max: 100},
date_of_birth: {type: Date},
date_of_death: {type: Date},
});
AuthorSchema
.virtual('name')
.get(function() {
... |
var Component = new Brick.Component();
Component.requires = {
mod: [
{name: '{C#MODNAME}', files: ['io.js', 'app.js']}
]
};
Component.entryPoint = function(NS){
/* * * * * * * DEPRECATED * * * * * * */
var Y = Brick.YUI,
L = Y.Lang,
UID = Brick.env.user.id | 0,
ADDED ... |
/*! jQuery UI - v1.11.2 - 2015-01-02
* http://jqueryui.com
* Includes: core.js, widget.js, position.js, autocomplete.js, menu.js
* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous mod... |
var test = require('tape');
var HttpHash = require('../index.js');
test('httpHash is a function', function (assert) {
assert.equal(typeof HttpHash, 'function');
assert.end();
});
test('http hash inserts root', function (assert) {
// Arrange
function routeHandler() {}
var hash = HttpHash();
... |
'use strict';
describe('copy-ast', function() {
var types = require('../lib/types');
var b = types.builders;
var copyAST = require('../lib/copy-ast');
var assert = require('assert');
it('copies things', function() {
var original = b.charSetUnion([b.charSet(['a', 'b']), b.charSet(['c', 'd'])]);
var co... |
beforeEach(function() {
this.addMatchers({
toBeAnInstanceOf: function(expectedClass) {
var instance = this.actual;
return instance instanceof expectedClass;
}
});
});
var fixtureBlock = function(){
return document.getElementById("jasmine_content");
};
var fixtureClear = function(){
var e =... |
'use strict';
var mockActionProvider = function(actionMap, doneAction) {
var self = {};
actionMap = actionMap || {};
doneAction = doneAction || function(){};
self.actionMap = function(_) {
if (!arguments.length) return actionMap;
actionMap = _;
return self;
};
self.watcher = function() {
... |
app.controller('opnodesContent', ['$rootScope', '$scope', '$http', '$interval',
function($rootScope, $scope, $http, $interval) {
var getColumnDefs = function(rows) {
// columnDefs.push({ name: 'id', field: 'id', cellTemplate: '<div><input type="checkbox"></input></div>' });
};
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var _1 = require("../");
var key_1 = require("./key");
/*
* GET key
* Get the value of a key
*/
function get(key, callback) {
if (!_1.isMasterNode()) {
_1.store.dispatch("get", callback, key);
}
else {
return _1.... |
var vertShader =
"varying vec4 frontColor;" +
"attribute vec3 ps_Vertex;" +
"attribute vec3 ps_Normal;" +
"attribute vec4 ps_Color;" +
"uniform float ps_PointSize;" +
"uniform vec3 ps_Attenuation;" +
"uniform vec3 lightPos;" +
"uniform bool reflection;"+
"uniform mat4 ps_ModelViewMatrix;" +
"uniform mat4 ps_Proje... |
/**
* @overview datejs
* @version 1.0.0-beta-2014-03-25
* @author Gregory Wild-Smith <gregory@wild-smith.com>
* @copyright 2014 Gregory Wild-Smith
* @license MIT
* @homepage https://github.com/abritinthebay/datejs
*/
/*
2014 Gregory Wild-Smith
@license MIT
@homepage https://github.com/abritinthebay/datejs
2... |
/**
* Main bot logic that handles incoming messages and routes logic to helpers files
*
* @module helpers/logic
* @license MIT
*/
/** Dependencies */
const hourlyRatePicker = require('./hourlyRatePicker');
const categoryPicker = require('./categoryPicker');
const languagePicker = require('./languagePicker');
cons... |
/**
* Module dependencies
*/
var url = require('url')
var revalidator = require('revalidator')
var settings = require('../boot/settings')
var mailer = require('../boot/mailer').getMailer()
var User = require('../models/User')
var OneTimeToken = require('../models/OneTimeToken')
var PasswordsDisabledError = require('... |
/**
*
* Controller Menu
*
*/
Ext.define('App.controller.cMenu', {
extend: 'Ext.app.Controller',
models: [
"App.model.menu.Root",
'App.model.menu.Item',
'App.model.menu.menus',
'App.model.menu.menusItem',
'App.model.menu.menuEditor'
],
stores: [
'App.store.Menu',
'App.store.menu.menus'
],
views:... |
export default function() {
this.namespace = '/api';
}
export function testConfig() {
this.get('/foos');
this.get('/foos/:id');
this.get('/bars');
this.get('/bars/:id');
this.get('/bazs');
this.get('/bazs/:id');
this.get('/multis');
this.get('/multis/:id');
this.get('/foo-fixes');
this.get('/... |
var co = require("co");
var config = require("../config")("local");
var dbWrap = require("../lib/dbWrap.js");
var chunks = dbWrap.getCollection(config.mongoUrl, "chunks");
module.exports.chunks = chunks;
module.exports.removeAllDocs = function(done){
co(function *(){
yield chunks.remove({});
})(done);
};
var app ... |
export function hello () {
console.log("Hello from a.js");
}; |
import angular from 'angular';
import {
characters
} from './characters';
export const charactersModule = 'characters';
angular
.module(charactersModule, [])
.component('characters', characters);
|
const { task, series, src, dest } = require('gulp');
const rev = require('gulp-rev');
const revReplace = require('gulp-rev-replace');
task('revision', () =>
src(['dist/**/app.js', 'dist/**/*.css'])
.pipe(rev())
.pipe(dest('dist'))
.pipe(rev.manifest())
.pipe(dest('dist'))
);
task('set-revisions', se... |
angular.module('ifocus.status')
.factory('StatusService', ['$http', 'baseUrl', function ($http, baseUrl) {
return {
getSessionDistributionByDate: function (date) {
return $http.get(baseUrl + 'overview/distribution/' + date);
},
getOverviewStatusNumbers:... |
const assert = require('assert'),
underTest = require("../10/10"),
[bots, values, outputs, Bot, Value] = [underTest.bots, underTest.values, underTest.outputs, underTest.Bot, underTest.Value];
describe('10', () => {
describe('define 3 bots and 2 values', function() {
new Bot('bot 0 gives low to... |
// COPYRIGHT © 2017 Esri
//
// All rights reserved under the copyright laws of the United States
// and applicable international laws, treaties, and conventions.
//
// This material is licensed for use under the Esri Master License
// Agreement (MLA), and is bound by the terms of that agreement.
// You may redistribute... |
<html>
<script language='javascript'>
/*
includes/reloadParent.js
YeAPF 0.8.58-13 built on 2017-05-30 11:50 (-3 DST)
Copyright (C) 2004-2017 Esteban Daniel Dortta - dortta@yahoo.com
2012-08-14 11:43:36 (-3 DST)
*/
function recarregar()
{
var id=new String('#campo(id)');
var rnd=Math.random()... |
'use strict';
var Container = function () {
this._dockerContainer = null;
};
Container.prototype = {
init: function (container) {
this._dockerContainer = container;
},
start: function (opts, done) {
this._dockerContainer.start(opts, done);
},
kill: function (done) {
t... |
var TILE_SIZE = 32;
var SCREEN_WIDTH = 320;
var SCREEN_HEIGHT = 240;
// http://stackoverflow.com/a/9071606/2038264
function choose(choices) {
var index = Math.floor(Math.random() * choices.length);
return choices[index];
}
|
var conf = require('../app.json');
exports.getDocumentation = function(req, res, next){
res.header('Location', conf.documentation.url);
res.send(308, 'Redirecting to the Roomies API Documentation');
return next();
};
exports.getConf = function(req, res, next){
res.send(conf);
return next();
};
exports.meth... |
/* flash_team_update.js
* ---------------------------------
*
*/
function updateJSONFormField() {
$('#flash_team_json').val(JSON.stringify(flashTeamsJSON));
};
$('.edit_flash_team').submit(function(e) {
e.preventDefault();
var valuesToSubmit = $(this).serialize();
$.ajax({
type: 'POST',
url: $(thi... |
const querystring = require('querystring');
module.exports = function(getRequest, apiKey) {
return {
/**
* Returns the ABI/Interface of a given contract
* @param {string} address - Contract address
* @example
* api.contract
* .getabi('0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359')
* ... |
module.exports = Explicit;
var DONE = false;
function Explicit() {}
Explicit.prototype.asyncStart = function($happn, opts, optionalOpts, callback) {
if (typeof callback === 'undefined') callback = optionalOpts;
setTimeout(function() {
DONE = true;
callback(null);
}, 200);
};
Explicit.prototype.asyncS... |
import React, { Component } from 'react';
import './WordList.css';
/**
* WordList is to display the list of unique words that are
* being used in the application.
*/
class WordList extends Component {
/**
* Render the word object
*/
renderWordObject(i) {
const toggleText = i.inReadingList === 1 ? 'hi... |
'use strict';
// app.js 서버 어플리케이션에서 ES6 문법을 사용하기위한 호출파일
require('babel-register');
require('./app.js'); |
var gulp = require('gulp');
var gsplit = require('../index');
var del = require('del');
gulp.task('clean', function(cb) {
del(['tmp'], cb);
});
gulp.task('compress', ['clean'], function() {
gulp.src('file.txt')
.pipe(gsplit({
prefix: 'resource_',
ext: 'txt',
... |
var qs = require('querystring');
exports.requestToken = {
request: {
method: 'POST',
url: 'https://api.twitter.com/oauth/request_token',
},
oauth: {
consumerKey: 'GDdmIQH6jhtmLUypg82g',
consumerSecret: 'MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98',
nonce: 'QP70eNmVz8... |
const Customer = require('./customer')
class Order {
constructor(customerName) {
this._customer = Customer.getNamed(customerName)
}
getCustomerName() {
return this._customer.getName()
}
}
module.exports = Order
|
import joinUri from "join-uri"
const baseUrl = "http://daynhauhoc.com/"
export const postIdToUrl = (id) => joinUri(baseUrl, "t", id.toString())
|
'use strict';
const namespace = require('hapi-namespace');
module.exports = namespace('/api',
[
{
method: 'GET',
path: '/health',
handler: function (request, reply) {
reply('Alive!');
}
},
]
);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.