code
stringlengths
2
1.05M
const { equal, deepEqual } = require("assert") const builds = ["es6", "es5"] builds.forEach((buildName) => { const generator = require(`../dist/${buildName}.umd`) describe(`[${buildName}] Generator`, () => { it("works with for/of", () => { const expected = [ [], [ "a" ], [ "b" ...
import React from "react"; import ReactDOM from "react-dom"; import injectTapEventPlugin from 'react-tap-event-plugin'; import App from "./components/app"; injectTapEventPlugin(); ReactDOM.render(<App />, document.getElementById("root"));
function getChild(model, db, row) { "use strict"; var res = { row: undefined, model: undefined }; if (model.extendedBy) { if (model.extendedBy.some(function(ext) { if (db[ext.model.tableName].get(row[ext.localField])) { res.model = ext.model; ...
import React from 'react' import { shallow } from 'enzyme' import Checkbox from '../Checkbox' describe('Checkbox', () => { let wrapper beforeEach(() => { wrapper = shallow(<Checkbox />) }) it('renders proper defaults if none passed', () => { expect(wrapper.prop('type')).toEqual('checkbox') expect...
'use strict'; var moment = require('moment'); /** * Logger-specific configuration */ module.exports = { express_format: ':date EXPRESS [:remote-addr] ":method :url HTTP/:http-version" :status ":referrer" ":user-agent"', custom_tokens: [{ token: ':date', replacement: function() { return moment().fo...
var pipeworks = require('pipeworks'); var StepRunner = module.exports = function(subject) { this.subject = subject; this.state = 'fresh'; // 'fresh', 'ready', 'done' this.pipeline = pipeworks(); }; StepRunner.prototype.run = function(cb) { if (this.state === 'fresh') { var self = this; this.subject.s...
const TM1637Display = require("../"); const Clk = 21; const DIO = 20; const t = new TM1637Display(Clk, DIO); const g = [ [0, 1, 2, 3], [1, 2, 3, 4], [2, 3, 4, 5], [5, 6, 7, 8], [6, 7, 8, 9], [7, 8, 9, 10], [8, 9, 10, 11], [9, 10, 11, 12], [10, 11, 12, 13], [11, 12, 13, 14], ...
Ext.widget({ xtype: 'mz-form-entity', title: 'Email', items: [ { fieldLabel: 'Email Subject', xtype: 'textfield', name: 'subject' }, { fieldLabel: 'Header html 1', xtype: 'taco-htmleditor', name: 'html_1' ...
/** * @fileoverview Provides constants. * */ goog.provide('ajs.constants'); ajs.constants.millisecondsInASecond = 1000; ajs.constants.daysInAYear = 365; ajs.constants.whiteSpace = " ";
const path = require( "path" ); const UglifyJSPlugin = require( "uglifyjs-webpack-plugin" ); const isProduction = false; const common = { output: { path: path.join( __dirname, "public/js" ), filename: "[name].js", chunkFilename: "[name].chunk.js" }, plugins: [ new UglifyJSP...
/* Template data: - item_type - item_show_type - item_model */ Template.show.helpers({ 'show_item': function() { return Template[this.item_type](this.item_model); } });
const _ = require('lodash'); /** * Validation helper which checks is value a number. In case it's not, throws error. * Otherwise does nothing. * * @throws {Error} - throws exception if validation failed * * @param {any} value - value received from json */ function shouldBeNumber(value) { checkType(value, 'n...
/* * Copyright (c) 2014 Adobe Systems Incorporated. All rights reserved. * * 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 ri...
/** * Image loading * @class ImageLoader * @param {Object} options * @param {Object} defaults * @constructor */ function ImageLoader(options, defaults) { var scope = this; /** * Unique ID * @type {number} */ scope.id; /** * Src attribute * @type {String} */ scope.src; /** * Allow ...
Animal = function() {} Animal.prototype.poop = function () { console.log('💩'); }; module.exports = Animal;
import reactRenderer from '../index'; test('it loads', () => { expect(reactRenderer.name).toBe('react'); });
import React from 'react'; import _ from 'lodash'; import util from 'util'; import ReplContext from '../common/ReplContext'; import repl from 'repl'; import {EOL} from 'os'; import shell from 'shell'; import ReplSuggestionActions from '../actions/ReplSuggestionActions'; import ReplActions from '../actions/ReplActions';...
"use strict"; class Lexer { constructor() { this.tokenFactories = []; } registerFactory(tokenFactory) { this.tokenFactories.push(tokenFactory); } createToken(index, value) { var tf = this.tokenFactories[index]; if (tf) { return tf.create(value); } ...
angular .module( 'site.home', [ 'ui.router' ]) .config(function config( $stateProvider ) { $stateProvider.state( 'home', { url: '/home', views: { "header": { controller: 'TopBarCtrl', templateUrl: 'topbar/topbar.tpl.html' }, "content": { c...
(function (Mnemonic) { describe('Mnemonic', function () { it('creates mnemonics of 32*n bits', function () { var m; m = new Mnemonic(32); expect(m.seed.length).toEqual(1); m = new Mnemonic(64); expect(m.seed.length).toEqual(2); m = ne...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const error_code_1 = require("../error_code"); const transaction_1 = require("./transaction"); class BlockExecutor { constructor(options) { this.m_storage = options.storage; this.m_handler = options.handler; this.m_...
var gulp = require('gulp'), requireDir = require('require-dir'), tasks = requireDir('./gulp-data', {recurse: true}), runSequence = require('run-sequence'), livereload = require('gulp-livereload'); //Default gulp.task('default', ["build"]); //Clean gulp.task('clean', ...
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import ReactDOM from 'react-dom'; import Button from './../../src/components/Button'; import { BUTTON_WARNING_LABEL_MISSING } from './../../src/components/Button'; describe('<Button>', () => { it('Should be element type button', () =>...
(function (angular) { "use strict"; angular .module("app.category") .controller("CategoryEditController", CategoryEditController); CategoryEditController.$inject = ["categoryService", "$state", "$stateParams", "$window"]; function CategoryEditController(categoryService, $state, $stateP...
const assert = require('assert'); const request = require('supertest'); const when = require('after'); const helper = require('./helper'); describe('subsequent access(with cookie)', () => { it('should load session from cookie sid', (done) => { const app = helper.createApp(); let count = 0; app.use((req,...
'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; $provide.value("$locale", { "DATETIME_FORMATS": { "AMPMS": [ "vm.", "nm." ], "DAY": [ "Sondag",...
import { registerComponent } from 'nornj'; import Skeleton from 'antd/lib/skeleton'; registerComponent({ 'ant-Skeleton': Skeleton }); export default Skeleton;
QUnit.module("DataWatcher"); //Node support if (typeof module === "object") { var DataWatcher = require("../DataWatcher"); } QUnit.test("Simple object", function() { expect(16); var struct = { foo: 1, bar: 2 }, w = new DataWatcher(struct), data = w.getData(); w.watch("*", function (e) { if (e.pa...
export default { settings: { test: { node: { entry: undefined, tests: { pattern: '**/*.test.js', path: 'tests', }, src: { path: 'src', pattern: '**/*.js...
'use strict'; require('./gulp');
'use strict'; describe('Directive: oauthButtons', function() { // load the directive's module and view beforeEach(module('angularFullstackApp')); beforeEach(module('components/oauth-buttons/oauth-buttons.html')); var element, parentScope, elementScope; var compileDirective = function(template) { injec...
function last() { var my_id = document.getElementById('my_id').value; var u_id = document.getElementById('u_id').value; //var lst_id = $(".chip").attr(); $.ajax({ url: "http://chat.com/last", type: 'POST', data: {'my_id': my_id, 'u_id': u_id}, success: function(data) { var arr = $.parseJSON(dat...
$(document).ready(function(){ $(document).knot(model); progress.init('#progressui'); editor.init(); filetray.init('#filetrayui'); filetray.listFiles(); }); var model = { files: [ /*{name: 'file1', ext: 'png'}, {name: 'file2', ext: 'jpg'}, {name: 'file3', ext: 'cs'}, {name: 'folder1', ext: ''},*/ ...
var mongoose = require('mongoose'); module.exports = function(app) { var users = require('../../app/controllers/users'); var bios = require('../../app/controllers/bios'); var projects = require('../../app/controllers/projects'); var jobs = require('../../app/controllers/jobs'); var stories = requi...
$(document).on('page:change', function(event) { $(document).ready(function() { $(document).on('click', '.reveal', function() { var $this = $(this); $this.fadeOut('fast', function() { $this.closest('td').find('.reward').fadeIn('slow').show(); $this.replaceWith(); }); }); });...
import Logger from 'ember-metal/logger'; import { deprecate } from 'ember-metal/debug'; import { registerHandler as genericRegisterHandler, invoke } from 'ember-debug/handlers'; export function registerHandler(handler) { genericRegisterHandler('warn', handler); } registerHandler(function logWarning(message, options...
// Copyright 2011 Joshua Wang, MIT License /** * @fileoverview class Stock * @author sharkman.jw@gmail.com (Joshua Wang) */ function Stock(symbol, exchange, name, name) { this.symbol = symbol; // string this.exchange = exchange; // string this.name = name; // string this.type = name; // string ...
import { setData } from '@progress/kendo-angular-intl'; setData({ name: "ko", likelySubtags: { ko: "ko-Kore-KR" }, identity: { language: "ko" }, territory: "KR", numbers: { symbols: { decimal: ".", group: ",", list: ";", ...
/* ************************************************************************ Copyright: 2013 Hericus Software, LLC License: The MIT License (MIT) Authors: Steven M. Cherry ************************************************************************ */ /** * This class is the base class for all of our Hub Unit/Gui test...
(function (window, undefined) { var CallbackList = function () { var state, list = []; var exec = function ( context , args ) { if ( list ) { args = args || []; state = state || [ context , args ]; for ( var i = 0 , il = list...
module.exports = class { onFileClick(e) { e.preventDefault(); const dataset = Object.keys(e.target.dataset).length ? e.target.dataset : Object.keys(e.target.parentNode.dataset).length ? e.target.parentNode.dataset : Object.keys(e.target.parentNode.parentNode.dataset).length ? e.target.parentNode.par...
// @flow import _ from 'lodash-es'; import React from 'react'; import { Field, FieldArray, Fields, FormSection, reduxForm } from 'redux-form'; import { mapConditions } from '~/enums/conditions'; import { type Lookups } from '../../modules/spotEdit'; import { SchoolsField } from './SchoolsField'; import { PhotosField } ...
'use strict' var ejs = require('ejs') var heredoc = require('heredoc') var tpl = heredoc(function() {/* <xml> <ToUserName><![CDATA[<%= toUserName %>]]></ToUserName> <FromUserName><![CDATA[<%= fromUserName %>]]></FromUserName> <CreateTime><%= createTime %></CreateTime> <MsgType><![CDATA[<%= msgType %>]]></Msg...
/* jshint node: true */ 'use strict'; var BowerJson = require('./bower-json.js'), PackageJson = require('./package-json.js'); function ConfigJsonFactory() {} ConfigJsonFactory.prototype = (function () { /** * Creates a new ConfigJson. * It will be a instance of BowerJson or PackageJson, depending on th...
var io, socket let p5App = new window.p5(app) function app(p){ const size = 500 let controller = newController(size,p) let padding = 20 //p5 calls setup automatically (once) p.setup = () => { let canvas = p.windowWidth < size + 2 * padding? ( controller.setSize(p.windowWidth - padding), ...
// Generated by CoffeeScript 1.6.3 (function() { var addersubber, enders, flatSplat, helpers, inDir, inLib, misc, moment, momentous, oneRand, partial2, path, predicates, printem, randDates, randoms, reverse2, selectors, sorters, starters, toStrings, _, _ref, __slice = [].slice; moment = require("moment"); _...
module.exports = function (config) { config.set({ basePath: './', frameworks: ['jasmine'], files: [ 'app/**/*.spec.js', 'app/app.module.js', 'app/**/*.html' ], reporters: ['progress'], logLevel: config.LOG_INFO, autoWatch: false, browsers: ['PhantomJS'/*, 'Chrome'*/],...
define(['backbone', 'core/router'], function (Backbone, Router) { describe('Router', function () { it('→ exits', function () { expect(new Router()).not.toBeUndefined(); }); describe('→ is passed model', function () { it('→ exits', function () { expect((new Router()).model).not.toBeUnd...
//! TWIGGER - Backend - MIT Licence - Copyright (c) 2017 Mesbah Mowlavi <http://m.mowlavi.ca/> const Sanitize = require('./sanitize') const IS_OPTIONAL_CHAR = '~' const IS_REQUIRED_CHAR = '*' class APIExpect { constructor (options) { options = options || {} this.defaultOptional = options.defaultOptional ||...
!function(e){"use strict";e.fn.select2.locales.ro={formatNoMatches:function(){return"Nu a fost g\u0103sit nimic"},formatInputTooShort:function(e,t){var n=t-e.length;return"V\u0103 rug\u0103m s\u0103 introduce\u021bi inc\u0103 "+n+" caracter"+(1==n?"":"e")},formatInputTooLong:function(e,t){var n=e.length-t;return"V\u010...
/** * @ngdoc service * @name patternfly.notification.Notification * @requires $rootScope * * @description * Notification service used to notify user about important events in the application. * * ## Configuring the service * * You can configure the service with: setDelay, setVerbose and setPersist. * * ### ...
"use strict"; const ROUND_DURATION = 10000; const WAIT_DURATION = 2000; const TRIVIA_FILE = "data/trivia.json"; const TriviaManager = require("../trivia-manager"); exports.game = "trivia"; exports.aliases = ["triv"]; const Trivia = new TriviaManager(TRIVIA_FILE); class TriviaGame extends Rooms.botGame { constr...
var MongoClient = require('mongodb').MongoClient; var db = null; MongoClient.connect("mongodb://localhost:27017/voting-app", function(err, database) { if (err) throw err; console.log("Successfully connected to the database."); db = database; }); module.exports = { getDB : function () { if (d...
'use strict'; //Orgs service used to communicate Orgs REST endpoints angular.module('orgs').factory('Orgs', ['$resource', function($resource) { return $resource('orgs/:orgId', { orgId: '@_id' }, { update: { method: 'PUT' } }); } ]);
let _ = require('lodash') let missingSupport = require('./missing-support') let Detector = require('./detect-feature-use') function doiuse (options) { let browserQuery = options.browsers let onFeatureUsage = options.onFeatureUsage if (!browserQuery) { browserQuery = doiuse['default'].slice() } let cb = ...
Router.configure({ layoutTemplate: 'layout', notFoundTemplate: 'notFound', loadingTemplate: 'loading', });
/*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2015 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ // Provides control sap.ui.core.HTML. sap.ui.define(['jquery.sap.global', './Control', './RenderManager', './library'], function(jQu...
/* eslint-disable no-undef */ import { GraphQLObjectType, GraphQLNonNull, GraphQLList, GraphQLID, GraphQLString, GraphQLInt } from 'graphql'; import * as ArticleServices from './ArticleServices'; import { ArticleStatusEnum } from './ArticleEnums'; const CollectionType = new GraphQLObjectType({ name: 'Co...
import { Meteor } from 'meteor/meteor'; import { Template } from 'meteor/templating'; import { Session } from 'meteor/session'; import { Tracker } from 'meteor/tracker'; import _ from 'underscore'; import Tables from '/imports/collections/tables'; import { addUserMessage, createErrorDiv, initDraggables, ...
(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...
(function() { 'use strict'; angular .module('catalogue.home', [ 'ionic', 'ngCordova', 'catalogue.common' ]) .config(function($stateProvider) { $stateProvider .state('app.home', { url: '/home', views: { 'menuContent': { templateUrl: 'scripts/home/home.html', control...
/** * Created by zaiseoul on 16/1/18. */ $(function(){ var viewConfig = { reference : $('#title_parent .control-label'),//排版参照物 height : (AutoLayout.CONST.height.default * 6) //强制设置高度 }; //设置 销售价(RMB)、销售价(KR)约束 var AutoLayout1 = new AutoLayoutObject("form", viewConfig, [ ...
import React from 'react'; import PropTypes from 'prop-types'; export default function CarouselControl({ children, style, direction, onClick, onKeyDown }) { return ( <a className={`carousel__control carousel__control--${ direction }`} role="button" style={style} onClick={onClick} onKeyDow...
var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Controller = require('./Controller'); var RestController = (function (_super) { __extends(Re...
import jQuery from 'jquery'; import angular from 'angular'; import _datePicker from 'jquery-ui/datepicker'; // sets up jQuery with the datepicker plugin export default angular.module('ui.date', []) .constant('uiDateConfig', {}) .constant('uiDateFormatConfig', '') .factory('uiDateConverter', ['uiDateFormatConfig'...
// write out all texas gauges as a geojson feature collection var JSONStream = require('JSONStream'); var featurecollection = require('turf-featurecollection') var es = require('event-stream'); var nwsGauges = require('../index.js'); nwsGauges.stream('tx') .pipe(nwsGauges.geojsonify({style: true})) .pipe(es.writ...
version https://git-lfs.github.com/spec/v1 oid sha256:3ab2df98cb7f74f1b766a0b3270d39d96bbb88b622d33a4a94ea0686bf48af60 size 6096
var express = require('express'); var path = require('path'); var PORT = 8080; var app = express(); app.use('/dist', express.static(path.join(__dirname, '/dist'))); app.use(express.static(__dirname)); app.listen( PORT, function(err, res){ console.log('Server listens to port ' + PORT + '...'); });
/* global describe beforeEach it */ var proxyquire = require('proxyquire') var sinon = require('sinon') var supertest = require('supertest') var expect = require('chai').expect var express = require('express') var bodyParser = require('body-parser') var rest = require('../../lib/rest') describe('index', function () { ...
'use strict'; var path = require('path'); const app = require('express')(); const bodyParser = require('body-parser'); const mongoose = require('mongoose'); const PORT = process.env.PORT || 3000; //have to have process.env.PORT for heroku to work - uses random port; const MONGODB_HOST = process.env.MONGODB_HOST || ...
/** * @constructor * @description 可以通过 window.getComputedStyle 获取 - 计算样式的属性是只读 - 计算样式的值是绝对值【会将百分比和点之类相对的单位全部转换成绝对值】,所有指定尺寸的属性都会有一个以像素为度量单位的值,颜色的属性将会以 rgb 或 rgba 的格式返回 - 不会计算符合属性,只基于最基础的属性[chrome43已经可以获取组合属性] - 计算样式的 cssText 属性未定义 - 计算样式与 style{@link HTMLElement.style} 获取不同,[实例](../../example/javascript/CSSModule...
/* Problem 5. Selection sort Sorting an array means to arrange its elements in increasing order. Write a script to sort an array. Use the selection sort algorithm: Find the smallest element, move it at the first position, find the smallest from the rest, move it at the second position, etc. Hint: Use a se...
game.PlayScreen = me.ScreenObject.extend({ onResetEvent: function() { var levelname = "level0"+game.data.level; me.levelDirector.loadLevel(levelname); game.data.scrollVel = game.data.scrollVelStart-(game.data.level/10); this.HUD = new game.HUD.Container(); me.game.world.add...
let lastErr = null let lastPromise = null export function lintJson (CodeMirror) { CodeMirror.registerHelper('lint', 'json', lint) } export function setError (err) { lastErr = err ? [ { from: window.CodeMirror.Pos(err.line, 0), to: window.CodeMirror.Pos(err.line, 0), message: err.message ...
(function (factory) { /* global define */ if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['jquery'], factory); } else if (typeof module === 'object' && module.exports) { // Node/CommonJS module.exports = factory(require('jquery')); } else { ...
/** * Created by wangyefeng on 02/03/2017. */ // navigator height 48px import React from 'react' import { hashHistory } from 'react-router' import { connect } from 'react-redux' import Header from '../container/navigator/header' import './navigator/header.css' class Navigator extends React.Component { static prot...
// All symbols in the Combining Diacritical Marks Supplement block as per Unicode v5.2.0: [ '\u1DC0', '\u1DC1', '\u1DC2', '\u1DC3', '\u1DC4', '\u1DC5', '\u1DC6', '\u1DC7', '\u1DC8', '\u1DC9', '\u1DCA', '\u1DCB', '\u1DCC', '\u1DCD', '\u1DCE', '\u1DCF', '\u1DD0', '\u1DD1', '\u1DD2', '\u1DD3', '\u1DD4...
import Value from '../models/value' /** * Changes. * * @type {Object} */ const Changes = {} /** * Set `properties` on the value. * * @param {Change} change * @param {Object|Value} properties * @param {Object} options */ Changes.setValue = (change, properties, options = {}) => { properties = Value.create...
(function () { 'use strict'; function data($http, $q, notifier, baseServiceUrl) { function get(url, queryParams) { var defered = $q.defer(); $http.get(baseServiceUrl + '/' + url, { params: queryParams }) .then(function (response) { defered.re...
import MagicString from 'magic-string'; import parse from './utils/parse'; import patchCommas from './patchers/patchCommas'; import patchComments from './patchers/patchComments'; import patchDeclarations from './patchers/patchDeclarations'; import patchEmbeddedJavaScript from './patchers/patchEmbeddedJavaScript'; impor...
/* eslint strict: 0 */ 'use strict'; process.env.NODE_ENV = process.env.NODE_ENV || 'production'; const path = require('path'); var _ = require('lodash'); var Job = require('./jobs/jobs'); var RepositoryProcess = require('./process/RepositoryProcess'); const electron = require('electron'); const app = electron.app;...
'use strict'; angular.module('mean.system').service('Places', ['$log', '$resource', '$http', '$location', '$q', function($log, $resource, $http, $location, $q) { var savedResults = {}; var savedQuery = {}; var fetching = false; return { getData: function() { return savedResults; ...
ET.Cities = Backbone.Collection.extend({ /* * List of cities. */ model : ET.City, url : 'res/stats/cities.json', //TODO do the headquarters fns make more sense as part of career? /** * Returns the City object representing the player's headquarters */ getHeadquarters : function() { return this.findWh...
/* --- name: omniGrid description: Advanced DataGrid for Mootools version: 1.2.6 copyright: Marko Šantić (http://www.omnisdata.com/omnigrid) license: MIT License authors: - Marko Šantić (marko@omnisdata.com) requires: Core/1.2.4: '*' More/1.2.4.4: [Fx.Scroll, Drag] provides: [omniGrid] ... */ var omniG...
/* jshint node:true */ /*global describe:true, it:true, before:true, beforeEach:true */ "use strict"; // # Tests for mongo-concept-network-state module // ## Required libraries var assert = require('assert'); // Module to test var ConceptNetwork = require('../lib/mongo-concept-network').ConceptNetwork; var ConceptNe...
process.env.NODE_ENV = (process.env.NODE_ENV || 'development').trim(); import path from 'path'; import { argv } from 'yargs'; const config = new Map(); // ------------------------------------ // Environment // ------------------------------------ config.set('env', process.env.NODE_ENV); config.set('globals', { ...
module.exports = function() { return { module: { rules: [ /** * ``` * npm i file-loader --save-dev * ``` * * Instructs webpack to emit the required object as file and to return its public URL ...
/** * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'language', 'it', { button: 'Imposta lingua', remove: 'Rimuovi lingua' } );
"use strict"; app.config(['$stateProvider', '$locationProvider', function ($stateProvider, $locationProvider) { // 设定路由 $stateProvider .state('otherAProduct', { //app首页 url: "/others/A", templateUrl: "pages/others/A/a.html", controller: "otherAProductController" ...
test('.lg()', 8, function () { equal(MathLib.lg(1), 0, 'MathLib.lg(1) should be 0'); equal(MathLib.lg(10), 1, 'MathLib.lg(10) should be 1'); equal(MathLib.lg(+Infinity), +Infinity, 'MathLib.lg(+Infinity) should be +Infinity'); equal(MathLib.lg(+0), -Infinity, 'MathLib.lg(+0) should be -Infinity'); equal(MathLib.lg...
module.exports = function (value, settings) { let text = `Volume: ${value}` return [{ 'fallback': text, 'color': settings.color, 'title': text }] }
var $M = require("@effectful/debugger"), $x = $M.context, $ret = $M.ret, $unhandled = $M.unhandled, $brk = $M.brk, $mcall = $M.mcall, $m = $M.module("file.js", null, typeof module === "undefined" ? null : module, null, "$", { __webpack_require__: typeof __webpack_require__ !== "undefined" && _...
//>>built define("epi/clientResourcesLoader",["epi","dojo"],function(_1,_2){var _3={},_4={};_1.clientResourcesLoader={_loadStyles:function(_5){if(!_2.isArray(_5)){return;}_2.forEach(_5,function(_6){var _7=_6.toLowerCase();if(!(_7 in _3)){var _8=_2.query("head")[0];_2.create("link",{rel:"stylesheet",type:"text/css",href...
module.exports = { 'url': 'mongodb://localhost:27017/authentication' }
'use strict'; require('should'); var path = require('path'), influxService = require(path.resolve('./modules/core/server/services/influx.server.service')), config = require(path.resolve('./config/config')); describe('Service: influx', function() { context('InfluxDB disabled', function () { var origina...
import WaveSurfer from '../wavesurfer/wavesurfer.js'; import TimelinePlugin from '../wavesurfer/plugin/timeline.js'; import RegionPlugin from '../wavesurfer/plugin/regions.js'; import FileDownloader from './fileDownloader.js'; export default class WaveList { constructor(params) { this.waveformId = 0; ...
/* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'image2', 'nb', { alt: 'Alternativ tekst', btnUpload: 'Send det til serveren', captioned: 'Bilde med bildetekst', infoTab: 'Bildeinformasj...
import {expect} from 'chai'; import {packColorLE, packColorBE, unpackColorLE, unpackColorBE} from '../../src/video/colors'; describe('video/colors', () => { it('packs color', () => { expect(packColorLE(0x12, 0x34, 0x56, 0x78)).to.equal(0x78563412); expect(packColorBE(0x12, 0x34, 0x56, 0x78)).to.equal(0x12345...
import { moduleForModel, test } from 'ember-qunit'; moduleForModel('gpa', 'Unit | Model | gpa', { // Specify the other units that are required for this test. needs: [] }); test('it exists', function(assert) { let model = this.subject(); // let store = this.store(); assert.ok(!!model); });
Map = {}; // Store the sizes Map.width = 0; Map.height = 0; // Store the map data Map.data = []; Map.sprites = []; // Expose map access through an API. Map.setSize = function(w, h) { this.width = Math.max(w, 0); this.height = Math.max(h, 0); this.data = []; for (var y = 0; y < h; y++) for (var x = 0; x < ...