code stringlengths 2 1.05M |
|---|
module.exports = require('./register')().Promise
|
/*!
* # Semantic UI 2.2.4 - Visibility
* http://github.com/semantic-org/semantic-ui/
*
*
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
;(function ($, window, document, undefined) {
"use strict";
window = (typeof window != 'undefined' && window.Math == Math)
? window
: (typeof... |
/*globals describe, beforeEach, afterEach, it*/
var rewire = require('rewire'),
ampController = rewire('../lib/router'),
path = require('path'),
sinon = require('sinon'),
Promise = require('bluebird'),
errors = require('../../../errors'),
... |
YUI.add('dd-drag', function(Y) {
/**
* Provides the ability to drag a Node.
* @module dd
* @submodule dd-drag
*/
/**
* Provides the ability to drag a Node.
* @class Drag
* @extends Base
* @constructor
* @namespace DD
*/
var DDM = Y.DD.DDM,
NO... |
// moment.js
// version : 1.5.0
// author : Tim Wood
// license : MIT
// momentjs.com
(function(a, b) {
function u(a, b) {
this._d = a, this._isUTC = !!b;
}
function v(a, b) {
var c = a + "";
while (c.length < b) c = "0" + c;
return c;
}
function w(b, c, d, e) {
... |
/*jslint unparam: true, browser: true, indent: 2 */
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.dropdown = {
name : 'dropdown',
version : '4.3.0',
settings : {
activeClass: 'open',
is_hover: false,
opened: function(){},
closed: function(){}
... |
(function(){
"use strict";
var fs = require('fs');
// you'll probably load configuration from config
var cfg = {
ssl: true,
port: 8080,
ssl_key: '/path/to/you/ssl.key',
ssl_cert: '/path/to/you/ssl.crt'
};
var httpServ = ( cfg.ssl ) ? require('https') : requir... |
YUI.add('datasource-io', function (Y, NAME) {
/**
* Provides a DataSource implementation which can be used to retrieve data via the IO Utility.
*
* @module datasource
* @submodule datasource-io
*/
/**
* IO subclass for the DataSource Utility.
* @class DataSource.IO
* @extends DataSource.Local
* @constructor
... |
/**
* Copyright (c) 2008-2011 The Open Source Geospatial Foundation
*
* Published under the BSD license.
* See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text
* of the license.
*/
/**
* @require OpenLayers/Control/SelectFeature.js
* @require OpenLayers/Layer/Vector.js
* @require OpenLay... |
/*!
* jQuery UI Accordion 1.12.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*/
//>>label: Accordion
//>>group: Widgets
// jscs:disable maximumLineLength
//>>description: Displays collapsible content panels for presen... |
// convert array-like object into array
var GLOBAL = require('./GLOBAL')
function toArray (value) {
if (value == null) return []
var kind = typeof value
if (value.length == null
|| kind === 'string'
|| kind === 'function'
|| value instanceof RegExp
|| value === GLOBAL
) {
// string, re... |
'use strict';
var Flatbush = require('flatbush');
module.exports = linematch;
module.exports.default = linematch;
function linematch(lines1, lines2, threshold) {
var segments = linesToSegments(lines1);
var segments2 = linesToSegments(lines2);
var index = new Flatbush(segments2.length / 4);
for (var... |
'use strict';
var fs = require('fs');
var path = require('path');
var http = require('http');
var https = require('https');
var expect = require('expect.js');
var request = require('request');
var express = require('express');
var constants = require('constants');
var requireHttps = require('../index');
describe('req... |
'use strict';
var expect = require('chai').expect,
serviceUrlFinder = require('./index');
describe('serviceUrlFinder', function() {
it('discovers service URL overrides on SERVICE_NAME_URL', function() {
process.env['SOME_SERVICE_URL'] = 'service://1.3.1.3:666';
expect(serviceUrlFinder('some-service', 66... |
/*!
* NsWeb Angular Gruntfile
* @author Jovica Čonkić
*/
'use strict';
/**
* Livereload and connect variables
*/
var LIVERELOAD_PORT = 35729;
var serveStatic = require('serve-static');
var rewrite = require('connect-modrewrite');
var lrSnippet = require('connect-livereload')({
port: LIVERELOAD_PORT
});
var mou... |
require('../css/index.scss')
|
var _ = require('lodash');
var bodyParser = require('body-parser');
var express = require('express');
var request = require('superagent');
var LineBot = require('line-bot-sdk');
var client = LineBot.client({
channelID: 'YOUR_CHANNEL_ID',
channelSecret: 'YOUR_CHANNEL_SECRET',
channelMID: 'YOUR_CHANNEL_MID'
});
va... |
import React from 'react';
import PropTypes from 'prop-types';
import { Loading } from '../common';
import { Student } from '../../containers/ViewStudents';
const StudentListView = ({ loading, studentIds, studentGroupNodeId, hasPermissions }) => {
if (loading) {
return <Loading />;
}
if (!studentIds.length... |
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-bump');
grunt.initConfig({
/**
* Increments the version number, etc.
*/
bump: {
options: {
files: [
"package.json"
],
commit: true,
commitMessage: 'chore(release): v%VERSION%',
c... |
//-----------------------------------------------------------------------------
// Allows the elegant retrieval of a JSON value using a starting reference,
// an evaluated string, and a configurable return value or behaviour when not
// found.
//
// Saves you from the repition of 'if... exists...' LOC.
//--------------... |
'use strict';
/*eslint-disable no-unused-vars*/
var test = require('tap').test,
inferKind = require('../../../lib/infer/kind')(),
parse = require('../../../lib/parsers/javascript');
function toComment(fn, filename) {
return parse({
file: filename,
source: fn instanceof Function ? '(' + fn.toString() + ')... |
'use strict'
const got = require('got')
const config = require('./config')
const util = require('./util')
const Team = require('./schema').Team
/**
* Handles the /oauth page
*/
async function route(ctx) {
await util.login(ctx.state, ctx.session)
const code = ctx.request.query.code
const oauthKey = ctx.request.... |
require('app/core');
require('app/views/login');
App.reopen({
store: DS.Store.create(),
ApplicationController: Em.Controller.extend(),
ApplicationView: Em.View.extend({
templateName: 'application'
}),
Router: Ember.Router.extend({
enableLogging: true,
location: 'hash',
root: Embe... |
// Generate an arbitrary wave-form
// from a left-right function.
var _ = require('lodash'),
wav = require('wav'),
streamBuffers = require("stream-buffers"),
fs = require('fs');
function Function(opts) {
_.extend(this, {
file: null, // path to file.
offset: 0,
buffer: null,
left: null,
righ... |
/* jslint undef: true */
/* global window, document, $ */
/* ----------------------------------------------------------------
* camera.js
*
* Made by shash7
* https://github.com/shash7/camera
*
* Licensed under the MIT license
*
* Api usage :
*
* var camera = new Camera();
* camera.start();
* camera.s... |
var TWEEN_CONST = require('../const');
var ResetTweenData = function (resetFromLoop)
{
var data = this.data;
for (var i = 0; i < this.totalData; i++)
{
var tweenData = data[i];
tweenData.progress = 0;
tweenData.elapsed = 0;
tweenData.repeatCounter = (tweenData.repeat === ... |
/*
* Copyright 2014-2015 MarkLogic Corporation
*
* 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... |
import Dispatcher from '../dispatchers/Dispatcher'
const moment = require('moment');
export async function createBrew (beerName) {
let raw = {
"beerName": beerName,
"startDate": moment(),
"endDate": "9999-09-09T03:00:00.000Z",
"userId": "580d60ce308e440011e556ca"
};
let data ... |
//TODO: Disable buttons during configured form save.
// Variables.
var app = angular.module("umbraco");
// Associate directive/controller.
app.directive("formulateConfiguredFormDesigner", directive);
app.controller("formulate.configuredFormDesigner", controller);
// Directive.
function directive(formulateDirectives)... |
'use strict';
module.exports = {
db: 'mongodb://localhost/experiment-test',
port: 3001,
app: {
title: 'Experiment - Test Environment'
},
facebook: {
clientID: process.env.FACEBOOK_ID || 'APP_ID',
clientSecret: process.env.FACEBOOK_SECRET || 'APP_SECRET',
callbackURL: '/auth/facebook/callback'
},
twitter... |
class VuePlugin {
constructor (config) {
this.config = config
}
apply (compiler) {
compiler.plugin('done', stats => {
if (this.config.spinner) {
this.config.spinner.stop()
}
})
}
}
export default config => {
return new VuePlugin(config)
}
|
/**
* Appfy is a JavaScript toolkit that saves your time to build Single Page Applications. It totally modular and based on MEAN stack concept.
*
* Software licensed under MIT, maintained by Appfy Co and its contributors. Feel free to open an issue or make a PR.
* Check out documentation and full list of contribut... |
module.exports = function(grunt) {
// Load grunt tasks automatically
require('load-grunt-tasks')(grunt);
// Tasks
grunt.initConfig({
less: {
development: {
options: {
paths: ["assets/css/less"]
},
files: {
... |
const NODE_LIST_CLASSES = {
'[object HTMLCollection]': true,
'[object NodeList]': true,
'[object RadioNodeList]': true
}
// .type values for elements which can appear in .elements and should be ignored
const IGNORED_ELEMENT_TYPES = {
'button': true,
'fieldset': true,
'reset': true,
'submit': true
}
cons... |
'use strict';
var View = require('view.js');
var O = require('observable.js');
var Button = require('button.js');
var Splitter = require('splitter.js');
var CodeView = require('codeview.js');
var StackView = require('stackview.js');
var LocalsView = require('localsview.js');
var ConsoleView = require('consoleview.js')... |
/**
* Broadcast updates to client when the model changes
*/
'use strict';
var Timeoff = require('./timeOff.model');
exports.register = function(socket) {
Timeoff.schema.post('save', function (doc) {
onSave(socket, doc);
});
Timeoff.schema.post('remove', function (doc) {
onRemove(socket, doc);
});
}... |
import markdown from 'markdown-in-js'
import withDoc, { components } from '~/lib/with-doc'
import { expoteam } from '~/data/team'
// import { InternalLink, ExternalLink } from "~/components/text/link";
// import { P } from "~/components/text/paragraph";
// import Image from '~/components/base/image'
import { InlineCod... |
const render = require("preact-render-to-string");
const { h } = require("preact");
module.exports = () => ({
template: {
title: "Smoke test",
},
render: {
interactive({ component, props }) {
return render(h(component, props));
},
},
output: "build",
paths: {
"/": () => require("./lay... |
'use strict';
angular.module('bucleApp.core')
.directive('customFooter', [
function () {
return {
templateUrl: 'components/templates/footer.html',
replace: true
};
}
])
.directive('mainFooter', [
function () {
return {
templateUrl: 'components/templates/main-footer.html',
li... |
export * from "./collision";
export * from "./slice";
export * from "./intersect";
export * from "./union";
|
describe( 'AppCtrl', function() {
describe( 'isCurrentUrl', function() {
var AppCtrl, $location, $scope;
beforeEach( module( 'app' ) );
beforeEach( inject( function( $controller, $rootScope, $mdSidenav, $mdBottomSheet, $mdDialog, $log, $q) {
//$location = _$location_;
$scope = $rootScope.$ne... |
module.exports = exports = function (app) {
var client = app.client;
var db = app.database('main').collection('seen');
var conf = app.conf;
var log = app.utils.log;
var formatPeriod = app.utils.formatPeriod;
var cnames = app.cnames;
function lastSeen(opt, callback) {
var all = false;... |
{
/* global angular, APP_NAME */
angular
.module(APP_NAME)
.directive('passwordMatch', passwordMatch);
passwordMatch.$inject = [];
function passwordMatch() {
var directive = {
restrict: 'A',
scope: true,
require: 'ngModel',
link: linkFn
};
return directive;
fu... |
import_module('Athena.Math');
aab = new Athena.Math.AxisAlignedBox(-1, -1, -1, 1, 1, 1);
m = new Athena.Math.Matrix4();
m.makeTransform(new Athena.Math.Vector3(10.0, 20.0, 30.0),
Athena.Math.Vector3_UNIT_SCALE,
Athena.Math.Quaternion_IDENTITY);
aab.transform(m);
CHECK(aab.isFinite(),... |
var importsStartupClientIndex = function () {
var template = `###
/imports/startup/client/index.coffee
###
DEBUG = true
console.log '/imports/startup/client/index.coffee is loaded' if DEBUG
`
return template
}
module.exports = importsStartupClientIndex
|
const _ = require('../../../utils/under-dash');
const BaseXform = require('../base-xform');
class PageMarginsXform extends BaseXform {
get tag() {
return 'pageMargins';
}
render(xmlStream, model) {
if (model) {
const attributes = {
left: model.left,
right: model.right,
top:... |
/**
* @fileoverview Rule to flag when exporting a React Class while also calling a function on it
* @author Naman Goel
* @copyright 2014 Nicholas C. Zakas. All rights reserved.
*/
import type {Context, Rules, EslintNode} from './types'
function getFinalArg(node: EslintNode): ?string{
if(node.arguments.length ==... |
import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h("path", {
d: "M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8 12.5v-9l6 4.5-6 4.5z"
}), 'VideoLibrary'); |
/*
Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
if(!dojo._hasResource["dojox.charting.themes.Julie"]){ //_hasResource checks added by build. Do not use _hasResource direct... |
/*
//
// CASE for Alasql.js
// Date: 03.11.2014
// (c) 2014, Andrey Gershun
//
*/
yy.CaseValue = function (params) {
return yy.extend(this, params);
};
yy.CaseValue.prototype.toString = function () {
var s = 'CASE ';
if (this.expression) s += this.expression.toString();
if (this.whens) {
s += this.whens
.map(... |
'use strict';
/**
*
*App level module with it's dependencies
*
*/
angular.module('app', [
'ui.router',
'ui.bootstrap'
]); |
'use strict';
const values = ["A", "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K"];
const cardTypes = ["D", "C", "H", "S"];
const symbols = {
"D": "♦",
"H": "♥",
"S": "♠",
"C": "♣",
};
class blackjackGame extends Rooms.botGame {
constructor(room) {
super(room);
... |
// code style: https://github.com/johnpapa/angular-styleguide
(function() {
'use strict';
angular
.module('app')
.controller('GoogleMapCtrl', GoogleMap);
function GoogleMap ($scope) {
var vm = $scope;
vm.myMarkers = [];
vm.mapOptions = {
cente... |
"use strict";
ace.define("ace/ext/whitespace", ["require", "exports", "module", "ace/lib/lang"], function (require, exports, module) {
"use strict";
var lang = require("../lib/lang");
exports.$detectIndentation = function (lines, fallback) {
var stats = [];
var changes = [];
var ta... |
var indexRoutes = require('./routes/index')
, helloRoutes = require('./routes/hello')
module.exports = function (app) {
// App entry route
app.get('/', indexRoutes.index);
// "Hello" example route
app.get('/hello/dump-request-headers', helloRoutes.dumpRequest);
};
|
import Vue from 'vue'
import VueRouter from 'vue-router'
import MovieIndex from '../views/movie/index.vue'
import MovieShow from '../views/movie/show.vue'
Vue.use(VueRouter)
const router = new VueRouter({
mode: 'history',
routes: [
{ path: '/', component: MovieIndex },
{ path:'/movie/:id',component:MovieShow}
]... |
import score from '../../src/lib/score';
/* eslint-disable prefer-arrow-callback, func-names */
chai.should();
describe('scoring', function () {
it('prefers more ratings given similar scores', function () {
score(4.7, 10).should.be.below(score(4.5, 1000));
});
it('prefers a higher score given similar numb... |
var express = require('express');
var myAbout = require('../controllers/about.js');
var huffman = require('../controllers/huffman/huffman.js');
var router = express.Router();
var retData = {
title: '哈夫曼编码',
author: 'margaret',
encodeString: null
};
/* GET home page. */
router.get('/', function(req, res, next) {
... |
/*!
* Copyright(c) 2015 Shelloid Systems LLP.
* MIT Licensed
*/
/**
@roles ["admin"]
*/
exports.index = listUsers;
/**
@sql.selectInvited SELECT a.email email, a.name name, a.regd_at regd_at,
a.validated validated, b.email who_invited, a.svc svc
FROM interested_users a LEFT JOIN interested_user... |
function increase_quantity(cart_item_id){
var q = $('#quantity_' + cart_item_id);
var x = parseInt(q.val());
q.val(x + 1);
update_quantity(cart_item_id);
}
function decrease_quantity(cart_item_id){
var q = $('#quantity_' + cart_item_id);
var x = parseInt(q.val());
q.val(x - 1);
update_quantity(cart_ite... |
angular.module('ionic-chat-app',
[
'ionic',
'ionic-chat-app-services',
'ionic-chat-app-controllers',
'ionic-chat-app-directives'
])
.run(function ($ionicPlatform) {
$ionicPlatform.ready(function () {
if (window.cordova && window.cordova.plugins.Keyboard) ... |
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('route-instructions', 'Integration | Component | route instructions', {
integration: true
});
test('it renders', function (assert) {
// Set any properties with this.set('myProperty', 'value');
... |
const saurus = require('saurus')
exports.run = async (bot, msg, args) => {
if (!bot.utils.hasEmbedPermission(msg.channel)) {
return msg.error('No permission to use embed in this channel!')
}
const parsed = bot.utils.parseArgs(args, ['a'])
if (!parsed.leftover.length) {
return msg.error('You must spec... |
module.exports = function (path) {
return "!" + path;
};
|
import React from 'react';
import './Tips.css';
function Tips(props) {
return (
<div className="Tips">
{props.children}
</div>
);
}
export default Tips;
|
var fs = require('fs'),
Q = require('q'),
path = require('path');
/**
Scans the provided directories for JavaScript files
dirsConfig: [{
dir: String, // A directory name to scan recursively (relative to basedir)
first: [String], // Include these files (relative to dir) in order before any other scanned fi... |
'use strict';
angular.module('users').controller('AuthenticationController', ['$scope', '$http', '$location', 'Authentication',
function($scope, $http, $location, Authentication) {
$scope.authentication = Authentication;
// If user is signed in then redirect back home
if ($scope.authentication.user) $locat... |
/*
Nodejs uses Javascript (official name: ECMA script)
use: http://jsconsole.com/
*/
// define variables with var
////////////////////////////
// string
var myName = "Joost";
console.log("My name is " + myName);
// number
var myAge = 28; // not really, but it sounds good
console.log("Last year I ... |
/**
* app/script/app
* Application main script.
* @author Keenan Staffieri
*/
console.log('Main application script loaded.')
|
/**
* Created by Administrator on 2016/9/19.
*/
var crypto = require('crypto');
function pwdMd5(pwd) {
var hash = crypto.createHash("md5");
hash.update(pwd); //直接对"123456"字符串加密
return hash.digest('hex');
}
exports.pwdMd5=pwdMd5; |
version https://git-lfs.github.com/spec/v1
oid sha256:0ff5cad3aefefd4a18f6ea80f78a7999c825056be6c35134b3a815b3eb2cfe12
size 759
|
"use strict";
var CONSTANT_PREFIX = "var getMessages = function (){\n";
CONSTANT_PREFIX += " var r = function(val, args){\n";
CONSTANT_PREFIX += " for(var x = 0;x<args.length;x++){\n";
CONSTANT_PREFIX += " val = val.replace('{'+x+'}', args[x]);\n";
CONSTANT_PREFIX += " }\n";
CONSTANT_PREFIX... |
var webpack = require('webpack');
module.exports = {
entry: './index.js',
output: {
path: 'public',
filename: 'bundle.js',
publicPath: '/',
},
plugins: process.env.NODE_ENV === 'production' ? [
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurrenceOrderPlugin(),
new webp... |
module.exports = function(app, ProductModel){
// GET /products
app.get('/products', (req, res) => {
ProductModel.find({}, (err, data) => {
if (err) res.sendStatus(404)
res.status(200).send(data)
})
})
// GET /products/:id
app.get('/products/:id', (req, res) => {
ProductModel.findById(re... |
const ftdi = require('../hello_world/hello.js');
const fs = require('fs');
const { Transform } = require('stream');
const protocols = fs.readdirSync('./protocols/').reduce((carry, protocolFile) => {
//console.log(protocolFile.substr(0, protocolFile.lastIndexOf('.')));
carry[protocolFile.substr(0, protocolFile.lastIn... |
/*!
* parse-github-short-url <https://github.com/tunnckoCore/parse-github-short-url>
*
* Copyright (c) 2015-2016 Charlike Mike Reagent <@tunnckoCore> (http://www.tunnckocore.tk)
* Released under the MIT license.
*/
/* jshint asi:true */
'use strict'
var test = require('assertit')
var gh = require('./index')
te... |
/* eslint-env mocha */
'use strict'
const Listener = require('../src/listener')
const nodes = require('./fixtures/nodes')
const waterfall = require('async/waterfall')
const PeerInfo = require('peer-info')
const PeerId = require('peer-id')
const multiaddr = require('multiaddr')
const handshake = require('pull-handshake... |
/*!
* bootstrap-fileinput v4.3.5
* http://plugins.krajee.com/file-input
*
* Author: Kartik Visweswaran
* Copyright: 2014 - 2016, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
*/
(function (factory) {
"u... |
// Finnish
'use strict';
var fi = function() {}
fi.code = 'fi';
fi.data = {
GEN_Help_0 : 'Already have a wallet somewhere?',
GEN_Help_MetaMask : 'So easy! Keys stay in MetaMask, not on a phishing site! Try it today.',
GEN_Warning_1 : '**Do not lose it!** It cann... |
(function() {
'use strict';
var $likes = $('#likes'),
$count = $likes.find('span.count'),
$pageId = $likes.data('page-id'),
hasLikes = false,
database = 'mikebrevoort',
collection = 'likes',
apiKey = 'O5du5o12UZ4urBz4jxt7imKGPz2YATvV',
timer;
if (location.hostname.matc... |
define(['jquery'], function($) {
'use strict';
function makeCheckbox($el) {
var $checkbox = $('<input>', {
type: 'checkbox',
name: $el[0].id,
value: '1',
checked: $el.hasClass('active')
}).hide();
$checkbox.insertAfter($el);
return $checkbox;
}
return {
/**
* ... |
(function() {
"use strict";
const app = window.app;
function moveableRules(parent, handleSelector) {
const placeholder = document.createElement("div");
const handles = Array.prototype.slice.call(parent.querySelectorAll(handleSelector));
let children;
let mouseDown = false;
... |
/*
* @fileOverview
* @author: Mike Grabowski (@grabbou)
*/
'use strict';
var Blueprint = require('../lib/models/blueprint');
var expect = require('chai').expect;
describe('Blueprint#getArguments', function() {
var blueprint = Blueprint.load('page');
var args = [{
arg: 'arg1'
}];
it('should return na... |
/*
* Dropdown menus.
*
* This script customizes the Twitter Bootstrap drop-downs.
*
* Require:
* - bootstrap/dropdown
*/
+function ($) { "use strict";
$(document).on('shown.bs.dropdown', '.dropdown', function(event, relatedTarget) {
$(document.body).addClass('dropdown-open')
v... |
(function () {
'use strict';
angular.module('ServerApp')
.controller('adminCountdownReEnableController', adminCountdownReEnableController);
function adminCountdownReEnableController(changeConfigFactory, $scope, hotkeys, connectFactory) {
var self = this;
self.reEnable = false;
... |
var heroku = require('../../lib/services/heroku')
describe('Heroku CI Provider', function() {
it('can detect heroku', function() {
process.env.HEROKU_TEST_RUN_ID = '454f5dc9-afa4-433f-bb28-84678a00fd98'
expect(heroku.detect()).toBe(true)
})
it('can get wercker env info', function() {
process.env.HER... |
'use strict';
//Categories service used to communicate Categories REST endpoints
angular.module('categories').factory('Categories', ['$resource',
function($resource) {
return $resource('categories/:categoryId', {
categoryId: '@_id',
searchData: '@_searchData'
}, {
update: {
method: ... |
var Tecnotek = Tecnotek || {};
Tecnotek.Visits = {
visitId: 0,
currentList: null,
init : function() {
$( "#date" ).datepicker({
defaultDate: "0d",
changeMonth: true,
dateFormat: "dd/mm/yy",
showButtonPanel: true,
currentText: "Hoy",
... |
// HTTP module.
var http = require('http');
// HTTP proxy module.
var httpProxy = require('http-proxy');
// Authentication module.
var auth = require('../gensrc/http-auth');
var basic = auth.basic({
realm: "Simon Area.",
file: __dirname + "/../data/users.htpasswd" // gevorg:gpass, Sarah:testpass
});
// Create your... |
'use strict';
/**
* Module dependencies.
*/
var _ = require('lodash');
var EventEmitter = require('events').EventEmitter;
var Command = require('./command');
var CommandInstance = require('./command-instance');
var VorpalUtil = require('./util');
var ui = require('./ui');
var Session = require('./session');
var int... |
/**
* Run with:
* $ node server.js
*/
var http = require('http'),
url = require('url'),
fs = require('fs'),
path = require('path'),
mime = require('mime');
function serveStaticFile(filename, response) {
if (fs.statSync(filename).isDirectory()) filename += 'index.html';
fs.readFile(filename... |
var vImage = Aspectize.CreateView("Image", aas.Controls.ImageControl, aas.Zones.SideBarContent.ZoneContent);
vImage.OnActivated.BindCommand(aas.Services.Browser.BootStrapClientService.ActiveLiElement(aas.ViewName.Image));
vImage.ImageProduct.OnNeedImage.BindCommand(aas.Services.Server.LoadDataService.LoadImage(vImage.... |
/*
* Copyright (c) 2014 airbug inc. http://airbug.com
*
* bugpack may be freely distributed under the MIT license.
*/
//-------------------------------------------------------------------------------
// Context
//-------------------------------------------------------------------------------
require('./BugPackFi... |
'use strict';
(function() {
// General item outward entries Controller Spec
describe('General item outward entries Controller Tests', function() {
// Initialize global variables
var GeneralItemOutwardEntriesController,
scope,
$httpBackend,
$stateParams,
$location;
// The $resource service augments the... |
'use strict';
/**
* Module dependencies.
*/
var should = require('should'),
mongoose = require('mongoose'),
User = mongoose.model('User'),
WritingBlock = mongoose.model('WritingBlock');
/**
* Globals
*/
var user, writingBlock;
/**
* Unit tests
*/
describe('Writing block Model Unit Tests:', function() {
bef... |
"use strict";
const isKeyframeSelector = require("../../utils/isKeyframeSelector");
const isStandardSyntaxRule = require("../../utils/isStandardSyntaxRule");
const isStandardSyntaxSelector = require("../../utils/isStandardSyntaxSelector");
const isStandardSyntaxTypeSelector = require("../../utils/isStandardSyntaxTypeS... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2016-2017 The Regents of the University of California
*
* 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
* wi... |
window.onload = init;
window.onkeydown = key.press;
function init() {
try {
stb = gSTB;
stb.ExecAction("graphicres " + graphicres_mode);
stb.EnableServiceButton(true);
} catch (e) {
}
try {
modes.emulate = false;
stb = gSTB;
} catch (e) {
modes.emulate... |
/**
* Welcome to your gulpfile!
* this file will contain the build task that will responsible for minifying js & compile sass
*/
'use strict';
var gulp = require('gulp');
var del = require('del');
var filter = require('gulp-filter');
var sourcemaps = require('gulp-sourcemaps');
var uglify = require('gulp-uglify')... |
/*
* grunt-yaml-to-swagger
*
*
* Copyright (c) 2014 Cyril GIACOPINO
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// Configuration to be run (and then tested).
yaml_to_swagger: {
all: {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.