code stringlengths 2 1.05M |
|---|
// the compile functions which compile a Node into JavaScript are not
// exposed as class methods for security reasons to prevent being able to
// override them or create fake Nodes. Instead, only compile functions of
// registered nodes can be executed
var hasOwnProperty = require('../../utils/object').hasOwnProperty... |
import { autofill, change } from '../actions';
var describeBlur = function describeBlur(reducer, expect, _ref) {
var fromJS = _ref.fromJS;
return function () {
it('should set value on autofill with empty state', function () {
var state = reducer(undefined, autofill('foo', 'myField', 'myValue'));
ex... |
/**
* Expression
*
* Requires space before `()` or `{}` in function expressions (both [named](#requirespacesinnamedfunctionexpression)
* and [anonymous](#requirespacesinanonymousfunctionexpression)) and function declarations.
*
* Type: `Object`
*
* Values: `"beforeOpeningRoundBrace"` and `"beforeOpeningCurlyBra... |
var project
function Project(name, place, config, docs) {
this.name = name
this.docs = Object.create(null)
this.tabs = place.appendChild(document.createElement("ul"))
this.tabs.className = "tabs"
var self = this
CodeMirror.on(this.tabs, "click", function(e) {
var target = e.target || e.srcElement
i... |
/// Copyright (c) 2009 Microsoft Corporation
///
/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
/// that the following conditions are met:
/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
/// ... |
version https://git-lfs.github.com/spec/v1
oid sha256:c034a971839b26686a757b89747642f1b06f763965765586adffe317fa47510a
size 2851
|
RocketChat.models.Users.rocketMailUnsubscribe = function(_id, createdAt) {
const query = {
_id,
createdAt: new Date(parseInt(createdAt))
};
const update = {
$set: {
'mailer.unsubscribed': true
}
};
const affectedRows = this.update(query, update);
console.log('[Mailer:Unsubscribe]', _id, createdAt, new ... |
/**
* @license
* Visual Blocks Language
*
* Copyright 2015 Google Inc.
* https://developers.google.com/blockly/
*
* 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.apa... |
var EventEmitter = require('events').EventEmitter;
var assert = require('better-assert');
var fs = require('fs');
var StringDecoder = require('string_decoder').StringDecoder;
var url = require('url');
var request = require('../../');
describe('[node] request', function(){
describe('with an object', function(){
... |
steal("funcunit/qunit", "jquery/dom/range", "jquery/dom/selection").then(function(){
module("jquery/dom/range");
test("basic range", function(){
$("#qunit-test-area")
.html("<p id='1'>0123456789</p>");
$('#1').selection(1,5);
var range = $.Range.current();
equals(range.start().offset, 1, "start is 1")
equal... |
"use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.styles = void 0;
var _extends2 = _int... |
(function() {
var FSM, exports;
FSM = {};
FSM.Machine = (function() {
function Machine(context) {
this.context = context;
this._stateTransitions = {};
this._stateTransitionsAny = {};
this._defaultTransition = null;
this._initialState = null;
this._currentState = null;
... |
'use strict';
describe("service pages", function() {
it("should show the related provider if there is one", function() {
browser.get('build/docs/index.html#!/api/ng/service/$compile');
var providerLink = element.all(by.css('ol.api-profile-header-structure li a')).first();
expect(providerLink.getText()).... |
module.exports = require('./src/index');
|
/**
* Copyright 2015 Google 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/LICENSE-2.0
*
* Unless required by applic... |
// Copyright 2012 The Closure Library Authors. 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/LICENSE-2.0
//
// Unless requ... |
import { generateUtilityClass, generateUtilityClasses } from '@material-ui/unstyled';
export function getSwitchBaseUtilityClass(slot) {
return generateUtilityClass('PrivateSwitchBase', slot);
}
const switchBaseClasses = generateUtilityClasses('PrivateSwitchBase', ['root', 'checked', 'disabled', 'input']);
export defa... |
/*! angular-highlightjs
version: 0.7.0
build date: 2017-02-19
author: Chih-Hsuan Fan
https://github.com/pc035860/angular-highlightjs.git */
(function (root, factory) {
if (typeof exports === "object" || (typeof module === "object" && module.exports)) {
module.exports = factory(require("angular"), require("highli... |
var partial = require("ap").partial
module.exports = map
function map(list, iterator, context, callback) {
var keys = Object.keys(list)
, returnValue = Array.isArray(list) ? [] : {}
, count = keys.length
if (typeof context === "function") {
callback = context
context = this
... |
GMaps.prototype.on = function(event_name, handler) {
return GMaps.on(event_name, this, handler);
};
GMaps.prototype.off = function(event_name) {
GMaps.off(event_name, this);
};
GMaps.prototype.once = function(event_name, handler) {
return GMaps.once(event_name, this, handler);
};
GMaps.custom_events = ['marker... |
export default ngModule => {
ngModule.run(addDescriptionManipulator);
function addDescriptionManipulator(formlyConfig) {
formlyConfig.templateManipulators.preWrapper.push(function ariaDescribedBy(template, options, scope) {
if (angular.isDefined(options.templateOptions.description)) {
var el = do... |
"use strict";
/* jshint node:true */
var MyCustomLogger = (function() {
// @include ../lib/loglevel.js
return this.log;
}).apply({});
|
function histogramChart() {
var margin = {top: 0, right: 0, bottom: 20, left: 0},
width = 960,
height = 500;
var histogram = d3.layout.histogram(),
x = d3.scale.ordinal(),
y = d3.scale.linear(),
xAxis = d3.svg.axis().scale(x).orient("bottom").tickSize(6, 0);
function chart(selectio... |
(function (angular) {
"use strict";
var app = angular.module('myApp.chat', ['ngRoute', 'firebase.utils', 'firebase']);
app.controller('ChatCtrl', ['$scope', 'messageList', function($scope, messageList) {
$scope.messages = messageList;
$scope.addMessage = function(newMessage) {
if( newMessage... |
var keystone = require('../../../../index');
var Types = keystone.Field.Types;
var SourceRelationship = new keystone.List('SourceRelationship');
SourceRelationship.add({
name: {
type: String,
initial: true,
},
fieldA: {
type: Types.Relationship,
ref: 'TargetRelationship'
},
});
SourceRelationship.regis... |
/*
* override-validation.js: Example of using prompt with complex properties and command-line input.
*
* (C) 2010, Nodejitsu Inc.
*
*/
var prompt = require('../lib/prompt'),
optimist = require('optimist');
var schema = {
properties: {
name: {
pattern: /^[a-zA-Z\s-]+$/,
message: 'Name must b... |
var Popup = {
// Borders
BorderThickness: 8,
BorderImage: '/images/popup_border_background.png',
BorderTopLeftImage: '/images/popup_border_top_left.png',
BorderTopRightImage: '/images/popup_border_top_right.png',
BorderBottomLeftImage: '/images/popup_border_bottom_left.png',
BorderBottomRightImage: '/i... |
var Browser = require('../../lib/browser')
var BrowserCollection = require('../../lib/browser_collection')
var EventEmitter = require('../../lib/events').EventEmitter
var Executor = require('../../lib/executor')
describe('executor', () => {
var emitter
var capturedBrowsers
var config
var spy
var executor
... |
/**
* @fileoverview Rule to flag declared but unused variables
* @author Ilya Volodin
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
module.exports = function(cont... |
IntlMessageFormat.__addLocaleData({locale:"sq", messageformat:{pluralFunction:function (n) { n=Math.floor(n);if(n===1)return"one";return"other"; }}}); |
define("ace/snippets/rust",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="",t.scope="rust"});
(function() {
window.require(["ace/snippets/rust"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {... |
/*! JointJS v1.0.3 (2016-11-22) - JavaScript diagramming library
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
if (typeof exports === 'object') {
var graphlib = re... |
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["restful"] = factory();
else
root["restf... |
/**!
* AngularJS file upload/drop directive and service with progress and abort
* FileAPI Flash shim for old browsers not supporting FormData
* @author Danial <danial.farid@gmail.com>
* @version 3.0.4
*/
(function() {
var hasFlash = function() {
try {
var fo = new ActiveXObject('ShockwaveFlash.ShockwaveFl... |
module.exports = {
mysql: {
database: 'bookshelf_test',
user: 'root',
encoding: 'utf8'
},
postgres: {
database: 'bookshelf_test',
user: 'postgres'
},
sqlite3: {
filename: ':memory:'
}
}; |
/**
* Copyright 2013-2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule ... |
'use strict';
function createXhr(method) {
//if IE and the method is not RFC2616 compliant, or if XMLHttpRequest
//is not available, try getting an ActiveXObject. Otherwise, use XMLHttpRequest
//if it is available
if (msie <= 8 && (!method.match(/^(get|post|head|put|delete|options)$/i) ||
!window... |
/*!
* # Semantic UI 2.2.0 - Popup
* 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 self... |
/*!
* json-schema-faker library v0.3.0
* http://json-schema-faker.js.org
* @preserve
*
* Copyright (c) 2014-2016 Alvaro Cabrera & Tomasz Ducin
* Released under the MIT license
*
* Date: 2016-04-07 15:47:55.094Z
*/
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else i... |
module.exports={title:"WebdriverIO",slug:"webdriverio",svg:'<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>WebdriverIO</title><path d="M1.875 0C0.836 0 0 0.836 0 1.875v20.25C0 23.164 0.836 24 1.875 24h20.25C23.164 24 24 23.164 24 22.125V1.875C24 0.836 23.164 0 22.125 0ZM2.25 6H3V18H2.25ZM... |
'use strict';
var partial = require('../../../function/#/partial');
module.exports = {
Left: function (t, a) {
t = partial.call(t, 'x', 5);
a(t.call('yy'), 'xxxyy');
a(t.call(''), 'xxxxx', "Empty string");
a(t.call('yyyyy'), 'yyyyy', 'Equal length');
a(t.call('yyyyyyy'), 'yyyyyyy', 'Longer');
},
Right:... |
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v4.0.6
* @link http://www.ag-grid.com/
* @license MIT
*/
var events_1 = require("./events");
var ColumnChangeEvent = (function () {
function ColumnChangeEvent(type) {
this.type = type;
... |
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v1.1.0-rc4-master-c26842a
*/
(function( window, angular, undefined ){
"use strict";
/**
* @ngdoc module
* @name material.components.tabs
* @description
*
* Tabs, created with the `<md-tabs>` directive provide *tabbed* navig... |
var assert = require('assert');
var battle;
describe('Intimidate', function () {
afterEach(function () {
battle.destroy();
});
it('should decrease Atk by 1 level', function () {
battle = BattleEngine.Battle.construct();
battle.join('p1', 'Guest 1', 1, [{species: "Smeargle", ability: 'owntempo', moves: ['sket... |
/* */
"format cjs";
;(function () {
var object = typeof exports != 'undefined' ? exports : this; // #8: web workers
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
function InvalidCharacterError(message) {
this.message = message;
}
InvalidCharacterError.prototype = new ... |
var utils = require('../../lib/util/utils');
var should = require('should');
describe('utils test', function() {
describe('#invokeCallback', function() {
it('should invoke the function with the parameters', function() {
var p1 = 1, p2 = 'str';
var func = function(arg1, arg2) {
p1.should.equa... |
'use strict';
var findShip = require('../')
, path = require('path');
findShip(
path.join(__dirname, 'uno', 'dos', 'tres')
, function ismothership (pack) {
return !!(pack.dependencies && pack.dependencies.unodep);
}
, function (err, res) {
if (err) return console.error(err);
console.lo... |
var toString = require('../lang/toString');
var WHITE_SPACES = require('./WHITE_SPACES');
/**
* Remove chars from beginning of string.
*/
function ltrim(str, chars) {
str = toString(str);
chars = chars || WHITE_SPACES;
var start = 0,
len = str.length,
c... |
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["expect"] = factory();
else
root["expect... |
var Class = require('../../core/class');
// Utility command factories
var point = function(c){
return function(x, y){
return this.push(c, x, y);
};
};
var arc = function(c, cc){
return function(x, y, rx, ry, outer){
return this.push(c, Math.abs(rx || x), Math.abs(ry || rx || y), 0, outer ? 1 : 0, cc, x, y);
... |
/*
* index.js: Top-level include for the `utile` module.
*
* (C) 2011, Charlie Robbins & the Contributors
* MIT LICENSE
*
*/
var fs = require('fs'),
path = require('path'),
util = require('util');
var utile = module.exports;
//
// Extend the `utile` object with all methods from the
// core node `util` ... |
if (typeof ot === 'undefined') {
// Export for browsers
var ot = {};
}
ot.Operation = (function () {
// Constructor for new operations. Expects an revision number (non-negative
// integer) and an optional ID (string). If no ID is given, a random ID will
// be generated.
function Operation (revision, id, m... |
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
function CommonsChunkPlugin(options, filenameTemplate, selectedChunks, minChunks) {
if(options && typeof options === "object" && !Array.isArray(options)) {
this.chunkNames = options.name || options.names;
thi... |
loadIonicon('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M441.8 120.1l-49.9-49.9c-8.3-8.3-21.8-8.3-30.1 0l-66.6 66.6L254.1 96 224 126.1l30.3 30.3L64 346.7V448h101.3l190.3-190.3 30.3 30.3 30.1-30.1-41-41 66.6-66.6c8.5-8.4 8.5-21.8.2-30.2zM147.6 405.4l-41-41 171.9-171.9 41 41-171.9 171.9z"/></s... |
Prism.languages.bro = {
'comment': {
pattern: /(^|[^\\$])#.*/,
lookbehind: true,
inside: {
'italic': /\b(TODO|FIXME|XXX)\b/
}
},
'string': {
pattern: /(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
greedy: true
},
'boolean': /\b(T|F)\b/,
'function': {
pattern: /(?:function|hook|event) [a-z... |
/*! iGrowl v3.0.1
Copyright (c) 2014 Catalin Covic
https://github.com/catc
*/
;( function($) {
'use strict';
var animStart = 'webkitAnimationStart oanimationstart MSAnimationStart animationstart',
animEnd = 'webkitAnimationEnd oanimationend MSAnimationEnd animationend',
growlTemplate = '<div class="igrow... |
(function() {
var __slice = [].slice,
__hasProp = {}.hasOwnProperty;
(function(root, factory) {
if (typeof define !== "undefined" && define !== null ? define.amd : void 0) {
return define(factory);
} else if (typeof module !== "undefined" && module !== null ? module.exports : void 0) {
retu... |
/*
* DateJS Culture String File
* Country Code: fr-CA
* Name: French (Canada)
* Format: "key" : "value"
* Key is the en-US term, Value is the Key in the current language.
*/
Date.CultureStrings = Date.CultureStrings || {};
Date.CultureStrings["fr-CA"] = {
"name": "fr-CA",
"englishName": "French (... |
angular.module("ngLocale",[],["$provide",function(a){var b={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,macFrac:0,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3,maxFrac:3},{minInt:1,minFrac... |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'contextmenu', 'fa', {
options: 'گزینههای منوی زمینه'
});
|
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const ImportContextDependency = require("./ImportContextDependency");
const ContextDependencyTemplateAsRequireCall = require("./ContextDependencyTemplateAsRequireCall");
class ImportLazyOnceContext... |
/*!
* ws: a node.js websocket client
* Copyright(c) 2011 Einar Otto Stangvik <einaros@gmail.com>
* MIT Licensed
*/
var util = require('util')
, events = require('events')
, http = require('http')
, crypto = require('crypto')
, url = require('url')
, Options = require('options')
, WebSocket = require('.... |
( function( $ ){
wp.customize( 'blogname', function( value ) {
value.bind( function( to ) {
$( '#site-title a' ).text( to );
} );
} );
wp.customize( 'blogdescription', function( value ) {
value.bind( function( to ) {
$( '#site-description' ).text( to );
} );
} );
// Header text color
wp.customize( ... |
/*!
* jQuery Placeholder Plugin v2.3.1
* https://github.com/mathiasbynens/jquery-placeholder
*
* Copyright 2011, 2015 Mathias Bynens
* Released under the MIT license
*/
(function(factory) {
if (typeof define === 'function' && define.amd) {
// AMD
define(['jquery'], factory);
} else if (typ... |
/*
* Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
*
* 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 right... |
/*
* MultiSelect v0.9.12
* Copyright (c) 2012 Louis Cuny
*
* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar.... |
!function() {
var d3 = {
version: "3.5.13"
};
var d3_arraySlice = [].slice, d3_array = function(list) {
return d3_arraySlice.call(list);
};
var d3_document = this.document;
function d3_documentElement(node) {
return node && (node.ownerDocument || node.document || node).documentElement;
}
fun... |
/**
* Correlates the elements of two sequences based on overlapping durations.
*
* @param {Observable} right The right observable sequence to join elements for.
* @param {Function} leftDurationSelector A function to select the duration (expressed as an observable sequence) of each element of the le... |
/*
* Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.
*
* 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 ri... |
//! moment.js locale configuration
//! locale : Urdu [ur]
//! author : Sawood Alam : https://github.com/ibnesayeed
//! author : Zack : https://github.com/ZackVision
import moment from '../moment';
var months = [
'جنوری',
'فروری',
'مارچ',
'اپریل',
'مئی',
'جون',
'جولائی',
'اگست',
'ست... |
YUI.add("event-resize",function(e,t){e.Event.define("windowresize",{on:e.UA.gecko&&e.UA.gecko<1.91?function(t,n,r){n._handle=e.Event.attach("resize",function(e){r.fire(e)})}:function(t,n,r){var i=e.config.windowResizeDelay||100;n._handle=e.Event.attach("resize",function(t){n._timer&&n._timer.cancel(),n._timer=e.later(i... |
/*!
* Qoopido.js library v3.4.4, 2014-6-15
* https://github.com/dlueth/qoopido.js
* (c) 2014 Dirk Lueth
* Dual licensed under MIT and GPL
*//*!
* Qoopido.js library
*
* version: 3.4.4
* date: 2014-6-15
* author: Dirk Lueth <info@qoopido.com>
* website: https://github.com/dlueth/qoopido.js
*
* Copyright (c) 2014 Dir... |
var traverse = require('./');
var test = require('testling');
test('leaves', function (t) {
var obj = {
a : [1,2,3],
b : 4,
c : [5,6],
d : { e : [7,8], f : 9 }
};
var acc = [];
traverse(obj).forEach(function (x) {
if (this.isLeaf) acc.push(x);
});
... |
(function(global) {
Ember.libraries.register('Ember Simple Auth Cookie Store', '0.8.0-beta.3');
var define, requireModule;
(function() {
var registry = {}, seen = {};
define = function(name, deps, callback) {
registry[name] = { deps: deps, callback: callback };
};
requireModule = function(name) {
i... |
/**
* @license AngularJS v1.3.15
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
(function() {'use strict';
/**
* @description
*
* This object provides a utility for producing rich Error messages within
* Angular. It can be called as follows:
*
* var exampleMinErr = minErr('example');
*... |
/* Health Indicators Warehouse (HIW) JavaScript API
* v5.0.2 (beta)
*
* Docs: http://developers.healthindicators.gov
* Source: https://github.com/HealthIndicators/js-api
* License: MIT - https://github.com/HealthIndicators/js-api/raw/master/LICENSE
*/
/*****************************************************... |
/*!
* URI.js - Mutating URLs
* jQuery Plugin
*
* Version: 1.10.1
*
* Author: Rodney Rehm
* Web: http://medialize.github.com/URI.js/jquery-uri-plugin.html
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
* GPL v3 http://opensource.org/licenses/GPL-3.0
*
*/
(function (root... |
var baseAssignValue = require('./_baseAssignValue'),
createAggregator = require('./_createAggregator');
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Creates an object compos... |
(function(window,document,undefined,Pizzle){
var Selector = (function(Pizzle){
function Selector(selector){
return (typeof selector === "function" ) ? Selector.ready(selector) : Selector.init.call(this,selector);
}
Selector.ready = function(callback){
document.onread... |
var Immutable = require('./immutable');
module.exports = function (data, builder, options) {
builder.type = 'Date';
builder.defineMethod('mutate', function (cb) {
var newDate = new Date(data.valueOf());
cb.apply(newDate);
return Immutable.create(newDate, { clone: false });
});
['toString', 'toISO... |
process.env.NODE_ENV = 'test';
//Require the dev-dependencies
var chai = require('chai');
var chaiUserTwo = require('chai');
var chaiHttp = require('chai-http');
var chaiHttpTwo = require('chai-http');
var testServer = require('./server');
var should = chai.should();
var assert = require('assert');
chai.use(chaiHttp)... |
const { Page } = require("./model")
const { PagePerm } = require("./perm")
const { useMsaBoxesRouter } = Msa.require("utils")
const { db } = Msa.require("db")
const { userMdw, unauthHtml } = Msa.require("user")
class MsaPageModule extends Msa.Module {
constructor() {
super()
this.initApp()
}
getId(req, reqId)... |
IntlPolyfill.__addLocaleData({
locale: "da",
date: {
ca: ["gregory",
"buddhist",
"chinese",
... |
'use strict'
const path = require('path')
const fs = require('fs')
const ndjson = require('ndjson')
const filterStream = require('stream-filter')
const sink = require('stream-sink')
const pump = require('pump')
const file = path.join(__dirname, 'data.ndjson')
const filterById = (id) =... |
/*
451 ERR_NOTREGISTERED
":You have not registered"
- Returned by the server to indicate that the client
MUST be registered before the server will allow it
to be parsed in detail.
*/
|
/* @flow */
'use strict' // eslint-disable-line strict
import type {Amount, Memo} from '../common/types.js'
type Outcome = {
result: string,
ledgerVersion: number,
indexInLedger: number,
fee: string,
balanceChanges: {
[key: string]: [{
currency: string,
counterparty?: string,
value: strin... |
import mod932 from './mod932';
var value=mod932+1;
export default value;
|
import assert from "assert";
import {stackOffsetWiggle, stackOrderNone, stackOrderReverse} from "../../src/index.js";
it("stackOffsetWiggle(series, order) minimizes weighted wiggle", () => {
const series = [
[[0, 1], [0, 2], [0, 1]],
[[0, 3], [0, 4], [0, 2]],
[[0, 5], [0, 2], [0, 4]]
];
stackOffsetWi... |
// To parse file.cnf
function mycmdstr(instr, fpath, fspec)
{
instr = instr.replace(/%%/i, "\x00");
instr = instr.replace(/%f/i, fpath);
instr = instr.replace(/%g/i, system.temp_dir);
instr = instr.replace(/%j/i, system.data_dir);
instr = instr.replace(/%k/i, system.ctrl_dir);
instr = instr.replace(/%n/i, system... |
'use strict'
const test = require('ava')
const domain = 'example.com'
global.fetch = url => {
if (url !== `https://${domain}/.well-known/host-meta`) {
throw new Error('Fetch URL incorrect')
}
return Promise.resolve({
text() {
return `<?xml version='1.0' encoding='UTF-8'?>
<XRD xmlns... |
angular.module('jamm', [
'ui.bootstrap',
'ui.router',
'ct.ui.router.extras',
'as.sortable',
'ngResource',
'treeControl',
'n3-pie-chart',
'ngTagsInput',
'ngclipboard',
'jamm.unitFilter',
'jamm.tableHeaderSortable',
'jamm.dateTimePicker',
'jamm.photoswipe',
'jamm.c... |
function read_anki(file_number, target_id) {
// Read Anki text file
var request = new XMLHttpRequest();
request.open("GET", "res/voc/" + file_number + ".txt", false);
request.send(null);
var lines = request.responseText.split('\n');
// put into data object
var data = [];
lines.forEach(
... |
/**
* the file to set sort
*/
$(document).ready(function(){
var SITEDOMAIN ='';
// browser check
var userAgent = window.navigator.userAgent.toLowerCase();
var appVersion = window.navigator.appVersion.toLowerCase();
var _browser = 0;
if (userAgent.indexOf('msie') != -1) {
if (appVersion.indexOf... |
import request from 'supertest-as-promised';
import httpStatus from 'http-status';
import chai, { expect } from 'chai';
import app from '../../index';
chai.config.includeStack = true;
describe('## Misc', () => {
describe('# GET /api/health-check', () => {
it('should return OK', (done) => {
request(app)
... |
/********************** tine translations of Addressbook**********************/
Locale.Gettext.prototype._msgs['./LC_MESSAGES/Addressbook'] = new Locale.Gettext.PO(({
""
: "Project-Id-Version: Tine 2.0\nPOT-Creation-Date: 2008-05-17 22:12+0100\nPO-Revision-Date: 2012-09-19 08:56+0000\nLast-Translator: corneliusweiss <... |
// Original solutions by Teresa B. https://github.com/terabitbaci/
const MyData = {
fruit: "apple",
drink: "water",
dessert: "cookie"
};
console.log('use a for...in to loop through the OBJECT and console the contents');
for (let key in MyData) {
console.log(`${key}: ${MyData[key]}`);
}
console... |
module.exports = {
off: off, removeListener: off, removeEventListener: off,
on: on, addListener: on, addEventListener: on,
once: once,
stop: stop, stopListening: stop, removeAllEventListeners: stop,
dispatch: dispatch, trigger: dispatch, emit: dispatch
};
var _maps = {};
function off(id, f) {
... |
$(document).on('click', '.video-box__playbutton', function(){
$(this).hide();
var videoBox = $(this).closest('.video-box');
var videoID = videoBox.attr('data-video-id');
var videoType = videoBox.attr('data-video-type');
var videoFrame = videoBox.find('.video-box__frame');
var videoThumbnail = videoBox.find... |
const DEFAULT_OPEN_COMMAND_LIST_MAP = {
// [ process.platform ]: [ command, ...prefixArgList ]
linux: [ 'xdg-open' ],
// better than the both `start` (cmd builtin need nasty quoting) and `explorer.exe` (standalone but fail on `http://localhost?a=1#some://url?with=special&chars=:->`)
// now the problem will be... |
let express = require('express');
let router = express.Router();
let file = require('../module/file.js');
/**
* 读取目录内容
*/
router.get('/*',(req,res) => {
let promise = file.getAllDir(req.url);
promise.then((fileArr) => {
res.render('index',{
fileArr:fileArr
});
});
});
module.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.