code stringlengths 2 1.05M |
|---|
const RequestV0Protocol = require('./request')
describe('Protocol > Requests > ApiVersions > v1', () => {
test('request', async () => {
const { buffer } = await RequestV0Protocol().encode()
expect(buffer).toEqual(Buffer.from(require('../fixtures/v0_request.json')))
})
})
|
var expect = require('expect.js');
var request = require('request');
var baucis = require('baucis');
var fixtures = require('./fixtures');
describe('Swagger Resource Listing', function () {
before(fixtures.vegetable.init);
beforeEach(fixtures.vegetable.create);
after(fixtures.vegetable.deinit);
it('should ge... |
test_respository.js
|
export class LowerValueConverter {
toView(value){
return value && value.toLowerCase();
}
}
|
import 'core-js/es/reflect'
import ky from 'ky/umd'
import logger from '../logger'
import UriTemplate from 'uri-templates'
export default Api({
// globals are set in src/middleware/client-preload.js
ipc: window.middlewareClient,
baseUrl: `http://127.0.0.1:${window.mapeoServerPort}/`,
mapUrl: `http://127.0.0.1:... |
import firebase from 'firebase';
import { firebaseConfig } from './config';
export const firebaseApp = firebase.initializeApp(firebaseConfig);
export const firebaseAuth = firebase.auth();
|
/**
* Created by andrey on 08/06/16.
*/
import {
ERROR_RATE_LT_MIN,
ERROR_RATE_GT_MAX,
ERROR_GT_BALANCE,
ERROR_TOTAL_LT_MIN,
TOTAL_MIN,
RATE_MIN,
RATE_MAX,
ERROR_NOT_TOUCHED
} from "containers/ExchangeBox/constants";
import {
ERROR_WITHDRAWAL_AMOUNT_GT_BALANCE,
ERROR_WITHDRAWAL_AMOUNT_LT_MIN,
... |
function obtemPreco(cod){
if(cod){
var url="exemplo4.php?cod="+cod;
requisicaoHTTP("GET",url,true);
}
}
function trataDados(){
var preco = ajax.responseText; //obtém a resposta como string
var quantidade = document.getElementById("quant").value;
try{
if(isNaN(preco)) { throw new Error("O preço retornado ... |
'use strict';
/**
* Module dependencies.
*/
var users = require('../../app/controllers/users.server.controller'),
directions = require('../../app/controllers/directions.server.controller');
module.exports = function(app) {
// Article Routes
app.route('/directions')
.get(directions.list)
.post(users.requiresL... |
// @flow
import range from './lib/range';
export function allDates(month: number, year: number) {
const dates = range(1, 31)
.map(day => new Date(`${month}/${day}/${year}`))
.filter(date => date.getMonth() === month - 1);
const offset = dates[0].getDay();
const buckets = Array(offset).fill(null).conca... |
/**
* @ngdoc directive
* @name com.2fdevs.videogular.plugins.dash.directive:vgHls
* @restrict A
* @description
* Adds HLS support for vg-media.
* This plugin requires hls.js file available at hls.js project:
* https://github.com/dailymotion/hls.js
*
* <pre>
* <videogular vg-theme="config.theme.url" vg-autopla... |
var net =require('net');
var util = require('util');
var server=net.createServer({allowHalfOpen:false},function(socket){
});
server.listen(8080,'localhost',511,function(){
console.log(util.inspect(server.address()))
}); |
const path = require('path');
const knex = require('knex')({
client: 'postgresql',
connection: {
database: 'hackdin'
}
});
const db = require('bookshelf')(knex);
db.knex.schema.hasTable('projects').then(exists => {
if (!exists) {
db.knex.schema.createTable('projects', project => {
project.increm... |
'use strict';
var scope;
describe('controller specs', function () {
beforeEach(module('myApp.controllers'));
beforeEach(inject(function ($rootScope, $controller) {
scope = $rootScope.$new();
$controller("CalCtrl", { $scope: scope });
}));
it("should contain 'Fun with AngularJS' event"... |
const fetch = require('node-fetch');
const get = async (url, options) => {
const res = await fetch(url, options);
const data = await res.json();
return data;
};
module.exports = {
get,
};
|
import ready from 'tricks/events/ready';
import attr from 'tricks/dom/attr';
// Wait for the DOM to load
ready(() => {
// Find all external links which dont have noopener and ensure they do
// https://developers.google.com/web/tools/lighthouse/audits/noopener
attr('a[target=_blank]:not([rel=noopener])', {rel: 'noo... |
Parse.Cloud.afterSave(Parse.Message, (request, response) => {
const message = request.object;
if (message.existed()) { return; }
const roleName = message.audianceRole;
const friendRole = new Parse.Role(roleName, new Parse.ACL(user));
return friendRole.save().then((friendRole) => {
const acl = new Parse.A... |
'use strict';
const glob = require('glob').sync;
const _ = require('lodash');
const fs = require('fs');
const path = require('path');
const cluster = require('cluster');
const crypto = require('crypto');
const BabelFish = require('babelfish');
const Bundler ... |
version https://git-lfs.github.com/spec/v1
oid sha256:c4dd71416b08fdfb11c0e8de97694433d2668ed804ed8d804d85695a51d89212
size 7303
|
//Translated from heuristic.rb using babyruby2js
'use strict';
/** @class Base class for all heuristics.
* Anything useful for all of them should be stored as data member here.
* public read-only attribute: negative
*/
function Heuristic(player, consultant) {
if (consultant === undefined) consultant = false;... |
module.exports = function (grunt) {
var extend = require('util')._extend,
isWindowsOS = /^win/.test(process.platform),
gruntConfig = {
projectDevPath: 'http://localhost:9000/',
winShell: {
openProject: {
command: [
'start chrome \"<%= projectDevPath %>\"',
'exit'
].join('&&')
... |
/*! jQuery UI - v1.10.3 - 2013-10-13
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.slider.js
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
(function( $, undefined ) {
var uuid = 0,
runiqueId = /^ui-id-\d+$/;
// $.ui might exist f... |
var loadAudioBuffer = require('../loaders/loadAudioBuffer');
//▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
function BufferData(id, data) {
this.id = id;
this.buffer = undefined;
this.uri = data.uri;
this.loop = data.loop || false;
this.ir = data.i... |
/***
** _ooOoo_
** o8888888o
** 88" . "88
** (| -_- |)
** ... |
'use strict';
module.exports = function(io, socket) {
console.log('user connected');
socket.on('message', function(message) {
socket.broadcast.emit('message', message);
});
socket.on('channel:created', function(channel) {
socket.broadcast.emit('channel:created', channel);
});
socket.on('disconn... |
const cssnext = require('postcss-cssnext');
const postcssImport = require('postcss-import');
module.exports = {
plugins: [
postcssImport,
cssnext,
],
};
|
import React from 'react'
import {shallow} from 'enzyme'
import {random} from 'utils/test'
import SavedProperties from './saved_properties'
import {Header, PropertyCard} from 'components'
describe('<SavedProperties />', () => {
const cxt = {}
beforeEach(() => {
cxt.savedProperties = {
[random.integer(... |
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prot... |
asynctest('browser.core.SubmitTest', [
'global!tinymce',
'tinymce.media.Plugin',
'ephox.mcagar.api.TinyLoader',
'ephox.mcagar.api.TinyUi',
'ephox.mcagar.api.TinyApis',
'ephox.agar.api.Pipeline',
'ephox.agar.api.Waiter',
'ephox.agar.api.Chain',
'ephox.agar.api.ApproxStructure',
'ephox.agar.api.Genera... |
function circleArea(radius) {
let area = Math.PI * radius * radius;
console.log(area);
console.log(area.toFixed(2));
} |
import { applyMiddleware, compose, createStore } from 'redux'
import middleware from './middleware'
import { browserHistory } from 'react-router'
import makeRootReducer from './reducers'
import { updateLocation } from './rootReducers/location'
export default (initialState = {}) => {
// ============================... |
"use strict";
var browser_1 = require('angular2/platform/browser');
var app_component_1 = require('./app.component');
browser_1.bootstrap(app_component_1.AppComponent);
//# sourceMappingURL=main.js.map |
class ScrollManager {
constructor(pageEndOffset, callbacks) {
this.pageEndOffset = pageEndOffset;
this.callbacks = callbacks;
this.scrollContainerEl = null;
this.scrollPosition = null;
}
init(scrollContainerEl) {
this.scrollContainerEl = scrollContainerEl;
this.scrollContainerEl.addEvent... |
version https://git-lfs.github.com/spec/v1
oid sha256:5788a782a51035cfe1c16a61de047e0981d76504011adb09f5197d209aebd461
size 1397
|
/*
* validator plugin
*
* Copyright (c) 2013 Filament Group, Inc.
* Licensed under MIT
*/
/* global Validator:true */
/* global jQuery:true */
(function( Validator, $ ) {
$.extend( Validator.prototype.copy, {
"zip" : {
"placeholder": "00000",
"message" : "ZIP Code should be 5 or 9 digits."
}
});
}( V... |
Package.describe({
summary: "Simple collection based logging.",
version: "0.0.0",
name: "robbinsd:simplelog"
});
Package.onUse(function(api) {
api.versionsFrom('METEOR@0.9.0.1');
api.use("coffeescript"),
api.use("standard-app-packages");
if (api.export) api.export("Logs");
api.addFiles(... |
const express = require('express');
const validator = require('validator');
const {User} = require('../models');
const router = express.Router();
const _ = require('lodash');
const {authMiddleware} = require('../middleware');
// post /signup 注册用户接口
// 提供用户的注册信息,包含用户邮箱和密码
// 成功:返回包含x-auth的http信息以及用户的id
// 失败:返回失败的错误代码和信... |
var oc = {};
oc.instances = {};
oc.cloneObject = function(obj){
var result = {};
for (var key in obj) {
if (obj.hasOwnProperty(key)) result[key] = obj[key];
}
return result;
}
if(oc.std == null){
oc.std = {};
}
oc.std.ff = (function(){
function print(x){ console.log(x); }
function addAny(x,y){ return x + y... |
/**
* @name InfoBox
* @version 1.1.12 [December 11, 2012]
* @author Gary Little (inspired by proof-of-concept code from Pamela Fox of Google)
* @copyright Copyright 2010 Gary Little [gary at luxcentral.com]
* @fileoverview InfoBox extends the Google Maps JavaScript API V3 <tt>OverlayView</tt> class.
* <p>
* An... |
function DistanceTransform( dataInput, dataOutput)
{
var n = dataInput.length;
var k = 0;
var v = [n];
var z = [n+1]
var POSITIVE_INFINITE = 99999999;
var NEGATIVE_INFINITE = -99999999;
v[0] = 0;
z[0] = POSITIVE_INFINITE;
z[1] = NEGATIVE_INFINITE;
var s;
for (var q = 1; ... |
// atomize-translate queue.js queue-compat.js atomize console
var myPos, writer, next = 0, value, atomize;
function enqueue (e, cont) {
atomize.atomically(function () {
var obj = atomize.lift({val: e});
if (atomize.has(atomize.root, "queue")) {
atomize.assign(atomize.access(atomize.root... |
/* global Module */
/* Magic Mirror
* Module: localtransport
*
* By Christopher Fenner https://github.com/CFenner
* MIT Licensed.
*/
Module.register('localtransport', {
defaults: {
animationSpeed: 1,
updateInterval: 5,
mode: 'transit',
traffic_model: 'best_guess',
departure_time: 'now',
l... |
import React from 'react'
import Button from 'src/elements/Button/Button'
import * as common from 'test/specs/commonTests'
import { sandbox } from 'test/utils'
describe('Button', () => {
common.isConformant(Button)
common.hasUIClassName(Button)
common.rendersChildren(Button)
it('has type button by default', ... |
/* Copyright (c) 2017 IBM Corp.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, subli... |
import {readDoc, assert, find} from './../util.js';
/** @test {IndexDocBuilder} */
describe('Index:', ()=> {
let doc = readDoc('index.html');
/** @test {IndexDocBuilder#_buildIndexDoc} */
it('has README.md', ()=>{
assert.includes(doc, '[data-ice="index"]', 'this is ESDoc Test Fixture README.');
});
/**... |
module.exports=function(req,res){
var a=req.query.a||0;
var b=req.query.b||0;
return {
a:a,
b:b,
sum:parseInt(a)+parseInt(b)
}
} |
/**
@module @ember/array
*/
import { ARRAY_AT_EACH } from '@ember/deprecated-features';
import { DEBUG } from '@glimmer/env';
import { HAS_NATIVE_PROXY } from 'ember-utils';
import { PROXY_CONTENT } from 'ember-metal';
import { symbol, toString } from 'ember-utils';
import {
get,
set,
objectAt,
replaceInNative... |
var isInteger = require('./is-integer');
module.exports = {
isUndefined: require('./is-undefined'),
isNull: require('./is-null'),
isBoolean: require('./is-boolean'),
isFloat: require('./is-float'),
isInt: isInteger,
isInteger: isInteger,
isString: require('./is-string'),
isNaN: require('./is-nan'),
i... |
'use strict';
angular.module('rsaWebApp.version.interpolate-filter', [])
.filter('interpolate', ['version', function(version) {
return function(text) {
return String(text).replace(/\%VERSION\%/mg, version);
};
}]);
|
// All code points in the `Sk` category as per Unicode v4.1.0:
[
0x5E,
0x60,
0xA8,
0xAF,
0xB4,
0xB8,
0x2C2,
0x2C3,
0x2C4,
0x2C5,
0x2D2,
0x2D3,
0x2D4,
0x2D5,
0x2D6,
0x2D7,
0x2D8,
0x2D9,
0x2DA,
0x2DB,
0x2DC,
0x2DD,
0x2DE,
0x2DF,
0x2E5,
0x2E6,
0x2E7,
0x2E8,
0x2E9,
0x2EA,
0x2EB,
0x2EC,
0x2E... |
define(function() {
var RepetitionConfig = function(repetition) {
var DEFAULT_OPEN_PLAYS = 1;
this.repetition = repetition;
this.doIt = true;
if (repetition.isSectionOpenRepetition) {
this.numOpenPlays = DEFAULT_OPEN_PLAYS;
}
};
return RepetitionConfig;
}); |
(function() {
'use strict';
var app = WinJS.Application;
var activation = Windows.ApplicationModel.Activation;
app.onactivated = function (args) {
if (args.detail.kind === activation.ActivationKind.launch) {
if (args.detail.previousExecutionState !== activation.ApplicationExecutionState.terminated) {... |
/*!
* webpack config - cms
* xiewulong <xiewulong@vip.qq.com>
* create: 2016/12/17
* since: 0.0.1
*/
const PATH = require('path');
const FS = require('fs');
const BASE_PATH = __dirname;
const MIN = process.argv.indexOf('-p') >= 0 || process.argv.indexOf('--optimize-minimize') >= 0 ? '.min' : '';
let webpack = req... |
/* @flow */
import Watcher from '../observer/watcher'
import { emptyVNode } from '../vdom/vnode'
import { observerState } from '../observer/index'
import { warn, validateProp, remove, noop } from '../util/index'
import { resolveSlots } from './render'
export let activeInstance: any = null
export function initLifecyc... |
require('../test/unit-tests-helper')
var strings = require('./strings')
describe('strings', function() {
beforeEach(function() {
console.log('suite level beforeEach')
})
afterEach(function() {
console.log('suite level afterEach');
})
context('#concat', function() {
beforeEach(function() {
... |
angular.module('ruvidding.rtc', []).service('UserMedia', ['$q', function ($q) {
var defaultConstraints = {video: true, audio: true};
return {
get: function (constraints) {
constraints = constraints || defaultConstraints;
var userMediaDeferred = $q.defer();
var UserMedia = this;
getUserMe... |
import angular from 'angular';
import addItemComponent from './add-item.component';
let addItemModule = angular.module('addItem', [])
.component('addItem', addItemComponent)
.name;
export default addItemModule;
|
import { Mongo } from 'meteor/mongo';
const Games = new Mongo.Collection("games");
const GameSchema = new SimpleSchema({
name : {
type : String
},
players : {
type : Array
},
"players.$" : {
type : Object
},
"players.$.userId" : {
type : String
},
"pl... |
;(function() {
mocha.setup('bdd');
window.expect = chai.expect;
window.sinon = sinon;
window.onload = function() {
// mocha.checkLeaks();
mocha.run();
// stubbed for the Lazy Worker tests (was seeing a call stack exceeded maximum before)
Agent.postMessage = function() {};
var $fixtures = $('#fixtu... |
export default async () => {
await require('./bundle')();
}
|
saturn.python = (python_path)=> new Promise((resolve)=> {
let _spawn = require('child_process').spawn;
if (process.platform == 'win32')
_spawn = require('cross-spawn');
let config = require('path').resolve(require('path').dirname(__filename), 'config.json');
if (require('fs').existsSync(config)... |
/*global module */
module.exports = function (grunt) {
grunt.loadNpmTasks("grunt-tsc");
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
tsc: {
task_name: {
options: {
version: "1.4",
module: "commonjs",
... |
//import React from "bower_components/react/react";
//import Reflux from "bower_components/reflux/dist/reflux";
import BtnA from "./components/BtnA"
import BtnB from "./components/BtnB"
import Actions from "./Actions"
import TheStore from "./stores/TheStore"
export default React.createClass({
//mixins: [Reflux.co... |
import { ok } from 'assert'
import TestSuite from '../../../src/lib/TestSuite'
import Context from '../../context'
/** @type {Object.<string, (c: Context)>} */
const T = {
context: Context,
async 'evaluates a class constructor'({ TEST_SUITE_NAME, runTestSuite }) {
class Test {
async _init() {
awa... |
require('../../../spec/helpers');
const set = require('lodash.set');
const chai = require('chai');
const expect = chai.expect;
const ArrayModel = require('../../../spec/models/arraySubDocumentModel.model');
const update = require('../index');
const utilities = require('../../utilities');
const arrayObjectDate = Date... |
/**
* Author: DrowsyFlesh
* Create: 2019/2/16
* Description:
*/
import {Feature} from 'Libs/feature';
export {VideoDarkModeUI} from './UI/index';
export class VideoDarkMode extends Feature {
constructor() {
super({
name: 'videoDarkMode',
kind: 'video',
dependencies:... |
(function() {
touche.examples.push({
title: 'Rotate (w/ Virtual Pointers)',
go: function(el) {
el.style["touch-action"] = "none";
var virtualInput = touche.input.virtual();
var pointer = virtualInput.pointer(1)
var pointerImg = createPointerImg();
pointerImg.style.left = "... |
/* Generated by Opal 1.0.3 */
(function(Opal) {
function $rb_plus(lhs, rhs) {
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs);
}
function $rb_le(lhs, rhs) {
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs <= rhs : lhs['$<='](rhs);
}
functi... |
module.exports = function(value, contentsOne, contentsTwo, block) {
if(typeof contentsTwo == 'object') {
block = contentsTwo;
contentsTwo = contentsOne;
}
return (value.indexOf(contentsOne) !== -1 || value.indexOf(contentsTwo) !== -1) ? block.fn(this) : block.inverse(this)
}; |
description("Test to make sure we expose all the global constructor objects requested by http://www.w3.org/TR/SVG11/ecmascript-binding.html");
function shouldBeDefined(a)
{
var constructorString = "'function " + a + "() { [native code] }'";
shouldBe("" + a + ".toString()", constructorString);
}
shouldBeDefine... |
var http = require("http");
var server = http.createServer();
var handleReg = function(req,res){
// writeHead是使用这种方式来整体写出响应代码和一个对象的形式来写出所有的首部.
// setHeader(首部名,首部值); 是一对一对的写出的.
res.writeHead(404,{"Content-Type":"text/plain","one":"two"});
res.end("hello world");
}
server.on("request",handleReg);
server.listen(... |
'use strict';
var path = require('path');
var _ = require('lodash');
function requiredProcessEnv(name) {
if(!process.env[name]) {
throw new Error('You must set the ' + name + ' environment variable');
}
return process.env[name];
}
// All configurations will extend these options
// =========================... |
var CHAT_STATE = {
DISCONNECTED: 1,
CONNECTING: 2,
AUTHENTICATING: 3,
AUTHENTICATED: 4
};
|
define(["require", "exports", "module"], function(require, exports, module) {
/**
* Cookie plugin
*
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
/**
* ... |
import { injectReducer } from 'store/reducers'
export default (store) => ({
path: 'article',
indexRoute: {
getComponent (nextState, cb) {
require.ensure([], (require) => {
cb(null, require('./view').default)
}, 'article')
}
},
/* Async getComponent is only invoked when route matche... |
const Tag = require('../models').Tag;
const HttpError = require('some-http-error');
var tagController = {};
tagController.createTag = (req, res, next) => {
var tag = Object.assign(new Tag(), req.body);
Tag.createTag(tag).then(tag => {
res.success(tag);
}).catch(next)
}
tagController.removeTag = (req, res, next)... |
var classpump_1_1_raw_code_node =
[
[ "__init__", "classpump_1_1_raw_code_node.html#a7ba81f4da42d4e96a89713032867f87f", null ],
[ "raw_code", "classpump_1_1_raw_code_node.html#ab36224d959e0d8f803e9fac8e6a0baab", null ]
]; |
'use strict'
import create from './component/create'
import insert from './component/insert'
var defaults = {
prefix: 'material',
class: 'divider',
tag: 'span'
}
/**
* this class component represent an divider usually in a list
*
* @class
* @extends {Component}
* @return {Object} The class instance
* @ex... |
var gulp = require('gulp');
var path = require('path');
// Load plugins
var $ = require('gulp-load-plugins')({
pattern: ['gulp-*', 'main-bower-files']
});
gulp.task('inject', function() {
// Jspm files
var jspmSources = gulp.src([
path.join(global.paths.src, 'jspm_packages/system.js'),
path.join(global... |
var tabs = (function() {
var CONTAINER_MARKER = 'tabContainer';
function wrap(object) {
if(ko.isObservable(object)) {
return object;
}
return ko.observable(object);
}
function TabList() {
this.element = null;
this.tabs = [];
this.content = {... |
angular.module('app.dashboard')
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/preferences', {
templateUrl: 'dashboard/templates/preferences.html',
controller: 'PreferencesCtrl'
});
}])
.controller('PreferencesCtrl', ['$scope', function($scope) {
}]);
|
//Will hold a reference to the image array after loading
var uploads;
//Tracks the currently selected image
var imageIndex;
//File reader for accessing images
var fileReader;
function previewUpload() {
//Getting reference to file array held by input
uploads = document.getElementById("uploadField... |
var testutil = require('testutil')
, fs = require('fs-extra')
, path = require('path')
, shell = testutil.shell
var TEST_DIR = null
var NPM_FILE = null
var COMPONENT_FILE = null
var BOWER_FILE = null
var TIN_PATH = path.join(__dirname, '../bin/tin')
describe('tin --keywords', function() {
beforeEach(function(... |
import React from 'react';
import R from 'ramda';
const buildListItems = (object) => {
return R.map((keyValuePair) => {
const key = keyValuePair[0];
const value = keyValuePair[1];
return <li key={key}>{`${key}: ${value}`}</li>;
}, R.toPairs(object));
};
const KeyValueList = ({ object ... |
/**
* @fileoverview Translation for `disallowUnusedParams` (JSCS) to ESLint
* @author Breno Lima de Freitas <https://breno.io>
* @copyright 2016 Breno Lima de Freitas. All rights reserved.
* See LICENSE file in root directory for full license.
*/
'use strict'
//--------------------------------------------------------... |
// ServerTest.js (c) 2010-2013 Loren West and other contributors
// May be freely distributed under the MIT license.
// For further details and documentation:
// http://lorenwest.github.com/monitor-min
(function(root){
// Dependencies
var Monitor = require('../lib/index'),
Server = Monitor.Server, Backbone =... |
Package.describe({
name: 'tagt:slashcommands-mute',
version: '0.0.1',
summary: 'Command handler for the /mute command',
git: ''
});
Package.onUse(function(api) {
api.use([
'coffeescript',
'check',
'tagt:lib'
]);
api.use('templating', 'client');
api.addFiles('client/mute.coffee', 'client');
api.addFil... |
import {
INIT_NEW_GAME,
GENERATE_NUMBERS,
SWIPE_DOWN,
SWIPE_UP,
SWIPE_RIGHT,
SWIPE_LEFT
} from './../constants';
import putRandomNumber from './../helpers/generateNumber';
import swipeVertical from './../helpers/swipeVertical';
import swipeHorizontal from './../helpers/swipeHorizontal';
const newGameBoard ... |
version https://git-lfs.github.com/spec/v1
oid sha256:03b7851de0783009df823d649ee7a59eed84942130a89ca229bfc6c2f2b9f55b
size 3966
|
"use strict";
exports.__esModule = true;
var B1 = /** @class */ (function () {
function B1() {
}
B1.prototype.b1 = function () { return "b1"; };
return B1;
}());
exports.B1 = B1;
//# sourceMappingURL=b1.js.map |
var ReactTestUtils = require('react-addons-test-utils');
import BackgroundContext from '../../app/background_context';
import jsdomify from 'jsdomify';
let React, ReactDOM;
import Atom from '../../app/atom';
import Cursor from '../../app/cursor';
describe('BackgroundContext', function() {
var subject, data;
bef... |
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ... |
var tree = [["[Global Namespace]",,"",
[["ValidAccountEmailValidator","ValidAccountEmailValidator.html","",
[ ]] ]],["HealthCareAbroad",,"",
[["AdminBundle","HealthCareAbroad\/AdminBundle.html","",
[["Controller","HealthCareAbroad\/AdminBundl... |
var gulp = require('gulp'),
sass = require('gulp-sass'),
pug = require('gulp-pug'),
imagemin = require('gulp-imagemin'),
autoprefixer = require('gulp-autoprefixer'),
uglify = require('gulp-uglify'),
browserSync = require('browser-sync'). create(),
c... |
import Octicon from '../components/Octicon.vue'
Octicon.register({"plug":{"width":14,"height":16,"d":"M14 6V5h-4V3H8v1H6c-1.03 0-1.77.81-2 2L3 7c-1.66 0-3 1.34-3 3v2h1v-2c0-1.11.89-2 2-2l1 1c.25 1.16.98 2 2 2h2v1h2v-2h4V9h-4V6h4z"}})
|
import React, { PropTypes } from 'react';
import Chip from 'material-ui/Chip';
import * as styles from '../global/styles';
const InfoKeywords = (props) => {
return (
<div style={styles.results.infoChipContainer}>
{
_.map(props.keywords, (kw, i) => <Chip
key={i}
style={styles.res... |
define(['underscore', 'SubView', 'TimeFormatter', 'Random'],
function (_, SubView, TimeFormatter, Random) {
'use strict';
var HistoryView = SubView.extend({
initialize: function () {
this.$tableContainer = this.$el.find('.yc-history-table-container');
this.$table = this.$el.fi... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (object) {
var target = object || {};
return Object.keys(target);
}; |
/*
Spellcast
Copyright (c) 2014 - 2020 Cédric Ronvel
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to ... |
/**
* Problem: https://leetcode.com/problems/network-delay-time/description/
*/
/**
* @param {number[][]} times
* @param {number} N
* @param {number} K
* @return {number}
*/
const networkDelayTime = (times, N, K) => {
const edges = times.reduce((pre, time) => {
pre[time[0]] = { ...(pre[time[0]] || {}), [t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.