code stringlengths 2 1.05M |
|---|
var Parser = require('jsonparse')
, Stream = require('stream').Stream
, through = require('through')
/*
the value of this.stack that creationix's jsonparse has is weird.
it makes this code ugly, but his problem is way harder that mine,
so i'll forgive him.
*/
exports.parse = function (path) {
var pars... |
/*!
* jQuery UI Accordion 1.9.2
* http://jqueryui.com
*
* Copyright 2012 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/accordion/
*
* Depends:
* jquery.ui.core.js
* jquery.ui.widget.js
*/
(function( $, undefined ) {
var u... |
/**
* @fileoverview Abstraction of JavaScript source code.
* @author Nicholas C. Zakas
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const TokenStore = require("../to... |
MessageFormat.locale.ko=function(n){return "other"}
|
YUI.add('plugin', function(Y) {
/**
* Provides the base Plugin class, which plugin developers should extend, when creating custom plugins
*
* @module plugin
*/
/**
* The base class for all Plugin instances.
*
* @class Plugin.Base
* @extends Base
* @param {Object} ... |
;
(function($) {
$.fn.highchartTable = function() {
var allowedGraphTypes = ['column', 'line', 'area', 'spline', 'pie'];
var getCallable = function (table, attribute) {
var callback = $(table).data(attribute);
if (typeof callback != 'undefined') {
var infosCallback = callback.split(... |
var g_iteration = 0;
function FindProxyForURL(url, host) {
alert('iteration: ' + g_iteration++);
var ips = [
myIpAddress(),
dnsResolve(''),
dnsResolveEx('host1'),
dnsResolve('host2'),
dnsResolve('host3'),
myIpAddress(),
dnsResolve('host3'),
dnsResolveEx('host1'),
myIpAddress(),... |
tinyMCE.addI18n('sl.simple',{"cleanup_desc":"Pre\u010disti kodo","redo_desc":"Uveljavi (Ctrl+Y)","undo_desc":"Razveljavi (Ctrl+Z)","numlist_desc":"Na\u0161tevanje","bullist_desc":"Alineje","striketrough_desc":"Pre\u010drtano","underline_desc":"Pod\u010drtano (Ctrl+U)","italic_desc":"Po\u0161evno (Ctrl+I)","bold_desc":"... |
Template.configureLoginServiceDialogForTwitter.helpers({
siteUrl: function () {
// Twitter doesn't recognize localhost as a domain name
return Meteor.absoluteUrl({replaceLocalhost: true});
}
});
Template.configureLoginServiceDialogForTwitter.fields = function () {
return [
{property: 'consumerKey', lab... |
var _ = require('lodash'),
Promise = require('bluebird'),
cheerio = require('cheerio'),
crypto = require('crypto'),
downsize = require('downsize'),
RSS = require('rss'),
url = require('url'),
config = require('../../../config'),
api = require('../../../api'),
... |
(function() {
var Bacon, BufferingSource, Bus, CompositeUnsubscribe, ConsumingSource, DepCache, Desc, Dispatcher, End, Error, Event, EventStream, Initial, Next, None, Observable, Property, PropertyDispatcher, Some, Source, UpdateBarrier, addPropertyInitValueToStream, assert, assertArray, assertEventStream, assertFunc... |
// 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 ... |
YUI.add('arraylist-filter', function(Y) {
/**
* Collection utilities beyond what is provided in the YUI core
* @module collection
* @submodule arraylist-filter
*/
/**
* Adds filter method to ArrayList prototype
*/
Y.mix(Y.ArrayList.prototype, {
/**
* <p>Create a new ArrayList (or augmenting class inst... |
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
if (typeof define !== 'function') {
var define = require('amdefine')(module, require);
}
define(function (req... |
// Backbone.Marionette v0.8.4
//
// Copyright (C)2012 Derick Bailey, Muted Solutions, LLC
// Distributed Under MIT License
//
// Documentation and Full License Available at:
// http://github.com/derickbailey/backbone.marionette
Backbone.Marionette = (function(Backbone, _, $){
var Marionette = {};
Marionette.versio... |
'use strict';
const mongoose = require('mongoose');
mongoose.Promise = require('bluebird');
const schema = new mongoose.Schema({
accessCode: {
type: String,
unique: true,
},
gameData: String,
turn: {
type: String,
default: 'red',
},
});
const Game = mongoose.model('Game', schema);
module.e... |
var
_ = require('lodash'),
assert = require('assert'),
net = require('net'),
stream = require('stream'),
util = require('util')
;
var AnalyzerOutput = module.exports = function AnalyzerOutput(opts)
{
assert(opts && _.isObject(opts), 'you must pass an options object');
assert(o... |
import express from 'express';
import moment from 'moment';
const router = express.Router();
const vehicleTypes = {
c: 'CAR',
b: 'BIKE',
m: 'MOTORBIKE'
};
const prices = [
12.0, 5.5, 3.9, 0
];
let payments = [];
function randPrice() {
return prices[Math.floor(Math.random() * prices.length)];
}
// get inf... |
'use strict'
module.exports = require('./out/lib/graph')
|
/**
* Logger
*/
const Logger = module.exports = {
info: function(name, message) {
console.log('[' + name.toUpperCase() + '] ' + message);
},
warning: function(message) {
console.log('[WARN]: ' + message);
},
error: function(message) {
console.log('[ERROR]: ' + message);
}
}; |
var each = require('async-each')
function MultiForage (localforage) {
if (!(this instanceof MultiForage)) {
return new MultiForage(localforage)
}
this._localforage = localforage
}
MultiForage.prototype.setItems = function (items, cb) {
var self = this
each(Object.keys(items), function (key, cb) {
s... |
/* eslint no-shadow: 0 */
'use strict';
var test = require('tap').test,
// fs = require('fs'),
// path = require('path'),
geojsonhint = require('geojsonhint'),
MapboxClient = require('../lib/services/directions');
test('MapboxClient#getDirections', function(t) {
t.test('typecheck', function(t) {
var cli... |
const dotenv = require('dotenv').config({ silent: process.env.NODE_ENV === 'production' });
const db = require('./db');
const initServer = require('./server');
initServer().listen(process.env.PORT || 3000, () => {
console.log('Server is up!');
db.init();
}); |
function main(res) {
return (res.view);
}
exports.main = main; |
var
express = require('express');
var app = express();
|
'use strict';
var _ = require('lodash');
var h = require('heroku-cli-util');
function Postgres (heroku) {
this.heroku = heroku;
}
function isProductionDB(db) {
let type = db.type || db.plan.name;
let plan = type.split(':')[1];
return !_.includes(['dev', 'basic', 'hobby-dev', 'hobby-basic'], plan);
}
Postgre... |
import AbstractRestClient from 'ima-plugin-rest-client/dist/AbstractRestClient';
import Configurator from 'ima-plugin-rest-client/dist/Configurator';
import HalsonLinkGenerator from './HalsonLinkGenerator';
import HalsonResponsePostProcessor from './HalsonResponsePostProcessor';
/**
* The REST API client for the HAL... |
'use strict';
var ParamSpec = require ('../grokible.paramSpec');
var expect = require ('chai').expect;
var TestExpect = require ('../grokible.testExpect');
var Exception = require ('../grokible.exception');
var Exceptions = require ('../grokible.exceptions');
var ArgException = Exceptions.ArgException;
var QueryPara... |
/* eslint global-require:0 */
"use strict";
const path = require("path");
const gulp = require("gulp");
const util = require("gulp-util");
const webpack = require("webpack");
const webpackStream = require("webpack-stream");
const notify = require("gulp-notify");
const plumber = require("gulp-plumber");
const gulpIf =... |
/* jshint node:true */
/* global MergeXML, describe, it, before, after, beforeEach, afterEach, expect */
'use strict';
describe('Instantiating object ', function() {
var merger;
it('works', function() {
merger = new MergeXML();
expect(merger).to.be.an('object');
});
});
describe('Adding... |
import { select as d3_select } from 'd3-selection';
import { uiModal } from './modal';
export function uiLoading(context) {
let _modalSelection = d3_select(null);
let _message = '';
let _blocking = false;
let loading = (selection) => {
_modalSelection = uiModal(selection, _blocking);
let loadertext... |
/*
257 RPL_ADMINLOC1
":<admin info>"
- When replying to an ADMIN message, a server
is expected to use replies RPL_ADMINME
through to RPL_ADMINEMAIL and provide a text
message with each. For RPL_ADMINLOC1 a
description of what city, state and... |
'use strict'
var validate = require('aproba')
var renderTemplate = require('./render-template.js')
var wideTruncate = require('./wide-truncate')
var stringWidth = require('string-width')
module.exports = function (theme, width, completed) {
validate('ONN', [theme, width, completed])
if (completed < 0) completed = ... |
var express = require('express');
var router = express.Router();
var kittehs = require('../data/kittehs.json');
var fs = require('fs');
var path = require('path');
/* GET kittehs listing. */
router.get('/:id?', function(req, res, next) {
if (req.params.id !== undefined) {
res.send(kittehs[req.params.id]);
} el... |
/* "ANSI graphics" editor object
by echicken -at- bbs.electronicchicken.com
Embed an ANSI graphics editor in an application.
See xtrn/syncwall/ for a demo, or try the following sample code:
Working example:
load("ansiedit.js");
console.clear(LIGHTGRAY);
var ansiEdit = new ANSIEdit(
{ 'x' : 1,
'y' : ... |
export default class ChromeWrapper {
constructor(chrome) {
this._chrome = chrome;
}
getURL(url) {
return this._chrome.extension.getURL(url);
}
get(chromeStorageKey) {
return new Promise(resolve => {
this._chrome.storage.sync.get(chromeStorageKey, (storeObject) =>
resolve(storeObjec... |
'use strict';
test(() => {
assert_equals(document.currentFragment, document.querySelector('#test-8-3-nested'));
}, 'Fixture 8-3 see document.currentFragment - fragment8-3');
|
var iframe = document.querySelector('#iframe-soundcloud');
iframe.src = '//w.soundcloud.com/player/?url=http://api.soundcloud.com';
var widget = SC.Widget(iframe);
widget.load('https://soundcloud.com/tennisinc', {
'auto_play': 1
});
|
import { expect } from 'chai';
import { default as decorator } from '../../lib/decorators/devices.js';
describe('deviceDecorator', () => {
var config = {
remotes: [
{
name: 'test-remote-1',
codes: {
BTN_1: '0x001',
BTN_2: '0x002',
BTN_3: '0x003'
}
... |
// @flow
import path from 'path';
import fs from 'fs';
import { parseString } from 'xml2js';
const ANDROID_STRINGS_FILE = path.join(
'android',
'app',
'src',
'main',
'res',
'values',
'strings.xml',
);
const androidStringsFileContent = fs.readFileSync(ANDROID_STRINGS_FILE);
// eslint-disable-next-line ... |
const _ = require('lodash');
const user = require('../controllers/user.js');
const errHandlerFactory = res => {
return err => {
console.error('route error', err.message);
res.status(500);
res.json(err);
}
};
const respond = res => body => {
if (!body.result && !body.found) {
res.status(404);
... |
const React = require('react');
const ReactTestUtils = require('react-addons-test-utils');
const assert = require('assert');
const {
base: { Actionable },
bootstrap: { Actionable: BootstrapActionable }
} = require('..');
const actionable = {
summary: 'An actionable summary'
};
describe('Actionable', () => {
... |
function Ship(fillColor, strokeColor) {
this.angle = 0; // theta
this.angleVelocity = 0; // theta velocity
this.fillColor = fillColor; // body color
this.strokeColor = strokeColor; // perimeter color
}
/**
* changes angle by angleVelocity
*/
Ship.prototype.update = function() {
this.angle += this.angleV... |
version https://git-lfs.github.com/spec/v1
oid sha256:3d3e3f1a9122d1afd367a8bb595f7a9daa87d006a673773c6ae62c787b72df8e
size 637
|
define(['services/logger'], function (logger) {
var license = {
title: 'License',
description: 'Photos, source code and articles published on this website, that are not explicitly mentioned otherwise, are licensed under <a target="_blank" href="http://creativecommons.org/licenses/by-nc/3.0/deed.en... |
/* jshint node:true*/
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function (defaults) {
var app = new EmberApp(defaults, {
// Add options here
sassOptions: {
includePaths: [
'bower_components/materialize/sass'
]
}
});
... |
// @flow
import React from 'react'
import { TouchableOpacity, Text } from 'react-native'
import styles from './Styles/FullButtonStyle'
import ExamplesRegistry from '../Services/ExamplesRegistry'
// Example
ExamplesRegistry.add('Full Button', () =>
<FullButton
text='Hey there'
onPress={() => window.alert('Fu... |
function floor(x, y) { return Math.floor(x, y); }
function max(x, y) { return Math.max(x, y); }
function min(x, y) { return Math.min(x, y); }
function swap(arr, x, y) { var t = arr[x]; arr[x] = arr[y]; arr[y] = t; }
function heapify(arr, cmp) {
if (!cmp) throw "missing cmp";
var len = arr.length;
for (i = floor(... |
/*global defineSuite*/
defineSuite([
'Renderer/loadCubeMap',
'Core/Cartesian3',
'Core/defined',
'Core/PrimitiveType',
'Renderer/Buffer',
'Renderer/BufferUsage',
'Renderer/DrawCommand',
'Renderer/ShaderProgram',
'Renderer/VertexArray',
'Spec... |
#!/usr/bin/env node
var mkdirp = require('yeoman-generator/node_modules/mkdirp')
var path = require('path')
var del = require('del')
var win32 = process.platform === 'win32'
var homeDir = process.env[ win32? 'USERPROFILE' : 'HOME']
// USERPROFILE 文件销毁
del([path.join(homeDir, '.generator-lego')], {force:true}) |
module.exports = function(grunt) {
"use strict";
grunt.registerTask( "init", [ "mkdir" ] );
grunt.registerTask( "default", [ "clean", "src", "uglify", "scss", "bytesize" ] );
grunt.registerTask( "mdzr", [ "modernizr:dist" ] );
grunt.registerTask( "lint", [ "jshint", "lintspaces" ] );
grunt.registerTask( "src",... |
// provide tests or parts of tests that are commonly performed.
var testUtility = {};
|
var http = require('http'),
parser = require('libxml-to-js'),
parse_util = require('./parse-util'),
log4js = require('log4js'),
logger = log4js.getLogger('proxy'),
// Requirement in using MassDOT service that client can only make a request at most every 10 seconds.
delay ... |
import Phaser from 'phaser';
import Dungeon from 'backstab/Dungeon';
export default class Preload extends Phaser.Scene {
constructor() {
super('preload');
}
init() {
this.assetsReady = false;
}
preload() {
this.load.image('tileset', 'assets/tileset.png');
this.load.atlas(
'characters'... |
App.Routing = Backbone.Router.extend({
/*
Example code from node-backbone
routes:{
"":"list",
"list":"list",
"employees/:id":"employeeDetails",
"employees/:id/reports":"directReports"
},
initialize:function () {
$('.back').live('click', function(event) {
window.history.back();
return false;
... |
import Scene from './Scene'
describe('(Models) Scene', () => {
it('Should create instance', () => {
const instance = new Scene()
expect(instance).to.be.ok
})
it('Should set default value', () => {
const instance = new Scene()
expect(instance.get('id')).to.eql(0)
expect(instance.get('name')).t... |
//
// The Grunt configuration file for this application.
//
// Grunt is a build and task runner system: it compiles
// javascript templates, minifies CSS, even runs a local
// server.
//
// For more info, see http://gruntjs.com/
//
'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereloa... |
import fetch from 'isomorphic-fetch'
import { apiUrlConfig } from '../../utils/config'
const API_URL = apiUrlConfig + 'api/'
// ------------------------------------
// Constants
// ------------------------------------
export const GET_JURUSAN_START = 'GET_JURUSAN_START'
export const GET_JURUSAN_SUCCESS = 'GET_JURUSAN_... |
export default {
documents: [],
users: []
};
|
import DataFetcher from '../../lib/DataFetcher';
import { Module } from '../../lib/di';
import { selector } from '../../lib/selector';
import Enum from '../../lib/Enum';
import { actionTypeGenerator } from '../../lib/actionTypeGenerator';
import { isEnded, removeInboundRingOutLegs } from '../../lib/callLogHelpers';
imp... |
/**
+-------------------------------------------------------------------
* jQuery ThinkBox - 弹出层插件 - http://zjzit.cn/thinkbox
+-------------------------------------------------------------------
* @version 1.0.0 beta
* @since 2012.09.25
* @author 麦当苗儿 <zuojiazi.cn@gmail.com>
* @github https://git... |
import querystring from 'querystring';
import httpStatus from 'http-status';
function makeError (code, message) {
var err = new Error(message || httpStatus[code]);
err.statusCode = code;
return err;
}
export default function (passport, activeServices, token, callbackURLs) {
return {
socialAuth: function (... |
import {
difference,
every,
find,
get,
isEqual,
keyBy,
keys,
map,
mapValues,
pick,
sum,
} from "lodash/fp";
import { markSampleUploaded, uploadFileToUrlWithRetries } from "~/api";
import { logAnalyticsEvent } from "~/api/analytics";
import { postWithCSRF } from "./core";
export const MAX_MARK_S... |
'use strict';
/* global it */
/* global describe */
var expect = require('chai').expect;
//FIND A BETTER TEST DATA
var fakeSchema = {
number : {type : Number},
date : {type : Date},
hash : {type : String},
};
var fakeData = [
{ number : 11, date : new Date('2001-12-21'), hash : 'Hash'}... |
import pad from 'lodash/padStart';
import get from 'lodash/get';
import { crossComponentTranslator, createTranslator, formatList } from 'kolibri.utils.i18n';
import PageStatus from 'kolibri.coreVue.components.PageStatus';
import coreStringsMixin from 'kolibri.coreVue.mixins.commonCoreStrings';
import { STATUSES } from ... |
var cordova = require('cordova'),
ThermalCordova= require('./ThermalCordova');
module.exports = {
ToUpper: function (successCallback, errorCallback, strInput) {
var upperCase = strInput[0].toUpperCase();
if(upperCase != "") {
successCallback(upperCase);
}
else {
... |
#!/usr/bin/env node
var fs = require('fs')
var path = require('path')
var semver = require('semver')
var proc = require('child_process')
var pick = require('object.pick')
var extend = require('xtend/mutable')
var deepEqual = require('deep-equal')
var find = require('findit')
var minimist = require('minimist')
var para... |
import React from 'react';
import { render } from 'react-dom';
import { Router, Route, browserHistory, IndexRoute } from 'react-router';
import { Provider } from 'react-redux';
import injectTapEventPlugin from 'react-tap-event-plugin';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
injectTapEventP... |
const chai = require('chai');
const lab = require('lab').script();
const sinon = require('sinon');
const sinonChai = require('sinon-chai');
const proxy = require('proxyquire');
const expect = chai.expect;
chai.use(sinonChai);
exports.lab = lab;
lab.describe('Membership transport model', () => {
const sandbox = sinon... |
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import withStyles from 'isomorp... |
const localizedLanguageMap = {
de: 'Deutsch',
'de-DE': 'Deutsch',
'en-US': 'English',
'en-AU': 'English (Australia)',
es: 'Español',
'es-ES': 'Español (España)',
fr: 'Français',
'fr-FR': 'Français',
it: 'Italiano',
'it-IT': 'Italiano',
ja: '日本語',
'ja-JP': '日本語',
ko: '한국어',
'ko-KR': '한국어',
nl: 'Nederlands... |
'use strict'
const Container = require('../../').Container
module.exports = function () {
// Example of using a post-constructor to resolve a cyclic dependency
class A {
static constitute () { return [ Container ] }
constructor (container) {
// Assigning b in a post-constructor allows both objects ... |
var gulp = require('gulp'),
rename = require('gulp-rename'),
cleanCSS = require('gulp-clean-css'),
autoprefixer = require('gulp-autoprefixer'),
uglify = require('gulp-uglify'),
sass = require('gulp-sass'),
watch = require('gulp-watch'),
imagemin = require('gulp-imagemin'),
sourcemaps = require(... |
import { Iterable } from 'immutable'
export default function isImmutable(value) {
return (Iterable.isIterable(value) || (!!value && !!value['@@data']))
}
|
var fs = require('fs');
fs.stat('input.text',function (err, stats) {
if(err){
console.log("Error:"+err);
}
console.log(stats);
console.log(stats.isFile()); //是否为文件
console.log(stats.isDirectory()); // 是否为目录
console.log(stats.isBlockDevice()); //是否为块设备
console.log(stats.isCharacterDevice()); //... |
'use strict';
describe('lib/formatters', sandbox(function () {
var formatters = require('../../lib/formatters');
describe('.camelcase(string)', function () {
it('camel-cases underscore-delimited strings', function () {
formatters.camelcase('my_file_name')
.should.equal('... |
(function() {
"use strict";
function Board(placements) {
if (placements) {
this.placements = placements;
} else {
this.clear();
}
this.scores = [0, 0];
}
Board.size = 4;
Board.sizeCubed = 64;
Board.prototype.setPlacements = function(placements) {
var newPieces = false;
... |
'use strict';
const gulp = require('gulp');
const fs = require('fs');
const gulpLoadPlugins = require('gulp-load-plugins');
const del = require('del');
const path = require('path');
const runSequence = require('run-sequence');
const babelify = require('babelify');
const connect = require('gulp-connect');
const browseri... |
/**
* Class FriendController
* Prints HTML templates to AngularJS using different layouts (empty, main, main_admin, etc...)
* @property {Array} auth authorization of methods (index, list, etc...)
* @property {Object} req ExpressJS request object (req)
* @property {Object} res ExpressJS response object (res)
... |
/* eslint-disable react/sort-comp, react/no-multi-comp, react/destructuring-assignment */
import React, { PureComponent, isValidElement } from 'react';
import PropTypes from 'prop-types';
import { TransitionGroup, CSSTransition } from 'react-transition-group';
import cx from 'classnames';
import { Portal } from 'react-... |
var xtend = require('xtend');
var debug = require('debug')('mongo-heartbeat');
var error = require('debug')('mongo-heartbeat');
error.log = console.error.bind(console);
var cb = require('cb');
var EventEmitter = require('events').EventEmitter;
var defaults = {
timeout: 10000,
interval: 5000,
tolerance: 1
};
fu... |
$(document).ready(function() {
$.getJSON('http://orderharmony.cloudcontrolled.com/index.php', function(data) {
//First add all the rows
$('#products').append('<ul class="thumbnails" id="products-list"></ul>');
//Add All the products
$.each(data.products, function(key, val) {
//Add product holder
$('#p... |
/*
*--------------------------------------------------------------------
* jQuery-Plugin "weekcalc -config.js-"
* Version: 3.0
* Copyright (c) 2016 TIS
*
* Released under the MIT License.
* http://tis2010.jp/license.txt
* -------------------------------------------------------------------
*/
jQuery.noConflict... |
import {Schema} from 'mongoose'
const TagSchema = new Schema({
user: {
type: Schema.Types.ObjectId,
ref: 'Users'
}
}, {timestamps: true})
export default TagSchema
|
var classCSF_1_1Zpt_1_1Rendering_1_1AbstractSourceInfo =
[
[ "AbstractSourceInfo", "classCSF_1_1Zpt_1_1Rendering_1_1AbstractSourceInfo.html#a91536c9ac26ad0955d63806106ac9c89", null ],
[ "Equals", "classCSF_1_1Zpt_1_1Rendering_1_1AbstractSourceInfo.html#a147de92e6587e6f19755db7a41484ab2", null ],
[ "Equals",... |
'use strict';
const Support = require('../support'),
DataTypes = require('../../../lib/data-types'),
expectsql = Support.expectsql,
current = Support.sequelize,
sql = current.dialect.QueryGenerator;
if (current.dialect.name === 'mysql') {
describe(Support.getTestDialectTeaser('SQL'), () => {
... |
/*
* seqex: api/program/ProgramExecutor.js
* Program Executor logic for the seqex program api
*
* Copyright (c) 2013 Jon Brule
* Licensed under the MIT license.
*/
'use strict';
function ProgramExecutor(program) {
this.program = program;
this.running = false;
this.devices = {};
}
var error = function(typ... |
require(
['view/Main', 'util/Prototypes', 'util/Util'],
function(Main, Prototypes, Util) {
$(document).ready(function() {
Util.sendHeartbeat();
setInterval(Util.sendHeartbeat,60000);
var main = new Main({projectId:window.projectId});
$(document.body).append(main.el);
});
}
);
|
import AttrRecognizer from './attribute';
import {
DIRECTION_ALL,
DIRECTION_HORIZONTAL,
DIRECTION_VERTICAL,
DIRECTION_NONE,
DIRECTION_UP,
DIRECTION_DOWN,
DIRECTION_LEFT,
DIRECTION_RIGHT
} from '../inputjs/input-consts';
import { STATE_BEGAN } from '../recognizerjs/recognizer-consts';
im... |
require('../nodash').install(GLOBAL);
var assert = require('../util/assert');
describe('Objects', function () {
it('keys', function () {
var ks = keys({ a: 3, b: 2, c: 1 });
assert.deepEqual(0, difference(ks, "abc").length);
assert.deepEqual([ 'c' ], difference(ks, "ab"));
});
[
... |
/*
* Lazy Line Painter - Path Object
* Generated using 'SVG to Lazy Line Converter'
*
* http://lazylinepainter.info
* Copyright 2013, Cam O'Connell
*
*/
var pfObj = {
"portfolio": {
"strokepath": [
{
"path": "M 99.174723,174.23256 C 89.149051,166.968 65.673155,145.82454 55.429981,135.58137 42.99993... |
"use strict";
// validate that the parameter looks like a block
function validateBlock(block) {
return (
block !== null &&
typeof block !== "undefined" &&
!(block instanceof Error) &&
!block.error &&
block.hash &&
block.parentHash &&
block.number
);
}
module.exports = validateBlock;
|
'use strict';
var express = require('express');
var controller = require('./courses.controller');
var router = express.Router();
router.get('/', controller.index);
module.exports = router;
|
PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[\t \xA0a-gi-z0-9]+/,null,"\t \xa0abcdefgijklmnopqrstuvwxyz0123456789"],[PR.PR_PUNCTUATION,/^[=*~\^\[\]]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],[PR.PR_LITERAL,/^(?:[A-Z][a-z][a-z0-9]+[A-Z][a-z][a-zA-Z0-9]+)\b/],["lang-",/^\{\{\{([\s... |
angular.module('meteor-running-auth').controller("RegisterCtrl",
function ($meteor, $state) {
}
);
|
goog.provide('ol.renderer.dom.Layer');
goog.require('goog.dom');
goog.require('ol.layer.Layer');
goog.require('ol.renderer.Layer');
/**
* @constructor
* @extends {ol.renderer.Layer}
* @param {ol.renderer.Map} mapRenderer Map renderer.
* @param {ol.layer.Layer} layer Layer.
* @param {!Element} targ... |
(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... |
{
this.x = args.x;
this.y = args.y;
this.z = args.z;
this.a = args.a;
this.h = args.h;
}
|
'use strict';
var util = require('util'),
Store = require('../base'),
_ = require('lodash'),
debug = require('debug')('saga:revisionGuardStore:redis'),
uuid = require('node-uuid').v4,
ConcurrencyError = require('../../errors/concurrencyError'),
jsondate = require('jsondate'),
async = require('async'),
... |
/**
* https://github.com/shannonmoeller/gulp-hb
* @param gulp
* @param $
* @param config
* @returns {Function}
*/
module.exports = function (gulp, $, config) {
return function () {
$.handlebarsLayouts.register($.hb.handlebars);
// pass data from gulp.config.js to handlebar-templates
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.