code stringlengths 2 1.05M |
|---|
;!function ($, undefined) {
var Template = [
'<div class="bcd-toggler-wrapper {{SIZE}} ">',
'<div class="bcd-toggler ',
'{{STATE}} {{STATE_STYLE_CLASS}}">',
'<div class="bcd-toggler-switch"></div>',
'</div>',
'<div class="bcd-toggler-lb... |
require('./array');
/*
Credit for the type retrieval function and regex
goes to StackOverflow user Jason Bunting
http://stackoverflow.com/questions/332422/how-do-i-get-the-name-of-an-objects-type-in-javascript
*/
var funcNameRegex = /function (.{1,})\(/;
function getType(obj) {
return (obj).constructor.toStrin... |
//-----------------------------------------------------
//
// Author: Daeren Torn
// Site: 666.io
//
//-----------------------------------------------------
"use strict";
//-----------------------------------------------------
require("./../index");
//-----------------------------------------------------
var l, d... |
"use strict"
var ndstring = require("../ndstring.js")
require("tape")("ndstring", function(t) {
var x = ndstring("foobar", [2,3])
t.deepEqual(ndstring.toString(x), ['foo','bar'])
var y = ndstring("bananabanana", [6,6], [1,1])
t.deepEqual(ndstring.toString(y), ['banana','ananab','nanaba','anaban','nabana','a... |
/**
* @fileoverview 样式抽离
* @author liweitao
*/
'use strict';
module.exports = function ($, appConf, moduleConf, args) {
return function (mod, modulePath, appPath) {
return new Promise(function (resolve, reject) {
var path = require('path');
var fs = require('fs');
var vfs = require('vinyl-fs'... |
/*!
* cake-hash
* CakePHP in Utility.Hash class like a collection manipulation. In JavaScript.
*
* @author tsuyoshiwada
* @homepage https://github.com/tsuyoshiwada/cake-hash
* @license MIT
* @version 0.0.2
*/
|
import Vue from 'vue'
import Router from 'vue-router'
// 定义切割点,异步加载路由组件
let Home = () => import('@/pages/Home.vue')
let List = () => import('@/pages/List.vue')
let NotFound = () => import('@/pages/NotFound.vue')
let Appshell = () => import('@/pages/Appshell.vue')
Vue.use(Router)
export function createRouter () {
r... |
define(["./core","./core/init","./manipulation","./traversing"],function(n){return n.fn.extend({wrapAll:function(t){var i;return n.isFunction(t)?this.each(function(i){n(this).wrapAll(t.call(this,i))}):(this[0]&&(i=n(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&i.insertBefore(this[0]),i.map(function(){fo... |
import { expect } from 'chai';
describe('createDefaultBarrierType', () => {
it('should support tick barrier');
it('should support intraday barrier');
it('should support daily barrier');
});
|
/*global module:false*/
module.exports = function(grunt) {
require('time-grunt')(grunt);
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// start a node server
connect: {
preview: {
options: {
port: 9000,
base: 'preview'
... |
/*
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @class
*/
CKEDITOR.dom.nodeList = function( nativeList )
{
this.$ = nativeList;
};
CKEDITOR.dom.nodeList.prototype =
{
count : function()
{
return this.$.... |
const puppeteer = require('puppeteer');
const W = wrapPromiseInTimeout;
class Player {
async visitHomepage() {
console.log('visiting homepage...');
this.browser = await puppeteer.launch();
this.page = await this.browser.newPage();
await this.page.setViewport({ width: 1600, height: 1200 });
await ... |
/*eslint no-extend-native:0 */
/*eslint no-unused-vars:0 */
var path = require('path');
// Convenience
global.l = console.log;
// Chai Setup
// -------------------------
global.chai = require('chai');
global.expect = chai.expect;
global.assert = chai.assert;
var chaiSubset = require('chai-subset');
chai.use(ch... |
'use strict';
const Path = require('path');
const bytes = require('bytes');
const Promise = require('bluebird').Promise;
const workerpool = require('workerpool');
const usage = require('pidusage');
const logger = require('../logger.js');
const deepCopy = require('../util.js').deepCopy;
/**
* Worker that spawns mul... |
var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res) {
if (req.isAuthenticated()) {
res.redirect('/start');
}
else {
res.render('index', { message : 'Hello World!' });
}
});
router.get('/start', function(req, res) {
... |
import { combineReducers } from 'redux'
import authReducer from './AuthReducers'
import entryReducer from './EntryReducers'
import profileReducers from './ProfileReducers'
import formReducer from './FormReducers'
import { routerReducer } from 'react-router-redux'
const rootReducer = combineReducers({
auth: authReduc... |
var glslify = require('glslify');
var CanvasRenderer = require('fontpath-canvas');
var RobotFont = require('../utils/fonts/robot-font');
var _ = require('underscore');
var constants = require('../utils/constants');
var appStore = require('../stores/app-store');
var TVScreen = function(fragmentShader, textData, row, co... |
'use strict';
angular.module('runbracketsApp')
.controller('SettingsCtrl', function ($scope, User, Auth) {
$scope.errors = {};
$scope.user = Auth.getCurrentUser();
$scope.changePassword = function() {
$scope.submitted = true;
if($scope.passform.$valid) {
Auth.changePassword( $scope.... |
console.log('My content script has been injected!');
// Receive messages initiated from the background page:
chrome.runtime.onMessage.addListener(function(msg, sender, sendResponse) {
if (msg.command === 'color') {
console.log('Setting page color.');
[].forEach.call(document.querySelectorAll('*'), functi... |
/// <reference path="_reference.js" />
"use strict";
window.onload = function () {
var paperTelerik = Raphael(10, 10, 400, 200);
var telerikLogo = paperTelerik.path("M10 30 L30 10 L70 50 L50 70 L30 50 L70 10 L90 30");
telerikLogo.attr({
"stroke-width": 7,
stroke: "yellowgreen"
});
... |
import { normalizeElementName } from '../../element-registry'
import { addAttr } from 'compiler/helpers'
function preTransformNode(el) {
if (el.tag !== 'router-view') return
if (
el.parent &&
el.parent.tag &&
normalizeElementName(el.parent.tag) === 'nativeframe'
) {
addAttr(el.parent, 'hasRouterV... |
var React = require('react-native');
var {
View,
StyleSheet,
PixelRatio,
TouchableWithoutFeedback
} = React;
var cssVar = require('../Lib/cssVar');
var AppActions = require('../Actions/AppActions');
var Text = require('../Components/Text');
var Button = require('../Components/Button');
var TextInput... |
import React from 'react';
import testimonials from 'constants/data/testimonials';
import TestimonialSlider from 'react-slick';
import styles from './testimonials.css';
const Testimonials = React.createClass({
getInitialState () {
return null;
},
getTestimonials () {
return testimonials.toJS().map((testi... |
// Dependencies
var Overlap = require("../lib")
, Couleurs = require("couleurs")
, Box = require("cli-box")
;
// Create two boxes
var box1 = Box("20x10", Couleurs("Hello World", [142, 68, 173]))
, box2 = Box("30x5", Couleurs("Hello Mars!", "#c0392b"))
;
// Combine them
console.log(Overlap({
who: box1
... |
var BuildLight = require('buildlight');
var buster = require('buster-node');
var fs = require('fs');
var NestorBuildLight = require('../lib/nestorbuildlight');
var referee = require('referee');
var assert = referee.assert;
buster.testCase('nestorbuildlight - nestorbuild... |
'use strict';
var util = require('util'),
events = require('events'),
_ = require('underscore'),
numeric = require('numeric'),
async = require('async');
var Evaluator = function(predictor) {
events.EventEmitter.call(this);
this.predictor = predictor;
};
util.inherits(Evaluator, events.EventEmitte... |
'use strict';
(function() {
// Edit event Controller Spec
describe('Edit event Controller Tests', function() {
// Initialize global variables
var EditEventController,
scope,
$httpBackend,
$stateParams,
$location;
// The $resource service augments the response object with methods for updating and d... |
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this n... |
describe('bmoor-comm::restful', function(){
it('should enable something', function( done ){
var called = false,
stream = {},
verify = function( url ){
expect( url ).toBe('/users/1');
},
response = { hello: 'world' };
bmoorComm.Requestor.clearCache();
bmoorComm.Requestor.settings.fetche... |
var class_pathfinder_1_1_game_1_1_computer_1_1_extensions =
[
[ "AddEOSDevice", "class_pathfinder_1_1_game_1_1_computer_1_1_extensions.html#a7f03319f859dd7b8f726482d0e8e902c", null ],
[ "AddLink", "class_pathfinder_1_1_game_1_1_computer_1_1_extensions.html#aa3853d2b8446e08fcb7cbaa38af200ef", null ],
[ "AddM... |
/**
* @copyright 2016-present, Prometheus Research, LLC
* @flow
*/
import {css, style} from 'react-stylesheet';
import ButtonBase from '../ButtonBase';
import theme from './theme';
const borderWidth = 3;
export default class SecondaryButton extends ButtonBase {
static stylesheet = {
...ButtonBase.stylesheet... |
var express = require('express'),
app = express(),
path = require('path');
var dirRoot = process.cwd();
app
.use(express.static(path.join(dirRoot, '/public')))
.get('*', function(req, res) {
res.sendFile(path.join(dirRoot, '/src/views/index.html'));
})
.listen(3083);
console.log('Server up and listening on p... |
import { connect } from "react-redux";
import App from "../components/App";
function mapStateToProps(state) {
return {
answer: state.answer,
};
}
export default connect(
mapStateToProps,
)(App);
|
import { DB_TYPE } from '../../config/env';
import { DB_TYPES } from '../../config/dbTypes';
let dbConfig = null;
/* use inline requires for conditional loading */
switch (DB_TYPE) {
case DB_TYPES.MONGO:
dbConfig = require('./mongo').default;
break;
case DB_TYPES.POSTGRES:
dbConfig = require('./postgr... |
var express = require('express'),
cons = require('consolidate'),
app = express();
app.engine('html',cons.swig);
app.set('view engine', 'html');
app.set('views', __dirname+'/views');
app.get('/', function(req,res) {
res.render ('hello', {'name':'Farrukh'});
});
app.get('*', function(req,res) {
... |
goog.addDependency("base.js", ['goog'], []);
goog.addDependency("../cljs/core.js", ['cljs.core'], ['goog.string', 'goog.object', 'goog.string.StringBuffer', 'goog.array']);
goog.addDependency("../clojure/string.js", ['clojure.string'], ['goog.string', 'cljs.core', 'goog.string.StringBuffer']);
goog.addDependency("../cl... |
import React, {Component} from "react"
// import PropTypes from "prop-types"
// import {Link} from "react-router"
// import FlatButton from "material-ui/FlatButton"
// import Popover from "material-ui/Popover"
// import Menu from "material-ui/Menu"
// import MenuItem from "material-ui/MenuItem"
class LandingPage exten... |
'use strict';
var appCfg = {};
var ngModule = angular.module('woAppConfig', []);
ngModule.factory('appConfig', function() {
return appCfg;
});
module.exports = appCfg;
/**
* Global app configurations
*/
console.log('location', window.location);
appCfg.config = {
pgpComment: 'Serious Mail',
//keyServer... |
module.exports = function(action, callback) {
var cli = require('../cli');
var WebSocket = require('ws');
var print = require('../common/printer');
var ws = new WebSocket('ws://kontrol-app.herokuapp.com');
ws.on('error', function(err) {
print.error('Couldn\'t connect to the WebSocket server');
process.exit(... |
describe("Colt45_2d", function() {
it("should be defined", function() {
expect(Colt45_2d).to.be.defined;
});
beforeEach(function() {
this.defaultConfig = {
canvas : { id: 'game_canvas', w: 800, h: 600 },
url : { atlas:'./assets/json/grits_effects.json' }
... |
import React from 'react'
import DatePicker from 'material-ui/DatePicker'
import TimePicker from "material-ui/TimePicker";
import { TextField } from "material-ui";
import { ru_RU } from "../../constants/Translations";
import { LOCALE } from "../../constants/Core";
// if (areIntlLocalesSupported(['ru-RU'])) {
// Da... |
import gt from './gt'
describe('gt', () => {
it('compares the values', () => {
expect(gt(1)(2)).toBe(true)
expect(gt(2)(1)).toBe(false)
expect(gt(2)(2)).toBe(false)
})
})
|
/**
* Author: Cameron Green <cam at uq.edu.au>
* Date: 5/2/14
*
* E2E tests for Authors
*/
'use strict';
describe('UQL App Authors Module', function () {
var baseUrl = '/index.html#';
var baseElement = 'div.uql-authors-app';
describe('Main view', function () {
var url = '/authors';
beforeEach(fun... |
import * as pages from 'tests/integration/pages';
describe('Home page', () => {
context('when not logged in', () => {
beforeEach(async () => {
// no auth cookies.
await pages.Home.open();
});
it('redirects to login page when not logged in', async () => {
await pages.Login.waitForUrl();... |
;
(function ($) {
$.gatherajax = {};
$.gatherajax.defaults = {
name: null, // String : for method_name
url_base: "", // String : for all_ajax url base
add_type: {
add: {},
edit: {},
del: {}
}, // Object for add execute method name and inside t... |
import '/resources/polymer/@polymer/polymer/polymer-legacy.js';
import { random } from '/resources/reflection/tg-numeric-utils.js';
export const TgSseBehavior = {
properties: {
/* A URI that should be connected to for listening to push events. */
uri: {
type: String,
observ... |
var should = require( "should" );
var sinon = require( "sinon" );
var when = require( "when" );
var _ = require( "lodash" );
var github;
var databass;
var createCommand;
var command;
var org = "myorg";
var repo = "myrepo";
describe( "get branches command", function() {
before( function() {
github = require( "../..... |
module.exports = {
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
loader: "babel-loader",
query: {
presets: ["react", "es2015"],
plugins: ["syntax-async-functions", "transform-regenerator"]
}
}
]
}
... |
import flash from 'connect-flash';
module.exports = function() {
return function(req, res, next) {
var error_messages = req.flash('error');
var info_messages = req.flash('info');
var success_messages = req.flash('success');
res.locals.messages = [];
for(var i in error_messages) {
res.locals.messages.push... |
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var helpers = require('./helpers');
module.exports = {
entry: {
'polyfills': './app/polyfills.ts',
'vendor': './app/vendor.ts',
'app': '.... |
import React, { Component, PropTypes } from 'react';
import './SensorGraph.scss';
import MetricGraphic from './MetricGraphic';
const propTypes = {
sensorHistory: PropTypes.array
};
class SensorGraph extends Component {
sliceOffOldData(sensorHistory) {
return sensorHistory.slice(Math.max(sensorHistory.length -... |
"use strict";!function(){var e=function(e){return document.getElementById(e)},t=e("icon-input"),a=e("icon-upload-wrap");t.addEventListener("change",function(){if(this.files&&this.files[0]){a.style.backgroundImage="",a.classList.add("uploading");var e=new FileReader;e.onload=function(e){a.classList.remove("uploading"),a... |
module.exports = function(config) {
config.set({
basePath: '../',
frameworks: ['jasmine', 'detectBrowsers'],
customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},
detectBrowsers: {
enabled: true,
usePhantomJS: true,
postDe... |
angular.module('app', [
'app.core',
'app.home',
'nag.dynamicEvent'
])
.config([
'$locationProvider',
'$urlRouterProvider',
function($locationProvider, $urlRouterProvider) {
$locationProvider.html5Mode(true);
$urlRouterProvider.otherwise('/home');
}
])
.run([
'$state',
'$rootScope',
function... |
import React from 'react';
import * as Action from 'common/actions';
import './styles.css';
export default class FileMenu extends React.Component {
state = { collapsed: true, x: 0, y: 0 };
componentWillMount() {
document.addEventListener('keydown', (e) => {
const keyCode = e.keyCo... |
"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 = R... |
import Ember from 'ember';
import Util from 'ember-cli-pagination/util';
import LockToRange from 'ember-cli-pagination/watch/lock-to-range';
import { QueryParamsForBackend, ChangeMeta } from './mapping';
import PageMixin from '../page-mixin';
var ArrayProxyPromiseMixin = Ember.Mixin.create(Ember.PromiseProxyMixin, {
... |
module.exports = require("npm:warning@2.1.0/browser"); |
{
return Date.now() - start;
}
|
"use strict";
var url = require('url'),
path = require('path');
module.exports = function (tasks, stylecow) {
tasks.addTask({
filter: {
type: 'AtRule',
name: 'import'
},
fn: function (atrule) {
var importUrl = atrule.get('String').name,
... |
var gameBase = require('../../../../client/game/gameBase');
var testUtil = require('../testlib/testUtil');
var testData = require('../testlib/testData')();
var tournamentTable = require('../../../../client/tournament/tournamentTable');
var CONST = require('../../../../client/tournament/const');
enchant();
window.onloa... |
/**
* @fileoverview Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/)
* (Original book version wasn't completely usable, so fixed some things and made Closure Compiler compatible)
* This should work very similarly to jQuery's events, however it's based off the book version which isn't as
* robus... |
export { default } from 'ember-fhir/serializers/immunization-explanation'; |
/**
* oneAway - Checks if one string is a single edit, or zero edits, away from another string.
* Edits include: Adding a missing character, deleting an extra character, or editing a single character.
* @param {String} a - Base string
* @param {String} b - String to be checked
* @return {Boolean}
*/
function on... |
const express = require('express');
const app = express();
const appIP = process.env.IP || '127.0.0.1';
const appPort = process.env.PORT || 3030;
const data = {
pig: 'oink',
cow: 'Moo',
dog: 'Woof Woof!',
cat: 'I want to lay on you human',
goldfish: '...',
};
app.get('/', function(req, res) {
res.send(... |
/**
* Created by zhangrz on 2017/9/20.
* Copyright© 2015-2020 codingview (https://github.com/codingview)
* @version 0.0.1 created
*/
'use strict';
const Editor = window.wangEditor
, $ajax = require('../general/Ajax.general');
let editor; // 全局变量存储富文本对象
const Data = {
// 保存
save: form=>$ajax({
... |
angular.module('Login.View', [])
.controller('LoginController', LoginController);
//LoginController.$inject = ['OAuth', 'Auth', '$state'];
function LoginController(OAuth, Auth, appname, $state) {
var scope = this;
// Services
scope.OAuthSvc_ = OAuth;
scope.AuthSvc_ = Auth;
scope.StateSvc_ = $... |
import {layerPanelText, defaults, layersConfig, analyticsLabels} from 'js/config';
import {layerActions} from 'actions/LayerActions';
import {modalActions} from 'actions/ModalActions';
import {mapActions} from 'actions/MapActions';
import analytics from 'utils/googleAnalytics';
import KEYS from 'js/constants';
import a... |
import React, { Component, PropTypes } from "react"
import cx from "classnames"
import BaseLayout from "../BaseLayout"
class Page extends Component {
render() {
const { head, body, ...others } = this.props
return (
<BaseLayout
head={ head }
{...others}
>
<article
... |
"use strict";
module.exports = function(sequelize, DataTypes) {
var Forum = sequelize.define("Forum", {
name: DataTypes.STRING,
description: DataTypes.STRING
}, {
classMethods: {
associate: function(models) {
Forum.hasMany(models.Thread)
}
}
});
return Forum;
}; |
"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 = R... |
const express = require('express')
const path = require('path')
const errorHandlers = require('./handlers/errorHandlers')
const helpers = require('./helpers')
const routes = require('./routes')
// create our Express app
const app = express()
// view engine setup
app.set('views', path.join(__dirname, 'views'))
app.s... |
function sendRecord(firstName, lastName, dateOfBirth, streetAddress, postCode, city, country, email, website) {
sendResponse({
name: lastName + ', ' + firstName,
DOB: dateOfBirth,
address: streetAddress + '\n' + postCode + ' ' + city + '\n' + country,
email: email,
url: website
});
} |
var config = require('./config'); // config info
var async = require('async');
var DirectoryProvider = require('./providers/directory').DirectoryProvider;
var directoryProvider = new DirectoryProvider();
var UserProvider = require('./providers/user').UserProvider;
var userProvider = new UserProvider(config.ldap.url,... |
var LessThanOrEqualValidator = require('../Classes/LessThanOrEqualValidator');
var isLessThanOrEqual = function(data, options){
options = (options == null) ? {} : options;
var _validator = new LessThanOrEqualValidator(options);
_validator.validate(data);
return _validator.isValid() ? true : false;
}... |
var JSelector =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ retu... |
/**
* Class Animal
* @param name
* @param type
* @param photo
* @param lat
* @param lng
* @param info
* @param address
* @constructor
*/
function Animal(name, type, photo, lat, lng, info, address) {
this.name = name;
this.type = type;
this.photo = photo;
this.lat = lat;
this.lng = lng;
... |
version https://git-lfs.github.com/spec/v1
oid sha256:b827066be1c63a96b7c977181c3b49ac3a891cc0d87d6c88eed166383575b94d
size 186313
|
;(function (sge) { 'use strict';
sge.grf = sge.grf || {};
var p;
(sge.grf.RendererFactory = function(type) {
this._setContext(type);
this._init();
}).prototype = p = new Object();
p._init = function(){
this._canvasCount = 0;
};
p._setContext = function (type) {
if(type === '2D') {
this._Renderer = sge.grf.Can... |
$(document).ready(function() {
$('.carousel').carousel();
$.ajax({
method: "GET",
url: "/pie",
async:false,
dataType: "json"
}).done(function(response){
console.log(response)
var chart = new Highcharts.Chart({
chart: {
renderTo: 'pie',
plotBackgroundColor: nul... |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema,
crypto = require('crypto');
/**
* A Validation function for local strategy properties
*/
var validateLocalStrategyProperty = function(property) {
return ((this.provider !== 'local' && !this.updated) || pro... |
'use strict';
// const assert = require('assert');
const notEmpty = require('./notEmpty');
const valueTRUE = 'suissa';
const valueFALSE = null;
console.log(valueTRUE + ' notEmpty?', notEmpty.validate(valueTRUE));
console.log(valueFALSE + ' notEmpty?', notEmpty.validate(valueFALSE));
// assert.ok(value, message) |
function vectorToString(vector) {
return `X: ${vector.X} Y: ${vector.Y} Z: ${vector.Z}`;
}
function drawBox(x, y, z, x2, y2, z2) {
API.callNative("DRAW_BOX", API.f(x), API.f(y), API.f(z), API.f(x2), API.f(y2), API.f(z2), 255, 255, 255, 170);
}
var currentVehcle = null;
var currentOffset = null;
var curren... |
/**
* @Author: Zhang Yingya(hzzhangyingya) <zyy>
* @Date: 2016-07-20T22:14:11+08:00
* @Email: zyy7259@gmail.com
* @Last modified by: zyy
* @Last modified time: 2016-07-21T14:26:33+08:00
*/
var argv = require('yargs')
.boolean('v')
.boolean(['x', 'y', 'z'])
.argv
console.log(argv.v)
console.log([argv.x, arg... |
(function( root, factory ) {
// Set up appropriately for the environment.
// Start with AMD.
if ( typeof define === 'function' && define.amd ) {
define(
[
'handlebars',
'comparison/startsWith'
],
function( Handlebars ) {
... |
import moment from 'moment';
const initialState = {
isFetching: true,
list: [],
page: {
page: 0,
size: 10,
totalElements: 0,
totalPages: 0
}
};
const auctionReducer = (state = {}, action) => {
switch (action.type) {
case 'GET_AUCTIONS_FINISHED':
case 'GET_AUCTION_BY_ID_FINISHED':
... |
/**
* Windows: Please do not use trailing comma as windows will fail with token error
*/
const { series, rimraf, } = require('nps-utils');
module.exports = {
scripts: {
default: 'nps start',
/**
* Starts the builded app from the dist directory.
*/
start: {
s... |
// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directl... |
/**
* edatagrid - jQuery EasyUI
*
* Licensed under the GPL:
* http://www.gnu.org/licenses/gpl.txt
*
* Copyright 2011 stworthy [ stworthy@gmail.com ]
*
* Dependencies:
* datagrid
* messager
*
*/
(function($){
function buildGrid(target){
var opts = $.data(target, 'edatagrid').options;
$(target)... |
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 = Reflect.decorate(d... |
/**
* DO NOT EDIT! This file is generated.
* <p>
* Any copy of this file checked into source control is merely for
* convenience and should not be edited in any way.
* <p>
* Generated at Sun Sep 25 14:19:30 PDT 2011
* @private
*/
AjxTimezoneData = {};
AjxTimezoneData.TRANSITION_YEAR = 2011;
AjxTimezoneData.TI... |
'use strict';
// MODULES //
var Stream = require( './stream.js' );
// OBJECT MODE //
/**
* FUNCTION: objectMode( [options] )
* Returns a stream with `objectMode` set to `true`.
*
* @param {Object} [options] - stream options
* @param {String|RegExp} [options.sep=/\r?\n/] - separator used to split streamed data
* @p... |
'use strict';
angular.module('mean.articles').controller('ArticlesController', ['$scope', '$stateParams', 'Global', 'Articles', '$state', function ($scope, $stateParams, Global, Articles, $state) {
$scope.global = Global;
$scope.create = function() {
var article = new Articles({
title: thi... |
'use strict';
module.exports = function (options) {
var path = require('canonical-path');
var _ = require('lodash');
var mainBowerFiles = require('main-bower-files');
var main = mainBowerFiles(options);
var scripts = [], stylesheets = [];
var bowerDir = path.normalize(process.cwd() + '/bower_components');... |
import './sinon-cleanup';
import nodeAssert from 'assert';
import sinon from 'sinon';
const assignFunctionsTo = (fromObj, toObj) => {
Object.keys(fromObj)
.forEach((key) => toObj[key] = fromObj[key]);
};
const assert = nodeAssert.ok;
assignFunctionsTo(nodeAssert, assert);
assignFunctionsTo(sinon.assert, assert)... |
function error (state = "", action) {
switch (action.type) {
case 'THROW_ERROR':
return action.message
case 'CLEAR_ERROR':
return ""
default:
return state
}
}
export default error
|
import Configurator from '../configurator';
import Data from './data';
export default class State extends Configurator {
constructor(config, data) {
super(config);
if (data) {
this.configure(data);
}
}
configure(data) {
this.data = new Data(this.config).configure(this, data);
}
merge(... |
var tab = function() {
return {
restrict: 'E',
transclude: true,
template: '<div role="tabpanel" ng-show="active" ng-transclude></div>',
require: '^tabs',
scope: {
heading: '@'
},
link: function(scope, elem, attr, tabsController) {
scope.active = false;
tabsController.addTab... |
function createICS(classes) {
var events = '';
// Events will be created repeating until this date
var repeatUntil = '20150417T230000Z';
$.each(classes, function(index, val) {
events += eventICS(val,repeatUntil);
});
var str =
'BEGIN:VCALENDAR\n' +
'PRO... |
Ergo.defineClass('Ergo.widgets.Image', {
extends: 'Ergo.html.Img',
defaults: {
cls: 'image'
}
}, 'widgets:image');
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.