code
stringlengths
2
1.05M
import React from 'react'; import { View } from 'react-native'; const AlbumSection = (props) => { return ( <View style={styles.containerStyle}> {props.children} </View> ); }; const styles = { containerStyle: { borderBottomWidth: 1, padding: 5, backgroundColor: '#fff', justifyConten...
const Command = require('../BaseCmd') const ioTools = new (require('../../util/IOTools'))() class Key extends Command { constructor (client) { super(client, { name: 'key', group: 'user', memberName: 'key', description: 'Returns a random image/gif given to me by Key.', examples: ['+...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
require('./check-versions')() var config = require('../config') if (!process.env.NODE_ENV) { process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV) } var opn = require('opn') var path = require('path') var express = require('express') var webpack = require('webpack') var proxyMiddleware = require('http-proxy-mi...
var YahooFantasy = require("../index.js"); var nock = require("nock"); describe("resource: transactionResource", function() { var yf = new YahooFantasy("Y!APPLICATION_KEY", "Y!APPLICATION_SECRET"), transaction = yf.transaction; it("should be defined", function() { expect(transaction).not.toBe(null); });...
const spawn = require('../../../utils/spawn'); const sdkPaths = require('../utils/sdk-paths'); module.exports = function(emulatorId) { let adbPath = sdkPaths().adb; let kill = [ adbPath, ['-s', emulatorId, 'emu', 'kill'] ]; return spawn(...kill); };
/* * BiwaScheme 0.6.3 - R6RS Scheme in JavaScript * * Copyright (c) 2007-2014 Yutaka HARA (http://www.biwascheme.org/) * @license Licensed under the MIT license. */ const BiwaScheme = {}; BiwaScheme.Version = "0.6.3"; BiwaScheme.GitCommit = "63943378f20654996d3f3256424e4ec71db55947"; // // Heap based scheme fr...
const logFile = './assets/img/photo-log'; const fs = require('fs'); const thumbsPath = '/assets/img/thumbs/'; const fullsPath = '/assets/img/thumbs/'; var htmlString = '<div class="gallery">\n\t'; var fileNames = []; var captions = []; // fs.readdir(folder, (err, files) => { // files.forEach(file => { // if (...
'use strict'; /* https://github.com/angular/protractor/blob/master/docs/toc.md */ describe('my app', function() { /*it('should automatically redirect to /teachingResources when location hash/fragment is empty', function() { browser.get('index.html'); expect(browser.getLocationAbsUrl()).toMatch("/teachingR...
function smallestTwoNumbers(numbers) { let result = '' let firstSmall = Infinity let secondSmall = Infinity for (let i = 0; i < numbers.length; i++) { if (firstSmall > numbers[i]) { secondSmall = firstSmall firstSmall = numbers[i] }else if (secondSmall > numb...
/** * 登陆页。 * * @type {class} * * @remark * 包含:固定的顶部、左侧菜单、中心选项卡式视图。 */ define([ 'jquery', 'core', 'base', 'jquery-backstretch' ], function ($, hsr, base) { 'use strict'; var _super = base.BasePage, _superMethods = _super.prototype; /** * 构造方法。 * * @param {HTMLElement |...
import {Action, EntityBuilder} from 'ecstasy'; import * as Template from './template.json'; export class SpawnAction extends Action { run(engine) { if (this.player != null) throw new Error('Players cannot run this action'); var template = EntityBuilder.getEntityTemplate(this.options.type, Template); var ...
export { default as About } from './About';
// Powered by Bing-Translator 'use strict'; var query = process.argv[2]; var http = require('http'); var postData = 'from=en&to=zh-CHS&text=' + query; var option = { hostname: 'cn.bing.com', port: 80, path: '/ttaTranslate?IG=F5EBE23F525341CFBA67480809C9E7F6&IID=SERP.5515', method: 'POST', headers: { 'Content-...
var NRO_EXPEDIENTE = 1000; var Expediente =function(pTipo,pTitulo,pFechaInicio,pPrioridad,pIniciador){ fechaAux = moment(pFechaInicio, "DD/MM/YYYY"); if(fechaAux.isValid()){ this.fechaInicio =fechaAux.toDate(); }else{ console.error("la fecha "+pFechaInicio+ " es invalida"); this.esInvalido=true; } this.nro=...
'use strict'; module.exports = { client: { lib: { css: [ 'public/lib/bootstrap/dist/css/bootstrap.css', 'public/lib/bootstrap/dist/css/bootstrap-theme.css', 'public/lib/angular-material/angular-material.css', 'public/lib/angular-chart.js/dist/angular-chart.css', 'pub...
angular .module('material.components.chips') .directive('mdContactChips', MdContactChips); /** * @ngdoc directive * @name mdContactChips * @module material.components.chips * * @description * `<md-contact-chips>` is an input component based on `md-chips` and makes use of an * `md-autocomplete` element. The ...
const path = require("path") module.exports = { parser: "@typescript-eslint/parser", plugins: [ "react-hooks", "@typescript-eslint", "styled-components-a11y", // TODO: Add support for Graphql /*, "graphql" */ ], extends: [ "eslint:recommended", "plugin:react/recommended", "plug...
var program = require('commander') program._name = 'nlz duplicates' program .usage('[options]') program.on('--help', function () { console.log(' List all duplicate dependencies.') console.log(' Example:') console.log() console.log(' # list the duplicate dependencies of index.js') console.log(' nl...
var util = require("../util"); var AbstractEmission = require("./AbstractEmission.js"); var EmissionTypes = require("./EmissionTypes.js"); function UniformEmission() { AbstractEmission.call(this); this._maxParticles = 0; this._maxLife = 1; this._emitPerSecond = 0; this._frames = 0; } util.inherit(UniformEmissio...
module.exports = (function(App) { var moment = require('moment'); return function(jobId,payload,callback){ var mailTo = payload.to, subject = payload.subject; App.View.render(payload.mailTemplate+'.html', {Config : App.Config,Data : payload.data,moment : moment}, functi...
/** * Utility functions */ var Colors = { EarthYellow: [225, 169, 95], Sand: [194, 178, 128], SandDune: [150, 113, 23], Cyan: [0, 255, 255], AliceBlue: [240, 248, 255], Red: [196, 2, 51], FireBrickRed: [178, 34, 34], Black: [0, 0, 0] } /* * Mouse Event and Pos */ var mouseDownEventCallbacks = []; ...
jQuery.validator.addMethod("cpf", function(value, element) { value = jQuery.trim(value); value = value.replace('.',''); value = value.replace('.',''); cpf = value.replace('-',''); while(cpf.length < 11) cpf = "0"+ cpf; var expReg = /^0+$|^1+$|^2+$|^3+$|^4+$|^5+$|^6+$|^7+$|^8+$|^9+$/; var a = []; var b = new...
/** * Sample React Native App * https://github.com/facebook/react-native */ 'use strict'; import React, { AppRegistry, Component, StyleSheet, Text, View } from 'react-native'; class testdemo extends Component { render() { return ( <View style={styles.container}> <Text style={styles.wel...
/** * @author guan * * provides public data get/set, event listen/ignore/notify and DOM manipulation */ var SandBox = (function() { /** * public data used among modules */ var pubData = {}, /** * used in show and hide function * * visibilityMode == 0: change display(""<->"non...
import colors from './colors' import charts from './charts' import typography from './typography' export default { name: 'night blue', typography, colors, root: { color: colors.text, background: colors.background, extend: ` @import url('https://fonts.googleapis.com/css?f...
import Icon from '../components/Icon.vue' Icon.register({"google":{"width":1536,"height":1792,"paths":[{"d":"M768 786h725q12 67 12 128 0 217-91 387.5t-259.5 266.5-386.5 96q-157 0-299-60.5t-245-163.5-163.5-245-60.5-299 60.5-299 163.5-245 245-163.5 299-60.5q300 0 515 201l-209 201q-123-119-306-119-129 0-238.5 65t-173.5 1...
describe('Mockgoose $exists Tests', function () { 'use strict'; var mockgoose = require('./../../Mockgoose'); var Mongoose = require('mongoose').Mongoose; var mongoose = new Mongoose(); mockgoose(mongoose); mongoose.connect('mongodb://localhost/TestingDB'); var Schema = new mongoose.Schema...
app.directive('resize', function ($window) { return function (scope, element, attr) { var w = angular.element($window); scope.$watch(function () { return { 'h': w.height(), 'w': w.width() }; }, function (newValue, oldValue) { // ...
/*! * Collection * https://github.com/kobezzza/Collection * * Released under the MIT license * https://github.com/kobezzza/Collection/blob/master/LICENSE */ /** @type {?} */ var keys; /** @type {?} */ var value; /** @type {?} */ var values; /** @type {?} */ var type; /** @type {?} */ var done; /** @type {?}...
/** * Created by stas on 08.05.16. */ 'use strict'; playzoneControllers.directive('userLink', function () { return { restrict: 'E', link: function(scope, element) { }, transclude: true, scope: { user: '=', withoutrating: '=', rating: '=...
import AppDispatcher from '../dispatcher/AppDispatcher'; import Appconstants from '../constants/foodSearchConstants'; import {EventEmitter} from 'events'; import _ from 'lodash'; const CHANGE_EVENT = 'change'; let cur_weatherData = {}; function setWeatherData(data) { cur_weatherData = data; } function delWeatherDa...
define([ './state', './createJSON/main', './ui/displayJSON', 'lodash', 'frozen/utils' ], function(state, createJSON, displayJSON, _, utils){ 'use strict'; var MAX_POLY_SIDES = 10; var POINT_RADIUS = 4; var xdisp = document.getElementById('xdisp'); var ydisp = document.getElementById('ydisp'); ...
'use strict'; module.exports = { PROD: true, DEBUG: false, secure: true, port: process.env.PORT || 8080, db: { connection: { host: 'localhost', user: 'mysql', password: 'yourpass', database: 'test' } }, log: { // Can specify one of 'combined', 'common'...
/** * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework. * * @namespace */ var jasmine = {}; /** * @private */ jasmine.unimplementedMethod_ = function() { throw new Error("unimplemented method"); }; /** * Use <code>jasmine.undefined</code> instead of <code>undefined</code>,...
module("About Objects (topics/about_objects.js)"); test("object type", function() { var empty_object = {}; equal("object", typeof(empty_object), 'what is the type of an object?'); }); test("object literal notation", function() { var person = { name: "Richard Davis", age: 33 }; equ...
import { FETCH_COIN_PRICE_ERROR, FETCH_COIN_PRICE_PENDING, FETCH_COIN_PRICE_SUCCESS, SET_ELSE, SET_TEST, } from 'constants/actions'; import { createReducer } from 'utils/reduxUtils'; const INITIAL_STATE = { coinPrice: null, fetchCoinPriceError: null, test: 'If you click the button this text will update...
var Reaction = require("../reaction"), Backbone = require('../end-dash').Backbone, util = require("../util"), rules = require("../rules"), _ = require("underscore"), get = util.get; var ScopeReaction = Reaction.extend({ init: function(next) { this.origStack = this.stack.slice(0); this.sta...
/** * Created by thanos on 4/12/16. */ /* Refactoring to a Pure Function 重构一个纯函数 我们以前的解决方案中使用的forEach和可以从我们的函数内部发生突变 一个全局数组。我们可以改善这里并创建一个功能,就是通过替换我们的 forEach循环,reduce;使得容易维护和测试。通过移除全局数组而是作出 getTasks返回一个值直接我们最终有一个纯函数。 */ var input = ["dist"]; var config = { "dist": ["build", "deploy"], "build": ["js", "...
'use strict'; import express from 'express'; import { Repository } from 'nodegit'; let router = express.Router(); router.post('/init', (req, res, next) => { let reqBody = req.body; Repository.init(reqBody.localRepoPath, Number(reqBody.isBareRepo)).then((repository) => { res.status(200).json({ "status": true,...
Prism.languages.sas = { 'datalines': { pattern: /(^|[\r\n])\s*(?:(?:data)?lines|cards);[\s\S]+?[\r\n];/i, lookbehind: true, inside: { 'keyword': { pattern: /^(\s*)(?:(?:data)?lines|cards)/i, lookbehind: true }, 'punctuation': /;/, 'data': { pattern: /[\s\S]+/, alias: 'string' } }...
import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; module('Unit | Route | restricted/tools/network', function(hooks) { setupTest(hooks); test('it exists', function(assert) { let route = this.owner.lookup('route:restricted/tools/network'); assert.ok(route); }); });
export default { getUserInfo(state) { return state.userInfo; } }
const { getOptions } = require('loader-utils') const { stringify } = require('javascript-stringify') const YAML = require('yaml') const makeIdIterator = (prefix = 'v', i = 1) => ({ next: () => prefix + i++ }) module.exports = function yamlLoader(src) { const { asJSON, asStream, namespace, ...options } = Object.assi...
/* * images.js : this will handle requests for "/images" endpoint. */ // This will handle requests. var handler = require('../handler.js'); module.exports = { all: function(token, callback){ // check if 2 (required) arguments are passed if(arguments.length === 2){ // all 2 arguments are ...
var AppCachePlugin = require('appcache-webpack-plugin'); var HtmlWebpackPlugin = require('../..'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var webpackMajorVersion = require('webpack/package.json').version.split('.')[0]; module.exports = { entry: './example.js', output: { path: __dirname...
/* eslint-disable max-lines */ 'use strict'; /* eslint-disable camelcase, max-length */ exports.seed = function(knex) { return knex('photos').del() .then(() => knex('photos') .insert([ { id: 1, cluster_id: 1, comments: '', expanded: false, pixid: 907709, i...
// @flow import React from 'react'; import { TextArea as SemanticTextArea } from 'semantic-ui-react'; import type { FieldProps } from 'redux-form'; import { INPUT_TYPES } from '../constants'; type Props = { placeholder?: string } & FieldProps; const TextArea = ({ input, placeholder, ...rest }: Props) => ( <...
version https://git-lfs.github.com/spec/v1 oid sha256:2853baff05adbcf7feda9688c1cdaf5117795ceb021c626a749faa73b59dc065 size 11978
'use strict'; const clone = require('../helpers/clone'); class RemoveOptions { constructor(obj) { if (obj == null) { return; } Object.assign(this, clone(obj)); } } module.exports = RemoveOptions;
var config = module.exports; config.DelegateTests = { rootPath: '../', environment: "browser", sources: [ // The 3 polyfills below are needed for testing in ie8 // "https://gist.githubusercontent.com/jonathantneal/3062955/raw/ad9d969c4e55581edbbb293c74135a751f586664/matchesSelector.polyfill.js", // ...
const bcrypt = require('bcrypt'); const mongoose = require('mongoose'); const userSchema = new mongoose.Schema({ name: { type: String, unique: true }, nickname: String, password: String, admin: Boolean, }); userSchema.pre('save', function onSave(cb) { const user = this; if (!user.isModified('password')) ...
/*! * Jade - Lexer * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ /** * Initialize `Lexer` with the given `str`. * * Options: * * - `colons` allow colons for attr delimiters * * @param {String} str * @param {Object} options * @api private */ var Lexer = module.exports = fun...
if (jQuery != undefined) { var django = { 'jQuery': jQuery, } } (function($) { $(document).ready(function() { try { var _ = google; } catch (ReferenceError) { console.log('geoposition: "google" not defined. You might not be connected to the internet.'); ...
module.exports = (function() { var mongoose = require('mongoose'), Schema = mongoose.Schema; var Test = Schema({ name:String, groups:Array }, { collection: 'test' }); Test.statics.test = function() { //this.testSave(); this.testMod...
'use strict'; var path = require('path'); var assert = require('yeoman-generator').assert; var helpers = require('yeoman-generator').test; var os = require('os'); describe('Craft Element Type:app', function () { before(function (done) { helpers.run(path.join(__dirname, '../generators/app')) .withOptions({...
const Schedule = require('node-schedule'); const request = require('superagent'); function startDingDingSchedule() { // 提醒打卡 let daKaRule = new Schedule.RecurrenceRule(); daKaRule.dayOfWeek = new Schedule.Range(1, 5); daKaRule.hour = 8; daKaRule.minute = 30; let daKaSchedule = Schedule.schedule...
exports.seed = (knex, Promise) => { return knex("dailyplans_events") .del() .then(() => { return knex("dailyplans_events").insert([ { id: 1, dailyplan_id: 1, event_time: "09:00:00", plan: "Stand Up & Challenge Warm Up" }, { id: 2...
/** * Data structure for a list of atoms */ function AtomList(molecule, atoms) { this.__init(molecule, atoms); } AtomList.prototype = { molecule: undefined, settings: undefined, cache: undefined, atoms: undefined, __init: function(molecule, atoms) { this.molecule = molecule; this.settings = mol...
//notimplemented.js // export class NotImplementedClass{ constructor(){ } }
angular.module("seForms.inputs.inlineedit", ["seEvents.seEventHelperService"]).directive("seInlineEdit", function($log, SeEventHelperService, $parse) { "use strict"; var uniqueFormName = 0; var SHOW_MODEL_VALIDATION_KEY = "showModelValidation"; var CHANGED_CELL_CLASS_NAME = "se-inline-edit-dirty"; function link(s...
/* eslint-disable prefer-destructuring */ /* eslint-disable no-unused-vars */ // Load global variables and functions const globals = require('../globals'); const postToInfluxdb = require('./post-to-influxdb'); const postToMQTT = require('./post-to-mqtt'); // -------------------------------------------------------- //...
/** * @ignore * auto scroll for drag object's container * @author yiminghe@gmail.com */ KISSY.add('dd/plugin/scroll', function (S, DD, Base, Node) { var DDM = DD.DDM, win = S.Env.host, SCROLL_EVENT = '.-ks-dd-scroll' + S.now(), RATE = [10, 10], ADJUST_DELAY = 100, DIFF =...
// ---------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. // ---------------------------------------------------------------------------- var expect = require('chai').expect, request = require('supertest-as-promised'), confi...
var express = require('express'); var path = require('path'); var favicon = require('serve-favicon'); var logger = require('morgan'); var bodyParser = require('body-parser'); var lessMiddleware = require('less-middleware'); var MongoClient = require('mongodb').MongoClient , assert = require('assert'); var host = pro...
var autoPrefixer = require('autoprefixer') var HtmlPlugin = require('./html-plugin') var atImport = require('postcss-import') var webpack = require('webpack') var jQuery = require('jquery') var precss = require('precss') var lodash = require('lodash') var customConfig = require('../../customConfig') module.exports = f...
module.exports = { entry: { 'vendor-a': ['jquery'], 'vendor-b': ['lodash'], 'vendor-c': ['moment'], main: './spa/scripts/vendor-main.js' }, optimization: { splitChunks: { maxInitialRequests: 4 } } };
var searchData= [ ['witness_417',['witness',['../classit_1_1unical_1_1mat_1_1parsers_1_1asp_1_1dlv_1_1DLVParser.html#a1e81927f79588e15a0e608ee60c48821',1,'it.unical.mat.parsers.asp.dlv.DLVParser.witness()'],['../classit_1_1unical_1_1mat_1_1parsers_1_1asp_1_1dlvhex_1_1DLVHEXParser.html#a62f464db12504b55ca1f475f12ac637...
import Vue from 'vue' import VueRouter from 'vue-router' Vue.use(VueRouter) const Log = { template: `<div class="log">id: {{ $route.params.id }}, type: {{ $route.params.type }}</div>` } const Logs = { template: ` <div> <pre id="params">{{ to.params }}</pre> <router-link :to="to" class="child-link...
// All code points in the Enclosed Alphanumerics block as per Unicode v5.0.0: [ 0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, 0x2468, 0x2469, 0x246A, 0x246B, 0x246C, 0x246D, 0x246E, 0x246F, 0x2470, 0x2471, 0x2472, 0x2473, 0x2474, 0x2475, 0x2476, 0x2477, 0x2478, 0x2479, 0x247...
import * as LoginStepTypes from './constants/auth-step-types'; export { default } from './component'; export { LoginStepTypes };
var methods = { // Straightforward recursive implementation. Exponential complexity. fibNaive: function(n) { var fib = methods.fibNaive; if (n < 2){ return n; } else { return fib(n - 2) + fib(n - 1); } }, // Memoized. Linear complexity. ...
/** * Test case for create. * Runs with mocha. */ 'use strict' const create = require('../lib/create.js') const assert = require('assert') const co = require('co') describe('create', function () { this.timeout(3000) before(() => co(function * () { })) after(() => co(function * () { })) it('Create'...
/*a b*/ 1
var x = (1 + 2) * 3;
module.exports = (function () { function ___generateNonLatinCode() { var str = "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΆΈΉΊΌΎΏαβγδεζηθικλμνξοπρστυφχψωάέήίόύώ"; var arr = []; str.split("").map(function (c) { var c16 = c.charCodeAt(0).toString(16); var c10 = c.charCodeAt(0).toString(...
import runloop from 'global/runloop'; import defineProperty from 'utils/defineProperty'; import getNewIndices from 'shared/getNewIndices'; import processWrapper from 'viewmodel/prototype/get/arrayAdaptor/processWrapper'; var patchedArrayProto = [], mutatorMethods = [ 'pop', 'push', 'reverse', 'shift', 'sort', 'splice...
/** * The archive processor interface * @constructor */ var ArchiveProcessor = function () { } /** * Processes the archive * @param {ProcessorContext} context - The processor context * @property {object} archive - The zip archive (see {@link https://www.npmjs.com/package/archiver}) * @property {ArchiveProcess...
/** * @copyright Copyright 2016 Kevin Locke <kevin@kevinlocke.name> * @license MIT */ 'use strict'; const Chalk = require('chalk').Instance; const { debuglog } = require('util'); const InvalidSlugError = require('./invalid-slug-error.js'); const Shortline = require('./shortline.js'); const SlugDetectionError = re...
var request = require('request'), j2h = require('json2html'), fs = require('fs'), url = require('url'), check = require('validator').check, w3url = 'http://validator.w3.org/check', uriOpt = '?uri=', fragmentOpt = '?fragment=', outputOpt = '&output=json', saveFolder = 'checked/', changedFolder = 'changed/', d...
x ^ y ^ z;
"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...
(function(app) { "use strict"; app.directive("rating", [function() { return { restrict: "A", link: function($scope, $element, $attrs) { $element.raty({ score: $attrs.rating, halfShow: true, readOnly: tr...
import {BaseTag} from './base-tag'; import {Delete} from './delete'; import {Device} from './device'; import {Ping} from './ping'; import {Properties} from './properties'; import {User} from './user'; export class Subgroup extends BaseTag { acceptTags = [Delete, Device, Ping, Properties, User]; name; construct...
var sysPath = require('path'); function ES6ModuleTranspiler(config) { var es6Cfg = (config != null && config.plugins != null && config.plugins.es6ModuleTranspiler); this.match = new RegExp((es6Cfg && es6Cfg.match) || /.*/); this.wrapper = es6Cfg && es6Cfg.wrapper && ('to' + es6Cfg.wrapper.toUpperCase()) || 'to...
/** * Diese Klasse stellt eine abstrakte isometrische Karte dar, von der alle * isometrischen Karten erben sollen. * * @author Phil * @package PureFW.IsoMap */ if (typeof(PureFW.IsoMap) != 'object') { PureFW.IsoMap = new Object(); } PureFW.IsoMap.Map = new Object(); // abstrakt => statisch /** * Abstract cl...
/** * @author * * 浏览器相关信息 */ var browser = { appCodeName : navigator.appCodeName,// 浏览器代码名称 appName : navigator.appName,// 浏览器的名称 appVersion : navigator.appVersion,// 浏览器的平台和版本信息 cookieEnabled : navigator.cookieEnabled,// 浏览器中是否启用cookie的布尔值 platform : navigator.platform,// 运行浏览器的操作系统平台 userAgent : navigator...
'use strict'; /** * Module dependencies. */ var _ = require('lodash'), glob = require('glob'); /** * Load app configurations */ module.exports = _.merge( require('./env/all'), require('./env/' + process.env.NODE_ENV) || {} ); /** * Get files by glob patterns */ module.exports.getGlobbedFiles = function(glob...
import Articles from "desktop/collections/articles.coffee" import footerItems from "desktop/apps/auction/utils/footerItems" import moment from "moment" import renderTestComponent from "desktop/apps/auction/__tests__/utils/renderTestComponent" import { cloneDeep } from "lodash" import { followedArtistSaleArtworks } from...
var Library = { movies: [], //list of movie addMovie: function (movie) { this.movies.push(movie); }, getAllMovies: function () { return this.movies; }, getMovieById: function (id) { return this.movies[id]; } }
var PHASE = require('GLOBAL/content/PhaseCode.js'); var path = window.SoundPath; var PHASESOUND = {}; PHASESOUND[PHASE.PREDAY] = new Howl({ src: [path+'sun_rise_wakeup.mp3'], loop: false, volume: 1 }); PHASESOUND[PHASE.PRENIGHT] = new Howl({ src: [path+'night2.mp3'], loop: false, volume: 1 }); ...
{ if (this.props.x === 488) { return null; } }
$(document).ready(function(){ // we can log hello world console.log("Hello world"); // we can also alert hello world alert("Hello world 2"); });
var ProductSchema = function( options, CoreSchema ){ var Schema = options.db.Schema; var productSchema = new CoreSchema({ 'key': { type: String, required: 'The key is required.' }, 'label': { type: String, required: 'The label field is required.' }, 'product_type': { type: String, required: 'The prod...
var expect = require('chai').expect; var ProcessonStrategy = require('../lib').Strategy; describe('Strategy', function() { it('should be named processon', function() { var strategy = new ProcessonStrategy({ clientID: 'id', clientSecret: 'sec' }, function() {}); expect(strategy.name).to.be.equ...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = doSeries; var _eachOfSeries = require('../eachOfSeries'); var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } fu...
var test = require('tape'); var isNan = require('./is-nan'); test('amp-is-nan', function (t) { t.ok(!isNan(undefined), 'undefined is not NaN'); t.ok(!isNan(null), 'null is not NaN'); t.ok(!isNan(0), '0 is not NaN'); t.ok(isNan(NaN), 'but NaN is'); t.ok(isNan(new Number(NaN)), 'wrapped NaN is still...
import React from 'react'; import { storiesOf } from '@kadira/storybook'; import 'normalize.css'; import Footer from '../index'; storiesOf('Footer', module) .add('default', () => ( <Footer /> ));
define(['backbone', 'config'], function(Backbone, Config){ var VoterModel = Backbone.Model.extend({ defaults:{ /* first_name: 'First Name', last_name: 'Last Name', date_of_birth: '0000-00-00', constituency: 'Constituency', description: 'Description'*/ ...
// LICENSE : MIT "use strict"; import React from "react" export default class VideoInputField extends React.Component { static get propTypes() { return { handleSubmit: React.PropTypes.func } } handleSubmit(event) { event.preventDefault(); var videoURL = React.fin...