code stringlengths 2 1.05M |
|---|
const { Infrastructure, Machine, Range } = require('kelda');
const Mongo = require('./mongo.js');
const nWorker = 3;
const baseMachine = new Machine({
provider: 'Amazon',
cpu: new Range(2),
ram: new Range(2),
});
const mongo = new Mongo(nWorker);
const infra = new Infrastructure({
masters: baseMachine,
wo... |
const router = require('express').Router();
const passport = require('passport');
const GoogleStrategy = require('passport-google-oauth').OAuth2Strategy;
const User = require('../../db').models.user;
passport.use(
new GoogleStrategy({
clientID: '392045154125-00051vrqokg6k262rip63h549qr71mfs.apps.googleuserconte... |
// To end the end have the option go to an id of 0. This text will be displayed;
pGameOverMessage = 'Sorry but you have lost the game. Please rewind to try again';
pData = [
{
id: 0,
text:[
"Wow, this is funny",
"Are you there?",
"This is a test",
"I'll be back soon",
3,
"... |
'use strict';
const path = require('path'),koa = require('koa'),mount=require('koa-mount');
const Pug = require('koa-pug'),staticServe = require('koa-static'),favicon=require('koa-favi'),session=require('koa-generic-session'),redisStore=require('koa-redis');
const bodyParser = require('koa-bodyparser'),log = require('... |
/* eslint-disable */
// https://github.com/karma-runner/karma/issues/1597
'use strict';
const conf = require('./base.karma.conf');
conf.plugins.push(require('karma-browserstack-launcher'));
if (process.env.BROWSERSTACK_USERNAME && process.env.BROWSERSTACK_ACCESS_KEY) {
conf.browserStack = {
username: process.e... |
/* eslint-disable */
import React, { Component } from 'react';
import { connect } from 'react-redux'
import Queue from 'promise-queue';
import ReactDOM from 'react-dom';
import { marked } from 'marked';
import { loadYamlFile, saveYamlFile } from '../reducers/index';
import { SplitButton, MenuItem, Button, ButtonToolbar... |
/**
* Scope abstraction is a colletor when compiler child template with scope
*/
'use strict';
var util = require('./util')
function Scope (data, parent) {
this.$data = data
this.$directives = []
this.$components = []
this.$watchers = []
this.$parent = parent || null
}
Scope.prototype.$updat... |
"use strict";
/**
* @license
* Copyright 2017 Google Inc. 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/LICENSE-2.0
*
* Unless... |
var app = null;
var skillSet = [];
Ext.define('TaskEstimates', {
extend: 'Rally.app.TimeboxScopedApp',
scopeType: 'iteration',
componentCls: 'app',
onScopeChange: function(scope) {
console.log("IN scope change");
app = this;
skillSet = [{name:'.net', sum: 0}, {name: 'test', s... |
'use strict'
var inherits = require('inherits')
var EventEmitter = require('node-event-emitter')
var sax = require('sax')
var SaxSaxjs = module.exports = function SaxSaxjs () {
EventEmitter.call(this)
this.parser = sax.parser(true)
var that = this
this.parser.onopentag = function (a) {
that.emit('startEl... |
'use strict';
var Events = require('../../events/Events');
var State = require('../../state/State');
var THREE = require('three');
var initialized = false;
function SeparationAndSeek (obj, dimensions, godToFollow, separation, vehicles) {
this.godToFollow = godToFollow;
this.obj = obj;
this.dimensions = dimensi... |
module.exports = function(app){
var dummy = require("../../controllers/dummy");
app.get('/dummy', dummy.dummyValue);
} |
(function() {
angular
.module("bookmapEvent")
.directive("eventFilter", EventFilterDirective);
function EventFilterDirective() {
controller.$inject = ["$scope"];
function controller($scope) {
var self = this;
self.isVisible = false;
self.to... |
const logostyle = document.getElementById('logoscript')
let debuff = false
const mouseMove = (e) => {
if (!debuff) {
requestAnimationFrame( () => {
const x = (e.clientX / window.innerWidth * 2 - 1) / 15
const y = (e.clientY / window.innerHeight * 2 - 1) / 15
logoparallax... |
Admin.Modules.register('display.table', () => {
//use LazyLoad
lazyload()
//nit: Daan
// Все что ниже было отключено, но для работы ленивой загрузке нужно вызвать этот модуль
// $('.display-filters[data-display="DisplayTable"]').each((i, el) => {
// let $self = $(el),
// $filt... |
const express = require('express');
const router = express.Router();
const fs = require('fs');
const path = require('path');
const sliderDB = require('../../model/slider');
router.post('/delete', function (req, res) {
let id = req.body._id;
sliderDB.deleteById(id).then((img) => {
if (img === -1) return res.jso... |
function Structure() {}
//------------------------------------------------------------------------------------------------------
// AES S-BOX
//------------------------------------------------------------------------------------------------------
Structure.sbox =
[
[ 0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6... |
// retorna um id único
function generateId() {
generateId._lastId = generateId._lastId || new Date() * 1;
generateId._lastId += 1;
return generateId._lastId;
}
(function() {
$.fn.uniacLoadSelect = function(options) {
var $this = $(this);
var url = options.url,
valueField... |
// Generated on 2014-10-22 using generator-angular 0.9.5
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function(grunt) {
// Load grunt tasks aut... |
// Based on: https://github.com/elasticsearch/kibana (licenced under: http://www.apache.org/licenses/LICENSE-2.0)
// https://github.com/elasticsearch/kibana/blob/5c2419072b3644802310a8a65b19419df429af1b/src/kibana/utils/datemath.js
// Futher modifications by Panoptix
(function() {
'use strict';
var module = an... |
version https://git-lfs.github.com/spec/v1
oid sha256:2f159cd6e5ee410124b378646d4d64296febb0bce3331817f76159f2009cc695
size 6340
|
var webpack = require('webpack');
var path = require('path');
var webpackMerge = require('webpack-merge');
// Webpack Config
var webpackConfig = {
entry: {
'main': './main.browser.ts',
},
output: {
publicPath: '',
path: path.resolve(__dirname, './dist'),
filename : "main.bundle.js"
},
plugi... |
/* NOTE, this simon game is made by a lot of efforts as It is written only by pure/ vanila javascript.
as far as I know about javascript, i know that I don't know it at all. My respect and special thanks to Wojciech Kałużny
who has written a very well basic pattern design to solve simon game problem, you can view his a... |
import React, { Component } from 'react';
import { Input, Button, ProgressBar } from 'react-bootstrap';
export default class Timer extends Component {
state = {
secondsRemaining: 60,
selectedSeconds: 60,
timerRunning: false
}
setInitialTime = (event) => {
this.setState({
selectedSeconds: eve... |
/**
* Sinon.JS 1.6.0, 2013/02/18
*
* @author Christian Johansen (christian@cjohansen.no)
* @author Contributors: https://github.com/cjohansen/Sinon.JS/blob/master/AUTHORS
*
* (The BSD License)
*
* Copyright (c) 2010-2013, Christian Johansen, christian@cjohansen.no
* All rights reserved.
*
* Redistribution an... |
onway.Models.User = Backbone.Model.extend({
/*url:'[la url que va a estar relacionada con el servidor]'*/
});
|
search_result['1101']=["topic_0000000000000288.html","tlece_ApplicantProfileVideos.ThumbnailUrl Property",""]; |
$(function () {
<<<<<<< HEAD
module('modal')
test('should provide no conflict', function () {
var modal = $.fn.modal.noConflict()
ok(!$.fn.modal, 'modal was set back to undefined (org value)')
$.fn.modal = modal
})
test('should be defined on jquery object', function () {
var div... |
import { get } from 'object-path';
const translationMap = new Map();
/**
* Factory function for creating translation helpers
*
* @example <caption>Creating, and using, a translation helper</caption>
* export class Foo extends Component {
* renderCallback() {
* const { locale } = props(this);
* const ... |
// starter.test.js
var expect = require('chai').expect;
var GitStarter = require("../lib/git-starter");
describe('GitStarter', function() {
describe('#applyStarter', function() {
var starter;
var opts = {};
var args = {};
beforeEach(function() {
starter = new GitStart... |
/* eslint-env node, mocha */
var pack = require('../../')
var path = require('path')
var gulp = require('gulp')
var through = require('through2')
describe('gulp-pack', function () {
describe('sync deps', function () {
gulp.task('sync-deps', function () {
it('should has right deps', function (done) {
... |
'use strict';
module.exports = function enableAuthentication (server) {
var debug = require('debug')('app-site');
/**
* Enable Authentication
*/
debug('enabling authentication');
server.enableAuth();
};
|
/**
* Created by Toure on 26/11/14.
*/
function getImages(){
$('[id*="uploadMiniature_"]').each(function(){
var $this = $(this);
var imageSelect = $($this).find('img');
var fileSelect = $($this).find('input[type="file"]');
var image = Object.create(Image);
var numero = $(f... |
import {
GraphQLObjectType,
GraphQLString,
GraphQLInt,
GraphQLID,
GraphQLNonNull,
} from 'graphql';
import User, { userFieldResolver } from './User';
import FeedbackVote from './FeedbackVote';
import Node from '../interfaces/Node';
export default new GraphQLObjectType({
name: 'ReplyRequest',
interfaces: ... |
//! moment.js
//! version : 2.14.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(fac... |
require('whatwg-fetch');
var fetch = window.fetch;
class Client {
constructor(url) {
this.url = url;
}
get(path) {
console.log(fetch)
var fullPath = `${this.url}${path}`;
return window.fetch(fullPath)
.then(function(response) {
return new Promise(response.json());
}).then(fun... |
function verifyCurrentState(context, moduleMeta, currentState) {
var id = moduleMeta.id;
return (
context.controllers.registry.hasModule(id) &&
context.controllers.registry.getModuleState(id) === currentState
);
}
function setState(context, currentState, nextState) {
return function(moduleMeta) {
... |
(function () {
'use strict';
function bounceOut(time, begin, change, duration) {
if ((time /= duration) < 1 / 2.75) {
return change * (7.5625 * time * time) + begin;
} else if (time < 2 / 2.75) {
return change * (7.5625 * (time -= 1.5 / 2.75) * time + 0.75) + begin;
... |
define(['dispatcher'], function(dispatcher) {
"use strict";
//local
var initialized = false;
var items = {};
var _handleEvent = function(e) {
if (e.type === 'video-add') {
if (items.hasOwnProperty(e.id)) return;
items[e.id] = {
id: e.id,
status: 'not-ready'
}
}
if (e.type === 'video-re... |
import { fromJS, List as iList } from 'immutable';
import { keysIn } from 'lodash';
const initialState = fromJS({ loading: false, slope: false, course: false, club: false,
holes: [], currentHole: 0, shots: {} });
// // normally this would be imported from /constants, but in trying to kee... |
/**
* Created by roderickWang on 8/27/15.
*/
import {MainTypes} from '../constants/ActionTypes';
import Immutable from 'immutable';
import binding from 'redux-2way-binding';
let bindingStore = binding.bindingStore;
const initialState = Immutable.fromJS({
tree: []
});
//TODO defend override redux,write more code... |
require.config({
paths: {
jquery: '../lib/jquery/jquery-1.8.2.min',
bootstrap: '../lib/bootstrap3/js/bootstrap',
underscore: '../lib/underscore/underscore',
angular: '../lib/angular/angular.min',
angularResource: '../lib/angular/angular-resource',
text: '../lib/requi... |
/*game.EnemyDeathManager = Object.extend({
//
init: function(x, y, settings){
//always updates function
this.alwaysUpdate = true;
},
update: function(){
if(game.data.player.dead){
//if player dies
me.game.world.removeChild(game.data.player);
//remove player
me.game.world.removeChild(game.data.mini... |
'use strict';
var UTILS = require('../utils/utils');
/**
* @constructor
*/
var Analytics = function (options) {
this.options = options;
this.prepare();
this.load();
this.addJsErrorsTracking();
};
// METHODS
Analytics.prototype.prepare = function () {
window._gaq = window._gaq || [];
window... |
import angular from 'angular';
import Header from './header';
import Sidebar from './sidebar';
import Modal from './modal';
let commonModule = angular.module('app.common', [
Header,
Sidebar,
Modal
])
.name;
export default commonModule;
|
import Ember from 'ember';
import componentChild from 'ember-bootstrap/mixins/component-child';
/**
* Mixin for components that act as dropdown toggles.
*
* @class DropdownToggle
* @namespace Mixins
* @public
*/
export default Ember.Mixin.create(componentChild, {
classNames: ['dropdown-toggle'],
attributeBin... |
/**
* Copyright (c), 2013-2014 IMD - International Institute for Management Development, Switzerland.
*
* See the file license.txt for copying permission.
*/
define([
'Underscore',
'jquery'
], function (_, $) {
'use strict';
var ToolbarProvider = function (tbTpl, tbDef) {
this.toolbarTpl =... |
/**
Module: marchio-datastore
Test: smoke-test
Author: Mitch Allen
*/
/*jshint node: true */
/*jshint mocha: true */
/*jshint esversion: 6 */
"use strict";
var request = require('supertest'),
should = require('should'),
killable = require('killable'),
modulePath = "../modules/index",
GO... |
var gulp = require('gulp'),
msbuild = require("gulp-msbuild"),
mocha = require("gulp-mocha"),
replace = require('gulp-replace'),
rimraf = require('rimraf'),
runSequence = require('run-sequence'),
baseBuildFile = require('../gulpfile');
gulp.task("win8.1-build",
function(cb){... |
var searchData =
[
['operator_2a', ['operator*', ['../classrational.html#acbaf4f76b2caf4aafb850202e29d69ce', 1, 'rational::operator*(const int rhs) const '], ['../classrational.html#a13f267e5cdafffcc44203762548bb5cd', 1, 'rational::operator*(const rational &rhs) const ']]],
['operator_2b_3d', ['... |
'use strict';
var _ = require('lodash')
, TypeSafeMatcher = require('./TypeSafeMatcher')
;
function IsArray() {
return _.create(new TypeSafeMatcher(), {
isExpectedType: function (actual) {
return _.isArray(actual);
},
describeTo: function (description) {
description
.append('an array');
}
});
}
... |
{
jestExpect(small).not.toBeGreaterThan(big);
}
|
'use strict';
// Declare app level module which depends on views, and components
angular.module('myApp', [
'ngRoute',
'ui.bootstrap',
'infinite-scroll',
'myApp.projects',
'myApp.people',
'myApp.version'
])
.constant('underscore', _)
.config(['$locationProvider', '$routeProvider', function($locationProv... |
var tree={"files":["LinkedinLogin.js"]}; |
// TODO : Like stylus
module.exports = function(src, module, makeModule, options) {
throw new Error("sass parser not implemented yet")
} |
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// When the extension is installed or upgraded ...
chrome.runtime.onInstalled.addListener(function()
{
// Replace all rules ...
chrome.declarativ... |
/**
* Copyright 2016 aixigo AG
* Released under the MIT license.
* http://laxarjs.org/license
*/
import './artifact_provider_mock_spec';
import './browser_mock_spec';
import './configuration_mock_spec';
import './control_loader_mock_spec';
import './event_bus_mock_spec';
import './flow_service_mock_spec';
import '.... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Saturation = exports.Hue = exports.EditableInput = exports.Checkboard = exports.Alpha = undefined;
var _Alpha = require('./Alpha');
var _Alpha2 = _interopRequireDefault(_Alpha);
var _Checkboard = require('./Checkboard');
var _Ch... |
import React from 'react';
import Router from 'react-router';
export default class AuthenticationRequired extends React.Component {
constructor(props){
super(props)
}
render () {
if(this.props.user.authenticated){
return (this.props.children)
}
return null
}
}
|
import HaloItem from 'src/components/halo/lively-halo-item.js';
export default class HaloVivideOpenScriptEditorItem extends HaloItem {
// #TODO: drag ScriptEditor out of this halo item
async onClick(evt) {
const inspectTarget = window.that;
this.hideHalo();
const scriptEditor = await inspectTarget.cre... |
module.exports = {
options: {
sassDir: "app/styles",
cssDir: "tmp/result/assets",
generatedImagesDir: "tmp/result/images",
imagesDir: "public/images",
javascriptsDir: "app",
fontsDir: "public/fonts",
importPath: ["vendor"],
httpImagesPath: "/images",
httpGeneratedImagesPath: "/imag... |
import React from 'react';
import { parse } from 'react-docgen';
import CodeExample from '../../../components/CodeExample';
import ComponentHeader from '../../../components/ComponentHeader';
import PropTypeDescription from '../../../components/PropTypeDescription';
import Demo from './Demo';
// eslint-disable-next-lin... |
/*
* 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.
*/
var Svg = document.documentElement;
var playArea = document.getElementById('PlayArea');
var playAreaBorder = document.getElementById... |
// @flow
import React from 'react'
import cn from 'bem-cn'
const bem = cn('icon')
class Button extends React.Component {
render() {
return (
<svg className={bem({'key': true})} enableBackground="new 0 0 24 24" version="1.0" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
... |
var searchData=
[
['main',['main',['../_r_l_e_2src_2_b_a_m_v___l_z_w_8c.html#a0ddf1224851353fc92bfbff6f499fa97',1,'main(int argc, char *argv[]): BAMV_LZW.c'],['../_version1_2src_2_b_a_m_v___l_z_w_8c.html#a0ddf1224851353fc92bfbff6f499fa97',1,'main(int argc, char *argv[]): BAMV_LZW.c'],['../_version2_2src_2_b... |
var db = openDatabase('prefs', '1.0', 'ouirc preferences', 2 * 1024 * 1024);
db.transaction(function (tx) {
tx.executeSql('CREATE TABLE IF NOT EXISTS prefs (name unique, value)');
});
exports.getServersList = function () {
db.transaction(function () {
tx.executeSql("SELECT * FROM prefs WHERE name = ", [], func... |
'use strict';
const Temperature = require('./scores/temperature');
const Humidity = require('./scores/humidity');
const Luminosity = require('./scores/luminosity');
const EnergyConsumption = require('./scores/energyConsumption');
const Refrigeration = require('./scores/refrigeration');
const Freezing = require('./score... |
import {inspect} from 'util';
import NodeConnectionLine from './NodeConnectionLine';
export default class NodeConnectionMerger {
inspect() {
return '[' + inspect(this.connectionSourceNode) + ']:';
}
constructor(connectionSourceNode, direction) {
this.connectionSourceNode = connectionSourceNode;
t... |
angular.module("ui.bootstrap", ["ui.bootstrap.transition", "ui.bootstrap.collapse", "ui.bootstrap.accordion", "ui.bootstrap.alert", "ui.bootstrap.bindHtml", "ui.bootstrap.buttons", "ui.bootstrap.carousel", "ui.bootstrap.position", "ui.bootstrap.datepicker", "ui.bootstrap.dropdownToggle", "ui.bootstrap.modal", "ui.boots... |
/*
'use strict';
var superagent = require('superagent');
var chaiExpect = require('chai').expect;
var Mirror = require('../models/Mirror');
describe('Mirror Model Unit Tests:', function() {
var mirror = null;
beforeEach(function(done) {
mirror = new Mirror({
email: 'treyqg15',
phone: '6011111111'
... |
'use strict';
var path = require('path');
var fs = require('fs');
var sign = require('upyun-http-signature');
var async = require('async');
var request = require('request');
var pkg = require('../package.json');
module.exports = function(list, config, callback) {
if(list.length <= 0) {
return callback('n... |
var validation = require("utilities/validation");
module.exports = Backbone.Model.extend({
validate: function() {
var attrs = this.attributes, errors = [];
if (!validation.required(attrs.role))
errors.push({ key: "role", message: "The role is required." });
if (!validation.required(attrs.company))
errors.... |
'use strict';
module.exports = function(Group) {
// Group.getEntireCompany = function(id,cb) {
// var app = Team.app;
// Team.findById(id, function(err, team) {
// // links the object
// if(err) {
// console.log(err);
// } else {
// team.members({ teamId:id },function(err,... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import NavItem from './NavItem.react';
const SidebarNav = () => {
return (
<ul className="sidebar-nav">
<NavItem glyph="dashboard" name="Dashboard" />
<NavItem glyph="envelope" name="Mailbox" />
<NavItem glyph="pic... |
import React from 'react';
import PropTypes from 'prop-types';
const Icon = (props) =>
<svg
width={props.width}
height={props.height}
viewBox={props.viewBox}
color={props.color}
>
<path d={props.icon} />
</svg>;
Icon.propTypes = {
icon: PropTypes.string.isRequired,
viewBox: PropTypes.str... |
// ==UserScript==
// @name browse view: cleaner view by hiding duplicate name information
// @description https://github.com/solygen/userscripts/blob/master/doc/magickartenmarkt.de.md#browse-viewuserjs
// @version 1.0.1
// @grant none
// @icon https://www.magickartenmarkt.de/Products/Single... |
'use strict';
var isUint8Array = require( './../lib' );
console.log( isUint8Array( new Uint8Array( 10 ) ) );
// returns true
console.log( isUint8Array( new Int8Array( 10 ) ) );
// returns false
console.log( isUint8Array( new Uint8ClampedArray( 10 ) ) );
// returns false
console.log( isUint8Array( new Int16Array( 1... |
import React, {PureComponent} from 'react';
import {EventEmitter} from 'events';
import PropTypes from 'prop-types';
import autobind from 'autobind-decorator';
import contextMenu from 'electron-context-menu';
@autobind
class ResponseWebview extends PureComponent {
_handleSetWebviewRef (n) {
this._webview = n;
... |
function setName(obj) {
obj.name = "Nicholas";
obj = new Object();
obj.name = "Greg";
}
let person = new Object();
setName(person);
console.log(person.name); // "Nicholas"
|
"use strict";
process.env.SLACK_TOKEN = "12345";
process.env.SLACK_CHANNEL = "abcdef";
const { ServiceBroker } = require("moleculer");
const { MoleculerError } = require("moleculer").Errors;
jest.mock("@slack/client");
const { WebClient } = require('@slack/client');
WebClient.mockImplementation(() => {
return {... |
var expect = require('chai').expect;
var Drac = require('../');
describe('match rules', function () {
var testFunc = Drac.define({
params: {
name: { match: /^abc[0-9]+/ }
}
}, function(name) { return 'hello ' + name; });
it('should give correct result', function() {
var result = testFunc('ab... |
define('ember-bootstrap/components/bs-progress', ['exports', 'ember'], function (exports, _ember) {
'use strict';
/**
Use to group one (or more) [Components.ProgressBar](Components.ProgressBar.html) components inside it.
@class Progress
@namespace Components
@extends Ember.Component
@public
*/... |
let config = {}
if (process.env.KARROT.FCM_CONFIG === 'dev') {
config = require('./firebase.config.dev').default
}
else if (process.env.KARROT.FCM_CONFIG === 'prod') {
config = require('./firebase.config.prod').default
}
export default config
|
/**
* @author ashconnell / http://ashconnell.com/
*/
var html2canvas = require('html2canvas');
var throttle = require('lodash.throttle');
THREE.Interface = function (html, methods, options) {
THREE.Object3D.call( this );
this.type = 'Interface';
this.methods = methods || {};
this.options = options... |
const fs = require('fs')
const okfind=require("./okfindandreplace.js")
startingDirectory = process.argv[2];
if (!startingDirectory) {
throw Error("A file to watch must be specified!");
}
console.log("Now Searching: " + startingDirectory + " for localization occurrences");
okfind.findAll(startingDirectory, functio... |
'use strict';
const fs = require('fs'),
decamelize = require('decamelize'),
camelcase = require('camelcase'),
sequelize = require('sequelize'),
path = require('path');
/**
* Created by Adrian on 29-Mar-16.
* This component is used to load up all the sql / postgre models.
*/
module.exports = function init(t... |
const services = (function (fetch, URL, BASE_URL) {
const prepareQuery = function (url, params) {
const urlObject = new URL(url);
Object.keys(params)
.filter(x => !!params[x])
.forEach(key => urlObject.searchParams.append(key, params[key]));
return urlObject;
};
... |
/**
* Created by reamd on 2016/2/25.
*/
describe("msgBox", function() {
var should = chai.should();
it("should is a object", function() {
var msgbox = new msgBox({});
msgbox.should.be.a('object');
});
it("check it property", function() {
var msgbox = new msgBox({});
msg... |
ngGridDirectives.directive('ngCell', ['$compile', '$domUtilityService', '$utilityService', function ($compile, domUtilityService, utilityService) {
var ngCell = {
scope: false,
compile: function() {
return {
pre: function($scope, iElement) {
var html;... |
//--------------------------------------------------------------------------
// サウンドテストシーン
//--------------------------------------------------------------------------
(function(){
//--------------------------------------------------------------------------
// メソッド
//----------------------------------------------... |
import EmberRouter from '@ember/routing/router';
import config from './config/environment';
export default class Router extends EmberRouter {
location = config.locationType;
rootURL = config.rootURL;
}
Router.map(function() {
this.route('first-route');
this.route('second-route');
this.route('third-route');... |
const express = require('express');
const app = express();
const aws = require('aws-sdk');
const morgan = require('morgan');
const bodyParser = require('body-parser');
const getErrorHandler = require('./error-handlers/error-handler');
const ensureAuth = require('./auth/ensure-auth')();
app.use(morgan('dev'));
app.use(... |
'use strict'
var thunks = require('..')
var thunk = thunks()
thunk()(function () {
throw new Error('111111')
})
|
var O_DELETE_CONFIRM = "Delete Confirmation";
var O_DELETE_CONFIRM_DESC = "Please confirm that you would like to delete the selected items";
var O_LATEST_SIGNATURE = "<div class='signatureInfo'>Latest signature version (major update): 20140901, updated on 1st Sep 2014</div>";
var O_DOWNLOAD_FILES = "Downloading... |
(function() {
var syncLoad = function(url) {
document.write('<' + 'script src="' + url + '">' + '<' + '/script>');
}
var scripts = document.getElementsByTagName('script');
var curScript = scripts[scripts.length - 1];
window.curMain = curScript.getAttribute('data-main')
var curURLParts = window.locati... |
/* eslint-disable max-lines */
const pkg = require( "../package.json" );
const buildUrl = account => {
let url = "";
if ( account.indexOf( "http://" ) !== 0 && account.indexOf( "https://" ) !== 0 ) {
url = `https://${ account }`;
// Assume leankit.com if no domain is specified
if ( account.indexOf( "." ) === -... |
import { Map, Set, OrderedSet } from 'immutable';
export function removeFromSpace(state, sid, space) {
return state.updateIn(['sources', sid, 'spaces'],
(spaces = new OrderedSet()) => spaces.delete(space))
.updateIn(['spaces', space, 'sources'],
(sources = new Set()) =>... |
const config = require('../config');
class Bot {
checkDate(date, diff = 10800000) {
const now = new Date().valueOf();
const dateOf = new Date(date).valueOf();
return now - dateOf < diff;
}
isAdmin(id) {
return id === config.adminId;
}
async sendMessageWithDelay(api, message, chat_id) {
... |
{
data: (function() {
var ro = {};
ro.partname = 'Boozembly 2016 - final';
ro.prewarm = true;
ro.partlength = 27826;
ro.cameras = {
'pehucam': new THREE.PerspectiveCamera(45, global_engine.getAspectRatio(), 0.1, 10000)
};
ro.scenes = {};
ro.lights = {};
ro.objects = {};
ro.effects = {};
r... |
define(["jquery", "suspend"], function($) {
$(".ico-btn").hover(
/** handlerin */
function(e) {
var $el = $(this);
$el.removeClass("jelly-animation-out").addClass("jelly-animation");
},
function(e) {
var $el = $(this);
$el.removeClass("jelly-animation").addClass("jelly-animatio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.