code stringlengths 2 1.05M |
|---|
module.exports = function(grunt) {
// required
require('load-grunt-tasks')(grunt);
require('time-grunt')(grunt);
// grunt plugins
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-nodemon');
// Project configuration.
grunt.initConfig({
//-------------
concurrent: {
op... |
/**
* Library tests focused on the processLimit option.
*
* Copyright (c) 2013 - 2021, Alex Grant, LocalNerve, contributors
*/
/* global it */
var assert = require("assert");
var rimraf = require("rimraf").sync;
var utils = require("./utils");
var optHelp = require("../../helpers/options");
var ss = require("../../... |
datab = [{},{"Attribute Name":{"colspan":"1","rowspan":"1","text":"Parametric Map Frame Type Sequence"},"Tag":{"colspan":"1","rowspan":"1","text":"(0040,9092)"},"Type":{"colspan":"1","rowspan":"1","text":"1"},"Attribute Description":{"colspan":"1","rowspan":"1","text":"Identifies the characteristics of this Parametric ... |
var exiler = require("exiler");
var options = {
publicFolder: "src/public",
templateFolder: "src/template",
route: {
index: {
ex_data: function (resolve) {
resolve({aaa: 1});
}
},
nodata: {
ex_template: "nodata.ejs"
},
pageAction: {
ex_data: {
pageData: "I'm the page"
},
ex_templ... |
// declaration assignment
var arr = ["one", "two", "three"];
// direct index assignment
var arr2 = new Array();
arr2[0] = "one";
arr2[1] = "two";
arr2[2] = "three";
// object-oriented assignment
var arr3 = new Array();
arr3.push("one");
arr3.push("two");
arr3.push("three");
var numOfItems = arr.length;
var week = ["... |
/*
*
* INSPINIA - Responsive Admin Theme
* version 2.6
*
*/
$(document).ready(function () {
// Add body-small class if window less than 768px
if ($(this).width() < 769) {
$('body').addClass('body-small')
} else {
$('body').removeClass('body-small')
}
// MetsiMenu
$(... |
import assert from 'assert';
export default {
cssClass(element, className) {
const cn = element.className;
assert(cn.split(' ').indexOf(className) >= 0, `"${className}" not found in "${cn}"`);
},
noCssClass(element, className) {
const cn = element.className;
assert(cn.spl... |
(function() {
'use strict';
angular
.module('app.core')
.constant('FIREBASE_URL', 'https://waitandeat-demo.firebaseio.com/');
})(); |
beforeEach(function () {
jasmine.addMatchers({
toContainText: function () {
return {
compare: function (actual, expectedText) {
var actualText = actual.textContent;
return {
pass: actualText.indexOf(expectedText) > -... |
git://github.com/evandroeisinger/uP.js.git
|
define(['games/resource', 'games/sprite'], function (Resource, Sprite) {
function PlanesView (config) {
var settings = $.extend(true, {}, config);
var context;
var shadow = [1, 3];
var templates = {
terrain : {
source : 'img/sea.png'
},
... |
var cf = require('../');
var n = cf(
function (n) { return (n - 2) % 3 ? 1 : 2 * ((n - 2) / 3) },
function (n) { return 1 }
);
console.log(n);
|
/*eslint-env node*/
module.exports.buildIcon = (svg, color) => {
const buildSvg = svg.replace('{{fill}}', color);
return buildSvg.replace(/#g/, '%23');
};
|
/**
* @author john
*/
$(document).ready(function() {
$("input#search-objet").bind("keyup change webkitspeechchange",function() {
$.ajax($(this).attr("actionSearch"), {
type: "POST",
data: { literalQuery : $(this).val() },
success: function(data)
{
$("ul.list-objets").html(data).listview('refresh');... |
;(function() {
"use strict";
// Provides management of goals.
function GoalCtrl(GoalService, goalTool, currentGoals,
studyEndDate, noticesEnabled, noticeUtility, SN_CONSTANTS) {
this._goals = GoalService;
this._goalTool = goalTool;
this.goalModel = this._goalTool.getModel();
t... |
/**
*-------------------------------------------------------------------------***
*广告位管理-添加广告位-验证
*-------------------------------------------------------------------------***
**/
function validulate(){
$("#advertSiteForm").validate({
submitHandler:function(form){
saveAdvertSite();
},
rules:{
... |
$(document).ready(function() {
var submitIcon = $(".ExpIcon ");
var submitInput = $(".ExpInput");
var searchBox = $(".Exp-search");
var isOpen = false;
$(document).mouseup(function() {
if (isOpen == true) {
submitInput.val("");
$(".Expbtn").css("z-index", "-999");
submitIcon.click();
... |
// --------------------
// co-series module
// Tests
// --------------------
// modules
var chai = require('chai'),
chaiAsPromised = require('chai-as-promised'),
expect = chai.expect,
Promise = global.Promise,
Bluebird = require('bluebird'),
Q = require('q'),
series = require('../lib/');
// init
chai.config.inc... |
ScalaJS.impls.scala_sys_process_ProcessCreation$class__apply__Lscala_sys_process_ProcessCreation__T__Lscala_sys_process_ProcessBuilder = (function($$this, command$9) {
return $$this.apply__T__Lscala_Option__Lscala_collection_Seq__Lscala_sys_process_ProcessBuilder(command$9, ScalaJS.modules.scala_None(), ScalaJS.modul... |
/**
* Created by antoinelucas on 12/05/2016.
*/
'use strict';
var authorization = require('./../helpers/authorization.middleware'),
user = require('./../controllers/user.server.controller');
module.exports = function (app) {
app.route('/user/details').get(authorization.hasRole(['user', 'admin']), user.details);... |
'use strict';
module.exports = function (targs, opts) {
// takes targets and parses out f1 friendly values
//defaults
opts = {
type: opts.type || 'simple',
slotMachine: opts.slotMachine || false,
iconPosition: opts.iconPosition || 'right',
iconDirection: opts.iconDirection ... |
import API from 'src/util/api';
export class RangesManager {
constructor(ranges, options = {}) {
this.ranges = ranges;
this.currentRange = undefined;
this.ensureLabel = options.ensureLabel;
}
processAction(action) {
if (
!action.value.event.altKey ||
action.value.event.shiftKey ||
... |
'use strict';
angular.module('teamDashboardApp')
.controller('LoginCtrl', function ($scope, Auth, $location) {
$scope.user = {};
$scope.errors = {};
$scope.login = function(form) {
$scope.submitted = true;
if(form.$valid) {
Auth.login({
email: $scope.user.email,
... |
(function() {
'use strict';
describe('loci.entry module', function() {
beforeEach(module('loci.entry'));
describe('entry controller', function(){
it('should be defined', inject(function($controller) {
var entryCtrl = $controller('EntryCtrl');
expect(entryCtrl).toBeDefined();
... |
/* global module:false */
module.exports = function(grunt) {
var port = grunt.option('port') || 8000;
// Project configuration
grunt.initConfig({
watch: {
options: {
livereload: true
},
css: {
files: [ 'style.css' ]
},
html: {
files: [ ... |
({
baseUrl: './',
//optimize: 'none', //uncomment this option if built source needs to be debugged
paths: {
almond: '../vendor/almond/almond'
},
mainConfigFile: 'require-config.js',
name: 'almond',
include: ['main'],
out: '../dist/scripts/mentalmodeler.js'
}) |
/*
* Video.js AB loop plugin
* Adds function to allow looping for a section of a video in video.js player
* https://github.com/phhu/videojs-abloop
* MIT licence
*/
;
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define([], factory.bind(this, root, root.videojs));
} els... |
var spellingList = ["fit",
"mad",
"bus",
"dots",
"spy",
"job",
"row",
"tree",
"ship",
"name",
"ears",
"room",
"case",
"meal",
"rang",
"tile",
"lost",
"aim",
"nest",
"tiny",
"need",
"darts",
"straw",
"maybe",
"cried",
"shell",
"wash",
"chew",
"start",
"first",
... |
// Underscore.js 1.3.1
// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore is freely distributable under the MIT license.
// Portions of Underscore are inspired or borrowed from Prototype,
// Oliver Steele's Functional, and John Resig's Micro-Templating.
// For all details and doc... |
/*
* Copyright (c) 2015 by Rafael Angel Aznar Aparici (rafaaznar at gmail dot com)
*
* openAUSIAS: The stunning micro-library that helps you to develop easily
* AJAX web applications by using Java and jQuery
* openAUSIAS is distributed under the MIT License (MIT)
* Sources at https://github.com/raf... |
var chai = require('chai');
var expect = chai.expect;
describe('Server test', function(){
it('Pass everything is okay', function(){
expect(true).to.be.true;
});
}); |
import React from "react";
import { Card } from 'material-ui/Card';
import { CardActions } from 'material-ui/Card';
import FlatButton from 'material-ui/FlatButton';
import { List, ListItem } from 'material-ui/List';
function UsersPage(props) {
return (
<div>
<Card className="usersList">
<CardAct... |
var _; //globals
describe("About Applying What We Have Learnt", function() {
var products;
beforeEach(function () {
products = [
{ name: "Sonoma", ingredients: ["artichoke", "sundried tomatoes", "mushrooms"], containsNuts: false },
{ name: "Pizza Primavera", ingredients: ["roma", "sundried tom... |
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy... |
/**
* This is a shorter version of Mathias Bynens' HTMLEntities map.
* It is no longer compressed as of v0.4.1,
* since it's no longer needed on the client side
*/
module.exports = {
"Á": [
"Aacute"
],
"á": [
"aacute"
],
"Ă": [
"Abreve"
],
"ă": [
"abreve"
],
"∾": [
"ac",
"mstpos"
],
"∿": [
... |
import React from 'react'
import {DeleteWrapper, DelButton} from 'rt/styles/Elements'
const DeleteButton = props => {
return (
<DeleteWrapper {...props}>
<DelButton>✖</DelButton>
</DeleteWrapper>
)
}
export default DeleteButton
|
"use strict";
function Core(size) {
var interactive = true;
this._stats = new Stats();
this._stats.setMode(0);
this._stats.domElement.style.position = 'absolute';
this._stats.domElement.style.left = '0px';
this._stats.domElement.style.top = '0px';
this._rectangles = [];
this._stage = n... |
import React from 'react';
import translateName from '../util/translateName';
import TextInput from './TextInput';
import { learningHoursTemplate } from '../data/defaultData';
import CollapsiblePanel from './CollapsiblePanel';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * a... |
'use strict';
var $ = require('jquery');
require('jquery-ui');
$.widget('custom.adslide', {
_create: function () {
var self = this
, a = self.element.find("a.slide")
, len = a.length
, current = 0
, container = a.parent()
;
a.css({
display: 'none'
}).eq(0).css({
display: 'block'
}... |
$(document).ready(function() {
$('aside > ul > a').click(function() {
console.log("link clicked");
var ind = $(this).index() + 2;
$('html, body').animate({
scrollTop: $('.post:nth-child(' + ind + ')').offset().top}, 'slow');
return false;
});
$("a[href='#top']").click(function() {
console.log("going to ... |
/*
* Profile route
*/
'use strict';
var User = require('../models/user');
var Auth = require('../middleware/authorization');
var UI = require("../util/ui_util");
module.exports = function (app, passport) {
// View the user's profile
app.get("/profile", Auth.isAuthenticated, function (req, res) {
re... |
const fs = require('fs');
const path = require('path');
const { schema } = require('../data/schema');
const { graphql } = require('graphql');
const { introspectionQuery, printSchema } = require('graphql/utilities');
// Save JSON of full schema introspection for Babel Relay Plugin to use
(async () => {
const result ... |
(function() {
'use strict';
angular
.module('wearska')
.config(function() {
});
})();
|
'use strict';
//Coupons service used for articles REST endpoint
angular.module('mean.admin').factory('Coupons', ['$resource',
function($resource) {
return $resource('coupons/:couponId', {
couponId: '@_id'
}, {
update: {
method: 'PUT'
}
});... |
'use strict';
var path = require('path');
var assert = require('yeoman-assert');
var helpers = require('yeoman-test');
describe('generator-ng-voi:factory moduleA.someFactory', function () {
before(function () {
return helpers.run(path.join(__dirname, '../generators/factory'))
.withArguments(['m... |
/*
The MIT License (MIT)
Copyright (c) 2017 Microsoft Corporation
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, including without limitation the rights
to use, copy, modify,... |
var tswlairmgr = tswlairmgr || {};
tswlairmgr.core.data.addLocalizationData("English", "English", "enUS", {
alphabets: {
greek: {
alpha: "Alpha",
beta: "Beta",
gamma: "Gamma",
delta: "Delta",
epsilon: "Epsilon",
zeta: "Zeta",
eta: "Eta",
theta: "Theta",
iota: "Iota",
kappa: "Kappa",
... |
import Avatar from './avatar'
import Date from './date'
import CoverImage from './cover-image'
import Link from 'next/link'
export default function HeroPost({
title,
coverImage,
date,
excerpt,
author,
slug,
}) {
return (
<section>
<div className="mb-8 md:mb-16">
<CoverImage title={title... |
import { polyfill } from 'es6-promise';
import request from 'axios';
import { push } from 'react-router-redux';
import * as types from '../types';
polyfill();
const getMessage = res => res.response && res.response.data && res.response.data.message;
function makeUserRequest(method, data, api = '/') {
return reques... |
describe('Check if gulp is working', function () {
it("should be able to calculate",function () {
var openPlusOne = 1+1;
expect(openPlusOne).toBe(2);
});
});
|
const pkg = require('../package.json')
module.exports = key => {
return `<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="description" content="Fair Analytics">
<title>Home - Fair Analytics</title>
<style type="text/css">
html, body {
margin: 0;
padding: 0;
... |
/**
* Created by leo on 3/26/15.
*/
var Sails = require('sails');
var Barrels = require('barrels');
var port = 8010;
require('should');
// Global before hook
before(function (done) {
this.timeout(25000);
// Lift Sails with test database
Sails.lift({
port:port,
globals:{
sails:true
},
lo... |
// Source : https://leetcode.com/problems/climbing-stairs
// Author : Dean Shi
// Date : 2017-07-10
/***************************************************************************************
*
* You are climbing a stair case. It takes n steps to reach to the top.
*
* Each time you can either climb 1 or 2 steps. In... |
//
// This acts as the server from the front end React application
// and is used for CRUD operations on the task and note models.
//
// TODO (Connor)
|
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
import { PLATFORM } from 'aurelia-pal';
function isObject(va... |
import Helmet from 'react-helmet';
import PropTypes from 'prop-types';
import React from 'react';
import { StaticQuery, graphql } from 'gatsby';
const SEO = ({ description, lang, meta, path, title }) => (
<StaticQuery
query={graphql`
query DefaultSEOQuery {
site {
siteMetadata {
... |
(function(b,r){b.widget("mobile.lazyloader",b.mobile.widget,{_defaultOptions:{threshold:b(window).height(),retrieve:20,retrieved:20,bubbles:!1,offset:0,limit:0},_defaultParameters:{retrieve:20,retrieved:20,offset:0},_defaultSettings:{pageId:"",templateType:"",templatePrecompiled:!1,templateId:"",template:"",mainId:"",p... |
/*
* Also import the necessary CSS into the app.
*
* Example:
* import 'quasar-extras/animate/bounceInLeft.css'
*/
export default {
name: 'q-transition',
functional: true,
props: {
name: String,
enter: String,
leave: String,
group: Boolean
},
render (h, ctx) {
const
prop = ctx.... |
!function(e){function o(){e.simpleDB.open(r).then(function(o){o.forEach(function(t,n){var r=Date.now()-n,i=t+"&qt="+r;console.log("About to replay:",i),e.fetch(i).then(function(e){return e.status>=500?Response.error():(console.log("Replay succeeded:",i),void o["delete"](t))})["catch"](function(e){r>l?(console.error("Re... |
'use strict';
var assign = require('es5-ext/object/assign')
, callable = require('es5-ext/object/valid-callable')
, path = require('path')
, readdir = require('fs').readdir
, Mocha = require("mocha")
, Promise = require('./')
, Deferred = require('./deferred')
, resolve = path.resolve, extnam... |
var searchData=
[
['dataloggrammarbasevisitor_335',['DatalogGrammarBaseVisitor',['../classDatalogGrammarBaseVisitor.html',1,'']]],
['dataloggrammarbasevisitor_3c_20object_20_3e_336',['DatalogGrammarBaseVisitor< object >',['../classDatalogGrammarBaseVisitor.html',1,'']]],
['dataloggrammarparser_337',['Datalo... |
/* import React from 'react';*/
/* import { shallow } from 'enzyme';*/
/* import SingleStructureView from '../index';*/
describe('<SingleStructureView />', () => {
it('Expect to render a nested div', () => {
expect(true).toBe(true);
});
});
|
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function getVF(n, opt_pre... |
describe('Togashi Mitsu', function() {
integration(function() {
describe('Togashi Mitsu\'s constant ability', function() {
beforeEach(function() {
this.setupTest({
phase: 'conflict',
player1: {
inPlay: ['iuchi-shahai... |
'use strict'
var is = require('unist-util-is')
module.exports = findAllBefore
/* Find nodes before `index` in `parent` which pass `test`. */
function findAllBefore(parent, index, test) {
var results = []
var children
var child
if (!parent || !parent.type || !parent.children) {
throw new Error('Expected ... |
'use strict';
var toInteger = require('./_to-integer'),
defined = require('./_defined');
// true -> String#at
// false -> String#codePointAt
module.exports = function (TO_STRING) {
return function (that, pos) {
var s = String(defined(that)),
i = toInteger(pos),
l = s.length,
a,
... |
import { addHours } from 'date-fns';
import { getReviewStatusText } from 'features/dashboard/ReviewStatus';
const defaults = {
isOnVacation: false,
isLoading: false,
reviewsCount: 0,
vacationDate: false,
nextReviewDate: false,
freshUser: false,
loadQuizCounts: () => {},
};
describe('getReviewStatusText(... |
module.exports = {
onPhantomPageCreate: function(phantom, req, res, next) {
req.prerender.page.run(function(resolve) {
var customHeaders = this.customHeaders;
customHeaders['X-Prerender'] = 1;
this.customHeaders = customHeaders;
resolve();
}).the... |
// External
const chalk = require('chalk');
module.exports = Object.assign(chalk, {
bad: chalk.red,
cmd: chalk.yellow,
hvy: chalk.bold,
ok: chalk.green,
opt: chalk.cyan,
req: chalk.magenta,
sec: chalk.bold.underline
});
|
import fs from 'fs';
import webpack from 'webpack';
import {devConfig, proConfig} from './webpack.config';
import gulp from 'gulp';
import {log, PluginError} from 'gulp-util';
gulp.task('js:dev', function (cb) {
webpack(devConfig, function (e, stats) {
if (e) {
throw new PluginError('[webpack]', e);
} ... |
export default class NanoRouter {
/**
* Constructor
* @param {Object} routes Object where key is the route, and value is the callback
*/
constructor (routes = {}) {
this._routes = routes;
window.addEventListener('hashchange', ()=> {
this._route();
});
this._route();
}
/**
... |
Template.TodosCount.events({
});
Template.TodosCount.helpers({
completedCount: function(){
return Todos.find({userId: Meteor.userId(), isDone: true}).count();
},
totalCount: function(){
return Todos.find({userId: Meteor.userId()}).count();
}
});
|
/* @flow */
class Loader {
/*::
_path: string;
*/
constructor(path/*: string */) {
this._path = path;
}
getPath()/*: string */ {
return this._path;
}
load()/*: Promise<Buffer> */ {
return Promise.reject('Not Implemented!');
}
}
module.exports = Loader;
|
//This needs all kinds of testing... work on it more... again just for test...
ivar.search = {};
/**
* @param {boolean} [sorted=true]
* @param {number|string} [field]
* @todo TEST
*/
ivar.search.quickSearch = function(arr, key, sorted, field) {
var found = [];
if(!ivar.isSet(sorted))
sorted = true;
if(!so... |
/**
* @file
* @author zdying
*/
var path = require('path');
require('../src/global');
var webpackConfig = require('../src/webpackConfig/index');
var locConfig = require('../src/webpackConfig/loc/config');
var devConfig = require('../src/webpackConfig/dev/config');
var prdConfig = require('../src/webpackConfig/prd/... |
import Modal from 'react-bootstrap/lib/Modal';
import PropTypes from 'prop-types';
import React from 'react';
import { connect } from 'react-redux';
export class AppModalPage extends React.Component {
render() {
return (<Modal
onEnter={this.props.dialog.onEnter}
onEntered={this.prop... |
import React from 'react';
import ReactDOM from 'react-dom';
import Master from './components/Master'
const App = () => (
<div>
<Master />
</div>
)
ReactDOM.render(
<App />, document.getElementById('root')
);
|
var app = app || {};
(function(){
app.TestButton = React.createClass({displayName: "TestButton",
handleClick: function() {
this.props.submitTestTask(this.props.btnType);
},
render: function() {
return ( React.createElement("button", {onClick: this.handleClick,
... |
const ReadableStream = require('readable-stream')
/* global URL */
module.exports = function (snapshot) {
return inject.bind(null, snapshot.hash)
}
const docWrite = `\
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script src="{{root}}/planktos/planktos.min.js"></script>
<script>
_planktos = new P... |
"use strict";
var Rx = require("rx");
var _observablePool = {};
function _replicate(source, subject) {
return source.subscribe(function onOnNext(x) {
setTimeout(function () {
subject.onNext(x);
}, 0);
}, function onError(err) {
subject.onError(err);
}, function onComplete... |
import {expect} from 'chai';
import jsdom from 'jsdom';
import fs from 'fs';
describe('index.html', () => {
it('should have h1 that says Users', (done) => {
const index = fs.readFileSync('./src/index.html', 'utf-8');
jsdom.env(index, (err, window) => {
const h1 = window.document.getElementsByTagName('h1')[0];
... |
angular.module('lampost_mud').service('lmComm', ['lpEvent', 'lpData', 'lpRemote', 'lpDialog', function (lpEvent, lpData, lpRemote, lpDialog) {
var self = this;
var allLogins = false;
lpEvent.register('friend_login', friendLogin);
lpEvent.register('any_login', anyLogin);
lpEvent.register('login', ch... |
import User from '../../models/User';
export default (req, res) => {
User.find().select('name email logins').then((users) => {
const processed = users.map(user => ({
email: user.email,
name: user.name,
// NOTE: In the future, we can assume user.logins is always sorted
lastOnline: new Date... |
/* global describe, it, expect, jest */
import newCharIndex from '../char_index';
describe('newCharIndex()', () => {
it('returns an array', () => {
let index = newCharIndex('foo', 'bar');
expect(index instanceof Array).toBe(true);
});
});
describe('character index', () => {
it('length equals number of m... |
var should = require('should'),
testUtils = require('../../utils'),
rewire = require('rewire'),
configUtils = require('../../utils/configUtils'),
// Stuff we are testing
ConfigurationAPI = rewire('../../../server/api/configuration');
describe('Configuration API', function () {
// Keep the DB c... |
'use strict';
var path = require('path');
var yeoman = require('yeoman-generator');
var util = require('util');
var ngUtil = require('../util');
var BaseGenerator = require('../base.js');
var Generator = module.exports = function Generator() {
BaseGenerator.apply(this, arguments);
};
util.inherits(Generator, BaseGe... |
var server = require('./server.js');
var router = require('./router.js');
var requestHandlers = require('./postHandler.js');
var handle = {};
handle['/'] = requestHandlers.start;
handle['/start'] = requestHandlers.start;
handle['/upload'] = requestHandlers.upload;
server.start(router.route, handle);
|
angular.module('webapp').controller('AdminPlacesCreateCtrl', AdminPlacesCreateCtrl)
AdminPlacesCreateCtrl.$inject = ['PlacesService']
/**
* @ngdoc controller
* @name webapp.controller:AdminPlacesCreateCtrl
* @description In charge of the admin places creation view.
*/
function AdminPlacesCreateCtrl(PlacesService) ... |
var mocha = require('mocha');
var assert = require('assert');
var config = require('./config');
var Clips = require('../lib/clips').Clips;
describe('Testing Clips', function() {
var clips = new Clips(config.auth);
describe('#search()', function() {
it('should return information about the query', function(done) {
... |
export const generateConfig = () => {
return {
server: 'http://localhost',
port: 8080
}
}
export const generateConfig2 = () => {
return {
server: 'http://localhost',
port: 8080,
time: new Date()
}
} |
const wizard = require('./wizard');
const spawn = require('cross-spawn-promise');
module.exports = async function (options = {}) {
let command = await wizard(options);
let spawnArgs = [];
[command, ...spawnArgs] = command.split(' ');
await spawn(command, spawnArgs, {stdio: 'inherit'});
}; |
import * as logUtil from '../utils/log'
const REDIRECT_URL = browser.runtime.getURL("redirect/redirect.html");
function returnFirstNotNull() {
return [...arguments].find(a => a !== null && a !== undefined);
}
export class Executor {
constructor() {
//template
this.backgroundChildTabCount = 0;
... |
//@ts-check
"use strict";
require("dotenv").config();
const express = require("express")
, session = require("express-session")
, http = require("http")
, socketIO = require("socket.io")
, bodyParser = require("body-parser")
, mongo = require("mongodb")
, MongoStore = require("connec... |
/*global SignaturePad: true*/
angular.module("ngSignaturePad").directive('signaturePad', function ($window) {
"use strict";
var signaturePad, canvas, scope, element, EMPTY_IMAGE = "data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA=";
function calculateHeight($element) {
return parseInt($element.css("height")... |
var cluster = require('cluster');
var crypto = require('crypto');
var pearson = require('../');
if (cluster.isMaster){
var numCPUs = require('os').cpus().length;
//Getting a random seed for pearson
var theSeed = pearson.seed();
console.log('Generated seed:\n' + theSeed.toString('hex'));
//Generating random data... |
/*!
* Start Bootstrap - Grayscale Bootstrap Theme (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
// jQuery to collapse the navbar on scroll
$(window).scroll(function() {
if ($(".navbar").offset().top > 50) {
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const os = require("os");
const path = require("path");
const fs_1 = require("@ionic/cli-framework/utils/fs");
exports.ERROR_SSH_MISSING_PRIVKEY = 'SSH_MISSING_PRIVKEY';
exports.ERROR_SSH_INVALID_PUBKEY = 'SSH... |
angular.module('student.attendance').service('StudentAttendanceService', [
'$rootScope',
'$q',
function(
$rootScope,
$q
){
var exports = {};
exports.getAttendances = function(){
var deferred = $q.defer();
var mAttendances = $rootScope.$meteorCollection(Attendances, false);
$ro... |
"use strict";
module.exports = {
modules: [],
configure: function (names) {
if (names) {
names = names instanceof Array ? names : [names];
names.forEach(function (name) {
var Module = require(name);
this.modules.push(Module);
}, this);
}
}
};
|
var Ad = {};
Ad.edit = {
init : function() {
$('[name=type]').click(function(e) {
var type = $(this).val(),
nodes = [];
switch (type) {
case 'zl' :
nodes = [
['cpm_size', 0],
['siz... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.