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
c80068915e506ecbf89c6a4fbc1cc85c9d239fe5
add tasks
packages/grunt-purgecss/tasks/purgecss.js
packages/grunt-purgecss/tasks/purgecss.js
JavaScript
0.999992
@@ -0,0 +1,1179 @@ +'use strict';%0Avar Purgecss = require('purgecss')%0A%0Amodule.exports = function(grunt) %7B%0A%0A // Please see the Grunt documentation for more information regarding task%0A // creation: http://gruntjs.com/creating-tasks%0A%0A grunt.registerMultiTask('purgecss', 'Grunt plugin for purgecss', fun...
5ac02b2c5bdfe0f7435d062b65f154188fa7bb60
Add Task DueDate unit test
desktop/src/Task/__tests__/DueDate.spec.js
desktop/src/Task/__tests__/DueDate.spec.js
JavaScript
0
@@ -0,0 +1,481 @@ +/* eslint-env mocha, jest */%0A%0Aimport React from 'react';%0Aimport %7B shallow %7D from 'enzyme';%0A%0Aimport DueDate from '../DueDate';%0A%0Ait('should render', () =%3E %7B%0A shallow(%3CDueDate /%3E);%0A%7D);%0Ait('should be a %3Cspan /%3E', () =%3E %7B%0A const dueDate = shallow(%3CDueDate /%...
0fa8c34549cc3d045315133150a5eb2c8d8e147b
Add validators
packages/shared/lib/helpers/validators.js
packages/shared/lib/helpers/validators.js
JavaScript
0.000001
@@ -0,0 +1,1022 @@ +/* eslint-disable no-useless-escape */%0Aexport const REGEX_EMAIL = /((%5B%5E%3C%3E()%5B%5C%5D%5C%5C.,;:%5Cs@%5C%22%5D+(%5C.%5B%5E%3C%3E()%5B%5C%5D%5C%5C.,;:%5Cs@%5C%22%5D+)*)%7C(%5C%22.+%5C%22))@((%5C%5B%5B0-9%5D%7B1,3%7D%5C.%5B0-9%5D%7B1,3%7D%5C.%5B0-9%5D%7B1,3%7D%5C.%5B0-9%5D%7B1,3%7D%5C%5D)%7C((...
7446cd16ac8cdf1fe8d408f02f54e90938cc0e42
add isPalindrome in javascript
math/isPalindrome/isPalindrome.js
math/isPalindrome/isPalindrome.js
JavaScript
0.000011
@@ -0,0 +1,186 @@ +const isPalindrome = (str) =%3E %7B%0A let lowRegStr = str.toLowerCase().replace(/%5B%5CW_%5D/gi, '')%0A const reverseStr = lowRegStr.split('').reverse().join('')%0A return reverseStr === lowRegStr%0A%7D
2d3b791dde0f7eef87f3536b4cd519fc8f96052f
Create markie.js
markie.js
markie.js
JavaScript
0.000001
@@ -0,0 +1,540 @@ +var app = angular.module('markie', %5B%5D);%0A%0Aapp.directive('markdown', function() %7B%0A var converter = new Markdown.Converter();%0A%0A return %7B%0A restrict: 'AE',%0A link: function(scope, element, attrs) %7B%0A%0A if (attrs.markdown) %7B%0A scope....
85f5e2f42e5f3d383ce885b2930ee028d91cf036
add home screen
src/screens/HomeScreen.js
src/screens/HomeScreen.js
JavaScript
0.000001
@@ -0,0 +1,2172 @@ +// =============================================================================%0A// Import%0A// =============================================================================%0A%0A// React%0Aimport React from 'react';%0Aimport PropTypes from 'prop-types';%0A%0A// Components%0Aimport HeaderContainer...
d3997f105fd0a65776aad4ae614966135c17bc72
Support for oxyl.me
src/sites/link/oxyl.me.js
src/sites/link/oxyl.me.js
JavaScript
0
@@ -0,0 +1,698 @@ +$.register(%7B%0A rule: %7B%0A host: /%5Eoxyl%5C.me$/,%0A %7D,%0A ready: function () %7B%0A 'use strict';%0A%0A // If the list contains only one link%0A try %7B%0A var l = $.$$('.links-container.result-form %3E a.result-a');%0A%0A // Convert to JS Object so we can count the n...
557d9c107a4df6de35954b0cab0aad0b91a2dbe8
Add packet format v2.0
lib/packet.js
lib/packet.js
JavaScript
0.000004
@@ -0,0 +1,2019 @@ +%22use strict%22;%0A%0Aclass Battle %7B%0A constructor(opts) %7B%0A this.version = %222.0%22;%0A%0A this.description = opts.description;%0A this.map = opts.map; // %5Bint, int, int%5D : 2-3-1%0A this.timestamp = opts.timestamp; // Seconds since epoch time. Should be same a...
3cf6501b4e36b7d8ed6651f46df1d82f781843ed
add prices function, fixes tests
lib/prices.js
lib/prices.js
JavaScript
0
@@ -0,0 +1,1524 @@ +'use strict'%0A%0Aconst %7Bfetch%7D = require('fetch-ponyfill')(%7BPromise: require('pinkie-promise')%7D)%0Aconst merge = require('lodash.merge')%0Aconst moment = require('moment-timezone')%0A%0Aconst endpoint = 'https://calendar.voyages-sncf.com/cdp/api/public/calendar/v4/outward'%0A%0Aconst defaul...
db5d92f4fa121a05dfd4f60a6fd3839f33dfcdee
Add spec for inbound bridge.
test/inbound_bridge.js
test/inbound_bridge.js
JavaScript
0
@@ -0,0 +1,1822 @@ +var RIPPLE_ADDRESS = '';%0Avar COIN_ADDRESS = '';%0Avar COIN_TRANSACTION_HASH = '';%0A%0Adescribe('Crypto Coin Inbound Bridge', function() %7B%0A describe('a bitcoin bridge with no fee', function() %7B%0A before(function() %7B%0A bridge = new CryptoCoinBridge(%7B%0A rippleAddress: RI...
5240bb9a6f3b5c5fe20ed760782afc5036deb439
add unit test for early exit
test/unitTest/error.js
test/unitTest/error.js
JavaScript
0.000001
@@ -0,0 +1,306 @@ +#!/usr/local/bin/node --harmony%0A%0Avar co = require('co');%0Avar assert = require('assert');%0Avar ugrid = require('../../lib/ugrid-context.js')();%0A%0Aprocess.on(%22exit%22, function () %7Bconsole.assert(ugrid.grid.id !== undefined);%7D);%0A%0Aco(function *() %7B%0A%09yield ugrid.init();%0A%0A%09...
fe43c9089e91b890e93e009cdf6f0dc8391cbed9
Create jquery.timeago.sq.js
locales/jquery.timeago.sq.js
locales/jquery.timeago.sq.js
JavaScript
0.000002
@@ -0,0 +1,687 @@ +(function (factory) %7B%0A if (typeof define === 'function' && define.amd) %7B%0A define(%5B'jquery'%5D, factory);%0A %7D else if (typeof module === 'object' && typeof module.exports === 'object') %7B%0A factory(require('jquery'));%0A %7D else %7B%0A factory(jQuery);%0A %7D%0A%7D(functio...
f978a49c8957d59c44f9fa3109b1c8ffb6c555db
Create csLabelTTFExtTest.js
test/csLabelTTFExtTest.js
test/csLabelTTFExtTest.js
JavaScript
0.000001
@@ -0,0 +1,1310 @@ +var csLabelTTFExtTestLayer = cc.Layer.extend(%7B%0A ctor:function () %7B%0A var winSize;%0A var toast;%0A var label, menuItem, menu, title;%0A this._super();%0A%0A winSize = cc.director.getWinSize();%0A%0A title = cc.LabelTTF.create(%22Cocostyle Label TTF...
9195ff6d1e8c4603a26bb5198f3cd6d29f66d0dd
Create 06-palindrome.js
06-palindrome.js
06-palindrome.js
JavaScript
0.000001
@@ -0,0 +1,479 @@ +// Write a method that takes a string and returns true if it is a%0A// palindrome. A palindrome is a string that is the same whether written%0A// backward or forward. Assume that there are no spaces; only lowercase%0A// letters will be given.%0A//%0A// Difficulty: easy.%0A%0Avar palindrome = function...
8f3d569b5ec65a472c414878781fb72fc9228f10
Add another example
examples/onefishspecfish.js
examples/onefishspecfish.js
JavaScript
0.000022
@@ -0,0 +1,216 @@ +// Example: One Fish Spec Fish. Node.spec implementation%0A// of http://gigasquidsoftware.com/blog/2016/05/29/one-fish-spec-fish/%0A// Blog by Carin Meier%0A%0Aconst _ = require('lodash');%0A%0Aconst s = require('../lib/spec');%0A
e2e07ac92a7f8bd509091b6abbb9b5ae08eaf230
Create chat.js
js/chat.js
js/chat.js
JavaScript
0
@@ -0,0 +1 @@ +%0A
567712b0a78d221b78a19583797bfba89f727697
Add node index file
index.js
index.js
JavaScript
0.000001
@@ -0,0 +1,160 @@ +var ExoSuit = %7B%0A %22Mixins%22: %7B%0A %22ExcludeFromJSONMixin%22: require( './src/models/exclude-from-json/ExcludeFromJson' )%0A %7D%0A%7D;%0A%0Amodule.exports = ExoSuit;%0A
501df19fffff5b1166a515abb85409f177f2beed
index file for JS
index.js
index.js
JavaScript
0.000001
@@ -0,0 +1,778 @@ +var app = require('express')();%0Avar http = require('http').Server(app);%0Avar io = require('socket.io')(http);%0Avar path = require('path');%0A %0A// Initialize appication with route / (that means root of the application)%0Aapp.get('/', function(req, res)%7B%0A var express=require('express');%0A ...
c211cb0299772f297c43f4bb237063adf2ec9dc4
Configure on create account notification util
server/email-notifications/create-account.js
server/email-notifications/create-account.js
JavaScript
0
@@ -0,0 +1,1327 @@ +// Sends account creation notification (as an input it takes data as submitted with form)%0A%0A'use strict';%0A%0Avar ensureCallable = require('es5-ext/object/valid-callable')%0A , compileTpl = require('es6-template-strings/compile')%0A , resolveTpl = require('es6-template-strings/resolve-...
c1c5e30f52f7d28c63e05b6b9eb20335e1bec3f6
fix getVersion
src/basis/devpanel/API/version.js
src/basis/devpanel/API/version.js
module.exports = { getVersion: function(){ sendData('version', { l10n: 1, template: basis.template.DECLARATION_VERSION }) } }
JavaScript
0.000001
@@ -1,8 +1,97 @@ +var transport = resource('transport.js').fetch();%0D%0Avar sendData = transport.sendData;%0D%0A%0D%0A module.e
f4b4b8f878aae922bdd60e8e0467c46c768bfef8
Add tests for userAuthorizationURLProvider option
test/oauth.custom.authorize.url.test.js
test/oauth.custom.authorize.url.test.js
JavaScript
0
@@ -0,0 +1,2140 @@ +var chai = require('chai')%0A , OAuthStrategy = require('../lib/strategy');%0A%0A%0Adescribe('OAuthStrategy', function() %7B%0A%0A describe('that is given no userAuthorizationURLProvider', function() %7B%0A it('should require userAuthorizationURL option', function() %7B%0A var strategyCons...
55f09353e219c5aef0feeae375821016a6781ceb
Comment to explain why we are using withCredentials
assets/js/app/init.js
assets/js/app/init.js
'use strict'; /**@ngInject*/ module.exports = function($http, $rootScope, $log, $location, fixSidebar, AuthService, User, Session, $urlRouter) { $http.defaults.headers.common['Accept'] = 'application/json, text/javascript'; $http.defaults.headers.common['Content-Type'] = 'application/json; charset=utf-8'; $http...
JavaScript
0
@@ -305,16 +305,182 @@ =utf-8'; +%0A%0A // Allows us to have a different host for the API and still have cookies set correctly.%0A // Requires CORS setup on API endpoints, as well as non wildcard values. %0A $http
f72c509cba030fdc036d00cc91a1e074a81a15b4
Add placeholder test.
test/db.js
test/db.js
JavaScript
0
@@ -0,0 +1,449 @@ +var bag = require('bagofholding'),%0A sandbox = require('sandboxed-module'),%0A should = require('should'),%0A checks, mocks,%0A db;%0A%0Adescribe('db', function () %7B%0A%0A function create(checks, mocks) %7B%0A return sandbox.require('../lib/db', %7B%0A requires: %7B%7D,%0A global...
345d90faacde2d1fe6514072e4865264c5ff4e8b
add reset slot action
modules/basic-skills/src/actions/slot_reset.js
modules/basic-skills/src/actions/slot_reset.js
JavaScript
0
@@ -0,0 +1,263 @@ +/**%0A * Reset the slot%0A * @title Reset Slot%0A * @category Slot%0A * @author Botpress, Inc.%0A * @param slotName The name of the slot%0A */%0Aconst resetSlot = async slotName =%3E %7B%0A event.state.session.extractedSlots%5BslotName%5D = undefined%0A%7D%0A%0Areturn resetSlot(args.slotName)%0A
70c4f96b7e0ba9c4f8a822bb37095c829c1f1641
Add checkbox value form field tests
src/ggrc/assets/javascripts/components/auto-save-form/fields/tests/checkbox-value-form-field_spec.js
src/ggrc/assets/javascripts/components/auto-save-form/fields/tests/checkbox-value-form-field_spec.js
JavaScript
0
@@ -0,0 +1,1053 @@ +describe('GGRC.Components.checkboxValueFormField', function () %7B%0A 'use strict';%0A var viewModel;%0A%0A beforeEach(function () %7B%0A viewModel = GGRC.Components%0A .getViewModel('checkboxValueFormField');%0A spyOn(viewModel, 'dispatch');%0A viewModel.attr('fieldId', 'id');%0A ...
596b8e93806a63fee9c2ffb4d11e81af29d68d34
Add example
example3.js
example3.js
JavaScript
0.000003
@@ -0,0 +1,714 @@ +%0Avar tco = require('./index');%0A%0A// normal recursive function:%0A%0Avar neven = function (n) %7B%0A return n == 0 ? true : nodd(n - 1);%0A%7D;%0Avar nodd = function (n) %7B%0A return n == 0 ? false : neven(n - 1);%0A%7D;%0A%0A// tco recursive function:%0A%0Avar teven = tco(function (n) %7B...
3da24560469873a7f0961296f20ef5826b2a904d
Create main.js
src/main.js
src/main.js
JavaScript
0.000002
@@ -0,0 +1,1668 @@ +/* JS%E5%BA%93 */%0Aimport Vue from 'vue'%0Aimport VueRouter from 'vue-router'%0Aimport VueResource from 'vue-resource'%0Aimport Vuex from 'vuex'%0Aimport babelpolyfill from 'babel-polyfill'%0Aimport ElementUI from 'element-ui'%0Aimport NProgress from 'nprogress'%0A%0A/* CSS */%0Aimport 'element-ui/...
a2d0ce603f3cd6380a05fe445e667da996632fed
move gui in a separate class
src/gui.js
src/gui.js
JavaScript
0
@@ -0,0 +1,1179 @@ +import DAT from 'dat-gui';%0A%0A%0A%0Aexport default class Gui extends DAT.GUI%7B%0A constructor()%7B%0A super();%0A this.params = %7B%0A geometry: %22leaf%22,%0A material: %22standard%22,%0A angle: 137.5,%0A angle_b: 137.5,%0A ...
596079cd44f63aff8b72dc8142faf59b9b705bd7
Refactor var names to be consistent
test/unit/angular-meteor-collection.Spec.js
test/unit/angular-meteor-collection.Spec.js
'use strict'; var Mongo, Tracker, Meteor; describe('Given the $meteorCollection service', function() { var $meteorCollection, spySubscribe; beforeEach(function() { // Mocking Collection function Collection(){}; Collection.prototype.find = function(){ return { collection: { ...
JavaScript
0
@@ -125,27 +125,24 @@ ction, s -pyS ubscribe ;%0A%0A bef @@ -133,16 +133,19 @@ ubscribe +Spy ;%0A%0A bef @@ -932,27 +932,24 @@ ;%0A%0A s -pyS ubscribe = jasmi @@ -940,16 +940,19 @@ ubscribe +Spy = jasmi @@ -1015,27 +1015,24 @@ cribe: s -pyS ubscribe %0A %7D;%0A @@ -1023,16 +1023,19 @@ ubscribe +...
ee2ca677b00f9136da218e0e2bca72d2542a5566
Add `isItmsUrl` string test
is-itms-url.js
is-itms-url.js
JavaScript
0.000979
@@ -0,0 +1,105 @@ +function isItmsUrl (url) %7B%0A return url.indexOf('itms-services://') === 0;%0A%7D%0Amodule.exports = isItmsUrl;%0A
a36e0acbd62f8833def7628d9580bac6ba7cb4dc
Create ngon.js
ngon.js
ngon.js
JavaScript
0
@@ -0,0 +1,2715 @@ +// Library for making equilateral polygons in HTML SVG format%0A// Author: Joshua Conn%0A%0A/**%0A * Updates points attribute on HTML Polygon to render an equilateral triangle%0A * @param polygonElmnt and HTML (dom) polygon element to have its points attribute updated%0A * @param radius half of t...
b73a4faa1411c815703af876870722f6af4f7ac8
Use Redux selectors to store minimal possible state
src/store/selectors/index.js
src/store/selectors/index.js
JavaScript
0.000002
@@ -0,0 +1,946 @@ +import %7B createSelector %7D from 'reselect'%0Aimport events from '../../core/events'%0A%0Aconst documentCaptures = state =%3E state.documentCaptures%0Aconst faceCaptures = state =%3E state.faceCaptures%0A%0Aexport const documentCaptured = createSelector(%0A documentCaptures,%0A documents =%3E doc...
793a3d8e78b470064f92af668fe128e609ed217f
Create pjax.js
pjax.js
pjax.js
JavaScript
0.000001
@@ -0,0 +1,1458 @@ +(function (w, d) %7B%0A %22use strict%22;%0A%0A if (!w.history.pushState) %7B%0A return;%0A %7D%0A%0A var pjax, container, tmp,%0A host = w.location.protocol.replace(/:/g, %22%22) + %22://%22 + w.location.hostname,%0A state = %7B%7D;%0A%0A function load(url) %7B%0...
2aa9a6feb2cfde65209d227306dc5ef6316d35d3
Fix bug with Facebook #3
app/templates/api/services/social/SocialFactory.js
app/templates/api/services/social/SocialFactory.js
var Facebook = require('./Facebook'); /** * SocialFactory class * @constructor */ function SocialFactory() { } SocialFactory.prototype = Object.create({ constructor: SocialFactory, /** * Create new social instance based on type * @param {String} type Type of social instance * @param {Object...
JavaScript
0
@@ -890,18 +890,23 @@ ports = -Facebook +SocialFactory ;%0A
2882b6824aa9a2c4d89679c9f3921d6b04664c99
Create items.js
javav2/usecases/creating_photo_analyzer_app/src/main/resources/public/js/items.js
javav2/usecases/creating_photo_analyzer_app/src/main/resources/public/js/items.js
JavaScript
0.000002
@@ -0,0 +1,1151 @@ +$(function() %7B%0A%0A $('#myTable').DataTable( %7B%0A scrollY: %22500px%22,%0A scrollX: true,%0A scrollCollapse: true,%0A paging: true,%0A columnDefs: %5B%0A %7B width: 200, targets: 0 %7D%0A %5D,%0A fixedColumns: ...
a4aa941a978071c877cace8f4bf11140e861a24e
add site.shortcodes testing file
test/test.wpcom.site.shortcodes.js
test/test.wpcom.site.shortcodes.js
JavaScript
0.000002
@@ -0,0 +1,1222 @@ +%0A/**%0A * WPCOM module%0A */%0A%0Avar WPCOM = require('../');%0Avar assert = require('assert');%0A%0A/**%0A * Testing data%0A */%0A%0Avar fixture = require('./fixture');%0A%0A/**%0A * WPCOM instance%0A */%0A%0Adescribe('wpcom.site.shortcodes', function () %7B%0A // Global instances%0A var wpcom ...
6ea3549eca6ef4e642a99b49607b560203d7e783
Refactor errors into separate file
source/error.js
source/error.js
JavaScript
0
@@ -0,0 +1,392 @@ +/**%0A * lazy-linked-lists%0A * Lazy and infinite linked lists for JavaScript.%0A *%0A * source/error.js%0A *%0A * Errors.%0A * @license ISC%0A */%0A%0Aexport class EmptyListError extends Error %7B%0A constructor(message) %7B%0A super(message);%0A this.name = 'EmptyListError';%0A %7D%0A%7D%0A...
1fd52ab49f8e43b188ca2e885197a37fcb90d174
Create lockableContainerUnitTest.js
js/lockableContainerUnitTest.js
js/lockableContainerUnitTest.js
JavaScript
0.000002
@@ -0,0 +1,1621 @@ +function LockableContainerUnitTest(lockableContainer) %7B%0A%0A 'use strict';%0A%0A var IS_RUN_TEST_SUITE_PER_FUNCTION_CALL = false;%0A var IS_RUN_TEST_PER_CODE_CALL = false;%0A%0A function unitTestLock() %7B%0A console.info('LockableContainerUnitTest unitTestLock');%0A con...
f326e6fb8d806ba443c64965a564d64a2f313a19
remove require.context from network_bundle
app/assets/javascripts/network/network_bundle.js
app/assets/javascripts/network/network_bundle.js
/* eslint-disable func-names, space-before-function-paren, prefer-arrow-callback, quotes, no-var, vars-on-top, camelcase, comma-dangle, consistent-return, max-len */ /* global Network */ /* global ShortcutsNetwork */ // require everything else in this directory function requireAll(context) { return context.keys().map(...
JavaScript
0.000006
@@ -215,200 +215,54 @@ */%0A%0A -// require - everything else in this directory%0Afunction requireAll(context) %7B return context.keys().map(context); %7D%0ArequireAll(require.context('.', false, /%5E%5C.%5C/(?!network_bundle).*%5C.(js%7Ces6)$/) +('./branch_graph');%0Arequire('./network' );%0A%0A
2cfec192821d4c30e6fb15b55ad95a2a8807ab1e
Add child_process eg
codes/Session-3/ChildProcess/child-process-1.js
codes/Session-3/ChildProcess/child-process-1.js
JavaScript
0.000006
@@ -0,0 +1,1125 @@ +/***%0A * The goal of this file is to know about the child_process functions;%0A *%0A * How to run this example:%0A * 1. node child-process-1.js%0A * 2. See the message get displayed on prompt.%0A */%0A%0A/**%0A * The child_process module provides the ability to spawn child processes%0A * in manner ...
74dcb56ee494177f78ecf5b368d9d5e0fc4411dc
Add js to resize portfolio grid captions based on max height
js/resize-portfolio-captions.js
js/resize-portfolio-captions.js
JavaScript
0
@@ -0,0 +1,217 @@ +$(document).ready(function()%7B%0A var heights = $(%22.portfolio-caption%22).map(function() %7B%0A return $(this).height();%0A %7D)%0A%0A maxHeight = Math.max.apply(null, heights);%0A%0A $(%22.portfolio-caption%22).height(maxHeight);%0A%7D);%0A
25818010b6df75409caad46f20b1c40370357e4e
remove require.context from profile_bundle
app/assets/javascripts/profile/profile_bundle.js
app/assets/javascripts/profile/profile_bundle.js
// require everything else in this directory function requireAll(context) { return context.keys().map(context); } requireAll(require.context('.', false, /^\.\/(?!profile_bundle).*\.(js|es6)$/));
JavaScript
0.000001
@@ -1,195 +1,44 @@ -// require - everything else in this directory%0Afunction requireAll(context) %7B return context.keys().map(context); %7D%0ArequireAll(require.context('.', false, /%5E%5C.%5C/(?!profile_bundle).*%5C.(js%7Ces6)$/) +('./gl_crop');%0Arequire('./profile' );%0A
9a7130887ff62a5573b3435a46a45f46d872d233
add base queue for handling the pending shouts queue
server/lib/storageApi/BaseQueue.js
server/lib/storageApi/BaseQueue.js
JavaScript
0
@@ -0,0 +1,1027 @@ +/**%0A * @public%0A * @function BaseQueue%0A * @description base class for a queue%0A */%0Aclass BaseQueue %7B%0A%0A /**%0A * @public%0A * @function constructor%0A * @description initializes the basic array%0A */%0A constructor() %7B%0A this._array = %5B%5D;%0A %7D%0A%0A /**...
a26585c796b6175abdde7e25aea5bc3f801049d0
Implement Silent Sisters (#513)
server/game/cards/characters/04/silentsisters.js
server/game/cards/characters/04/silentsisters.js
JavaScript
0
@@ -0,0 +1,356 @@ +const DrawCard = require('../../../drawcard.js');%0A%0Aclass SilentSisters extends DrawCard %7B%0A setupCardAbilities(ability) %7B%0A this.persistentEffect(%7B%0A match: this,%0A effect: ability.effects.dynamicStrength(() =%3E this.controller.deadPile.size())%0A ...
7cbcef9da9f6b60a5c2f4aed57f367994e2d35f4
Add stub for simple-linked-list exercise (#756)
exercises/simple-linked-list/simple-linked-list.js
exercises/simple-linked-list/simple-linked-list.js
JavaScript
0
@@ -0,0 +1,764 @@ +//%0A// This is only a SKELETON file for the 'Simple Linked List' exercise. It's been provided as a%0A// convenience to get you started writing code faster.%0A//%0A%0Aexport class SimpleLinkedList %7B%0A%0A constructor() %7B%0A throw new Error(%22Remove this statement and implement this function%...
f16dc433ee52f523d7cdb2c181e4bf0ef0544cad
Create modal.js
js/modal.js
js/modal.js
JavaScript
0.000001
@@ -0,0 +1,275 @@ +$(document).ready(function() %7B%0A // Fill modal with content from link href%0A $(%22.openModal%22).on(%22click%22, function(e) %7B%0A var link = $(this).data(%22href%22);%0A $('#popup').modal(%22show%22);%0A $('#popup .modal-body').load(link );%0A %7D);...
0c781ce03c557ce8803f15475eca8e62bea7ae1e
add vs code config
jsconfig.js
jsconfig.js
JavaScript
0.000001
@@ -0,0 +1,138 @@ +%7B%0A %22compilerOptions%22: %7B%0A %22target%22: %22ES6%22,%0A %22module%22: %22commonjs%22%0A %7D,%0A %22exclude%22: %5B%0A %22node_modules%22%0A %5D%0A %7D
d1e395298af490d0d8c9f1db481ed032c3b34515
add basic rendering tests for SearchBox
src/SearchBox/__tests__/SearchBox_test.js
src/SearchBox/__tests__/SearchBox_test.js
JavaScript
0.000001
@@ -0,0 +1,1174 @@ +import React from 'react'%0Aimport %7B render %7D from 'enzyme'%0Aimport test from 'tape'%0A%0Aimport SearchBox from '..'%0A%0Atest('SearchBox', t =%3E %7B%0A t.ok(SearchBox, 'export')%0A t.equal(SearchBox.displayName, 'FabricComponent(SearchBox)')%0A%0A t.end()%0A%7D)%0A%0Atest('SearchBox#render...
9f75af91a3c0d68829351e48065e01fae53fa20c
add Tile
src/catan-gen/tile.js
src/catan-gen/tile.js
JavaScript
0.000001
@@ -0,0 +1,662 @@ +import Canvas from %22./canvas%22%0A%0Aconst root3Over2 = 0.866025404%0A%0Aclass Tile %7B%0A constructor() %7B%0A this.color = null%0A %7D%0A%0A draw(x, y, r) %7B%0A const rOver2 = r / 2%0A const rRoot3Over2 = r * root3Over2%0A Canvas.cx.fillStyle = this.color%0A ...
7dadd2c74b92a139e5e5dd934c24c7d9cb0ad8f7
Add show.controller.js
angular/dashboard/users/show/show.controller.js
angular/dashboard/users/show/show.controller.js
JavaScript
0.000001
@@ -0,0 +1,467 @@ +/**%0A * Created by anonymous on 16/12/15 14:38.%0A */%0A%0A(function() %7B%0A 'use strict';%0A%0A angular%0A .module('jwtAuth')%0A .controller('UserShowController', UserShowController);%0A%0A UserShowController.$inject = %5B''%5D;%0A%0A /* @ngInject */%0A function UserSh...
7832634fa1369a18445a28e7a07cf986f50deb65
Create 7kyu_simple_fun_reverse_letter.js
Solutions/7kyu/7kyu_simple_fun_reverse_letter.js
Solutions/7kyu/7kyu_simple_fun_reverse_letter.js
JavaScript
0.999959
@@ -0,0 +1,88 @@ +const reverseLetter = (str) =%3E str.replace(/%5B%5Ea-z%5D/gi, '').split(%22%22).reverse().join(%22%22)%0A
9862957b1d1b29c5a1f19684164e8e207f8e8759
Add migration about song datas.
migrations/1531584159824_modify-song-fields-again.js
migrations/1531584159824_modify-song-fields-again.js
JavaScript
0
@@ -0,0 +1,467 @@ +exports.shorthands = undefined;%0A%0Aexports.up = (pgm) =%3E %7B%0A pgm.addColumns('laundry_songs', %7B%0A japan_only: %7B type: 'boolean', notNull: true, default: false %7D,%0A version: %7B type: 'real', notNull: false %7D,%0A %7D);%0A pgm.dropColumns('laundry_songs', %5B'full_raw_score'%5D...
a81f3a636cde90dd8b3adcf08b522bb100c4e88e
Add lib/body: Stubbed rigid body
lib/body.js
lib/body.js
JavaScript
0.999821
@@ -0,0 +1,390 @@ +/**%0A * Body%0A * @return %7BBody%7D%0A */%0Afunction Body() %7B%0A %0A if( !(this instanceof Body) )%0A return new Body()%0A %0A this.position = null%0A this.rotation = null%0A %0A this.velocity = null%0A this.angularVelocity = null%0A %0A this.force = null%0A this.torque = null%0A %...
b1fbcd97a2d1b2b4227c37034b64d4221b431711
Add hasRole function to user model
lib/main.js
lib/main.js
JavaScript
0.000001
@@ -0,0 +1,222 @@ +import %7B Meteor %7D from 'meteor/meteor';%0A%0A// Add Transform to user's Collection%0AMeteor.users._transform = function(user) %7B%0A user.hasRole = function(role) %7B%0A return this.roles.indexOf(role) %3E= 0;%0A %7D;%0A%0A return user;%0A%7D;%0A
cc305ad05ed1137923d2cea84eb88e6a72053227
add media module
packages/node_modules/@webex/plugin-meetings/src/media/index.js
packages/node_modules/@webex/plugin-meetings/src/media/index.js
JavaScript
0
@@ -0,0 +1,1115 @@ +/*!%0A * Copyright (c) 2015-2018 Cisco Systems, Inc. See LICENSE file.%0A */%0A%0A/**%0A *%0A * Mimic browser APIs as %22the ultimate browser%22.%0A * Handles the quirks of each browser.%0A * Extends and enhances adapter.js, i.e., the %22media%22 file from the web client.%0A * @export%0A * @class Me...
ae685f9cc4b67639283b9a3d8764e553a9bc4562
Create Hud.js
src/core/Hud.js
src/core/Hud.js
JavaScript
0
@@ -0,0 +1 @@ +%0A
6d484ad026917addaeb4559ab380f7386ac92898
Add Dialog.alert feature
addons/web/static/src/js/framework/dialog.js
addons/web/static/src/js/framework/dialog.js
odoo.define('web.Dialog', function (require) { "use strict"; var core = require('web.core'); var Widget = require('web.Widget'); var QWeb = core.qweb; var _t = core._t; /** A useful class to handle dialogs. Attributes: - $footer: A jQuery element targeting a dom part where buttons can be added. It alway...
JavaScript
0
@@ -4464,16 +4464,427 @@ %7D%0A%7D);%0A%0A +// static method to open simple alert dialog%0ADialog.alert = function (owner, message, options) %7B%0A var buttons = %5B%7B%0A text: _t(%22Ok%22),%0A close: true,%0A click: options && options.confirm_callback,%0A %7D%5D;%0A return new Dialog(o...
9a6b09d0472760fb67c6bbf8ad46af4fa617d8cb
add todos actions tests
src/__test__/actions/todos.spec.js
src/__test__/actions/todos.spec.js
JavaScript
0.000001
@@ -0,0 +1,1809 @@ +import expect from 'expect';%0Aimport * as types from '../../constants/actions';%0Aimport * as actions from '../../actions/todos';%0Aimport %7B uuid %7D from '../../utils';%0A%0A%0Adescribe('todo actions', () =%3E %7B%0A // CREATE_TEXT%0A it('createText should create CREATE_TEXT action', () =%3E %...
23416dab4403ef9607affbd301af00de2fb61b7e
Refactor extract store into separate module
src/js/store.js
src/js/store.js
JavaScript
0.000001
@@ -0,0 +1,345 @@ +let currentState = %7B%7D;%0A%0Aexport function getState() %7B%0A return %7B ...currentState %7D;%0A%7D%0A%0Aexport function updateState(branch, patch) %7B%0A if (%22.%22 === branch) %7B%0A currentState = %7B ...currentState, ...patch %7D;%0A %7D else %7B%0A currentState = %7B ...
3195ac85538e64fad72a2f4e487a880431858c0c
Create invites.controller.client.js
public/modules/invites/controllers/invites.controller.client.js
public/modules/invites/controllers/invites.controller.client.js
JavaScript
0.000002
@@ -0,0 +1,1164 @@ +angular.module('inviteApp', %5B'ngAnimate'%5D)%0A .controller('inviteController', %5B'$scope', function($scope) %7B%0A $scope.friends = %5B%7Bname:'Dom',email:'dom@hotmail.com'%7D,%0A %7Bname:'Dan', email:'dan@gmail.com'%7D,%0A %7Bname:'Dalton', email:'dalton@gmail.com'...
0d467ea8e8500b64ebf08b5e274ebc2625360f0a
make guesswork work from the command line and open browsers
guesswork.js
guesswork.js
JavaScript
0
@@ -0,0 +1,1592 @@ +#!/usr/bin/env node%0A%0A//TODO Fix arguments, allow for specifiying browsers in any order%0A//TODO add port option for zwitterion to arguments%0A//TODO allow the entry file to be anywhere in the arguments%0A//TODO Get all browsers to exit when guesswork exits%0A//TODO Make sure logging from browser...
e5e262371d6a1b3a4b3575b708eb9ee925939f0c
Stop leading space after entering Markdown
src/markdown.js
src/markdown.js
/*! Licensed under MIT, https://github.com/sofish/pen */ (function(root) { // only works with Pen if(!root.Pen) return; // markdown covertor obj var covertor = { keymap: { '96': '`', '62': '>', '49': '1', '46': '.', '45': '-', '42': '*', '35': '#'}, stack : [] }; // return valid markdown syntax ...
JavaScript
0.000011
@@ -946,16 +946,17 @@ d%0A if + (code == @@ -973,19 +973,30 @@ var -cmd +markdownSyntax = this. @@ -1021,31 +1021,196 @@ -this.stack.length = 0;%0A +// reset stack%0A this.stack = %5B%5D;%0A%0A var cmd = this.valid(markdownSyntax);%0A if (cmd) %7B%0A // prevents leading space a...
52cfe18e86b4c8283310cc42c2efb8e22f3c8518
Add supported browser versions list
TC/config/browser-versions.js
TC/config/browser-versions.js
JavaScript
0
@@ -0,0 +1,390 @@ +%EF%BB%BFTC.Cfg.acceptedBrowserVersions = %5B%0A %7B%0A %22name%22: %22Chrome%22,%0A %22version%22: 63%0A %7D,%0A %7B%0A %22name%22: %22Firefox%22,%0A %22version%22: 57%0A %7D,%0A %7B%0A %22name%22: %22IE%22,%0A %22version%22: 11%0A %7D,%0A %7B%0A %22name%22: %22Edge%22,%0...
e14cb5d3a5038c21ff1a0aa352a0709e49661c10
Create about.js
about.js
about.js
JavaScript
0
@@ -0,0 +1 @@ +%0A
2dccb0cc23486149a52b4de86680bd2159a11416
Add domain specific setting util
src/lib/util.js
src/lib/util.js
/* @flow */ import { ZalgoPromise } from 'zalgo-promise/src'; import { config } from '../config'; export function isPayPalDomain() : boolean { return Boolean(`${window.location.protocol}//${window.location.host}`.match(config.paypal_domain_regex)) || window.mockDomain === 'mock://www.paypal.com'; } export functi...
JavaScript
0
@@ -1756,24 +1756,297 @@ h), 5));%0A%7D%0A%0A +export function strHashStr(str : string) : string %7B%0A let hash = hashStr(str).toString();%0A let result = '';%0A for (let i = 0; i %3C hash.length; i += 2) %7B%0A result += String.fromCharCode(97 + parseInt(hash.slice(i, i + 2), 10) %25 26);%0A %7D%0...
6e0eb063e45e2f9cffcc7facf39f8c1c489fc0e0
prepare for hosted at discojuice.org
modules/discojuice/www/discojuice/discojuice.hosted.js
modules/discojuice/www/discojuice/discojuice.hosted.js
JavaScript
0
@@ -0,0 +1,1193 @@ +/*%0A * DiscoJuice%0A * Author: Andreas %C3%85kre Solberg, UNINETT, andreas.solberg@uninett.no%0A * Licence undecided.%0A */%0Aif (typeof DiscoJuice == %22undefined%22) var DiscoJuice = %7B%7D;%0A%0ADiscoJuice.Hosted = %7B%0A%09%0A%09%22setup%22: function (target, title, spentityid, responseurl, fee...
91be7d95b161ce746d0d843e794d6c91447a2760
Create Holiday Collection
src/master/holiday.js
src/master/holiday.js
JavaScript
0
@@ -0,0 +1,487 @@ +'use strict';%0A%0Avar BaseModel = require('model-toolkit').BaseModel;%0Avar division = require('./division');%0A%0Amodule.exports = class Holiday extends BaseModel %7B%0A constructor(source, type) %7B%0A super(type %7C%7C 'holiday', '1.0.0');%0A%0A //Define properties%0A this...
176ab1feafccc4b57208e1c9dcbfdd9f284c4511
Call apply after stop callback.
src/sortable.js
src/sortable.js
/* jQuery UI Sortable plugin wrapper @param [ui-sortable] {object} Options to pass to $.fn.sortable() merged onto ui.config */ angular.module('ui.sortable', []) .value('uiSortableConfig',{}) .directive('uiSortable', [ 'uiSortableConfig', function(uiSortableConfig) { return { require: '?...
JavaScript
0
@@ -929,32 +929,224 @@ l%0A %7D; +%0A %0A var apply = function(e, ui) %7B%0A if (ui.item.sortable.resort %7C%7C ui.item.sortable.relocate) %7B%0A scope.$apply();%0A %7D%0A %7D; %0A%0A an @@ -2941,136 +2941,8 @@ );%0A%0A -...
05207a3c2e72f449c8983cea5d3b203cf723dbca
Update index.js
src/observer/index.js
src/observer/index.js
var _ = require('../util') var config = require('../config') var Binding = require('../binding') var arrayMethods = require('./array') var arrayKeys = Object.getOwnPropertyNames(arrayMethods) require('./object') var uid = 0 /** * Type enums */ var ARRAY = 0 var OBJECT = 1 /** * Augment an target Object or Array...
JavaScript
0
@@ -3966,16 +3966,18 @@ binding) +,1 )%0A @@ -5073,16 +5073,17 @@ ports = Observer +%0A
35e65de2733d36fd6b7b135a88744e1e8cadf2cc
Check for Palindromes
CheckForPalindromes.js
CheckForPalindromes.js
JavaScript
0
@@ -0,0 +1,239 @@ +function palindrome(str) %7B%0A // Good luck!%0A%0A str=str.replace(/%5CW/ig,%22%22).toLowerCase();%0A str_reversed=str.split(%22%22).reverse().join(%22%22);%0A %0A if(str_reversed===str)%7B%0A return true;%0A %7D%0A%0A else%7B%0A return false;%0A %7D%0A%7D%0A%0Apalindrome(%22eye%22);
cc815faed9f8d59ef10aa86064e7ccd13fca9f78
add NumberDots
src/catan-gen/number-dots.js
src/catan-gen/number-dots.js
JavaScript
0.002258
@@ -0,0 +1,152 @@ +const NumberDots = %7B%0A 2: 1,%0A 3: 2,%0A 4: 3,%0A 5: 4,%0A 6: 5,%0A 8: 5,%0A 9: 4,%0A 10: 3,%0A 11: 2,%0A 12: 1%0A%7D%0A%0Aexport default NumberDots%0A
d9ea1e0f20a47eff92e8774153f7c860297573af
Add dummy config options for Cloudinary and Mandrill, to make a simple dev environment simplier
keystone.js
keystone.js
// Simulate config options from your production environment by // customising the .env file in your project's root folder. require('dotenv').load(); // Require keystone var keystone = require('keystone'), cons = require('consolidate'), nunjucks = require('nunjucks'); // Initialise Keystone with your project's confi...
JavaScript
0
@@ -884,16 +884,230 @@ C,%7DT',%0A%0A +%09'cloudinary config': process.env.CLOUDINARY_URL %7C%7C 'cloudinary://dummy:dummy@dummy',%0A%0A%09'mandrill api key': process.env.MANDRILL_API_KEY %7C%7C 'dummy',%0A%09'mandrill username': process.env.MANDRILL_USERNAME %7C%7C 'dummy',%0A%0A %09'basedi
20a6d2e5b7d232249b49383ed22737ba44b829ee
Add main source js file
bin/docomo-tts.js
bin/docomo-tts.js
JavaScript
0
@@ -0,0 +1,2017 @@ +#!/usr/bin/env node%0A%0Avar https = require('https');%0Avar fs = require('fs');%0Avar argv = require('argv');%0A%0Aargv.option(%5B%0A %7B%0A%09name: 'apikey',%0A%09short: 'a',%0A%09type: 'string',%0A%09description: '%5BMondatory%5D API KEY provided from docomo Developer support',%0A%09example: %...
10f4afd3f66dd761cb0421fc3f48f252f74c5ca5
create map filter
src/filter/collection/map.js
src/filter/collection/map.js
JavaScript
0.000003
@@ -0,0 +1,567 @@ +/**%0A * @ngdoc filter%0A * @name map%0A * @kind function%0A *%0A * @description%0A * Returns a new collection of the results of each expression execution.%0A */%0A%0Aangular.module('a8m.map', %5B%5D)%0A%0A .filter('map', %5B'$parse', function($parse) %7B%0A return function (collection, expressio...
44563a7319290d56b9cf9ed350a938106f09bf44
Add QuestionSet component
client/src/components/assessments/QuestionSet.js
client/src/components/assessments/QuestionSet.js
JavaScript
0
@@ -0,0 +1,2000 @@ +import PropTypes from %22prop-types%22%0Aimport React from %22react%22%0Aimport Fieldset from %22components/Fieldset%22%0Aimport Model from %22components/Model%22%0Aimport %7B%0A CustomFieldsContainer,%0A ReadonlyCustomFields%0A%7D from %22components/CustomFields%22%0A%0Aconst QuestionSet = (%7B%0...
f8cebf64d2aaa4ed9f1092820b1dae1b258668c9
Create compound-interest.min.js
js/compound-interest.min.js
js/compound-interest.min.js
JavaScript
0.000067
@@ -0,0 +1,854 @@ +$(document).ready(function()%7Bvar a,b,c,d,e;hasKey(%22start%22)&&hasKey(%22rate%22)&&hasKey(%22period%22)&&hasKey(%22invest%22)&&hasKey(%22years%22)?(a=parseFloat(getValueOfFirstKey(%22start%22)),b=parseFloat(getValueOfFirstKey(%22rate%22))/100,c=parseFloat(getValueOfFirstKey(%22period%22)),d=parseF...
950571d124a6655acb2977c982b067e99692ab39
Create directive2.js
js/directives/directive2.js
js/directives/directive2.js
JavaScript
0.000002
@@ -0,0 +1 @@ +%0A
f1383e03bcd7d215d96cb503ffe86483840bffc7
Add auto-install.js
msys2-installer/auto-install.js
msys2-installer/auto-install.js
JavaScript
0
@@ -0,0 +1,3176 @@ +// Run with:%0A// ./msys2-x86_64-$(date +'%25Y%25m%25d').exe --platform minimal --script auto-install.js -v%0A// Currently it gets stuck on the last page.%0A// To see graphically what's happening, remove %22--platform minimal%22%0A%0Afunction Controller()%0A%7B%0A print(%22(print) Hello Installer...
bd85ecda4744fcd02720d36eb4c7fd059b51dd37
Add console-shim for crippled browsers
app/assets/javascripts/vendor/console-shim-min.js
app/assets/javascripts/vendor/console-shim-min.js
JavaScript
0
@@ -0,0 +1,626 @@ +/*%0A console-shim 1.0.0%0A https://github.com/kayahr/console-shim%0A Copyright (C) 2011 Klaus Reimer %3Ck@ailis.de%3E%0A Licensed under the MIT license%0A (See http://www.opensource.org/licenses/mit-license)%0A*/%0A(function()%7Bfunction c(a,b)%7Breturn function()%7Ba.apply(b,arguments)%7D%7Dif(!win...
a78454d1d525be6894348953d5edf6d98fc392ee
add snippet for addkml
lg_earth/add_kml_snippet.js
lg_earth/add_kml_snippet.js
JavaScript
0.000001
@@ -0,0 +1,210 @@ +let addedKMLTopic = new ROSLIB.Topic(%7B%0A ros: ros,%0A name: 'lg_earth/added_kml',%0A messageType: 'lg_common/StringArray'%0A%7D);%0A%0AaddedKMLTopic.subscribe(function(msg)%7B%0A msg.strings // ids of added kmls%0A%7D);
9cc4820146e802edf3a195cb4ea2b1389bb0ff5a
add createLoginHandler
modules/phenyl-core/src/create-login-handler.js
modules/phenyl-core/src/create-login-handler.js
JavaScript
0
@@ -0,0 +1,736 @@ +// @flow%0Aimport type %7B%0A LoginCommand,%0A LoginCommandResult,%0A LoginHandler,%0A ClientPool,%0A Session,%0A UserEntityDefinitions,%0A%7D from 'phenyl-interfaces'%0A%0A/**%0A *%0A */%0Aexport default function createLoginHandler(userEntityDefinitions: UserEntityDefinitions): LoginHandler %7...
78c1a69ff0d74b8f99d65d6c236ef409a0713a7b
test license validation
test/license.js
test/license.js
JavaScript
0.000001
@@ -0,0 +1,767 @@ +var test = require('tap').test%0Avar init = require('../')%0Avar rimraf = require('rimraf')%0Avar common = require('./lib/common')%0A%0Atest('license', function (t) %7B%0A init(__dirname, '', %7B%7D, function (er, data) %7B%0A t.ok(!er, 'should not error')%0A var wanted = %7B%0A name: 'th...
6e558bef658dd8b9e6682cd8f0fd3e5e4fc86335
Add an untested controller for the PKCS7 validator app
lib/control/v1/signature.js
lib/control/v1/signature.js
JavaScript
0
@@ -0,0 +1,2497 @@ +'use strict';%0A%0Aconst CP = require('child_process');%0Aconst Path = require('path');%0A%0Aclass Server %7B%0A constructor(port, path, options) %7B%0A options = options %7C%7C %7B%7D;%0A%0A this.port = Number(port) %7C%7C 9909;%0A this.path = path %7C%7C Path.resolve(__dirname, '../../pk...
9146aacde80543d3304c57b610fdabe7c2b709da
update unit tests
test/unit/colorpickerSpec.js
test/unit/colorpickerSpec.js
'use strict'; describe('colorpicker module', function () { beforeEach(module('colorpicker.module')); describe('helpers', function () { var helper; var element, scope; beforeEach(inject(function (_helper_) { helper = _helper_; })); it('should return object with default hex values', fun...
JavaScript
0
@@ -154,32 +154,8 @@ per; -%0A var element, scope; %0A%0A @@ -755,17 +755,16 @@ on () %7B%0A -%0A va @@ -764,16 +764,41 @@ var +%0A element,%0A mockPlu @@ -816,16 +816,18 @@ + color: %7B @@ -827,16 +827,18 @@ olor: %7B%0A + @@ -881,10 +881,14 @@ -%7D%...
c0636153d745e7452f714d5420444740a01a67af
add variables-objects solution
week-7/variables-objects.js
week-7/variables-objects.js
JavaScript
0.000001
@@ -0,0 +1,1480 @@ + // JavaScript Variables and Objects%0A%0A// I paired %5Bby myself%5D on this challenge.%0A%0A// __________________________________________%0A// Write your code below.%0Avar secretNumber = 7;%0Avar password = %22just open the door%22;%0Avar members = %5B%22John%22, %22Akiko%22, %22Jason%22, %22Mary%...
724097969f9d8305b243a2cf021badc996a1ec62
Create cookies.js
ExampleScripts/agarvaii/js/cookies.js
ExampleScripts/agarvaii/js/cookies.js
JavaScript
0.000005
@@ -0,0 +1,572 @@ +window.addEventListener(%22load%22, function() %7B%0A window.cookieconsent.initialise(%7B%0A %22palette%22: %7B%0A %22popup%22: %7B%0A %22background%22: %22#009688%22,%0A %22text%22: %22#ffffff%22%0A %7D,%0A %22button%22: %7B%0A...
52168864df29a0546ac94cd29a298a60c381465a
complete 7.3
week-7/variables-objects.js
week-7/variables-objects.js
JavaScript
0.999207
@@ -0,0 +1,1473 @@ +// JavaScript Variables and Objects%0A%0A// I worked %5Bby myself%5D on this challenge.%0A%0A// __________________________________________%0A// Write your code below.%0Avar secretNumber = 7%0Avar password = %22just open the door%22%0Avar allowedIn = false%0A%0Avar members = %5B'John','Ben','ben','Ma...
706fbde16e63d7fb946bbcffd2aa44d5ce24f2ab
Test AMD bandages.
t/load/amd.t.js
t/load/amd.t.js
JavaScript
0
@@ -0,0 +1,193 @@ +#!/usr/bin/env node%0A%0Arequire(%22proof%22)(1, function (ok) %7B%0A global.define = function (factory) %7B%0A ok(typeof factory == 'function', 'amd');%0A %7D%0A require('../..');%0A delete global.define;%0A%7D);%0A
e86b04067819d712fa0306a4541251291b55daf9
add export task
tasks/export.js
tasks/export.js
JavaScript
0.000025
@@ -0,0 +1,604 @@ +%0A%0Amodule.exports = function(grunt) %7B%0A%09grunt.registerTask('export', 'export jenscript to directory, usage $ grunt export:/path/to/dir', function(exportDir) %7B%0A%09%09 grunt.log.writeln('jenscript@export'+grunt.config('pkg').version);%0A%09%09 if(exportDir !== undefined)%7B%0A%09%09%09 g...
6334ac2d0215d00b843f41a0ba502061df86cd4d
Test for all available methods
test/ApiSpec.js
test/ApiSpec.js
JavaScript
0
@@ -0,0 +1,710 @@ +var expect = require('chai').expect;%0A%0Avar Api = require('./../src/Api');%0A%0A%0Adescribe('Create new instance for API', function() %7B%0A%09it('should have methods', function()%7B%0A%09%09var api = new Api(%7Bhostname: 'localhost'%7D);%0A%09%09expect(api).to.respondTo('get');%0A%09%09expect(api)...
73cfe02af392fc59925e5c8adeadab727c27bdae
test for finding with an id string
src/test/ed/db/id2.js
src/test/ed/db/id2.js
JavaScript
0.000044
@@ -0,0 +1,308 @@ +db = connect(%22test%22);%0At = db.id2;%0At.drop();%0A%0At.save(%7Bname: %22Jim%22%7D);%0At.save(%7Bname: %22Erica%22%7D);%0At.save(%7Bname: %22Nana%22, age: 102%7D);%0A%0Ae = t.findOne(%7Bname: %22Erica%22%7D);%0Aeid = e._id;%0Aeid_str = eid.toString();%0A%0Ae2 = t.findOne(%7B_id: eid%7D);%0Aassert(...
7d3c48a32f6987d148565b742939b6f05349c89b
Add unit tests for multi-model, needs documentation.
tests/unit/components/em-form-multi-models-test.js
tests/unit/components/em-form-multi-models-test.js
JavaScript
0
@@ -0,0 +1,2179 @@ +import %7B%0A moduleForComponent,%0A test%0A %7D from 'ember-qunit';%0Aimport Ember from 'ember';%0A%0AmoduleForComponent('em-form', 'em-form multi models', %7B%0A // Specify the other units that are required for this test%0A needs: %5B'component:form-group', 'component:form-group-control',%0A ...
d656a52e2a43309cb870e8225f7a0d93771676d1
add id gen util (#101)
src/utils/make-ids.js
src/utils/make-ids.js
JavaScript
0
@@ -0,0 +1,374 @@ +var headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6, h7')%0Avar headingMap = %7B%7D%0A%0A%5B%5D.forEach.call(headings, function(heading) %7B%0A var id = heading.textContent.toLowerCase().split(' ').join('-')%0A headingMap%5Bid%5D = !isNaN(headingMap%5Bid%5D) ? headingMap%5Bid%5D++ : 0%...
c1c504b3b773bb4ca08cc22c110e1ec6bb651593
Add manifest config for sprockets
app/assets/config/manifest.js
app/assets/config/manifest.js
JavaScript
0
@@ -0,0 +1,73 @@ +//= link_tree ../images%0A//= link application.js%0A//= link application.css%0A
be177bf1814416977ab73b388a5796018e73ee9f
Add TransactionTypes constants
src/js/constants/TransactionTypes.js
src/js/constants/TransactionTypes.js
JavaScript
0.000001
@@ -0,0 +1,65 @@ +module.exports = %7B%0A SET: Symbol('SET'),%0A DEL: Symbol('DEL')%0A%7D;%0A
0c0fe673ef0e499591a5f8524021d328c705d7ea
Add theme storage for saving and retrieving the current theme
themeStorage.js
themeStorage.js
JavaScript
0
@@ -0,0 +1,250 @@ +window.ThemeStorage = %7B%0A%0A defaultTheme: 'vibrantink',%0A%0A save: function(themeName) %7B%0A localStorage.setItem('github_theme', themeName);%0A %7D,%0A%0A getCurrent: function() %7B%0A return localStorage.getItem('github_theme') %7C%7C this.defaultTheme;%0A %7D%0A%7D;%0A%0A
7bbcae5a86daeeb1bc382e6fcc73921e13a57119
Fix position of sidebar in Safari
src/site/javascripts/docs.js
src/site/javascripts/docs.js
$(document).ready(function() { // make sidebar sticky when it hits the top of the viewport var $sidebar = $("#sidebar"); $sidebar.affix({ offset: { top: $sidebar.offset().top - 20, bottom: $("footer").outerHeight(true) + 20 } }); $(window).resize(fu...
JavaScript
0
@@ -460,28 +460,23 @@ )%0D%0A $ -(%22# sidebar -%22) .find(%22u @@ -573,14 +573,1592 @@ ar%22 %7D);%0D +%0A%0D%0A // *************** START BUGFIX%0D%0A // Fix position of the sidebar in Safari. See https://github.com/twbs/bootstrap/issues/12126%0D%0A // Safari does not position the sidebar correctly bec...
d2d15546cd7accc910cc27b6534eda440690005d
Create google_analytics_script.js
app/assets/javascripts/google_analytics_script.js
app/assets/javascripts/google_analytics_script.js
JavaScript
0.000049
@@ -0,0 +1,419 @@ +var _gaq = _gaq %7C%7C %5B%5D;%0A _gaq.push(%5B'_setAccount', 'UA-37786666-1'%5D);%0A _gaq.push(%5B'_trackPageview'%5D);%0A%0A(function() %7B%0A var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;%0A ga.src = ('https:' == document.location.protocol ? 'https://...
26badb74d93045eac40a5d554c8663a32e3524b6
Add directive for rendering latex equations.
website/app/application/directives/mathjax-bind.js
website/app/application/directives/mathjax-bind.js
JavaScript
0
@@ -0,0 +1,1053 @@ +Application.Directives.directive(%22mathjaxBind%22, mathjaxBindDirective);%0A%0Afunction mathjaxBindDirective() %7B%0A return %7B%0A restrict: %22A%22,%0A controller: %5B%22$scope%22, %22$element%22, %22$attrs%22,%0A function($scope, $element, $attrs) %7B%0A ...
e0982a95be4b1542a27d71b87f0bdb1f688c8d21
add new file
Algorithms/JS/trees/binaryVerticalOrderTraversal.js
Algorithms/JS/trees/binaryVerticalOrderTraversal.js
JavaScript
0.000006
@@ -0,0 +1,32 @@ +binaryVerticalOrderTraversal.js%0A