code
stringlengths
2
1.05M
/** * Simple linked list node * @param {any} data Any value * @param {Node} next Link to next node */ class Node { constructor(data = null, next = null) { this.data = data; this.next = next; } } module.exports = exports = Node;
Meteor.publish('finances', function() { return Finances.find(); });
import React from 'react'; import PropTypes from 'prop-types'; import remark from 'remark'; import {isUndefined} from 'lodash'; import slug from 'remark-slug'; import ghSlugs from 'github-slugger'; import remarkReact from 'remark-react'; import {Element} from 'react-scroll'; import {Link} from 'react-router-dom'; impor...
(function() { 'use strict'; angular.module('jwt') .factory('jwtRestangular', jwtRestangular) .factory('noTokenRestangular', noTokenRestangular); /** @ngInject */ function jwtRestangular(Restangular, $sessionStorage, appConfig, $window) { return Restangular.withConfig(function(Re...
version https://git-lfs.github.com/spec/v1 oid sha256:002b49e48e55b1804abcec8c833836c8696df57d31a6d76efcb5ac7e116e4c5d size 193107
jQuery(document).ready(function ($) { envADSR = new ADSR; document.getElementById("ratioASlider").value = Math.log(0.5 * 1000 + 1) * 200.0 / 12.0; document.getElementById("ratioDRSlider").value = Math.log(0.0001 * 1000 + 1) * 200.0 / 12.0; drawAllADSR(); }); function drawAllADSR() { envADSR.setAtt...
var path = require('path'); var fs = require('fs'); // hide warning // var emitter = require('events'); emitter.defaultMaxListeners = 20; var appRoot = 'src/'; var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8')); var paths = { root: appRoot, source: appRoot + '**/*.js', html: appRoot + '**/*.html'...
var tools = require('./tools') var Job = require('../../tools/job') var getCandidatesForJob = require('./getcandidates') var pickServerFromCandidates = require('./pickserver') var filterCandidatesForDuplicates = require('./filterduplicates') // temporarily record the state so the next allocation has a good picture // t...
import React from 'react' const Todo = ({text, completed, onClick}) => ( <li style={{ textDecoration: completed ? 'line-through' : 'none' }} onClick={onClick} > {text} </li> ) export default Todo
ScalaJS.is.scala_collection_TraversableViewLike$Forced = (function(obj) { return (!(!((obj && obj.$classData) && obj.$classData.ancestors.scala_collection_TraversableViewLike$Forced))) }); ScalaJS.as.scala_collection_TraversableViewLike$Forced = (function(obj) { if ((ScalaJS.is.scala_collection_TraversableViewLike$...
'use strict'; angular.module('wateringApp') .factory('SensorsFactory', function ($resource) { return $resource('/api/sensor', {}, { query: { method: 'GET' }, create: { method: 'POST' } }) }) .factory('SensorFactory', function ($resource) { return $resource('/api/sensor/:id', {}, { s...
const gulp = require('gulp'); const autoprefixer = require('gulp-autoprefixer'); const concat = require('gulp-concat'); const cssnano = require('gulp-cssnano'); const sass = require('gulp-sass'); var browserSync = require('browser-sync').create(); var sourcemaps = require('gulp-sourcemaps'); const image = require('gulp...
const Utilities = require('../src/utilities') const assert = require('assert') describe('isString', () => { it('should determine if the given string parameter is a string', () => { var isString = Utilities.isString('string') assert.equal(true, isString) }) it('should determine if the given non-string pa...
/*! networking definitions for skybox interfacing 2014-6-16 * This includes websockets and POST functions * * @author ndepalma * skybox_network.js * Licensed MIT */ ////////////////////////////////////////// // Global Host ////////////////////////////////////////// // which server to point to - localhost for debuggin...
'use strict'; var fetchRequest = function (method, url, requestData, callback) { var config = { method: method, headers: { 'Accept': 'application/json', 'Content-Type': 'application/json', } }; if (requestData) { config.body = JSON.stringify(requestData); } fetch(url, config).then...
import React from 'react'; import InputArea from 'wix-style-react/InputArea'; const style = { display: 'inline-block', padding: '0 5px', width: '200px', lineHeight: '22px' }; export default () => <div style={{display: 'flex'}}> <div className="ltr" style={style}>InputArea<br/><InputArea resizable/></div...
// label module.exports = { type: { flow : true, phrasing : true, interactive: true }, contents: { ng : 'label', phrasing: true }, attributes: 'for,form' };
var morgan = require('morgan'); var bodyParser = require('body-parser'); var methodOverride = require('method-override'); var qs = require('qs'); var parseurl = require('parseurl'); var config = require('../lib/config'); var log = require('../lib/log'); var middlewareLogger = function...
version https://git-lfs.github.com/spec/v1 oid sha256:5d42507f9ec9bde7a602697ff4f52558fefcbaa49664e6505083fc2ad92e07d0 size 365002
function between(x, min, max) { return x >= min && x <= max; } function changeRate(sound, rateStart, rateEnd, duration) { let counter = rateStart; if (rateStart < rateEnd) { const timer = setInterval(() => { sound.rate(counter.toFixed(2)); counter += rateEnd / duration; if (counter >= rat...
var compareTree = require('./_utils').compareTree; var _i = require('./_utils')._i; var _root = require('./_utils')._root; var node = require('./_utils').node; describe('Conditional parser', function() { it('should parse simple blocks', function() { compareTree( 'if(x) {foo();}', ...
var MAX_DISPLAY_LINES = 5; var LINE_HEIGHT = 75; var DELAY = { PAGE: 1000, CHAPTER: 2000 }; c.font = '36px Papyrus, fantasy'; // Text is an array of strings. // Example: ['one string', 'two string', 'three string', 'four'] function writeText(x, y, lineHeight, text) { c.fillStyle = '#001f3f'; c.fillRect(0, 0, a...
import babel from 'rollup-plugin-babel'; import resolve from 'rollup-plugin-node-resolve'; import commonjs from 'rollup-plugin-commonjs'; import uglify from 'rollup-plugin-uglify'; const production = !process.env.ROLLUP_WATCH; export default { input: 'src/index.js', output: { file: 'index.js', ...
import React, { Component } from "react"; import GridContainer from "./components/GridContainer"; import TileContainer from "./components/TileContainer"; import GameManager from "./GameManager"; require("../assets/main.scss"); export default class App extends Component { constructor(props) { super(props); ...
'use strict'; var userInfo = { OAuth: '', currentUser: '', userID: '' }; $('.twitch-connect').click(function () { window.location='https://api.twitch.tv/kraken/oauth2/authorize?response_type=code&client_id=pxic46d4dsydwhxvlh341kb7dgdnc6&redirect_uri=https://bittoolscod301.herokuapp.com&scope=user_read+channel...
import React, { PropTypes } from 'react' export const Intro = (props) => ( <article className="ContentBlock Intro"> <h2>{props.heading}</h2> <p>{props.children}</p> </article> ) Intro.propTypes = { heading: PropTypes.string.isRequired } export const Horz = (props) => ( <article className="Conten...
"use strict"; // Run me with Node to see my output! let util = require("util"); let P = require(".."); /////////////////////////////////////////////////////////////////////// // -*- Parser -*- let Lang = P.createLanguage({ s0: () => P.regexp(/[ ]*/), s1: () => P.regexp(/[ ]+/), Whitespace: () => P.regexp(/[ ...
const uuid = { _regex: { default: /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/ }, default: context => { if (context.value === null || context.value && !context.value.toString().match(uuid._regex.default)) { context.fail('Value must be a valid UUID') } } } module...
(function($){ var cache = [], timeout; $.fn.remove = function(){ return this.each(function(element){ if(element.tagName == 'IMG'){ cache.push(element); element.src = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs='; if (timeout) clearTimeout(timeout); timeout =...
var elixir = require('laravel-elixir'); var gulp = require('gulp'); var jade; var rename = require('gulp-rename'); var plumber = require('gulp-plumber'); var notify = require('gulp-notify'); var changed = require('gulp-changed'); var jadeInheritance = require('gulp-...
/* * Copyright (c) 2013 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 rights...
// Use the function below in the main browser thread, as the handler // for message events from the Caffeine worker. You can post messages // to Caffeine with the worker's postMessage() function. Caffeine // responds with message events. // // In Caffeine's "Tether" protocol, the browser is the first side to // speak, ...
'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": [ "dop.", "odp." ], "DAY": [ "ned\u011ble", ...
ig.module( 'game.entities.title-alt' ) .requires( 'plusplus.core.config', 'plusplus.core.entity' ) .defines(function () { "use strict"; var _c = ig.CONFIG; /** * Alt title for Impact++. * @class * @extends ig.EntityExtended ...
module.exports = function(grunt) { grunt.initConfig({ jshint: { files: ['*.js', 'lib/*.js', 'public/js/*.js'] } }); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.registerTask('test', ['jshint']); grunt.registerTask('default', ['jshint']); };
define(["react", "immutable", "vector", "game/world", "game/tile", "ai/heatmapper2"], function (React, Immutable, Vector, World, GTile, AI) { "use strict"; var IMequals = function (a, b) { return Immutable.is(Immutable.fromJS(a), Immutable.fromJS(b)); }; var PureRenderMixin = { shouldC...
import { resolve } from 'path'; import { getIfUtils, removeEmpty } from 'webpack-config-utils'; import webpack, { ContextReplacementPlugin } from 'webpack'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import ProgressBarPlugin from 'progress-bar-webpack-plugin'; import ExtendedDefinePlugin from 'extended-define...
'use strict'; angular.module('giv2givApp') .factory('donor', function ($resource, appConfig) { var url = appConfig.apiUrl; var endpoint = "/donors.json" return $resource(url + endpoint); });
'use strict'; var UserTokens = require('./userTokens'); module.exports = function(){ var userTokens = new UserTokens(); return { _connections : {}, _userTokens : userTokens, put : function(user, token , type, connection){ this._userTokens.put(user, token); this._connections[token] = { type : type, ...
var gulp = require('gulp'); var fs = require('fs'); var watch = require('gulp-watch'); var livereload = require('gulp-livereload'); var spawn = require('child_process').spawn; var gutil = require('gulp-util'); gulp.task('default', function() { console.log('Default Gulp'); }); gulp.task('server', function() { cons...
module.exports = function (app, db) { return function (opts) { var middleware = function (req, res, next) { if (opts.whitelist && opts.whitelist(req)) return next() opts.lookup = Array.isArray(opts.lookup) ? opts.lookup : [opts.lookup] opts.onRateLimited = typeof opts.onRateLimited === 'function...
// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.16/esri/copyright.txt for details. //>>built define("require exports ./nextTick ./libs/gl-matrix-2/mat3f64 ./libs/gl-matrix-2/mat4f64 ./libs/gl-matrix-2/quatf64 ./libs/gl-matrix-2/vec2f64 ./libs/gl-matrix-2/v...
define(['mn', 'text!templates/setting/membershipItem.html', 'alertify' ], function(Mn, template,alertify) { var MembershipItem = Mn.ItemView.extend({ template: function(model) { return _.template(template, { model: model }) }, ui:{ ...
export const centerGameObjects = (objects) => { objects.forEach(function (object) { object.anchor.setTo(0.5) }) } export const shuffle = (arr) => { let j = 0 for (let i = arr.length - 1; i > 0; i--) { j = Math.floor(Math.random() * (i + 1)) swap(arr, i, j) } } export const swap = (arr, i, j) =>...
/** * The copyright in this software is being made available under the BSD License, * included below. This software may be subject to other third party and contributor * rights, including patent rights, and no such rights are granted under this license. * * Copyright (c) 2013, Dash Industry Forum. * All rights re...
export let EntityMethod = class EntityMethod { constructor(source, name) { this.source = source; this.name = name; } execute(params, options) { return new Promise((resolve, reject) => { this.source.__queueRequest(done => { let entity = this.source.ent...
//============================================================================ /* // Sky Generator 1.3 - an HTML generator inspired by Emmet // Copyright (c) 2014, Ilia Yatchev (MIT Licensed) // https://github.com/IliaSky/skygenerator */ //=======================================...
var proxyquire = require('proxyquire').noCallThru(); var sinon = require('sinon'); var expect = require('chai').expect; describe('check factory', function() { it('returns a default check if non specified', function() { var factory = require('../checks'); var checker = factory.create(); expe...
module.exports = (function () { var PI2 = Math.PI * 2; return { normalizeRadian: function(angle) { angle %= PI2; if (angle < 0) { angle += PI2; } return angle; } }; })();
#!/usr/bin/env node const path = require('path'); const fs = require('fs'); const pkg = require( path.join(__dirname, 'package.json') ); const server = require('./dist/server'); const program = require('commander'); program.version(pkg.version) .option('-c --config <config>', 'config file for mongodb backup man...
'use strict'; /* eslint comma-dangle:[0, "only-multiline"] */ module.exports = { client: { lib: { css: [ // bower:css 'public/lib/bootstrap/dist/css/bootstrap.css', //'public/lib/bootstrap/dist/css/bootstrap-theme.css', 'public/lib/angular-ui-notification/dist/angular-ui-no...
'use strict'; import angular from 'angular'; import ngRouter from 'angular-route'; import pagesRouter from './pagesRouter'; import MainPageCtrl from './controllers/MainPageCtrl'; /* Module of static pages without complex logics */ export default angular.module('app.pages', [ngRouter]) .config(pagesRouter)...
'use strict'; class SomeMod3 { constructor(someMod4) { console.log('Creating SomeMode3'); } callMe() { console.log('show me some thing'); } } module.exports = SomeMod3;
/** * Copyright (c) 2008-2011 The Open Planning Project * * Published under the BSD license. * See https://github.com/opengeo/gxp/raw/master/license.txt for the full text * of the license. */ /** api: (define) * module = gxp * class = LayerUploadPanel * base_link = `Ext.FormPanel <http://extjs....
/* Ship.js KC3改 Ship Object */ (function(){ "use strict"; var deferList = {}; window.KC3Ship = function( data ){ // Default object properties included in stringifications this.rosterId = 0; this.masterId = 0; this.level = 0; this.exp = [0,0,0]; this.hp = [0,0]; this.afterHp = [0,0]; ...
'use strict'; /** * Module dependencies */ var _ = require('lodash'), path = require('path'), mongoose = require('mongoose'), util = require('util'), Listing = mongoose.model('Listing'), Category = mongoose.model('Category'), // emails = require(path.resolve('./modules/emails/server/controllers/emails.se...
/* eslint-disable object-curly-newline */ const { createBulkTest } = require('./bulkTest'); const request = require('request'); // The maximum number of iterations to check the status of given bulk tests (4 hours). const MAX_INTERVAL_ITERATIONS = 480; // The number of milliseconds to wait until the next bulk test is ...
tabOverride.set(document.getElementsByTagName('textarea'));
var fs = require('fs'); function reloadCustomAvatars() { var path = require('path'); var newCustomAvatars = {}; fs.readdirSync('./config/avatars').forEach(function (file) { var ext = path.extname(file); if (ext !== '.png' && ext !== '.gif') return; var user = toId(path.basename(file, ext)); newCustomAva...
'use strict'; angular.module("ngLocale", [], ["$provide", function ($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; function getDecimals(n) { n = n + ''; var i = n.indexOf('.'); return (i == -1) ? 0 : n.length - i - 1; } function ...
module.exports = function (grunt) { 'use strict'; grunt.initConfig({ jscs: { options: { config: '.jscsrc' }, src: '<%= jshint.src %>' }, jshint: { options: { jshintrc: '.jshintrc' }, ...
// @flow import { round } from 'lodash'; import type { MeasurablePercentile, MeasurablePercentilePoint, GraphData } from './types/graphing'; export default (percentiles: MeasurablePercentile[], scale: number): GraphData => { const angleIncrement = (2 * Math.PI) / percentiles.length; const startAngle = (3 * Math.P...
define("ARE.RectAdjust", { ctor: function (option) { this.min = option.min; this.max = option.max; this.value = option.value; this.change = option.change; this.renderTo = option.renderTo; this.fillStyle = option.fillStyle; this.canvas = document.createElement...
/* globals console, document, Image, window, L */ /* globals enableTooltips, pmapShared */ /* exported pmapLayerControl */ const pmapLayerControl = (function() { 'use strict'; const {loadJSON, popupHTML, setPopupGlobals, weatherLink} = pmapShared; const BLM_CA_NLCS_Prefix = 'https://www.blm.gov/nlcs_web/sites/ca/st/...
'use strict'; // Wrapper will prevent calls > n const limit = (count, fn) => { let counter = 0; return (...args) => { if (counter === count) return; const res = fn(...args); counter++; return res; }; }; // Usage const fn = (par) => { console.log('Function called, par: ' + par); }; const fn2...
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3...
'use strict'; var util = require('util'); var assert = require('assert'); var Mysql = function(config) { this.output = []; this.params = []; this.config = config || {}; }; var Postgres = require(__dirname + '/postgres'); util.inherits(Mysql, Postgres); Mysql.prototype._myClass = Mysql; Mysq...
//~ name a263 alert(a263); //~ component a264.js
import { injectReducer } from 'store/reducers' import MatchReplay from './containers/MatchContainer'; export default (store) => ({ path: 'replay-match/:matchId', ///* Async getComponent is only invoked when route matches */ getComponent (nextState, cb) { /* Webpack - use 'require.ensure' to cre...
import GraphicObject from './GraphicObject.js'; /* *********************************************************************************************** * * Circle * =============================================================================================== * * REQUIRE: GraphicObject * ******************************...
// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.16/esri/copyright.txt for details. //>>built define(["require","exports"],function(e,b){function c(a){"boolean"===typeof a.read?a.read={enabled:a.read}:"function"===typeof a.read?a.read={enabled:!0,reader:a.r...
/** * @name appBody.controller * @description * The entry for the appBody component */ class AppBodyController { /** * This is initializes the appBody controller * @param {*} AppBodyService */ constructor(AppBodyService) { 'ngInject'; // refs this.AppBodyService = AppBodyService; } /** * Fetch t...
/* global app */ var log = require('bows')('topics') var PageView = require('ampersand-infinite-scroll') var templates = require('../../templates') var TopicView = require('../../views/topic') var Topic = require('../../models/topic') var AmpersandCollection = require('ampersand-collection') var topicKinds = require('....
/* globals EmberDev */ import { context } from 'ember-environment'; import { run } from 'ember-metal'; import { Controller, Service, Object as EmberObject, Namespace } from 'ember-runtime'; import { Route } from 'ember-routing'; import Application from '../../../system/application'; import { Component, setT...
module.exports = { assets: { src: './src', dist: './dist' }, js: { src: './src/js', dist: './dist/js', vendor: { dist: 'dist/js/vendor.min.js' } }, webpack: { src: './src/js/controllers', dist: '/dist/js/controllers' }, css: { src: './src/sass', ...
'use strict'; function groupDataByYear() { var dataByYear = {}; //order by year $.each(pubdb, function(key, publication) { if (dataByYear[publication.year] === undefined) { dataByYear[publication.year] = []; } dataByYear[publication.year].push(publication); }); ...
import {OVERVIEW, GROUP_REPORT, ASSET_REPORT, TILE_OVERVIEW, ASSET_ANALYTICS, GROUP_ANALYTICS, SENSOR_LOG, EVENT_LOG,ALERTS} from './../../constants/routes'; import {RegionListId, ChartConfigutratorId, RoutesListId, TimeFrameId, WSHLFrameId, SwitchListId, AnalysisTypeId, AxelXId, AxelYId, AddNewFilterId} from './../../...
var Promise = require("bluebird") module.exports = ReadableStreamState function ReadableStreamState(options) { this.buffer = [] this.started = false this.draining = false this.pulling = false this.state = "waiting" this.storedError = null this.readablePromise = new Promise() this.close...
const NefitEasyClient = require('..'); // Instantiate client const client = NefitEasyClient({ serialNumber : process.env.NEFIT_SERIAL_NUMBER, accessKey : process.env.NEFIT_ACCESS_KEY, password : process.env.NEFIT_PASSWORD, }); // Connect client and retrieve status and pressure. client.connect().then( () ...
version https://git-lfs.github.com/spec/v1 oid sha256:1582026d3962f524ce66c24200c201dff7e5465aa12894fe5fc52cc4339f747a size 2544
// Regular expression that matches all symbols in the Javanese block as per Unicode v6.3.0: /[\uA980-\uA9DF]/;
import React from 'react'; import { mount } from 'enzyme'; import { spy } from 'sinon'; import update from 'immutability-helper'; import defaultRules from '../src/defaultRules'; import Form from './components/Form'; import Input from './components/Input'; /* global describe it expect jasmine beforeEach afterEach */ d...
BasicGame.MainMenu = function (game) { this.music = null; this.playButton = null; }; BasicGame.MainMenu.prototype = { create: function () { // We've already preloaded our assets, so let's kick right into the Main Menu itself. // Here all we're doing is playing some music and adding a picture and b...
var runTests = function(){ var noMsg = function(){ console.info("-----------NO Message should follow---------------"); }; var oneMsg = function(){ console.info("-----------ONE Message should follow---------------"); }; var twoMsg = function(){ console.info("-----------TWO M...
define("states/<%=nameCamel%>", ["app", "controllers/<%=nameCamel%>"], function (app) { "use strict"; return app.config(["$stateProvider", function ($stateProvider) { $stateProvider.state("<%=nameCamel%>", { // "abstract": true, // parent: "parentState", url: "/{someProp}{anotherProp:(?:/[^/]+)?}", // ...
const path = require('path') // 日志类型配置 module.exports = { appenders: { // WS日志,请求日志 ws: { type: 'dateFile', filename: `${path.resolve(__dirname, '../logs/wsLogs/logs')}Ws.log`, maxLogSize: 102400, backups: 1024, }, // HTTP日志,请求日志 http: { type: 'dateFile', fil...
// knockout-amd-helpers 1.1.0 | (c) 2020 Ryan Niemeyer | http://www.opensource.org/licenses/mit-license define(["knockout", "require"], function(ko, require) { //helper functions to support the binding and template engine (whole lib is wrapped in an IIFE) var unwrap = ko.utils.unwrapObservable, //call a construct...
'use strict'; var MQ = require('./lib').MultiQueue; module.exports = function() { return new MQ(); };
var Dispatcher = require('flux').Dispatcher; var copyProperties = require('react/lib/copyProperties'); var AppDispatcher = copyProperties(new Dispatcher(), { handleViewAction: function(action) { this.dispatch({ source: 'VIEW_ACTION', action: action }); } }); module.exports = AppDispatcher;
"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...
'use strict'; const db = require('./db'); const _ = require('lodash'); module.exports = function(seat_id) { var data = db.neighbours().findOne({id: seat_id}); if (!data) { var not_found_error = new Error('Seat not found'); not_found_error.status = 404; return Promise.reject(not_found_error); } var...
$(function() { $('form#trip_plan_form').on('submit', function(e){ if ( !Rotas.validar() ) return false; Rotas.tracar(); var fechado = $('a.direcoes').hasClass('fechado'); if ( fechado !== false ) { // $('a.direcoes').removeClass('fechado'); ...
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import Inferno from 'inferno'; export default () => ( <span id="feature-public-url">{process.env.PUBLIC_URL}.</span> );
'use babel'; import TestDepsView from '../lib/test-deps-view'; describe('TestDepsView', () => { it('has one valid test', () => { expect('life').toBe('easy'); }); });
//GameTimer:用户不活跃的时候,自动降低刷新周期 //注意:本文件依赖于jquery function GetNow(){ return (new Date()).getTime(); } var g_theTimer = null; function NosTimer(cfg){ this.time_idle_interval = cfg.time_idle_interval; //30*1000; //计算各个用户活跃状态时间段的最小周期。决定了各个周期的时间长度。 this.time_interval_base = cfg.time_interval_base; //10000; ...
/* finds the seccond (Partner) angle from the first e.g. seccondAngle(Math.PI*0.25, 'sin', 'rad'){ ... } would return Math.PI*0.75 */ function seccondAngle(firstAngle, trigFunction, units) { //sine calculator if (trigFunction == "sin") { if (units == "deg") { if (firstAngle >=...
/** * Group all `an` macros * @namespace * @alias macros.an * @since 0.0.1 */ macros.an = { /** * This should be the first command in a man page, not only * creates the title of the page but also stores in the buffer * useful variables: `title`, `section`, `date`, `source` * and `manual` * * @...
var express = require('express'); var router = express.Router(); var ctrlTemperatures = require('../controllers/temperatures'); router.get('/temperatures/fortnight', ctrlTemperatures.fortnight); router.get('/temperatures', ctrlTemperatures.index); router.get('/statistics', ctrlTemperatures.statisticsForDay); router...
var _ = require('lodash'); const assert = require('assert'); const authHandler = require('../../lib/mbaas/index'); const sampleUserConfig = require('../fixtures/sampleUserConfig.json'); const sampleProfileData = require('../fixtures/sampleUserProfile.json'); const sampleProfileDataLength = Object.keys(sampleProfileDat...
import {customElement, bindable} from 'aurelia-templating'; import {bindingMode} from 'aurelia-binding'; import {inject} from 'aurelia-dependency-injection'; import {isTouch} from 'aurelia-interface-platforms'; import {DOM} from 'aurelia-pal'; const clickEvent = isTouch ? 'touchstart' : 'click'; @customElement('au-dr...