code
stringlengths
2
1.05M
var axios = require('axios') module.exports = function (app) { app.get('/context_all.jsonld', function (req, res) { axios.get(app.API_URL + 'context_all.jsonld') .then(function (response) { res.type('application/ld+json') res.status(200).send(JSON.stringify(response.data, null, 2)) })...
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 = Reflect.decorate(d...
'use strict'; import React from 'react-native' import { AppRegistry, Component, Navigator, ToolbarAndroid, View, } from 'react-native'; import globalStyle, { colors } from './globalStyle'; class NavBar extends Component { onClickBackToHome() { this.props.navigator.push({ name: 'home', sc...
import React, { Component, PropTypes } from 'react'; import ItemTypes from './ItemTypes'; import { DragSource, DropTarget } from 'react-dnd'; import flow from 'lodash.flow'; function isNullOrUndefined(o) { return o == null; } const cardSource = { beginDrag(props) { return { id: props.id, index: pr...
// @license // Redistribution and use in source and binary forms ... // Copyright 2012 Carnegie Mellon University. All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, are // permitted provided that the following conditions are met: // // 1. Redistributions of sou...
describe('gridClassFactory', function() { var gridClassFactory; beforeEach(module('ui.grid.ie')); beforeEach(inject(function(_gridClassFactory_) { gridClassFactory = _gridClassFactory_; })); describe('createGrid', function() { var grid; beforeEach( function() { grid = gridClassFactory.cre...
var searchData= [ ['setdebugflags',['setDebugFlags',['../dwarfDbgDebugInfo_8c.html#ab42dd1f5e0f83cb14eed0902aa036a95',1,'dwarfDbgDebugInfo.c']]], ['showchildren',['showChildren',['../dwarfDbgDieInfo_8c.html#a7e7301f838fc67cbb4555c6c250c2dc0',1,'dwarfDbgDieInfo.c']]], ['showcontents',['showContents',['../dwarfDbgL...
import 'reflect-metadata'; import 'rxjs/Rx'; import 'zone.js'; import AppComponent from './components/AppComponent.js'; import { bootstrap } from 'angular2/platform/browser'; bootstrap(AppComponent);
/** * Returns an Express Router with bindings for the Admin UI static resources, * i.e files, less and browserified scripts. * * Should be included before other middleware (e.g. session management, * logging, etc) for reduced overhead. */ var browserify = require('../middleware/browserify'); var express = requir...
'use strict' const isPlainObject = require('lodash.isplainobject') const getPath = require('lodash.get') const StaticComponent = require('./StaticComponent') const DynamicComponent = require('./DynamicComponent') const LinkedComponent = require('./LinkedComponent') const ContainerComponent = require('./ContainerCompo...
'use strict'; var program = require('commander'); var Q = require('q'); var fs = require('fs'); var resolve = require('path').resolve; var stat = Q.denodeify(fs.stat); var readFile = Q.denodeify(fs.readFile); var writeFile = Q.denodeify(fs.writeFile); var assign = require('./util/assign'); program .option('--get', ...
import qambi, { getMIDIInputs } from 'qambi' document.addEventListener('DOMContentLoaded', function(){ console.time('loading and parsing assets took') qambi.init({ song: { type: 'Song', url: '../data/minute_waltz.mid' }, piano: { type: 'Instrument', url: '../../instruments/h...
export default function widget(widget=null, action) { switch (action.type) { case 'widget.edit': return action.widget; case 'widget.edit.close': return null; default: return widget; } }
'use strict'; var MemoryStats = require('../../src/models/memory_stats') , SQliteAdapter = require('../../src/models/sqlite_adapter') , chai = require('chai') , expect = chai.expect , chaiAsPromised = require('chai-as-promised'); chai.use(chaiAsPromised); describe('MemoryStats', function() { describe('.con...
module.exports = { resolve: { alias: { 'vue': 'vue/dist/vue.js' } } }
/** * Created by kalle on 12.5.2014. */ /// <reference path="jquery.d.ts" /> var TheBall; (function (TheBall) { (function (Interface) { (function (UI) { var ResourceLocatedObject = (function () { function ResourceLocatedObject(isJSONUrl, urlKey, onUpdate, boundToElements, boundTo...
module.exports = { prefix: 'far', iconName: 'road', icon: [576, 512, [], "f018", "M246.7 435.2l7.2-104c.4-6.3 5.7-11.2 12-11.2h44.9c6.3 0 11.5 4.9 12 11.2l7.2 104c.5 6.9-5 12.8-12 12.8h-59.3c-6.9 0-12.4-5.9-12-12.8zM267.6 288h41.5c5.8 0 10.4-4.9 10-10.7l-5.2-76c-.4-5.2-4.7-9.3-10-9.3h-31c-5.3 0-9.6 4.1-10 9.3l-5.2 76c-...
'use strict'; module.exports = function(config) { config.set({ autoWatch : true, frameworks: ['jasmine'], browsers : ['PhantomJS'], plugins : [ 'karma-phantomjs-launcher', 'karma-jasmine', 'karma-coverage' ], preprocessors: { 'src/**/*.js': ['coverage...
import traverse from "../lib"; import assert from "assert"; import { parse } from "babylon"; import * as t from "babel-types"; function getPath(code) { const ast = parse(code, { plugins: ["flow", "asyncGenerators"] }); let path; traverse(ast, { Program: function (_path) { path = _path; _path.stop...
var Chartist = require('chartist'); module.exports = makePluginInstance; makePluginInstance.calculateScaleFactor = calculateScaleFactor; makePluginInstance.scaleValue = scaleValue; function makePluginInstance(userOptions) { var defaultOptions = { dot: { min: 8, max: 10, unit: 'px' }, ...
exports.BattleStatuses = { brn: { effectType: 'Status', onStart: function (target, source, sourceEffect) { if (sourceEffect && sourceEffect.id === 'flameorb') { this.add('-status', target, 'brn', '[from] item: Flame Orb'); return; } this.add('-status', target, 'brn'); }, onBasePower: function ...
version https://git-lfs.github.com/spec/v1 oid sha256:5a4f668a21f7ea9a0b8ab69c0e5fec6461ab0f73f7836acd640fe43ea9919fcf size 89408
// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.16/esri/copyright.txt for details. //>>built define({widgetLabel:"\u56fe\u5c42\u5217\u8868",noItemsToDisplay:"\u5f53\u524d\u6ca1\u6709\u8981\u663e\u793a\u7684\u9879\u76ee\u3002",layerInvisibleAtScale:"\u5728\...
( function( factory ) { if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. define( [ "jquery" ], factory ); } else { // Browser globals factory( jQuery ); } } ( function( $ ) { $.ui = $.ui || {}; return $.ui.version = "1.12.1"; } ) ); /*! * jQuery UI Widget 1...
import * as types from '@/store/mutation-types'; export default { namespaced: true, state: { type: 0, catId: 0 }, getters: { [types.STATE_INFO]: state => { return state.type + 3; } } }
document.observe('click', function(e, el) { if (el = e.findElement('form a.add_nested_fields')) { // Setup var assoc = el.readAttribute('data-association'); // Name of child var target = el.readAttribute('data-target'); var blueprint = $(el.readAttribute('data-blueprint-id')); var cont...
import { Component } from 'vidom'; import { DocComponent, DocTabs, DocTab, DocAttrs, DocAttr, DocExample, DocChildren, DocText, DocInlineCode } from '../../Doc'; import SimpleExample from './examples/SimpleExample'; import simpleExampleCode from '!raw!./examples/SimpleExample.js'; export default function ModalDoc({ ta...
// Copyright 2013-2022, University of Colorado Boulder /** * A DOM drawable (div element) that contains child blocks (and is placed in the main DOM tree when visible). It should * use z-index for properly ordering its blocks in the correct stacking order. * * @author Jonathan Olson <jonathan.olson@colorado.edu> *...
"use strict"; /** * Broadcast updates to client when the model changes */ Object.defineProperty(exports, "__esModule", { value: true }); var product_events_1 = require("./product.events"); // Model events to emit var events = ['save', 'remove']; function register(socket) { // Bind model events to socket events ...
/** * vuex-mapstate-modelvalue-instrict- v0.0.4 * (c) 2017 fsy0718 * @license MIT */ 'use strict'; var push = Array.prototype.push; var pop = Array.prototype.pop; var _mapStateModelValueInStrict = function (modelValue, stateName, type, opts, setWithPayload, copts) { if ( opts === void 0 ) opts = {}; if ( copts...
// The file contents for the current environment will overwrite these during build. // The build system defaults to the dev environment which uses `environment.ts`, but if you do // `ng build --env=prod` then `environment.prod.ts` will be used instead. // The list of which env maps to which file can be found in `ang...
var namespace_pathfinder_1_1_internal_1_1_g_u_i = [ [ "ModExtensionsUI", "class_pathfinder_1_1_internal_1_1_g_u_i_1_1_mod_extensions_u_i.html", "class_pathfinder_1_1_internal_1_1_g_u_i_1_1_mod_extensions_u_i" ], [ "ModList", "class_pathfinder_1_1_internal_1_1_g_u_i_1_1_mod_list.html", "class_pathfinder_1_1_inte...
// Karma configuration // Generated on Wed Jun 01 2016 16:04:37 GMT-0400 (EDT) module.exports = function (config) { config.set({ basePath: '', // available frameworks: https://npmjs.org/browse/keyword/karma-adapter frameworks: ['mocha', 'browserify'], // include only tests here; ...
import 'babel-polyfill'; import EdgeGrid from 'edgegrid'; import dotenv from 'dotenv'; import inquirer from 'inquirer'; import formatJson from 'format-json'; import fs from 'fs'; (async function() { // load .env vars dotenv.config(); let papiResponses = new Map(); const edgegrid = new EdgeGrid({ ...
export default { Control : require('./Control'), Delete : require('./Delete'), Detail : require('./Detail'), Head : require('./Head'), Quit : require('./Quit'), };
$(function() { // column select dw.backend.on('sync-option:base-color', sync); function sync(args) { var chart = args.chart, vis = args.vis, theme_id = chart.get('theme'), labels = getLabels(), $el = $('#'+args.key), $picker = $('.base-...
import Game from '../models/game' class Store { constructor() { const game = new Game({ onTick: () => { this.ui.game.update() } }) const { snake, map } = game this.snake = snake this.map = map this.game = game game.start() this.ui = {} this.data = { m...
(function () { 'use strict'; angular.module('app.layout', ['app.core', 'ui.bootstrap.collapse']); })();
/** * @class Oskari.mapframework.bundle.layerselector2.view.PublishedLayersTab * */ Oskari.clazz.define("Oskari.mapframework.bundle.layerselector2.view.PublishedLayersTab", /** * @method create called automatically on construction * @static */ function (instance, title) { //"use stri...
'use strict'; // eslint-disable-line const { default: ImageminPlugin } = require('imagemin-webpack-plugin'); const imageminMozjpeg = require('imagemin-mozjpeg'); const UglifyJsPlugin = require('uglifyjs-webpack-plugin') const config = require('./config'); module.exports = { plugins: [ new ImageminPlugin({ ...
var _ = require('lodash'), fs = require('fs'), path = require('path'), through = require('through'), filesize = require('file-size'); function browserify(file, options) { var source = []; function write(data) { source.push(data); }; function end(file, options) { var renderTemplate = f...
"use strict"; var filters = require('./filters'), uniq = require('uniq'); var doNgram = function doNgram (string, resultData, config) { var ngramCount = string.length - config.n + 1, ngram, previousNgram = null, ngramData, i; for (i = 0; i < ngramCount; i++) { ngra...
var Models = {}; module.exports = Models; /** * Creates a new instance of the Model class * @constructor */ Models.Model = function(id, name, status, type, normalValue, wierdValue) { /** @type {string} */ this._id = id || ''; /** @type {string} */ this.name = name || ''; /** @type {string} */ ...
/* ============================================================= * bootstrap-collapse.js v2.3.2 * http://getbootstrap.com/2.3.2/javascript.html#collapse * ============================================================= * Copyright 2012 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License")...
angular.module('Eintrag').service('editarService', ['$http', function ($http) { this.editarUsuario = function (data) { return $http.post('http://localhost/Eintrag/www/server.php/editarUsuario', $.param(data)); }; }]);
appService.factory('Chats', function() { // Might use a resource here that returns a JSON array // Some fake testing data var chats = [{ id: 0, name: 'Ben Sparrow', lastText: 'You on your way?', face: 'app/view/common/img/ben.png' }, { id: 1, name: 'Max Lynx', lastText: ...
import { AppRegistry } from "react-native"; import App from "./App"; AppRegistry.registerComponent("KeepTheBallGame", () => App);
import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from 'material-ui/styles'; import AppBar from 'material-ui/AppBar'; import Tabs, { Tab } from 'material-ui/Tabs'; import PhoneIcon from '@material-ui/icons/Phone'; import FavoriteIcon from '@material-ui/icons/Favorite'; import PersonPi...
// Actions export const ADD_NOTIFICATION = 'notifications/ADD_NOTIFICATION' export const DISMISS_NOTIFICATION = 'notifications/DISMISS_NOTIFICATION' export const CLEAR_NOTIFICATIONS = 'notifications/CLEAR_NOTIFICATIONS' // Reducer export const initialState = [] export default function reducer(state = initialState, act...
var rarities = { 'Common': { name: 'Common', level_prop: 'MultiplierQ1' }, 'Rare': { name: 'Rare', level_prop: 'MultiplierQ2' }, 'Epic': { name: 'Epic', level_prop: 'MultiplierQ3' }, 'Legendary': { name: 'Legendary', level_prop: 'MultiplierQ4' }, 'Mythic': { name: '...
var NaturalLanguageUnderstandingV1 = require('watson-developer-cloud/natural-language-understanding/v1.js'); var ToneAnalyzerV3 = require('watson-developer-cloud/tone-analyzer/v3'); let fs = require('fs'); let path = require('path'); const directoryName = path.dirname(__filename); const creds = { tone: { "userna...
var encodeDecode = function() { var randomNum = function (min, max) { // helper function for random numbers return Math.random() * (max - min) + min; }; var insertBreak = function (counter) { //helper function to break lines @ 100 char if (counter % 100 === 0) { $('body').append("<br>"); ...
import React, { Fragment, Children, cloneElement, useRef, useEffect } from 'react'; import { createPortal } from 'react-dom'; import PropTypes from 'prop-types'; import cx from 'classnames'; import idgen from './idgen'; import Button from './Button'; import { safeJSONStringify } from './utils'; const Modal ...
class KonamiCodeManager { constructor() { this._pattern = "38384040373937396665"; this._keyCodeCache = ''; this._callback = () => {}; this._boundCheckKeyCodePattern = this._checkKeyCodePattern.bind(this); } attach(root, callback) { if (root instanceof Element) { root.removeEventListener...
'use strict'; describe('test search controller', function() { beforeEach(module('mapTweetInfoApp')); beforeEach(module('twitterSearchServices')); beforeEach(module('latLngServices')); describe('searchCtrl', function(){ var scope, ctrl, $httpBackend, $browser, $location; beforeEach(inject(function(_$...
/** * * Trailing Zeroes * * @author: Corey Hart <http://www.codenothing.com> * @description: Removes unecessary trailing zeroes from values * * @before: * .example { * width: 5.0px; * } * * @after: * .example { * width: 5px; * } * */ var CSSCompressor = global.CSSC...
// 文件上传 jQuery(function() { var $ = jQuery, $list = $('#thelist'), $btn = $('#ctlBtn'), state = 'pending', // 优化retina, 在retina下这个值是2 ratio = window.devicePixelRatio || 1, // 缩略图大小 thumbnailWidth = 100 * ratio, thumbnailHeight = 100 * ratio, up...
'use strict'; module.exports = { client: { lib: { // Load Angular-UI-Bootstrap module templates for these modules: uibModuleTemplates: [ 'modal', 'popover', 'progressbar', 'tabs', 'tooltip', 'typeahead' ], css: [ 'public/lib/fontello...
(function (w) { var $ = w.$, d = document, e = d.documentElement, g = d.getElementsByTagName('body')[0], my = w.ilm, contid = 0; function fixCharts(width, fn) { $(fn).css("width", width); $(d).ready(function () { var inner = $(fn).width(); setTimeout(function () { $.each(w.ilm.charts...
import setupStore from 'dummy/tests/helpers/store'; import Ember from 'ember'; import {module, test} from 'qunit'; import DS from 'ember-data'; var env, store; var attr = DS.attr; var hasMany = DS.hasMany; var belongsTo = DS.belongsTo; var run = Ember.run; var Post, Tag; module("unit/many_array - DS.ManyArray", { ...
import WordSearch from './word-search'; describe('single line grids', () => { test('Should accept an initial game grid', () => { const grid = ['jefblpepre']; const wordSearch = new WordSearch(grid); expect(wordSearch instanceof WordSearch).toEqual(true); }); xtest('can accept a target search word',...
'use strict'; /* Controllers */ angular.module('myApp.controllers') .controller('DatepickerDemoCtrl', ['$scope','$timeout',function($scope, $timeout) { $scope.today = function() { $scope.dt = new Date(); }; $scope.today(); $scope.showWeeks = true; $scope.toggle...
import {Manager} from './manager' export {Filterer} from './filter'; export {Logger} from './logger'; export {Manager}; var logging = new Manager(); export default logging;
/** * Created by larry on 2017/1/6. */ import React from 'react'; import Todo from './Todo'; //圆括号里面要写大括号 const TodoList = ({todos, onTodoClick}) => { return ( <ul> { todos.map ( todo => <Todo ...
requirejs.config({ // baseUrl: '/', paths: { lodash: '//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash', jquery: '//code.jquery.com/jquery-1.11.0.min', react: '//cdnjs.cloudflare.com/ajax/libs/react/0.13.3/react-with-addons' }, shim: { lodash: {exports: '_'}, ...
export const bubble = {"viewBox":"0 0 16 16","children":[{"name":"path","attribs":{"fill":"#000000","d":"M8 1c4.418 0 8 2.91 8 6.5s-3.582 6.5-8 6.5c-0.424 0-0.841-0.027-1.247-0.079-1.718 1.718-3.77 2.027-5.753 2.072v-0.421c1.071-0.525 2-1.48 2-2.572 0-0.152-0.012-0.302-0.034-0.448-1.809-1.192-2.966-3.012-2.966-5.052 0-...
export { default } from 'ember-fhir/serializers/timing-repeat';
$(document).ready(function() { //Note: default min/max ranges are defined outside of this JS file //include "js/BoulderRouteGradingSystems.js" before running this script //generate Bouldering rating selection upon click //Find which boulder grading system is selected and update the difficulty range //*********...
'use strict'; jQuery(document).ready(function ($) { var lastId, topMenu = $("#top-navigation"), topMenuHeight = topMenu.outerHeight(), // All list items menuItems = topMenu.find("a"), // Anchors corresponding to menu items scrollItems = menuItems.map(function () { ...
/* eslint-env jasmine, jest */ import React from 'react'; import View from '../'; import StyleSheet from '../../StyleSheet'; import { act } from 'react-dom/test-utils'; import { createEventTarget } from 'dom-event-testing-library'; import { render } from '@testing-library/react'; describe('components/View', () => { ...
/* * Globalize Culture co * * http://github.com/jquery/globalize * * Copyright Software Freedom Conservancy, Inc. * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * This file was generated by the Globalize Culture Generator * Translation: bugs found in this file...
(function () { 'use strict'; angular.module('customers') .controller('OneCustomerCtrl', function ($scope, customers, $stateParams) { var cid = $stateParams.cid; $scope.customer=_.find(customers, function (customer) { return customer.profile.userName===cid; ...
var exptemplate = require('../prepublic/javascripts/exptemplate'); module.exports = exptemplate;
/** * Created by jsturtevant on 1/18/14 */ var DEFAULT_SHORTCUT_KEY = 'ctrl+shift+k'; var LOCAL_STORAGE_KEY = 'optionsStore' var defaultOptions = { shortcuts: [ {key: "", value:""} ], cssSelectors: [{value:""}], shortcutKey: DEFAULT_SHORTCUT_KEY, includeIFrames: true }; var optionsApp = ...
import { fromJS, OrderedMap } from 'immutable'; const vaccines = fromJS([ { name: 'AVA (BioThrax)', id: '8b013618-439e-4829-b88f-98a44b420ee8', diseases: ['Anthrax'], }, { name: 'VAR (Varivax)', id: 'f3e08a56-003c-4b46-9dea-216298401ca0', diseases: ['Varicella (Chickenpox)'], }, { ...
(function (r) { "use strict"; var events = r('events'); var eventEmitter = new events.EventEmitter(); var playerManager = r('../PlayerSetup/player-manager').playerManager; var helper = r('../helpers'); var world = { valston: r('../../World/valston/prison') }; var time...
/** * 页面管理 * @author: SimonHao * @date: 2015-12-19 14:24:08 */ 'use strict'; var path = require('path'); var fs = require('fs'); var extend = require('extend'); var mid = require('made-id'); var file = require('./file'); var config = require('./config'); var page_list = {}; var comm_option = confi...
export { default } from 'ember-flexberry-gis/components/flexberry-wfs-filter';
lychee.define('Font').exports(function(lychee) { var Class = function(spriteOrImages, settings) { this.settings = lychee.extend({}, this.defaults, settings); if (this.settings.kerning > this.settings.spacing) { this.settings.kerning = this.settings.spacing; } this.__cache = {}; this.__images = null; ...
import { h } from 'omi'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon(h("path", { d: "M8 9v1.5h2.25V15h1.5v-4.5H14V9H8zM6 9H3c-.55 0-1 .45-1 1v5h1.5v-1.5h2V15H7v-5c0-.55-.45-1-1-1zm-.5 3h-2v-1.5h2V12zM21 9h-4.5c-.55 0-1 .45-1 1v5H17v-4.5h1V14h1.5v-3.51h1V15H22v-5c0-.55-.45-1-1-1z" }...
var fb = "https://glaring-fire-5349.firebaseio.com"; var TodoCheck = React.createClass({displayName: "TodoCheck", getInitialState: function() { this.checked = false; return {checked: this.checked}; }, componentWillUnmount: function() { this.ref.off(); }, componentWillMount: function() { this....
// bundles everything except TS files which will be built by rollup. // webpack stuff var webpack = require('webpack'); var HtmlWebpackPlugin = require('html-webpack-plugin'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var failPlugin = require('webpack-fail-plugin'); var helpers = require('./helpe...
exports.up = function (knex, Promise) { return Promise.all([ knex.schema.createTable('locations', function (table) { table.uuid('id').notNullable().primary() table.string('title').notNullable().unique() table.text('description') table.string('address_1') table.string('address_2') ...
(function( window, $, undefined ) { // http://www.netcu.de/jquery-touchwipe-iphone-ipad-library $.fn.touchwipe = function(settings) { var config = { min_move_x: 20, min_move_y: 20, wipeLeft: function() { }, wipeRight: function() { }, wipeUp: function() { }, wipeDown: function() { }, pr...
#!/usr/bin/env node var _ = require('lodash'); var async = require('async-chainable'); var asyncFlush = require('async-chainable-flush'); var colors = require('chalk'); var doop = require('.'); var glob = require('glob'); var fs = require('fs'); var fspath = require('path'); var program = require('commander'); var sha...
if(!Hummingbird) { var Hummingbird = {}; } Hummingbird.Base = function() {}; Hummingbird.Base.prototype = { validMessageCount: 0, messageRate: 20, initialize: function() { this.averageLog = []; this.setFilter(); this.registerHandler(); }, registerHandler: function() { this.socket.registe...
define([ 'knockout' ],function( ko ){ ko.bindingHandlers.withfirst = { 'init' : function(element, valueAccessor, allBindings, viewModel, bindingContext) { var savedNodes; ko.computed(function() { var dataValue = ko.utils.unwrapObservable(valueAccessor()); var shouldDisplay = typeof...
var bunyanConfig = require('../index'); var bunyan = require('bunyan'); var path = require('path'); describe('bunyan-config', function () { it('should not convert things it does not understand', function () { bunyanConfig({ name: 'test', streams: [{ path: '/tmp/log.l...
'use strict'; var http = require('http'); var Logger = require('bunyan'); var log = new Logger({ name: 'test-server', level: 'debug' }); var server = http.createServer(function (request) { var data = ''; log.info({ url: request.url }, 'Incoming Request'); request.on('data', function (chunk) { ...
import React from 'react'; import { shallow } from 'enzyme'; import toJson from 'enzyme-to-json'; import EmailField from '../EmailField'; // EmailField // props: inputId // behavior: renders a <Field /> component // test: renders a <Field /> component describe('<EmailField />', () => { it('should render a Fie...
import Ember from 'ember'; export default Ember.Component.extend({ actions: { addFavorite() { this.sendAction('addFavorite', this.get('newFavorite')); } } });
(function ($) { 'use strict'; // Device check for limiting resize handling. var IS_DEVICE = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); function FullHeight(el, options) { this.el = $(el); var data = {}; $.each(this.el.data(), function (attr, value) { if (...
var _ = require('lodash'), restify = require('restify'), async = require('async'); module.exports = function(settings, server, db){ var globalLogger = require(settings.path.root('logger')); var auth = require(settings.path.lib('auth'))(settings, db); var api = require(settings.path.lib('api'))(se...
'use strict'; /** * @ngdoc directive * @name SubSnoopApp.directive:pieChart * @description * # pieChart */ angular.module('SubSnoopApp') .directive('donutChart', ['d3Service', '$window', '$document', 'subFactory', '$filter', 'moment', 'sentiMood', 'reaction', function (d3Service, $window, $document, subFact...
// Description: // There are two lists of different length. The first one consists of keys, // the second one consists of values. Write a function //createDict(keys, values) that returns a dictionary created from keys and // values. If there are not enough values, the rest of keys should have a //None (JS null)value...
"use strict"; const { ParserError } = require("../util/errors"); const yaml = require("js-yaml"); module.exports = { /** * The order that this parser will run, in relation to other parsers. * * @type {number} */ order: 200, /** * Whether to allow "empty" files. This includes zero-byte files, as ...
define([ 'jquery', 'underscore', 'backbone', 'collections/users/students', 'collections/users/classes', 'collections/users/streams', 'text!templates/students/studentnew.html', 'text!templates/students/classes.html', 'text!templates/students/streams.html', 'jqueryui', 'bootstrap' ], function($, _, Backbone, ...
/* global describe */ /* global module */ /* global beforeEach */ /* global inject */ /* global it */ /* global expect */ describe('PanZoom specs', function () { var $scope = null; var $compile = null; var $interval = null; var PanZoomService = null; var deferred = null; var $document = null; ...
var express = require('express'); var user = require('../model/user'); var jsonReturn = require('../common/jsonReturn'); var router = express.Router(); /* GET users listing. */ router.get('/', function(req, res, next) { user.getUsers(function(err, rows, fields){ res.render('users', { users : rows } ); }) }); ...
import { createAction } from 'redux-actions'; import { APP_LAYOUT_CHANGE, APP_LAYOUT_INIT } from './constants'; // 选中菜单列表项 const appLayoutInit = createAction(APP_LAYOUT_INIT); export const onAppLayoutInit = (key) => { return (dispatch) => { dispatch(appLayoutInit(key)); }; }; const appLayoutChange = createAct...