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 |
|---|---|---|---|---|---|---|---|
5c7f4c8d7f9b591f6b839e1d5075ae2596074428 | Fix fingerprinting issue with ui.js | ember-cli-build.js | ember-cli-build.js | /* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var util = require('util');
var env = EmberApp.env();
console.log("Environment:",env);
module.exports = function(defaults) {
// Pull in a few useful environment settings for index.html to use
var appConfig = require('./config/... | JavaScript | 0.000001 | @@ -899,16 +899,20 @@
ui-light
+.css
', 'ui-d
@@ -914,22 +914,30 @@
'ui-dark
+.css
', 'ui
+.css
' // The
|
e68bef6a8b28268571464a0aaba2896aadb713bf | add detect_face_local.js | detect_face_local.js | detect_face_local.js | JavaScript | 0.000002 | @@ -0,0 +1,630 @@
+var AWS = require(%22aws-sdk%22);%0Avar rekognition = new AWS.Rekognition(%7Bregion: 'us-west-2'%7D);%0Avar fs = require('fs');%0A%0Avar file = fs.readFile('./outan_confused04.JPG', function (err, data) %7B%0A if (err) %7B console.log(%22error happend while read the file%22);%7D%0A else %7B%0A c... | |
ad3b613fc3eeb800a4c2a9d5f51d35debb9871c9 | Add project team stats on learning Object section | learning/javascript/TeamStats.js | learning/javascript/TeamStats.js | JavaScript | 0 | @@ -0,0 +1,1339 @@
+const team = %7B%0A _players:%5B%0A %7B%0A firstName: 'Cristiano',%0A lastName: 'Ronaldo',%0A age: 36%0A %7D,%0A %7B%0A firstName: 'Lionel',%0A lastName: 'Messi',%0A age:32%0A %7D,%0A %7B%0A firstName: 'Ice',%0A last... | |
22e9783642822395884fb3ba5d5ba57f8901ce63 | bump chrome versions (#10787) | lighthouse-core/lib/emulation.js | lighthouse-core/lib/emulation.js | /**
* @license Copyright 2016 The Lighthouse 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 required by applica... | JavaScript | 0 | @@ -1519,13 +1519,11 @@
oid
-6
+7
.0
-.1
; Mo
@@ -1579,26 +1579,26 @@
Chrome/8
-0.0.3963.0
+4.0.4143.7
Mobile
@@ -1737,17 +1737,17 @@
S X 10_1
-3
+4
_6) Appl
@@ -1793,18 +1793,18 @@
me/8
-0.0.3963.0
+4.0.4143.7
Saf
|
68578aa2fc6b0b1624e4567337399771f44c0b9b | Create example.js | example/example.js | example/example.js | JavaScript | 0.000001 | @@ -0,0 +1,1251 @@
+var App = new Marionette.Application();%0A%0AApp.addRegions(%7B%0A %22mainRegion%22: %22#container%22%0A%7D);%0A%0AApp.start();%0A%0A$( function() %7B%0A var View1 = Marionette.ItemView.extend(%7B%0A template: %22#view1%22,%0A viewID: 'view1'%0A %7D);%0A var View2 = Marione... | |
e3ba52acbf0134faf0c023554d29393d50331f53 | remove JavaScript code that was causing errors in application.js | app/assets/javascripts/application.js | app/assets/javascripts/application.js | $(document).ready(function(){
$('h1').css({ 'width':'100%', 'text-align':'center' });
var h1 = $('h1').height();
var h = h1/2;
var w1 = $(window).height();
var w = w1/2;
var m = w - h
$('h1').css("margin-top",m + "px")
});
// This is a manifest file that'll be compiled into application.js, which will inc... | JavaScript | 0.00012 | @@ -1,242 +1,4 @@
-$(document).ready(function()%7B%0A $('h1').css(%7B 'width':'100%25', 'text-align':'center' %7D);%0A var h1 = $('h1').height();%0A var h = h1/2;%0A var w1 = $(window).height();%0A var w = w1/2;%0A var m = w - h%0A $('h1').css(%22margin-top%22,m + %22px%22)%0A%7D);%0A%0A
// T
|
9ee0854f6f3d9880f2eed6679401c1d3676144ca | add new loader: mapper, helps resolve remote file locally. | src/loader/mapper.js | src/loader/mapper.js | JavaScript | 0 | @@ -0,0 +1,383 @@
+var _ = require('lodash');%0A%0Avar definitions = %7B%7D;%0A%0Afunction mapper(root, $ref, callback) %7B%0A if (definitions%5B$ref%5D) %7B%0A callback(null, definitions%5B$ref%5D);%0A return true;%0A %7D%0A%7D%0A%0Afunction add($ref, schema) %7B%0A definitions%5B$ref%5D = schem... | |
17042cd4b5dd4fc7302c41d0c164a4be78def66d | add tvm.js | tvm.js | tvm.js | JavaScript | 0 | @@ -0,0 +1,1611 @@
+function FVPresentSum(PV, n, i)%0A//Returns the Future Value of a Present Sum%0A//PV = Present Value%0A//n = Number of Periods%0A//i = Interest Rate%0A//https://en.wikipedia.org/wiki/Time_value_of_money#Future_value_of_a_present_sum%0A%7B%0A%09return PV * Math.pow(1+i, n);%0A%7D%0A%0Afunction PVFutu... | |
6d77c7c439969bbeb47ef7f8fc80759dcdaf0cb8 | add actions | src/actions/FriendsActions.js | src/actions/FriendsActions.js | JavaScript | 0.000144 | @@ -0,0 +1,321 @@
+import * as types from '../constants/ActionTypes';%0A%0Aexport function addFriend(name) %7B%0A return %7B%0A type: types.ADD_FRIEND,%0A name%0A %7D;%0A%7D%0A%0Aexport function deleteFriend(id) %7B%0A return %7B%0A type: types.DELETE_FRIEND,%0A id%0A %7D;%0A%7D%0A%0Aexport function sta... | |
6096beb7d66abbcb800428c4375c1aacb691321c | Remove obsolete webpack define | webpack/makeConfig.js | webpack/makeConfig.js | import ExtractTextPlugin from 'extract-text-webpack-plugin';
import autoprefixer from 'autoprefixer';
import constants from './constants';
import path from 'path';
import webpack from 'webpack';
import webpackIsomorphicAssets from './assets';
import WebpackIsomorphicToolsPlugin from 'webpack-isomorphic-tools/plugin';
i... | JavaScript | 0 | @@ -3277,79 +3277,8 @@
de.%0A
- IS_REACT_NATIVE: false, // To strip off React Native code.%0A
|
ad1dde3af5b710077ce07d450d92f86762b70da0 | Create JS Olympics file for 7.6 | week-7/javascript_olympics.js | week-7/javascript_olympics.js | JavaScript | 0 | @@ -0,0 +1,1203 @@
+/*%0A%0A PEER PARING CHALLENGE 7.6: JAVASCRIPT OLYMPICS%0A%0A WE PAIRED ON THIS CHALLENGE: Becca Nelson & Lars Johnson%0A THIS CHALLENGE TOOK US: ___ Hours%0A%0A*/%0A// ###########################################################%0A// WARM UP%0A%0A%0A%0A%0A// ######################################... | |
1a32b6451b78a90b844a3bc5ece610c7c504636e | Create contact form component | src/components/ContactForm.js | src/components/ContactForm.js | JavaScript | 0 | @@ -0,0 +1,1522 @@
+import React from 'react'%0Aimport %7B withFormik %7D from 'formik'%0Aimport Yup from 'yup'%0A%0A// Our inner form component. Will be wrapped with Formik(%7B..%7D)%0Aconst InnerForm = props =%3E %7B%0A const %7B values, touched, errors, dirty, isSubmitting, handleChange, handleBlur, handleSubmit, h... | |
bc4f4918936df11122765a168848b09dc1727fa2 | add onrender callback call | src/megapix-image.js | src/megapix-image.js | /**
* Mega pixel image rendering library for iOS6 Safari
*
* Fixes iOS6 Safari's image file rendering issue for large size image (over mega-pixel),
* which causes unexpected subsampling when drawing it in canvas.
* By using this library, you can safely render the image with proper stretching.
*/
(function() {
... | JavaScript | 0.000001 | @@ -5078,32 +5078,114 @@
et, opt);%0A %7D%0A
+ if (typeof this.onrender === 'function') %7B%0A this.onrender(target);%0A %7D%0A
%7D%0A%0A /**%0A *
|
a1321abdd4820263c0fd9c5112cddb6dec301a81 | create last filter | src/filter/collection/last.js | src/filter/collection/last.js | JavaScript | 0.000005 | @@ -0,0 +1,914 @@
+/**%0A * @ngdoc filter%0A * @name last%0A * @kind function%0A *%0A * @description%0A * Gets the last element or last n elements of an array%0A * if callback is provided, is returns as long the callback return truthy%0A */%0Aangular.module('a8m.last', %5B%5D)%0A%0A .filter('last', %5B'$parse', functi... | |
4b0cc652e8d2897c0f3ba8a2b640f522ca2d4577 | fix bugs. | client/tools/chameleon_client/js/lib/project.js | client/tools/chameleon_client/js/lib/project.js | /**
* Created by Administrator on 2015/1/13.
*/
var sqlite3 = require('sqlite3').verbose();
var pathLib = require('path');
var Logger = require('./logger');
var Channel = require('./channel').Channel;
var ChameleonError = require('./chameleonError');
var _ = require('underscore');
var constants = require('../constan... | JavaScript | 0 | @@ -2606,16 +2606,23 @@
channel.
+config.
icon.pat
|
0e91fa6daefc33a3ed643963dc6643bc0a7886da | Add environment variable example | environment-variables.js | environment-variables.js | JavaScript | 0.000006 | @@ -0,0 +1,192 @@
+let value = process.env.FOURSQUARE_PARAMS%0A// console.log(value)%0Alet %5BclientId, clientSecret%5D = value.split(';')%0Aconsole.log('Client ID:', clientId)%0Aconsole.log('Client secret:', clientSecret)%0A
| |
1f6f719d9ba9ada3b86dac494d7c0987a670d7fc | Add polyfill for `Array.find` | src/polyfill-array-find.js | src/polyfill-array-find.js | JavaScript | 0 | @@ -0,0 +1,559 @@
+if (!Array.prototype.find) %7B%0A%09Array.prototype.find = function(predicate) %7B%0A%09%09'use strict';%0A%09%09if (this == null) %7B%0A%09%09%09throw new TypeError('Array.prototype.find called on null or undefined');%0A%09%09%7D%0A%09%09if (typeof predicate !== 'function') %7B%0A%09%09%09throw new ... | |
e856fb5f869cfe13584e3d1b987fbfed3e2bcf8b | Create ajax.js | ajax.js | ajax.js | JavaScript | 0.000008 | @@ -0,0 +1,673 @@
+var ajax = %7B%0A init: function()%7B%0A return new XMLHttpRequest();%0A %7D,%0A send: function(url,method,args,cookies,async,_callback)%7B%0A var q=ajax.init();%0A q.open(method,url,async);%0A q.onreadystatechange=function()%7B%0A if(this.ready... | |
51199bac794ad2fa5bfae8e7d4e6e52aa22a5ee0 | Create valentines.js | Holiday/valentines.js | Holiday/valentines.js | JavaScript | 0.000591 | @@ -0,0 +1,1714 @@
+var HeartsBackground = %7B%0A heartHeight: 60,%0A heartWidth: 64,%0A hearts: %5B%5D,%0A heartImage: 'heart.png',%0A maxHearts: 8,%0A minScale: 0.4,%0A draw: function() %7B%0A this.setCanvasSize();%0A this.ctx.clearRect(0, 0, this.w, this.h);%0A for (var i = 0; i %3C this.hearts.lengt... | |
2139698bcb8ee458d3267e2aa3214ae4770a4276 | add Easing functions | src/easing.js | src/easing.js | JavaScript | 0.000001 | @@ -0,0 +1,1290 @@
+// no easing; no acceleration%0Aexport const linear = t =%3E t;%0A// accelerating from zero velocity%0Aexport const easeInQuad = t =%3E t * t;%0A// decelerating to zero velocity%0Aexport const easeOutQuad = t =%3E t * (2 - t);%0A// acceleration until halfway; then deceleration%0Aexport const easeInO... | |
685e23d937d78f28b5127102e60db4457a519141 | Add effect class, make a basic constructor where all of the things are validated. | src/effect.js | src/effect.js | JavaScript | 0 | @@ -0,0 +1,706 @@
+const Type = require('./type');%0A%0Aclass Effect %7B%0A constructor(%7Bid, options, type, target%7D) %7B%0A %0A // Validate.%0A if (!id) %7B throw new ReferenceError(%22Effects must have an ID to prevent stacking.%22); %7D%0A if (!options %7C%7C !Object.keys(options).length) %7B throw n... | |
41aa5f27916122de2f7f12f9a5916c08b1800649 | Add types for @storybook/addon-actions package | flow-typed/npm/@storybook/addon-actions_v4.x.x.js | flow-typed/npm/@storybook/addon-actions_v4.x.x.js | JavaScript | 0 | @@ -0,0 +1,717 @@
+// flow-typed signature: 824de8c4d861db90a6471d410d3df917%0A// flow-typed version: %3C%3CSTUB%3E%3E/@storybook/addon-actions_v4.0.0/flow_v0.90.0%0A%0A/**%0A * This is an autogenerated libdef stub for:%0A *%0A * '@storybook/addon-actions'%0A *%0A * Fill this stub out by replacing all the %60any%60 t... | |
0991e10686cb2b1cac1a3d9e748b3de2e0616a95 | use shorter code | src/filter.js | src/filter.js | import {customElement, bindable, bindingMode} from 'aurelia-framework';
import {resolvedView} from 'aurelia-view-manager';
import {CriteriaBuilder} from './criteriaBuilder';
@customElement('filter')
@resolvedView('spoonx/filter', 'filter')
export class Filter extends Criter... | JavaScript | 0.000127 | @@ -3675,33 +3675,16 @@
ption =%3E
- %7B%0A return
option.
@@ -3687,25 +3687,16 @@
ion.name
-;%0A %7D
);%0A%0A
|
3dc17f7a2fb7602bcb7360870095c05a5fb41997 | Add IsObject Test | test/IsObjectTest.js | test/IsObjectTest.js | JavaScript | 0.000009 | @@ -0,0 +1,819 @@
+const %7B expect %7D = require('chai')%0Aconst %7B isObject %7D = require('../index')%0A%0Adescribe('isObject', () =%3E %7B%0A it('should return true when an Object is passed as argument', () =%3E %7B%0A expect(isObject(%7B%7D)).to.be.true%0A %7D)%0A%0A it('should return false when an Array i... | |
42c6f2f60c4057561b6d11dbc51f138a3af786c1 | add test for whereshouldiski API | test/powder/index.js | test/powder/index.js | JavaScript | 0 | @@ -0,0 +1,790 @@
+var should = require('should');%0Avar powder = require('../../lib/powder');%0A%0A/*global describe, it*/%0A%0Adescribe('powder', function() %7B%0A%0A it('should return powder rating for unsupported resorts', function(done) %7B%0A powder(%7B%0A id: 'not a valid resort'%0A %7D, function(err... | |
c7c21af90a45c08cb853f119cc4df1d22aadf862 | make runner-epipe test more resilient | test/runner-epipe.js | test/runner-epipe.js | var t = require('../')
var cp = require('child_process')
var spawn = cp.spawn
var execFile = cp.execFile
var node = process.execPath
var run = require.resolve('../bin/run.js')
var ok = require.resolve('./test/ok.js')
var notok = require.resolve('./test/not-ok.js')
var colorRe = new RegExp('\u001b\\[[0-9;]+m') // eslint... | JavaScript | 0.000005 | @@ -16,16 +16,156 @@
('../')%0A
+%0Aif (process.version.match(/%5E0%5C.1%5B02%5D%5C./)) %7B%0A t.plan(0, 'skip on old versions of node where child proc fds are flaky')%0A process.exit()%0A%7D%0A%0A
var cp =
@@ -984,16 +984,36 @@
s = 0',%0A
+ 'var buf = %22%22',%0A
'pro
@@ -1062,27 +1062,41 @@
' c =
-c.... |
6eeba1ad2ff43b89b7eb1cb0def23230896fa04c | Update app.js | src/js/app.js | src/js/app.js | 'use strict';
// Check if a new ApaCache is available on page load.
if (typeof window.applicationCache !== 'undefined') {
window.onload = function() {
window.applicationCache.onupdateready = function() {
if (window.applicationCache.status === window.applicationCache.UPDATEREADY) {
... | JavaScript | 0.000002 | @@ -28,17 +28,17 @@
a new Ap
-a
+p
Cache is
@@ -5536,12 +5536,13 @@
);%0A %7D);%0A%7D
+%0A
|
a44519338f87e46aeb19868759df8acce9e4871c | Add a simple module for connecting to rabbit | rabbit.js | rabbit.js | JavaScript | 0.000001 | @@ -0,0 +1,412 @@
+var rabbit = require('amqp');%0Avar q = require('q');%0A%0Avar config = require('./rabbit.json');%0A%0Aexports.connect = function() %7B%0A%09var deferred = q.defer();%0A%0A%09var connection = rabbit.createConnection(%7B host: config.host, login: config.login, password: config.password %7D);%0A%09conn... | |
d3a65c2947283221376c330f7a9e85b44677d29b | use regex for search string | es6/future-events-map.js | es6/future-events-map.js | 'use strict';
/*global $ */
/*global document */
/*global window */
let jQuery = require('jquery');
import * as customFunctions from './common-functions.build.js';
(function($) {
$(function () {
//urlify a string function
function urlify(str, lngth) {
let strArr = [];
let tmpStr = '';
tmpStr = str.... | JavaScript | 0.000069 | @@ -197,410 +197,8 @@
%7B%0A%0A
-%09%09//urlify a string function%0A%09%09function urlify(str, lngth) %7B%0A%09%09 let strArr = %5B%5D;%0A%09%09 let tmpStr = '';%0A%09%09 tmpStr = str.slice(0, lngth);%0A%09%09 for (let i = 0; i %3C tmpStr.length; i++) %7B%0A%09%09 if (tmpStr.charAt(i) !== ' ') %7B%0A%09%09 ... |
c9bf5cc61811a1e50acd3ab4516326e03d232373 | Add `io-watch-assets` middleware for Socket.io | src-server/middleware/io-watch-assets.js | src-server/middleware/io-watch-assets.js | JavaScript | 0.000001 | @@ -0,0 +1,183 @@
+export default function ioWatchAssets() %7B%0A return (socket, next) =%3E %7B%0A // join socket into maya.js messaging room.%0A socket.join(%22__maya__%22);%0A next();%0A %7D;%0A%7D%0A
| |
219b80b3808c1f0479b5ff47d910111340fef873 | format line | src/directives/public/on.js | src/directives/public/on.js | import { on, off, warn } from '../../util/index'
import { ON } from '../priorities'
// keyCode aliases
const keyCodes = {
esc: 27,
tab: 9,
enter: 13,
space: 32,
'delete': [8, 46],
up: 38,
left: 37,
right: 39,
down: 40
}
function keyFilter (handler, keys) {
var codes = keys.map(function (key) {
... | JavaScript | 0.000214 | @@ -2434,24 +2434,34 @@
== 'stop' &&
+%0A
key !== 'pr
@@ -2465,24 +2465,34 @@
'prevent' &&
+%0A
key !== 'se
@@ -2497,16 +2497,26 @@
self' &&
+%0A
key !==
|
219ffbd7a1aa6722d3247d7e11702b4e0ed33900 | add socket content script (addon sdk doesn't support websocket yet) | data/socket.js | data/socket.js | JavaScript | 0 | @@ -0,0 +1,1554 @@
+let WS;%0Aconst emitEvent = self.port.emit;%0Aconst addListener = self.port.on;%0A%0Afunction onOpen() %7B%0A console.log('Socket opened', arguments);%0A%7D%0A%0Afunction onClose() %7B%0A console.error('Socket closed', arguments);%0A%0A emitEvent('reconnect');%0A%7D%0A%0Afunction onError() ... | |
ece6a60c7077b4dcd9e5ec4d2f360a088c5b9ba7 | Add Macedonian translation (#631) | src/locale/mk_MK.js | src/locale/mk_MK.js | JavaScript | 0.000007 | @@ -0,0 +1,768 @@
+export default %7B%0A today: '%D0%94%D0%B5%D0%BD%D0%B5%D1%81',%0A now: '%D0%A1%D0%B5%D0%B3%D0%B0',%0A backToToday: '%D0%9D%D0%B0%D0%B7%D0%B0%D0%B4 %D0%B4%D0%BE %D0%B4%D0%B5%D0%BD%D0%B5%D1%81',%0A ok: '%D0%9E%D0%9A',%0A clear: '%D0%98%D0%B7%D0%B1%D1%80%D0%B8%D1%88%D0%B8',%0A month: '%D0%9C%D0%B5... | |
2dc29b953826d5049608495dea4e217a52d4201c | Add in base url and prefix to relative item.url | share/spice/product_hunt/product_hunt.js | share/spice/product_hunt/product_hunt.js | (function (env) {
'use strict';
env.ddg_spice_product_hunt = function(api_result){
if (!api_result || !api_result.hits || !(api_result.hits.length > 0)) {
return Spice.failed('producthunt');
}
var qUrl = encodeURIComponent(api_result.query),
domainRegex = new Re... | JavaScript | 0.000001 | @@ -345,16 +345,65 @@
%5D+)%5C/?/)
+,%0A baseUrl = %22https://producthunt.com%22
;%0A%0A
@@ -1200,16 +1200,26 @@
url:
+ baseUrl +
item.ur
|
6d2818ee3e3bc34d5108b72368e75b47f82272d9 | Create data.js | data.js | data.js | JavaScript | 0.000006 | @@ -0,0 +1,757 @@
+window.data1 = %5B%0A %7B%0A title: 'Website visits',%0A value: 15654,%0A color: 'green'%0A %7D,%0A %7B%0A title: 'Downloads',%0A value: 4064,%0A color: 'yellow'%0A %7D,%0A %7B%0A title: 'Requested price list',%0A value: 1987,%0A color: 'orange'%0A %7D,%0A %7B%0A ... | |
bfad0e883a91b23ced5fd01defb5f4d8276fe768 | format code | src/math/Frustum.js | src/math/Frustum.js | import { Vector3 } from './Vector3.js';
import { Sphere } from './Sphere.js';
import { Plane } from './Plane.js';
/**
* @author mrdoob / http://mrdoob.com/
* @author alteredq / http://alteredqualia.com/
* @author bhouston / http://clara.io
*/
function Frustum( p0, p1, p2, p3, p4, p5 ) {
this.planes = [
( p0 ... | JavaScript | 0.000061 | @@ -3198,20 +3198,16 @@
s%5B i %5D;%0A
-%09%09%09%09
%0A%09%09%09%09//c
@@ -3390,20 +3390,16 @@
.min.z;%0A
-%09%09%09%09
%0A%09%09%09%09if
|
c8602c9c758354c8b329dfa6fccf42c6d6b8f2e6 | Fix bubble width | src/menus/bubble.js | src/menus/bubble.js | var menuFactory = require('../menuFactory');
var appendVendorPrefix = require('react-kit/appendVendorPrefix');
var styles = {
svg: {
pathInitial: 'M-7.312,0H0c0,0,0,113.839,0,400c0,264.506,0,400,0,400h-7.312V0z',
pathOpen: 'M-7.312,0H15c0,0,66,113.339,66,399.5C81,664.006,15,800,15,800H-7.312V0z;M-7.312,0H10... | JavaScript | 0.000005 | @@ -1028,18 +1028,18 @@
width:
-28
+30
0,%0A
@@ -1124,10 +1124,10 @@
3d(-
-28
+30
0px,
|
f97360410b84b81523c8141c35a1cbf1d7ce4318 | Add user service | app/src/services/user-service.js | app/src/services/user-service.js | JavaScript | 0.000002 | @@ -0,0 +1,713 @@
+userService.$inject = %5B'tokenService', '$http', 'apiUrl'%5D;%0A%0Aexport default function userService(token, $http, apiUrl) %7B%0A const current = token.get();%0A if (current) %7B%0A $http%0A .get(%60%7B$apiUrl%7D/auth/verify%60)%0A .catch(() =%3E token.remove());%0A %7D%0A%0A func... | |
f3a6a39a6d8e59a82ba9badcba8337f69a40ff2d | user actions | app/actions/user.js | app/actions/user.js | JavaScript | 0.999519 | @@ -0,0 +1,445 @@
+import %7B socketEmit, dispatchAction %7D from './common.js'%0Aimport %7B MERGE_USER_INFO %7D from '../constants/user.js'%0A%0Aexport const login = socketEmit('login');%0Aexport const signUp = socketEmit('signUp');%0Aexport const getUserInfo = socketEmit('getUserInfo');%0Aexport const createRoom = so... | |
f48e216bf7a6b8429bdfccbdabb6541e754a33e5 | Add example demonstrating how `meta` objects BECOME the `info` object. (#1235) | examples/metadata.js | examples/metadata.js | JavaScript | 0 | @@ -0,0 +1,449 @@
+'use strict';%0A%0Aconst winston = require('../');%0A%0Aconst logger = winston.createLogger(%7B%0A level: 'info',%0A format: winston.format.combine(%0A winston.format(function (info, opts) %7B%0A console.log(%60%7B reason: $%7Binfo.reason%7D, promise: $%7Binfo.promise%7D %7D%60);%0A re... | |
bcf24f7445a01719d308fe7a675699e08a2dccde | Add Spaces module | bot_modules/spaces.js | bot_modules/spaces.js | JavaScript | 0.000001 | @@ -0,0 +1,448 @@
+// $ Spaces%0A// $ Authors: victorgama%0A// $ Created on: Wed Mar 16 18:20:27 BRT 2016%0A%0Avar Base = require('../src/base_module');%0A%0Avar Spaces = function(bot) %7B%0A Base.call(this, bot);%0A this.hear(/spaces/i, function(response) %7B%0A if(%5B'general', 'r2d3-tests'%5D.indexOf(re... | |
d073e6555bb997b59cc9465781aeabc2e44ff18e | Add comments | Source/Core/joinUrls.js | Source/Core/joinUrls.js | define([
'../ThirdParty/Uri',
'./defaultValue',
'./defined',
'./DeveloperError'
], function(
Uri,
defaultValue,
defined,
DeveloperError) {
'use strict';
/**
* Function for joining URLs in a manner that is aware of query strings and fragme... | JavaScript | 0 | @@ -2705,106 +2705,416 @@
-url = url.replace(/%5C/?$/, '/');%0A baseUri.path = baseUri.path.replace(/%5E%5C/?/g, '');%0A
+// The next line ensures that url (including a non-blank authority) ends with a slash.%0A url = url.replace(/%5C/?$/, '/');%0A baseUri.path = baseU... |
7a4907e5e5ec703cc99e936480850ce60b0992ec | Add service to track the current process. | website/app/project/processes/process/services/process.service.js | website/app/project/processes/process/services/process.service.js | JavaScript | 0 | @@ -0,0 +1,433 @@
+(function(module) %7B%0A module.factory('process', processService);%0A processService.$inject = %5B%5D;%0A function processService() %7B%0A var self = this;%0A self.process = %7B%7D;%0A%0A return %7B%0A set: function(process) %7B%0A self.process... | |
cfa3ebd571200ec027ef8bb8dd19df133e8e6306 | create new nodeschool solution | Core/javascripting/16:object-properties.js | Core/javascripting/16:object-properties.js | JavaScript | 0.000001 | @@ -0,0 +1,176 @@
+/* Challenge #16: object properties%0ACode by Perrin Clark%0ABlackGuyCoding@gmail.com%0Ahttps://www.nodeschool.io */%0A%0Avar food = %7B%0A types: 'only pizza'%0A%7D;%0A%0Aconsole.log(food.types);%0A
| |
88195e29afedba25a8b9e0489b19d7392ef894ab | Add cabal.project.local for compiling production JS code | cabal.project.local.js | cabal.project.local.js | JavaScript | 0 | @@ -0,0 +1,270 @@
+profiling: False%0Alibrary-profiling: False%0Atests: False%0Acoverage: False%0Alibrary-coverage: False%0Aoptimization: True%0Adocumentation: False%0A%0Apackage *%0A documentation: False%0A library-profiling: False%0A profiling: False%0A%0Apackage LambdaHack%0A flags: +release -supportNodeJS%0A%0A... | |
5bffa73605614b0250d047033621e9591ddc578c | Define the data structure for addon settings. | webextensions/common/common.js | webextensions/common/common.js | JavaScript | 0 | @@ -0,0 +1,451 @@
+'use strict';%0A%0Avar configs;%0A%0Afunction log(aMessage, ...aArgs) %7B%0A if (!configs %7C%7C !configs.debug)%0A return;%0A console.log('reload-on-idle: ' + aMessage, ...aArgs);%0A%7D;%0A%0Afunction createFilter() %7B%0A try %7B%0A return new RegExp(configs.filter, 'i');%0A %7D catch (e)... | |
ccd5d15fa0e4d6043e94fbc435fdb4e06d2d38d6 | create js module utils | share/nitdoc/js/plugins/utils.js | share/nitdoc/js/plugins/utils.js | JavaScript | 0 | @@ -0,0 +1,1366 @@
+/* This file is part of NIT ( http://www.nitlanguage.org ).%0D%0A%0D%0A Licensed under the Apache License, Version 2.0 (the %22License%22);%0D%0A you may not use this file except in compliance with the License.%0D%0A You may obtain a copy of the License at%0D%0A%0D%0A http://www.apache.org/l... | |
ac3bfc83f1cbd5a5b6bc75f6f0729317f694a58c | update theme | galleria.classic.js | galleria.classic.js | JavaScript | 0 | @@ -0,0 +1,2745 @@
+/**%0A * Galleria Classic Theme 2012-08-08%0A * http://galleria.io%0A *%0A * Licensed under the MIT license%0A * https://raw.github.com/aino/galleria/master/LICENSE%0A *%0A */%0A%0A(function($) %7B%0A%0A/*global jQuery, Galleria */%0A%0AGalleria.addTheme(%7B%0A name: 'classic',%0A author: 'Gal... | |
739310025b93d21ec39cf6f0c233fd502ec6e215 | Use formatted name. | share/spice/gravatar/gravatar.js | share/spice/gravatar/gravatar.js | // Description:
// Shows information about a Gravatar user.
//
// Dependencies:
// None.
//
// Commands:
// gravatar gravatar@duckduckgo.com - shows information about the e-mail address.
// gravatar matt - shows information about a user.
var ddg_spice_gravatar = function(api_result) {
// Check for errors.
if(!... | JavaScript | 0 | @@ -594,24 +594,107 @@
%7D%0A%0A
+if(entry.name.formatted) %7B%0A return entry.name.formatted;%0A %7D else
if(entry.nam
|
097fa03e79aeb9e2a83c9ef08c1124c3d88a047e | Build the developer version | src/modules/color.js | src/modules/color.js | JavaScript | 0.000023 | @@ -0,0 +1,74 @@
+(function()%7B%0A %0A %0A %0A var exports = %7B%7D;%0A %0A %0A %0A return exports;%0A%7D)();
| |
eb12a0e3eb66221a100aac74042baddca751491a | check in ical test script and scratch space, will probably trash but might be useful to others before i do | ical.js | ical.js | JavaScript | 0 | @@ -0,0 +1,1922 @@
+var pp = require('ypp');%0Avar moment = require('moment-timezone');%0Arequire('moment-range');%0Avar request = require('request');%0A%0Avar ICalParser = require('cozy-ical').ICalParser;%0A%0Avar parser = new ICalParser();%0A// make a calendar and use the ics link%0Avar doorAccessCalendarURL = proces... | |
d603ccffadeec820abfed7876e3b8ea516621462 | Implement a basic recipes integration test for the cli (#24491) | integration-tests/gatsby-cli/__tests__/recipes.js | integration-tests/gatsby-cli/__tests__/recipes.js | JavaScript | 0 | @@ -0,0 +1,800 @@
+import %7B GatsbyCLI %7D from %22../test-helpers%22%0A%0Aconst MAX_TIMEOUT = 2147483647%0Ajest.setTimeout(MAX_TIMEOUT)%0A%0Adescribe(%60gatsby recipes%60, () =%3E %7B%0A const cwd = %60gatsby-sites/gatsby-develop%60%0A%0A beforeAll(() =%3E GatsbyCLI.from(cwd).invoke(%60clean%60))%0A afterAll(() =%... | |
452b6dd5c1afb94c9335baeb7010159c36486797 | Create developer screen | js/components/developer/index.js | js/components/developer/index.js | JavaScript | 0.000001 | @@ -0,0 +1,414 @@
+import React from 'react';%0Aimport %7BView, Button%7D from 'react-native';%0A%0Aexport default class DeveloperScreen extends React.Component %7B%0A%09static navigationOptions = %7B%0A%09%09tabBar: %7B%0A%09%09%09label: 'Developer'%0A%09%09%7D,%0A%09%09title: 'Developer'%0A%09%7D;%0A%0A%09render() %7... | |
c126dd52a5993b29eed8c87b32a6699c648d0570 | Use nextProps for comparison not nextState | js/components/immutableComponent.js | js/components/immutableComponent.js | /* 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/. */
const React = require('react')
class ImmutableComponent extends React.Component {
shouldComponentUpdate (nextPr... | JavaScript | 0.000001 | @@ -320,19 +320,8 @@
rops
-, nextState
) %7B%0A
@@ -375,13 +375,19 @@
next
-State
+Props%5Bprop%5D
!==
|
4a1f91bb64da85a8dd0cb82e16e7f16928722032 | debug dump full body | index.js | index.js | // Load Environment variables
require('dotenv').load();
// paystack module is required to make charge token call
var paystack = require('paystack')(process.env.PAYSTACK_SECRET_KEY);
// uuid module is required to create a random reference number
var uuid = require('node-uuid');
var express = require('express');
... | JavaScript | 0.000001 | @@ -2467,20 +2467,8 @@
body
-.access_code
);%0A
@@ -2908,25 +2908,8 @@
body
-.gateway_response
);%0A
|
b9947635cd8081e91bc2fdcb824062c6a5c2cec2 | add npm module index script. | index.js | index.js | JavaScript | 0 | @@ -0,0 +1,43 @@
+module.exports = require('./libs/pictor');%0A
| |
0c31b391076fa5ba0daa61961336dca21e2542e5 | Create index.js | index.js | index.js | JavaScript | 0.000002 | @@ -0,0 +1,1976 @@
+var Limiter = module.exports = function(options) %7B%0A%09var configuration = %7B%7D;%0A%09%0A%09var settings = %5B Limiter.defaults, options %5D;%0A%09%0A%09for (var i = 0; i %3C settings.length; i++) %7B%0A%09%09var source = settings%5Bi%5D%0A%0A%09%09for (var key in source) %7B%0A%09%09%09if (sou... | |
0f23281fe9a068acaaa46b680d1b7f904ab8fde4 | use Meteor settings for height/width resizability, framing | index.js | index.js | console.log("WORKING DIRECTORY", process.cwd());
console.log("ENVIRONMENT", process.env);
var meteorSettings = JSON.parse(process.env.METEOR_SETTINGS);
var rootUrl = process.env.ROOT_URL;
console.log("METEOR SETTINGS", meteorSettings);
console.log("ROOT URL", rootUrl);
var appName = meteorSettings.appName;
var app =... | JavaScript | 0 | @@ -154,120 +154,92 @@
var
-rootUrl = process.env.ROOT_URL;%0Aconsole.log(%22METEOR SETTINGS%22, meteorSettings);%0Aconsole.log(%22
+electronSettings = meteorSettings.electron %7C%7C %7B%7D;%0Avar rootUrl = process.env.
ROOT
-
+_
URL
-%22, rootUrl)
;%0A%0Av
@@ -467,63 +467,271 @@
th:
-800,%0A height:600,%0A r... |
b48458b319fa6bbfed99cc99aba68a6c0fc3e2b1 | Add code for 7.5 | week-7/nums_commas.js | week-7/nums_commas.js | JavaScript | 0.000128 | @@ -0,0 +1,1794 @@
+// Separate Numbers with Commas in JavaScript **Pairing Challenge**%0A%0A%0A// I worked on this challenge with: .%0A%0A// Pseudocode%0A// We encountered a computer error and lost our pseudocode.%0A%0A%0A// Initial Solution%0Afunction separate_comma(user_num)%7B%0A var add_commas = user_num.toString... | |
df64c2bc8f691ecc6f6c214e2254bab439830b88 | Restore whitespace | index.js | index.js | // Copyright 2010-2012 Mikeal Rogers
//
// 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 applicabl... | JavaScript | 0.999995 | @@ -782,16 +782,18 @@
')%0A ;%0A%0A
+%0A%0A
// organ
|
8bab3396c6e13326d8aba4e31adac88d4f310399 | Add a variation on the Angular UI Bootstrap code which keeps the dropdown open as long as the clicks are inside the menu | src/common/bootstrap/bootstrap.js | src/common/bootstrap/bootstrap.js | JavaScript | 0 | @@ -0,0 +1,2044 @@
+/**%0A * Enhances the angular bootstrap directive to allow it to stay open when the%0A * user clicks inside the menu.%0A */%0Aangular.module('ui.bootstrap.dropdownToggle', %5B%5D).directive('dropdownToggleNoClose',%0A %5B'$document', '$location', '$window', function ($document, $location, $window) ... | |
8ee1550f8931410495e329d04a3b6bd71a462e1f | Update as Day 10 Customer Model | app/models/customer.server.model.js | app/models/customer.server.model.js | JavaScript | 0 | @@ -0,0 +1,833 @@
+'use strict';%0A%0A/**%0A * Module dependencies.%0A */%0Avar mongoose = require('mongoose'),%0A%09Schema = mongoose.Schema;%0A%0A/**%0A * Customer Schema%0A */%0Avar CustomerSchema = new Schema(%7B%0A%09firstName: %7B%0A%09%09type: String,%0A%09%09default: '',%0A%09%09trim: true%0A%09%7D,%0A%09surNam... | |
ecb51e7328531f7f06a1018d76f1e807367b67c4 | Create graph.js | graph.js | graph.js | JavaScript | 0.000022 | @@ -0,0 +1,1465 @@
+// creates an ascii bar graph for hastebin.%0A%22use strict%22;%0A%0Afunction Graph (data, options) %7B%0A return new Promise((resolve, reject) =%3E %7B%0A if (!options) options = %7B%7D; %0A %0A let maxBars = options.maxBars %7C%7C 32;%0A let symbol = options.symbol %7C%7... | |
a781cea6c1fbe2a8450d32172b5367707fdc4ef0 | Create Cuisine.js | src/components/cuisine/Cuisine.js | src/components/cuisine/Cuisine.js | JavaScript | 0.000001 | @@ -0,0 +1,1650 @@
+import React, %7B Component %7D from 'react';%0Aimport Lightbox from 'lightbox-react';%0A%0A%0Aexport default class Cuisine extends Component %7B%0A render() %7B%0A return(%0A %3Cdiv%3E%0A %3Cdiv className=%22Fifteen%22%3E%0A %3Cdiv className=%22One-inner%2... | |
b24643a7645a872615e587911295f74fa6b6c0d2 | test density.size() (doesn’t need to be an integer) | test/density-test.js | test/density-test.js | JavaScript | 0.000001 | @@ -0,0 +1,486 @@
+var d3 = require(%22../%22),%0A tape = require(%22tape%22);%0A%0Atape(%22density.size(%E2%80%A6) validates the specified size%22, function(test) %7B%0A test.deepEqual(d3.contourDensity().size(%5B1, 2%5D).size(), %5B1, 2%5D);%0A test.deepEqual(d3.contourDensity().size(%5B0, 0%5D).size(), %5B0, 0%... | |
7a62269b3bcaea19b75e218f91239a8aea4a2c3d | Create service-worker.js | Web.App/app/assets/service-worker.js | Web.App/app/assets/service-worker.js | JavaScript | 0.000034 | @@ -0,0 +1,155 @@
+/*%0A This service worker doesn't actually do anything!%0A In the real world, you would add support for Offline or the ability to%0A handle push messages.%0A*/%0A
| |
3bab2a0b8d4a0272bf2f361773874681119126a9 | Remove console.log from exec node | nodes/core/75-exec.js | nodes/core/75-exec.js | /**
* Copyright 2013 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wr... | JavaScript | 0.000002 | @@ -1135,16 +1135,18 @@
; %7D%0A%09%09%09%09
+//
console.
|
0b51ca60233510f95fb2fce130fefe9dced30a99 | Add UID to project parameter | asset/js/app.js | asset/js/app.js | // Initialize Firebase
var config = {
apiKey: "AIzaSyD-IT1RWXi-7bMSjtTsPmpaTD2SXadFxC0",
authDomain: "shipit-7427d.firebaseapp.com",
databaseURL: "https://shipit-7427d.firebaseio.com",
projectId: "shipit-7427d",
storageBucket: "",
messagingSenderId: "601650858338"
};
firebase.initializeApp(config);
//Database C... | JavaScript | 0 | @@ -2002,16 +2002,44 @@
%22false%22
+,%0A%09 %09uid: generateHackID()
%0A%09 %7D);%0A
|
f50f3b6b48a0ec6dce33710bd8956ad55aed684a | Create Block_TestParams.js | CNN/jsPerf/Ref/Block_TestParams.js | CNN/jsPerf/Ref/Block_TestParams.js | JavaScript | 0.000001 | @@ -0,0 +1,1382 @@
+export %7B Base %7D;%0A%0Aimport * as RandTools from %22../../util/RandTools.js%22;%0A//import * as ParamDesc from %22../../Unpacker/ParamDesc.js%22;%0A//import * as ValueDesc from %22../../Unpacker/ValueDesc.js%22;%0A//import * as ValueRange from %22../../Unpacker/ValueRange.js%22;%0Aimport * as Te... | |
81ab5f7747655fa4b34b0768c8c5709ffdd661b8 | support room, use socket.io | basic2016/server/signaling_room.js | basic2016/server/signaling_room.js | JavaScript | 0 | @@ -0,0 +1,2953 @@
+%22use strict%22;%0A%0A// Please install ws module%0A// npm install socket.io%0A//%0A// Run%0A// node signaling_room.js%0A%0A%0A%0A/*--%0Alet WebSocketServer = require('ws').Server;%0Alet port = 3001;%0Alet wsServer = new WebSocketServer(%7B port: port %7D);%0Aconsole.log('websocket server start... | |
44f415f3ab58ee4909f700544b40c04ea39fe6a8 | add questions module for storing inquirer questions | bin/questions.js | bin/questions.js | JavaScript | 0 | @@ -0,0 +1,1200 @@
+'use strict'%0A%0Aconst submitBranchList = %5B%0A '%3Cpr base branch%3E'%0A, 'master'%0A, 'next'%0A, 'next+1'%0A, 'v4.x'%0A, 'v3.x'%0A, 'v0.12'%0A, 'v0.10'%0A, '%3Cno rebasing%3E'%0A%5D%0A%0Aexports.submit = %5B%0A %7B type: 'input'%0A , name: 'job'%0A , message: 'Job Name'%0A , default: 'node-... | |
d38df2ffa12b2dd6405de1439b75d864a12cc86d | Add Tests | server/tests/integration.js | server/tests/integration.js | JavaScript | 0 | @@ -0,0 +1,799 @@
+/*global describe:true, it:true */%0Avar supertest = require('supertest');%0Avar should = require('should');%0Avar expect = require('expect');%0A%0Adescribe('Auth', function () %7B%0A%0A it('should sign up the user', function () %7B%0A%0A %7D);%0A%0A it('should authenticate the user', function () ... | |
52233485f2360ad50f9f27d7cb7f91a9a9e9857d | Create config.js | config.js | config.js | JavaScript | 0.000003 | @@ -0,0 +1,481 @@
+// Config file for Chateau: https://github.com/neumino/chateau%0A// RethinkDB settings%0Aexports.host = '172.17.0.1'; // RethinkDB host%0Aexports.port = 49154; // RethinkDB driver port%0Aexports.authKey = ''; // Authentification key (leave an empty string if you did not set one)%... | |
0b027eaa5bdd6f71ebd58d11a6d0eb7ca27d11d6 | Add configuration file | config.js | config.js | JavaScript | 0.000002 | @@ -0,0 +1,716 @@
+module.exports = %7B%0A%09token: process.env.ACCESS_TOKEN,%0A%09app: %7B%0A%09%09id: process.env.APP_ID,%0A%09%09secret: process.env.APP_SECRET%0A%09%7D,%0A%09group: %7B%0A%09%09id: 117271043%0A%09%7D,%0A%09cover: %7B%0A%09%09height: 1590,%0A%09%09width: 400%0A%09%7D,%0A%09time: %7B%0A%09%09delay: mi... | |
7f1c64d25e1e0468e591067d82edca8ae76eb0fc | add config.js | config.js | config.js | JavaScript | 0.000005 | @@ -0,0 +1,64 @@
+%0D%0Avar config = function(_)%0D%0A%7B%0D%0A%0D%0A%7D;%0D%0A%0D%0Amodule.export = config;%0D%0A
| |
766f3f2b282cc775d76861d8437ec807ec66d6eb | move zeroes to end | Code-Wars/JS/move-zeroes-to-end.js | Code-Wars/JS/move-zeroes-to-end.js | JavaScript | 0.000008 | @@ -0,0 +1,373 @@
+// https://www.codewars.com/kata/moving-zeros-to-the-end/javascript%0A%0Avar moveZeros = function (arr) %7B%0A let resultArr = %5B%5D;%0A let countOfZeroes = 0;%0A for(let element of arr)%7B%0A if(element!==0)%0A resultArr.push(element);%0A else%0A countOfZeroes++;%... | |
dab855816101cb35932b1330873d5060f5495847 | Create index.js | index.js | index.js | JavaScript | 0.000002 | @@ -0,0 +1,29 @@
+console.log('hi from here');%0A
| |
28be812990550c46b3455be90dfe19801f966829 | Add timeout to start and stop Trails | index.js | index.js | /*eslint no-console: 0 */
'use strict'
const events = require('events')
const lib = require('./lib')
/**
* The Trails Application. Merges the configuration and API resources
* loads Trailpacks, initializes logging and event listeners.
*/
module.exports = class TrailsApp extends events.EventEmitter {
/**
* @p... | JavaScript | 0 | @@ -94,16 +94,37 @@
'./lib')
+%0Aconst TIMEOUT = 2000
%0A%0A/**%0A *
@@ -616,24 +616,112 @@
ment'%0A %7D%0A
+ if (!process.env.TRAILS_TIMEOUT) %7B%0A process.env.TRAILS_TIMEOUT = TIMEOUT%0A %7D%0A
if (!app
@@ -2644,17 +2644,172 @@
start')%0A
+ this.startTimer = setTimeout(() =%3E %7B%0A t... |
b4690d4370b7a14c5c0f89393cebcb6f1a2cb3db | Create index.js | index.js | index.js | JavaScript | 0.000002 | @@ -0,0 +1,1617 @@
+module.exports = function (extra_extensions) %7B%0A var extensions = %5B%0A , %22.glsl%22%0A , %22.vert%22%0A , %22.frag%22%0A , %22.vs%22%0A , %22.fs%22%0A , %22.gs%22%0A , %22.vsh%22%0A , %22.fsh%22%0A , %22.gsh%22%0A , %22.vshader%22%0A , %22.fshader%22%0A , %... | |
767b86d3b54ead30b5250d258fe130554f9fad8b | Add methods for attaching middleware | index.js | index.js | /**
* @file server
* @author treelite(c.xinle@gmail.com)
*/
var express = require('express');
var mm = require('saber-mm');
var router = require('./lib/router');
var Element = require('./lib/Element');
var getConfig = require('./lib/util/get-config');
var config = require('./lib/config');
// 从命令行参数获取配置文件夹地址
var co... | JavaScript | 0.000001 | @@ -288,16 +288,72 @@
fig');%0A%0A
+var beforeMiddlewares = %5B%5D;%0Avar afterMiddlewares = %5B%5D;%0A%0A
// %E4%BB%8E%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%8F%82
@@ -1419,31 +1419,212 @@
//
-%E8%B7%AF%E7%94%B1%E7%BB%91%E5%AE%9A%0A router.use(app
+%E9%99%84%E5%8A%A0%E8%87%AA%E5%AE%9A%E4%B9%89%E4%B8%AD%E9%97%B4%E4%BB%B... |
943bcc66b93d5087c81d54318bfb720e2524c66e | Create index.js | index.js | index.js | JavaScript | 0.000002 | @@ -0,0 +1,107 @@
+function cblocktest(name, dep)%7B%0Aconsole.log(%22loading cblocktest plugin%22);%0A%0A%7D%0A%0Amodule.exports = cblocktest;%0A
| |
27ceabc92487019d7fa98f7d912518c82df00738 | Create index.js | index.js | index.js | JavaScript | 0.000002 | @@ -0,0 +1,41 @@
+module.exports = require('./logger.js');%0A
| |
06ba4978d510ff24120e48f5cc1da2e1ebb721fd | add to hoemstar | index.js | index.js | JavaScript | 0.998607 | @@ -0,0 +1,934 @@
+/*%0A * index.js%0A *%0A * David Janes%0A * IOTDB.org%0A * 2015-02-24%0A *%0A * Homestar / IOTDB integration (see %22upnp.js%22 for more)%0A *%0A * Copyright %5B2013-2015%5D %5BDavid P. Janes%5D%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use... | |
fd860c249c7fabfda49bc05fe77bd0da454af668 | Fix shuffle button on state | media.js | media.js | /* Emulate the native <audio> element with Web Audio API */
Media = {
_context: new(window.AudioContext || window.webkitAudioContext)(),
_source: null,
_buffer: null,
_callbacks: {
waiting: function(){},
playing: function(){},
timeupdate: function(){},
visualizerupdate: f... | JavaScript | 0.000001 | @@ -5996,24 +5996,116 @@
op;%0A %7D,%0A%0A
+ toggleShuffle: function() %7B%0A // Implement this when we support playlists%0A %7D,%0A%0A
/* Liste
|
cee1c28ea5a219f7bf9eb1981600ca0aea00c949 | Create timify util | app/scripts/common/utils/timify.js | app/scripts/common/utils/timify.js | JavaScript | 0.000033 | @@ -0,0 +1,1085 @@
+'use strict';%0A%0Amodule.exports = %7B%0A convertTimeToIndex: function (time) %7B%0A // Converts a 24-hour format time string to an index:%0A // 0000 -%3E 0, 0030 -%3E 1, 0100 -%3E 2, ...%0A return (parseInt(time.substring(0, 2)) * 2) + (time.substring(2) === '00' ? 0 : 1);%0A %7D,%0A c... | |
557e80d29fdd242b4d3bfec792e3f96685e18e39 | test to ensure deps and bundleDeps match | test/tap/00-verify-bundle-deps.js | test/tap/00-verify-bundle-deps.js | JavaScript | 0 | @@ -0,0 +1,733 @@
+var fs = require(%22fs%22)%0Avar path = require(%22path%22)%0Avar test = require(%22tap%22).test%0A%0Avar manifest = require(%22../../package.json%22)%0Avar deps = Object.keys(manifest.dependencies)%0Avar dev = Object.keys(manifest.devDependencies)%0Avar bundled = manifest.bundleDependencies%0A%0Ates... | |
2a771b20661e5cb034bd155ed136619f70f64dd8 | Test for Queue.unbind_headers function | test/test-queue-unbind-headers.js | test/test-queue-unbind-headers.js | JavaScript | 0.000001 | @@ -0,0 +1,1474 @@
+require('./harness');%0Avar testName = __filename.replace(__dirname+'/','').replace('.js','');%0Avar recvCount = 0;%0A%0Aconnection.addListener('ready', function () %7B%0A puts(%22connected to %22 + connection.serverProperties.product);%0A %0A connection.exchange('node.'+testName+'.exchange... | |
9b6b8d4b3bcb70aa1ca4a95c5a404b7dd82939b5 | add unit tests for house reducer | test/reducers/house_spec.js | test/reducers/house_spec.js | JavaScript | 0 | @@ -0,0 +1,1494 @@
+import reducer from '../../src/reducers/house_reducer'%0Aimport * as actions from '../../src/actions/types'%0Aimport %7B expect %7D from '../test_helper'%0A%0Adescribe('house reducer', () =%3E %7B%0A%0A let INITIAL_STATE = %7B%0A users: %5B%5D,%0A address: '',%0A code: '',%0A name: '',%... | |
e0bd57f7cdbfe3b3ed29d0a17a402aaf78fcbc7e | add 66-object-literal-getter.js | tests/66-object-literal-getter.js | tests/66-object-literal-getter.js | JavaScript | 0.002078 | @@ -0,0 +1,1540 @@
+// 66: object-literal - getter%0A// To do: make all tests pass, leave the assert lines unchanged!%0A%0Avar assert = require(%22assert%22);%0A%0Adescribe('An object literal can also contain getters', () =%3E %7B%0A%0A it('just prefix the property with %60get%60 (and make it a function)', function() ... | |
f4f375207908296a8b42f02f17f097d578890782 | modify twitterHandlerConverter to be a bit safer | codeShow.JS.Windows/pages/hub/hub.js | codeShow.JS.Windows/pages/hub/hub.js | (function () {
"use strict";
var page;
WinJS.UI.Pages.define("/pages/hub/hub.html", {
init: function (element, options) {
page = this;
//make select portions of this page's functionality available outside the page
createNamespace();
if (!codeShow.P... | JavaScript | 0 | @@ -7374,16 +7374,25 @@
return
+ (value ?
%22@%22 + v
@@ -7395,16 +7395,22 @@
+ value
+ : %22%22)
;%0A
|
b71fb0acf6306aa3bb8fb9b64a4db64f13b31d6d | remove console.log | tasks/lib/zopfli.js | tasks/lib/zopfli.js | var fs = require('fs');
var path = require('path');
var prettySize = require('prettysize');
var zopfli = require('node-zopfli');
module.exports = function(grunt) {
'use strict';
exports.detectMode = function(dest, ext) {
var mode = 'gzip';
ext = ext || path.extname(dest).replace('.', '');
switch(ext) ... | JavaScript | 0.000006 | @@ -1824,37 +1824,8 @@
%7D);%0A
- console.log(%22compress%22);%0A
@@ -4231,18 +4231,16 @@
;%0A %7D;%0A%0A
-
%0A expor
@@ -4433,8 +4433,9 @@
orts;%0A%7D;
+%0A
|
9733335d4a4ee1dd5ca00d702551f217db4a5cb5 | test coverage for interleaving add and pipeing | test/add-interleavings.js | test/add-interleavings.js | JavaScript | 0 | @@ -0,0 +1,918 @@
+%0Avar pull = require('pull-stream')%0Avar async = require('interleavings')%0Avar many = require('../')%0Avar assert = require('assert')%0A%0Aasync.test(function (async) %7B%0A%0A%0A var m = many()%0A%0A var n = 2, o = 6%0A%0A async(function () %7B%0A m.add(async.through('odd')(pull.values(%5B1... | |
e2e480dcac93338bd1cd3a58cb7b77551385d6a5 | add job tests | test/bitcodin.job.test.js | test/bitcodin.job.test.js | JavaScript | 0.000057 | @@ -0,0 +1,1662 @@
+/**%0A * Created by mfillafer on 23.06.15.%0A */%0A%0Avar util = require('./util'),%0A bitcodin = require('../lib/bitcodin')(util.settings.apiKey);%0A%0Adescribe('Job', function () %7B%0A var jobIds = %5B%5D;%0A%0A it('should create a new job', function () %7B%0A var jobConfig = %7B%... | |
988174a6294ab863be2961267174901440100944 | Add tests for path module. | test/mjsunit/test-path.js | test/mjsunit/test-path.js | JavaScript | 0 | @@ -0,0 +1,1125 @@
+var path = require(%22path%22);%0Aprocess.mixin(require(%22./common%22));%0A%0Avar f = __filename;%0A%0Aassert.equal(path.basename(f), %22test-path.js%22);%0Aassert.equal(path.basename(f, %22.js%22), %22test-path%22);%0Aassert.equal(path.extname(f), %22.js%22);%0Aassert.equal(path.dirname(f).substr(... | |
5470155907b3c85417b63e92e7b2d9c7c04690fc | Create test file for cache. | test/test-api-util-cache.js | test/test-api-util-cache.js | JavaScript | 0 | @@ -0,0 +1,795 @@
+module.exports = %7B%0A setUp: function (callback) %7B%0A var path = require('path');%0A%0A this.cache = require('../lib/utils/cache');%0A this.cache.init(%7B%0A %22path%22 : path.resolve(__dirname, %22../%22) + %22/cache%22%0A %7D);%0A this.cacheKey =... | |
1fc56c262a61436be53822efe19d5ddcab434254 | Add Book class in Book.js file | server/models/Book.js | server/models/Book.js | JavaScript | 0.000001 | @@ -0,0 +1,1404 @@
+import jsonfile from 'jsonfile';%0A%0Aexport default class Book %7B%0A%0A addBook(id, title, author, description, imageURL, subject, quantity) %7B%0A this.id = id;%0A this.title = title;%0A this.author = author;%0A this.description = description;%0A this.imageURL = imageURL;%0A th... | |
ecc03a12c2467442e7e5f3b00b97f6e0c6a640e3 | add config sample to git, while the real scara will use config | config-sample.js | config-sample.js | JavaScript | 0 | @@ -0,0 +1,140 @@
+var config = %7B%7D;%0A%0Aconfig.board = %7B%7D;%0Aconfig.board.port = %22/dev/cu.serialusb%22; // change this to your usb/bluetooth%0A%0Amodule.exports = config;
| |
1017054e95ecb84155c54102705f8570e0199a49 | Add mock mixin for Polymer.IronFitBehavior | polygerrit-ui/app/types/polymer-behaviors.js | polygerrit-ui/app/types/polymer-behaviors.js | JavaScript | 0.000001 | @@ -0,0 +1,1658 @@
+/**%0A * @license%0A * Copyright (C) 2019 The Android Open Source Project%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/l... | |
2500a2a575feb33176a9eedfeb6a605ebc903e5a | add orientaiton api | public/hft/0.x.x/scripts/misc/orientation.js | public/hft/0.x.x/scripts/misc/orientation.js | JavaScript | 0 | @@ -0,0 +1,3276 @@
+/*%0A * Copyright 2014, Gregg Tavares.%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 cop... | |
24f23363db641348c8c6392a9d8edac3dfdd6fb1 | add missing files from last commit | public/js/views/visualizations/visualization_view.js | public/js/views/visualizations/visualization_view.js | JavaScript | 0 | @@ -0,0 +1,230 @@
+;(function(ns) %7B%0A ns.views.Visualization = ns.views.Base.extend(%7B%0A render: function() %7B%0A var $el = $(this.el);%0A $el.addClass(%22visualization%22);%0A return this;%0A %7D%0A %7D);%0A%7D)(chorus);%0A
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.