code stringlengths 2 1.05M |
|---|
'use strict';
// Configuring the Articles module
angular.module('surveycruds').run(['Menus',
function(Menus) {
// Set top bar menu items
Menus.addMenuItem('topbar', 'Survey Menu', 'surveycruds', 'dropdown', '/surveycruds(/create)?');
Menus.addSubMenuItem('topbar', 'surveycruds', 'Survey List', 'surveycruds');
... |
/**
* This file/module contains all configuration for the build process.
*/
module.exports = {
/**
* The `build_dir` folder is where our projects are compiled during
* development and the `compile_dir` folder is where our app resides once it's
* completely built.
*/
build_dir: 'build',
compile_dir: ... |
Ext.define('Ext.ux.parse.Proxy', {
extend: 'Ext.data.proxy.Server',
alias: 'proxy.parse',
requires: ['Ext.data.Request', 'Ext.ux.parse.Reader', 'Ext.ux.parse.Helper'],
config: {
reader: "parse",
loadAllPointers: false
},
checkParse: function() {
if (window.Parse && window... |
/**
* selenium-webdriver
*
* 显式等待与隐式等待
*
* 显式等待:sleep
* driver.sleep(1000)
* 隐式等待:wait
* https://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/chrome_exports_Driver.html#wait
*
* wait的用法
*/
require('chromedriver');
let webdriver = require('selenium-webdriver');
let until = ... |
/** Used for built-in method references. */
var arrayProto = Array.prototype;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeJoin = arrayProto.join;
/**
* Converts all elements in `array` into a string separated by `separator`.
*
* @static
* @memberOf _
* @cate... |
var _ = require('lodash');
var domain = require('domain');
var paths = require('../../lib/paths');
var config = require(paths.libdir + '/getconfig');
var contextConf = config.context;
var log = require(paths.libdir + '... |
hb.define('getPointOnCircleSpec', ['getPointOnCircle', 'degreesToRadians'], function (getPointOnCircle, degreesToRadians) {
describe('getPointOnCircle', function () {
it("should return a point to the right if angle is 0", function() {
var point = getPointOnCircle(10, 10, 5, 0);
expe... |
/**!
* Sortable
* @author RubaXa <trash@rubaxa.org>
* @license MIT
*/
(function sortableModule(factory) {
"use strict";
if (typeof define === "function" && define.amd) {
define(factory);
}
else if (typeof module != "undefined" && typeof module.exports != "undefined") {
module.exports = factory();
}
el... |
// All code points with the `Hex_Digit` property as per Unicode v4.1.0:
[
0x30,
0x31,
0x32,
0x33,
0x34,
0x35,
0x36,
0x37,
0x38,
0x39,
0x41,
0x42,
0x43,
0x44,
0x45,
0x46,
0x61,
0x62,
0x63,
0x64,
0x65,
0x66,
0xFF10,
0xFF11,
0xFF12,
0xFF13,
0xFF14,
0xFF15,
0xFF16,
0xFF17,
0xFF18,
0xFF19,
0... |
"use strict";
const ContactsPagingModel = require('./contactsPagingModel.js');
/**
* Contacts Page rendering model
* @class PageModel
* @constructor
*/
const PageModel = function PageModel (data) {
data = data || {};
for (let key in data) {
if (data.hasOwnProperty(key)) {
this[key] = data[... |
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v1.1.0-rc4-master-3e15998
*/
goog.provide('ng.material.components.fabShared');
goog.require('ng.material.core');
(function() {
'use strict';
angular.module('material.components.fabShared', ['material.core'])
.controller('... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var spinner9 = exports.spinner9 = { "viewBox": "0 0 16 16", "children": [{ "name": "path", "attribs": { "fill": "#000000", "d": "M8 0c-4.355 0-7.898 3.481-7.998 7.812 0.092-3.779 2.966-6.812 6.498-6.812 3.59 0 6.5 3.134 6.5 7 0 0.828 0.672 ... |
// Dependencies ---------------------------------------------------------------
// ----------------------------------------------------------------------------
var Class = require('../shared/lib/Class').Class;
// Player Base Class ----------------------------------------------------------
// -------------------------... |
import { html, GluonElement } from '../src/gluon.js';
class HelloMessage extends GluonElement {
get style() {
return html`
<style> p { color: firebrick } </style>
`;
}
get template() {
return html`
${this.style}
<p>Hello ${this.getAttribute('name')}</p>
`;
}
}
class LoudMessa... |
const path = require('path');
const ROOT_PATH = path.resolve(__dirname, '..');
module.exports = {
resolve: {
root: [
path.resolve(ROOT_PATH, 'src'),
path.resolve(ROOT_PATH, 'node_modules'),
],
extensions: ['', '.js', '.jsx'],
},
};
|
function RenameClassClicked() {
socket.emit('Request_CourseRename', {
cid: getSelectedClassId(),
newCourseName: document.querySelector('#class_rename').value
});
}
function handleResponseRenameCourse(data) {
document.querySelector("#rename_class_alert_box").innerHTML = data.message;
document.querySelector("#re... |
const { invariant } = require('utils/graphql.utils');
const mongoose = require('mongoose');
const User = mongoose.model('User');
module.exports = {
/**
* @description Find users in our Mongoose Models
* @param {Object} args - GraphQL arguments
* @param {Array<String> | String} args.usernames - usernames to se... |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
export default class Skin extends Component {
render() {
return (
<View style={styles.container}>
... |
/**
* 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 {Fiber, SuspenseHydrationCallbacks} from './ReactInternalTypes';
import type {FiberRoot} from './ReactInte... |
'use strict';
var express = require('express'),
router = express.Router(),
Participant = require('../models/participant'),
dateHelper = require('../helpers/myDatetime'),
//User = require('../models/user'),
Worksheet = require('../models/worksheet'),
authorization = require('../helpers/authorization.js');
... |
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2010, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of sou... |
/**
* Tests sit right alongside the file they are testing, which is more intuitive
* and portable than separating `src` and `test` directories. Additionally, the
* build process will exclude all `.spec.js` files from the build
* automatically.
*/
describe( 'score section', function() {
beforeEach( module( 'ngBoi... |
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./e2e/**/*.e2e-spec.ts'
],
capabilities: {
... |
var cchopControllers = angular.module('cchopControllers',[]);
/**
* CoffeeChop frontpage controller
*/
cchopControllers.controller('FrontpageCtrl', ['$scope' ,'$http','$location',
function($scope,$http,$location) {
$http.get('data/frontpage.json').success(function(data){
$scope.lists = data.lists;
$scope.offs = d... |
/**
* DEVELOPMENT WEBPACK CONFIGURATION
*/
const path = require('path');
const fs = require('fs');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const logger = require('../../server/logger');
const cheerio = require('cheerio');
const pkg = require(path.resolve(process.... |
import expect from 'expect';
describe('Our first test', () => {
it('should pass', () => {
expect(true).toEqual(true);
});
}) |
// JSON <token>
// Tokens / Token
//
// A short string.
//
// Tokens are used by the client to prove their
// [identity](/docs/#/concept/as.md) to the RunOrg API. It is returned by
// authentication methods such as [Persona](/docs/#/contact/persona.js)
// and [HMAC](/docs/#/contact/hmac.js). It is passed to the API in ... |
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _RadioButton2 = require('./RadioButton');
var _RadioButton3 = _interopRequireDefault(_RadioButton2);
exports.RadioButton = _RadioButto... |
var helloWorldReactElement = React.createElement(
'h1',
null,
'Hello world!'
);
var HelloWorld = React.createClass({
displayName: 'HelloWorld',
render: function () {
return React.createElement(
'div',
null,
helloWorldReactElement,
helloWorldReactElement
);
}
});
ReactDOM.ren... |
angular.module('demoapp', ['d3calendar'])
.controller('DemoCtrl', [ '$scope', function($scope){
// Generate an event list for a day.
function genEvents() {
var arr = [];
if(Math.random() > 0.5)
arr.push("Edited file.");
if(Math.random() > 0.5)
arr.push("Pushed project.");
if... |
import React, { PropTypes } from 'react';
import ReactNative, { Text, View, StyleSheet, Platform, PixelRatio, WebView, ToastAndroid, BackAndroid, ActivityIndicator } from 'react-native';
import px2dp from '../util/px2dp';
import theme from '../config/theme';
import NavigationBar from '../component/WebViewNavigationBar'... |
/* */
'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... |
export default {
create({Meteor, LocalState, FlowRouter}, options) {
if (!options) {
return LocalState.set('SAVING_ERROR', 'Event criteria is required');
}
LocalState.set('SAVING_ERROR', null);
const id = Meteor.uuid();
// There is a method stub for this in the ... |
var StreamAdapter = require('./StreamAdapter'),
fs = require ('fs'),
FileAdapter = StreamAdapter.FileAdapter,
// TwitterAdapter = require('./StreamAdapter').TwitterAdapter,
HTTPAdapter = StreamAdapter.HTTPAdapter;
HTTPSAdapter = StreamAdapter.HTTPSAdapter;
module.exports = {
streams : StreamAdapter.streams,
regi... |
import React, { Component, PropTypes } from "react";
import {
StatusBar,
View,
StyleSheet,
LayoutAnimation,
Platform,
TextInput,
ActivityIndicator
} from "react-native";
import { KeepAwake } from "expo";
import { NavigationStyles } from "@expo/ex-navigation";
import colors from "kolors";
import KeyboardEv... |
var {JSDOM} = require('jsdom')
let {window} = new JSDOM()
window.XMLSerializer = class XMLSerializer {
serializeToString(root) {
// TODO: include doctype
if (root.nodeType === root.DOCUMENT_TYPE_NODE) {
return `<!DOCTYPE ${root.name}>`
}
if (root.nodeType === root.TEXT_NODE) {
return r... |
version https://git-lfs.github.com/spec/v1
oid sha256:4382acca17e21374652f97ad675654b3d3473205ec74c0111b9d57dc105720de
size 1580
|
'use strict';
(function() {
// Statlines Controller Spec
describe('Statlines Controller Tests', function() {
// Initialize global variables
var StatlinesController,
scope,
$httpBackend,
$stateParams,
$location;
// The $resource service augments the response object with methods for updating and deletin... |
/*
Terminal Kit
Copyright (c) 2009 - 2021 Cédric Ronvel
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
... |
define("common-jquery:widget/js/util/uri/uri.js",function(e,c,r){var o={swfupload:"//exp.bdstatic.com/static/common-jquery/swf/Uploader_10d5704.swf",cyberplayer:"//exp.bdstatic.com/static/common-jquery/cyberplayer/cyberplayer.flash_c8642f2.swf"};r.exports=o}); |
/**
* Module dependencies
*/
var util = require('util');
var Entity = require('./entity');
var EntityType = require('../../consts/consts').EntityType;
/**
* Initialize a new 'Equipment' with the given 'opts'.
* Equipment inherits Entity
*
* @class ChannelService
* @constructor
* @param {Object} opts
* @api p... |
angular.module('tvSchedulerApp').controller('programsController', ['$scope', 'programService', 'guideConfigurationService', function ($scope, programService, guideConfigurationService) {
$scope.viewStartTime = guideConfigurationService.viewStartTime;
$scope.viewEndTime = guideConfigurationService.viewEndTime;... |
'use strict';
const format = require('util').format;
const indentString = require('indent-string');
const stripAnsi = require('strip-ansi');
const yaml = require('js-yaml');
const extractStack = require('../extract-stack');
// Parses stack trace and extracts original function name, file name and line
function getSourc... |
export const REQUEST_PLUGINS = 'REQUEST_PLUGINS'
export const RECEIVE_PLUGINS = 'RECEIVE_PLUGINS'
|
define([
'app',
'esri/geometry/Extent',
'esri/SpatialReference'
], function (app, Extent, SpatialReference) {
// define our controller and register it with our app
app.controller("ContentCtrl", function($scope, item, $sce){
$scope.itemId = item.data.id;
$scope.title = item.data.title;
$scope.desc... |
var express = require('express');
var router = express.Router();
var async = require('async');
var redis = require('redis');
var moment = require('moment');
var Redis = require('../library/redis');
var UserService = require('../service/user_service');
var UserModel = require('../model/user_model');
var Msg91u = requir... |
import { defineMessages } from 'react-intl'
/* eslint-disable max-len */
export default defineMessages({
durationUnitSeconds: '{value} {value, plural, one {second} other {seconds}}',
durationUnitMinutes: '{value} {value, plural, one {minute} other {minutes}}',
durationUnitHours: '{value} {value, plural, one {hou... |
/* eslint-env mocha */
let featureTest = require('../../featureTest.js')
let templateLiterals = require('../../../../src/js/features/es6/syntax/templateLiterals.js')
describe('Template Literals Feature', function () {
it('should find template literal', function () {
let program = '`foo bar`'
featureTest(prog... |
angular.module('mainApp').directive('stringToNumber', function() {
return {
require: 'ngModel',
link: function(scope, element, attrs, ngModel) {
ngModel.$parsers.push(function(value) {
return '' + value;
});
ngModel.$formatters.push(function(value)... |
'use strict';
import {should as should_} from 'chai';
const should = should_();
import {spy, stub} from 'sinon';
import mainMenu from '../../server/main-menu';
import user from '../../server/user';
const SOCKET_ID = 'TESTING_SOCKET';
const [USER, PASS, EMAIL, VALIDATION_KEY] = [':)', ':)', 'a@b.c', 'TESTING_VALIDATIO... |
/*
* Roy Replicator
* https://github.com/jo/roy-replicator
*
* Find out Common Ancestry
* - Retrieve replication logs
* - Compare replication logs
*
* Copyright (c) 2013 Johannes J. Schmidt
* Licensed under the MIT license.
*/
'use strict';
var async = require('async');
module.exports = function(options, c... |
import { Actions, ActionCreators } from './actions'
import {getService} from '../app/selectors'
import { handleError } from '../commonHandlers'
import { call, put, select, takeLatest } from 'redux-saga/effects'
function * myClientsSaga (action) {
let errorAction = null
try {
const clientSvc = yield select(get... |
const blogsApi = require('./blogs/api.js');
module.exports = (app) => {
app.use('/blog', blogsApi);
}
|
function toggle() {
var x = document.getElementById("search-options");
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
} |
(function($){
// START
/*
* to(ele)
* selects all items between the first element and the given argument
*
* returns this if parent is not the same
*
*/
$.fn.to = function(ele){
var $new = $(this);
var $that = $(ele).first();
var $this = this.first();
if($this[0].parentNode ==... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 Richard Backhouse
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation the rights to use, copy... |
const expect = require('chai').expect
const passthrough = require('../../../lib/protocols/http/passes')
suite('passes', function () {
const passes = passthrough.passes
function restore () {
passthrough.passes = passes
}
test('sequentially', function (done) {
var delay = Date.now() - 10
function ... |
//TODO: add options for symbol displayed, colors, decay over several rounds?
/**
* CanvasLife
*
* constructor:
*
* @param {DOM Element} canvas Canvas element to hold the life universe
*
* @param {object} options Options to override default settings
*
*/
var CanvasLife = (function (canvas, options) {
... |
'use strict';
module.exports = {
up: function (queryInterface, Sequelize) {
queryInterface.sequelize.query('SET FOREIGN_KEY_CHECKS=0;');
return queryInterface.createTable('Patients', {
id: {
allowNull: false,
autoIncrement: true,
primaryKe... |
(function(win, doc) {
'use strict';
var VERSION = 'v0.2';
/*
* From http://stackoverflow.com/questions/2897155/get-cursor-position-within-a-text-input-field
* Returns the caret (cursor) position of the specified text field.
*/
function getCaretPosition(inputField) {
var iCaretPos = 0;
// IE ... |
<<<<<<< HEAD
<<<<<<< HEAD
var mkdir = require("mkdirp")
, assert = require("assert")
, log = require("npmlog")
, path = require("path")
, sha = require("sha")
, retry = require("retry")
, npm = require("../npm.js")
, fetch = require("../utils/fetch.js")
, inflight = require("inflight")
, locker = requ... |
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
... |
import React from 'react';
class Matches extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
render() {
return (
<div className='container'>
</div>
)
}
}
export default Matches;
|
import path from 'path'
import { cpus } from 'os'
import map from 'lodash.map'
import imageminSvgo from 'imagemin-svgo'
import createThrottle from 'async-throttle'
import imageminOptipng from 'imagemin-optipng'
import imageminPngquant from 'imagemin-pngquant'
import imageminGifsicle from 'imagemin-gifsicle'
import imag... |
ScatterMatrix = function(url, data, dom_id) {
this.__url = url;
if (data === undefined || data === null) { this.__data = undefined; }
else { this.__data = d3.csv.parse(data); }
this.__cell_size = 140;
if (dom_id === undefined) { this.__dom_id = 'body'; }
else { this.__dom_id = "#"+dom_id; }
};
ScatterMatri... |
// @flow
import type {Suggestion, SuggestionType} from './provider'
import type {GoCodeSuggestion, SnippetMode} from './gocodeprovider'
type Options = {|
prefix: string,
suffix: string,
snippetMode: SnippetMode
|}
type Ctx = {|
snipCount: number,
argCount: number,
snippetMode: SnippetMode
|}
type FuzzyS... |
'use strict';
module.exports = require('next/dist/lib/error.js');
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9uZXh0L2Rpc3QvcGFnZXMvX2Vycm9yLmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJyZXF1aXJlIl0sIm1hcHBpbmdzIjoiOztBQUFBLE9BQU8sQUFBUCxVQUFpQixBQ... |
import Ember from 'ember';
import Application from '../../app';
import Router from '../../router';
import config from '../../config/environment';
export default function startApp(attrs) {
var application;
let attributes = Ember.assign({}, config.APP, attrs); // use defaults, but you can override;
Ember.run(fun... |
const db = require('APP/db')
const Question = db.model('questions')
const Difficulty = db.model('difficulties')
module.exports = require('express').Router()
.get('/', (req, res, next) => {
Difficulty.findAll({
include: [Question],
order: [
['id', 'ASC'],
[ Question, 'id', 'ASC' ]
... |
a => "b" |
$(function () {
var socket = io();
/*
//Capture click on button send message to server
$('button').click(function () {
socket.emit('chat message', $('#message').val());
$('#message').val('');
return false;
});
*/
/*
//Capture message from server
socket.on('c... |
'use strict';
const path = require('path');
const fs = require('fs-extra');
const Project = require('../../../lib/models/project');
const Addon = require('../../../lib/models/addon');
const tmp = require('../../helpers/tmp');
const touch = require('../../helpers/file-utils').touch;
const expect = require('chai').expec... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
import React from 'react'
import { shallow } from 'enzyme'
import { shallowToJson } from 'enzyme-to-json'
import Search from './Search'
import ShowCard from './ShowCard'
import preload from '../public/data.json'
test('Search snapshot test', () => {
const component = shallow(<Search />)
const tree = shallowToJs... |
angular.module('ionic.service.modal', ['ionic.service.templateLoad', 'ngAnimate'])
.factory('Modal', ['$rootScope', '$document', '$compile', '$animate', '$q', 'TemplateLoader', function($rootScope, $document, $compile, $animate, $q, TemplateLoader) {
var ModalView = ionic.views.Modal.inherit({
initialize: funct... |
'use strict';
import { Toast, SENTRY } from '@/modules/toast/handler/handlerToast';
const errors = require('web3-core-helpers').errors;
import { isArray, isFunction } from 'lodash';
let Ws = null;
let _btoa = null;
let parseURL = null;
Ws = function (url, protocols) {
if (protocols) return new window.WebSocket(url, ... |
/**
* DataRepository
* 刷新从网络获取;非刷新从本地获取,
* 若本地数据过期,先返回本地数据,然后返回从网络获取的数据
* @flow
*/
'use strict';
import {
AsyncStorage,
} from 'react-native';
import config from '../../../res/datas/Config.json'
const URL = 'http://www.devio.org/io/GitHubPopular/json/Config.json';
//const URL='https://github.com/KissLuckystar... |
var Wit = require('node-wit')
module.exports = function (witToken) {
return new Witbot(witToken)
}
function Witbot (witToken) {
var self = this
self._witToken = witToken
self.setContext = function(context) {
if (context) {
console.log('** Setting context to \'' + context + '\'')
self.contex... |
const generateDOMElement = (name, clazz, children) => {
const div = document.createElement(name);
if (children) {
children.forEach(function (child) {
div.appendChild(child);
});
}
if (clazz) {
div.classList.add(clazz);
}
return div;
};
const div = (clazz, ...children) => {
return gen... |
/**
* @api {get} /notifications/threads/:id/subscription checkNotificationThreadSubscription
* @apiVersion 5.0.0
* @apiName checkNotificationThreadSubscription
* @apiDescription Check to see if the current user is subscribed to a thread.
* @apiGroup activity
*
* @apiParam {String} id
* @apiExample {js} ex:
gi... |
const expect = require('chai').expect;
const Matrices = require('../algorithm/matrices');
const Matrix = require('../algorithm/matrix');
const Store = require('../algorithm/store');
const StoresGood = require('../algorithm/stores_good');
const userLocation = { lat: -6.258129, lng: 106.782308 };
describe('Test matric... |
require('babel/polyfill');
// Webpack config for creating the production bundle.
var path = require('path');
var webpack = require('webpack');
var CleanPlugin = require('clean-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var strip = require('strip-loader');
var projectRootPath = p... |
'use strict';
function getMid(box) {
var dif = [(box[2]-box[0])/3,(box[3]-box[1])/3];
return [[box[0]+dif[0],box[1]+dif[1]],[box[2]-dif[0],box[3]-dif[1]]];
}
var tiles = [
['a','b','c'],
['f','e','d'],
['g','h','i']
];
function whichNon(coord, mid, prev) {
var x,y;
if (coord[0] < mid[0][0]) {
x = 0;
... |
'use strict';
var _ = require('lodash'),
generators = require('yeoman-generator'),
BaseGenerator = require('../base-generator');
var ControllerGenerator = generators.NamedBase.extend(_.extend({}, BaseGenerator, {
srcFile: 'controller.js',
srcPath: 'src/scripts/app/controllers/',
s... |
define([
"core",
"env/config",
"lib/loader",
"lib/translator"
], function(CC, config, loader, translator){
CC.Config = config;
CC.Load = loader;
CC.Translate = translator;
window.Chicken = CC;
return CC;
}); |
var gulp = require( 'gulp' );
var mocha = require( 'gulp-mocha' );
var cover = require( 'gulp-coverage' );
var karma = require( 'karma' ).server;
var jshint = require( 'gulp-jshint' );
var jscs = require( 'gulp-jscs' );
var lintspaces = require( 'gulp-lintspaces' );
var exec = require( 'child_process' ).exec;
gulp.tas... |
/**
* Created by phucpnt on 6/12/16.
*/
import React, { Component, PropTypes } from 'react';
import makeContainerWorkItemRef from '../../containers/work-item/container-work-item-refrence';
class WorkItemReference extends Component {
render() {
console.log(this.props.createTaskByRefItem);
const _onClick = ... |
import { LSymbol } from './types';
export var _cond = LSymbol('cond');
export var _def = LSymbol('def');
export var _do = LSymbol('do');
export var _lambda = LSymbol('lambda');
export var _quasiquote = LSymbol('quasiquote');
export var _quote = LSymbol('quote');
export var _unquote = LSymbol('unquote');
export var _un... |
'use strict';
var Db = require('nedb');
var co = require('co');
var expect = require('chai').expect;
var wrap = require('..');
describe('wrap', function () {
var db;
beforeEach(function () {
db = wrap(new Db());
});
describe('functions returning cursor', function () {
it('should return wra... |
module.exports = function(Museum) {
/*Museum.on('dataSourceAttached', function(obj){
var find = Museum.find;
Museum.find = function(filter, cb){
console.log('Start custom method');
find(filter, function(error, instances){
for( var i in instances )
{
console.log(i);
}
});
console... |
/*
* Copyright (c) 2016-2018 Valerii Zinchenko
* Licensed under MIT (https://github.com/valerii-zinchenko/inheritance-diagram/blob/master/LICENSE.txt)
* All source files are available at: https://github.com/valerii-zinchenko/inheritance-diagram
*/
'use strict';
const Class = require('class-wrapper').Class;
const ... |
//
// Copyright (c) 2013 Bhautik J Joshi (bjoshi@gmail.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use,... |
// all environments
var express = require('express'),
app = express();
Datastore = require('nedb'),
Seance = require('./seance.js').Seance,
db = new Datastore({ filename: 'seances.db', autoload: true }),
Spreadsheet = require('edit-google-spreadsheet')
Q = require('q');
//app.use(express.compre... |
var expect = require('chai').expect;
var day12 = require('../src/day12.js');
describe('Sum all numbers in document', function() {
it('[1,2,3] sums to 6', function() {
expect(day12.sumNumbers('[1, 2, 3]')).to.equal(6);
});
it('{"a":2,"b":4} sums to 6', function() {
expect(day12.sumNumbers('{"a":2,"b":4}')).to.eq... |
require.config({
// 定义路径
baseUrl: './',
paths: {
'jquery': 'js/jquery1.8.3'
}
});
require(['jquery'], function ($) {
$(function () {
//从其他页面加载
$('#top').load('login.html #top .top-con');
$('#footer-out').load('login.html #footer-out .footer');
$('#footer-service').load('login.html #footer-service .serv... |
import React, { Component } from 'react';
import Select from '../../../components/uielements/select';
import PageHeader from '../../../components/utility/pageHeader';
import Box from '../../../components/utility/box';
import LayoutWrapper from '../../../components/utility/layoutWrapper';
import ContentHolder from '../.... |
$(function(){
setInterval(function() {
$.ajax({
url: '/give_time',
});
}, 1000);
});
|
joo.classLoader.prepare("package flash.text.engine",/* {*/
/**
* The BreakOpportunity class is an enumeration of constant values that you can use to set the <code>breakOpportunity</code> property of the ElementFormat class. This property determines which characters can be used for breaking when wrapping text is brok... |
/*
* @license Copyright (c) CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* Represent plain text selection range.
*/
CKEDITOR.plugins.add("textselection",
{
version: "1.08.0",
init: function (editor)... |
'use strict';
var path = require('path');
var fse = require('fs-extra');
var StaticFilesPlugin = require('../../lib/StaticFilesPlugin');
var appDir = path.join(__dirname);
var sourceDir = path.join(appDir, 'source');
var destinationDir = path.join(appDir, 'compiled');
var moduleName = 'source';
fse.removeSync(desti... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.