code
stringlengths
2
1.05M
import { DatetimeLocal as BasicDatetimeLocal } from '../basic/datetime-local.js'; import { ErrorMessages } from "./messages.js"; export class DatetimeLocal extends BasicDatetimeLocal{ constructor(inputObj) { super(inputObj, ErrorMessages); } get uiClasses() { return 'form-...
'use strict'; angular.module('rchSeanceApp') .directive('inputChoice', function() { return { require: '?ngModel', restrict: 'E', scope: { ngModel: '=', choice1: '@', choice2: '@' }, template: '<div class="btn-group" d...
const InstagramAPI = require('./instagram-api'); const math = require('mathjs'); const async = require('async'); module.exports = { getBasicUserMediaStatistics: (accessToken) => { return new Promise( (resolve, reject) => { getAllUserMedias(accessToken) .then(data => { const li...
"use strict"; var user = require('./../../user'); var usersController = {}; usersController.search = function(req, res, next) { res.render('admin/manage/users', { search_display: '', loadmore_display: 'none', users: [] }); }; usersController.sortByPosts = function(req, res, next) { getUsers('users:postcou...
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(gene...
import test from 'ava'; import sinon from 'sinon'; import { mockImports, resetImports } from '../../utils/test-helpers'; import RunLogger, { __RewireAPI__ as moduleRewireAPI } from './run-logger'; const createMockedLogger = () => { const logger = new RunLogger(); logger.spinner = { start: sinon.stub(), ...
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, View, TouchableHighlight, Navigator } from 'react-native'; import Login from './login'; export default class lbs extends Component { render() { let def...
import Express from 'express'; import Logger from 'morgan'; import bodyParser from 'body-parser'; import routes from './routes/index'; const app = Express(); app.use(Logger('dev')); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); app.use('/', routes); app.use((request, response, ne...
var m = function (){ function p1(arg1/*INTEGER*/){ var $scope1 = $scope + ".p1"; function T1(){ this.field1 = 0; } var i1 = 0;var j1 = 0; var t1 = new T1(); function p2(arg2/*BOOLEAN*/){ var $scope2 = $scope1 + ".p2"; function T2(){ this.field2 = false; } var b = false; var t2 = new T2(); b = ...
/** * Capitan * * Copyright brandung GmbH & Co.KG * http://www.brandung.de/ * * Date: 19.08.2015s * MIT License (MIT) * * Polyfill for console methods */ Capitan.Util.consolePolyfill = function () { if (!(window.console && console.log)) { (function () { var noop = function () { }, methods = ['as...
/*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2016 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ sap.ui.define([ "sap/ui/core/format/DateFormat", "sap/ui/model/FormatException", "sap/ui/model/odata/type/ODataType", "sap/ui/mod...
/** * returns the sequence with highlighted fragment if the pattern matches, else just the sequence * * @param {string} sequence [description] * @param {string} fragment [fragment which should be highlighted] * * @param {string} pattern [pattern describes which characters are allowed between the fragment char...
/* --- name: Mif.Tree.Load description: load tree from json license: MIT-Style License (http://mifjs.net/license.txt) copyright: Anton Samoylov (http://mifjs.net) authors: Anton Samoylov (http://mifjs.net) requires: Mif.Tree provides: Mif.Tree.Load ... */ Mif.Tree.Load = { children: function(ch...
/** * Created by reinvantveer on 2/27/17. */ const sorter = require('../lib/schemaSorter'); const chai = require('chai'); chai.should(); /* eslint-env mocha */ describe('schema diff sorter', () => { describe('the default sorter', () => { it('prefers few B diffs over many A diffs', () => { const diffA =...
import apiMacro from "./helpers/apiMacro"; import cliMacro from "./helpers/cliMacro"; import expected from "./fixtures"; import npmScriptsMacro from "./helpers/npmScriptsMacro"; import test from "ava"; test( "postversion (legacy)", npmScriptsMacro, { postversion: "-a -L" }, "AwesomeProject", expected.version.defa...
var exec = require( 'child_process' ).exec , os = require( 'os' ) , path = require( 'path' ) , htmlExtract = require( './html' ) , util = require( '../util' ) , types ; function extractText( filePath, options, cb ) { var execOptions = util.createExecOptions( 'rtf', options ) , escapedPath = filePath....
'use strict'; exports.__esModule = true; exports.BsCheckbox = undefined; var _dec, _dec2, _desc, _value, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8; var _aureliaFramework = require('aurelia-framework'); function _initDefineProp(target, prope...
var circleRadii= []; var x,y; //circleRadii [] CIRCLE = new circleRadii[100]; function setup() { createCanvas(600,600); } function draw() { background(0); for(var i = 0;i<5;i++) { circleRadii[i] = { radius: 20, displaycircle: function() { stroke(255); noFi...
import React from 'react'; import ReactDOM from 'react-dom'; import reduxThunk from 'redux-thunk' import { Provider } from 'react-redux'; import { Router, Route, IndexRoute, browserHistory } from 'react-router' import { createStore, applyMiddleware } from 'redux'; import { createLogger } from 'redux-logger' import App...
'use strict'; const _ = require('lodash'); const fuzzy = require('./fuzzy_find'); const service = require('../lib/service'); const dummyService = service('dummy'); exports.find = (config) => { const app = _.get(config, 'app'); const secret = _.get(config, 'secret'); const nameOrId = _.get(config, 'route') || _...
import React, { Component } from 'react'; import { Radio } from 'synfrastructure'; import ToggleScaffold from '../../common/forms/ToggleScaffold'; class Radios extends Component { constructor(props) { super(props); this.state = { checkedRadio: null, }; } toggleRadio(e) { this.setState({ c...
'use strict'; var Sequelize = require('sequelize') var db = require('./index.js'); module.exports = (db) => db.define('reviews', { content: { type: Sequelize.STRING, allowNull: false }, stars: { type: Sequelize.INTEGER, validate: { min: 0, max: 5 ...
const ADD_HISTORY = 'ADD_HISTORY'; const defaultState = []; const reducer = (state = defaultState, action) => { if (action.type === ADD_HISTORY) { if (state.slice(-1).pop() !== action.value) { return [...state, action.value]; } } return state; }; export default reducer;
"use strict"; var _ = require('lodash'); module.exports = function(handlebars){ handlebars.registerHelper("fixClass", function(){ var entries = this; for(var i=0; i<entries.length; i++){ var entry = entries[i]; if(entry.kind === "class"){ var cIndex = _.fin...
import sqlString from 'sqlstring-sqlite'; import { getDb } from '../db.js'; import { formatOrderByClause, formatSelectClause, formatWhereClauses, } from '../utils.js'; import translations from '../../models/gtfs/translations.js'; /* * Returns an array of all translations that match the query parameters. */ e...
var mongoose = require('mongoose'); var crypto = require('crypto'); var Schema = mongoose.Schema; /* //simplest Schema example var UserSchema = new Schema({ firstName: String, lastName: String, email: String, username: String, password: String }); */ var UserSchema = new Schema({ firstName: { ...
$(function() { $('.collapsible button').on('click', function(){ $(this).parent('dt').next('dd').toggleClass('hidden'); if ($(this).attr('aria-expanded') != 'true'){ $(this).attr('aria-expanded','true'); } else { $(this).attr('aria-expanded','false'); } }); });
'use strict'; const _ = require('lodash'); module.exports = function (db) { var me = { db: db }; require('./extend')(me); for (var i = 0; i < me._resources.length; i++) { var r = me._resources[i]; me[r] = require('./' + r)(me); } return me; };
// TODO: Create the Session Information object //var info = new ActiveXObject("TCObj.SessionInfo"); //info.ApplicationName = WScript.ScriptFullName; // Connect to the Pig Server var app = new ActiveXObject("Pigs.Session"); // TODO: app.SessionInfo = objInfo; // Get the collection of pigs var pigs = app.Pigs; // Get ...
/* @flow */ import { watchPath } from "atom"; import fs from "fs"; import path from "path"; import { bindNodeCallback, empty, from, fromEventPattern, of } from "rxjs"; import { catchError, filter, mergeMap, map } from "rxjs/operators"; import * as A from "../actions"; import NotesFileFilter from "../NotesFileFilter"; ...
var Helpers = require('./helpers'); var Faker = require('../index'); var definitions = require('../lib/definitions'); var address = { zipCode: function () { return Helpers.replaceSymbolWithNumber(Faker.random.array_element(["#####", '#####-####'])); }, zipCodeFormat: function (format) { re...
version https://git-lfs.github.com/spec/v1 oid sha256:8d8bf1c08b55619646ab0422b016eba8f445c4926c1e013207c4de56412dbfca size 8771
ace.define("ace/theme/monokai",["require","exports","module","ace/lib/dom"], function(acequire, exports, module) { exports.isDark = true; exports.cssClass = "ace-vue-theme"; exports.cssText = `.ace-vue-theme .ace_gutter { background: #2F3129; color: #2c3e50 } .ace-vue-theme .ace_print-margin { width: 1px; back...
var express = require('express'); var path = require('path'); var favicon = require('static-favicon'); var logger = require('morgan'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); var routes = require('./routes/index'); var users = require('./routes/users'); var app = express(...
'use strict'; /*global SVGjsAnim */ SVGjsAnim.prototype.setupReceiving = function() { var scale = 1.1; var x = 150; var y = 0; var w = 950; var h = 450; this.wistiaObjs.receiving = this.wistiaEmbed('wy0jb1fb5d'); // Heading var heading = this.draw.heading('RECEIVING', this.wistiaObjs....
const client = require('cheerio-httpcli'); const mysql = require('mysql'); const conn = mysql.createConnection({ host : 'localhost', user : 'root', password : 'Do_you_love_MySQL57?', database: 'spajam2017' }) conn.connect() let animes = [] const isExit = spot_num => { client.fetch(`https://seichima...
"use babel" // @flow import type { Info, Suggestion, Range } from "../types" export default function findDestination( info: Info, suggestion: ?Suggestion, ): Range { if (!suggestion) throw new Error("suggestion required") if (info.parseError) throw info.parseError const { exports } = info if (suggestion....
/* eslint-disable import/no-named-as-default-member */ import func from '../../../../src/evaluate-by-operator/operator/equal'; describe('equal operator', () => { it('should set SYMBOL const', () => { expect(func.SYMBOL).toBe('='); }); it('should correctly process values', () => { expect(func(2, 8.8)).to...
#!/usr/bin/nodejs /** * LearnYouNode Workshop * Step 03 - Il mio primo I/O * * author: Maurizio Aru * created: 2017.10.26 */ var fs = require('fs'); if (process.argv.length < 3) { console.error("ERROR: arguments missing"); return 1; } var contents = fs.readFileSync(process.argv[2]) var lines = contents...
'use strict'; module.exports = function(options, imports, register) { var debug = imports.debug('apps:www'); debug('start'); var app = require('./server/routes')(options, imports); debug('register www'); register(null, { www: app }); };
/** * Imports */ import React from 'react'; import {Button, Icon, Row, Col} from 'react-materialize' import Input from 'components/text_input' export default class NewOidModal extends React.Component { constructor(props) { super(props); this.state = { title: '', form: ...
'use strict' let co = require('co') let cli = require('heroku-cli-util') let helpers = require('../lib/helpers') let logDisplayer = require('../lib/log_displayer') let Dyno = require('../lib/dyno') function * run (context, heroku) { let opts = { heroku: heroku, app: context.app, command: helpers.buildCo...
import Vue from 'vue' import Vuex from 'vuex' import createLogger from 'vuex/dist/logger' import vuexI18n from 'vuex-i18n' import { mutations, state } from './mutations' import * as actions from './actions' import * as getters from './getters' import langEn from 'src/lang/en' Vue.use(Vuex) const store = new Vuex.Stor...
"use strict"; var fs = require("fs"), path = require("path"); var config = require("./config"); var utils = require("./utils"); module.exports = function(req, res, next){ res.locals.basedir = req.app.get("views"); res.locals.client_id = config.client_id; res.locals.user = req.cookies.user; res.locals.auth_...
/// <reference path="../Assets/Vectors/Vector2d.ts" /> /// <reference path="Collidable.ts" /> var EndGate; (function (EndGate) { (function (Collision) { /** * Defines a data object that is used to describe a collision event. */ var CollisionData = (function () { /** ...
/** * Copyright 2014 Qiyi Inc. All rights reserved. * * @file: Simple.Dao.js * @path: js-src/simple/ * @desc: 负责Simple模块远程调用的静态对象 * @author: jarry@baobaoyun.com * @date: 2014-7-14 */ define( [ './Simple' ], function(Simple) { Simple.Dao = Arm.create('Dao', { nam...
/** * Sinon.JS 1.10.3, 2014/07/11 * * @author Christian Johansen (christian@cjohansen.no) * @author Contributors: https://github.com/cjohansen/Sinon.JS/blob/master/AUTHORS * * (The BSD License) * * Copyright (c) 2010-2014, Christian Johansen, christian@cjohansen.no * All rights reserved. * * Redistribution a...
import 'babel-core/polyfill'; import React from 'react'; import ReactDOM from 'react-dom'; import { Router } from 'react-router'; import { Provider } from 'react-redux'; import { ReduxRouter } from 'redux-router'; import createBrowserHistory from 'history/lib/createBrowserHistory' import configureStore from '../comm...
(function () { window.Twis = {}; /** * Tweet */ var Tweet = function () {}; Tweet.search = function (keywords, tweets, callback) { if (typeof tweets === 'function') { callback = tweets; tweets = []; } if (keywords.length === 0) { callback(false, tweets); } else { ...
/** * @author mrdoob / http://mrdoob.com/ */ Sidebar.Geometry = function ( editor ) { var signals = editor.signals; var container = new UI.CollapsiblePanel(); container.setCollapsed( editor.config.getKey( 'ui/sidebar/geometry/collapsed' ) ); container.onCollapsedChange( function ( boolean ) { editor.config....
import { createInventory, createOption, createOptionValue } from 'assets/js/store/modules/inventories/factories'; import inventoriesModule from 'assets/js/store/modules/inventories'; import inventoryFormComponent from 'formwidgets/inventory/components/inventories/form/form'; // // factory // const mount = factory({ ...
 $(document).ready(function () { var oldData = [ ['Javascript', 13], ['CSS', 13], ['HTML', 13], ['AngularJS', 4], ['jQuery', 13], ['Java', 18], ['C', 5], [...
describe('unique', function () { var uniqueFilter; beforeEach(module('ui.filters')); beforeEach(inject(function ($filter) { uniqueFilter = $filter('unique'); })); it('should return unique entries based on object equality', function () { var arrayToFilter = [ {key: 'value'}, {key: 'value2...
var glob = require('glob'); var files = glob.sync('./content/*'); var Promise = require("bluebird"); var fs = Promise.promisifyAll(require("fs")); var contentPath = './content/'; var imageNumbers = files.map(function(name) { return parseInt(name.substr(contentPath.length)); }); imageNumbers.sort(function numOrdA(a...
var client = require('box-view').createClient('<TOKEN>'); function getThumbnail(id, width, height, callback) { client.documents.getThumbnail(id, width, height, function (err, response) { var ms, retry; var retryAfter = response.headers['retry-after'] if (retryAfter) { ms = retryAfter * 1000; ...
var gGameview; function startup() { var root = document.getElementById('root'); var clients = { checkers: new GameClientChessCheckers(root, "checkers"), chess: new GameClientChessCheckers(root, "chess"), match: new GameClientMatch(root, "match") } gGameview = new ArtefactGameServerConnectionView(gameServer...
var doingFlag = false, //动作执行标志 pos_x = 1, //当前的横坐标 pos_y = 1, //当前的纵坐标 dir = [0,90,180,270,360], //方向列表 dir_now = 0; //当前的方向下标 //通过方向,计算运动后的位置 function positionFoward(dirFoward){ switch(dirFoward){ case 0: if (pos_y === 1) { //边界检测 break; }else{ pos_y--; } ...
/** * selenium-webdriver 浏览器器多窗口切换 * 使用getAllWindowHandles() 方法 * * */ require('chromedriver') var webdriver = require('selenium-webdriver') var By = webdriver.By; var driver = new webdriver.Builder().forBrowser('chrome').build(); driver.get("https://www.baidu.com/"); driver.findElement(By.id('kw')).sendKey...
define(function(require){ var Forms = require('joss/util/Forms'); module('joss/util/Forms'); test('', function() { ok(false); }); });
const Utils = require('./utils'); const backpack = require('./backpacktf'); const Login = require('./login'); const Confirmations = require('./confirmations'); const appConsole = require('./console'); let steam, log, Config, manager, automatic; let communityCookies; let g_RelogInterval = null; exports.checkOfferCoun...
export * from "./user.service"; export * from "./library.service"; export * from "./github.service";
'use strict'; var assign = require('object-assign'); var flatten = require('flat'); exports.Query = Query; function Query(sobject, criteria, tableMeta) { criteria.where = normalizeWhere(criteria.where); criteria.joins = criteria.joins || []; this._select = criteria.select; var children = []; var query =...
var express = require('express'); var bodyParser = require('body-parser'); var app = express(); app.use(bodyParser.urlencoded({ extended: false })); app.disable('etag'); app.all('/test', function(req, res) { if (req.headers && req.headers['x-proxied-header']) { res.send('a server response with proxied header v...
/** * @author weism * copyright 2015 Qcplay All Rights Reserved. */ var s = qc.Serializer; /** * 战斗者的逻辑控制 */ var Fighter = qc.defineBehaviour('qc.demo.Fighter', qc.Behaviour, function() { var self = this; // 是不是宠物 self.isPet = true; // 血量、伤害值、攻击频率、大招冷却时间 self.maxHp = 1000; self.hp = sel...
require( 'components' ).create( 'navigation-mobile', { initialize: function ( ) { this.$el.on( 'click', this.menuToggle.bind( this ) ) }, menuToggle: function ( event ) { event.preventDefault(); event.stopPropagation(); Rye( '.nav' ).toggleClass( '-opened' ); this.$el.toggleClass( '-opened' ); } } );
 function terrainGeometry() { var _this = this; function clamp(v, min, max) { return v < min ? min : (v > max ? max : v); } function lerp(x, y, t) { return x * (1 - t) + y * t; } function bilinearFilter(x, y, v00, v10, v01, v11) { var v00_10 = lerp(v00, v10, x); ...
if (typeof module === "object" && module && typeof module.exports === "object") { // Expose jLight as module.exports in loaders that implement the Node // module pattern (including browserify). Do not create the global, since // the user will be storing it themselves locally, and globals are frowned // ...
/*global xDaysAgo, removeByIndex */ /* Thought Constructor * * Method constructs a thought which contains the thought and the timestamp when * it was created. * * @param string thought text of the thought * @param number timeCreated timestamp at time method is used * * return void */ funct...
// Declare app level module which depends on views, and components angular.module('myApp', [ 'ngRoute', 'ngMaterial', 'myApp.vendingmachine', 'services' ]). config(['$routeProvider', function($routeProvider) { $routeProvider.otherwise({redirectTo: '/vendingmachine'}); }]);
var express = require('express'); var router = express.Router(); var couch = require('../couch.js'); var _ = require('underscore'); /* GET home page. */ router.get('/', function(req, res, next) { couch.all('auction', {}, function(err, data) { var rows = []; data.rows.sort(function(a, b) { return new Date(b...
import Joi from 'joi'; // require and configure dotenv, will load vars in .env in PROCESS.ENV require('dotenv').config(); // define validation for all the env vars const envVarsSchema = Joi.object({ NODE_ENV: Joi.string() .allow(['development', 'production', 'test', 'provision']) .default('development'), ...
import _extends from 'babel-runtime/helpers/extends'; import React from 'react'; /** * Default row renderer for FlexTable. */ export default function defaultRowRenderer(_ref) { var className = _ref.className; var columns = _ref.columns; var index = _ref.index; var isScrolling = _ref.isScrolling; var onRow...
import React from 'react'; import PropTypes from 'prop-types'; const PaginationLink = props => { return ( <button className="btn btn-default" onClick={props.onClick} disabled={props.disabled}>{props.children}</button> ); }; PaginationLink.propTypes = { children: PropTypes.node, disabled: PropTypes.bool.is...
import invariant from 'invariant'; import { register, attachListeners } from '../ReactTitaniumBridge'; register("tabgroup", "Ti.UI.TabGroup", { factory: props => Ti.UI.createTabGroup(props), create(props, handlers, getChildren) { const children = getChildren(); invariant( children.every(child => c...
/* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'find', 'gu', { find: 'શોધવું', findOptions: 'વીકલ્પ શોધો', findWhat: 'આ શોધો', matchCase: 'કેસ સરખા રાખો', matchCyclic: 'સરખાવવા બધા', ...
 document.addEventListener('DOMContentLoaded', function () {//}, false);
import { resolve } from 'rsvp'; import { then } from 'ember-awesome-macros/promise'; import { computed } from '@ember/object'; import { module, test } from 'qunit'; import { compute } from 'ember-macro-helpers/test-support'; import sinon from 'sinon'; module('Integration | Macro | promise | then', function() { test(...
var shared = require('./shared.karma.conf'); module.exports = function(config) { shared(config); config.set({ frameworks: ['ng-scenario'], files: ['test/e2e/**/*.js'], urlRoot: '/_karma_/', proxies: { '/': 'http://localhost:8000/' } }); };
(function() { 'use strict'; angular .module('smn-ui') .directive('uiTreeViewList', uiTreeViewListDirective); uiTreeViewListDirective.$inject = ['$timeout']; function uiTreeViewListDirective($timeout) { var directive = { require: '^uiTreeView', link: link, restrict: 'E', templateUrl: 'components...
import { NS } from '../../../instrumented/svgcanvas/namespaces.js' import * as utilities from '../../../instrumented/svgcanvas/utilities.js' import * as coords from '../../../instrumented/svgcanvas/coords.js' describe('coords', function () { let elemId = 1 const root = document.createElement('div') root.id = 'r...
var State = require('ampersand-state'); var Aside = State.extend({ props: { target: 'string', src: 'string', alt: 'string', title: 'string', text: 'string', type: 'string', images: 'array', href: 'string', icon: 'string', is_enlargeable: 'boolean' } }); module.exports = ...
function selectionSort(array) { var i, j, len, secondLen, min, temp; for (i = 0, len = array.length - 1; i < len; i += 1) { min = i; for (j = i + 1, secondLen = array.length; j < secondLen; j += 1) { if (array[j] < array[min]) { ...
#!/usr/bin/env node var argv = require('minimist')(process.argv.slice(2)) var bencode = require('bencode') var path = require('path') var fs = require('fs') function onerror () { console.error('usage: rtorrent-session-rectify --old [string] --new [string] --from [path] --to [path]\n') console.error(' --old Ex...
import { createReducer } from 'utils'; // normally this would be imported from /actions, but in trying to keep // this starter kit as small as possible we'll just define it here. import * as types from '../constants/ActionTypes'; const initialState = { costToKeep: 0, costToKeepIsEditable: true, saleWeight: 0, ...
process.env.NODE_ENV = 'test'; require("coffee-script"); require(__dirname + "/assert-extra");
'use strict'; // Express Server var express = require('express'), bodyParser = require('body-parser'), methodOverride = require('method-override'), errorHandler = require('error-handler'), https = require('https'), path = require('path'), handlebars = require('express-handlebars'), os = req...
/** * Depends of jQuery (yes, it's true) and Tipsy * */ (function(window, $, undefined) { // CROSS-BROWSER JSON SERIALIZATION // FROM http://www.sitepoint.com/javascript-json-serialization/ // if JSON doesn't exit var JSON = window.JSON || {}; // add stringify method (if ...
/* jshint globalstrict: true, camelcase: false */ /* global module, require */ 'use strict'; module.exports = function(grunt) { // load all grunt tasks require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); grunt.initConfig({ // watch for changes and trigger compass, jshint, uglify and livereloa...
angular.module('myApp.directives').directive('gimsQuestionnaireMenu', function($dropdown) { return { restrict: 'E', template: '<div class="btn-group" style="width: 40px">' + ' <button type="button" class="btn btn-default dropdown-toggle btn-sm">' + ' <i cla...
/** * Delay for user search component. * Input is debounced to reduce load on the server. * * @constant * @default * @type {string} */ export const SEARCH_DEBOUNCE_DELAY = '400'; export const NEW_AWARD_ID = 'newAwardId';
var should = require('should'); var sinon = require('sinon'); var Category = require('../../lib/endpoints/category'); describe("Category", function() { var cattest, stub; beforeEach(function() { cattest = new Category({ key: 123 }); stub = sinon.stub(cattest, "executeRequest"); }); afte...
define([], function() { return function($scope, $toast, $state, $stateParams, $marketSupply, $ionicHistory, $ionicPopup, $loading, localStorageService) { $scope.agentInfo = {}; var warnDialog = function(msg) { $ionicPopup.alert({ title: '注意', template: msg ...
const {onlineUserStore, chatMessageStore} = require('../../redis/RedisStore') module.exports = { postChatMessages: async function (ctx, next) { let socketId = ctx.socket.id let time = Date.now() let user = await onlineUserStore.get(socketId) ctx.response = Object.assign({}, ctx.req.params, {from: use...
/** * Created by zhiyuans on 9/21/2016. */ const mongoose = require('mongoose'); const Schema = mongoose.Schema; const ObjectId = Schema.Types.ObjectId; const commentSchema = new Schema({ eventId: ObjectId, //event外键 userId: ObjectId, //user外键 content: String, time: Date });
/*! * Web Office Workspace - Wow * Copyright(c) 2010. * @author Otávio Fernandes <oaugustus> */ Ext.ns('Wow.workspace'); /** * @class Wow.workspace.ModuleProvider * @extends Ext.util.Observable * Manager of Application UI Modules * @constructor * @param */ Wow.workspace.ModuleProvider = function(){ this....
module.exports = [ { name: 'A', connections: [ { name: '1', target: 'B' }, ], }, { name: 'B', connections: [ { name: '1', target: 'C' } ] }, { name: 'C', connections: [ { name: '1', target: 'D' } ] }, { name: 'D', connections: [ { name: '...
var React = require('react'); var ReactMaskMixin = require('react-mask-mixin'); var UI = require('UI'); var View = UI.View; var List = UI.List; var Content = UI.Content; var Icon = UI.Icon.Icon; var Switch = UI.Form.Switch; var Slider = UI.Form.Slider; var Grid = UI.Grid; var Button = UI.Button.Button; function getIm...
/** * 2017-9-24 Jifeng Cheng * parseInt */ //parseInt:将字符串转换成相应进制的数 console.log(parseInt('101', 2)); console.log(parseInt('11', 2)); console.log(parseInt('hello', 2)); //如果字符串不是数字,则输出NaN; console.log(parseInt('0x11', 2)); //parseFloat:只能解析十进制的数字 console.log(parseFloat('11', 2)); console.log(parseFloat('30',...
/*! qinblog 1.0.0 | http://www.qinblog.net | (c) 2017 qinblog | MIT License */ ;(function() { //path define var path = { uikit : '/Public/common_lib/uikit/', editormd : '/Public/common_lib/editor.md/', user : '/Public/home/js/', user_css : '/Public/home/css/', user_p...
exports.sleep = (ms = 1000) => new Promise(resolve => setTimeout(resolve, ms)) exports.Logger = outEl => { outEl.innerHTML = '' return message => { const container = document.createElement('div') container.innerHTML = message outEl.appendChild(container) outEl.scrollTop = outEl.scrollHeight } } ...