code
stringlengths
2
1.05M
const { onCreateNode } = require(`../gatsby-node`) describe(`Process TOML nodes correctly`, () => { const node = { id: `whatever`, parent: null, children: [], extension: `toml`, internal: { contentDigest: `whatever`, }, name: `test`, } // Provide fake functions const loadNode...
import coveralls from 'gulp-coveralls'; import exit from 'gulp-exit'; import gulp from 'gulp'; import istanbul from 'gulp-istanbul'; import jasmineNode from 'gulp-jasmine-node'; import loadPlugins from 'gulp-load-plugins'; import path from 'path'; // Load the gulp plugins into the `plugins` variable const plugins = l...
'use strict'; // Setting up route angular.module('users').config(['$stateProvider', function($stateProvider) { // Users state routing $stateProvider. state('profile', { url: '/settings/profile', templateUrl: 'modules/users/views/settings/edit-profile.client.view.html' }). state('password', { url: '...
"use strict"; function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superCl...
import NodeGit from 'nodegit'; // eslint-disable-line import/no-unresolved import path from 'path'; import { todo } from '../../utils'; import LFS from '../../../build/src'; import ls from '../../../build/src/commands/ls'; describe('ls-files', () => { it('does generate ls response', () => { const workdirPath = p...
import { combineReducers } from 'redux' import {listModsIsLoading, listModsHasError, listMods, selectMod} from './listMods' const moditor = combineReducers({ listModsIsLoading, listModsHasError, listMods, selectMod }) export default moditor
export * from './createReducer'; export const truncate = (string, len = 30) => { if (string && string.length > len) { return string.substring(0, len) + '...'; } else { return string; } }
require("kaoscript/register"); var {Dictionary, Type} = require("@kaoscript/runtime"); module.exports = function() { var __ks_Array = require("../_/_array.ks")().__ks_Array; var __ks_Dictionary = {}; function foo(x) { if(arguments.length < 1) { throw new SyntaxError("Wrong number of arguments (" + arguments.len...
import { average } from '../src/math-toolbox' describe('Calculate average', () => { it('Expect the everage of 10, 10, 10, 20, 30 to be 16', () => { expect(average(10, 20, 10, 10, 30)).toBe(16) }) })
const { list, listDeep, join } = require('file-manager-js'); const config = require('config'); const trimSlashes = require('../../../shared/trimSlashes'); const removeRootDir = require('../../../shared/removeRootDir'); const middleware = require('./middleware'); const handler = require('./handler'); module.exports = a...
'use strict'; var fs = require('fs'); var path = require('path'); var pkg = require('../package'); var indexFile = path.join(__dirname, '..', 'index.html'); var html = fs.readFileSync(indexFile, 'utf8') .replace(/{{(.*?)}}/g, function (_, key) { return pkg[key.trim()] || key; }); module.exports = function *(...
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors // MIT License. See license.txt frappe.provide('frappe.ui'); frappe.ui.Tree = class { constructor({ parent, label, root_value, icon_set, toolbar, expandable, with_skeleton=1, // eslint-disable-line args, method, get_label, on_render, on_clic...
/* global describe, it *//* jshint -W030 */ "use strict"; var expect = require('chai').expect; var welsh = require('../dist'); describe("Lazy Executors", function () { it("should probably work with 'then'", function (done) { var mutated = 0; var p = welsh.Promise.lazy(function (resolve) { expect(mut...
/* Implement the following operations of a stack using queues. push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack. top() -- Get the top element. empty() -- Return whether the stack is empty. Notes: You must use only standard operations of a queue -- which means only push to back, pe...
version https://git-lfs.github.com/spec/v1 oid sha256:d807c69ee89220d0a6833b68a371b2e518c25a1a6d4d5da6dcc75ad2ffef48ac size 2876
/* VRT - Copyright © 2014 Odd Marthon Lende All Rights Reserved */ define([ 'types/widget' ], function ( Widget ) { function Image (fields) { Widget.call(this, fields); } Image.prototype = Object.create(Widget.prototype); Image.required = { '(options)' : { ...
;(function(root, factory) { if (typeof define === 'function' && define.amd) { define(factory); } else if (typeof exports === 'object') { module.exports = factory(); } else { root.NProgress = factory(); } })(this, function() { var NProgress = {}; NProgress.version = '0.2.0'; var Settings =...
require('./comp_navigation.js');
var nsfw = require("../index.js"); var assert = require("assert"); var fse = require("fs-extra"); var path = require("path"); var Promise = require("bluebird"); describe('Node Sentinel File Watcher', function() { var workDir = path.resolve("./mockfs"); beforeEach(function() { function makeDir(identifier) { ...
;(function(print) { 'use strict'; function problem01For(list) { var sum = 0; for (var i = 0; i < list.length; i++) { sum += list[i]; } return sum; } function problem01While(list) { var sum = 0; var i = 0; var n = 0; while (n = list[i++]) { sum += n; } return...
Accordion = Class( { HH: 30, renderTo: null, width: 'auto', height: 'auto', cls: '', autoRender: false, panels: [], hp: 0, isFix: false, initialize: function(config) { apply(this, config); if (!this.renderTo) throw new Error('renderTo is undefined!'); if (t...
var class_tempest_1_1_size_event = [ [ "SizeEvent", "class_tempest_1_1_size_event.html#aa79068ad8126d339f225bbefa37c9997", null ], [ "size", "class_tempest_1_1_size_event.html#af7671656dc87f84800d44316cc9f06ec", null ], [ "h", "class_tempest_1_1_size_event.html#a992bab532628dc20ad833b958eb1a955", null ], ...
!function(e,t,n,o,a,c,s,i,m){e.__of=a,e[a]||(i=t.createElement(n),s=e[a]=function(){ s.q.push([arguments,+new Date])},s.v=1,s.q=[],s.t=+new Date,c&&s("id",c),s.s=i,s.s.src=o, m=t.getElementsByTagName(n)[0],m.parentNode.insertBefore(i,m))}(window,document,"script","https://widget.local.dev.outfound.net/js","ofwidget","6...
'use strict'; import { get, logSuccess } from './util.js'; export const WINDOW_STATES = ['normal', 'maximized', 'minimized', 'fullscreen']; export const EXPLICIT_GEOMETRY_PROPS = ['left', 'top', 'width', 'height']; /** * Seat a window. Try a second time if first attempt fails. * * Window position may be...
var five = require("johnny-five"), board, potentiometer; board = new five.Board(); board.on("ready", function() { // Create a new `potentiometer` hardware instance. potentiometer = new five.Sensor({ pin: "A0", freq: 25 }); // "data" get the current reading from the potentiometer potentiometer.on...
var hello = 'Welcome to this page.'; // requires 'foo.js' window.onload = function init() { alert(hello); };
const gulp = require('gulp'); const sass = require('gulp-sass'); const autoprefixer = require('gulp-autoprefixer'); const runSequence = require('run-sequence'); const livereload = require('gulp-livereload'); const del = require('del'); gulp.task('clean', callback => { del(['dist/**'], ca...
var mongoose = require('mongoose'); var UserSchema = mongoose.Schema({ username: String, password: String, email: String }); module.exports = mongoose.model('user', UserSchema);
var RECORDING = Config.recording; var RECORDING_SECONDS = Config.recordingDuration; var RECORDING_CLICKS = true; var PIANO_WIDTH = 1400; var PIANO_HEIGHT = 300; function init() { gCanvas = document.getElementById("myCanvas"); gCanvas.setAttribute('tabindex','0'); gCanvas.focus(); var ctx = gCanvas.ge...
Oskari.clazz.define('Oskari.mapframework.ui.module.common.mapmodule.DrawPlugin.request.StartDrawingRequest', function(config) { // TODO: do we pass selected category colors here? if (config.geometry) { // editing existing this._geometry = config.geometry; } else if (config.continueCurrent)...
'use strict'; angular.module('menuberApp') .controller('NavbarController', function ($scope, $location, $state, Auth, Principal, ENV) { $scope.isAuthenticated = Principal.isAuthenticated; $scope.$state = $state; $scope.inProduction = ENV === 'prod'; $scope.logout = function () { ...
/** * Return a unique identifier with the given `len`. * * utils.uid(10); * // => "FDaS435D2z" * * @param {Number} len * @return {String} * @api private */ exports.uid = function (len) { var buf = [] var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' var charlen = chars....
/*===================================================*\ * SkyDuelHandler() \*===================================================*/ var SkyDuelHandler = function(app) { this.app = app; this.skyduelService = app.get('skyduelService'); this.messaging = app.get('messagingService'); }; /*===========================...
/* Interface for our smart contracts */ // Creates a new game and returns the newly minted contract address export function createNewGameContract() { return new Promise(resolve => { // mockup for now setTimeout(() => { resolve('0xfd09000c01309399d4c8507252d8cab950286ed8') }, 100...
'use strict'; const express = require('express'); const router = express.Router(); const jwt = require('jsonwebtoken'); const configs = require('../configs/configs.js'); const authenticationService = require('../services/authenticationService'); router.post('/implicit/login', function (req, res) { //If user canc...
export default { data () { return { lightActive: false, darkActive: false }; } };
require('normalize.css/normalize.css'); require('styles/App.css'); import React from 'react'; import ReactDOM from 'react-dom'; import SearchComponent from './SearchComponent'; import UserInfoComponent from './UserInfoComponent'; import RepositoryInfoComponent from './RepositoryInfoComponent'; import MainStore from '...
var postcss = require('postcss'); module.exports = postcss.plugin('postcss-pseudo-content-insert', function (opts) { opts = opts || {}; // Removes an element from an array. // String value: the value to search and remove. // return: an array with the removed element; false otherwise. function remo...
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.ex...
/* * params: JS using presenter */ var sale_type = {'1':'直接雇用','2':'職業紹介','3':'派遣','4':'紹介予定派遣','5':'請負','6':'求人代行'}; var plz_choice = '<option value="">----</option>'; var pgroup = function(){ var ready = function(){ }; var filterpartners = function(){ var group_id = $('#form_m_group_id').val(); ...
describe('ui.grid.saveState uiGridSaveStateService', function () { var uiGridSaveStateService; var uiGridSaveStateConstants; var uiGridSelectionService; var uiGridCellNavService; var uiGridGroupingService; var uiGridTreeViewService; var uiGridPinningService; var gridClassFactory; var grid; var $comp...
// Upload media handler for uploading files via POST request // 'use strict'; const mime = require('mime-types').lookup; const path = require('path'); const resizeParse = require('../../../_lib/resize_parse'); module.exports = function (N, apiPath) { const config = resizeParse(N.config.users.upload...
var test = require("tape"), Sandal = require('../sandal.js'), internalContainer = new Sandal(), container1 = new Sandal(), container2 = new Sandal(); container1.internal(internalContainer); container2.internal(internalContainer); test('Share internal container', function (t) { internalContainer.factory('random...
export default { autoprefixer: true, // http://cssnano.co/optimisations/autoprefixer/ calc: true, // http://cssnano.co/optimisations/calc/ colormin: true, // http://cssnano.co/optimisations/colormin/ convertValues: true, // http://cssnano.co/optimisations/convertValues/ core: true, // http://cssnano.co/optimi...
import React, { Component, PropTypes } from 'react' import Colors from '../Theme/Colors' import { merge } from 'ramda' const Icon = require(`react-icons/lib/md/stop`) const Styles = { container: { color: Colors.subtleLine, cursor: 'pointer' }, containerActive: { color: Colors.bold }, iconSize: 32...
angular.module('MailApp') .config(function($stateProvider, $urlRouterProvider, $httpProvider) { //add interceptors... $httpProvider.interceptors.push('AuthInterceptor'); // Application routes $stateProvider .state('login',{ component:'dfLogin', ...
/* @flow */ /* eslint-disable import/prefer-default-export */ import {createAction} from 'redux-actions'; import type {Post} from '../types/model'; import type {Action, ThunkAction} from '../types/redux'; function fetching(id: number): Action { return {type: 'FETCHING_POST', payload: id}; } function fetched(post: P...
module.exports = { "name": "ATmega325A", "timeout": 200, "stabDelay": 100, "cmdexeDelay": 25, "syncLoops": 32, "byteDelay": 0, "pollIndex": 3, "pollValue": 83, "preDelay": 1, "postDelay": 1, "pgmEnable": [172, 83, 0, 0], "erase": { "cmd": [172, 128, 0, 0], "delay": 45, "pollMethod": ...
var Seq = require('seq'); var Hash = require('hashish'); var EventEmitter = require('events').EventEmitter; var Bin = require('binary'); var Buf = require('bufferlist/binary'); var BufferList = require('bufferlist'); console.log('loop'); function emitter () { var em = new EventEmitter; var i = 0; var iv ...
#!/usr/bin/env node /** * Creates a mutation table as JSON from a given directory of personalis or PDGX JSON files. * * Example usage: * * `./create-mutation-table.js * --input ../data/default/personalis/ * --output ../data/mutations.json * --type personalis|pgdx|watson` * * Output structure: ...
const chai = require("chai"); const chaiAsPromised = require("chai-as-promised"); const nock = require("nock"); chai.use(chaiAsPromised); chai.should(); const expect = chai.expect; const pnut = require("../lib/pnut"); before(function() { let base = "https://api.pnut.io/v0"; nock(base) .get("/users/1") .r...
"use strict"; var yeoman = require("yeoman-generator"); var chalk = require("chalk"); var yosay = require("yosay"); module.exports = yeoman.generators.Base.extend({ prompting: function () { var done = this.async(); // Have Yeoman greet the user. this.log(yosay( "Welcome to the " + chalk.red("bauer...
export function setOfficeTitle(state, action, lang) { let postState = Object.assign({},state); if (postState.footer && postState.footer["offices"] && postState.footer["offices"][lang]) { for (let i = 0, len = postState.footer["offices"][lang].length; i < len; i++) { if (postState.footer["off...
var config = require('../web.config'); var _ = require('lodash'); module.exports = function (ngModule) { ngModule.service('songService', ['storeFactory', 'macroListService', '$q', function (storeFactory, macroListService, $q) { function getPayload(song) { var payload = { tracks: [] }; ...
import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; import AppBar from '@material-ui/core/AppBar'; import CssBaseline from '@material-ui/core/CssBaseline'; import Toolbar from '@material-ui/core/Toolbar'; import Typography from '@material-ui/core/Typography'; import IconButton from '@mater...
var debug = require('debug')('webtorrent:server') var http = require('http') var mime = require('mime') var pump = require('pump') var rangeParser = require('range-parser') var url = require('url') module.exports = function Server (torrent, opts) { var server = http.createServer(opts) server.on('connection', func...
import Self from '../../../src'; module.exports = { entry: './index.js', devtool: 'source-map', module: { rules: [ { test: /\.css$/, use: [Self.loader, 'css-loader'], }, ], }, plugins: [ new Self({ filename: '[name].css', }), ], };
'use strict'; var webpack = require('webpack'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var HtmlWebpackPlugin = require('html-webpack-plugin'); const path = require('path'); const _ = require('lodash'); var contextPath = path.resolve(__dirname + '\\', '..', '..'); console.log(contextPath); ...
module.exports = { entities : { admin : { "user_name":"bob", "auth_type":"agile-local", "password":"secret", "id":"bob!@!agile-local", "type":"/user", "role":"admin", "owner":"bob!@!agile-local" }, user : { ...
const ezGulp = require("./ez-gulp"); const PROJECT_NAME = "unrest"; const JS_FILES = { vendor: ["src/vendor/*.js"], "demo/tests": ["demo/tests/*.js"], unrest: [ "src/js/index.js", "src/js/*.js", "src/js/*.tag", "src/js/form/index.js", "src/js/form/*js", "src/js/form/*.tag", "src/js/d...
define([ 'services/unitofwork', 'services/logger', 'services/routeconfig', 'services/appsecurity', 'plugins/router', 'plugins/dialog', 'bootbox', 'viewmodels/admin/networks', 'viewmodels/admin/network', 'viewmodels/admin/networkEdit', 'viewmodels/home/company', 'viewmode...
var models = require('../models') , Category = models.Category; var arr = ['架构设计', 'IT业界', '云计算', '数据库', '编程语言', 'Web前端', '其他']; for (var i = 0; i < 5; i++) { var cat = new Category(); cat.typename = arr[i]; cat.create_date = new Date(); cat.save(function(err) { }); }
// Generated by scripts/generate-built-ins import { register } from '../ReactTitaniumBridge'; register('maskedimage', 'Ti.UI.MaskedImage', { textProperty: undefined, factory: props => Ti.UI.createMaskedImage(props) });
const prettyFormat = require('pretty-format'); const isObject = require('isobject'); const JSONRPCFactory = require('../lib'); const uuidv1 = require('uuid/v1'); const arrify = require('arrify'); class JSONRPCClient { constructor(options) { const optionsIsObj = isObject(options); this._options = { keep...
var Wrappers = require('./wrappers'); var Mat = new Wrappers.Mat('outB', 'outC'); var Teye = new Wrappers.Teye('in2', 'in3', 'in4'); while (1) { var state = ""; if(Teye.isState(['white', 'black', 'white']) || Teye.isState(['black', 'black', 'black'])) { Mat.runForever(60); } if(Teye.isState(['black',...
const gatherOsMetrics = require('../../src/helpers/gather-os-metrics'); jest.mock('pidusage'); const pidusage = require('pidusage'); describe('helpers', () => { describe('gather-os-metrics', () => { describe('when invoked', () => { it('then pidusage should be called', () => { gatherOsMetrics({}, {...
/* German initialisation for the jQuery UI date picker plugin. */ /* Written by Milian Wolff (mail@milianw.de). */ (function( factory ) { if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. define([ "../datepicker" ], factory ); } else { // Browser globals factory( jQuery.datepi...
var list=["getCategories","getCheckins","postCheckin","getCities","getOpenEvents","getConcierge","getEvents","postEvent","getEventComments","postEventComment","postEventCommentFlag","getEventCommentLikes","getEventRatings","postEventRating","getEventAttendance","takeEventAttendance","getEverywhereComments","postEverywh...
var SingleLineTextView; (function ($, _, Backbone, Marionette, ReusableTypeLayoutView, singleLineTextTpl) { SingleLineTextView = ReusableTypeLayoutView.extend({ template: singleLineTextTpl, templateContext: function () { var self = this; return { data...
this.NesDb = this.NesDb || {}; NesDb[ 'C3463FC08A3553C77EBD6114C5F1910D63773A85' ] = { "$": { "name": "Matsumoto Tooru no Kabushiki Hisshou Gaku 2", "altname": "松本亨の株式必勝学2", "class": "Licensed", "catalog": "IMA-K2", "publisher": "Imagineer", "developer": "Infinity", "region": "Japan", "players": "1", ...
// ==UserScript== // @name Drostie's Fig Hunter custom stylesheet // @namespace http://fig.drostie.org/ // @include http://www.fighunter.com/* // @include http://www.fighunter.com/ // ==/UserScript== function array(x) { return Array.prototype.slice.call(x, 0); } function add_class(e, c...
var equal = Ember.computed.equal; var alias = Ember.computed.alias; export default Ember.ObjectController.extend({ isEdit: false, // Bound to editing textbox txtValue: null, isCalculated: function() { return this.get('value.type') !== 'type-descriptor'; }.property('value.type'), isEmberObject: equal...
describe('Pixel density provider', function () { 'use strict'; var RSrcPixelDensity; // beforeEach(function () { // window.matchMedia = function () { return { matches: false }; }; // }); // beforeEach(module('ng-responsive-image.pixel-density')); // beforeEach(inject(function (_RSrcPixelDensity_) { ...
#!/usr/bin/env node var thumbd = require('../lib') var _ = require('lodash') var fs = require('fs') var yargs = require('yargs') .option('k', { alias: 'aws_key', description: 'AWS key id', required: true, default: process.env.AWS_KEY }) .option('s', { alias: 'aws_secret', ...
/* * heap-dump.js: parses serialized JSON representation of a V8 snapshot */ var mod_assert = require('assert'); var mod_fs = require('fs'); var mod_repl = require('repl'); var mod_sys = require('sys'); var sprintf = require('sprintf').sprintf; mod_repl.writer = function (obj) { return (mod_sys.inspect(obj, false, ...
// moment.js locale configuration // locale : Burmese (my) // author : Squar team, mysquar.com (function (factory) { if (typeof define === 'function' && define.amd) { define(['moment'], factory); // AMD } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { ...
//Generates the google results for the given keyword and returns the results. var express = require('express'); var URL = require('url'); var querystring = require('querystring'); var app = express(); var google = require('google'); google.resultsPerPage = 30; var nextCounter = 1; app.get('/', function(req, res) { ...
(function () { /* * graceProduce('.js-selector', ClassName, options) * * to get a instance of the Module ClassName for each DOM element * Factory Pattern */ /* * graceCreate('.js-selector', ClassName, options) * * to get one instance of the Module ClassName with each DOM element * Single...
var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; define(["require", "exports", './Observable', './Subscriber', ...
(function(){ angular.module('portfolio', ['portfolio.controllers', 'portfolio.services', 'ngAnimate', 'ngSanitize']) .directive('portfolioItem', function() { return { restrict: 'E', templateUrl: 'angular/portfolio-item.html' }; }) .directive('portfolioItemDetail', function() { ...
var templates = require('./templates'); module.exports = function() { // Komponent: '<%= name %>' }; // - To use other bunts, just install them using npm and then require() them. // - Use module.exports to expose functionality.
/** * Expose middleware. */ exports = module.exports = require('./contentblocks');
import Ember from 'ember'; import DS from 'ember-data'; import DSpaceObject from './dspace-object'; export default DSpaceObject.extend({ logo: DS.belongsTo('bitstream', { async: true }), parentCommunity: DS.belongsTo('community', { async: true }), copyrightText: DS.attr('string'), introductoryText: DS.attr('st...
8.0.0-beta6:4da3dc8152549317ef4f91a3167d33a036d334742613f2cf3de6421bd09f51d3 8.0.0-beta7:4da3dc8152549317ef4f91a3167d33a036d334742613f2cf3de6421bd09f51d3 8.0.0-beta9:4da3dc8152549317ef4f91a3167d33a036d334742613f2cf3de6421bd09f51d3 8.0.0-beta10:4da3dc8152549317ef4f91a3167d33a036d334742613f2cf3de6421bd09f51d3 8.0.0-beta1...
// flow-typed signature: 59bc9b0d34e45eb52deaf978c46a711d // flow-typed version: <<STUB>>/@babel/core_v^7.4.5/flow_v0.100.0 /** * This is an autogenerated libdef stub for: * * '@babel/core' * * Fill this stub out by replacing all the `any` types. * * Once filled out, we encourage you to share your work with t...
/*! * Resistance - A javascript flow controller * v1.3.2 * https://github.com/jgallen23/resistance * copyright JGA 2011 * MIT License */ !function(e,t){typeof module!="undefined"&&module.exports?module.exports=t():typeof define=="function"&&typeof define.amd=="object"?define(t):this[e]=t()}("R",function(){...
/** * Patch for Ext.picker.Date to allow for updating local at runtime. */ Ext.define('nineam-localization-plugin-ext.controls.Date', { override: 'Ext.picker.Date', /** * Refresh component using Sencha properties now that local has changed */ refresh: function() { var today = Ext.Dat...
const app = require('./src/<%= appName %>') app.start()
const React = require('react'), App = require('./app') React.render(<App />, document.getElementById('app'))
function plotColumn(year){ d3.select("#columnchart").select("svg").remove(); // set the dimensions of the canvas var margin = {top: 30, right: 20, bottom: 30, left: 60}, width = window.innerWidth*0.67 - margin.left - margin.right, height = window.innerHeight*0.61 - margin.top - margin.bottom; // set the range...
$(function() { Politik.location.getCurrent(function(tab) { chrome.runtime.sendMessage({getPage: tab.url}, function(response) { $('#candidate-container').html(response.page); $('#candidate-link').click(function() { Politik.ui.openTab($('#candidate-link').attr('href'));...
export { default, lt } from 'ember-handlebars-conditions/helpers/lt';
function() { return { staticSkipValidationWhenValueUnchangedStrictDoc: { typeFilter: simpleTypeFilter, channels: { write: 'write' }, propertyValidators: { integerProp: { type: 'integer', skipValidationWhenValueUnchangedStrict: true, minimumValue: 0 }...
module.exports = function resolve(deferred, resFn) { return function (err, rows) { console.log(err, rows); if (err) { return deferred.reject(err); } if (resFn) { deferred.resolve(resFn.bind(this)(err, rows)); } else { deferred.resolve(rows); } }; };
'use strict'; var express = require('express'); var routes = require('./app/routes/index.js'); var mongoose = require('mongoose'); var passport = require('passport'); var session = require('express-session'); var bodyParser = require('body-parser') var app = express(); // require('dotenv').load(); require('./app/conf...
import { Modal } from 'antd' const responsePreprocessing = function (res, silent = false, errorMap = {}) { return new Promise((resolve, reject) => { const resData = res.data if (resData.errno === 0) { // response ok resolve(resData.data) } else { // response with error const messa...
describe('skipWeekends', function() { var millisPerDay = 24 * 3600 * 1000; var skipWeekends = fc.scale.discontinuity.skipWeekends(); describe('clampUp', function() { it('should leave non-weekend days unchanged', function() { var date = new Date(2015, 0, 19); // monday expe...
"use strict"; let fs = require("fs"), path = require("path"), botkit = require("botkit"), FoodTruckLille = require("./jobs/FoodTruckLille"); // Get the Slack API token let config = JSON.parse(fs.readFileSync(path.join(__dirname, ".config"))); // Get river online let controller = botkit.slackbot(); let river = cont...
/** * UserController * * @description :: Server-side logic for managing users * @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers */ module.exports = { index: function(req, res) { res.view({ firstName: req.user[0].firstName }); }, signup: function(req, res) { res.view(...
var app = app || {}; (function(){ app.TestButton = React.createClass({displayName: "TestButton", handleClick: function() { this.props.submitTestTask(this.props.btnType); }, render: function() { return ( React.createElement("button", {onClick: this.handleClick, ...