code stringlengths 2 1.05M |
|---|
'use strict';
let gulp = require('gulp');
let babel = require('gulp-babel');
// 获取 uglify 模块(用于压缩 JS)
let uglify = require('gulp-uglify');
/**
* 编译js文件
*/
gulp.task('es6-js', function () {
//pages下面的业务代码进行babel处理
gulp.src(['./src/ec-do-2.0.0.js','./src/ec-do-3.0.0-beta.1.js','./test-es6.js','./src/ec-do-3.0.0... |
require('should');
var _ = require('underscore');
var uuid = require('node-uuid');
var async = require('async');
var lock = require('../../lib/lock');
var client = require('../../lib/redis-client').client;
describe("The locking module", function() {
var testKey = null;
var testMultipleKeys = null;
beforeEach(f... |
// extends from DashboardCtrl
DashboardCtrl.prototype.filterPendingTransfersByFacility = function(facility) {
var _this = this;
var filters = { permanent_location_facility: facility };
_this.getPendingItemTransfers(filters);
}
DashboardCtrl.prototype.getPendingItemTransfers = function(filters) {
this.dashbao... |
'use strict'
angular.module('ProyectoISApp')
.controller('PrincipalController', ['$scope', '$location', '$timeout', '$cookies','$http',
'ResourceCuentaLogueada',
function($scope, $location, $timeout, $cookies, $http,
ResourceCuentaLogueada){
$scope.cuentaLogueadaDesdeInicio = ... |
/**
* DocuSign REST API
* The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.
*
* OpenAPI spec version: v2.1
* Contact: devcenter@docusign.com
*
* NOTE: This class is auto generated. Do not edit the class manually and submit a new issue inste... |
'use strict';
const assert = require('assert');
const http = require('http');
const request = require('supertest');
const bory = require('..');
describe('bory.json()', () => {
it('should parse JSON', (done) => {
request(createServer())
.post('/')
.set('Content-Type', 'application/json')
.send('{"us... |
"use strict";
/**
* @module opcua.address_space
*/
require("requirish")._(module);
var NodeClass = require("lib/datamodel/nodeclass").NodeClass;
var NodeId = require("lib/datamodel/nodeid").NodeId;
var resolveNodeId = require("lib/datamodel/nodeid").resolveNodeId;
var DataValue = require("lib/datamodel/datavalue")... |
// Generated by CoffeeScript 1.12.6
(function() {
var Bits, CustomReceiver, DEBUG_INCOMING_PACKET_DATA, DEBUG_INCOMING_PACKET_HASH, DEFAULT_SERVER_NAME, Sequent, StreamServer, aac, avstreams, config, crypto, fs, h264, http, logger, mp4, net, packageJson, ref, rtmp, rtsp, serverName;
net = require('net');
fs = r... |
// @flow
import React from 'react'
import {connect} from 'react-redux';
import * as THREE from 'three'
import ReactAnimationFrame from 'react-animation-frame'
import {
increaseBuildingTargetHeight,
progressTime,
placeNewBuilding,
placeStreet,
reset,
updateEventStatus} from '../sceneActionCreators'
import {
... |
/**
* Build client
*/
'use strict';
/**
* Module dependencies.
*/
var middleware = require('./middleware');
/**
* Initialize a new `Build` client.
*/
function Build(jenkins) {
this.jenkins = jenkins;
}
/**
* Build details
*/
Build.prototype.get = function(opts, callback) {
var arg0 = typeof arguments... |
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React from 'react';
import Router from 'react-routing/src/Router';
import http from './core/HttpClient';
// boilerplate included components
import App from './components/App';
import ContentPage from './components/ContentPage';
import Re... |
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"), require("../xml/xml"), require("../meta"));
else if (type... |
const lams = require('../../../index.js')
const mocks = require('../../../lib/mocks.js')
const path= require('path')
const options = {reporting:"no", cwd:__dirname}
require('../../../lib/expect-to-contain-message');
const log = x=>console.log(x)
const testProjectName = __dirname.split(path.sep).slice(-1)[0];
describe(... |
/**
* Created by bobtian on 16/2/3.
*/
export default class DomMultipleElementsController {
constructor() {
this.options = {
"dom": '<"top"iflp<"clear">>rt<"bottom"iflp<"clear">>'
};
}
}
DomMultipleElementsController.$inject = []; |
import Ember from 'ember';
import layout from '../templates/components/ember-form-master-2000/fm-radio-group';
export default Ember.Component.extend({
layout: layout,
classNameBindings: ['radioGroupWrapperClass', 'errorClass'],
fmConfig: Ember.inject.service('fm-config'),
errorClass: Ember.computed('showErrors... |
/*
* angular-socket-io v0.2.0
* (c) 2013 Brian Ford http://briantford.com
* License: MIT
*/
'use strict';
module.exports = angular.module('btford.socket-io', []).
provider('socket', function () {
// when forwarding events, prefix the event name
var prefix = 'socket:',
ioSocket;
... |
/*
* This file is part of the Fxp package.
*
* (c) François Pluchino <francois.pluchino@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Refresh the size list of pager.
*
* @param {TablePager} self The tabl... |
dependenciesLoader(["React", "ReactDOM", "$"], function () {
// Debounce resize
!function (n, r) {
var t = function (n, r, t) {
var e;return function () {
function i() {
t || n.apply(u, a), e = null;
}var u = this,
a = a... |
import lenientFunction from './lenient.js';
export default function yn(value, {
lenient = false,
default: default_,
} = {}) {
if (default_ !== undefined && typeof default_ !== 'boolean') {
throw new TypeError(`Expected the \`default\` option to be of type \`boolean\`, got \`${typeof default_}\``);
}
if (value ... |
"use strict";
angular.module("wrektranet.adminTicketCtrl", [])
// container for list of tickets
.controller('adminTicketListCtrl', [
'$scope',
'Restangular',
function($scope, Restangular) {
Restangular.setBaseUrl('/admin');
// update contests for any appropriate tickets
$scope.$on('updateContests',... |
var path = require('path');
var minimist = require('./lib/minimist');
var wordwrap = require('./lib/wordwrap');
/* Hack an instance of Argv with process.argv into Argv
so people can do
require('yargs')(['--beeble=1','-z','zizzle']).argv
to parse a list of args and
require('yargs').argv
to ... |
var preloader = {};
preloader.preload = function () {
this.game.load.image('logo', 'images/phaser.png');
};
preloader.create = function () {
this.game.state.start('game');
};
module.exports = preloader;
|
import React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import SwipeableViews from 'react-swipeable-views';
import { makeStyles, useTheme } from '@material-ui/core/styles';
import AppBar from '@material-ui/core/AppBar';
import Tabs from '@material-ui/core/Tabs';
import Tab from '@materia... |
/*! jQuery Markup - v0.1.0 - 2013-03-11
* Copyright (c) 2013 pstulzer; Licensed MIT */
;(function($, window, document, undefined) {
if (!$.ps) {
$.ps = {};
}
$.ps.snippets = function(el, options) {
var defaults = {
showdocu : true,
showcode : true,
codeview : true,
snippets : {},... |
import gulp from 'gulp';
import gulpif from 'gulp-if';
import plumber from 'gulp-plumber';
import jade from 'gulp-jade';
import inheritance from 'gulp-jade-inheritance';
import cached from 'gulp-cached';
import filter from 'gulp-filter';
import rename from 'gulp-rename';
im... |
/*
* @Date : 04-02-2014
* Params Get From /components/user/Main.js
* Author : Accel FrontLine@Cochin
*/
var AppDispatcher = require('../dispatcher/AppDispatcher');
var ProjectConstants = require('../constants/ProjectConstants');
var ProjectActions = {
//Create New Client Action
create : func... |
(function() {
var HollaBack, assert, vows;
vows = require('vows');
assert = require('assert');
HollaBack = require('../holla_back.js');
vows.describe('EventEmitter').addBatch({
'Binding events': {
topic: new HollaBack,
"throws an exception if the event handler is missing": function(obj) {
... |
// @flow
import React, { Component } from 'react';
import { Link } from 'react-router';
export default class App extends Component {
props: {
children: HTMLElement
};
render() {
return (
<div>
<nav className="navbar navbar-light navbar-fixed-top bg-white">
<a className="navbar-br... |
require('./setup')
var fount = require('../src/index.js')
describe('Resolving', function () {
before(function () {
fount.setModule(module)
})
describe('with dependencies', function () {
before(function () {
fount.register('an value!', 'ohhai')
})
it('should resolve correctly', function ()... |
/**
* Hilo 1.0.0 for amd
* Copyright 2016 alibaba.com
* Licensed under the MIT License
*/
define("hilo/view/Bitmap",["hilo/core/Hilo","hilo/core/Class","hilo/view/View","hilo/view/Drawable"],function(i,t,e,h){var s=t.create({Extends:e,constructor:function(t){if(t=t||{},this.id=this.id||t.id||i.getUid("Bitmap"),s.su... |
//used for the media picker dialog
angular.module("umbraco")
.controller("Umbraco.Editors.MediaPickerController",
function ($scope, $timeout, mediaResource, entityResource, userService, mediaHelper, mediaTypeHelper, eventsService, treeService, localStorageService, localizationService, editorService, umbSess... |
export default {
key: 'B',
suffix: '7',
positions: [
{
frets: 'x21202',
fingers: '021304'
},
{
frets: '224242',
fingers: '113141',
barres: 2,
capo: true
},
{
frets: 'xx4445',
fingers: '001112',
barres: 4,
capo: true
},
{
... |
// janium_api.js
/////
// Para uso exclusivo en el Sistema Nacional de Bibliotecas de Costa Rica (SINABI)
/////
//
// Copyright (C) 2014 - 2015, Janium Technology, S.A. de C.V.
//
// Todos los derechos reservados.
//
// Este programa de cómputo es un producto intelectual protegido en favor de su
// productor Ja... |
const through = require('through2');
const gutil = require('gulp-util');
const path = require('path');
const uuid = require('uuid');
const mkdirp = require('mkdirp');
const fs = require('fs');
const url = require('url');
const webpack = require('webpack');
const Utils = require('./src/utils');
const { processCss, proce... |
/*
*
* This example demonstrates how to read custom metadata from device
*
* API Documentation:
* https://m2x.att.com/developer/documentation/v2/device#Read-Device-Metadata
*/
var config = require("./config");
var M2X = require("../lib/m2x");
var m2x_client = new M2X(config.api_key);
var deviceId = config.device... |
'use strict';
describe('Controller: AboutCtrl', function () {
// load the controller's module
beforeEach(module('battleshipApp'));
var AboutCtrl,
scope;
// Initialize the controller and a mock scope
beforeEach(inject(function ($controller, $rootScope) {
scope = $rootScope.$new();
AboutCtrl = $... |
var {Operator, Type} = require("@kaoscript/runtime");
module.exports = function() {
function foo(x, y, __ks_cb) {
if(arguments.length < 3) {
let __ks_error = new SyntaxError("Wrong number of arguments (" + arguments.length + " for 2 + 1)");
if(arguments.length > 0 && Type.isFunction((__ks_cb = arguments[argume... |
//Definicion del modelo Attachment
module.exports=function(sequelize,DataTypes){
return sequelize.define("Attachment",
{
public_id:{
type: DataTypes.STRING,
validate: {notEmpty:{msg:"El Campo public_id no puede estar Vacío"}}
},
url:{
type: DataTypes.STRING... |
'use strict';
/**
* @ngdoc function
* @name familyhistorydatabaseApp.controller:NavCtrl
* @description
* # NavCtrl
* Controller of the familyhistorydatabaseApp
*/
app.controller('NavCtrl', ['$rootScope', '$scope', '$aside', 'business', '$location', function ($rootScope, $scope, $aside, Business, $location) { /*jshint ... |
var waigo = require('waigo');
module.exports = function(config) {
waigo.load('waigo:config/base')(config);
config.port = parseInt(Math.random() * 20000 + 10000);
config.baseURL = 'http://localhost:' + config.port;
config.middleware.order = [
'errorHandler',
'urlSlashSeo'
];
};
|
'use strict'
const _ = require('lodash')
const getValue = require('get-value')
const setValue = require('set-value')
const config = require('config')
const getPlugins = require('../../src/plugins')
const getServer = require('../../src/server')
const agent = require('supertest-as-promised').agent
let exerciseCollec... |
var Sequelize = require('sequelize')
var attributes = {
username: {
type: Sequelize.STRING,
allowNull: false,
unique: true,
validate: {
is: /^[a-z0-9\_\-\.]+$/i,
}
},
email: {
type: Sequelize.STRING,
validate: {
isEmail: true
}
},
firstName: {
type: Sequelize.S... |
/**
* Created by berthelot on 05/11/14.
*/
'use strict';
describe('[images-resizer][resize-service]', function () {
var service;
var $rootScope;
beforeEach(module('images-resizer'));
beforeEach(inject(function ($injector) {
service = $injector.get('resizeService');
$rootScope = $inje... |
//
// Generated on Tue Dec 16 2014 12:13:47 GMT+0100 (CET) by Charlie Robbins, Paolo Fragomeni & the Contributors (Using Codesurgeon).
// Version 1.2.6
//
(function (exports) {
/*
* browser.js: Browser specific functionality for director.
*
* (C) 2011, Charlie Robbins, Paolo Fragomeni, & the Contributors.
* MIT... |
version https://git-lfs.github.com/spec/v1
oid sha256:5e818b98f37edeeeefc68e11b821a84d65a6a6a3500727280ee7a63d2d56cad0
size 27828
|
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.\
// manifest workflow
function validateFileUrl(){
$('#validate_files').on('click', function(){
var location_urls = $('#location_urls').val();
var form = $(this).p... |
const config = {
firebase: {
apiKey: 'AIzaSyCsXIExz25SRWDT0b_1hsdq-AjQTcPs5Fw',
authDomain: 'tardis-exp.firebaseapp.com',
databaseURL: 'https://tardis-exp.firebaseio.com',
projectId: 'tardis-exp',
storageBucket: 'tardis-exp.appspot.com',
messagingSenderId: '1015923519552'
},
};
export defau... |
var searchData=
[
['xictolerance',['XicTolerance',['../class_uimf_data_extractor_1_1_models_1_1_command_line_options.html#a2a87cfd6a2d757f6e6d5719633ec007a',1,'UimfDataExtractor::Models::CommandLineOptions']]]
];
|
/*
#!/usr/local/bin/node
-*- coding:utf-8 -*-
Copyright 2013 freedom Inc. All Rights Reserved.
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/LI... |
require('longjohn');
if ( ! process.env.RABBITMQ_URL)
throw new Error('Tests require a RABBITMQ_URL environment variable to be set, pointing to the RabbiqMQ instance you wish to use. Example url: "amqp://localhost:5672"');
var busUrl = process.env.RABBITMQ_URL;
var bus = require('../').bus({ url: busUrl, enableCon... |
import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h(h.f, null, h("path", {
d: "M5 13h2.83L10 15.17V8.83L7.83 11H5z",
opacity: ".3"
}), h("path", {
d: "M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zm4-.86v8.05c1.48-.73 2.5-2.25 2.5-4.02 0-1.77-1.0... |
var chai = require('chai');
var expect = chai.expect;
var readblet = require('../lib/index.js');
describe('toMillisec function', function(){
it('Convert readable time to millisec : 01:00:00 => 3600', function() {
var result = readblet.toMillisec('01:00:00');
var millisec = 3600;
expect(millisec).to.equal... |
import { defineMessages } from 'react-intl';
const translations = defineMessages({
title: {
id: 'course.assessment.form.title',
defaultMessage: 'Title',
},
description: {
id: 'course.assessment.form.description',
defaultMessage: 'Description',
},
startAt: {
id: 'course.assessment.form.sta... |
$(document).ready(function(){
//Gets the contestants and puts them into an array
var contestants = $(".botb-contestent").toArray();
//Prints them out in a random order
while(contestants.length > 0) {
//Getting a random index number from array length
var index = Math.floor(Math.random() * (con... |
export default [
{id: 1, title: 'Akira'},
{id: 2, title: 'Blacksad'},
{id: 3, title: 'Calvin And Hobbes'}
];
|
(function() {
'use strict';
function MDLInputSearch() {
function MDLInputSearchLink($scope, $element, $attrs) {
}
var directive = {
restrict: 'EA',
scope: {
mdlInputSearch: '@', // id
item: '=',
type: '@',
name: '@',
label: '@'
},
... |
'use strict';
// Declare app level module which depends on views, and components
angular.module('Cheersee', [
'routes',
'landingpage',
'login',
'logout',
'authentication',
'storageservice',
'currentuser',
'feeds',
'allfeeds',
'userfeeds',
'relatedfeeds',
'mm.foundation',
'timer',
'userinfo'... |
require("copy-paste");
var inspect = require("util").inspect;
var fs = require("fs");
module.exports = function(grunt) {
var task = grunt.task;
var file = grunt.file;
var log = grunt.log;
var verbose = grunt.verbose;
var fail = grunt.fail;
var option = grunt.option;
var config = grunt.config;
var tem... |
'use strict';
module.exports = {
'browserPort' : 3000,
'UIPort' : 3001,
'serverPort' : 3002,
'styles': {
'src' : 'app/styles/**/*.scss',
'dest': 'build/css',
'prodSourcemap': false,
'sassIncludePaths': []
},
'scripts': {
'src' : 'app/js/**/*.js',
'dest': 'build/js'
},
... |
/**
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'filetools', 'es', {
loadError: 'Ha ocurrido un error durante la lectura del archivo.',
networkError: 'Er... |
// Generated by CoffeeScript 1.12.6
/*
* Modular spec options parsing
*/
(function() {
'use strict';
var object;
object = require('../common/object');
module.exports = {
collect: function(params, moduleName, moduleParams, options) {
var i, len, option;
this.params = params;
this.modu... |
var app = require('express')(),
server = require('http').Server(app),
io = require('socket.io')(server),
cote = require('cote');
app.get('/', function (req, res) {
console.log(`${req.ip} requested end-user interface`);
res.sendFile(__dirname + '/index.html');
});
server.listen(5001);
new cote.So... |
module.exports = function(key, initValue, dataSources, rename){
var dataSource = dataSources.get(key);
var newName = rename ? rename : key + "Delta";
var prevVal = initValue ? initValue : null;
var hit = (prevVal !== null);
var newSource = dataSource.map(function(val){
var delta;
if(p... |
'use strict';
// Setting up route
angular.module('articles').config(['$stateProvider',
function ($stateProvider) {
// Articles state routing
$stateProvider
.state('articles', {
abstract: true,
url: '/articles',
template: '<ui-view/>'
})
.state('articles.list', {
... |
const { isFunction } = require('lodash');
exports.create = function createCoercionFor(coercion, attributeDefinition) {
return {
coerce(value) {
if (value === undefined) {
return;
}
if (value === null) {
return getNullableValue(coercion, attributeDefinition);
}
if (... |
exports.errConst = {
errCode:{
nologin:1,
},
errMsg:{
nologin:"未登录",
}
} |
$context.section('Постраничный вывод');
//= require pagination-basic |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
var $M = require("@effectful/debugger"),
$ret = $M.ret,
$retA = $M.retA,
$unhandled = $M.unhandled,
$unhandledA = $M.unhandledA,
$raise = $M.raise,
$brk = $M.brk,
$mcall = $M.mcall,
$m = $M.module("file.js", null, typeof module === "undefined" ? null : module, null, "$", {
__webpack_re... |
import gulp from "gulp";
import cp from "child_process";
import gutil from "gulp-util";
import postcss from "gulp-postcss";
import cssImport from "postcss-import";
import cssnext from "postcss-cssnext";
import BrowserSync from "browser-sync";
import webpack from "webpack";
import webpackConfig from "./webpack.conf";
c... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");
const glob = require("glob");
const webpack = require("webpack");
const config_1 = require("../config");
const karma_webpack_emitless_error_1 = require("../../plugins/karma-webpack-emitless-error");
/**
* Enumera... |
/*global describe,it,expect,$$,element,browser,by*/
describe('ShowView', function () {
'use strict';
var hasToLoad = true;
beforeEach(function() {
if (hasToLoad) {
browser.get(browser.baseUrl + '#/posts/show/1');
hasToLoad = false;
}
});
describe('ChoiceFiel... |
define(function(require) {
'use strict';
var Backbone = require('backbone'),
homeTemplate = require('text!templates/homeTpl.html');
return Backbone.View.extend({
el: 'body',
initialize: function() {
this.render();
},
render: function() {
this.$el.html(homeTemplate);
return this;
}
});
}); |
'use strict';
var config = require('../../../config/api')
, anomaly = require('../anomaly-detection');
module.exports = function() {
//services
require('./services/email-service')(config, anomaly, function(template, transport) {
var locals = config.locals;
template.render(locals, function(err, result) {... |
var restify = require('restify');
var builder = require('botbuilder');
var Firebase = require("firebase");
var myFirebaseRef = new Firebase("https://vive.firebaseio.com/Users/");
var curData = [];
var lastUsedName = "";
myFirebaseRef.on('value', function(snapshot) {
curData=snapshot.val();
});
var NodeGeoco... |
var AWS = require('aws-sdk');
AWS.config.update({region: 'us-east-1'});
const codepipeline = new AWS.CodePipeline();
const ssm = new AWS.SSM();
var iCodePipelineStack = "";
function getCodePipelineStack(callback) {
var params = {
Name: 'CodePipelineStack', /* required */
WithDecryption: false
... |
/**
* @author Tatamae
* @copyright Copyright © 2009, Tatemae.
*/
(function() {
tinymce.create('tinymce.plugins.muckFlickr', {
init : function(ed, url) {
// Register commands
ed.addCommand('muckFlickr', function() {
var e = ed.selection.getNode();
// Internal file object like a flash placeholder
... |
import { connect } from 'react-redux'
import React, { Component } from 'react'
import { Button, Card, Row, Col } from 'react-bootstrap'
import Select from 'react-select'
import CommentsBox from '../../components/CommentsBox'
import InputOption from '../../components/InputOption'
import DropdownOption from '../../compon... |
const should = require('should');
const supertest = require('supertest');
const sinon = require('sinon');
const testUtils = require('../../../utils');
const localUtils = require('./utils');
const config = require('../../../../server/config');
const mailService = require('../../../../server/services/mail');
const ghost ... |
var vue = require('vue-loader');
var webpack = require('webpack');
module.exports = {
entry: './src/main.js',
output: {
path: './static',
publicPath: '/static/',
filename: 'build.js'
},
module: {
loaders: [
{
test: /\.vue$/,
lo... |
import RedemptionTx from 'meklebar/models/redemption_tx';
var RedeemRoute = Ember.Route.extend({
model: function() {
return RedemptionTx.create();
}
});
export default RedeemRoute;
|
require("babel-register")
var gulp = require('gulp');
var gutil = require('gulp-util');
var babel = require('gulp-babel');
var coveralls = require('gulp-coveralls');
var nodemon = require('gulp-nodemon');
var jsxCoverage = require('gulp-jsx-coverage');
var ja... |
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var app = express();
// view engine setup
app.set('views', path.join(__dirname, 'views'));
require(... |
;(function () {
'use strict';
/**
* @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
*
* @codingstandard ftlabs-jsv2
* @copyright The Financial Times Limited [All Rights Reserved]
* @license MIT License (see LICENSE.txt)
*/
/*jslint browser:tru... |
describe('EvaluationTemplateResource', function () {
var $httpBackend, factory;
var SERVER_URL = 'http://dispatch.ru.is/h22/api/v1/';
var config = {
'Authorization': 'Basic t0k3n',
'Accept': 'application/json, text/plain, */*'
};
var template = {
ID: 1,
Title: 'Sniðmát',
TitleEN: 'Template',
... |
'use strict';
const path = require('path');
const Ekko = require('./server');
const yargs = require('yargs');
const { argv } = yargs;
const configPath = argv.ekkoConfig || path.join(__dirname, 'config.js');
const ekko = new Ekko(configPath);
ekko
.start()
.catch(() => true);
|
'use strict';
bg.ecard.Asset = {};
bg.ecard.Asset.Class = function(params, parent) {
this.params = params;
this.params.type = 'bg.ecard.Asset.Class';
}
bg.ecard.Asset.Class.prototype.params = {
type: 'bg.ecard.Asset.Class'
}
bg.ecard.Asset.Class.prototype.initClass = function() {
app.log(this, 'initCla... |
/**
* @private
* @param {Window} window
* @param {string} svgId
* @param {number} width
* @param {number} height
* @returns {void}
*/
function generateBase64(_window, svgId, width, height) {
const svgNode = _window.document.getElementById(svgId);
if (!svgNode) { return ''; }
const cloneNode = svgNode.clon... |
/*global Backbone */
var app = app || {};
(function () {
'use strict';
app.Todo = Backbone.Model.extend({
defaults: {
task: ''
},
toggleCompleted: function () {
this.save({
complete: !this.get('complete')
});
},
sync: ... |
import React from 'react';
import Layout from '../components/layout';
import { getAllProducts } from '../redux/actions/index'
import { store } from '../redux/store';
export default () => {
return (
<Layout title="home">
<h1 className="home-header">Order History</h1>
</Layout>
);... |
/** @namespace lsn */
ECMAScript.Extend('lsn', function (ecma) {
var CActionDispatcher = ecma.action.ActionDispatcher;
var proto = ecma.lang.createPrototype(CActionDispatcher);
/**
* @class InputListener
*/
this.InputListener = function (elem) {
CActionDispatcher.apply(this);
this.elem = ecma.d... |
version https://git-lfs.github.com/spec/v1
oid sha256:50538607856d24295645ba34e9193b6b375a7bee19707de7239458264e05fbd3
size 43336
|
const { prefix } = require('../../config.json');
module.exports = function() {
return {
name: "help",
description: "Lise de l'ensemble des commandes, ou des infos sur une commande spécifique.",
aliases: ['commands'],
usage: "[command name]",
execute(message, args) {
... |
(function () {
'use strict';
// Logs controller
angular
.module('logs')
.controller('LogsController', LogsController);
LogsController.$inject = ['$scope', '$state', 'Authentication', 'logResolve'];
function LogsController ($scope, $state, Authentication, log) {
var vm = this;
vm.authentica... |
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ... |
/**
* Copyright (c) 2008-2011 The Open Planning Project
*
* Published under the BSD license.
* See https://github.com/opengeo/gxp/raw/master/license.txt for the full text
* of the license.
*/
/** api: (define)
* module = gxp.menu
* class = LayerMenu
* base_link = `Ext.menu.Menu <http://extjs.co... |
var readlineSync = require("readline-sync")
var colors = require("colors")
var net = require("net")
var HOST = '127.0.0.1'
var PORT = 8000
var client = null
function OpenConnection(){
if (client) {
console.log("--Connection is already open--".red)
setTimeout(function () {
menu()
... |
#!/usr/bin/env node
// WebSocket vs. Socket.IO example - common backend - from:
// https://github.com/rsp/node-websocket-vs-socket.io
// Copyright (c) 2015, 2016 Rafał Pocztarski
// Released under MIT License (Expat) - see:
// https://github.com/rsp/node-websocket-vs-socket.io/blob/master/LICENSE.md
/*eslint-disable ... |
const ParserSymbol = require('./parser-symbol.js')
const PrefixOperator = module.exports = class extends ParserSymbol {
constructor (options) {
super(options)
}
defaultNullDenotation (self, parser) {
const item = this.clone()
item.first = parser.expression(this.bindingPower)
item.operatorType =... |
// usage: Ex. resWriteHead(status code, 'MIME type/internet media type');
module.exports = exports = function resWriteHead(status, contentType) {
res.writeHead(status, {
'Content-Type': contentType
});
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.