commit stringlengths 40 40 | subject stringlengths 1 3.25k | old_file stringlengths 4 311 | new_file stringlengths 4 311 | old_contents stringlengths 0 26.3k | lang stringclasses 3
values | proba float64 0 1 | diff stringlengths 0 7.82k |
|---|---|---|---|---|---|---|---|
de05f1d0ef3422910c3e828e739a626869827f7d | Write basic class for recipe objects | workshop/www/js/recipe.js | workshop/www/js/recipe.js | JavaScript | 0 | @@ -0,0 +1,843 @@
+var Recipe = function(data)%7B%0A this.title = data.Title;%0A this.stars = data.StarRating;%0A this.imageUrl = data.ImageURL%0A%7D%0A%0Afunction BigOvenRecipeSearchJson(query) %7B%0A var allRecipes = %5B%5D;%0A var noImageLink = %22http://redirect.bigoven.com/pics/recipe-no-image.jpg%22%0A var ... | |
59c31c455c0bc67afed2b799b4ac2dacb1f03d2f | add tests | index.test.js | index.test.js | JavaScript | 0.000606 | @@ -0,0 +1,934 @@
+var props = require('./index');%0A%0Atest('should get value by key', function () %7B%0A%09var data = %7Bx: 1, y: 2%7D;%0A%09var prop = props(data);%0A%09expect(prop('x')).toBe(1);%0A%7D);%0A%0Atest('should get empty value', function () %7B%0A%09var prop = props(%7B%7D);%0A%09expect(prop('a')).toBe(fa... | |
c15a6b620243d019c38d82e8be5ab3571f153791 | Use absolute locations for plugins and presets in packager babel config | packager/babelRegisterOnly.js | packager/babelRegisterOnly.js | /**
* Copyright (c) 2015-present, 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.
*/
'use strict... | JavaScript | 0 | @@ -539,17 +539,38 @@
esets: %5B
-'
+require('babel-preset-
es2015-n
@@ -573,16 +573,17 @@
15-node'
+)
%5D,%0A p
@@ -750,16 +750,73 @@
',%0A %5D
+.map(pluginName =%3E require(%60babel-plugin-$%7BpluginName%7D%60))
,%0A on
|
4227010364df68632d6d815615fda56649674b56 | Create formValidation.js | script/formValidation.js | script/formValidation.js | JavaScript | 0 | @@ -0,0 +1,1845 @@
+(function()%7B%0A%0A%09var globalValidation = %7B%0A%0A%09%09validateName : function (elemValue)%7B%0A%09%09%09return (/%5E%5BA-Za-z0-9 %5D%7B3,20%7D$/.test(elemValue));%0A%09%09%7D,%0A%0A%09%09validateEmail : function (elemValue)%7B%0A%09%09%09return (/%5E%5B%5Cw%5C._%5D+@%5Ba-zA-Z-%5D+%5C.?%5Ba-zA... | |
785cbef750f5a7f18502530bf2b4b297f0c2cebd | Rename selectListContext file | src/react-chayns-selectlist/component/selectListContext.js | src/react-chayns-selectlist/component/selectListContext.js | JavaScript | 0 | @@ -0,0 +1,188 @@
+import %7B createContext %7D from 'react';%0A%0Aconst SelectListContext = createContext(%7B%0A selectListSelectedId: null,%0A changeListItem: () =%3E %7B%0A %7D,%0A%7D);%0A%0Aexport default SelectListContext;%0A
| |
6031df4b525b59c05a2ff5506c07db4b461d925b | Print better errors when ecmascript compilation fails. | packages/ecmascript/plugin.js | packages/ecmascript/plugin.js | function BabelCompiler() {}
var BCp = BabelCompiler.prototype;
BCp.processFilesForTarget = function (inputFiles) {
inputFiles.forEach(function (inputFile) {
var source = inputFile.getContentsAsString();
var inputFilePath = inputFile.getPathInPackage();
var outputFilePath = inputFile.getPathInPackage();
... | JavaScript | 0 | @@ -869,16 +869,30 @@
.map%22;%0A%0A
+ try %7B%0A
va
@@ -938,16 +938,289 @@
ptions);
+%0A %7D catch (e) %7B%0A if (e.loc) %7B%0A inputFile.error(%7B%0A message: e.message,%0A sourcePath: inputFilePath,%0A line: e.loc.line,%0A column: e.loc... |
43dddbde9e23f9bc80680d9610354bba3ed501ba | verify sketched | lib/verify.js | lib/verify.js | JavaScript | 0.000001 | @@ -0,0 +1,341 @@
+var spawn = require('child_process').spawn;%0Avar split = require('split');%0A%0Avar child = spawn('ogrinfo', %5B'-al', '-so', '-ro', '../test/data/t.json'%5D);%0A%0Avar fcRegex = /%5EFeature Count/;%0Avar countRegex = /%5Cd+$/;%0Achild.stdout.pipe(split()).on('data', function(line)%7B%0A if(line.ma... | |
f134751756e74f299298cdeb78e005beaa09f6a9 | Add bookmarklet JavaScript | bookmarklet.js | bookmarklet.js | JavaScript | 0 | @@ -0,0 +1,448 @@
+javascript:var cgClearTDDirection = 0; var cgClearTDIndex = 0; function cgClearTD() %7B if( cgClearTDIndex %3E 4 ) %7B if( cgClearTDDirection == 0 ) %7B $('button%5Bdata-action=%5C%22clear%5C%22%5D').click(); cgClearTDDirection = 1; cgClearTDIndex = 0; %7D else %7B cgClearTDDirection = 1; cgClearTDIn... | |
95c7b252235e360c5224177cc68969ce7a32ff9f | Create development.js | config/webpack/enviroments/development.js | config/webpack/enviroments/development.js | JavaScript | 0.000001 | @@ -0,0 +1,750 @@
+const webpack = require('webpack');%0A%0Amodule.exports = function(_path) %7B%0A return %7B%0A context: _path,%0A devtool: 'cheap-source-map',%0A devServer: %7B%0A contentBase: './dist',%0A info: true,%0A hot: true,%0A inline: true,%0A host: '0.0.0.0',%0A port:... | |
2be312ff6cff7fe6ffbe4c49a65add4459737c90 | Create lunr-feed-en.js | assets/js/lunr-feed-en.js | assets/js/lunr-feed-en.js | JavaScript | 0.000001 | @@ -0,0 +1,1795 @@
+// builds lunr%0Avar index = lunr(function () %7B%0A this.field('title')%0A this.field('content', %7Bboost: 10%7D)%0A this.field('categories')%0A this.field('tags')%0A this.ref('id')%0A%7D);%0A%0A%7B%25 assign count = 0 %25%7D%7B%25 for post in site.posts-en %25%7D%0Aindex.add(%7B%0A title: %7... | |
4301fd3bbf5edb7e8265a78ca6d1c4c594281d60 | set up testing base for server-related modules | test/Server.js | test/Server.js | JavaScript | 0 | @@ -0,0 +1,1442 @@
+import %7B Client %7D from 'irc'%0Aimport ircs from '../src/Server'%0Aimport Message from '../src/Message'%0Aimport assert from 'assert'%0A%0Aconst PORT = 30667%0A%0Adescribe('ircs', () =%3E %7B%0A%0A let server%0A let client%0A beforeEach(done =%3E %7B%0A server = ircs().listen(PORT, done)%0A... | |
5f0e9343e88150215efe19f89fcebf56c925bd11 | generate consumer messages for policy table | server/app/v1/policy/consumerMessages.js | server/app/v1/policy/consumerMessages.js | JavaScript | 0.999984 | @@ -0,0 +1,1823 @@
+let app = require('../app.js'),%0A sql = app.locals.db.sqlCommand,%0A bricks = require('sql-bricks');%0A%0Alet consumer_friendly_messages = %7B%0A %22version%22: %22000.000.001%22, //TODO: update this to actual version%0A %22messages%22: %7B%7D%0A%7D%0A%0Alet view = bricks.select('language_i... | |
dafa85dd142a6df40b3530dcbcd5f06c1ffd2d9b | add base WebGLLayer class | src/ext/WebGLLayer.js | src/ext/WebGLLayer.js | JavaScript | 0 | @@ -0,0 +1,662 @@
+export default class WebGLLayer %7B%0A constructor () %7B%0A this.webgl = weblas.gpu.gl%0A %7D%0A%0A /**%0A * Create a texture from the given texel data and bind it to our shader program.%0A *%0A * texture - packed texels data%0A * textureUnit - the texture unit to bind to (gl.TEXTURE0,... | |
dd9cf71b7ca7ddb341e7055f109e019eeac33a80 | add missing module tests for loan reducer | redef/patron-client/test/reducers/loan.js | redef/patron-client/test/reducers/loan.js | JavaScript | 0 | @@ -0,0 +1,1673 @@
+/* eslint-env mocha */%0Aimport expect from 'expect'%0Aimport loan from '../../src/frontend/reducers/loan'%0Aimport * as types from '../../src/frontend/constants/ActionTypes'%0A%0Adescribe('reducers', () =%3E %7B%0A describe('loan', () =%3E %7B%0A it('should handle initial state', () =%3E %7B%0A... | |
235cf4b8e66a6463f74650be70b553ffeaa086dd | Create jquery-1.6.min.js | game/js/jquery-1.6.min.js | game/js/jquery-1.6.min.js | JavaScript | 0.000003 | @@ -0,0 +1 @@
+%0A
| |
81e92bcd88f2a6eeb7a4fdc0152f3c4b6c562863 | Add example of classfile generation. | examples/NervousText.js | examples/NervousText.js | JavaScript | 0 | @@ -0,0 +1,1640 @@
+// The Java %22NervousText%22 example ported to JavaScript.%0A// Compile using jsc -extends java.applet.Applet -implements java.lang.Runnable NervousText.js%0A/* %0AAdapted from Java code by%0A Daniel Wyszynski %0A Center for Applied Large-Scale Computing (CALC) %0A 04-12-95 %0A%0A Test... | |
af2a455e2c2c21c477fb9d6d3580fe751cde6bfb | fix warning | src/basis/template/declaration/utils.js | src/basis/template/declaration/utils.js | var arrayAdd = basis.array.add;
var walk = require('./ast.js').walk;
var consts = require('../const.js');
var TYPE_ATTRIBUTE_EVENT = consts.TYPE_ATTRIBUTE_EVENT;
var TYPE_CONTENT = consts.TYPE_CONTENT;
var CONTENT_CHILDREN = consts.CONTENT_CHILDREN;
var CONTENT_PRIORITY = consts.CONTENT_PRIORITY;
var TOKEN_BINDINGS = c... | JavaScript | 0.000004 | @@ -199,56 +199,8 @@
NT;%0A
-var CONTENT_CHILDREN = consts.CONTENT_CHILDREN;%0A
var
|
3563e80f8a2c2673ec10d0b76ed9719cd27f2ab3 | add dual servo | dualservo.js | dualservo.js | JavaScript | 0.000001 | @@ -0,0 +1,975 @@
+var five = require(%22johnny-five%22), %0A board = new five.Board();%0Avar program = require('commander');%0Avar keypress = require('keypress');%0A%0Aprogram%0A .version('1.0.0')%0A .option('-f, --fileName %3Cprogram%3E', 'Program to load', String)%0A .parse(process.argv);%0A%0A%0Aboard.on(%22r... | |
1dd04303908833a8eda3f7811ab9205bc2891964 | Update comments in questions module | src/generators/services/questions/index.es6 | src/generators/services/questions/index.es6 | /**
* Exports array contains questions divided into sections.
* Each section should contain array with questions.
* Array with questions it's Inquirer prompts objects - https://github.com/SBoudrias/Inquirer.js#prompts-type
*
* @example
* module.exports = {
* sectionName: require('./sectionName'),
* an... | JavaScript | 0 | @@ -14,16 +14,21 @@
s array
+that
contains
@@ -42,112 +42,65 @@
ons
-divided into sections.%0A * Each section should contain array with questions.%0A * Array with questions it's
+for prompting.%0A * The array with questions is an array of
Inq
@@ -111,17 +111,16 @@
r prompt
-s
objects
@@ -198,110 +198,28 @@
... |
a1e21c5a536d5b771a1c3574081cc574f1d1c61e | Add data object for cars. | server/data/data-cars.js | server/data/data-cars.js | JavaScript | 0.000009 | @@ -0,0 +1,1918 @@
+'use strict';%0A%0Avar mongoose = require('mongoose'),%0A Car = mongoose.model('Car'),%0A BBPromise = require('bluebird');%0A%0Amodule.exports = %7B%0A getCarById: function (id) %7B%0A // TODO: Find a specific car by ObjectId%0A return new BBPromise(function (resolve, reject) ... | |
9dfa9e430a77f4985b659a3207fee3c7b9b2f6f6 | Move pathway functions to new file | app/javascript/app/components/data-explorer-content/pathway-selector-utils/pathway-selector-utils.js | app/javascript/app/components/data-explorer-content/pathway-selector-utils/pathway-selector-utils.js | JavaScript | 0 | @@ -0,0 +1,2414 @@
+import uniqBy from 'lodash/uniqBy';%0A%0Aexport function getPathwaysModelOptions(query, filtersMeta, filter) %7B%0A if (!query %7C%7C !query.locations) return filtersMeta%5Bfilter%5D;%0A const locationsSelected = filtersMeta.locations.filter(%0A location =%3E location.id === query.locations%0A ... | |
7cfe427b0e0f13ea1895e75902d3d18368e8a6fa | Add Polish locale | locales/pl.js | locales/pl.js | JavaScript | 0.000017 | @@ -0,0 +1,1635 @@
+%0Amodule.exports = function(number, index) %7B%0A var locale = %5B%0A %5B'w tej chwili', 'za chwil%C4%99'%5D,%0A %5B'%25s sekund temu', 'za %25s sekund'%5D,%0A %5B'1 minut%C4%99 temu', 'za 1 minut%C4%99'%5D,%0A %5B'%25s minut temu', 'za %25s minut'%5D,%0A %5B'1 godzina temu', 'za 1 ... | |
6cc15ac3c0b1744d5ad08f5199f62d9bf8cc46de | Add example | lib/node_modules/@stdlib/plot/examples/index.js | lib/node_modules/@stdlib/plot/examples/index.js | JavaScript | 0.000003 | @@ -0,0 +1,988 @@
+'use strict';%0A%0Avar toHTML = require( 'vdom-to-html' );%0Avar randn = require( '@stdlib/math/base/random/box-muller' );%0Avar now = require( '@stdlib/time/now' );%0Avar plot = require( './../lib' );%0A%0Avar t;%0Avar x;%0Avar y;%0Avar i;%0A%0A// Create some data...%0At = now() * 1000;%0Ax = new Fl... | |
6d566d24d788baaf48afc591bd937724047e4f5d | Use _.mixin for i18n translation function | public/javascripts/lib/i18n_configure.js | public/javascripts/lib/i18n_configure.js | (function(root,undefined) {
var _ = root._;
var langopts = root.DC_LANGUAGE_CODES ? _.clone(root.DC_LANGUAGE_CODES) : { language: 'eng', fallback: 'eng' };
langopts.namespace = 'WS';
var i18n = new root.I18n( langopts );
_.t = i18n.translate;
})(this);
| JavaScript | 0.000001 | @@ -234,11 +234,22 @@
_.
-t =
+mixin(%7B%0A t:
i18
@@ -259,16 +259,21 @@
ranslate
+%0A %7D)
;%0A%0A%7D)(th
|
d1f8bd8abc6e8fddde1cf0e6f76dc7253c4d93ce | add routes test | test/routes.js | test/routes.js | JavaScript | 0.000001 | @@ -0,0 +1,312 @@
+'use strict';%0A%0Aconst Lab = require('lab');%0Aconst Code = require('code');%0A%0Aconst lab = exports.lab = Lab.script();%0Aconst describe = lab.describe;%0Aconst it = lab.it;%0Aconst expect = Code.expect;%0A%0Adescribe('Routes', function() %7B%0A%0A it('is pending');%0A // Not a lot to test ... | |
86fa76f47c0f1dc866652bf95daa2e0c40a638fc | Add test for #2 | test/test.index.js | test/test.index.js | JavaScript | 0.000001 | @@ -0,0 +1,187 @@
+var should = require('should')%0A , livereloadx = require('../');%0A%0Adescribe('livereloadx', function() %7B%0A it('should be callable', function() %7B%0A should.exists(livereloadx());%0A %7D);%0A%7D);%0A
| |
79c2712eafba98902297a35efcf2720175214d65 | add eslint config using Airbnb's ES2015 config | .eslintrc.js | .eslintrc.js | JavaScript | 0.000001 | @@ -0,0 +1,756 @@
+// http://eslint.org/docs/user-guide/configuring#configuring-rules%0A'use strict';%0A%0Amodule.exports = %7B%0A%0A%09extends: 'airbnb/base', // Extending the AirBnB ES2015 config: https://www.npmjs.com/package/eslint-config-airbnb%0A%0A%09// Rule overrides: see http://eslint.org/docs/rules/%0A%09rule... | |
36ba7394541d2c47b528a797f6c403a93d5dabb8 | Add .eslintrc.js | .eslintrc.js | .eslintrc.js | JavaScript | 0 | @@ -0,0 +1,257 @@
+module.exports = %7B%0A %22env%22: %7B%0A %22browser%22: true,%0A %22commonjs%22: true,%0A %22es2021%22: true,%0A %22node%22: true%0A %7D,%0A %22extends%22: %22eslint:recommended%22,%0A %22parserOptions%22: %7B%0A %22ecmaVersion%22: %22latest%22%0A %7... | |
50912a18ba17e47036c97d49ba7f5313e83fad5b | Add no-control-regex rule | .eslintrc.js | .eslintrc.js | module.exports = {
'env': {
'browser': true,
'commonjs': true,
'es6': true,
'jasmine': true
},
'extends': [
'eslint:recommended',
'plugin:flowtype/recommended'
],
'globals': {
// The globals that (1) are accessed but not defined within many of ... | JavaScript | 0.000005 | @@ -904,16 +904,47 @@
dition':
+ 2,%0A 'no-control-regex':
2%0A %7D
|
15ee335f3256f364d5ca3b968f97a4d210fda929 | Add sparkline code back | public/javascripts/traffic.js | public/javascripts/traffic.js | /* This gets the data for the total people currently online and the sparkline */
(function(){
"use strict"
var root = this,
$ = root.jQuery;
if(typeof root.matrix === 'undefined'){ root.matrix = {} }
var traffic = {
$el: false,
points: 720,
endpoint: function(){
return "/realtime?ids=g... | JavaScript | 0 | @@ -409,94 +409,8 @@
a)%7B%0A
- console.log(data)%0A console.log(data.totalsForAllResults%5B'rt:activeUsers'%5D)%0A
@@ -428,16 +428,16 @@
s = %5B%5D,%0A
+
@@ -538,18 +538,16 @@
;%0A
-/*
for(i=0,
@@ -554,21 +554,16 @@
_i=data.
-data.
length;
@@ -615,31 +615,45 @@
ata.
-data%5Bi%5D... |
0e5a113f7c92dd27c549b13887be4915562923d4 | Add script for sending s3 events to slack | s3-slack.js | s3-slack.js | JavaScript | 0 | @@ -0,0 +1,1660 @@
+const aws = require('aws-sdk');%0Aconst s3 = new aws.S3(%7B apiVersion: '2006-03-01' %7D);%0A%0Aconst https = require('https');%0Aconst url = require('url');%0A%0Aconst slackUrl = 'https://hooks.slack.com/services/....'; // Your incoming webhook url%0Aconst slackRequestOptions = url.parse(slackUrl);... | |
854d6e7096ea0cad10eddaab2cd211472e81a450 | Fix argument error bug. Fixes #548. Thanks @zanedev | server/middlewares/frontendMiddleware.js | server/middlewares/frontendMiddleware.js | /* eslint-disable global-require */
const express = require('express');
const path = require('path');
const compression = require('compression');
const pkg = require(path.resolve(process.cwd(), 'package.json'));
// Dev middleware
const addDevMiddlewares = (app, webpackConfig) => {
const webpack = require('webpack');... | JavaScript | 0 | @@ -1176,19 +1176,17 @@
), (
-file, error
+err, file
) =%3E
@@ -1201,18 +1201,16 @@
if (err
-or
) %7B%0A
|
ffa570ee94cb91047ff416571144c5627623b473 | Add eslint config | .eslintrc.js | .eslintrc.js | JavaScript | 0 | @@ -0,0 +1,1165 @@
+var options = %7B%0A parserOptions: %7B%0A ecmaVersion: 6,%0A sourceType: 'module',%0A %7D,%0A env: %7B%0A browser: true,%0A node: true%0A %7D,%0A globals: %7B%0A %22Promise%22: true,%0A %22ArrayBuffer%22: true,%0A %22ArrayBufferView%22: true,%0A %22Int8Array%22: true,%0... | |
033cbea93b7529e0cb411bbd873ddb687fbb3c2c | Create microbot-push.js | bluetooth/microbot-push/microbot-push.js | bluetooth/microbot-push/microbot-push.js | JavaScript | 0.000002 | @@ -0,0 +1,1267 @@
+class MicroBotPush %7B%0A%0A constructor() %7B%0A this.device = null;%0A this.onDisconnected = this.onDisconnected.bind(this);%0A %7D%0A %0A request() %7B%0A let options = %7B%0A %22filters%22: %5B%7B namePrefix: 'mib'%7D%5D,%0A %22optionalServices%22: %5B0x1821%5D%0A %7D;%... | |
29eefc603767a4a213d08fb43ad32d3e6bec2d7f | update item route | site/app_modules/item.js | site/app_modules/item.js | var util = require('util');
var tool = require('leaptool');
module.exports = function(app) {
var moduleName = 'item';
var block = {
app: app,
model: null
};
block.data = tool.object(require('basedata')(app, moduleName));
block.page = tool.object(require('basepage')(app, moduleN... | JavaScript | 0 | @@ -1048,15 +1048,8 @@
%0A
- /*%0A
@@ -1066,12 +1066,13 @@
.get
-Home
+Index
= f
@@ -1188,15 +1188,8 @@
%7D;%0A
- */%0A
@@ -1265,24 +1265,26 @@
dItem);%0A
+//
app.server.p
@@ -1319,27 +1319,36 @@
data.addItem
+Post
);%0A
+ %0A
// page
@@ -1378,16 +1378,21 @@
t('/item
+/home
... |
a9002481a21506e5d4bf89acdd68a7961d469e81 | Move the ‘minLength’ attribute into a separate file | src/engines/json/attributes/minLength.js | src/engines/json/attributes/minLength.js | JavaScript | 0 | @@ -0,0 +1,374 @@
+/**%0A * MinLength%0A */%0AValidation.prototype.addAttributeConstructor('minLength', function minLengthConstructor() %7B%0A%0A return function minLength(property, propertyValue, attributeValue, propertyAttributes, callback) %7B%0A if (isString(propertyValue) && propertyValue.length %3E= attribute... | |
f37375aa771f35ea0b23a3a109f23c680187addd | Update config.js | lib/loaders/config.js | lib/loaders/config.js | /*!
* qwebs
* Copyright(c) 2015 Benoît Claveau
* MIT Licensed
*/
"use strict";
const fs = require("fs");
const path = require("path");
const DataError = require("./../dataerror");
class ConfigLoader {
constructor($qwebs) {
if (!$qwebs) throw new DataError({ message: "Qwebs instance is not defined." ... | JavaScript | 0.000002 | @@ -436,92 +436,8 @@
n%22;%0A
- console.log(%22typeof filepath%22, typeof filepath, filepath instanceof Object)%0A
|
8887a4494c9c38da50898b13e453f5789c8faa1b | add support for @readonly tags. | build/jsdoc-toolkit/app/plugins/readonly.js | build/jsdoc-toolkit/app/plugins/readonly.js | JavaScript | 0 | @@ -0,0 +1,226 @@
+JSDOC.PluginManager.registerPlugin(%0A%09%22JSDOC.readonly%22,%0A%09%7B%09%0A%09%09onSymbol: function(symbol) %7B%0A%09%09%09if (symbol.comment.getTag('readonly').length) %7B%0A%09%09%09%09symbol.readOnly = symbol.comment.getTag('readonly')%5B0%5D != 'false';%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A);
| |
db0578b310425bcf14d706d869f1d2ca0c75c5f0 | Add Task Circle unit test | desktop/src/Task/__tests__/Circle.spec.js | desktop/src/Task/__tests__/Circle.spec.js | JavaScript | 0 | @@ -0,0 +1,301 @@
+/* eslint-env mocha, jest */%0A%0Aimport React from 'react';%0Aimport %7B shallow %7D from 'enzyme';%0A%0Aimport Circle from '../Circle';%0A%0Ait('should render', () =%3E %7B%0A shallow(%3CCircle /%3E);%0A%7D);%0Ait('should be a %3Cp /%3E', () =%3E %7B%0A const circle = shallow(%3CCircle /%3E);%0A ... | |
05d80e9619f34c034a38b68fe112d13373edde99 | Add optional options to Loader.loadAjax | nin/dasBoot/Loader.js | nin/dasBoot/Loader.js | function Loader() {
this.eventNames = {
VIDEO: 'canplaythrough',
AUDIO: 'canplaythrough',
IMG: 'load'
};
this.itemsToAjax = [];
this.itemsToLoad = [];
this.id = Math.random();
}
Loader.rootPath = '';
Loader.setRootPath = function(path) {
Loader.rootPath = path;
};
Loader.prototype.loadAja... | JavaScript | 0 | @@ -327,32 +327,41 @@
nction(filepath,
+ options,
callback) %7B%0A t
@@ -349,32 +349,77 @@
ns, callback) %7B%0A
+ if(!options) %7B%0A callback = options;%0A %7D%0A
this.itemsToAj
@@ -448,24 +448,52 @@
: filepath,%0A
+ options: options %7C%7C %7B%7D,%0A
callback
@@ -2795,60 +2795,293 @@
-requ... |
a1177c33490be13116d909554e26de835e340cfc | add debug js script for mongo db | rutracker_ks/debug_db.js | rutracker_ks/debug_db.js | JavaScript | 0.000001 | @@ -0,0 +1,488 @@
+use rutracker_torrents_stats;%0A%0Afunction print_stat(record) %7B%0A print(record.ts);%0A for(var forum in record.forums) %7B%0A print(forum);%0A forum = record.forums%5Bforum%5D;%0A for(var peersType in forum) %7B%0A var peers = forum%5BpeersType%5D;%0A print(peersType + ':... | |
b78587ac8981f56276c2dc117228c306d188c6aa | Add BreachChart component | src/widgets/BreachChart.js | src/widgets/BreachChart.js | JavaScript | 0 | @@ -0,0 +1,2470 @@
+/* eslint-disable react/forbid-prop-types */%0A/**%0A * mSupply Mobile%0A * Sustainable Solutions (NZ) Ltd. 2020%0A */%0A%0Aimport React from 'react';%0Aimport moment from 'moment';%0Aimport PropTypes from 'prop-types';%0A%0Aimport %7B VictoryAxis, VictoryChart, VictoryLine, VictoryScatter %7D from ... | |
875547fc25281eb7fa2edb5ea2741d15929b8d9f | Create prevideoload.min.js | prevideoload.min.js | prevideoload.min.js | JavaScript | 0.000001 | @@ -0,0 +1,1350 @@
+/* PreVideoLoad: load videos when you need. (c) Matias Pizarro. MIT Lic. http://git.io/v3dYO */%0A!function(b)%7Bb.fn.PreVideoLoad=function(c)%7Bc=b.extend(%7B%7D,%7BautoPlay:!0,event:%22click%22,ytimg:%220%22,vmimg:%22large%22%7D,c);this.each(function()%7Bvar a=b(this),d=a.attr(%22data-videoid%22);... | |
9ebaeb6f4f721ba68e89b1782856bcec3c596665 | Add test case for BackTop | components/back-top/__tests__/index.test.js | components/back-top/__tests__/index.test.js | JavaScript | 0.000001 | @@ -0,0 +1,599 @@
+import React from 'react';%0Aimport %7B mount %7D from 'enzyme';%0Aimport BackTop from '..';%0A%0Aconst delay = timeout =%3E new Promise(resolve =%3E setTimeout(resolve, timeout));%0A%0Adescribe('BackTop', () =%3E %7B%0A it('should scroll to top after click it', async () =%3E %7B%0A const wrapper... | |
1573d206ad59bf7fcb31e463c0817f9b65cb3c9d | add file | background.js | background.js | JavaScript | 0.000001 | @@ -0,0 +1,904 @@
+/*%0A * LocalStore key =%3E %22gh_search_text%22%0A *%0A * FORMAT%0A * %22gh_search_text%22 : %7B%0A * %22settings%22 : %7B%0A * %22background_match%22 : %22COLOR%22%0A * %7D,%0A * %22text_search%22 : %7B%0A * %22value%22 : %22SEARCH_STRING%2... | |
84924865c665fdcc4e62364b49a2fe8780d5b544 | Add pickBy spec | packages/react-jsx-highcharts/test/utils/pickBy.spec.js | packages/react-jsx-highcharts/test/utils/pickBy.spec.js | JavaScript | 0 | @@ -0,0 +1,601 @@
+import pickBy from '../../src/utils/pickBy';%0A%0Adescribe('utils/pickBy', () =%3E %7B%0A%0A it('should return object which satisfies filter function', () =%3E %7B%0A const onInit = jest.fn();%0A const props = %7B%0A onInit,%0A noPassed: false%0A %7D%0A const pickedProps = pick... | |
6a5c2abcf5147a902e303bcfe0c973697cb5b561 | add demo errors config | example/demo/src/config/default/errors.js | example/demo/src/config/default/errors.js | JavaScript | 0.000001 | @@ -0,0 +1,263 @@
+/**%0A * XadillaX created at 2016-06-01 13:52:05 With %E2%99%A5%0A *%0A * Copyright (c) 2016 Souche.com, all rights%0A * reserved.%0A */%0A%22use strict%22;%0A%0Amodule.exports = %7B%0A Example: %7B%0A code: 100,%0A status: 200,%0A business: %22this is an example error.%22%0A ... | |
ac99374109859a630b1e437fec891fb175fb0771 | Disable item_detail. | share/spice/google_plus/google_plus.js | share/spice/google_plus/google_plus.js | function ddg_spice_google_plus (api_result) {
"use strict";
if(!api_result || !api_result.items || api_result.items.length === 0) {
return Spice.failed("googleplus");
}
Spice.add({
id: 'googleplus',
name: 'Google Plus',
data: api_result.items,
meta: {
... | JavaScript | 0 | @@ -542,16 +542,41 @@
imple',%0A
+%09 item_detail: false,%0A
@@ -642,60 +642,10 @@
tem)
+
%7B
-%0A // change image size and https -%3E http
%0A
@@ -727,16 +727,17 @@
return
+
%7B%0A
@@ -860,10 +860,11 @@
%7D);%0A
-
%7D;
+%0A
|
908fd41b521018361de890057611e56c0e475e1c | add dynamic require to optionally use local readmes | showroom/components/useLocalReadmes.js | showroom/components/useLocalReadmes.js | JavaScript | 0 | @@ -0,0 +1,550 @@
+import %7B sortBy %7D from 'lodash';%0A%0Afunction dynamicRequire(readmeUrl) %7B%0A const %5B path %5D = readmeUrl.match(/src%5C/.+%5C/README/) %7C%7C %5B%5D;%0A return path ? require(%60raw!../../src/$%7Bpath.replace('src/', '')%7D.md%60) : null;%0A%7D%0A%0Aexport default json =%3E %7B%0A return ... | |
42122a7eff9adb50c6d5940070e966111ee2b499 | Define some tests | test/QuestionSet.js | test/QuestionSet.js | JavaScript | 0.945185 | @@ -0,0 +1,538 @@
+var assert = require('assert');%0A%0Adescribe('Question set', function () %7B%0A let QuestionSet = require('../src/QuestionSet');%0A let questions;%0A%0A beforeEach(function () %7B%0A questions = new QuestionSet();%0A %7D);%0A afterEach(function (done) %7B%0A delete questions;%0A %7D);%0A... | |
2be76d9cbc64ede25a61fbdf7db5e44de0abca77 | add tests for cancel feature | test/cancel/test.js | test/cancel/test.js | JavaScript | 0 | @@ -0,0 +1,1567 @@
+/**%0A * Created by Ma_Zi_jun on 2016/12/3.%0A */%0A%0A/* Test summary for this function:%0A 1. With invalid username, the response show failure%0A 2. With valid username for the first time, the response show success%0A 3. With valid username for the second time, the response show failure%0A */%0A%0... | |
ad9b01351cc6aa0856ef98b3b9a96d73bb5af331 | Add numericliteralnode module | src/ast_constructors/numericliteralnode.js | src/ast_constructors/numericliteralnode.js | JavaScript | 0.000001 | @@ -0,0 +1,145 @@
+function NumericLiteralNode(rawNumber) %7B%0A this.type = 'NumericLiteralNode';%0A this.number = +rawNumber;%0A%7D%0A%0Amodule.exports = NumericLiteralNode;%0A
| |
7dd1dc4473afe806e1b474db80fb40b54c2dec99 | Solve 272 Closest Binary Search Tree Value II | 272-Closest_Binary_Search_Tree_Value_II.js | 272-Closest_Binary_Search_Tree_Value_II.js | JavaScript | 0.999999 | @@ -0,0 +1,1681 @@
+'use strict';%0A/**%0A * Definition for a binary tree node.%0A * function TreeNode(val) %7B%0A * this.val = val;%0A * this.left = this.right = null;%0A * %7D%0A */%0A/**%0A * @param %7BTreeNode%7D root%0A * @param %7Bnumber%7D target%0A * @param %7Bnumber%7D k%0A * @return %7Bnumber%5B%5D%7D... | |
5fbb616b5166f27332c8268908cc84539b8408a5 | add PIN and merchant PIN to config.js | test/live/config.js | test/live/config.js | // Fill me with your Sandbox API credentials...
module.exports = {
accessToken: "",
fundingSource: "",
merchantAccessToken: "",
appKey: "",
appSecret: "",
sandbox: true
}; | JavaScript | 0.000001 | @@ -83,16 +83,27 @@
n: %22%22,%0D%0A
+%09pin: %22%22,%0D%0A
%09funding
@@ -138,24 +138,43 @@
Token: %22%22,%0D%0A
+%09merchantPIN: %22%22,%0D%0A
%09appKey: %22%22,
|
25057004a00aa4bc8ea3d5f6161a53c71ed6028f | add mock l10n en file to prevent browser error on missing resources | nuxeo-platform-ui-select2/src/main/resources/web/nuxeo.war/scripts/select2/select2_locale_en.js | nuxeo-platform-ui-select2/src/main/resources/web/nuxeo.war/scripts/select2/select2_locale_en.js | JavaScript | 0 | @@ -0,0 +1,55 @@
+/* Mock locale resources for select2. Do not delete. */
| |
2db9a63c54df63e95c1fbf39391d201c98a62b86 | Update post preview template | src/js/cms-preview-templates/post.js | src/js/cms-preview-templates/post.js | import React from "react";
import format from "date-fns/format";
export default class PostPreview extends React.Component {
render() {
const {entry, widgetFor} = this.props;
return <div className="mw6 center ph3 pv4">
<h1 className="f2 lh-title b mb3">{ entry.getIn(["data", "title"])}</h1>
<div ... | JavaScript | 0 | @@ -158,16 +158,26 @@
idgetFor
+, getAsset
%7D = this
@@ -183,16 +183,74 @@
s.props;
+%0A let image = getAsset(entry.getIn(%5B%22data%22, %22image%22%5D));
%0A%0A re
@@ -667,16 +667,153 @@
s mw6%22%3E%0A
+ %3Cp%3E%7B entry.getIn(%5B%22data%22, %22description%22%5D) %7D%3C/p%3E%0A %7B image && %... |
e57be479c0c493a8a793c202953e1e18cf943dd7 | Add test for Player model | test/player.spec.js | test/player.spec.js | JavaScript | 0 | @@ -0,0 +1,444 @@
+'use strict';%0A%0Avar expect = require('chai').expect;%0Avar Player = require('../app/scripts/player');%0A%0Adescribe('player', function () %7B%0A%0A it('should initialize player', function () %7B%0A var player = new Player(%7B%0A name: 'Super Player',%0A color: 'green'%0A %7D);%0A ... | |
0f1a6676b4cbea177e6c40241a5866a42ce1e1d9 | Add boilerplate function to handle the request | src/Reporter.js | src/Reporter.js | JavaScript | 0.000001 | @@ -0,0 +1,193 @@
+const Report = require('./report');%0Aconst Hipchat = require('./Hipchat');%0A%0Afunction Reporter( request, reply ) %7B%0A console.log(request.query);%0A return reply(%7B%7D);%0A%7D%0A%0Amodule.exports = Reporter;%0A
| |
962b4ac07b38742816cd0fee804dda97e6f18ade | Add worker_manager for clustering (#239) | server/worker_manager.js | server/worker_manager.js | JavaScript | 0 | @@ -0,0 +1,820 @@
+// Copyright (c) 2017 The Absolute Authors. All rights reserved.%0A// Use of this source code is governed by a BSD-style license that can be%0A// found in the LICENSE file.%0A%0Aimport cluster from 'cluster';%0Aimport os from 'os';%0A%0A// Policy of dispatching task to another worker available%0A// c... | |
c685d836b892d1179a182e531b238f94f81e2beb | add gulp task loader | gulp/index.js | gulp/index.js | JavaScript | 0.000002 | @@ -0,0 +1,195 @@
+'use strict';%0Avar gulp = require('gulp');%0A%0Amodule.exports = function(tasks) %7B%0A tasks.forEach(function(name) %7B%0A gulp.task(name, require('./tasks/' + name));%0A %7D);%0A%0A return gulp;%0A%7D;%0A
| |
816e725f6ccd9b44c369324647484e8473b091a1 | add compatible entry for browser | src/browser.js | src/browser.js | JavaScript | 0 | @@ -0,0 +1,251 @@
+'use strict'%0A%0Aconst pinyin = require('./index')%0Aconst patcher = require('./patchers/safari')%0A%0A// Patch dict for safari.%0Aif (typeof navigator === 'object' && /safari/i.test(navigator.userAgent)) %7B%0A pinyin.patchDict(patcher)%0A%7D%0A%0Amodule.exports = pinyin%0A
| |
d2d975b1624987fc81b59b3da80a0e59e727ab04 | add centroid file | src/centroid.js | src/centroid.js | JavaScript | 0.000001 | @@ -0,0 +1,329 @@
+export function centroid(polygon)%7B%0A%0A var _x = 0, _y = 0, _z = 0;%0A var _n = polygon.length;%0A%0A for (var i = _n - 1; i %3E= 0; i--) %7B%0A _x += polygon%5Bi%5D.rotated.x;%0A _y += polygon%5Bi%5D.rotated.y;%0A _z += polygon%5Bi%5D.rotated.z;%0A %7D%0A%0A re... | |
ae41b83a78235fdb15f64e0d8492d61230119386 | Remove extra provide causing a circular dependency | src/ol/image.js | src/ol/image.js | goog.provide('ol.Image');
goog.require('ol');
goog.require('ol.Image');
goog.require('ol.ImageBase');
goog.require('ol.events');
goog.require('ol.events.EventType');
goog.require('ol.extent');
goog.require('ol.obj');
/**
* @constructor
* @extends {ol.ImageBase}
* @param {ol.Extent} extent Extent.
* @param {numbe... | JavaScript | 0.000001 | @@ -44,34 +44,8 @@
');%0A
-goog.require('ol.Image');%0A
goog
|
f829b4ab8c3f756f144bb3ba546591a2ed3e532b | create electron files | Core/Elementary-Electron/node_modules/lodash/collection/map.js | Core/Elementary-Electron/node_modules/lodash/collection/map.js | JavaScript | 0.000001 | @@ -0,0 +1,2371 @@
+var arrayMap = require('../internal/arrayMap'),%0A baseCallback = require('../internal/baseCallback'),%0A baseMap = require('../internal/baseMap'),%0A isArray = require('../lang/isArray');%0A%0A/**%0A * Creates an array of values by running each element in %60collection%60 through%0A * %60i... | |
b69e2d77b1f20283cc19f84ef79a2125f221bfd1 | Refactor Endless Plains to use opponent targeting | server/game/cards/01-Core/EndlessPlains.js | server/game/cards/01-Core/EndlessPlains.js | const ProvinceCard = require('../../provincecard.js');
class EndlessPlains extends ProvinceCard {
setupCardAbilities(ability) {
this.reaction({
when: {
onConflictDeclared: event => event.conflict.conflictProvince === this && event.conflict.attackers.length > 0
},
... | JavaScript | 0 | @@ -371,22 +371,15 @@
-handler: () =%3E
+target:
%7B%0A
@@ -397,164 +397,28 @@
-let otherPlayer = this.game.getOtherPlayer(this.controller);%0A this.game.promptForSelect(otherPlayer, %7B%0A source: this,%0A
+player: 'opponent',%0A
@@ -493,28 +493,24 @@
... |
dbe084eacd90dffbae0c2b42eaad086ef2c5d5b7 | Create PlayerSongList.js. | src/nmr/components/PlayerSongList.js | src/nmr/components/PlayerSongList.js | JavaScript | 0 | @@ -0,0 +1,2064 @@
+import React, %7B Component, PropTypes %7D from 'react';%0Aimport classNames from 'classnames';%0A%0Aimport ServiceClient from %22../service/ServiceClient%22;%0A%0Aexport default class PlayerSongList extends Component %7B%0A static propTypes = %7B%0A className: PropTypes.string,%0A ... | |
88eb42b2cfa61a8c6214d0a855dfe4da36be8959 | Add grpc module pointer file for Node health check tests | src/node/health_check/node_modules/grpc.js | src/node/health_check/node_modules/grpc.js | JavaScript | 0 | @@ -0,0 +1,1718 @@
+/*%0A *%0A * Copyright 2016, Google Inc.%0A * All rights reserved.%0A *%0A * Redistribution and use in source and binary forms, with or without%0A * modification, are permitted provided that the following conditions are%0A * met:%0A *%0A * * Redistributions of source code must retain the above c... | |
1a99ae35a649ae0b5e2c24c4bf35ceb3c47e5125 | Create css-prefixer.js | css-prefixer.js | css-prefixer.js | JavaScript | 0.000006 | @@ -0,0 +1,625 @@
+/* Prefixes a given CSS string.%0A *%0A * @param %7BString%7D cssString - the CSS which has rules to be prefixed%0A * @param %7BString%7D prefixName - the string to be used in prefixing%0A * @param %7BString%7D delimiter - the delimiter to be used%0A * @returns %7BString%7D original cssString prefixe... | |
da83759a72d2312e2efcc74711db30f39f1cc75b | add group support | genoverse/htdocs/genoverse/Ensembl/Menu.js | genoverse/htdocs/genoverse/Ensembl/Menu.js | // $Revision$
Ensembl.Panel.GenoverseMenu = Ensembl.Panel.ZMenu.extend({
constructor: function (id, data) {
this.id = id;
this.params = data;
this.initialised = false;
this.href = data.feature.menu;
this.title = data.feature.title;
this.event = data.event;
... | JavaScript | 0 | @@ -417,16 +417,51 @@
coords;%0A
+ this.group = data.group;%0A
%0A
|
015a51d9f9917b0dde00b639dc61c4c81ba2a573 | reset look-at to original | src/components/look-at.js | src/components/look-at.js | JavaScript | 0 | @@ -0,0 +1,3037 @@
+var debug = require('../utils/debug');%0Avar coordinates = require('../utils/coordinates');%0Avar registerComponent = require('../core/component').registerComponent;%0Avar THREE = require('../lib/three');%0A%0Avar warn = debug('components:look-at:warn');%0Avar isCoordinate = coordinates.isCoordinate... | |
da44da64bb623f1e1b4b532ada6ec9e266dd86db | Test bundled `cosmiconfig` (#8262) | tests_integration/__tests__/third-party.js | tests_integration/__tests__/third-party.js | JavaScript | 0 | @@ -0,0 +1,1456 @@
+%22use strict%22;%0A%0Aconst path = require(%22path%22);%0Aconst %7B thirdParty %7D = require(%22../env%22);%0Aconst %7B cosmiconfig, cosmiconfigSync %7D = require(thirdParty);%0A%0A// This don't has to be the same result as %60prettier.resolveConfig%60,%0A// Because we are testing with default %60c... | |
1c79b6ad967c5038e7775fb02322258b3149d015 | Put the highlight first | texcavator/static/js/uva/sanitize_query.js | texcavator/static/js/uva/sanitize_query.js | $(document).ready(function () {
var grammar = $('#peg-query-grammar').text();
window.queryParser = PEG.buildParser(grammar);
});
var defaultExplanation = 'A problem was found in your query. '
+ 'Please read the description below, '
+ 'then review your query and try... | JavaScript | 0.000003 | @@ -470,33 +470,16 @@
Bits = %5B
-%0A
defaultE
@@ -493,108 +493,8 @@
ion,
-%0A '%3Cbr%3E%3Cbr%3E',%0A escapeHTML(error.message), // entities%0A
'%3Cb
@@ -505,29 +505,16 @@
r%3E%3Ckbd%3E'
-%0A
%5D,%0A
@@ -1144,17 +1144,78 @@
('%3C/kbd... |
4740ad120caec4f2b6f3bbebc8fc5e03c7bf3dda | Add small JSM helper to allow us to run e10s code once per content process even though content scripts run once per tab. | src/modules/content/OncePerProcess.jsm | src/modules/content/OncePerProcess.jsm | JavaScript | 0 | @@ -0,0 +1,687 @@
+/**%0D%0A * @license MPL 1.1/GPL 2.0/LGPL 2.1, see license.txt%0D%0A * @author William Elwood %3Cwe9@kent.ac.uk%3E%0D%0A * @copyright 2011 JSONovich Team. All Rights Reserved.%0D%0A * @description Utility to return boolean flags allowing operations in frame scripts to be run only once per process rat... | |
b95343ae25efab848046f29aab78aa5fcc145034 | add escaper plugin | src/plugins/escaper.js | src/plugins/escaper.js | JavaScript | 0 | @@ -0,0 +1,511 @@
+import entities from 'html-entities';%0Aconst ent = new entities.AllHtmlEntities();%0A%0Aexport function escaper(schema) %7B%0A const keys = %5B%5D;%0A%0A schema.eachPath((path, type) =%3E %7B%0A if (type.options && type.options.escape) %7B%0A keys.push(path);%0A %7D%0A %7D);%0A%0A sch... | |
44b8f97d39ba86dc13680544fe752322e8b12143 | Fix syntax highlighting in the styleguide | ui/app/routes/freestyle.js | ui/app/routes/freestyle.js | JavaScript | 0.000025 | @@ -0,0 +1,467 @@
+import Route from '@ember/routing/route';%0Aimport %7B inject as service %7D from '@ember/service';%0Aimport RSVP from 'rsvp';%0A%0Aexport default Route.extend(%7B%0A emberFreestyle: service(),%0A%0A beforeModel() %7B%0A let emberFreestyle = this.get('emberFreestyle');%0A%0A return emberFrees... | |
22c5f1ed49fd8e7a69d2e8c890a6edd8045af348 | Create scroll_block.jquery.min.js | scroll_block.jquery.min.js | scroll_block.jquery.min.js | JavaScript | 0.000004 | @@ -0,0 +1,1527 @@
+/* %0A%09Mikhail Sergeevich%0A%0918.01.2016%0A%09version 0.1%0A */%0A!function(t)%7Bt.fn.scroll_block=function()%7Bif(1==this.data(%22scroll_block%22)%7C%7Cvoid 0==this.html())return this;this.data(%22scroll_block%22,!0);var o,i,s,e,l,p,c=t(window),f=this,n=f.wrapInner('%3Cdiv id=%22scroll_block_jqu... | |
aef0e4d16ec31cdfa503d2d4e5e5637e6fd709e0 | Create resource handler script for CNTL | mac/resources/open_CNTL.js | mac/resources/open_CNTL.js | JavaScript | 0 | @@ -0,0 +1,787 @@
+define(%5B'mac/roman'%5D, function(macintoshRoman) %7B%0A%0A 'use strict';%0A %0A return function(resource) %7B%0A var dv = new DataView(resource.data.buffer, resource.data.byteOffset, resource.data.byteLength);%0A resource.dataObject = %7B%0A rectangle: %7B%0A top: dv.getInt16(0... | |
b109bfa0d9a665c6e179569844de320e53421285 | Make capitalization consistent | ui/src/data_explorer/actions/view/index.js | ui/src/data_explorer/actions/view/index.js | import uuid from 'node-uuid'
import {getQueryConfig} from 'shared/apis'
import {writeData} from 'src/data_explorer/apis'
import {errorThrown} from 'shared/actions/errors'
import {publishAutoDismissingNotification} from 'shared/dispatchers'
export function addQuery(options = {}) {
return {
type: 'ADD_QUERY',
... | JavaScript | 0.999999 | @@ -3062,17 +3062,17 @@
%60Write
-F
+f
ailed: $
|
1057676b9bd1201e768f030830f3f505558ce0de | add new rule file | rule_sample/rule_reverse_proxy.js | rule_sample/rule_reverse_proxy.js | JavaScript | 0.000001 | @@ -0,0 +1,620 @@
+/*%0Aread the following wiki before using rule file%0Ahttps://github.com/alibaba/anyproxy/wiki/What-is-rule-file-and-how-to-write-one%0A*/%0Amodule.exports = %7B%0A%0A summary:function()%7B%0A return %22reverse proxy - assign an IP adress for some request%22;%0A %7D,%0A%0A replaceRequ... | |
12b48796cfc0551bada98c5dfcd4c9c274e0e536 | Create jquery.textareaCount.js | js/jquery.textareaCount.js | js/jquery.textareaCount.js | JavaScript | 0.000002 | @@ -0,0 +1,795 @@
+/*!%0A http://www.amged.me/%0A jQuery #textareaCount v0.1%0A%09The MIT License (MIT)%0A Copyright (c) 2014 Amged Osman%0A*/%0A(function($) %7B%0A%09$.fn.textareaCount = function(options) %7B%0A%09%09var settings = $.extend(%0A%09%09%7B%0A t : 140,%0A l : 0%0A%0A %7D... | |
5c6fe35e914945a41c27151c5b0de19f8671f657 | Create resource handler script for MENU | mac/resources/open_MENU.js | mac/resources/open_MENU.js | JavaScript | 0.000001 | @@ -0,0 +1,1308 @@
+define(%5B'mac/roman'%5D, function(macintoshRoman) %7B%0A%0A 'use strict';%0A %0A return function(resource) %7B%0A var dv = new DataView(resource.data.buffer, resource.data.byteOffset, resource.data.byteLength);%0A resource.dataObject = %7B%0A id: dv.getUint16(0, false),%0A defini... | |
0f0358c8213b606a5e29a5f9b22f277196269f0c | Support PAT# and 'PAT ' resources | mac/resources/open_PAT_.js | mac/resources/open_PAT_.js | JavaScript | 0 | @@ -0,0 +1,831 @@
+define(%5B'itemObjectModel'%5D, function(itemOM) %7B%0A%0A 'use strict';%0A %0A function open(item, resourceName) %7B%0A return item.getBytes().then(function(bytes) %7B%0A if (resourceName === 'PAT#') %7B%0A var count = bytes%5B0%5D * 0x100 + bytes%5B1%5D;%0A for (var i = 0; ... | |
37854cb25896e75141c6196a479f76fbda52f9a9 | add index.js | index.js | index.js | JavaScript | 0.000005 | @@ -0,0 +1,34 @@
+module.exports = require('./lib')%0A
| |
3d6a1b843d2fd6b2bf6c247cacff0eddff0a1aa7 | Create index.js | index.js | index.js | JavaScript | 0.000002 | @@ -0,0 +1,28 @@
+var hapi = require('hapi');%0A
| |
1aba722e63bbbfc4e2c8cdba82918db703a74b00 | Add Zephyr logic. | static/js/user_pill.js | static/js/user_pill.js | var user_pill = (function () {
var exports = {};
// This will be used for pills for things like composing PMs
// or adding users to a stream/group.
exports.create_item_from_email = function (email, current_items) {
// For normal Zulip use, we need to validate the email for our realm.
var user = people.get_by... | JavaScript | 0 | @@ -342,24 +342,571 @@
f (!user) %7B%0A
+ if (page_params.realm_is_zephyr_mirror_realm) %7B%0A var existing_emails = _.pluck(current_items, 'email');%0A%0A if (existing_emails.indexOf(email) %3E= 0) %7B%0A return;%0A %7D%0A%0A // For Zephyr we can't ass... |
393a3d1ac489430ef203870b83e01a20bad5d4c9 | remove uneeded app finding | index.js | index.js | /* jshint node: true */
'use strict';
var fs = require('fs');
var path = require('path');
var resolve = require('resolve');
var autoprefixer = require('broccoli-autoprefixer');
var mergeTrees = require('broccoli-merge-trees');
var Funnel = require('broccoli-funnel');
var AngularScssFilter = require('./lib/angular-scss... | JavaScript | 0 | @@ -952,143 +952,8 @@
) %7B%0A
- // Fix for loading it in addons/engines%0A if (typeof app.import !== 'function' && app.app) %7B%0A app = app.app;%0A %7D%0A%0A
|
141b5576cadf53ddc55f7e1f7d5438fc804eee81 | add StatsData Model. | server/models/StatsData.js | server/models/StatsData.js | JavaScript | 0 | @@ -0,0 +1,489 @@
+%0Amodule.exports = function(sequelize, DataTypes) %7B%0A var StatsData = sequelize.define('StatsData', %7B%0A StatID : %7B type : DataTypes.STRING, primaryKey: true, autoIncrement: false%7D%0A%0A , CategoryName : %7B type : DataTypes.STRING%7D%0A , CountNum : %7B type : DataTypes.INTEGER%7... | |
3467ee3f7b3212060b055b5fad5fe1921f8fe780 | Update of the history page with the addition of canvas difference | website/public/javascripts/canvasCompare.js | website/public/javascripts/canvasCompare.js | JavaScript | 0 | @@ -0,0 +1,43 @@
+/**%0A * Created by plaperdr on 6/15/15.%0A */%0A
| |
fdf89db86391949a0d0468c58944c4c503fbe1ac | Add index.js | index.js | index.js | JavaScript | 0 | @@ -0,0 +1,93 @@
+require('./dist/angular-bootstrap-lightbox');%0Amodule.exports = 'angular-bootstrap-lightbox';%0A
| |
d7bca298b48755238eef5d7779cba7b38fcb7fb8 | add tests for array serialization | spec/postgres/dao.spec.js | spec/postgres/dao.spec.js | JavaScript | 0.000001 | @@ -0,0 +1,1217 @@
+if(typeof require === 'function') %7B%0A const buster = require(%22buster%22)%0A , Helpers = require('../buster-helpers')%0A , dialect = Helpers.getTestDialect()%0A%7D%0A%0Abuster.spec.expose()%0A%0Aif (dialect.match(/%5Epostgres/)) %7B%0A describe('%5BPOSTGRES%5D DAO', function() %7B%0... | |
24d54b43f3f00f14966667485501315a622f639e | remove noDefaultStyles prop | index.js | index.js | var React = require('react');
var Dropzone = React.createClass({
getDefaultProps: function() {
return {
supportClick: true,
multiple: true
};
},
getInitialState: function() {
return {
isDragActive: false
};
},
propTypes: {
onDrop: React.PropTypes.func.isRequired,
o... | JavaScript | 0.000001 | @@ -529,51 +529,8 @@
ct,%0A
- noDefaultStyles: React.PropTypes.bool,%0A
@@ -1996,69 +1996,8 @@
%7D%0A%0A
- var style = %7B%7D;%0A if (!this.props.noDefaultStyles) %7B%0A
@@ -2036,18 +2036,16 @@
%7B%0A
-
-
width: t
@@ -2083,26 +2083,24 @@
ize %7C%7C 100,%0A
-
height
@@ -2152... |
f8ae151d836a63e3af4a96401225981cd7a4ae68 | Initialize express and its routes | index.js | index.js | JavaScript | 0.000046 | @@ -0,0 +1,254 @@
+'use strict'%0A%0Avar express = require('express');%0A%0Avar app = express();%0A%0Aapp.get('/', function(req, res) %7B%0A res.send('%3Ca href=%22/authenticate%22%3ELog in!%3C/a%3E');%0A%7D);%0A%0Aapp.get('/authenticate');%0A%0Aapp.get('/display', function(req, res) %7B%0A%0A%7D);%0A%0A%0Aapp.listen(... | |
f54b6a44118fe21412206b9f5ab4a192926e05ad | Create index.js | index.js | index.js | JavaScript | 0.000002 | @@ -0,0 +1,1930 @@
+module.exports = (function () %7B%0A%0A var util = require('util');%0A var extend = require('extend');%0A var EventTarget = require('./lib/event-target');%0A var webSocketServer = require('./lib/websocket-server');%0A%0A%0A function randomAsync (fn, context) %7B%0A window.setTi... | |
a920b1120cbbe88a485d08fe169836047ddf516c | add index.js | index.js | index.js | JavaScript | 0.000005 | @@ -0,0 +1,124 @@
+'use strict';%0A%0Arequire(%22coffee-script%22);%0A%0Aexports.Client = require('./lib/client');%0Aexports.Server = require('./lib/core');%0A
| |
bd8b859a9b36b0606ac90e98f3c3f2ac2fb741de | add index.js | index.js | index.js | JavaScript | 0.000005 | @@ -0,0 +1,650 @@
+/**%0A * Created by numminorihsf on 15.02.16.%0A */%0Afunction getFormatters (options)%7B%0A options = options %7C%7C %7B%7D;%0A options.dataSource = options.dataSource %7C%7C 'res.locals';%0A var human = 'human' in options ? !!options.human : (process.env.NODE_ENV !== 'production');%0A options.f... | |
55121cf1e764c22ef3ad3d27cf5ed9d504e8e072 | Create an persistant acces for `melodrama`. | index.js | index.js | JavaScript | 0 | @@ -0,0 +1,144 @@
+/**%0A * Make an easy acces point for %60melodrama%60 that (hopefully) persists.%0A */%0Aconst %7B run %7D = require('./lib/bootstrap');%0Amodule.exports = run;
| |
b130af9544cadd053484f089e97c10529421dac0 | add (index.js) Hapi server port 4567 | index.js | index.js | JavaScript | 0 | @@ -0,0 +1,379 @@
+'use strict';%0A%0Aconst Hapi = require('hapi');%0A%0Aconst server = new Hapi.Server();%0A%0Aserver.connection(%7B port: 4567 %7D);%0A%0Aserver.route(%7B%0A method:'POST',%0A path: '/payload',%0A handler: function (request, reply) %7B%0A console.log('PAYLOAD: body -%3E ', request.payl... | |
1fe5535390a684e1ef677cf2bb735b07169778b1 | Create index.js | src/hello-world/index.js | src/hello-world/index.js | JavaScript | 0.000002 | @@ -0,0 +1,96 @@
+import HelloWorld from './hello-world';%0A%0Aexport %7BHelloWorld%7D;%0A%0Aexport default %7B%0A HelloWorld%0A%7D;%0A
| |
0b2f5ff1ec3dbc00705d0843af3ecd61d637a56b | index for deno | index.js | index.js | JavaScript | 0.000001 | @@ -0,0 +1,53 @@
+import Enum from './lib/enum.js'%0Aexport default Enum%0A
| |
191595dbcc493c0d4a2dd5514a76ab08a5799c8f | Add minify script. | scripts/minifier.js | scripts/minifier.js | JavaScript | 0 | @@ -0,0 +1,345 @@
+// Produces the minified version.%0A%0Avar packer = require( 'node.packer' ),%0A path = __dirname + '/../',%0A src = path,%0A out = path;%0A%0Avar input = %5B%0A src + 'andro.js',%0A%5D;%0A%0Apacker(%7B%0A log: true,%0A input: input,%0A minify: true,%0A output: out + 'andro-min.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.