code stringlengths 2 1.05M |
|---|
(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... |
'use strict'
module.exports = {
meta: {
docs: {},
schema: []
},
create: function (context) {
return {
CallExpression: function (node) {
if (node.callee.type !== 'MemberExpression') return
if (node.callee.object.name !== '$') return
if (node.callee.property.name !== 'gre... |
'use strict';
var easingTypes = {
// t: current time, b: beginning value, c: change in value, d: duration
// new note: I much prefer specifying the final value rather than the change
// in value this is what the repo's interpolation plugin api will use. Here,
// c will stand for final value
linear: functio... |
// return all leaf stories of a hard-coded PI object ID
Ext.define('CustomApp', {
extend:'Rally.app.App',
componentCls:'app',
layout:{
type:'vbox',
align:'stretch'
},
items:[
{ // define a container to house header info about the PI
xtype:'container',
... |
'use strict';
angular.module('goodgymApp')
.service('Area', ['$resource',
function($resource) {
// AngularJS will instantiate a singleton by calling "new" on this function
return $resource('http://goodgym-api.herokuapp.com/api/v1/areas/:action:areaId/:subcribeAction', {
action: '@action',
... |
'use strict';
var winston = require('winston');
module.exports = {
up: function (queryInterface, Sequelize) {
return queryInterface.addColumn('customer_data', 'zip_code', {
type: Sequelize.STRING(10),
defaultValue: '',
after: 'country'
})
... |
// Generated by CoffeeScript 1.7.1
(function() {
var express, flash, mongoStore, path, view_helper;
express = require('express');
mongoStore = require('connect-mongo')(express);
flash = require('connect-flash');
path = require("path");
view_helper = require("../utils/view_helper");
module.exports = ... |
var hogan = require("hogan.js");
var tmplSrc = require("raw!./koukikourei-form.html");
var tmpl = hogan.compile(tmplSrc);
var rUtil = require("../reception-util.js");
var dateInputTmplSrc = require("raw!./date-input.html");
var dateInputTmpl = hogan.compile(dateInputTmplSrc);
var DateInput = require("./date-input.js");... |
import { React } from 'mva';
import { equalsPath } from '../../util/common';
import * as Actions from '../../actions/editor';
export default ({ files, file }) => {
const close = f => () => Actions.CloseFile(f);
const select = f => () => Actions.SelectFile(f);
const elements = files.map((current, key) => {... |
/* */
(function(process) {
var fs = require("fs"),
path = require("path");
var stream = require("stream");
var browserify = require("browserify");
var babelify = require("babelify").configure({loose: "all"});
process.chdir(path.resolve(__dirname, ".."));
browserify({standalone: "acorn"}).plugin(requi... |
import {Tw2GeometryBatch} from './Tw2GeometryBatch';
/**
* A render batch for line geometry
*
* @class
*/
export class Tw2GeometryLineBatch extends Tw2GeometryBatch
{
/**
* Commits the Geometry Line Batch for rendering
* @param {string} technique - technique name
*/
Commit(technique)
{
... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _templateObject = _taggedTemplateLiteral(['\n margin: 5px;\n'], ['\n margin: 5px;\n']);
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _styledComponents = require('styled-components');
var ... |
'use strict';
let chai = require('chai');
before(function() {
this.expect = chai.expect;
});
|
(function() {
'use strict';
let router = require('express').Router(),
controllers = require('../../controllers');
router
.get('/events', controllers.events.get)
.get('/events/calendar', controllers.events.calendar)
.post('/events/all', controllers.events.allPublic)
.post('/events', controller... |
var PrefixTree = function() {
var tree = Object.create(prefixTreeMethods);
tree.value = {};
tree.children = [];
return tree;
}
var prefixTreeMethods = {};
var stringToKeypad = function(string) {
string = string.toLowerCase();
var map = {
'a': 2,
'b': 2,
'c': 2,
'd': 3,
'e': 3,
'... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M12 2C8.13 2 5 5.13 5 9c0 4.17 4.42 9.92 6.24 12.11.4.48 1.13.48 1.53 0C14.58 18.92 19 13.17 19 9c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 ... |
module.exports = {
// Extends the UdeS ESLint config
extends: 'eslint-config-udes/polymer-2-element',
parserOptions: {
sourceType: 'module'
},
// Limit ESLint to a specific project
root: true,
};
|
/**
* called once page got laded. getReady
*/
var pageLoaded = function() {
var vets = document.getElementById('vetsTab');
vets.href = '#';
vets.parentNode.className = 'active';
/*
* invoke service with no input data, and default call-back action
*/
server.getResponse(SERVICES.getVets);
};
var showJson = fu... |
/**
* Created by gaojie on 15/3/22.
* 收集新的代理地址,存入redis,供爬虫的代理模块使用
*/
var redis = require('redis');
var instance = function(engine, settings){
this.engine = engine;
this.settings = settings;
this.queue = [];
this.proxy_length = 0;
var self = this;
this.engine.on('finish_init', function(){
... |
import React from 'react';
import { shallow } from 'enzyme';
import chai, { expect } from 'chai';
import chaiEnzyme from 'chai-enzyme';
import sinon from 'sinon';
import QuickSummary from 'components/quick-summary';
chai.use(chaiEnzyme());
describe('<QuickSummary />', () => {
let props;
const getInstance = inst... |
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import { Router, browserHistory } from 'react-router';
import ReduxPromise from 'redux-promise';
import ReduxThunk from 'redux-thunk';
import reducers from './reduc... |
var populate = (function () {
var result = false;
process.argv.forEach( function ( val, index, array ) {
if ( index === 2 ) {
result = val;
}
});
return result;
})(),
express = require('express'),
people = require('./routes/people')(populate),
app = expr... |
/**
* @properties={typeid:24,uuid:"5ED9D801-3035-46CA-991E-43670D7D5E8B"}
*/
function allowFormIncludedInMenu() {
return true;
}
/**
*
* @return {String}
*
* @properties={typeid:24,uuid:"A5A61A25-8B18-4A2C-858F-B45697274CFD"}
*/
function getName() {
return 'Specialized Components';
}
/**
*
* @return {String}... |
var breadcrumbs=[['-1',"",""],['2',"SOLUTION-WIDE PROPERTIES Reference","topic_0000000000000C16.html"],['153',"Tlece.Recruitment Namespace","topic_0000000000000BBC.html"],['160',"TleceDbContext Class","topic_0000000000000BC6.html"],['164',"Properties","topic_0000000000000BC6_props--.html"],['184',"tlece_BadgesCategoryM... |
import delegate from 'delegate-event-listener';
import manageSideEffects from 'manage-side-effects';
import scopedQuerySelectorAll from 'scoped-queryselectorall';
const delegateEventSplitter = /^(\S+)\s*(.*)$/;
const childNameSplitter = /^(.*?)(\[\])?$/;
const viewProps = ['el', 'events', 'childrenEl'];
let instanceCo... |
import {
redA700, red900,
amber700, amber400,
grey300, grey400, grey500,
white, darkBlack, fullBlack,
} from 'material-ui/styles/colors';
import { fade } from 'material-ui/utils/colorManipulator';
import spacing from 'material-ui/styles/spacing';
/**
* Light Theme is the default theme used in material-ui. It... |
(function() {
"use strict";
window.app.directive('addCustomer', addCustomer);
function addCustomer() {
return {
templateUrl: '/customer/template/addCustomer.tmpl.cshtml',
controller: controller,
controllerAs: 'vm'
}
}
controller.$inject = ['$scope', 'customerSvc'];
function controller($scope, cus... |
var webpack = require('webpack');
var minimize = process.argv.indexOf('--no-minimize') === -1 ? true : false;
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
var plugins = minimize ? [
new webpack.optimize.UglifyJsPlugin({
minimize: true,
compress: {
drop_console: true
},
}... |
/**
* Fitness functions for testing
*
* @package nodeo
* @author J. J. Merelo <jjmerelo@gmail.com>
* @license GPL v3
*/
// To avoid uncomprehensible radix complaint at charAt
/*jshint -W065 */
/*jshint smarttabs:true */
var functions = exports;
//Ackley description in http://tracer.lcc.uma.es/problems/ackley/a... |
export const ic_zoom_out_outline = {"viewBox":"0 0 24 24","children":[{"name":"path","attribs":{"d":"M0 0h24v24H0V0z","fill":"none"},"children":[]},{"name":"path","attribs":{"d":"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4... |
'use strict';
var gulp = require('gulp');
var eslint = require('gulp-eslint');
var excludeGitignore = require('gulp-exclude-gitignore');
var mocha = require('gulp-mocha');
var istanbul = require('gulp-istanbul');
var plumber = require('gulp-plumber');
gulp.task('static', function() {
return gulp.src('**/*.js')
.... |
import DebouncedResponse from './debounced-response';
import Evented from '@ember/object/evented';
import Mixin from '@ember/object/mixin';
function noop() { }
// Debounces browser event, triggers 'scroll' event and calls 'scroll' handler.
export default Mixin.create(
Evented,
DebouncedResponse,
{
scroll: n... |
(function() {
var $;
$ = jQuery;
window.GroundworkCSS || (window.GroundworkCSS = {});
$(function() {
var $body;
$body = $('body');
return $body.on('click', '.dismissible', function() {
var $box;
$box = $(this);
$box.addClass('dismiss animated');
return setTimeout(function(... |
/*
* Project: jQuery simple social sharing
* Description: Tweet / post to FB using proper modals
* Author: Neil Carpenter
*/
;(function ($, window, document, undefined) {
var pluginName = 'socialSharers';
var defaults = {
twitter: {
handle: null
},
facebook: {
... |
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* SHA-1 (FIPS 180-4) implementation in JavaScript (c) Chris Veness 2002-2017 */
/* MIT Licence */
/* www.movable-ty... |
var assert = require("assert");
var path = require("path");
var rmdir = require("rimraf");
var spawn = require("child_process").spawn;
var asap = require("pdenodeify");
var fs = require("fs-extra");
var treeKill = require("tree-kill");
var fileExists = require("./file_exists");
require("steal");
var find = require(".... |
"use strict";
/**
* Static helper class that defines validation assertions.
*/
var Assert = (function () {
function Assert() {
//How cute...
Assert.staticType('Assert');
}
/**
* Asserts that the expression is true.
*
* @param expr the expression
* @param message the mes... |
import { JSDOM } from 'jsdom';
import chai from 'chai';
import sinonChai from 'sinon-chai';
import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
Enzyme.configure({ adapter: new Adapter() });
// Chai initialization
chai.use(sinonChai);
// chai.should();
// JSDOM initialization
function copyProp... |
var NPC = (function () {
'use strict';
function Class(game, map) {
// extend abstract's properties
_.extend(this, new AbstractNPC(game, map));
// set properties
this.className = 'NPC';
this.spriteName = 'npc';
this.spritesheetPath = 'assets/images/sprites/tonberry.png';
}
// ... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import type {
Instance,
TextInstance,
SuspenseInstance,
Container,
ChildSet,
UpdatePayload,
} from './Reac... |
import Ember from 'ember'
import Application from '../../app'
import config from '../../config/environment'
export default function startApp(attrs) {
let application
let attributes = Ember.merge({}, config.APP)
attributes = Ember.merge(attributes, attrs)
Ember.run(_ => {
application = Application.create... |
// @flow
import React, { Component } from 'react';
import { connect } from 'react-redux';
import Home from '../components/Home';
class HomePage extends Component {
render() {
return (
<Home saveData={this.props.saveData} />
);
}
}
function mapStateToProps(state) {
return {
saveData: state.glos... |
const express = require('express')
const bodyParser = require('body-parser')
const http = require('http')
const app = express()
const port = parseInt((process.env.PORT || 1337), 10)
const Player = require('./Player')
app.use(bodyParser.json())
app.use(bodyParser.urlencoded({ extended: true }))
// var Logger = requir... |
// Copyright (c) 2011 Gennadiy Shafranovich
// Licensed under the MIT license
// see LICENSE file for copying permission.
var symbols = [];
$(function() {
$('#symbol').autocomplete({ source: symbols });
var lastTransactionType = 'BUY';
$(".newTransactionType").change(function() {
var val = $(this).val();... |
//~ name a351
alert(a351);
//~ component a352.js
|
var exec = require('child-process-promise').exec;
function tagNotExists(tag) {
return exec(`git rev-parse -q -v ${tag}^{tree}`)
.then(res => { throw new Error('Tag already exists')})
.catch(err => {
if(err.code === 128) {
return;
}
throw err;
... |
/* eslint-disable no-unused-expressions, func-names, prefer-arrow-callback */
import { expect } from 'chai';
import Container from '../../src/index';
describe('Container', () => {
let container = null;
beforeEach(() => {
container = new Container();
});
describe('registration', ()... |
import React from 'react';
import { shallow } from 'enzyme';
import Button from './Button';
describe('Button component', () => {
const buttonId = 'button-id';
const clickHandlerObj = jest.genMockFunction();
const composeComponent = () => shallow(
<Button id={ buttonId } onClick={ clickHandlerObj } />
);
... |
'use strict';
import CameoWookie200Rgy from '../../src/device/CameoWookie200Rgy';
var assert = require('assert');
var fivetwelve = require('fivetwelve/es5');
const driver = { send(buffer, universe) {} };
const output = fivetwelve.default(driver);
let instance = new CameoWookie200Rgy({ universe: 1, address: 1 });
... |
'use strict';
/* Services */
// Demonstrate how to register services
// In this case it is a simple value service.
angular.module('fileUploaderApp.services', []).
value('version', '0.1').
factory('folderTree', function () {
var folderTree = {};
folderTree.prepareTree = function (tree) {
... |
import {createMapInternal} from '../../src/main'
import defaultClientConf from 'file-loader?name=conf/[name].[ext]!mustache-loader!./client.commented.json'
import defaultLayerConf from 'file-loader?name=conf/[name].[ext]!mustache-loader!./layers.commented.json'
import defaultTranslations from 'tojson-file-loader?name... |
var deleteUser = function (name){
var myNs = {};
var y = window.confirm("Are you sure you want to delete this user?");
myNs["id"] = name;
if(y == true){
$.ajax({
type: "POST",
url: "deleteAdmin.php",
data: {"id": name},
success: function(data){
window.alert("User " + data + " deleted."... |
import TwitchAdapter from "data/models/twitch/adapter";
export default TwitchAdapter.extend({
coalesceFindRequests: true,
/**
* @param {DS.Store} store
* @param {DS.Model} type
* @param {Object} query
* @return {Promise}
*/
queryRecord( store, type, query ) {
const url = this._buildURL( type );
ret... |
'use strict';
import React, {Component, PropTypes} from 'react';
import moment from 'moment';
import {browserHistory} from 'react-router';
import FlatButton from 'material-ui/FlatButton';
import KeyboardArrowRight from 'material-ui/svg-icons/hardware/keyboard-arrow-right';
import ProductIcon from './ProductIcon';
impo... |
(function () {
'use strict';
angular.module('app.mySettings', [
'app.core'
]);
})();
|
'use strict';
var proxyquire = require('proxyquire').noPreserveCache();
var addressCtrlStub = {
index: 'addressCtrl.index',
show: 'addressCtrl.show',
create: 'addressCtrl.create',
update: 'addressCtrl.update',
destroy: 'addressCtrl.destroy'
};
var routerStub = {
get: sinon.spy(),
put: sinon.spy(),
pa... |
/// <binding AfterBuild='libs' Clean='clean' />
"use strict";
var gulp = require("gulp"),
rimraf = require("rimraf"),
concat = require("gulp-concat"),
cssmin = require("gulp-cssmin"),
uglify = require("gulp-uglify");
var paths = {
webroot: "./wwwroot/",
npm: './node_modules/',
lib: './www... |
"use strict";
let datafire = require('datafire');
let openapi = require('./openapi.json');
module.exports = datafire.Integration.fromOpenAPI(openapi, "azure_machinelearningservices_machinelearningservices"); |
var assert = require('assert');
var math = require('..');
describe('area of', function() {
describe('circle', function() {
it('negative number returns NaN', function() {
assert.equal(true, isNaN(math.getArea(-1, 'circle')));
assert.equal(true, isNaN(math.getArea(-2, 'circle')));
assert.equal(true, ... |
// All code points in the CJK Compatibility block as per Unicode v6.2.0:
[
0x3300,
0x3301,
0x3302,
0x3303,
0x3304,
0x3305,
0x3306,
0x3307,
0x3308,
0x3309,
0x330A,
0x330B,
0x330C,
0x330D,
0x330E,
0x330F,
0x3310,
0x3311,
0x3312,
0x3313,
0x3314,
0x3315,
0x3316,
0x3317,
0x3318,
0x3319,
0x331A,
0... |
import Board from '../entities/board';
import {getRandomInt} from '../utils/math';
import globals from '../utils/globals';
export default (blockSize = 40, hurry = false) => {
const WIDTH = globals.getWidth();
const HEIGHT = globals.getHeight();
const ctx = globals.getCtx();
const removeWallsBetween = (a, b) =... |
module.exports = {
"extends": "standard",
rules: {
"semi": [2, "always"]
}
};
|
version https://git-lfs.github.com/spec/v1
oid sha256:d3be6e1a95f1fc271a56cfe66e689967aa719c56ec3efcf53b2d5c08588e21ac
size 76949
|
var Main = function(game){
};
Main.prototype = {
create: function() {
var me = this;
// Set the background colour to blue
me.game.stage.backgroundColor = '#ccddff';
// Start the P2 Physics Engine
me.game.physics.startSystem(Phaser.Physics.P2JS);
// Set the gravity
me.game.physi... |
/* global sinon */
import { A } from '@ember/array';
function transitionMap(app) {
return app.__container__.lookup('service:liquid-fire-transitions');
}
function wormholeTransitionName(name) {
return sinon.match(function(value) {
if (value.animation && value.animation.name === 'wormhole') {
return value... |
'use strict';
var test = require('tape');
var murl = require('murl');
var Patterns = require('./');
test('no patterns', function (t) {
var p = Patterns();
var match = p.match('foo');
t.equal(match, null);
t.end();
});
test('string patterns', function (t) {
var p = Patterns();
p.add('foo', 1);
p.add('ba... |
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-karma');
return {
test: {
configFile: 'karma.conf.js'
}
};
};
|
import d3 from "d3"
var width = 960,
height = 500;
var color = d3.scale.category20c();
var force = d3.layout.force()
.charge(-120)
.linkDistance(30)
.size([width, height]);
var svg = d3.select("body").append("svg")
.attr("width", width)
.attr("height", height);
d3.json("miserables.json", fu... |
import Profession from '../../definitions/profession';
import * as Foods from '../items/foods';
import * as Weapons from '../items/_weapons';
import * as Bodys from '../items/bodys';
import * as Thresholds from '../../constants/skill-thresholds';
import * as Traits from '../traits/_all';
const barbarianConfig = {
... |
// base function init
jDiet = function () {
var args = [].slice.apply(arguments);
if (typeof(jDiet.local.makeResult) == 'undefined') {
this['length'] = 0;
return this;
} else if (typeof(args[0]) == 'string' && args[0].substr(0, 1) == '<' && args[0].substr(args[0]['length'] - 1, 1) == '>') {
// create html node... |
var ctx;
var assets = new Assets();
var erasing = false;
var copying = false;
var currentTile = new Tiles('tilesheet_complete.png');
var floors = [];
var walls = [];
var furnitures = [];
var specials = [];
var filename = 'map.json';
var start = {'x': -1, 'y' : -1};
var main = function() {
ctx.save();
ctx.c... |
if (Meteor.isClient) {
var Info = new Mongo.Collection("info");
var Counter = new Mongo.Collection("counter");
Template.hello.onCreated(function () {
Meteor.subscribe("info");
Meteor.subscribe("counter");
});
Template.hello.helpers({
counter: function () {
if (!Template.instance().subscr... |
/**
* Dependencies
*/
var gulp = require('gulp');
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
var minifycss = require('gulp-minify-css');
var livereload = require('gulp-livereload');
var notify = require('gulp-notify');
var rename = require('... |
'use strict';
(function() {
// Videos Controller Spec
describe('Videos Controller Tests', function() {
// Initialize global variables
var VideosController,
scope,
$httpBackend,
$stateParams,
$location;
// The $resource service augments the response object with methods for updating and deleting the... |
var util = {
debug: false,
inherits: function(ctor, superCtor) {
ctor.super_ = superCtor;
ctor.prototype = Object.create(superCtor.prototype, {
constructor: {
value: ctor,
enumerable: false,
writable: true,
configurable: true
}
});
},
extend: functio... |
import React from 'react';
import OrderButtonContainer from '../../containers/OrderButtonContainer';
const Review = ({ onPrevClick, form }) => {
const selected = form.ingredients.length > 0 ?
form.ingredients.join(', ') :
'None specified';
return (
<main>
<div className="paper-white">
<h... |
(function() {
'use strict';
var assert = require('assert'),
TestUtil = require('./TestUtil'),
Mouse = require('../src/Mouse');
beforeEach( function() {
TestUtil.mockDocument();
});
afterEach( function() {
TestUtil.unmockDocument();
});
describe('Mouse', f... |
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, {
PropTypes, Component
}
from 'react';
import styles from './App.css';
import withContext from '../../decorators/withContext';
import withStyles from '../../decorators/withStyles';
import Header from '../Header';
import Footer fro... |
// Generated by CoffeeScript 1.9.3
(function() {
var button_size, color, gap, height, hilit, i, left_width, make_plot, margin, myscatter, rad, sets, svg, width, y;
height = 500;
width = 800;
left_width = 80;
gap = 10;
button_size = 20;
rad = 3;
color = "#6A5ACD";
hilit = "#C71585";
margin =... |
'use strict';
require('es6-promise').polyfill();
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var del = require('del');
var runSequence = require('run-sequence');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
var merge = require('merge-stream');
var path = require(... |
'use strict';
// Requires meanio
var mean = require('meanio');
var online = {
data:[],
connected:0,
add:function(obj) {
obj.id = this.connected;
this.connected += 1;
this.data.push({id:obj.id,value:obj});
},
remove:function(id) {
for (var x=0; x<this.data.length; x+=1) {
if(this.data[x].id===id) {
... |
var validator = {
ValidateIfUndefined: function (value) {
if (typeof (value) === 'undefined') {
throw new Error;
}
},
ValidateString: function (value) {
if (typeof (value) != 'string') {
throw new Error;
}
},
ValidateElement: function (valu... |
version https://git-lfs.github.com/spec/v1
oid sha256:6e67b2ce82b22f980b68c0707d7d6d64f1684a3bd6c58fe0d17665f5d0f1c0d9
size 28218
|
angular.module('starter', ['ionic', 'ngCordova', 'starter.controllers', 'starter.services', 'ngMessages', 'hc.marked'])
.run(function ($ionicPlatform) {
$ionicPlatform.ready(function () {
if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true)... |
import AppRadioFieldComponent from './app-radio-field.component';
let appRadioFieldModule = angular.module('app-radio-field', [
])
.directive('appRadioField', AppRadioFieldComponent);
export default appRadioFieldModule;
|
/**
* Created by kingcc on 15-11-10.
*/
$f("df", "tasks.taskassigneelist.param", function (_param) {
return {url: "/tasks/getAssigneeTaskList", data: {uid:_param.uid}, target: _param.target};
}); |
// import dependencies
import '../../bootstrap/_tags.scss' |
import React, {Component, PropTypes} from 'react'
export default class Login extends Component {
static contextTypes = {
router: PropTypes.object.isRequired
};
handleSubmit(e) {
e.preventDefault();
const value = e.target.elements[0].value;
window.localStorage.setItem('rr_lo... |
import { forEach } from 'lodash'
/**
* Utility class used when clustering points into MultiPoint objects
*/
export default class PointCluster {
constructor() {
this.points = []
}
addPoint(point) {
if (this.points.indexOf(point) === -1) this.points.push(point)
}
mergeVertices(graph) {
const v... |
/* */
'use strict';
Object.defineProperty(exports, "__esModule", {value: true});
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _reactAddonsPureRenderMixin = require('react-addons-pure-render-mixin');
var _reactAddonsPureRenderMixin2 = _interopRequireDefault(_reactAddonsPureRenderMixi... |
/*global require*/
require(['requireConfig'], function () {
'use strict';
require(['main'], function (main) {
main.run();
});
}); |
const helpers = require('../../config/helpers')
const Rimraf = require('rimraf')
const debug = require('debug')('app:build:compile')
const Webpack = require('webpack')
const webpackConfig = require(helpers('./webpack.config.js'))
debug('Starting webpack compile.')
const webpackCompiler = webpackConfig => (
new Promi... |
'use strict';
module.exports = function(grunt) {
// Load grunt tasks automatically
require('load-grunt-tasks')(grunt);
// Time how long tasks take. Can help when optimizing build times
require('time-grunt')(grunt);
grunt.initConfig({
// Set this variables for different projects
projectName: 'h-op... |
var title = 'BlockScore - List of people',
// Use sandbox API Key
blockScore = new BlockScore( 'sk_test_42857c65bba33d61895d3bd7c74e0dd9' );
if ( Meteor.isServer ) {
Tinytest.add( title, function ( test ) {
blockScore.people.list( {}, function ( error, list ) {
test.isTrue( list );
});
});
}
if ( Meteor.is... |
const mysql = require('mysql');
const db = require('../config.js').database;
const tokenService = require('../services/token-service');
const service = {};
service.login = login;
service.register = register;
service.getById = getById;
service.addChild = addChild;
service.getChilds = getCh... |
import Ember from 'ember';
export default Ember.Service.extend({
// dimensions, metrics, and groupBy will be overwritten, but leaving some initial values as a fallback
dimensions:[ "conversationId", "sessionId", "mediaType", "queueId", "userId", "participantId", "participantName", "direction", "wrapUpCode", "wrapU... |
export default function curry (func, target) {
const argLength = func.length
let args = []
return function currify (...others) {
args = args.concat(others)
if (argLength <= args.length) return func.apply(target, args)
else return currify
}
}
|
var Immutable = require('immutable');
var NONE = 0;
var PIECE = 1;
var EMPTY = 2;
var englishBoard = Immutable.fromJS([
[NONE, NONE, PIECE, PIECE, PIECE, NONE, NONE],
[NONE, NONE, PIECE, PIECE, PIECE, NONE, NONE],
[PIECE, PIECE, PIECE, PIECE, PIECE, PIECE, PIECE],
[PIECE, PIECE, PIECE, PIECE, PIECE, PI... |
import.meta usage example
// Test module, which can be used as:
// 1) node test.mjs - to run the test for package
// 2) import test from 'test.mjs'; - returns the test config
export function test(meta = import.meta){
let testConfig = new URL('./test.json', import.meta.url);
// 1) the module is not ... |
// server.js
//
const http = require('http');
const url = require('url');
const fs = require('fs');
const path = require('path');
const PORT = 8080;
const DATADIR = './var';
const INTERVAL = 1000;
const TIMEOUT = 10*INTERVAL;
let sessions = {};
class Session {
constructor(sid) {
this.sid = sid;
this.updat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.