code stringlengths 2 1.05M |
|---|
describe("Unittest.CommodityController: When clicking a commodity", function () {
var $scope, $q;
var CommodityController, CommodityService, CommodityRepository, CommodityServiceSpy, PopupExtension;
beforeEach(function () {
module("whattobuy");
inject(function (_$q_, $rootScope, $inject... |
(function(){
Template.__checkName("before_post_item");
Template["before_post_item"] = new Template("Template.before_post_item", (function() {
var view = this;
return HTML.Raw("<!-- before post item -->");
}));
})();
|
// Copyright 2020-2021, University of Colorado Boulder
/**
*
* @author Michael Kauzmann (PhET Interactive Simulations)
*/
import BasicActionsKeyboardHelpSection from '../../scenery-phet/js/keyboard/help/BasicActionsKeyboardHelpSection.js';
import { Node } from '../../scenery/js/imports.js';
import joist from './jo... |
var struct_int =
[
[ "length", "struct_int.html#a2894ba17eb6001ea4990dc72b54b75a8", null ],
[ "pointer", "struct_int.html#a3f4ea8274904dcbc6a8ec0d26070cb48", null ]
]; |
const LOAD = 'redux-example/auth/LOAD';
const LOAD_SUCCESS = 'redux-example/auth/LOAD_SUCCESS';
const LOAD_FAIL = 'redux-example/auth/LOAD_FAIL';
const LOGIN = 'redux-example/auth/LOGIN';
const LOGIN_SUCCESS = 'redux-example/auth/LOGIN_SUCCESS';
const LOGIN_FAIL = 'redux-example/auth/LOGIN_FAIL';
const LOGOUT = 'redux-... |
/**
* Created by whobird on 17/4/10.
*/
$(document).ready(function(){
var slideCount=$(".section-wrapper").find(".section-slide").length;
console.log(slideCount);
var prevIndex=0;
var lastProgress=0;
var mySwiper = new Swiper('.swiper-container', {
// slidesPerView: 3.2,
freeMode:t... |
/**
* Created by Katie on 4/1/14.
*/
var mongoose = require('mongoose');
// define
var logSchema = mongoose.Schema({
user_id : String,
content : String,
module_name : String,
postDate : Date
});
module.exports = mongoose.model('Log', logSchema); |
var fortuneCookies = [
'Conquer your fears or they will conquer you',
'Rivers need springs',
'Do not fear what you don\'t know',
'You will have a pleasant surprise',
'Whenever possible, keep it simple'
];
exports.getFortune = function(){
var idx = Math.floor(Math.random() * fortuneCookies.length);
return fortun... |
/**
* @license
* jQuery Tools 1.2.4 Tabs- The basics of UI design.
*
* NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
*
* http://flowplayer.org/tools/tabs/
*
* Since: November 2008
* Date: Sun Aug 15 08:16:31 2010 +0000
*/
(function($) {
// static constructs
$.tools = $.tools || {version: '1.2.4'}... |
Todos.TodosIndexRoute = Ember.Route.extend({
model: function () {
return this.modelFor('todos');
}
}); |
'use strict';
// Channels controller
angular.module('channels').controller('ChannelsController', ['$scope', '$stateParams', '$location', 'Authentication', 'Channels',
function ($scope, $stateParams, $location, Authentication, Channels) {
$scope.authentication = Authentication;
// Create new Channel
$sco... |
(function (R, $)
{
// input commands
var LEFT = 1,
RIGHT = 2,
DOWN = 3,
CLOCKWISE = 4,
COUNTER_CLOCKWISE = 5,
DROP = 6;
// grid dimensions
var ROWS = 25,
COLS = 10;
var Hatetris = function (raphael)
{
this.raphael = raphael;
$(this.ready.bind(this));
}
... |
/**
* 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 React from 'react';
import Router from 'react-routi... |
'use strict';
/**
* Our first store. This is what is going to
* hold the application state and logic. In
* general Stores manage the state of many
* objects, and not a particular instance of it.
* It will manage app state for a DOMAIN (Todo
* stuff) within the application.
*
* TodoStore will register itself wi... |
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('messages.jquery.json'),
clean: {
files: ['dist']
},
concat: {
options: {
stripBanners: true
},
dist: {
src: ['src/<%= pkg.name %>.js'],
dest: 'dist/<%= pkg.na... |
const { exec } = require('shelljs')
const os = require('os')
const platform = os.platform()
console.log('platform:', platform)
const cmd = platform.startsWith('win')
? 'node_modules\\.bin\\cross-env NODE_ENV=development node_modules\\.bin\\electron -r dotenv/config src\\app\\app'
: 'node_modules/.bin/cross-env NOD... |
// Zepto.js
// (c) 2010-2016 Thomas Fuchs
// Zepto.js may be freely distributed under the MIT license.
import $ from './zepto';
var prefix = '', eventPrefix,
vendors = {Webkit: 'webkit', Moz: '', O: 'o'},
testEl = document.createElement('div'),
supportedTransforms = /^((translate|rotate|scale)(X|Y|Z... |
module.exports = {
'timeout': 2000,
'base': '',
'grep': null,
'directory': 'specs',
'pattern': '**/*.spec.js',
'ui': 'bdd',
'reporter': 'dot',
'require': {
'base': 'public',
'paths': {}
},
'mocks': {},
'server': {
'port': 9876
}
}; |
'use strict';
module.exports = {
db: 'mongodb://localhost/mean-dev',
app: {
name: 'MEAN - FullStack JS - Development'
},
facebook: {
clientID: 'APP_ID',
clientSecret: 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/facebook/callback'
},
twitter: {
... |
app.service('UserService', function($rootScope, NotifyService) {
var _isLoggedIn = false;
this.isLoggedIn = function() {
return _isLoggedIn;
}
this.doCredentialsLogin = function(email, password) {
console.log(email, password);
//_isLoggedIn = true;
//$rootScope.$broadcast('userStateChanged');
};
t... |
module.exports = {
fetchRooms: require('./fetchRooms'),
fetchStays: require('./fetchStays'),
createRoom: require('./createRoom'),
deleteRoom: require('./deleteRoom'),
checkIn: require('./checkIn'),
checkAuth: require('./checkAuth'),
makeAvailable: require('./makeAvailable'),
fetchCharges: require('./fet... |
'use strict';
/**
* Directive to augment forms with some common functionality.
*
* Marks each control as touched when a form is submitted. This allows form
* errors to show when clicking submit of a pristine form.
*
* Also, allows for attaching form-wide validator objects. The format of this
* object is keyed... |
import {add_task} from "../sdk";
import {get_tasks} from "../sdk";
import {delete_task} from "../sdk";
//actions dispatch an object only on receiving data from built.io backend
export function addTaskAction(taskObject) {
return function(dispatch){
return add_task(taskObject)
.then(function(res){
dispa... |
'use strict';
angular.module('conversionrobotApp')
.controller('NavbarCtrl', function ($scope, $location, Auth) {
$scope.menu = [{
'title': 'Home',
'link': '/'
}];
$scope.isCollapsed = true;
$scope.isLoggedIn = Auth.isLoggedIn;
$scope.isAdmin = Auth.isAdmin;
$scope.getCurrentUser... |
import { noRegistryFunctionReturn } from 'config/errors';
import { warnIfDebug } from 'utils/log';
import { fillGaps, hasOwn } from 'utils/object';
import parser from 'src/Ractive/config/runtime-parser';
import { findInstance } from 'shared/registry';
import { isArray, isFunction } from 'utils/is';
import { addFunction... |
'use strict';
angular.module('resources').factory('KnowledgeNodes', ['$resource',
function ($resource) {
return $resource('api/knowledgeNodes', {
resourceId: '@_id'
}, {
query: {
method: 'get',
isArray: true
}
});
}
]);... |
/**
* Our Database Interface
*/
var mongoose = require('mongoose');
var UserModel = require('./schemas/user');
// Connections
var developmentDb = 'mongodb://localhost/test';
var productionDb = 'urlToProductionMongoDb';
var database;
var environment = process.env.NODE_ENV || 'development';
if (environment === 'deve... |
"use strict";
module.exports = {Bag: require("./bag")};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBRUEsS0FBSyxRQUFRLEVBQUksRUFDYixHQUFFLENBQUcsQ0FBQSxPQUFNLEFBQUMsQ0FBQyxPQUFNLENBQUMsQ0FDeEIsQ0FBQztBQUFBIiwiZmlsZSI6ImNvbGxlY3... |
if (typeof define !== 'function') {
var define = require('amdefine')(module);
}
define([
'thehelp-test',
'../../../src/both/thehelp-core/breadcrumbs'
], function(
test,
Breadcrumbs
) {
'use strict';
var expect = test.expect;
var sinon = test.sinon;
describe('breadcrumbs', function() {
var brea... |
var React = require('react');
var ReactPropTypes = React.PropTypes;
var classnames = require('classnames');
var Input = React.createClass({
propTypes: {
className: ReactPropTypes.string,
id: ReactPropTypes.string,
onClick: ReactPropTypes.func,
onChange: ReactPropTypes.func,
... |
const atob = require('atob')
const oAuthState = require('../helpers/oauth-state')
/**
* initializes the oAuth flow for a provider.
*
* @param {object} req
* @param {object} res
*/
module.exports = function connect (req, res) {
const { secret } = req.companion.options
let state = oAuthState.generateState(secre... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import TestHookStore from './TestHookStore';
// Public: Higher-order React component to factilitate adding hooks to the
// global test hook store.
//
// WrappedComponent - Component to be wrapped, will be passed an initial
// ... |
/*
* sortable_events.js
*/
(function($) {
module("sortable: events");
test("start", function() {
expect( 7 );
var hash;
$("#sortable").sortable({
start: function( e, ui ) {
hash = ui;
}
}).find("li:eq(0)").simulate( "drag", {
dy: 10
});
ok(hash, 'start event triggered');
ok(hash.helper, 'UI hash i... |
import Router from '../../../src/http/routing/router'
import Route from '../../../src/http/routing/route'
import Request from '../../../src/http/request'
var expect = require('chai').expect
describe('http/routing/router.js', () => {
let router, route, name, path
beforeEach(() => {
name = 'home'
path = '/my... |
class ContactListController {
constructor($http) {
this.$http = $http;
};
$postLink() {
this.$http.get('http://www.json-generator.com/api/json/get/bVespqTlrC?indent=2')
.then(response => this.list = response.data);
}
updateContact(contact, prop, value) {
contact... |
var oAngTestApp, oShout;
oShout = function() {
alert("this is another one");
};
oAngTestApp = angular.module("AppNgenterTest", ["ngEnterBinder"]);
/*
create a test controller
*/
oAngTestApp.controller("TestCtrl", [
"$scope", function($scope) {
$scope.shoutOut = function() {
alert("Enter has been pre... |
// original code from doT.js - 2011, Laura Doktorova https://github.com/olado/doT
// simplified version of the template which allows only interpolation
mucilage.template = function(str) {
str = (
"var out='"
+ str.replace(/\s*<!\[CDATA\[\s*|\s*\]\]>\s*|[\r\n\t]|(\/\*[\s\S]*?\*\/)/g, '')
.replace(/\... |
'use strict';
/**
* Module dependencies.
*/
var path = require('path'),
errorHandler = require(path.resolve('./modules/core/server/controllers/errors.server.controller')),
logHandler = require(path.resolve('./modules/mago/server/controllers/logs.server.controller')),
db = require(path.resolve('./config/l... |
var React = require('react');
var cs = require('classnames');
var $ = React.DOM;
// Some shared attrs for JsonTable and JsonRow
var defaultSettings = {
header: true,
noRowsMessage: 'No items',
classPrefix: 'json'
},
getSetting = function( name ){
var settings = this.props.settings;
if( !settings || typeo... |
export const ic_music_note_twotone = {"viewBox":"0 0 24 24","children":[{"name":"path","attribs":{"d":"M0 0h24v24H0V0z","fill":"none"},"children":[]},{"name":"circle","attribs":{"cx":"10.01","cy":"17","opacity":".3","r":"2"},"children":[]},{"name":"path","attribs":{"d":"M12 3l.01 10.55c-.59-.34-1.27-.55-2-.55C7.79 13 6... |
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed ... |
var gulp = require('gulp');
var open = require('gulp-open');
var rename = require('gulp-rename');
var serve = require('gulp-serve');
var uglify = require('gulp-uglify');
gulp.task('build', function(){
gulp.src('src/game-controller.js')
.pipe(uglify({mangle: {
GameController: false,
window: false,
expor... |
/**
* @copyright 2013 Sonia Keys
* @copyright 2016 commenthol
* @license MIT
* @module eclipse
*/
/**
* Eclipse: Chapter 54, Eclipses.
*/
import base from './base.js'
import moonphase from './moonphase.js'
/**
* @private
*/
const g = function (k, jm, c1, c2) { // (k, jm, c1, c2 float64) (eclipse bool, jdeMax... |
var app = function() {}
app.prototype.init = function() {}
app.prototype.run = function() {}
module.exports = app |
// Initializes the `scrape` service on path `/scrape`
const createService = require('./scrape.class.js')
const hooks = require('./scrape.hooks')
module.exports = function (app) {
const paginate = app.get('paginate')
const options = {
name: 'scrape',
paginate
}
// Initialize our service with any optio... |
import {h, div, ul, li, a, nav, h1, h2} from '@cycle/dom'
const view = () => {
return div([
h1('.brand-title', [`An APP`]),
h2('.brand-tagline', [`Showcasing Cycle.js`]),
nav('.nav', [
ul('.nav-list', [
li('.nav-item .link', [
a('.pure-button', {href: `/`}, [`Home`])
]),
... |
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ ret... |
var path = require('path');
var chai = require('chai');
var assert = chai.assert;
var expect = chai.expect;
var RestDescription = require(path.dirname(__filename) + '/../lib/rest-description');
var Schema = require(path.dirname(__filename) + '/../lib/schema');
var Context = require(path.dirname(__filename) + '/../lib/... |
(function(jsenvy) {
/**
}
* Scope Creep
* ===
* A fun way to creep on people's scope. Lets you:
* - Update a scope to see the scope difference
* - View the current contents of the scope, in case you forgot what you're creeping on
*/
jsenvy.ScopeCreep = function(victim, ignores) {
var properties = [],
... |
export default {
name: 'sidr', // Name for the 'sidr'
speed: 200, // Accepts standard jQuery effects speeds (i.e. fast, normal or milliseconds)
side: 'left', // Accepts 'left' or 'right'
source: null, // Override the source of the content.
renaming: true, // The ids and classes will be prepended with a prefix... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import * as actions from '../../actions';
class Feature extends Component {
componentWillMount() {
this.props.fetchMessage();
}
render () {
return <div>{this.props.message}</div>;
}
}
function mapStateToP... |
require('./app.less')
|
import Model from './model';
import { inherit } from 'content-kit-utils/src/object-utils';
/**
* Ensures block markups at the same index are always in a specific order.
* For example, so all bold links are consistently marked up
* as <a><b>text</b></a> instead of <b><a>text</a></b>
*/
function sortBlockMarkups(ma... |
"use strict";
var piece_1 = require('./piece');
(function (GameState) {
GameState[GameState["ON"] = 0] = "ON";
GameState[GameState["OVER"] = 1] = "OVER";
})(exports.GameState || (exports.GameState = {}));
var GameState = exports.GameState;
var Game = (function () {
function Game(starts) {
this.piece... |
(function() {
'use strict';
angular.module('sideNavDirective', [])
/*
* <side-nav> Directive.
* Builds the left navigation from a list of navItems
*/
.directive('sideNav', function() {
return {
restrict: 'E',
replace: true,
... |
iris.ui(function(self) {
var editable = false;
var editor = null;
var field = null;
var item = null;
var schema = null;
var filter = "";
var onchange = null;
self.settings({"table": null});
self.create = function() {
field = self.setting('field');
item = self.setting('item');
schema = field.schema;
... |
(function () {
angular
.module('app.core')
.factory('dataservice', dataservice);
dataservice.$inject = ['$firebaseArray'];
function dataservice($firebaseArray) {
return {
getLocations: getLocations
};
function getLocations() {
var firebaseRef... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import './header.css';
import LogModal from '../loginmodal/Modal'
class Header extends Component {
constructor(props) {
super(props);
this.state = {
showModal: false
}
this.... |
module.exports = {
entry: './src/app.js',
output: {
path: './public/js',
filename: 'app.bundle.js'
},
module: {
loaders: [{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
}]
}
}; |
module.exports={A:{A:{"132":"L H G E A B jB"},B:{"132":"C D d K I N J","388":"BB"},C:{"132":"0 1 2 3 5 6 7 8 9 gB IB F L H G E A B C D d K I N J P Q R S T U V W X Y Z a b c e f g h i j k l m n o M q r s t u v w x y z AB CB DB EB O GB HB aB ZB"},D:{"132":"2 3 5 F L H G E A B C D d K I N J P Q R S T U V W X Y Z a b c e f... |
// @flow
import lonlat from '@conveyal/lonlat'
import {decode as decodePolyline} from '@mapbox/polyline'
import fetch from 'isomorphic-fetch'
import type {LonLatC} from '../types'
const GRAPHHOPPER_API_URL = 'https://graphhopper.com/api/1/route'
export default async function getRoutePolyline (start: LonLatC, end: Lo... |
// ==UserScript==
// @name Facebook Event Exporter
// @namespace http://boris.joff3.com
// @version 1.3.11
// @description Export Facebook events
// @author Boris Joffe
// @match https://www.facebook.com/*
// @grant unsafeWindow
// ==/UserScript==
/* jshint -W097 */
/* globals conso... |
'use strict';
var got = require('got');
module.exports = function (userName, callback) {
if (!(typeof userName === 'string' && userName.length !== 0)) {
throw new Error('User Name required');
}
got('https://api.github.com/users/' + userName.toLowerCase(), function (err, data) {
if (err) {
if (err.statusCode ... |
#!/usr/bin/env node
var electron = require('./')
var proc = require('child_process')
var child = proc.spawn(electron, process.argv.slice(2), {stdio: 'inherit'})
child.on('close', function (code) {
process.exit(code)
})
const handleTerminationSignal = function (signal) {
process.on(signal, function signalHandler... |
'use strict';
/**
* Module dependencies.
*/
var _ = require('lodash'),
errorHandler = require('../errors.server.controller'),
mongoose = require('mongoose'),
passport = require('passport'),
User = mongoose.model('User'),
config = require('../../../config/config'),
nodemailer = require('nodemailer'),
async = r... |
var searchData=
[
['progress',['progress',['../struct_log_type.html#a42f5153a559d41c697e4763ed36ff217aaf0ab04c6e780051a63639d0df57eb20',1,'LogType']]]
];
|
"use strict";
var commandToBuffer = require("./commandToBuffer");
var Animations = module.exports = function(self) {
this.self = self;
};
Animations.prototype.startAnimation = function(anim) {
var buffer = commandToBuffer(0, "Animations", "StartAnimation", anim);
this.self._writePacket(this.self._networkFr... |
/**
* Copyright (c) 2012 eBay Inc.
* Author: Senthil Padmanabhan
*
* Released under the MIT License
* http://www.opensource.org/licenses/MIT
*
* A standalone rules array to hold the basic spof rules
* @property rules
* @type Object[]
*/
var rules = [];
/**
* A global function to check if a given URL belongs... |
/* Browser detection script - modified from http://www.quirksmode.org/js/detect.html */
elation.extend("browser", new function() {
this.checkIt = function (string) {
this.place = detect.indexOf(string) + 1;
this.tmpstring = string;
return this.place;
}
var detect = navigator.userAgent.toLowerCase();
... |
/*!
* jQuery UI Droppable 1.11.4
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/droppable/
*/
(function (factory) {
if (typeof define === "function" && define.amd) {
// AMD. Regi... |
/**
* @fileOverview _h3.js traverse throught DOM and assign a11y labels.
*
* @author Gagandeep Singh <robi_osahan@yahoo.com>
* @version 1.0.0
*/
(function(window, $, undefined){
a11y._h3 = function(scope, options){
var ele = scope.find("h3"),
self = this,
labeler = {
... |
'use strict';
module.exports = {
db: 'mongodb://localhost/the-thriftshop-test',
port: 3001,
app: {
title: 'The Thriftshop - Test Environment'
},
facebook: {
clientID: process.env.FACEBOOK_ID || 'APP_ID',
clientSecret: process.env.FACEBOOK_SECRET || 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/fa... |
import isEmpty from './isEmpty'
import declination from './declination'
const declDays = declination([
'день',
'дня',
'дней'
]);
const declWeeks = declination([
'неделя',
'недели',
'недель'
]);
const declHours = declination([
'час',
'часа',
'часов'
]);
export default __data => {
if (isEmpty(__data... |
import PolygonLayer from 'ember-leaflet/components/polygon-layer';
/**
* A class for drawing rectangle overlays on a map.
*
* @class RectangleLayer
* @extends PolygonLayer
*/
export default class RectangleLayer extends PolygonLayer {
createLayer() {
return this.L.rectangle(...this.requiredOptions, this.opti... |
"use strict"
/**
* Created by garusis on 04/05/17.
*/
export {providers} from "./availableList"
export {strategies} from "./strategies"
|
var fs = require('fs')
var childProcess = require('child_process')
var AWS = require('aws-sdk')
var s3 = new AWS.S3()
exports.handler = function(event, context) {
var filename = 'nodejs.tgz'
var cmd = 'tar -cpzf /tmp/' + filename +
' --numeric-owner --ignore-failed-read /var/runtime /var/lang'
var child = c... |
import { connect } from 'react-redux'
import { dealCard, increment, resetTable } from '../modules/trackCount'
/* This is a container component. Notice it does not contain any JSX,
nor does it import React. This component is **only** responsible for
wiring in the actions and state necessary to render a present... |
const assert = require('assert');
const util = require('./../util/util.js');
describe('assembly expressions', () => {
it('should compile after instrumenting an assembly function with spaces in parameters', () => {
const info = util.instrumentAndCompile('assembly/spaces-in-function');
util.report(info.solcOu... |
// All code points in the `Duployan` script as per Unicode v9.0.0:
[
0x1BC00,
0x1BC01,
0x1BC02,
0x1BC03,
0x1BC04,
0x1BC05,
0x1BC06,
0x1BC07,
0x1BC08,
0x1BC09,
0x1BC0A,
0x1BC0B,
0x1BC0C,
0x1BC0D,
0x1BC0E,
0x1BC0F,
0x1BC10,
0x1BC11,
0x1BC12,
0x1BC13,
0x1BC14,
0x1BC15,
0x1BC16,
0x1BC17,
0x1BC18,
... |
version https://git-lfs.github.com/spec/v1
oid sha256:5f9dc37e4b4dbcde5986961ff6492dab9b0d51ad59411d4bdd645cd4f47f9f34
size 964
|
/** @module view */
/* Copyright (c) 2016 Murray J Brown; All rights reserved. */
//
// This module processes changes to the application state(s)
// (as a result of DOM input effects, i.e., human intents, or
// HTTP response messages received) and renders corresponding
// virtual DOM elements to be processed by the DOM... |
import BaseProvider from "./BaseProvider"
export default class NonePruneProvider extends BaseProvider {
constructor(props) {
super(props)
this.rpcUrl = props.url
this.initContract()
}
getBalanceAtSpecificBlock(address, blockno) {
return new Promise((resolve, reject) => {
... |
/******
*任务工时统计相关操作
******/
var taskTimeReportOps = {
//更新项目报表对象
updateReport: function (vault, objId, newReportData) {
//newPropsData:{ 'startDate', 'deadline''checkedItems':[task], 'reportInfo':string}
reportOps.updateReport(vault, md.taskTimeReport.classAlias, objId, newReportData);
},
... |
var spawn = require('child_process').spawn,
assert = require('assert'),
config = require('../config/'),
port = config.port,
rootDir = config.rootDir;
describe('server', function () {
it('starts', function (done) {
var server = spawn('node', [rootDir]);
process.on('exit', function () {
server.kill... |
(function(){
var Socket;
if(typeof window === 'undefined'){
Socket = require('ws');
}else {
if (!("WebSocket" in window)){
console.error('Myo.js : Sockets not supported :(');
}
Socket = WebSocket;
}
/**
* Utils
*/
var extend = function(){
var result = {};
for(var i in arguments){
var obj = ... |
var debug = require('debug')('snippet-app-api');
module.exports = function (app) {
app.get("/snippet", function(req, res) {
debug('Getting all snippets...');
var user = req.query.user;
debug(user);
if (user) {
app.db.findSnippetsByUser(user, function(err, snippets) {
err ? pong(res, 500... |
/*jslint regexp: true, nomen: true, sloppy: true */
/*global require, define, alert, applicationConfig, location, document, window, setTimeout, Countable */
define(['jquery', 'bxslider', 'validation', 'modal'], function ($) {
var module = {};
module.initSlider = function () {
var promoSlide = docum... |
import { fromRef } from '../observable/fromRef';
import { Observable } from 'rxjs/Observable';
import { positionFor, positionAfter } from './utils';
import 'rxjs/add/operator/scan';
import 'rxjs/add/observable/merge';
export function listChanges(ref, events) {
const childEvent$ = events.map(event => fromRef(ref, ev... |
import { useEffect, useState } from 'react'
import { format, fromUnixTime, formatDistance } from 'date-fns'
import { BsTrash } from 'react-icons/bs'
import { AiOutlineWarning } from 'react-icons/ai'
import ErrorMessages from './ErrorMessages'
import Avatar from './Avatar'
import Modal from './Modal'
import Table from '... |
var South = {
name: "S",
spin: function(direction){
if(direction === "L"){
return Cardinals.E
} else {
return Cardinals.W
}
}
},
West = {name: "W",
spin: function(direction){
if(direction === "L"){
return Cardinals.S
} else {
return Cardinals.N
}
}
},
East = {name: "E",
... |
trim(string);
|
import minifier from 'uglify-js'
const options = {
fromString: true
}
export default function (contents, callback) {
try {
let result = minifier.minify(contents, options).code
callback(null, result)
} catch (err) {
callback(err)
}
}
|
var express = require('express');
var app = express()
, http = require('http')
, server = http.createServer(app)
app.configure(function() {
app.use(express.static(__dirname + '/public'));
});
/*
app.get('/', function(req, res){
res.render('home.jade');
});*/
//for M-jpeg streaming
/*
fs = require('fs')
... |
var logger = require('winston');
module.exports = {
backupNow: function (instanceName, dbNames) {
// console.log('Starting directory: ' + process.cwd());
// try {
// process.chdir('');
// console.log('New directory: ' + process.cwd());
// }
// catch (err) {
// ... |
let globalTeardown = () => {}
if (process.env.BROWSERSTACK) {
globalTeardown = () => global.browserStackLocal.killAllProcesses(() => {})
}
module.exports = async () => {
await globalTeardown()
}
|
/*****************************************************************
typeface.js, version 0.15 | typefacejs.neocracy.org
Copyright (c) 2008 - 2009, David Chester davidchester@gmx.net
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "S... |
//>>built
define("dojo/cldr/nls/fi/number",{"group":" ","percentSign":"%","exponential":"E","scientificFormat":"#E0","percentFormat":"#,##0 %","list":";","infinity":"∞","patternDigit":"#","minusSign":"-","decimal":",","nan":"epäluku","nativeZeroDigit":"0","perMille":"‰","decimalFormat":"#,##0.###","currencyFormat":"#,#... |
var Phaser = require('phaser');
var colors = require('./colors');
/**
* Paddle class.
* @class
* @param {object} game
* @param {number} x
* @param {number} y
* @param {boolean} isGhost
*/
Paddle = function (game, x, y, isGhost) {
Phaser.Sprite.call(this, game, x, y, 'paddle');
this.game = game;
... |
define(['handlebars'], function(handlebars){
var template = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
var buffer = "", stack1, stack2, functionType="function", escapeExpression=th... |
'use strict';
var extend = require('extend');
var format = require('util').format;
var request = require('./request');
var util = require('./util');
var debug = require('debug')('lego-client:info');
/*
info(args, config)
* args
* name: the package name
* version: the package version
* config: see clien... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.