code stringlengths 2 1.05M |
|---|
/**
* Created by c13lbm on 4/27/16.
*/
var StudentRecordVideo = React.createClass({
submitbutton: <div id="studentSubmit" className="button primary-button SCButtonDisabled" >Submit answer</div>,
componentDidMount: function() {
this.setEnabled(false);
},
formDataBuilder: function (blob, fileNa... |
/*
* GET home page.
*/
exports.index = function(req, res){
res.render('index', { title: 'Merkle | 5th Finger PING PONG MATCH' });
}; |
function() {
// Load required classes
var FlatInformationGain = Java.type( 'external_measures.information_based.FlatInformationGain' );
var FlatEntropy2 = Java.type( 'external_measures.information_based.FlatEntropy2' );
var logBase = 2;
// Create and return the result holder object
var measureData = {};
measur... |
/* SQB
------------------------
(c) 2017-present Panates
SQB may be freely distributed under the MIT license.
For details and documentation:
https://panates.github.io/sqb/
*/
'use strict';
/**
* Module dependencies.
* @private
*/
const CompOperator = require('./CompOperator');
/**
*
* @class
*/
class OpLt... |
'use strict';
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2010, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistr... |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
StyleSheet,
View,
Text,
Image,
TouchableHighlight,
PixelRatio
} from 'react-native';
export default class MeItemCell extends Component {
static defaul... |
module.exports = Way;
var util = require('util');
var _ = require('underscore');
var BoundingBox = require('../boundingbox');
var Entity = require('./entity');
function Way() {
Entity.call(this);
this.nodeReferences = [];
this._nodes = [];
}
util.inherits(Way, Entity);
Way.prototype.getId = function () {
ret... |
#!/usr/bin/env node
/* eslint no-console: 0 */
'use strict';
const program = require('commander');
const fnlint = require('./module');
const assert = require('assert');
const path = require('path');
require('colors');
program
.version(require('../package.json').version)
.option('-c --config [configPath]', 'Path t... |
angular.module('Directives.MyModule')
.directive('gameWon', function () {
return {
restrict: 'E',
templateUrl: 'partials/game-won.html'
};
});
|
(function () {
'use strict';
let message = 'Your browser supports service workers!';
if ('serviceWorker' in navigator) {
console.info(message);
return;
}
message = 'Sorry bud, your browser does not support service workers. Try Chrome?';
alert(message);
console.warn(messa... |
'use strict';
var filters = require('./../../Utils/Filters');
function Datepicker (baseElement){
var base = baseElement;
var datepickerInput = base.$('[date-time]');
var datepickerWrapper = base.$('[date-picker-wrapper]');
/**
* @description clicks the datepicker input - should open the datepick... |
/* eslint-disable import/no-extraneous-dependencies, react/jsx-filename-extension */
/* eslint-env jest */
import React from 'react'
import { mount } from 'enzyme'
import snap from 'snap'
import Menu from './menu'
import { mapDispatchToProps } from './menu.container'
const snapshot = props => snap(Menu)({ onHeaderCli... |
/*
* Copyright (c) 2012-2014 André Bargull
* Alle Rechte vorbehalten / All Rights Reserved. Use is subject to license terms.
*
* <https://github.com/anba/es6draft>
*/
const {
assertSame, assertTrue
} = Assert;
// 22.1.3.1 Array.prototype.concat
function assertSameArray(array1, array2) {
assertSame(array1.l... |
'use strict';
describe('Moments E2E Tests:', function () {
describe('Test Moments page', function () {
it('Should report missing credentials', function () {
browser.get('http://localhost:3001/moments');
expect(element.all(by.repeater('moment in moments')).count()).toEqual(0);
});
});
});
|
var gulp = require('gulp');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
gulp.task('scripts', function() {
return browserify('./index')
.bundle()
.pipe(source('ba... |
angular.module('casualApp')
.controller('AppCtrl', function($scope, $ionicModal, $timeout, contactService, userData) {
//if user loged in => exit
//otherwise user needs to log in
if (userData.model.id !== undefined) return;
//get position
contactService.getUserPosition(function (position) {
//DONE!
... |
// Sorts an array
// sortFunction is the function to determine if an element is <, ==, or > than another
var Sort = function(inputArray) {
// Utility method to sort by field
// breakTie is a function that is called in case these fields are equal to break the tie
var sortByField = function (field, ascen... |
import React from 'react';
import elementType from 'react-prop-types/lib/elementType';
export const DefaultComponent = ({
componentClass: ComponentClass,
...restProps,
}) => <ComponentClass {...restProps} />;
DefaultComponent.propTypes = {
componentClass: elementType,
};
DefaultComponent.defaultProps = {
comp... |
/* ===================================================
* bootstrap-transition.js v2.0.4
* http://twitter.github.com/bootstrap/javascript.html#transitions
* ===================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you ... |
// Generated by CoffeeScript 1.8.0
(function() {
var CollectionsSchema, mongoose;
mongoose = require('./mongoose');
CollectionsSchema = mongoose.Schema({
username: String,
created: Number,
type: Number,
url: String
});
module.exports = mongoose.model('Collections', CollectionsSchema);
}).c... |
pinion.EventDispatcher = (function() {
var constr;
constr = function() {};
constr.prototype = {
/**
* @param string event
* @param object data
* @param function|string callback
* @param context object
*
... |
var readline = require('readline');
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
terminal: false
});
rl.on('line', function (cmd) {
console.log('You just typed: '+cmd);
}); |
{
expect(validateDOMNesting.isTagValidInContext(tag, null)).toBe(true);
}
|
import { combineReducers } from 'redux';
function page(state = {
time: parseInt(Math.random() * 10, 10) + 1,
accordion: false,
activePanelKey: [null],
text: 'A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.',
s... |
name = "denseSilverPlate";
addToCreative[0] = true;
creativeTab = "materials";
maxStack = 64;
textureFile[0] = "denseSilverPlate.png"; |
function redirectToCourses({services}) {
services.router.redirectToSignal('courses.opened');
}
export default redirectToCourses;
|
/*!
* Stylus - Evaluator
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var Visitor = require('./')
, nodes = require('../nodes')
, Stack = require('../stack')
, Frame = require('../stack/frame')
, Scope = require('../stack/scope')
, utils = requir... |
'use strict';
var async = require('async');
var colors = require('colors/safe');
var format = require('stringformat');
var path = require('path');
var _ = require('underscore');
var getComponentsDependencies = require('../domain/get-components-deps');
var getMissingDeps = require('../domain/get-missing-deps');
var ge... |
describe('tooltip', function() {
var elm,
elmBody,
scope,
elmScope,
tooltipScope;
// load the tooltip code
beforeEach(module('ui.bootstrap.tooltip'));
// load the template
beforeEach(module('template/tooltip/tooltip-popup.html'));
beforeEach(inject(function($rootScope, $compile) {... |
var Errors = require('./errors');
var q = require('q');
var tls = require('tls');
var sysu = require('util');
var util = require('./util');
var events = require('events');
var Device = require('./device');
var CredentialLoader = require('./credentials');
var createSocket = require('./socket');
var debug = functio... |
import Component from './component.js';
export default class Panel extends Component {
constructor(SL, config) {
super(SL, config);
this.DOM = {};
}
reset() {
super.reset();
this.resetDOM();
}
get element() {
return (this.DOM && this.DOM.panel);
}
close() {
if (this.manager) {
... |
module.exports = {
// Replace with a dummy date for testing.
Date: Date,
// Test a log entry for acceptance.
json: function () {},
// Additional properties added to every message.
properties: { pid: process.pid }
}
/*
sink.json = function (level, qualifier, label, body) {
var header = {
... |
/* eslint-disable no-unused-expressions */
'use strict';
const Promise = require('bluebird');
const expect = require('chai').expect;
const chai = require('chai')
.use(require('chai-http'));
const server = require('../server/server');
const cpx = require('cpx');
const {fromGlobalId} = require('graphql-relay');
co... |
/**
* Module dependencies
*/
var pkg = require('../package');
var map = require('map');
/**
* hyperImg
*/
pkg.directive('hyperImg', [
'hyper',
'hyperStatus',
function(hyper, status) {
return {
scope: true,
restrict: 'A',
link: function($scope, elem, attrs) {
status.loading(ele... |
angular.module('restaurantPOS', ['ui.router', 'ui.materialize'])
.config(['$stateProvider', '$urlRouterProvider', '$locationProvider',
function($stateProvider, $urlRouterProvider, $locationProvider) {
$stateProvider
.state('home', {
url: '/',
templateUrl:'/views/landingpage.html',
contro... |
/* ***********************************************************
* This file was automatically generated on 2014-12-10. *
* *
* Bindings Version 2.0.4 *
* *
* If... |
// Introducing Scope
//
// Understanding scope is critical to understanding many JavaScript
// patterns. In this video I'll show you a few examples of where scope
// is used, and how to think about scope.
// Scope는 변수를 look-up한다.
// 여기서 a, b
var a = 10;
function add () {
var b = 20;
return a + b;
}
// IIFE
(func... |
'use strict';
import { assert, expect, should, eventually } from 'chai';
import taxonomy from '../../src/processor/taxonomy';
describe('Processor: Taxonomy', () => {
it('Up & Running', () => {
expect(taxonomy).to.be.ok;
});
});
|
angular.module('starter.services', ['ngResource'])
/**
* A simple example service that returns some data.
*/
.factory('ListService',['$resource', function($resource) {
return $resource('http://115.113.151.200:8081/user/maphook/mobile/list_trends\\/', {}, {
query: {method:'GET', params:{}, isArray:false, cache:t... |
version https://git-lfs.github.com/spec/v1
oid sha256:90aa6e5218a18ecb6725bef9d52a224dc5f478ffb489b093707fd1d41099fd47
size 368416
|
var expect = require('chai').expect;
var test = require('./lib/test.js');
describe('Eval', function() {
it('should support eval tags', function() {
test({
fixture: 'Eval',
done: function($) {
expect($('strong').length).to.equal(10);
}
});
});
it('should expose current data cont... |
// All code points with the `Diacritic` property as per Unicode v6.1.0:
[
0x5E,
0x60,
0xA8,
0xAF,
0xB4,
0xB7,
0xB8,
0x2B0,
0x2B1,
0x2B2,
0x2B3,
0x2B4,
0x2B5,
0x2B6,
0x2B7,
0x2B8,
0x2B9,
0x2BA,
0x2BB,
0x2BC,
0x2BD,
0x2BE,
0x2BF,
0x2C0,
0x2C1,
0x2C2,
0x2C3,
0x2C4,
0x2C5,
0x2C6,
0x2C7,
0x2C... |
$(function(){
$("#addItem").click(function() {
$("#schedulerItems").append(template);
});
$(".deleteItem").click(function(){
$(this).parent().remove();
});
});
var template = $("#row").html();
|
/**
* Export environment variables.
*/
const process = require('process');
const envVars = process.env;
const env = {
DB_PASSWORD: envVars.POSTGRES_PASSWORD,
DB_USER: envVars.POSTGRES_USER,
DB_DATABASE: envVars.POSTGRES_DATABASE,
DB_HOST: envVars.POSTGRES_HOST,
DB_PORT: envVars.POSTGRES_PORT,
};
Object.k... |
/*
* This file is part of the Sententiaregum project.
*
* (c) Maximilian Bosch <maximilian.bosch.27@gmail.com>
* (c) Ben Bieler <benjaminbieler2014@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
'use strict';
import ... |
function BancoRioTransfer() {
this.numero_de_envio = new Date().getTime() * 100;
this.rows = [];
this.active = false;
this.codigos_concepto_transferencia = [
"ALQ", "VAR", "EXP", "CUO", "FAC", "PRE", "SEG", "HON"
];
};
BancoRioTransfer.prototype.fill = function (
cuenta_debito,
... |
/*
Settings file for allowing project to work in different environments.
Only make different copies of this file.
*/
var Settings = {
/* server */
host:'localhost',
command_port:4000,
http_port:8000,
redis_port:6379,
canvasClient:8084,
canvasSource:8082,
audio_port:9000,
wid... |
import * as THREE from 'three';
const vector = new THREE.Vector3();
const quaternion = new THREE.Quaternion();
export default class Entity extends THREE.Mesh {
constructor( ...args ) {
super( ...args );
this.velocity = new THREE.Vector3();
this.acceleration = new THREE.Vector3();
this.angularVeloci... |
var assert = require('chai').assert,
PArray = require('..'),
when = require('when'),
delay = require('when/delay');
describe('has own implementation', function () {
Object.getOwnPropertyNames(Array.prototype)
.filter(function (name) { return !(name in Object.prototype) })
.forEach(function (name) {
it('of ' + ... |
'use strict';
/**
* Module dependencies.
*/
var ResponderServer = require('./server')
, ResponderClient = require('./client');
/**
* Expose modules.
*/
module.exports = {
client: function(){}
, server: ResponderServer
, library: ResponderClient.source
, PrimusResponder: ResponderServer
}; |
module.exports = function(Project) {
Project.afterRemote('create', function(ctx, project, next) {
ctx.result = {
bError: false,
message: 'Create project successfully.',
result: project
}
next();
});
// cannot return clean message.
// Project.validatesUniquenessOf('name', {message:... |
/* Load configuration variables */
// Local environment
require("dotenv").config();
// Docker environment
if (process.env.FGLAB_PORT_5000_TCP_ADDR) {
process.env.FGLAB_URL = "http://" + process.env.FGLAB_PORT_5000_TCP_ADDR + ":" + process.env.FGLAB_PORT_5000_TCP_PORT;
}
|
kiso.geom.Point = kiso.Class(/** @lends kiso.geom.Point.prototype */{
_x: 0,
_y: 0,
/**
* @constructs
* @description Create a new <code>Point</code> from another <code>Point</code> or from XY coordinates.
* @param {Number|Point} xOrPoint Either another <code>Point</code> or X coordinate
* @param {Numbe... |
'use babel'
import {React, update} from 'react-for-atom';
export default React.createClass({
getInitialState: function() {
return {
text: ""
};
},
componentDidMount: function() {
this.inputField.focus();
},
componentDidUpdate: function(prevProps) {
if (prevProps != this.props) {
... |
// ./src/reducers/index.js
import { combineReducers } from 'redux';
import books from './bookReducers'
export default combineReducers({
books: books,
// More reducers if there are
// can go here
}); |
import Ember from 'ember';
import DS from 'ember-data';
export default DS.RESTSerializer.extend({
primaryKey: 'objectId',
extractArray: function (store, primaryType, payload) {
var namespacedPayload = {};
namespacedPayload[Ember.String.pluralize(primaryType.typeKey)] = payload.results;
... |
import Ember from 'ember';
export default Ember.Route.extend({
model: function(params) {
return this.store.find('trivium', params.trivium_id);
}
});
|
//Autogenerated by ../../build_app.js
import value_set_concept_set_component from 'ember-fhir-adapter/models/value-set-concept-set-component';
export default value_set_concept_set_component; |
/*! Sauron - v1.1.0 - 2013-01-07
* https://github.com/Ensighten/Sauron
* Copyright (c) 2013 Ensighten; Licensed MIT */
define(function () {
return (function () {
var MiddleEarth = {},
Sauron = {},
console = window.console || {'log': function () {}};
/**
* Found this goodie on wiki: (Palantir ... |
version https://git-lfs.github.com/spec/v1
oid sha256:7387533a0fd036c92189e1199d45ba486b5bfb5928f50caaaf24c0d6e1bb341f
size 3290
|
/*
The following is the data used by the application.
Typically this data is loaded from a server or
from a file.
To make life easier to see how the app works the
data is provided here instead of loading it from somewhere.
*/
var title = 'Animal Photographs';
var photos = [
{
uri : '../images/birdnest.pn... |
import $ from 'jquery';
import interact from 'interact.js';
export default function() {
console.log('dragAndHover');
// target elements with the "draggable" class
interact('.grate-it').draggable({
// enable inertial throwing
// inertia: true,
// keep the element within the area of... |
/**
* Date: 2013.04.15
* requestHandles dispatch.
*/
var requestHandlers = {};
var globaldata = root.globaldata;
var verification = require('./handlers/verification');
requestHandlers.verification = function (request, response, pathObject, data) {
var operation = pathObject["operation"];
if (operation =... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { createStructuredSelector } from 'reselect';
import Chip from 'material-ui/Chip';
import Avatar from 'material-ui/Avatar';
import Paper from 'material-... |
'use strict';
const TEMPLATES_PATH = `${__dirname}/../../web`;
var uuid = require('node-uuid'),
restify = require('restify'),
fs = require('fs'),
logger = require('winston'),
Handlebars = require('handlebars'),
Router = require('./abstract.router');
class StaticRouter extends Router {
configure () {
this.co... |
'use strict';
var path = require('path');
var gulp = require('gulp');
var conf = require('./conf');
var $ = require('gulp-load-plugins')({
pattern: ['gulp-*', 'main-bower-files', 'uglify-save-license', 'del']
});
gulp.task('partials', function() {
return gulp.src([
path.join(conf.paths.src, '/app/**/*.html')... |
'use strict';
// This file is auto-generated using scripts/doc-sync.js
/**
* The security level of a page or resource.
*/
exports.SecurityState = String;
/**
* An explanation of an factor contributing to the security state.
*
* @param {SecurityState} securityState Security state representing the se... |
(function (win, doc, exports, undefined) {
'use strict';
var fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/;
function Class() { /* noop. */ }
Class.extend = function (props) {
var SuperClass = this;
function Class() {
if (typeof this.init === 'function') {
... |
angular.module('demoApp').component('people', {
bindings: { people: '<' },
templateUrl: 'partials/people.html'
}); |
import { Store, createStore } from './store'
import { storeKey, useStore } from './injectKey'
import { mapState, mapMutations, mapGetters, mapActions, createNamespacedHelpers } from './helpers'
import { createLogger } from './plugins/logger'
export default {
version: '__VERSION__',
Store,
storeKey,
createStore... |
/*
* MIT License
*
* Copyright (c) 2016 yanbo
*
* 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, m... |
import {combineReducers} from "redux";
import {LOAD_ACCOUNT, LOAD_STATE, NEW_ACCOUNT} from "b:actions/index";
import {addSpecs} from "b:spec";
const noAccount = "";
const accounts = combineReducers({
byAddress,
current,
loaded,
});
export default accounts;
function byAddress(state = {}, action) {
switch(act... |
import MainView from './MainView'
export var buckConverterCalculator = {
displayName: 'Buck Converter (SMPS)',
description: 'This calculator can be used to calculate the values of the critical component values for a buck converter.',
imagePath: require('./grid-icon.png'),
category: [ 'Electronics', 'SMPS' ],
... |
import { combineReducers } from 'redux';
import searchReducer from './searchReducer';
import dialogReducer from './dialogReducer';
import legendReducer from './legendReducer';
import headerReducer from './headerReducer';
import mapReducer from './mapReducer';
// Bundled reducers used by store/store.js.
export defaul... |
const bannedList = {
version: '12',
cards: [
'guest-of-honor',
'charge',
'isawa-tadaka',
'karada-district',
'master-of-gisei-toshi',
'kanjo-district',
'jurojin-s-curse',
'hidden-moon-dojo',
'mirumoto-daisho'
]
};
class BannedList {
... |
var assert = require('assert');
var sinon = require('sinon');
var director = require('../src/director.js');
var builder = require('../src/builder.js');
var converter = require('../src/converter.js');
describe("Projection converter\n", function() {
before(function() {
decoder = new director.Decoder();
}... |
var set = Ember.set, get = Ember.get;
// .......................................................
// render()
//
module("Ember.RenderBuffer");
test("RenderBuffers combine strings", function() {
var buffer = new Ember.RenderBuffer('div');
buffer.pushOpeningTag();
buffer.push('a');
buffer.push('b');
equal("... |
import React from 'react';
import PropTypes from 'prop-types';
class Knob extends React.Component {
static propTypes = {
value: PropTypes.number.isRequired,
onChange: PropTypes.func.isRequired,
onChangeEnd: PropTypes.func,
min: PropTypes.number,
max: PropTypes.number,
step: PropTypes.number,
... |
module.exports = function(RED) {
function constantNode(config) {
RED.nodes.createNode(this,config);
this.name = config.name;
this.value = config.value;
this.repeat = config.repeat;
var node = this;
var output = 0;
function setOutput()
{
output = node.value;
... |
// Workers can share any TCP connection
var config = require(process.env.CONFIGFILE || './config');
var webConfig = config.web;
var path = require('path');
var fs = require('fs');
var assert = require('assert');
var node_modules = config.node_modules;
if(node_modules) {
node_modules = [].concat(node_modules).map(fu... |
// Copyright 2011 The Closure Library Authors. 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
//
// Unl... |
'use strict';
angular.module('mean.system')
.directive('scrollBottom', function () {
return {
scope: {
scrollBottom: "="
},
link: function (scope, element) {
scope.$watchCollection('scrollBottom', function (newValue) {
if (newValue)
{
$(element).scrollTop($(element)[... |
var arduino = require("arduino");
var spi = require("arduino-spi");
function setup()
{
spi.beginTransaction(14000, MSBFIRST, SPI_MODE0);
}
function loop()
{
} |
var models = require( 'models' );
var User = models.User;
var passport = require('passport');
var LocalStrategy = require('passport-local');
var FacebookStrategy = require('passport-facebook').Strategy;
var GoogleStrategy = require('passport-google-oauth').OAuth2Strategy;
var config = require('config');
var Promise = r... |
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Error perferendis nam illum necessitatibus animi consequuntur maxime quod ducimus, voluptatem ipsa. |
var net = require('net');
var clients = {};
var server = net.createServer(function (socket) {
socket.name = socket.remoteAddress +':'+ socket.remotePort;
if (typeof clients[socket.name] == 'undefined') {
clients[socket.name] = {socket: socket, buffer: ''};
}
socket.on('data', function(data) {
console.log(sock... |
var html = require('fs').readFileSync(__dirname+'/test5.html');
var app = require('http').createServer(function(req, res){ res.end(html); });
app.listen(8091);
var io = require("socket.io");
var io = io.listen(app);
io.sockets.on('connection', function (socket) {
socket.emit('faitUneAlerte');
});
|
const PORT = 8022;
export {
PORT,
};
|
'use strict'
const tap = require('tap')
const isTbr = require('../index')
var options = {
skoleid: 3840,
postnummer: '',
gatenavn: 'Djevelgaten',
husnummer: '666'
}
options.postnummer = 3960
tap.equal(isTbr(options), false, 'Vest Telemark vgs, avdeling Seljord returns false from 3960 Stathelle')
options.pos... |
module.exports = {
"extends": "standard",
"plugins": [
"standard",
"promise"
],
rules: {
'semi': 0,
'space-before-function-paren': 0,
'no-multiple-empty-lines': 0,
"comma-dangle": 0
}
};
|
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import './Header.css';
class Header extends Component {
static propTypes = {
title: PropTypes.string.isRequired,
children: PropTypes.node,
}
render() {
const { title, children } = this.props;
return (
<header... |
/*
* Tests EasyAutocomplete - response json
*
* @author Łukasz Pawełczak
*/
QUnit.test('JSON - Simple list response', function (assert) {
// given
var completerOne = new EasyAutocomplete.main($('#inputOne'), {
url: 'resources/colors_string.json', ajaxCallback: function () {
// then
assertList();
}
})... |
'use strict';
const pathFn = require('path');
const fs = require('hexo-fs');
const Promise = require('bluebird');
const moment = require('moment');
const sinon = require('sinon');
describe('View', () => {
const Hexo = require('../../../lib/hexo');
const hexo = new Hexo(pathFn.join(__dirname, 'theme_test'));
con... |
{
assert.equal(1, a);
assert.isUndefined(b);
assert.isUndefined(c);
a = b = c = undefined;
}
|
app.post('/login', function(req, res) {
var query = base.extend({}, req.body, req.query);
// TODO DB request sholud be here
if (config.auth.hasOwnProperty(query.login) && query.password === config.auth[query.login]){
req.session.admin = true;
res.send({access: 'granted'});
log.info('AUTH', 'User have... |
/**
* @file This prototype contains all important environment data of a stage.
*
* @author Human Interactive
*/
"use strict";
var THREE = require( "three" );
var scene = require( "./Scene" );
var actionManager = require( "../action/ActionManager" );
var entityManager = require( "../game/entity/EntityManager" );... |
'use strict';
var request = require('request');
var through = require('through2');
var DEFAULTS = {
objectMode: false,
request: request,
retries: 2,
noResponseRetries: 2,
currentRetryAttempt: 0,
shouldRetryFn: function (response) {
var retryRanges = [
// https://en.wikipedia.org/wiki/List_of_HTT... |
import bound from './bound'
const setX = x => () => ({x})
export const boundSetX = (x) => (state, props) => bound({
result: setX(x)(),
...state,
...props
})
export default setX
|
var count = 0;
function setup() {
var can = createCanvas(windowWidth, 650);
can.parent('p5-sketch');
}
function draw() {
var r = 255;
var g = 255;
var b = 255;
var a = Math.floor(Math.random() * 82);
background(0);
drawCircle(width / 2, height / 2, count);
count += 1;
if (count... |
/* ************************************************************************
*
* qooxdoo-compiler - node.js based replacement for the Qooxdoo python
* toolchain
*
* https://github.com/qooxdoo/qooxdoo-compiler
*
* Copyright:
* 2011-2017 Zenesis Limited, http://www.zenesis.com
*
* License:
*... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.