code
stringlengths
2
1.05M
const { app } = require('electron') const globalEmitter = require('../lib/globalEmitter') module.exports = () => { const gotTheLock = app.requestSingleInstanceLock() if (!gotTheLock) { app.quit() } else { globalEmitter.emit('showWindow') } }
(function() { 'use strict'; angular.module('fallout4CoolTools.components.ui.icons', [ 'ngMdIcons' ]); })();
// buffer 对象的实例化,遍历,切片操作,toJSON 操作 var buf = new Buffer(256); buf[0] = 23; for(var i=0; i<256; i++) buf[i] = i; console.log(buf); var end = buf.slice(200, 256); console.log(end); console.log(buf.toJSON());
import React from 'react'; import { render } from 'react-dom'; import { createStore, applyMiddleware, compose } from 'redux'; import { Provider } from 'react-redux'; import { createBrowserHistory as createHistory } from 'history'; import { createRouter } from 'redux-url'; import reducer from './reducer'; import App fro...
// Copyright (c) 2012 Ecma International. All rights reserved. // Ecma International makes this code available under the terms and conditions set // forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the // "Use Terms"). Any redistribution of this code must retain the above // copyright and this n...
import moment from 'moment-timezone' import sinon from 'sinon' import { getActiveOrder, getOrderFormPrice, getOrderList, getOrderedMeals, getUnconfirmedOrder } from '../' describe('Order selectors', () => { let clock beforeEach(() => { clock = sinon.useFakeTimers(moment('2016-01-02T00:00:00Z').toDa...
/* jshint expr: true */ /* global describe */ // shim mz/fs.readFile() var pathModule = require('path'), mz = require('mz/fs'), readFile = mz.readFile; if (!readFile.shimmed) { mz.readFile = function(filename, encoding) { return readFile(pathModule.join(__dirname, 'native', filename), encoding); ...
var express = require('express'); var router = express.Router(); var request = require ('request'); var jsonString = null; var urlIDR = "https://www.quandl.com/api/v3/datasets/YAHOO/MC_IDR.json?api_key=HGoTu3E3A_Lsv6biw1kc"; request({ url: urlIDR, json: true }, function (error, response, body){ if (!error...
define(["UI","Shell","R"], function (UI,sh,R) { var res={}; res.show=function (ide, onLineClick) { var d=res.embed(ide,onLineClick); d.dialog({width:600}); }; res.embed=function (ide, onLineClick) { const files=ide.project.sourceFiles(); if (!res.d) { res.d=UI...
'use strict'; module.exports = { app: { title: 'Musings', description: 'Full-Stack JavaScript with MongoDB, Express, AngularJS, and Node.js', keywords: 'MongoDB, Express, AngularJS, Node.js' }, port: process.env.PORT || 3000, templateEngine: 'swig', sessionSecret: 'MEAN', sessionCollection: 'sessions', as...
/** * Developer: Stepan Burguchev * Date: 6/29/2015 * Copyright: 2009-2015 Comindware® * All Rights Reserved * * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF Comindware * The copyright notice above does not evidence any * actual or intended publication of such source code. */ /* global def...
const gulp = require("gulp"); gulp.task("copy-validation", function() { // const browserSync = require("browser-sync"); const config = require("../util/loadConfig").copy_validation; // browserSync.notify( config.notification ); return gulp.src(config.src) .pipe(gulp.dest(config.dest)); });...
var eyes = require('eyes'), haibu = require('../lib/haibu'); // Create a new client for communicating with the haibu server var client = new haibu.drone.Client({ host: process.env.HOST || '127.0.0.1', port: 9002 }); // A basic package.json for a node.js application on Haibu var app = { "user": "marak", ...
/** * color util * @type {ONECOLOR|exports|*} */ var color = require('onecolor'); exports.rainbow = function (baseColor, length) { baseColor = baseColor || '#EE1'; length = length || 7; var result = []; for (var i = 0; i < length; i++) { var hue = (360 / length * (i % length)) / 360; ...
import _ from "lodash"; import React, {Component} from "react"; import {inject, observer} from "mobx-react"; import PropTypes from "prop-types"; import SelectInput from "../common/SelectInput"; import TextAreaInput from "../common/TextAreaInput"; import Button from "../common/Button"; @inject("outputStore") @observer...
describe('The Indexed Collection', function(){ var collection, emptyCollection; beforeEach(module('collection')); beforeEach(inject(function(IndexedCollection){ collection = new IndexedCollection(['value1','value2','value3']); emptyCollection = new IndexedCollection(); })); it('shoud tell if it is empty', ...
/*global FB*/ import React, { useContext } from "react"; import { FaFacebookSquare } from "react-icons/fa"; import CocktailDatabase from "../CocktailDatabase"; import { DrinkListContext } from "../DrinkListProvider"; import { useLocation } from "react-router-dom"; const shareOverrideOGMeta = ( overrideLink, overri...
/*! * @websanova/vue-auth v4.1.11 * https://websanova.com/docs/vue-auth * Released under the MIT License. */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global.V...
'use strict'; var path = require('path'); function sanitizeOptions(opt) { return { title: opt.title || 'Styleguide Generator', sass: opt.sass || {}, less: opt.less || {}, css: opt.css || {}, kssOpt: opt.kssOpt || {}, overviewPath: opt.overviewPath || path.join(__dirname, '/overview.md'), ...
#!/usr/bin/node var pi = Math.PI; var Circle = function (radius) { this.diameter = function() { return 2 * radius; } this.circumference = function() { return pi * 2 * radius; } this.area = function() { return pi * radius * radius; } } console.log('\n02-export-object\n', module); module.exp...
require("./helpers/setup"); var wd = require("wd"), _ = require('underscore'), Q = require('q'), serverConfigs = require('./helpers/appium-servers'); var Asserter = wd.Asserter; // asserter base class describe("ios simple", function () { this.timeout(300000); var driver; var allPassed = true; b...
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose"; import contains from 'dom-helpers/query/contains'; import React, { cloneElement } from 'r...
var gulp = require('gulp'); var uglify = require('gulp-uglify'); var del = require('del'); var jshint = require('gulp-jshint'); var rename = require('gulp-rename'); var karma = require('karma').server; var path = require('path'); var paths = { scripts: ['src/**/*.js'], dist: 'dist' }; gulp.task('clean', function(...
"use strict"; /** * Timer Class * * - manages a setTimout timer */ class Timer { /** * constructor * * @param {Number} timeout * @param {Function} callback */ constructor(timeout, callback) { this.timeout = timeout; this.callback = callback; this.start(); ...
//= base/amd.js //= base/factory.js ;
Package.describe({ name: 'jshint', version: '1.0.4_1', summary: 'Lint all your JavaScript files with JSHint.', documentation: 'README.md' }); Package.registerBuildPlugin({ name: "lintJshint", sources: [ 'plugin/lint-jshint.js' ], npmDependencies: { "jshint": "2.7.0" } }); Package.onUse(funct...
module.exports = { description: "", ns: "react-material-ui", type: "ReactNode", dependencies: { npm: { "material-ui/svg-icons/action/settings-cell": require('material-ui/svg-icons/action/settings-cell') } }, name: "ActionSettingsCell", ports: { input: {}, output: { component: {...
// jquery shit $(function() { var jptr = 0; $("div[data-toggle=fieldset]").each(function() { var $this = $(this); //Add new entry $this.find("button[data-toggle=fieldset-add-row]").click(function() { //var fieldthis = $(this); var target = $($(this)...
export default from './Settings.js';
var EventEmitter = require('events').EventEmitter; var assign = require('object-assign'); var CONSTANTS = require('./constants'); var keybord = assign({}, EventEmitter.prototype, { start : function(){ this.onKeydownHandler = this.onKeydownHandler.bind(this); document.addEventListener('keydown', this.o...
/*jslint node: true */ module.exports = { app: { // Server IP ip: process.env.ip || undefined, // Server port port: process.env.PORT || 3000 }, // MongoDB connection options mongo: { uri: 'mongodb://sooserver:arbulon@ds060749.mlab.com:60749/soodb' }, jwt...
describe('Testing main.js', function() { // necessary it('newStudent should be object', function() { expect(typeof newStudent).toBe('object'); }); it('newStudent name should be RSR', function() { expect(newStudent.name).toBe('RSR'); }); it('newStudent name should change', function() { newStudent.setName('...
let selectMany = checkMe = prev = false; const boxes = document.querySelectorAll('input[type="checkbox"]'); document.querySelector('.inbox').addEventListener('change', e => { if (selectMany && prev && e.target.checked && prev !== e.target) { boxes.forEach(box => { if (box === prev || box === e.target) { che...
mod = {}; // load paths mod.torito = { paths : require("./paths.js") }; var toInclude = JSON.parse( require("fs").readFileSync(mod.torito.paths.server.includes + "/index.json","utf8") ); for(i in toInclude) { console.log("[["+i+"]]"); mod[i] = require(toInclude[i]); } if("services" in mod) { // DANGER DANGER DAN...
module.exports = (function(global) { return { /** * Creates a global object in a single line * @example * Namespace.create('foo.bar'); // -> foo.bar * @param {String} namespace */ create: (namespace) => { let parent = global const parts = namespace.split('.') const...
import Ember from 'ember'; import Form from 'aeonvera/mixins/components/edit-form'; import ENV from 'aeonvera/config/environment'; export default Ember.Component.extend(Form, { modelName: 'housing-provision', saveSuccessPath: 'events.show.housing.provisions', cancelPath: 'events.show.housing.provisions', paren...
'use strict' /* (c) Copyright 2015, bzb-stcnx * all rights reserved * SEE LICENSE IN ../LICENSE */ /* eslint-env jasmine */ /** * @description recursively create a hierarchically defined spy object * @example * var mock = createSpy({ * fs: [ 'readFile', 'readFileSync' ], * stream: { 'Readable': [ 'read', ...
module.exports = { pragmaExport: 'gio.exports', transformExports: false }
"use strict"; var router_1 = require('@angular/router'); var app_component_1 = require('./app.component'); var routes = app_component_1.appRoutes.slice(); exports.APP_ROUTER_PROVIDERS = [ router_1.provideRouter(routes) ]; //# sourceMappingURL=../../dist/app/app.routes.js.map
function log(x) { document.querySelector('#result').textContent = x; } const sum = (x, y) => x + y; const $leftInput = document.querySelector('#leftT'); const $rightInput = document.querySelector('#rightT'); const $leftButton = document.querySelector('#leftB'); const $rightButton = document.querySelector('#rightB...
'use strict'; var merge = require('extend-shallow'); module.exports = function (engine, assemble) { if(require('handlebars-layouts')(engine) !== engine.helpers.extend) { engine.registerHelper(require('handlebars-layouts')(engine)); } return function (name) { var options = arguments[2] || a...
var test = require('tape') var toGithub = require('../') function t (giturl, url) { test(giturl + ' -> ' +url, function (t) { var _url = toGithub(giturl) t.equal(_url, url) t.end() }) } t( 'git://github.com/isaacs/readable-stream.git', 'https://codeload.github.com/isaacs/readable-stream/tar.gz/...
var category_data_SU = { "99999": { "skill_id": "99999", "tree_id": "99999", "name2_refine": "Blank", "name2_refine_en": "Blank", "pc_level": "0", "pc_mastery_level": "0", "complete_quest": null, "complete_quest_name": null, "default_keycap": "...
js_download = """ var csv = source.get('data'); var filetext = 'itemnum,storename,date,usage,netsales\\n'; for (i=0; i < csv['date'].length; i++) { var currRow = [csv['itemnum'][i].toString(), csv['storename'][i].toString(), csv['date'][i].toString(), csv['us...
const { REQUIRED_CONDITION_PARAMETER_MISSING, REQUIRED_RULE_DEPENDENCY_MISSING, REQUIRED_RULE_PARAMETER_MISSING } = require('./types'); const initializeTypesDefinition = require('./initializeTypesDefinition'); class RuleErrorHandler { constructor({ getRuleAttribute }) { this.addItem = this.ad...
const envEnum = require('./envEnum'); const api = require('./api'); module.exports = { EnvEnum: envEnum, api };
module.exports = function ( karma ) { karma.set({ /** * From where to look for files, starting with the location of this file. */ basePath: '../', /** * This is the list of file patterns to load into the browser during testing. */ files: [ <% scripts.forEach( function ( fil...
var supertest = require('supertest'); var should = require('should'); describe('API tests: login', function() { var port = '7891'; // defined in global.js var request = supertest('http://localhost:' + port); describe('Login', function() { this.slow(500); it('should return an error on em...
/*global expect*/ describe('expect.it', function() { it('returns an expectation function that when applyed runs the assertion on the given subject', function() { var expectation = expect.it('to be greater than', 14); expectation(20); expect( function() { expectation(10); }, 'to t...
'use strict'; var options = require('../config/config'); var AfricasTalking = require('africastalking')(options.AT); var db = require('./../models'); exports.voice = function(req, res) { var isActive = req.body.isActive; if (isActive === '1') { console.log(req.body); var response = '<Response...
var searchData= [ ['index_2ephp',['index.php',['../Assets_2CSS_2index_8php.html',1,'']]], ['index_2ephp',['index.php',['../Views_2index_8php.html',1,'']]], ['index_2ephp',['index.php',['../Model_2index_8php.html',1,'']]], ['index_2ephp',['index.php',['../index_8php.html',1,'']]], ['index_2ephp',['index.php',[...
var app = angular.module('SampleApp', [ 'swiftsuggest' ]); app.controller('SimpleController', function($scope, $http, $timeout) { $scope.moderators = []; $scope.selectedModerator = null; $scope.selectModerator = function(user, suggest) { $scope.selectedModerator = user; suggest.clearInput(); }; $...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = require("@angular/core"); var common_1 = require("@angular/common"); var forms_1 = require("@angular/forms"); exports.TRISTATECHECKBOX_VALUE_ACCESSOR = { provide: forms_1.NG_VALUE_ACCESSOR, useExisting: core_1.forwardRef(f...
/*global $ Matrix Point */ /** * Represents an instance of UnshredTag API client. * @constructor * @param {string} baseUrl - Base URL to use for HTTP requests, e.g. "/api". */ var UnshredAPIClient = function (baseUrl) { this.baseUrl = baseUrl; // Attributes handle shred cache; // shredCache is a mappin...
/* Renderer test */ var fs = require('fs'); var app = require("./app.js"); var svg2png = require('svg2png'); var Renderer = require(app.basepath + "/libs/renderer.js"); Renderer.init(app); var path = app.basepath + "/tests/exports/"; fs.access(path, fs.R_OK | fs.W_OK, function(err) { if (err) { fs.mkdirSync(path...
'use strict'; var soapEnvelope = '<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">' + '{header}' + '{body}' + '</s:Envelope>'; var authenticationHeader = '<s:He...
/** * Helpers and tools to ease your JavaScript day. * * @author Mikael Roos (me@mikaelroos.se) */ window.Foiki = (function(window, document, undefined ) { var Foiki = {}; /** * Display the type of the object * @param the object to check */ Foiki.reflection = function (obj) { // if (t...
import buildCakedayRoute from "discourse/plugins/discourse-cakeday/discourse/routes/build-cakeday-route"; export default buildCakedayRoute("birthday", "tomorrow");
/** * Copyright (c) 2017 Steve Simenic <orffen@orffenspace.com> * * This file is part of the SWN Toolbox. * * 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, inclu...
/** * Created by WareBare on 11/2/2016. */ class cBase extends libWZ.Core.cBase{ constructor(){ super(); // DBR for mod folder (DS - DataSet) //noinspection JSUnresolvedVariable //this._modDBR_DS = wzGD_dataSet; //this._configGD = _wzData.Settings.configGD; ...
/*! * hnzswh-dolalive * Copyright(c) 2015 hnzswh-dolalive <3203317@qq.com> * MIT Licensed */ 'use strict'; var util = require('speedt-utils'), EventProxy = require('eventproxy'), path = require('path'), fs = require('fs'), velocity = require('velocityjs'), cwd = process.cwd(); var conf = require('../../setti...
`use strict` const express = require('express') const app = express() // body parser const bodyParser = require('body-parser') app.use(bodyParser.json()); // for parsing application/json app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded // 启动服务器 const port = 80 const ...
import { joinCommandArgs, requireArgs } from './util' export function formatRmCommand({ file }) { requireArgs(['file'], { file }, 'rm') const args = ['rm', file] return joinCommandArgs(args) }
$(function() { simpleCart({ // array representing the format and columns of the cart, see // the cart columns documentation cartColumns: [ { attr: "name" , label: "Nimi" }, { attr: "price" , label: "Hinta", view: 'currency' }, { view: "decrement" , label: false }, { ...
class QueryClause { constructor(name = '', type = ':', args = []) { this.name = name; this.type = type; this.args = args; } hasArgs() { return this.args.length > 0; } addArg(arg) { this.args.push(arg); } getArg(i = 0) { if (this.args.length > i) { return this.args[i]; } ...
/*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2015 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ // Provides default renderer for control sap.ui.commons.RowRepeater sap.ui.define(['jquery.sap.global', './Button', './Paginator', '....
'use strict'; /* Services */ var dashboardServices = angular.module('dashboardServices', ['ngResource']); dashboardServices.factory('Dashboard', ['$resource', function($resource){ return $resource('https://ci.jenkins-ci.org/view/All/api/json?pretty=true&depth=1', {}, { query: {m...
Template.userProfile.helpers({ name: function(){ return Meteor.user().profile.name; }, email: function(){ var user = Meteor.user(); if (user.emails && user.emails[0]) return Meteor.user().emails[0].address; }, phone: function(){ return Meteor.user().profile.phone; }, });
/*! jQuery Timepicker Addon - v1.4.3 - 2013-11-30 * http://trentrichardson.com/examples/timepicker * Copyright (c) 2013 Trent Richardson; Licensed MIT * The MIT License (MIT) * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Sof...
{"filter":false,"title":"clockpicker.js","tooltip":"/vendor/clockpicker/clockpicker.js","undoManager":{"mark":-1,"position":-1,"stack":[]},"ace":{"folds":[],"scrolltop":2165,"scrollleft":0,"selection":{"start":{"row":153,"column":3},"end":{"row":153,"column":4},"isBackwards":false},"options":{"guessTabSize":true,"useWr...
(function() { function navBarDirective() { return { restrict: 'EA', templateUrl: '../partials/nav-bar.html', replace: true } } var app = angular.module('MyApp') app.directive('navBar', navBarDirective); }());
import $ from 'jquery'; import { ActionType } from './actions'; export default function(state, action) { if (typeof state === 'undefined') { return $(window).height() - 25; } else { switch (action.type) { case ActionType.RESIZE: return $(window).height() - $('#header').height(); } } return state; }
function getCurrentScript(base) { // 参考 https://github.com/samyk/jiagra/blob/master/jiagra.js var stack try { a.b.c() //强制报错,以便捕获e.stack } catch (e) { //safari的错误对象只有line,sourceId,sourceURL stack = e.stack if (!stack && window.opera) { //opera 9没有e.stack,但有e.Backtrace,但不能直接取得,需要对e对象转字符串进行抽取 stack = (Str...
'use strict'; module.exports = { up: function (queryInterface, Sequelize) { return queryInterface.addColumn('Registrations', 'notes', { type: Sequelize.STRING }); }, down: function (queryInterface) { return queryInterface.removeColumn('Registrations', 'notes'); } };...
$(document).ready(function() { var player = document.getElementById('video_player'); var client = new BinaryClient('ws://'+window.location.hostname+':9001'); var stream; var media = new window.MediaSource(); var url = URL.createObjectURL(media); var videoSource; player.src = url; media.addEventListener('sou...
chrome.app.runtime.onLaunched.addListener(function() { chrome.app.window.create('../index.html', { id: 'microflo-ui', bounds: { width: 400, height: 600 }, resizable: false }); });
/** * Copyright (c) 2014, 2017, Oracle and/or its affiliates. * The Universal Permissive License (UPL), Version 1.0 */ "use strict"; define(['ojs/ojcore', 'jquery', 'ojs/ojcomponentcore', 'ojs/ojdomscroller', 'ojs/ojanimation', 'promise'], function(oj, $) { /** * Base class for TableDataSourceContentHandler and Tr...
const gulp = require('gulp'); const sass = require('gulp-sass'); const cleancss = require('gulp-clean-css'); const shell = require('gulp-shell'); const uglify = require('gulp-uglify'); const del = require('del'); const autoprefixer = require('gulp-autoprefixer'); const pump = require('pump'); const cp = require('child_...
module('Basic tests'); test('Test factory creates HeartBeater instance', 1, function(){ var hb = $.createHeartBeater(); ok(hb instanceof $.Acheta.HeartBeater, 'Object is instance of HeartBeater'); }); test('Test start and pause', 10, function(){ var hb = $.createHeartBeater(); stop(3) $(hb).on('heartBeatStarted'...
'use strict' const { expect } = require('chai'); const { execSync } = require('child_process'); describe('cal', () => { describe('CLI', () => { it('should handle the current month', () => { const goal = execSync('cal').toString(); const output = execSync('./cal.js').toString(); expect(output)....
define([ 'ractive', 'viewmodel/Viewmodel', 'virtualdom/Fragment', 'virtualdom/items/Element/_Element', 'virtualdom/items/Triple/_Triple', 'config/types' ], function ( Ractive, Viewmodel, Fragment, Element, Triple, types ) { 'use strict'; return function () { var fixture; module( 'rebind' ); // ...
/* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.lang['sr'] = { "dir": "ltr", "editor": "Rich Text Editor", "common": { "editorHelp": "Press ALT 0 for help", "browseServer": "Претражи...
'use strict' /** * Exposes the apv APIs for the automation. */ exports.update = require('./lib/update').update exports.setVersion = require('./lib/set').setVersion exports.setStatus = require('./lib/set').setStatus
// jshint esversion: 6 import * as THREE from '../../../../../lib/threejs_125/build/three.module.js'; import { GUI } from '../../../../../lib/threejs_125/examples/jsm/libs/dat.gui.module.js'; import { OrbitControls } from '../../../../../lib/threejs_125/examples/jsm/controls/OrbitControls.js'; (function(window) { ...
var RPCLib = require('rpclib'), SkyRPCClient = require('skyrpcclient'), authClient = new SkyRPCClient('auth-api.services.example'), Log = require('modulelog')('robthebuilder'); module.exports = function(rpc) { rpc.setPreProcessor(function(request, response) { if (!request.params || !request.pa...
var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object,...
var util = require('util'); var port = parseInt(process.argv[2], 10); var filename = process.argv[3]; var worker = require("./tcpworker").startWorker(port); var processes = []; worker.onmessage = function (filename) { port = port + 1; var curPort = port; util.error("Starting child "+curPort); var child = p...
#!/usr/bin/env nodejs const express = require('express'); const bodyParser = require('body-parser'); const port = process.env.PORT || 8080; const app = express(); app.use(bodyParser.urlencoded({extended: false})); app.use(bodyParser.json()); app.use(express.static('public')); app.use(express.static('public/favicon')...
/*global module:false*/ module.exports = function(grunt) { // Project configuration. grunt.initConfig({ // Metadata. pkg: grunt.file.readJSON('package.json'), banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' + '<%= grunt.template.today("yyyy-mm-dd") %>\n' + '<%= pkg.homep...
function StringIterator(str){ this.str = str; this.current = 0; this.last = str.length - 1; this.done = function(){ if (this.current > this.last) return true; else return false; }; this.next = function(){ if (this.current > this.last) throw StopIteration; else retur...
var assert = require('assert'); var path = require('path'); var fs = require('fs'); describe('test of test', function() { it('test 1', function(done) { this.timeout(10000); assert.equal(1, 1); done(); }); });
export const ic_device_hub_outline = {"viewBox":"0 0 24 24","children":[{"name":"path","attribs":{"d":"M0 0h24v24H0V0zm0 0h24v24H0V0z","fill":"none"},"children":[]},{"name":"path","attribs":{"d":"M17 16l-4-4V8.82C14.16 8.4 15 7.3 15 6c0-1.66-1.34-3-3-3S9 4.34 9 6c0 1.3.84 2.4 2 2.82V12l-4 4H3v5h5v-3.05l4-4.2 4 4.2V21h5...
/** * Load CSS asynchronously without render blocking. * This variant uses <link> tag. * * If you want to import multiple styles for "progressive loading" * recommended to move all function calls before </body>. */ import { document, root } from './lib/globals'; import onBodyReady from './lib/on-body-ready'; imp...
var http = require('http'); var url = require('url'); function start(route) { function onRequest(request, response) { var pathname = url.parse(request.url).pathname; console.log('Request for' + pathname + 'received.'); route(pathname); response.writeHeader(200, {'Content-Type': 'text/plain'}); ...
import {expect} from 'chai' import { addConflict, alignCoordinates, balance, findSmallestWidthAlignment, findType1Conflicts, findType2Conflicts, hasConflict, horizontalCompaction, positionX, verticalAlignment } from 'ciena-dagre/position/bk' import {buildLayerMatrix} from 'ciena-dagre/util' import...
import { RichUtils } from "draft-js"; const leaveList = editorState => { const contentState = editorState.getCurrentContent(); const selection = editorState.getSelection(); const key = selection.getStartKey(); const currentBlock = contentState.getBlockForKey(key); const type = currentBlock.getType(); retur...
/*globals casper */ /** * Casper Tests * * Functional browser tests for checking that the Ghost Admin UI is working as expected * The setup of these tests is a little hacky for now, which is why they are not wired in to grunt * Requires that you are running Ghost locally and have already registered a single user ...
'use strict'; angular.module('core').controller('calendarController', function($scope) { $scope.name = "blah" }); angular.module('core').directive('chart', function() { return { restrict: 'A', link: function($scope, $elm, $attr) { // Create the data table. ...
( function () { 'use strict'; describe( 'CompetencyTest', function () { it( "First assertion",function () { expect( true ).toBe( true ); } ); } ); } )();
import React, { Component, PropTypes } from 'react'; import { ItemTypes } from './Constants'; import { DragSource } from 'react-dnd'; const dragbuttonSource = { beginDrag(props) { return { id: props.id }; }, endDrag(props, monitor) { const dropResult = monitor.getDropResult(); if (dropResult) { }...