code stringlengths 2 1.05M |
|---|
'use strict';
const metasync = {};
module.exports = metasync;
metasync.DataCollector = function(
expected, // number of collect() calls expected
timeout // collect timeout (optional)
) {
this.expected = expected;
this.timeout = timeout;
this.count = 0;
this.data = {};
this.errs = [];
this.events = {
... |
/**
* @fileoverview Tests for eslint object.
* @author Nicholas C. Zakas
*/
/* globals window */
"use strict";
//------------------------------------------------------------------------------
// Helper
//------------------------------------------------------------------------------
/**
* To make sure this works ... |
/* globals Sammy, generalController, userController, toastr */
(function () {
const app = Sammy(function () {
this.before({}, () => generalController.updateHeader());
this.get('#/', sammy => sammy.redirect('#/home'));
this.get('#/home', generalController.loadHome);
this.get('#/use... |
var callbacks = [];
var cors = require('cors');
module.exports = function(router) {
var events = {};
router.post('/', cors(), function(req, res) {
notify(req.body);
res.json(["OKAY", 200]);
});
events.registerCallback = function(callback) {
callbacks.push(callback);
}
return events;
}
func... |
import { compute } from './hamming';
describe('Hamming', () => {
test('empty strands', () => {
expect(compute('', '')).toEqual(0);
});
xtest('single letter identical strands', () => {
expect(compute('A', 'A')).toEqual(0);
});
xtest('single letter different strands', () => {
expect(compute('G', ... |
/**
* Bootstrap.
*
* @module imageCacheHoc
*/
'use strict';
import imageCacheHoc from './lib/imageCacheHoc';
import FileSystemFactory, { FileSystem } from './lib/FileSystem';
export default imageCacheHoc;
export { FileSystemFactory, FileSystem }; // Allow access to FS logic for advanced users. |
if ($.writeln !== void 0) {
var console = {
log: function(obj) {
$.writeln(obj);
}
};
} else {
var console = window.console;
}
console.log($.os);
try {
console.log(app.name + ' ' + app.build);
} catch (e) {
console.log(app.name + ' ' + app.version);
}
//console.log(app.name + ' ' + app.build || app.version... |
// Created by Josh Hunt
// joshhunt180@gmail.com
// v1.4.0
tinymce.PluginManager.add('fontawesome', function (editor, url) {
webApplicationIcons = [
['adjust'],
['anchor'],
['archive'],
['area-chart'],
['arrows'],
['arrows-h'],
['arrows-v'],
['asterisk'],
['at'],
['automobile'],
['ban'],
['ba... |
import { useEffect } from 'react';
import { usePluginReducer } from '@wq/react';
export default function MapIdentify() {
const [{ instance: map, overlays }, { setHighlight }] = usePluginReducer(
'map'
);
useEffect(() => {
if (!map || map._alreadyConfiguredHandlers) {
return;
... |
const express = require('express');
const path = require('path');
const cookieParser = require('cookie-parser');
const bodyParser = require('body-parser');
const session = require('express-session');
const passport = require('passport');
module.exports = (app, config) => {
app.set('views', path.join(config.rootFol... |
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
reporters: ['progress'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Firefox'],
singleRun: true
});
}; |
const INITIAL_STATE = {
loggedIn: false
};
export function appReducer(state = INITIAL_STATE, action) {
console.log("state " + JSON.stringify(state) + " action " + JSON.stringify(action))
return state;
}
|
/**
* Created by Admin on 11/21/15.
*/
var express = require('express');
var app = express();
var port = process.env.PORT || 3000;
var mongoose = require('mongoose');
var passport = require('passport');
var flash = require('connect-flash');
var morgan = require('morgan');
var cookieParser = require('cookie-parser'... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var DomainService = (function () {
function DomainService(eventStore) {
this._aggregateRoots = [];
this._eventStore = eventStore;
}
DomainService.prototype.getAggregateRoot = function (c, callback, id) {
var... |
module.exports = function (grunt) {
// load plugins
[
'grunt-cafe-mocha',
'grunt-contrib-jshint'
].forEach(function (task) {
grunt.loadNpmTasks(task);
});
// configure plugins
grunt.initConfig({
jshint: {
app: ['app.js','settings.js', 'controllers/**/... |
"use strict";
// 穴
Hole.prototype = new createjs.Container();
function Hole() {
createjs.Container.call(this);
this.width = 480;
this.height = 502;
this.holeH = 80;
var hole = new createjs.Shape();
this.addChild(hole);
hole.graphics.beginFill('black').drawEllipse(0, -this.holeH/2, this.width, this.hole... |
/*
Project Name: Spine Admin
Version: 1.6.0
Author: BharaniGuru R
*/var handleBootstrapWizards=function(){"use strict";$("#wizard").bwizard()};var FormWizard=function(){"use strict";return{init:function(){handleBootstrapWizards()}}}() |
export default function filterTodos(todos, tagId) {
if (tagId === -1) {
return todos;
} else {
return todos.filter((todo) => todo.tag_ids.includes(tagId));
}
};
|
// All symbols in the Inscriptional Parthian block as per Unicode v6.3.0:
[
'\uD802\uDF40',
'\uD802\uDF41',
'\uD802\uDF42',
'\uD802\uDF43',
'\uD802\uDF44',
'\uD802\uDF45',
'\uD802\uDF46',
'\uD802\uDF47',
'\uD802\uDF48',
'\uD802\uDF49',
'\uD802\uDF4A',
'\uD802\uDF4B',
'\uD802\uDF4C',
'\uD802\uDF4D',
'\uD8... |
exports.verify = function (data, field_names) {
for (var i = 0; i < field_names.length; i++) {
if (!data[field_names[i]]) {
throw exports.error(400,
field_names[i] + " not optional");
}
}
return true;
}
exports.error = function (code, message) {
... |
const _ = require('lodash');
const multiDB = require('mongoose-multi-connect');
module.exports = () => function (hook) {
const locationGroup = _.get(hook, 'params.locationGroup');
this.getModel = multiDB.getByPostfix(locationGroup);
return hook;
};
|
'use strict';
describe('Controller: MainCtrl', function () {
// load the controller's module
beforeEach(module('centercareApp'));
var MainCtrl,
scope;
// Initialize the controller and a mock scope
beforeEach(inject(function ($controller, $rootScope) {
scope = $rootScope.$new();
MainCtrl = $con... |
'use strict';
// Modules
require('should');
// Subject
var subject = require('../lib/index.js');
describe('Module', function () {
describe('.in_array()', function () {
it('should return false when value is not in array', function () {
var fn = subject.in_array(['abc', 16]);
fn('def').should.equa... |
const storage = require('electron-json-storage');
module.exports = {
getZoomFactor: function(callback) {
this.get('zoom_factor', (data) => {
let zoom_factor = data;
if (!zoom_factor) {
zoom_factor = 1;
}
callback(zoom_factor);
});
... |
const isDeclaration = (node, parent) => {
if (
(node.type === 'Identifier') && (
(parent.type === 'VariableDeclarator' && parent.id.name === node.name) ||
(parent.type === 'SequenceExpression' &&
undefined !== parent.expressions.find(x => x.name === node.name)) ||
(parent.type === 'Fu... |
// import { Meteor } from 'meteor/meteor';
//
// import Nodes from '/imports/api/nodes/collection';
//
// if (Nodes.find({ enabled: true }).count() < 1) {
// // if no nodes, create them
// Meteor.call('nodes:imagesUpdate');
// } else {
// const latestNightlies = Nodes.find({ enabled: true, nightly: true }, { sort... |
import alt from '../alt';
import WebAPI from '../utils/WebAPI';
import logError from '../utils/logError';
class UserFlowActions {
constructor() {
this.generateActions(
'formValueChange',
'signupSuccess',
'signupError',
'loginSuccess',
'loginErro... |
// J.Whelan
// This class wraps the 'mplayer' command line process - make sure it exists on the server
var spawn = require('child_process').spawn
, events = require('events')
, os = require('os')
, path = require('path')
// , util = require('util')
, _ = require('underscore')
, fifojs = require('fifoj... |
function euler485() {
// Good luck!
return true
}
euler485()
|
var data = JSON.stringify({
"codigoProduto": "119",
"tipoConsumidor": "F",
"documentoConsumidor": "42924057191",
"cepOrigem": "14401-360",
"codigoEstacaoConsultante": "123"
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.ready... |
var moment = require("../../moment");
/**************************************************
Vietnamese
*************************************************/
exports["lang:vi"] = {
setUp : function (cb) {
moment.lang('vi');
cb();
},
tearDown : function (cb) {
moment.lang... |
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present 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 'isom... |
const fs = require('fs');
const oneLineLog = require('single-line-log').stdout;
// const axios = require('./axios');
// const { modes } = require('./constants');
const {
simplifyMods,
trimModsForRankings,
files,
// parallelRun,
// delay,
writeFileSync,
} = require('./utils');
// const apikey = JSON.parse(f... |
(function (lib, img, cjs) {
var p; // shortcut to reference prototypes
// library properties:
lib.properties = {
width: 400,
height: 300,
fps: 30,
color: "#FFFFFF",
manifest: []
};
// stage content:
(lib.assets_html5 = function() {
this.initialize();
}).prototype = p = new cjs.Container();
p.nominalBounds = n... |
var app = playground({
smoothing: false,
create: function(){
this.loadAtlases("map", "characters", "ui");
this.loadSounds("enemy1",
"enemy2",
"enemy3",
"hurt1",
"hurt2",
"hurt3",
"step1",
"step2",
"step3",
"love1",
"love2",
"love3"
);
},
ready: function(){
this.setState(... |
require("globals");
require("./zone-js/dist/zone-nativescript");
require("reflect-metadata");
require("./polyfills/array");
require("./polyfills/console");
var common_1 = require("@angular/common");
var renderer_1 = require("./renderer");
var detached_loader_1 = require("./common/detached-loader");
var dialogs_1 = requ... |
import Transformer from '../components/_transformer.js';
import SegmentForm from '../components/SegmentForm.vue';
window.remplib = typeof(remplib) === 'undefined' ? {} : window.remplib;
(function() {
'use strict';
remplib.segmentForm = {
bind: (el, segment) => {
return new Vue({
... |
import cjs from 'rollup-plugin-commonjs';
import babel from 'rollup-plugin-babel';
import replace from 'rollup-plugin-replace';
import uglify from 'rollup-plugin-uglify';
import resolve from 'rollup-plugin-node-resolve';
export default {
entry: './src/ReactNoUnmountHide.js',
format: 'umd',
moduleName: 'ReactNoUn... |
(function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)})(function(a){a.registerHelper("lint","coffeescript",function(b){var c=[];if(!window.coffeelint)return window.console&&window.console.e... |
/* eslint-env node */
/* eslint-disable no-sync */
'use strict';
var fs = require('fs');
var path = require('path');
var template = require('lodash/template');
var pTemplate = template(fs.readFileSync(path.resolve(__dirname, '../templates/p'), 'utf8'));
var thenTemplate = template(fs.readFileSync(path.resolve(__dirn... |
let bookController = (config) => {
let post = (req, res) => {
if (req.body.author) {
res.status(400);
res.send('Title is required');
}
else {
res.status(201);
res.send({__id: 'book_id', name: 'book1', author:'auth'});
}
};
let ... |
var config = require('../config');
module.exports.task = function(gulp, plugins, paths) {
gulp.src(paths.app.assets)
.pipe(gulp.dest(config.destDir + "/assets"))
.pipe(plugins.connect.reload());
}; |
var Http = require('http');
var Https = require('https');
var Inherits = require('util').inherits;
var Rx = require('rx');
var HttpObservable = function HttpObservable (options) {
this.options = options;
Rx.ObservableBase.call(this);
};
Inherits(HttpObservable, Rx.ObservableBase);
HttpObservable.prototype.su... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.16/esri/copyright.txt for details.
//>>built
define({widgetLabel:"Curseur de plage d\u2019histogramme"}); |
module.exports = require('edenjs').extend(function() {
/* Require
-------------------------------*/
/* Constants
-------------------------------*/
/* Public Properties
-------------------------------*/
/* Protected Properties
-------------------------------*/
this._controller = null;
/* Private Properties
... |
/* eslint-disable no-tabs */
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
import ClickObserver from '@ckeditor/ckeditor5-engine/src/view/observer/clickobserver';
import ContextualBalloon from '@ckeditor/ckeditor5-ui/src/panel/balloon/contextualballoon';
import clickOutsideHandler from '@ckeditor/ckeditor5-... |
var http = require('http');
var app = require('./app');
var config = require('./config');
var server = module.exports = http.createServer(app);
server.listen(config.http_port, config.http_ip, function(){
var address = server.address();
console.log('HTTP server listening on %s:%d', address.address, address.port);
})... |
import { getTotal, getCartProducts } from './index'
describe('selectors', () => {
describe('getTotal', () => {
it('should return price total', () => {
const state = {
cart: {
addedIds: [ 1, 2, 3 ],
quantityById: {
1: 4,
2: 2,
3: 1
}
... |
'use strict';
var express = require('express');
var app = express();
var http = require('http').Server(app);
var io = require('socket.io')(http);
/* init */
var Mesa = require('./lib/mesa');
var Jugador = require('./lib/jugador');
var mesas = new Map();
var jugadores = new Map();
// contenido estatico
app.use(e... |
'use strict';
/* Resources */
var ptResources = angular.module('partytube.resources', ['ngResource']);
ptResources.factory('YTSearchResult', ['$resource',
function($resource){
var defaults = { maxResults: '10' };
return $resource('https://www.googleapis.com/youtube/v3/search?part=snippet&type=video&q=:q&ma... |
var db = require('../db');
var async = require('async');
function ManageUserService() {}
ManageUserService.prototype.getUserData = function(userId, cb) {
async.waterfall([
function(callback) {
db.getAdminUserById(userId, function(err, user) {
if (err) {
call... |
function foo() {
var a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 2;
return function () {
function a() {}
}();
}
|
import splitExampleCode from '../splitExampleCode';
describe('splitExampleCode', () => {
test('basic example', () => {
const result = splitExampleCode(`var a = 1;
React.createElement('i', null, a);`);
expect(result).toEqual({
head: 'var a = 1',
example: `var a = 1;
return (React.createElement('i', null, a))... |
import names from './names';
import paths from './paths';
import pkg from '../../package.json';
export default {
names,
paths,
pkg
}
|
import React from 'react';
import EntypoIcon from '../EntypoIcon';
const iconClass = 'entypo-svgicon entypo--Popup';
let EntypoPopup = (props) => (
<EntypoIcon propClass={iconClass} {...props}>
<path d="M16,2H7.979C6.88,2,6,2.88,6,3.98V12c0,1.1,0.9,2,2,2h8c1.1,0,2-0.9,2-2V4C18,2.9,17.1,2,16,2z M16,12H8V4h... |
import { call } from 'redux-saga/effects';
import dbModule from '../../src/sagas/dbModule';
import { eventTypes } from '../../src/constants';
import { mockSnapshot, mockRef, mockDatabaseContext } from './dbMocks';
import { mockCall, mockCallsCount } from '../testUtils';
describe('database', () => {
let ref;
let co... |
var test = require('tape')
var createMesh = require('../')
var createContext = require('webgl-context')
var snoop = require('gl-buffer-snoop')
test('should create array buffer', function (t) {
var gl = createContext()
snoop(gl)
var mesh = createMesh(gl)
t.equal(mesh.attributes.length, 0, 'no attributes')
... |
var Fragment = require('./fragment')
, Attribute = require('./attribute')
, Template = require('./template')
, utils = require('./utils')
var Element = module.exports = function(/*tag, attrs, id, template, context[, args...]*/) {
var args = Array.prototype.slice.call(arguments)
this.tag = args.shift()
var a... |
import React, { Component } from "react"
import Layout from "../components/layout"
import Container from "../components/container"
import PageWithPluginSearchBar from "../components/page-with-plugin-searchbar"
import { Link } from "gatsby"
import logo from "../monogram.svg"
import { rhythm, options } from "../utils/typ... |
/* Author: */
(function (CMS) {
CMS.Supports = {
// CMS.Supports.touch
touch: 'ontouchstart' in document.documentElement || (window.DocumentTouch && document instanceof DocumentTouch ? true : false),
touch2: "onorientationchange" in window && "ontouchstart" in window ? true : false,
... |
export Counter from './Counter/Counter'
export BooksForm from './Books/Form'
export BooksSearchStatus from './Books/SearchStatus'
export BooksList from './Books/List'
|
import Civ5Save from '../Civ5Save';
const path = require('path');
const TEST_SAVEGAME_V10017 = path.join(__dirname, 'resources', '1.0.0.17.Civ5Save');
const TEST_SAVEGAME_V101135 = path.join(__dirname, 'resources', '1.0.1.135.Civ5Save');
const TEST_SAVEGAME_V101221 = path.join(__dirname, 'resources', '1.0.1.221.Civ5S... |
cordova.define("com.hpit.mobile.plugin.emailSender.EmailSenderPlugin", function(require, exports, module) {var exec = require('cordova/exec');
function EmailSenderPlugin(){
}
EmailSenderPlugin.prototype.send = function(recipients, subject, text, successCallback, failureCallback){
exec(successCallback, failureCallb... |
$(window).load(function() {
$('img').click(function(){
$('img').hide();
})
$('p').click(function(){
$('img').show();
})
$('.changeName').click(function(){
$('.changeName').text('nicki');
})
}); |
const prettier = require('./.prettierrc.js');
const error = 2;
const warn = 1;
const ignore = 0;
module.exports = {
root: true,
extends: ['eslint-config-airbnb', 'plugin:jest/recommended', 'prettier'],
plugins: ['prettier', 'jest', 'react', 'json'],
parser: 'babel-eslint',
parserOptions: {
sourceType: 'm... |
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
$provide.value("$locale", {
"DATETIME_FORMATS": {
"AMPMS": [
"AM",
"PM"
],
"DAY": [
"dimanche",
"lu... |
var scotchTape = require('scotch-tape');
var TChannel = require('tchannel');
var server = new TChannel();
var client = new TChannel();
var serverChan = server.makeSubChannel({
serviceName: 'server-original'
});
// normal response
serverChan.register('func1', function onReq(req, res, arg2, arg3) {
// console.log(... |
if ( eQuery.fn.width ) {
module("dimensions", { teardown: moduleTeardown });
var pass = function( val ) {
return val;
};
var fn = function( val ) {
return function(){ return val; };
};
/*
======== local reference =======
pass and fn can be used to test passing functions to setters
See testWidth below for an ex... |
/**
* Created by Vicky on 6/9/2017.
*/
function getBill(input) {
let purchases = [];
let price = 0;
for(let i=0; i<input.length; i+=2){
purchases.push(input[i]);
price += Number(input[i+1]);
}
console.log(`You purchased ${purchases.join(', ')} for a total sum of ${price}`);
} |
self.__precacheManifest = [
{
"revision": "0db62ce630b66cc38127",
"url": "static/js/app.5b3cf63c.chunk.js"
},
{
"revision": "968dd11ad1a0a4cf3e70",
"url": "static/js/runtime~app.57f5bbf7.js"
},
{
"revision": "060a0afd215144e7b7cb",
"url": "static/js/2.b68e9907.chunk.js"
},
{
"r... |
var searchData=
[
['adddiscriminators',['AddDiscriminators',['../PassSequence_8h.html#a0133cfbd4caf7074a0e24c6958e40cf5a6697a940304ba73825979a1f45258d14',1,'PassSequence.h']]],
['aggressive',['Aggressive',['../PassSequence_8h.html#a43f71430e3b7055e1ce934fd6fba4c28a227598607ef691b05c9eb1ea73a06a2f',1,'PassSequence.h... |
const debug = require('debug')('choo-cli:utils')
const store = require('mem-fs').create()
const xfs = require('mem-fs-editor').create(store)
const { kebabCase, camelCase } = require('lodash')
const { parse } = require('espree')
const exec = require('./exec')
const path = require('path')
const once = require('ramda').on... |
define([
'app'
],
function(
app
) {
'use strict';
var Router = Backbone.Router.extend({
editDevice: function(model) {
console.log('edit', model.toJSON());
}
});
return Router;
}); |
var findEmbeded= require('./findEmbeded');
var ObjectID= require('mongodb').ObjectID;
module.exports= function (modelName,obj,embeded,embedParentId) {
var db = require( '../db' ).getDb();
if(!embedParentId)
{
throw {err:"Embeded Parent ID required"};
}
obj= obj.map(function (val) {
val._id= new ObjectID();... |
var chai = require('chai')
var assert = chai.assert;
var sinon = require('sinon');
var Ball = require("../lib/ball")
var Club = require("../lib/club")
describe('Checking ball direction', function(){
it("goes in the right direction", function(){
var clubX = 1
var clubY = 1
var ballX = 5
var ballY = 5
... |
export const db = state => state.db.db
export const api = state => state.api.api
export const settings = state => state.settings.settings
export const notifications = state => state.notification.bucket
export const routes = state => state.router.links
|
import {Home} from './containers'
import React from 'react'
import {render} from 'react-dom'
let a = 10;
const fn = ()=> {};
render(<Home />,gitdocument.querySelector('#app'));
|
version https://git-lfs.github.com/spec/v1
oid sha256:b37dd247efcfc559121d953db8b1c665c120b98f3eb53a6a2ff5da75fb90479e
size 524
|
describe('ICMS Próprio', function(){
require('./helper.js').cookies();
beforeEach(function(){
browser.get(browser.params.BASE_CALC_URL + 'calculoicms');
element(by.id('btnProprio')).click();
})
describe('Testes Relacionados a comportamentos do modal', function(){
it('Verifica s... |
/*
* 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.
*/
import babel from 'rollup-plugin-babel';
import uglify from 'rollup-plugin-uglify';
export default {
input: 'src/jdlx-scraper.js',... |
//Autogenerated by ../../build_app.js
import audit_event from 'ember-fhir-adapter/serializers/audit-event';
export default audit_event; |
'use strict';
// Parse the specified blob and pass an object of metadata to the
// metadataCallback, or invoke the errorCallback with an error message.
function parseAudioMetadata(blob, metadataCallback, errorCallback) {
var filename = blob.name;
// If blob.name exists, it should be an audio file from system
//... |
'use strict';
const SetsBuilder = require('gemini-core').SetsBuilder;
const DEFAULT_DIR = require('../package').name;
exports.reveal = (sets, opts) => {
return SetsBuilder
.create(sets, {defaultDir: DEFAULT_DIR})
.useSets(opts.sets)
.useFiles(opts.paths)
.useBrowsers(opts.browsers... |
app.factory('Rule', function () {
var Rule = function (properties) {
this.name = null;
this.detection = 'CONTAINS';
this.url_fragment = null;
this.tab = {
title: null,
icon: null,
pinned: false,
protected: false... |
/**
*
* You can modify and use this source freely
* only for the development of application related Live2D.
*
* (c) Live2D Inc. All rights reserved.
*/
var MatrixStack = function () { };
MatrixStack.matrixStack = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
MatrixStack.depth = 0;
MatrixStack.currentMa... |
const quilt = require('@quilt/quilt');
let infrastructure = require('../../config/infrastructure.js');
let deployment = quilt.createDeployment();
deployment.deploy(infrastructure);
let containers = new quilt.Service('containers',
new quilt.Container('google/pause').replicate(infrastructure.nWorker));
deployment.d... |
// Copyright 2013 The Obvious Corporation.
/**
* @fileoverview Helpers made available via require('phantomjs') once package is
* installed.
*/
var fs = require('fs')
var path = require('path')
/**
* Where the phantom binary can be found.
* @type {string}
*/
try {
var location = require('./lo... |
/**
* Angular Module relying on Apache Cordova Contacts Plugin (cordova plugin add org.apache.cordova.contacts).
*/
var cordovaContactsModule = angular.module('cordovaContactsModule', []);
// Constants
/**
* Constants service used in the whole module.
*/
cordovaContactsModule.constant('cordovaContactsCo... |
/**
* Include files into other files, optional base64 encoding.
*
* @link https://github.com/Sjeiti/grunt-include-file
* -----------------------------------------------------------------------------
*
* Configured to include pregenerated absalign classes in the Javascript
* polyfill.
*
*/
module.exports =
{
... |
import { expect } from 'chai'
import { shallow, render, mount } from 'enzyme'
import React from 'react'
import Header from '../../src/components/Header'
describe('Header', () => {
it('should render a Header', () => {
const wrapper = shallow(React.createElement(Header))
expect(wrapper.find('header')).to.have.... |
// http://css-tricks.com/snippets/javascript/htmlentities-for-javascript/
/*
function htmlEntities(str) {
return String(str)
.replace(/&/g, '&')
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/"/g, '"');
}
function createCodeNode(codeStr) {
var node, code;
node = docum... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
class ConusStations extends Component {
static propTypes = {
onModal: PropTypes.func.isRequired
};
render() {
const { onModal } = this.props;
return (
<div className="c-conus-stations">
<button
cl... |
import Predicate from './Predicate';
import Template from '../server/Template';
export default class NeqPredicate extends Predicate {
constructor(opts) {
const {lh, rh} = opts;
super(opts);
this._lh = new Template(lh);
this._rh = new Template(rh);
}
test(data) {
const lh = this._lh.render(... |
var webpack = require('webpack');
var path = require('path');
module.exports = {
entry: './index.js',
output: {
path: path.join(__dirname, 'dist'),
filename: 'waterwheel.js'
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
sourceMap: false,
compress: {
warnings: false
}... |
module.exports = function (sails) {
/**
* Module dependencies.
*/
var util = require( '../../util' );
/**
* Global access to middleware
* (useful as helpers)
*/
sails._mixinLocals = _mixinLocals;
sails._mixinResError = _mixinResError;
sails._mixinServerMetadata = _mixinServerMetadata;
sails... |
(function() {
serviceAreas.map = {
mapobj: null,
div: "map_canvas",
init: function() {
var mapOptions = {
center: new google.maps.LatLng(37.775, -122.4183333),
zoom: 13,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
serviceAreas.map.mapobj = new google.maps.Map(do... |
import React, { Component } from 'react';
import { CSSTransitionGroup } from 'react-transition-group';
import animation from '../actions/animations';
class Sidebar extends Component {
constructor(props){
super(props);
this.runSidebarTransition = this.runSidebarTransition.bind(this);
}
componentDidMount(){
i... |
/*
$(document).ready(function(){
//add scroll effect to the menu navbar
var navbarFixedTop = $("#header-menu");
navbarFixedTop.css('background-color', 'rgba(0,0,0,0.75)');
var transparency = 0;
$(window).scroll(function() {
if ($(document).scrollTop() > 70) {
transparency = ($(document).scrollTop()/$(window).he... |
name = "denseSteelPlate";
addToCreative[0] = true;
creativeTab = "materials";
maxStack = 64;
textureFile[0] = "denseSteelPlate.png"; |
/*
* grunt-xmlpoke
* https://github.com/bdukes/grunt-xmlpoke
*
* Copyright (c) 2014 Brian Dukes
* Licensed under the MIT license.
*/
'use strict';
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
all: [
'Grunt... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.