code
stringlengths
2
1.05M
var App = function() { // create nodes var win = $(window), body = $(document.body), container = $('<div class="windows-container"></div>').appendTo(body), header = $('<div class="windows-header"></div>').appendTo(container), main = $('<div class="windows-main"></div>').appendTo(container), footer = $('<d...
'use strict' /* libraries */ var Sequelize = require('sequelize') var Promise = require('Promise') /* own code */ var Converter = require('./convert') var MetaTables = require('./generate/meta/tables') var MetaLoader = require('./generate/meta/loader') /** * opts = { * dbHost: '', * dbDialect: '', * dbName...
import { resolve } from 'path'; import { networkInterfaces } from 'os'; import { HotModuleReplacementPlugin, NamedModulesPlugin, LoaderOptionsPlugin } from 'webpack'; import { forEach, get, isEqual } from 'lodash'; const getExternalIpAddress = () => { let externalIpAddress; let ExternalNetworkInterface...
var parser, valueType, relLengthRegExp = /^([+-]?[0-9]+|[+-]?[0-9]*\.[0-9]+)(em|ex|ch|rem|vw|vh|vmin|%)$/i, absLengthRegExp = /^([+-]?[0-9]+|[+-]?[0-9]*\.[0-9]+)(cm|mm|in|pt|pc|px)$/i, numRegExp = /^[+-]?[0-9]+|[+-]?[0-9]*\.[0-9]+$/; valueType = { 'Invalid': 0, 'RelativeLength': 1, 'AbsoluteLen...
var http; function createRequestObject() { if(window.XMLHttpRequest) { // Mozilla, Safari, ... http = new XMLHttpRequest(); } else if(window.ActiveXObject) { // Internet Explorer http = new ActiveXObject("Microsoft.XMLHTTP"); } return http; } function onClick...
require('./facets.scss'); import $ from 'jquery'; require('jquery-ui'); require('jquery.fancytree/src/jquery.fancytree'); import * as _ from 'underscore'; const workzoneFacets = (services) => { const { configService, localeService, appEvents } = services; let selectedFacetValues = []; /*var getSelectedFac...
'use strict'; module.exports = { /** * 缓存清理 */ purge: async ctx => { /** * mock * 正式使用时需要对接CDN厂商提供的接口 */ ctx.body = await new Promise(function (resolve) { setTimeout(function () { resolve({}); }, 1000); }); } };
import './publicpath.js'; import $ from 'jquery'; import {initVueEnv} from './components/VueComponentLoader.js'; import {initRepoActivityTopAuthorsChart} from './components/RepoActivityTopAuthors.vue'; import {initDashboardRepoList} from './components/DashboardRepoList.js'; import attachTribute from './features/tribu...
/* global self */ 'use strict' module.exports = (domain, opts, callback) => { if (typeof opts === 'function') { callback = opts opts = {} } opts = opts || {} domain = encodeURIComponent(domain) let url = `https://ipfs.io/api/v0/dns?arg=${domain}` Object.keys(opts).forEach(prop => { url += `&...
/* * This file is part of the Spludo Framework. * Copyright (c) 2009-2010 DracoBlue, http://dracoblue.net/ * * Licensed under the terms of MIT License. For the full copyright and license * information, please see the LICENSE file in the root folder. */ var events = require("events"); /** * @class The bootstrap...
'use strict'; angular.module('index.selector', [ 'ngResource', 'isteven-multi-select' ]) .value('localLang', { selectAll: '全选', selectNone: '清除', reset: '重置', search: '查找', nothingSelected: '请选择...' });
'use strict'; var React = require('react'); var mui = require('material-ui'); var SvgIcon = mui.SvgIcon; var createClass = require('create-react-class'); var NotificationMms = createClass({ displayName: 'NotificationMms', render: function render() { return React.createElement( SvgIcon, this.prop...
import fromEntries from '../../common/fromEntries'; import getElementById from '../../common/getElementById'; import getValue from '../../system/getValue'; import jQueryNotPresent from '../../common/jQueryNotPresent'; import navMenu from './navMenu'; import { pCL } from '../../support/layout'; import preFlight from './...
'use strict'; var util = require('./<%= yo_front_src %>/gulp/util'); util.checkIfEnvIsValid(); var gulp = require('gulp'); var $ = require('gulp-load-plugins')(); var del = require('del'); gulp.task('scripts', function() { var browserify = require('browserify'); var source = require('vinyl-source-str...
import { combineReducers } from 'redux'; import { baseMons, allMons, mon, pickedMons } from './reducer_mon'; import { showLoginModal } from './reducer_modal'; export default combineReducers({ baseMons, allMons, mon, showLoginModal, pickedMons, });
require('phantomjs-polyfill') sinon = require('sinon') sinonChai = require('sinon-chai') Validator = require('../lib/index') submit = require('./form-submit') chai.use(sinonChai) describe('validate-form', function() { expect = chai.expect beforeEach(function(){ var form = this.form = window.form = docu...
"use strict"; var _createClass = require("babel-runtime/helpers/create-class")["default"]; var _classCallCheck = require("babel-runtime/helpers/class-call-check")["default"]; Object.defineProperty(exports, "__esModule", { value: true }); var Emitter = (function () { function Emitter() { _classCallCheck(this...
{% autoescape None %}{% whitespace all %} var docCookies = { getItem: function (sKey,escape) { if (!sKey) { return null; } var result = document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*" + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*([^;]*).*$)|^.*$"), "$1") || null; if(result...
/************************************************************************** * This file is part of the UGE(Uniform Game Engine) of SPP. * Copyright (C) by SanPolo Co.Ltd. * All rights reserved. * See http://spp.spolo.org/ for more information. * * SanPolo Co.Ltd * http://spp.spolo.org/ sales@spolo.org sp...
var express = require('express'); var http = require('http'); var app = express(); var server = http.Server(app); var io = require('socket.io')(server); // Serve the game html css js // ========================== var port = 8080; app.use(express.static(__dirname + '/client')); server.listen(port); console.log('se...
import { h } from 'omi'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon(h(h.f, null, h("path", { d: "M5.99 4L6 20h12V4H5.99c.01 0 0 0 0 0zM11 5c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM8 5c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm4 4c2.76 0 5 2.24 5 5s-2.24 5-5 5-5-2.24-...
define(['jquery'], function($) { var map = new BMap.Map("setmap-con"),marker,point,styleStr; map.enableScrollWheelZoom(); map.enableContinuousZoom(); var JobMap = {}; /** * 注册事件 */ JobMap.addevent = function() { var that = this; var _form = $(this.elem).parent...
// @flow import React from 'react' import { embedProps } from './tools' const randomSeed = Math.random() * 10001 type Props = { children?: mixed, sigma?: sigma, seed?: number } /** RandomizeNodePositions component, sets random positions to all nodes. Can be used within Sigma component with predefined graph o...
// All symbols with the `Bidi_Control` property as per Unicode v8.0.0: [ '\u061C', '\u200E', '\u200F', '\u202A', '\u202B', '\u202C', '\u202D', '\u202E', '\u2066', '\u2067', '\u2068', '\u2069' ];
angular.module('pigeon.settings').controller('SettingsCtrl', function ($scope) { });
// Tests the 'Socket IO' API loader 'use strict'; const fs = require('fs'), path = require('path'); exports.sockets = [ { event: 'process-something', onEvent({socket, message}, callback) { callback(null, 'data'); }, middleware: [ ({socket, socketHandler,...
describe('ui.grid.edit uiGridCellNavService', function() { var uiGridCellNavService, gridClassFactory, grid, uiGridConstants, uiGridCellNavConstants, $rootScope, $timeout; beforeEach(module('ui.grid.cellNav')); beforeEach(inject( function(_uiGridCellNavService_, _gridClassFactory_, $templateCache, _u...
// The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue'; import App from './App'; /* eslint-disable no-new */ new Vue( { el: '#app', render: h => h( App ) } );
module.exports = require('./dist/bmock');
import React from 'react'; import { NavLink } from 'react-router-dom'; class Nav extends React.Component { render() { return ( <ul className='nav'> <li> <NavLink exact activeClassName='active' to='/'>Home</NavLink> </li> <li> <NavLink activeClassName='active' to=...
version https://git-lfs.github.com/spec/v1 oid sha256:2ee42bd596bde469a2c0ada0ecb083dd25b8012f8cebe50940a9ddf97f337516 size 521
Package.describe({ name: "jandres:ionic", summary: "Ionic components for Meteor. No Angular!", version: "1.0.0", git: "https://github.com/JoeyAndres/meteor-ionic.git" }); Cordova.depends({ 'ionic-plugin-keyboard': '1.0.8' }); Package.onUse(function(api) { api.versionsFrom("1.0"); api.use([ "jandr...
var path = require('path'); var webpack = require('webpack'); var config = { context: path.join(__dirname, 'src/examples'), entry: { todomvc: './todomvc/client.js', auth: './auth/client.js' }, output: { path: path.join(__dirname, 'src/examples/dist'), filename: '[name].j...
"use strict"; import VueRouter from "vue-router"; import Home from "../modules/home"; import Test from "../modules/test"; import Result from "../modules/result"; import Admin from "../modules/admin"; export default new VueRouter({ mode: "hash", routes: [ {path: "/", component: Home}, {path: "/test", compon...
exports.DATABASE_URL = process.env.DATABASE_URL || global.DATABASE_URL || 'mongodb://localhost/whiskeytest'; exports.TEST_DATABASE_URL = ( process.env.TEST_DATABASE_URL || 'mongodb://localhost/test-whiskeytest'); exports.PORT = process.env.PORT || 8080;
// @flow /* eslint-env mocha */ import assert from 'power-assert' import formatDistance from '.' describe('ko locale > formatDistance', function () { describe('lessThanXSeconds', function () { context('when the count equals 1', function () { it('returns a proper string', function () { assert(forma...
module.exports = function (context) { if (context.pictType) { Promise.resolve(Object.assign({}, context, {pictType: null})); } else { Promise.resolve(Object.assign({}, context, {pictType: 'I'})); } }; module.exports.helpText = 'Only show video key frames';
import getConnection from './getConnection'; export default function(actions, blueprints, reducerActionMap) { return function (state, stateKey, params, options) { const connection = getConnection(stateKey, reducerActionMap, actions, blueprints); return connection.getState(state, params, options); }; }
const { MessageEmbed } = require("discord.js"); const taylorSongsByAlbum = [ { title: "Taylor Swift", image: "https://i.imgur.com/w0bksSN.jpg", songs: [ "Tim McGraw", "Picture to Burn", "Teardrops on My Guitar", "A Place in This World", "Cold As You", "The Outside", ...
// Cmts service used to communicate Cmts REST endpoints (function () { 'use strict'; angular .module('cmts') .factory('CmtsService', CmtsService); CmtsService.$inject = ['$resource']; function CmtsService($resource) { return $resource('api/cmts/:cmtId', { cmtId: '@_id' }, { update...
'use strict'; var gulp = require('gulp'); var $ = require('gulp-load-plugins')(); gulp.task('build', function () { return gulp.src(['./src/core.js','./src/*.js']) .pipe($.concat("cash.js")) .pipe($.size()) .pipe($.wrap('(function(){<%= contents %>}.call(typeof window !== "undefined" ? window : this));'...
class Row { config() { return { idPrefix: 'row', index: 0, hook: window.document.body, parent: null, autoBind: false, isLast: false, css: { base: 'row', group: 'form-inline', subgroup: 'form-group', left: 'btn empty', right: 'btn e...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var INITIAL_STATE = { skills: [{ id: 1, name: 'ruby' }, { id: 2, name: 'javascript' }, { id: 3, name: 'angular' }, { id: 4, name: 'back-end' }, { id: 5, name: 'react' }], profileList: [{...
'use strict' import { each } from 'lodash' import webpack from 'webpack' import ExtractTextPlugin from 'extract-text-webpack-plugin' import ProgressBarPlugin from 'progress-bar-webpack-plugin' import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer' import base from './base.config.js' import { resolve } from 'pa...
/* * gamut_visualizer.js * * Copyright (c) 2015, Roger Tallada * http://rogertallada.com * * Distributed under the MIT license. See LICENSE file for details. * * All rights reserved. */ function log10(val) { return Math.log(val) / Math.LN10; } function newHitMatrix(width, height) { var x, y, matrix; ...
import postList from './postList'; import postListCached from './postListCached'; import postListExposure from './postListExposure'; import postListExposureScoped from './postListExposureScoped'; import postListParamsCheck from './postListParamsCheck'; import postListParamsCheckServer from './postListParamsCheckServer'...
var express = require('express'); var router = express.Router(); var jwt = require('express-jwt'); var auth = jwt({ secret: 'MY_SECRET', userProperty: 'payload' }); var ctrlProfile = require('../controllers/profile'); var ctrlAuth = require('../controllers/authentication'); // profile router.get('/profile', auth,...
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 __(); }; define(["require", "exports", 'di/DependencyInjectable'], function (require, exports, Injectable) { ...
var Phauxy = require('../../../index'); var TextModel = require('../../TextModel'); function textModelFactory(data) { return new TextModel(data.text) } // --- var textItem = new TextModel('World'); // 'Hello World!" console.log("Hello " + textItem.text + "!"); // --- textItem = textItem.transaction().set('tex...
app.metadata = app.metadata || { gitHubUrl: 'https://github.com/bradyhouse/house/tree/master/fiddles/svg/fiddle-0000-Template' };
import h from '../../../h'; import {AboutCard,} from '../Containers'; export default () => h(AboutCard, { style: { marginTop: 150, }, });
System.register('myBundle', ['external'], function (exports, module) { 'use strict'; var _starExcludes = { default: 1 }; return { setters: [function (module) { var _setter = {}; for (var _$p in module) { if (!_starExcludes[_$p]) _setter[_$p] = module[_$p]; } exports(_setter); }], execute: funct...
var vows = require('vows'); var nock = require('nock'); var vcap = require('../index.js'); var assert = require('assert'); vows.describe('auth').addBatch({ 'When I try to login with invalid credentials': { topic: function() { nock('http://endpoint.example.com').post('/users/me/tokens', { password: ...
var selectedPackage = null; var curUser = null; var Ajax = { request: function (url, method, headers, data, success, failure) { var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function () { if (xhr.readyState === XMLHttpRequest.DONE && xhr.status === 200) { // th...
var mongoose = require('mongoose'); var moment = require('moment'); //在这个对象中描述用户的文档结构和数据类型 var RoleSchema = new mongoose.Schema({ roleName: { type: String }, preState: Number, postState: Number, meta: { createAt: { type: Date, default: Date.now() }, updateAt: { type: Date, ...
import postcss from 'postcss'; import simpleVars from 'postcss-simple-vars'; function parseNameAndArgs(rule) { const name = rule.params.split('(', 1)[0]; const rest = rule.params.slice(name.length).trim(); const args = []; if (rest) { if (rest.substring(rest.length - 1) !== ')') throw rule....
log.warn( "[Bundle Ensure Plugin] Unable to check installed for external: " + item.name + ' (which using "' + item.libraryTarget + '" libraryTarget is not supported yet), just skipped.' );
import React from 'react'; import ReactDOM from 'react-dom'; import { shallow, mount, render } from 'enzyme'; import SortSection from '../components/SortSection'; describe('SortSection view', () => { it('renders without props', () => { const div = document.createElement('div'); ReactDOM.render(<SortSection/>...
import BaseEntity from './base-entity'; import CompoundEntity from './compound-entity'; import ImageEntity from './image-entity'; import Manager from './manager'; import Movement from './movement'; import TextEntity from './text-entity'; import Vector2D from './vector2d.js'; import Sprite from './sprite'; import Mixer ...
/** * @ngdoc object * @name Metadata.Generators * @description Metadata objects are cool, and easily to understand if you read them properly formatted. However, writing yourself all the metadata required to successfully - and contextually completely - define an application would be a really tedious job. To simplif...
/* eslint-disable max-lines,max-lines-per-function */ // @ts-check /*! * V4Fire Client Core * https://github.com/V4Fire/Client * * Released under the MIT license * https://github.com/V4Fire/Client/blob/master/LICENSE */ const h = include('tests/helpers'), delay = require('delay'), images = require('./const'...
App.ControlGroupView = Em.View.extend({ layoutName: "controlGroup" });
var path = require('path'); var assert = require('assert'); var Server = require(path.resolve(__dirname, '..', 'test-helpers', 'https', 'server')); var ContextStub = require(path.resolve(__dirname, '..', 'test-helpers', 'context')); var CfnLambda = require(path.resolve(__dirname, '..', 'index')); describe('Async sup...
'use babel' import { searchByType, searchForPropTypes, searchByLocationAndType } from '../lib/node-ops' describe('node-ops', () => { describe('searchByLocationAndType', () => { const insideFindMe = { type: 'JSXElement', name: { name: 'insideFindMe' }, loc: { start: { column: 5, line: 6 }...
/* Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'find', 'zh-cn', { find: '查找', findOptions: '查找选项', findWhat: '查找:', matchCase: '区分大小写', matchCyclic: '循环匹配', matchWord: '全字匹配', not...
// Load in dependencies var assert = require('assert'); var fs = require('fs'); var rimraf = require('rimraf'); var getPixels = require('get-pixels'); var gruntUtils = require('./utils/grunt'); // Set up default variables var expectedDir = __dirname + '/expected_files/'; var actualDir = __dirname + '/scratch/'; // Cl...
import Component from '@glimmer/component'; import { isEqual, isBlank } from '@ember/utils'; import { action } from '@ember/object'; import columnStyle from 'ember-tabella/utils/column-style'; export default class EmberTabellaHeaderColumn extends Component { get minWidth() { return this.args.column.minWidth || 5...
define(["text!templates/todo-stats.html", "underscore", "backbone" ], function(template, _, Backbone) { var TodoStatsView = Backbone.View.extend({ template: _.template(template), initialize: function() { _.bindAll(this); this.collection.on("all", this.render); }, render:...
'use strict'; module.exports = { app: { name: 'boiler-node', title: 'BoilerNode', description: 'Boilerplate code for node.js REST server using express', keywords: 'Node.js, Express, REST' }, sessionSecret: 'BN', sessionCollection: 'sessions', port: process.env.PORT |...
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const createHash = require("./util/createHash"); const ModuleFilenameHelpers = exports; ModuleFilenameHelpers.ALL_LOADERS_RESOURCE = "[all-loaders][resource]"; ModuleFilenameHelpers.REGEXP_ALL...
version https://git-lfs.github.com/spec/v1 oid sha256:1e65642aad885ee549050da468bca27ff2b09986f962dd3893c600c4eaf6b7a7 size 14835
'use strict' /* * todo ftp deploy */
var SE = (function(SE) { SE.simulation = { randomise: function(list) { var map = []; var result = []; for (var i=0; i < list.length; i++) { map.push({ index: i, value: Math.random() }); } map.sort(function(a, b) { return a.value > b.valu...
var csrftoken = $.cookie('csrftoken'); function csrfSafeMethod(method) { // these HTTP methods do not require CSRF protection return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method)); } $.ajaxSetup({ beforeSend: function(xhr, settings) { if (!csrfSafeMethod(settings.type) && !this.crossDomain) { ...
export default (sequelize, DataTypes) => { const match = '(\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])'; const altMatch = '(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,})'; const Organisation = sequelize.define('Organisation', { id: { type: DataTypes.UUID, allowNull: false, primaryKey: true, ...
var mod = require('../task-3-module.js'); var fs = require('fs'); exports.time = function (test) { test.expect(4); if (!fs.existsSync('tests/files')) { fs.mkdirSync('tests/files'); fs.writeFileSync('tests/files/a', ''); } if ( fs.existsSync('tests/files/a') ) { test.equal( mod.getTime('tests/fil...
var express = require('express'); var router = express.Router(); var wechatConfig = require('./wechatConfig'); var wechatCgiBinHelper = require('./wechatCgiBinHelper'); router.get('/', function (req, res, next) { var url = req.protocol + '://' + wechatConfig.hw.maindomain + req.originalUrl; console.log("url:...
'use strict'; describe('Service: HackerNews', function () { // load the service's module beforeEach(module('hackerNewsTabApp')); // instantiate service var HackerNews; beforeEach(inject(function (_HackerNews_) { HackerNews = _HackerNews_; })); it('should do something', function () { expect(!!H...
if (typeof define !== 'function') { var define = require('amdefine')(module); } define(['require', '../user_repos_view'], function(require) { var BaseView = require('../base'); var exports = BaseView.extend({ className: 'users_show_view', getTemplateData: function() { var data = BaseView.proto...
(function(){ 'use strict'; /* global $ */ function getCurrentSettings(){ return JSON.parse(localStorage.settings || '{}') || { }; } $.browser = {}; // work out the browser platform var ua = navigator.userAgent; if (ua.indexOf(' Mac ') !== -1) { $.browser.platform = 'mac'; } else if (/w...
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import 'babel-polyfill'; import ReactDOM from 'react-dom';...
var hashTrack = angular.module('hashTrack', ['ngRoute', 'uiGmapgoogle-maps']); hashTrack.config(function($routeProvider) { $routeProvider.when('/', { controller: 'SearchController', templateUrl: 'js/search/search.view.html' }).when('/login', { controller: 'LoginController', templateUrl: 'js/logi...
const router = require('express').Router(); const utils = require('../utils'); const makeIcon = utils.makeIcon; const ClarityIcons = require('@clr/icons/shapes/all-shapes'); const count = Object.keys(ClarityIcons.AllShapes).length; let icons = {}; Object.keys(ClarityIcons.AllShapes).map(name => { const svgIcon = C...
"use strict" const winston = require("winston") const util = require("util") const mkdirp = require("mkdirp") const cluster = require("cluster") let logger let newLogger = (enableConsoleLogging, loggerLevel, enableFileLogger, fileLoggerPath) => { return new Promise(resolve => { logger = new (winston.Log...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); const nodes_1 = require("../types/nodes"); const ast_1 = require("../utils/ast"); /** * Returns information about Variable Declaration. */ function makeVariable(node, fromMixin = null) { const valueNode = fromMixin ? node.getDefa...
module.exports = { src: [ '**/*.spec.js', '!node_modules/**/*' ], options: { coverageFolder: 'coverage', mochaOpts: ['--harmony'], istanbulOptions: ['--harmony'] } };
import Vue from 'vue' import store from './vuex/store' import App from './components/App.vue' new Vue({ store, el: 'body', components: { App } })
var breadcrumbs=[['-1',"",""],['2',"SOLUTION-WIDE PROPERTIES Reference","topic_0000000000000C16.html"],['655',"Tlece.Recruitment.Entities Namespace","topic_0000000000000265.html"],['810',"tlece_BadgesCategoryMatrix Class","topic_00000000000002F5.html"],['811',"Properties","topic_00000000000002F5_props--.html"],['816',"...
'use strict'; var passport = require('passport'); module.exports = { login: function(req, res, next) { var auth = passport.authenticate('local', function(err, user) { if (err) { return next(err); } if (!user) { res.send({success: false})...
/** * Created by st0001 on 2016/11/28. */ function drawRecords() { var option = { title: { text: '运动记录' }, tooltip: { trigger: 'axis' }, xAxis: { data: data.map(function (item) { src=item['created_at']; r...
'use strict'; /* jshint ignore:start */ /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ /* jshint ignore:end */ var Holodeck = require('../../../../holodeck'); /* jshint ignore:line */ var Request = require( '../../../../../../lib/http/request')...
import { setIn, getIn, urlToPageKey } from '../utils' import { REMOVE_PAGE, CLEAR_FLASH, SAVE_RESPONSE, HANDLE_GRAFT, HISTORY_CHANGE, SET_CSRF_TOKEN, COPY_PAGE, UPDATE_FRAGMENTS, } from '../actions' import { config } from '../config' function addPlaceholdersToDeferredNodes(existingPage, page) { const...
// @flow import {createAction, type ActionType} from 'redux-actions' import {createVoidPayloadAction, secureFetch} from '../../common/actions' import {SECURE_API_PREFIX} from '../../common/constants' import type {Feed, FeedVersion, Note} from '../../types' import type {dispatchFn, getStateFn} from '../../types/reduc...
Function.prototype.method = function (name, func) { if (!this.prototype[name]) { this.prototype[name] = func; } return this; }; Number.method('integer', function () { return Math[this < 0 ? 'ceil': 'floor'](this); }); String.method('trim', function () { return this.replace(/^\s+|\s+$/g, ''); ...
/** * http://stackoverflow.com/a/17364716 */ angular.module('gwf4').directive('ngCrsrup', function() { return function(scope, element, attrs) { element.bind("keydown keypress", function(event) { if(event.which === 38) { scope.$apply(function(){ scope.$eval(attrs.ngCrsrup, {'event': event}); }); ...
import styles from './submitButton.css'; import React, { Component } from 'react'; export default class SubmitButton extends Component { constructor(props) { super(props); //use default styles if not given in props if(props.styles) { for(var style in styles) { if(styles.hasOwnProperty(style)) { i...
#!/usr/bin/env node 'use strict'; var assert = require('assert'); var supported = require('../fixtures/supported.json'); var unsupported = require('../fixtures/unsupported.json'); var pkgJsonUtil = require('../../lib/pkgJsonUtil'); describe('pkgJsonUtil', function () { describe('#getDependencies()', function ()...
import _ from 'lodash' import React, { Component } from 'react' import { Container, Divider, Dropdown, Grid, Header, Icon, Image, List, Menu, Segment, Visibility, } from 'semantic-ui-react' const menuStyle = { border: 'none', borderRadius: 0, boxShadow: 'none', marginBottom: '1em', marg...
/** * Created by Gaohaoyang on 2015.4.30 */ // 判断arr是否为一个数组,返回一个bool值 function isArray(arr) { return typeof arr === "object" && Object.prototype.toString.call(arr) === "[object Array]"; } // 判断fn是否为一个函数,返回一个bool值 function isFunction(fn) { return typeof fn === "function"; } //--------------------------------...
import '../../../test/unit-test-support/setup-test-dom'; import { expect } from 'chai'; import React, { PropTypes } from 'react'; import ReactDOM from 'react-dom'; import Purchases from './Purchases'; let samplePurchases = { rentals: [ { title: '50 Shades of Grey', cost: 4.99 } ], buyAndKeep: [ { title:...