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 |
|---|---|---|---|---|---|---|---|
3f53165f6dfcaab39d10937a9117e0ed14a51717 | Add mobile player | connectors/douban.fm.js | connectors/douban.fm.js | 'use strict';
Connector.playerSelector = '.player-wrapper';
Connector.trackArtSelector = '.playing-cover img';
Connector.trackSelector = '.middle>div:nth-child(2)>a';
Connector.artistSelector = '.middle>div:nth-child(3) a';
Connector.playButtonSelector = 'label[title="播放"]';
| JavaScript | 0 | @@ -4,24 +4,237 @@
e strict';%0A%0A
+function setupConnector() %7B%0A%09if (isMobilePlayer()) %7B%0A%09%09setupMobilePlayer();%0A%09%7D else %7B%0A%09%09setupDesktopPlayer();%0A%09%7D%0A%7D%0A%0Afunction isMobilePlayer() %7B%0A%09return $('#appbar').length %3E 0;%0A%7D%0A%0Afunction setupDesktopPlayer() %7B%0A%09
Con... |
8df9f685700d3599498f0f9f33d43983f41b26cc | Add file-loader | lib/common/file-loader.js | lib/common/file-loader.js | JavaScript | 0.000004 | @@ -0,0 +1,3125 @@
+// Copyright 2014, Renasar Technologies Inc.%0A/* jshint node: true, newcap: false */%0A'use strict';%0A%0Avar di = require('di'),%0A glob = require('glob'),%0A path = require('path'),%0A fs = require('fs'),%0A _ = require('lodash');%0A%0Amodule.exports = fileLoaderFactory;%0A%0Adi.annot... | |
001cacd3ddc41e01f230da17562d1c51835f7cb8 | Create new timeslot with ajax call | app/assets/javascripts/new_timeslot.js | app/assets/javascripts/new_timeslot.js | JavaScript | 0.000005 | @@ -0,0 +1,991 @@
+$(document).ready(function()%7B%0A%0A $(%22#new-timeslot-form%22).submit(function(event)%7B%0A event.preventDefault();%0A var data = createDate();%0A $(%22#modal_new_timeslot%22).modal('toggle');%0A $.ajax(%7B%0A type: %22POST%22,%0A url: %22/api/timeslots%22,%0A dat... | |
6776bebd149d3e61965c0ec15844e5351a677d50 | Add test to mapStore. | src/js/stores/__tests__/mapStore-test.js | src/js/stores/__tests__/mapStore-test.js | JavaScript | 0 | @@ -0,0 +1,603 @@
+jest%0A .dontMock('../store')%0A .dontMock('../mapStore')%0A .dontMock('keymirror');%0A%0Adescribe('MapStore', () =%3E %7B%0A let ActionConstants = require('../../constants/constants').ActionConstants;%0A let mapStore, dispatcher, callback;%0A%0A const map = new Object();%0A%0A let actionAddMa... | |
67e9353f7caafd035b07872ce7586f1521976280 | Add image-convert-config.js. | image-convert.config.js | image-convert.config.js | JavaScript | 0 | @@ -0,0 +1,266 @@
+module.exports = %7B%0A patterns: %7B%0A 'img/pages/**/hero-*.png': %7B%0A format: 'jpg',%0A formatParams: %7B%0A quality: 70%0A %7D%0A %7D%0A %7D,%0A reload: function() %7B%0A delete require.cache%5B__filename%5D;%0A this.patterns = require(__filename).patterns;%... | |
d582f6d85510f4a4bd1e4010fc9ea3e8102faed2 | add a script to listen to another mongo and make the same changes to the one on this server | scripts/listen.js | scripts/listen.js | JavaScript | 0 | @@ -0,0 +1,964 @@
+// remote%0Aconst urlsdb = db.getSiblingDB(%22shrunk_urls%22);%0Aconst visitsdb = db.getSiblingDB(%22shrunk_visits%22);%0Aconst c = urlsdb.urls.watch();%0Aconst v = visitsdb.visits.watch();%0A%0A// local%0Aconst local_urlsdb = connect(%22localhost:27017/shrunk_urls%22)%0Aconst local_visitsdb = connec... | |
1d0b3c7cb45be76fe7002a6f428373606e24e192 | Add field component tests on tags. | Resources/public/js/tests/fieldTest.js | Resources/public/js/tests/fieldTest.js | JavaScript | 0 | @@ -0,0 +1,2349 @@
+describe('Test the field component', function() %7B%0A%0A /**%0A * Get the textarea component%0A */%0A function getFieldComponent(field) %7B%0A var editorAdvancedFieldComponent = Vue.extend(editorAdvancedField);%0A%0A var store = new Vuex.Store(%7B%0A state: %7... | |
06f367a467176c058e90028a059e1bd3ba8180c0 | Create pool.js | src/pool.js | src/pool.js | JavaScript | 0.000001 | @@ -0,0 +1,886 @@
+//Pooling Function%0Afunction Pool(size, commandType)%7B%0A this.size = size;%0A%0A this._processes = %5B%5D;%0A this._handlers = %7B%7D;%0A%0A function handler(message)%7B%0A var handlerFunction = this._handlers%5Bmessage.id%5D;%0A if(handlerFunction !== null)%7B%0A handlerFunction(nu... | |
0532ffe5ea4904e782456d87ae6d5f8c71557524 | fix on register tab | src/js/tabs/register.js | src/js/tabs/register.js | var util = require('util');
var Tab = require('../client/tabmanager').Tab;
var RegisterTab = function ()
{
Tab.call(this);
};
util.inherits(RegisterTab, Tab);
RegisterTab.prototype.pageMode = 'single';
RegisterTab.prototype.parent = 'main';
RegisterTab.prototype.generateHtml = function ()
{
return require('../.... | JavaScript | 0 | @@ -701,16 +701,59 @@
'form';
+%0A%0A $scope.registerForm.$setPristine();
%0A %7D%0A%0A
@@ -1258,32 +1258,58 @@
e.mode = 'form';
+%0A $scope.reset();
%0A%0A tm.g
|
c93620fc47b382b5e0aa73fc49b47602bcb1d1d7 | Create beta_symbols_counter.js | Solutions/beta/beta_symbols_counter.js | Solutions/beta/beta_symbols_counter.js | JavaScript | 0.000012 | @@ -0,0 +1,158 @@
+const transform = (s) =%3E %7B%0A const c=%7B%7D; %5B...s%5D.forEach(e=%3Ec%5Be%5D==undefined? c%5Be%5D=1 : c%5Be%5D++)%0A return %5B...new Set(s)%5D.map(e=%3Ec%5Be%5D==1 ? e : e+c%5Be%5D).join('')%0A%7D%0A
| |
c0c85bb69e6b5365bd6ecfe408f5801ed1c3683e | Add makeUnion() for more efficient merged unions | packages/flow-runtime/src/makeUnion.js | packages/flow-runtime/src/makeUnion.js | JavaScript | 0.000007 | @@ -0,0 +1,903 @@
+/* @flow */%0A%0Aimport UnionType from './types/UnionType';%0Aimport type TypeContext from './TypeContext';%0Aimport type Type from './types/Type';%0A%0Aexport default function makeUnion %3CT%3E (context: TypeContext, types: Type%3CT%3E%5B%5D): UnionType%3CT%3E %7B%0A const length = types.length;%0A... | |
c4a1fa9442868027246a567aecc97ffa03e4de98 | Create currentRank.server.model.js | app/models/currentRank.server.model.js | app/models/currentRank.server.model.js | JavaScript | 0 | @@ -0,0 +1,1471 @@
+/* As a programmer, I should be able to store the user's current rank ' +%0A'(professor, associate professor, etc.) and their respective department ' +%0A'(ex Computer and Informational Science and Engineering). ' +%0A'This way, I can grab this information from the database and display it back to th... | |
e7c498be5b36502794b85315fd6c85f26b9abfd5 | Fix samples being cut off | src/client/scripts/Sample.js | src/client/scripts/Sample.js | import $ from 'jquery';
import { Howl } from 'howler';
const playing = [];
export default class Sample {
constructor({ id, file, name, location }) {
this.id = id;
this.file = file;
this.name = name;
this.location = location;
this.boundProgressStep = this.progressStep.bind(this);
this.init... | JavaScript | 0 | @@ -774,16 +774,18 @@
,%0A
+//
html5: t
|
2f6fac9f9349a2ea932472ca1ae5caf14b3b94ac | Fix npm test on Windows (#1647) | packages/react-scripts/scripts/test.js | packages/react-scripts/scripts/test.js | // @remove-on-eject-begin
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same ... | JavaScript | 0.000001 | @@ -1194,22 +1194,16 @@
=%3E path.
-posix.
resolve(
@@ -1215,42 +1215,8 @@
name
-.replace(/%5B%5C%5C%5D+/g, path.posix.sep)
, '.
|
c6b01467f0563a11bf48ce284d1f76807d45b66e | Create SeekAndDestroy.js | JS/BasicAlgoScripting/SeekAndDestroy.js | JS/BasicAlgoScripting/SeekAndDestroy.js | JavaScript | 0.000087 | @@ -0,0 +1,282 @@
+%0Afunction destroyer(arr) %7B%0A // Remove all the values%0A // ECMA Script 5 link: http://es5.github.io/#x15.4.4.10%0A var arr2=Array.prototype.slice.call(arguments,1);%0A return arr.filter (function (val) %7B%0A return arr2.indexOf(val)==-1;%0A %7D);%0A%7D%0A%0Adestroyer(%5B1, 2, 3, 1, 2, ... | |
1dee5ded8b2a503ca6612fbb75527dfc4e487b14 | Add userIndex action to ripple transactions controller. | app/controllers/ripple_transactions.js | app/controllers/ripple_transactions.js | var RippleTransaction = require('../models/ripple_transaction.js');
var errorResponse = require("../../lib/utils.js").errorResponse;
var util = require('util');
module.exports = (function(){
function index(req, res){
RippleTransaction.all().complete(function(err, txns){
res.send({ success: true, rippleTran... | JavaScript | 0 | @@ -61,16 +61,57 @@
n.js');%0A
+var User = require('../models/user.js');%0A
var erro
@@ -167,16 +167,16 @@
sponse;%0A
-
var util
@@ -399,15 +399,17 @@
ion
-forUser
+userIndex
(req
@@ -425,22 +425,12 @@
-GatewayAccount
+User
.fin
@@ -446,16 +446,9 @@
ams.
-accountI
+i
d).c
@@ -473,63 +473,33 @@
rr,
-ac... |
4754963ec9592707b78f8d970b48796d43d9c0a7 | add notFoundError | business_logic/shared/notFoundError.js | business_logic/shared/notFoundError.js | JavaScript | 0.000977 | @@ -0,0 +1,141 @@
+var NotFoundError = function(message) %7B%0A this.message = message;%0A%7D%0A%0ANotFoundError.prototype = new Error();%0A%0Amodule.exports = NotFoundError;%0A
| |
e7f749c6eef38d181ae005dd3436d1c21e675c77 | Create 3_palindrome.js | algo101/3_palindrome.js | algo101/3_palindrome.js | JavaScript | 0.004911 | @@ -0,0 +1,1025 @@
+function palindrome(str) %7B%0A%0A// first i have to pretty the string up.%0A // 3 replace functions and toLowerCase() which is self explanatory.%0A // the first replace() is a little strange. that is a regular %0A // expression i admittedly had to look up from stack overflow.%0A // the second r... | |
821ff82302228712ce5eea057b5437074cd722c1 | Test for mark as fav | test/client/modules/videos/mark_as_favourite_spec.js | test/client/modules/videos/mark_as_favourite_spec.js | JavaScript | 0.001111 | @@ -0,0 +1,1715 @@
+var expect = chai.expect;%0A%0Adescribe('markAsFavouriteService', function () %7B%0A%0A%09// console.log(angular.module('APP'))%0A%09var $httpBackend;%0A%0A%09// var APP;%0A%09var video = %7B%0A%09%09_id: '123'%0A%09%7D%0A%0A%09var apiUrl = '/api/v1/videos/' + video._id + '/mark_favourite';%0A%0A%09... | |
e9ddd751dbca4ab827d2719f0c38c11e58747b18 | add a test case for the service 'Question Set' | tests/unit/services/utils/rgiQuestionSetSrvc.spec.js | tests/unit/services/utils/rgiQuestionSetSrvc.spec.js | JavaScript | 0.999994 | @@ -0,0 +1,2042 @@
+'use strict';%0A%0Adescribe('rgiQuestionSetSrvc', function () %7B%0A var rgiQuestionSetSrvc,%0A rgiHttpResponseProcessorSrvc , rgiQuestionSrvc,%0A spies = %7B%7D, stubs = %7B%7D;%0A%0A beforeEach(module('app'));%0A%0A beforeEach(inject(function(%0A _rgiQuestionSetSrvc_,... | |
02761e056c76c210d6a1960a20a12ddf96656db6 | add utils to match cakephp with jquery validation | app/webroot/js/form2js/js2form.utils.js | app/webroot/js/form2js/js2form.utils.js | JavaScript | 0 | @@ -0,0 +1,2006 @@
+%0Avar object2array = (function()%0A%7B%0A %0A var _subArrayRegexp = /%5E%5C%5B%5Cd+?%5C%5D/,%0A _subObjectRegexp = /%5E%5Ba-zA-Z_%5D%5Ba-zA-Z_0-9%5D+/,%0A _arrayItemRegexp = /%5C%5B%5B0-9%5D+?%5C%5D$/,%0A _lastIndexedArrayRegexp = /(.*)(%5C%5B)(%5B0-9%5D*)(%5C%5D)$/,%0A _arrayOfAr... | |
d5d97cb43385b281d864b963439f854cdb1a19d3 | Use err.name instead of err instanceof | lib/test/key-error.js | lib/test/key-error.js | // test/key-error.js
//
// Testing for key errors
//
// Copyright 2012, StatusNet Inc.
//
// 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... | JavaScript | 0.000156 | @@ -2940,28 +2940,26 @@
r && err
- instanceof
+.name == %22
AlreadyE
@@ -2964,24 +2964,25 @@
yExistsError
+%22
) %7B%0A
@@ -3702,36 +3702,34 @@
(err && err
- instanceof
+.name == %22
NoSuchThingE
@@ -3724,32 +3724,33 @@
NoSuchThingError
+%22
) %7B%0A
@@ -4586,36 +4586,34 @@
(err && err
... |
f4a490fcbe4d751a6ef64c4e5a0ffe4c4919bea4 | Add script for lessee reservation list | assets/js/pages/lessees/reservations.js | assets/js/pages/lessees/reservations.js | JavaScript | 0 | @@ -0,0 +1,297 @@
+$(document).ready(function() %7B%0A%09$('#reservation-table').DataTable(%7B%7D);%0A%7D); %0A%0A$('.btn-cancel').on('click', function() %7B%0A%09if (confirm('Are you sure to cancel this reservation?')) %7B%0A%09%09console.log('cancelled');%0A%09%7D%0A%7D);%0A%0A$('.btn-view').on('click', function() %7... | |
7447d1e9ca05336a4f34bb5a7ec15bfb4b1b112b | Fix directive ng-jqte | src/angular-app/common/js/ng-jqte.js | src/angular-app/common/js/ng-jqte.js |
// see http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController
angular.module('palaso.ui.jqte', [])
// jqte
.directive('puiJqte', ['$parse', function($parse) {
return {
restrict: 'A',
require: '?ngModel', // This causes the controller in the link function to be the ngModelController
link: fun... | JavaScript | 0.000004 | @@ -804,15 +804,110 @@
%09%09%09%09
+//
read();
+ // Leave this commented out, else the view will reset the model when initialized. CP 2013-08
%0A%09%09%09
|
6bdee1ab0ee62e238de68a91b61acbc08456dc8e | Allow OAuth for Heroku via HTTP (resolves #311) | app/js/controllers/LoginController.js | app/js/controllers/LoginController.js | angular.module('juiceShop').controller('LoginController', [
'$scope',
'$window',
'$location',
'$cookies',
'UserService',
function ($scope, $window, $location, $cookies, userService) {
'use strict'
var email = $cookies.get('email')
if (email) {
$scope.user = {}
$scope.user.email = em... | JavaScript | 0 | @@ -1473,53 +1473,221 @@
http
-s://juice-shop-staging.herokuapp.com': 'https
+://juice-shop.herokuapp.com': 'http://juice-shop.herokuapp.com',%0A 'https://juice-shop-staging.herokuapp.com': 'https://juice-shop-staging.herokuapp.com',%0A 'http://juice-shop-staging.herokuapp.com': 'http
://j
|
e2af2fbb5844d392db8a195a32092fd5a0b498f9 | DRY out some code | app/scripts/models/mobileapp_model.js | app/scripts/models/mobileapp_model.js | /* JBoss, Home of Professional Open Source
* Copyright Red Hat, Inc., and individual contributors
*
* 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
... | JavaScript | 0.999055 | @@ -2168,39 +2168,8 @@
ork.
- The formmating looks off here
%0A
@@ -2236,24 +2236,33 @@
d%0A %7D)
+%0A
.then( funct
@@ -2940,16 +2940,25 @@
%7D)
+%0A
.then( n
@@ -3485,545 +3485,220 @@
-// TODO: DRY this out%0A var androidVariants = Ember.ArrayProxy.create(%7B content... |
2c38e584a7fa35631a66a4f2330a8af3a53ee9ed | write first test for period_types | src/server/__tests__/periodTypes-test.js | src/server/__tests__/periodTypes-test.js | JavaScript | 0 | @@ -0,0 +1,2329 @@
+jest.dontMock('chakram');%0A%0Aimport chakram from 'chakram';%0Aconst expect = chakram.expect;%0A%0Aconst API_URI_PERIOD_TYPES = %22http://localhost:8080/api/period-types%22;%0A%0Aconst RESULT_ID = 'pty_id';%0Aconst RESULT_NAME = 'pty_name';%0A%0Adescribe(%22ttrack API period-types%22, function() %7... | |
33b7b330687c4daa4e04ffe1e4d0e23b942673c6 | Create container for SignUpForm component | client/components/SignUp/SignUpPage.js | client/components/SignUp/SignUpPage.js | JavaScript | 0 | @@ -0,0 +1,2263 @@
+import React, %7B Component %7D from 'react';%0Aimport logo from '../../public/images/logo.png';%0Aimport PageFooter from '../PageFooter';%0Aimport SignUpForm from './SignUpForm';%0Aimport %7B connect %7D from 'react-redux';%0A%0A%0A%0Aclass SignUpPage extends Component %7B%0A constructor(props) ... | |
43c6108b564f6f350a178aabae93a6c128f854a2 | Remove logs | core/src/plugins/gui.ajax/res/js/ui/reactjs/jsx/ReactUI/TemplateBuilder.js | core/src/plugins/gui.ajax/res/js/ui/reactjs/jsx/ReactUI/TemplateBuilder.js | import AsyncComponent from './AsyncComponent'
export default React.createClass({
propTypes: {
pydio: React.PropTypes.instanceOf(Pydio),
containerId:React.PropTypes.string
},
render: function(){
console.log('Rendering now');
let pydio = this.props.pydio;
let conta... | JavaScript | 0.000001 | @@ -223,47 +223,8 @@
)%7B%0A%0A
- console.log('Rendering now');%0A%0A
@@ -1085,80 +1085,8 @@
o;%0A%0A
- console.log('AsyncProps', namespace, componentName, props);%0A
@@ -1302,45 +1302,8 @@
);
-%0A console.log(components);
%0A%0A
|
970c3cfc7d95582d83c587dd7de264d1225935af | add settings/labs acceptance test | core/client/tests/acceptance/settings/labs-test.js | core/client/tests/acceptance/settings/labs-test.js | JavaScript | 0 | @@ -0,0 +1,2923 @@
+/* jshint expr:true */%0Aimport %7B%0A describe,%0A it,%0A beforeEach,%0A afterEach%0A%7D from 'mocha';%0Aimport %7B expect %7D from 'chai';%0Aimport startApp from '../../helpers/start-app';%0Aimport destroyApp from '../../helpers/destroy-app';%0Aimport %7B invalidateSession, authenticat... | |
61bd74face23b9672b651ed658589f1998ce0322 | Add test for `/api/1.0/posts/list` | test/server/api/1.0/posts/list.js | test/server/api/1.0/posts/list.js | JavaScript | 0 | @@ -0,0 +1,517 @@
+import * as postsList from %22../../../../../server/api/1.0/posts/list%22;%0A%0Adescribe(%22server%22, function () %7B%0A describe(%22api%22, function () %7B%0A describe(%221.0%22, function () %7B%0A describe(%22posts%22, function () %7B%0A describe(%22list%22, function () %7B%0A ... | |
ff203cf2a6bd36e288c95dc88336bc4763ffe6c2 | fix missing detections in DetectLang | share/spice/detect_lang/spice.js | share/spice/detect_lang/spice.js | langs = {
'af': 'Afrikaans',
'ar': 'Arabic',
'be': 'Belarusian',
'bg': 'Bulgarian',
'ca': 'Catalan',
'chr': 'Cherokee',
'cs': 'Czech',
'cy': 'Welsh',
'da': 'Danish',
'de': 'German',
'dv': 'Dhivehi',
'el': 'Greek',
'en': 'English',
'es': 'Spanish',
'et': 'Estonian',
'fa': 'Persian',
'fi': 'Finnish',
'f... | JavaScript | 0.000244 | @@ -1287,16 +1287,53 @@
tions;%0A%0A
+%09if (detects.length == 0)%0A%09%09return;%0A%0A
%09items%5B0
@@ -1658,25 +1658,24 @@
* 100);%0A
-%0A
%09%09
-text +
+lang
= langs%5B
@@ -1694,16 +1694,32 @@
anguage%5D
+;%0A%09%09text += lang
+ ' ('
|
9ec1f13171ce77363269b0f4e5614129f767af71 | Add middleware | src/middleware/index.js | src/middleware/index.js | JavaScript | 0 | @@ -0,0 +1,874 @@
+/*%0A* The index of the middleware script is the first file that gets executed when a directory is passed in to require()%0A* This script defines extra behaviors for the router to enable like requiring a user to be logged in or out%0A*/%0A%0A// This middleware function makes sure the instance of acco... | |
5bbdccc054b7f39afbae6bfdf1dec2f744f2e93c | add a js file for common events | meteor/app/client/menu.js | meteor/app/client/menu.js | JavaScript | 0 | @@ -0,0 +1,1064 @@
+/*%0AThis Source Code Form is subject to the terms of the Mozilla Public%0ALicense, v. 2.0. If a copy of the MPL was not distributed with this%0Afile, You can obtain one at http://mozilla.org/MPL/2.0/.%0ACopyright (c) 2014 Mozilla Corporation%0A*/%0A%0Aif (Meteor.isClient) %7B%0A //events that co... | |
8873b21569ea562177f4ba214908f2c423e5ac28 | add encodeURIComponent (#2660) | modules/admixerBidAdapter.js | modules/admixerBidAdapter.js | import * as utils from 'src/utils';
import {registerBidder} from 'src/adapters/bidderFactory';
const BIDDER_CODE = 'admixer';
const ENDPOINT_URL = '//inv-nets.admixer.net/prebid.1.0.aspx';
export const spec = {
code: BIDDER_CODE,
aliases: [],
supportedMediaTypes: ['banner', 'video'],
/**
* Determines whethe... | JavaScript | 0 | @@ -891,16 +891,35 @@
ferrer:
+encodeURIComponent(
utils.ge
@@ -933,16 +933,17 @@
dowUrl()
+)
,%0A %7D;
|
2c8ac01884ed8a1abf30dd927083619a54661a14 | Add tasks/spec/jade.spec.js | tasks/spec/jade.spec.js | tasks/spec/jade.spec.js | JavaScript | 0.000003 | @@ -0,0 +1,177 @@
+var jade = require('../jade.coffee');%0A%0Adescribe('Jade', function()%0A%7B%0A 'use strict';%0A%0A it('not null', function()%0A %7B%0A expect(jade).not.toBe(null);%0A %7D);%0A %0A%7D);
| |
1e7390448d7cd39522d122205e917f61438e7ba4 | Complete 'Reject a promise' challenge in 'Promise it won't hurt' tutorial | promise-it-wont-hurt/reject-a-promise.js | promise-it-wont-hurt/reject-a-promise.js | JavaScript | 0.000084 | @@ -0,0 +1,183 @@
+var q = require('q');%0Avar deferred = q.defer();%0Adeferred.promise.then(null, function(err) %7B%0A console.log(err.message);%0A%7D);%0A%0AsetTimeout(deferred.reject, 300, new Error(%22REJECTED!%22));%0A
| |
54c16ee296d7e0225a8c30c1ac4586a22aab1164 | Add "resource" blueprint test | node-tests/blueprints/resource-test.js | node-tests/blueprints/resource-test.js | JavaScript | 0.000003 | @@ -0,0 +1,1820 @@
+var setupTestHooks = require('ember-cli-blueprint-test-helpers/lib/helpers/setup');%0Avar BlueprintHelpers = require('ember-cli-blueprint-test-helpers/lib/helpers/blueprint-helper');%0Avar generateAndDestroy = BlueprintHelpers.generateAndDestroy;%0A%0Adescribe('Acceptance: ember generate and d... | |
211f324058ab6f9a66c8ea5fc0ecc39fd7b96e91 | fix style of filter links | examples/todomvc/components/Footer.js | examples/todomvc/components/Footer.js | import React, { PropTypes, Component } from 'react';
import classnames from 'classnames';
import { SHOW_ALL, SHOW_COMPLETED, SHOW_ACTIVE } from '../constants/TodoFilters';
const FILTER_TITLES = {
[SHOW_ALL]: 'All',
[SHOW_ACTIVE]: 'Active',
[SHOW_COMPLETED]: 'Completed'
};
class Footer extends Component {
rend... | JavaScript | 0 | @@ -814,12 +814,15 @@
r: '
-hand
+pointer
' %7D%7D
|
5699b57ba6b41b992b00f43f305947d05addcf37 | Create mint-hide-categories.user.js | mint-hide-categories.user.js | mint-hide-categories.user.js | JavaScript | 0.000029 | @@ -0,0 +1,466 @@
+// ==UserScript==%0A// @name Hide Mint Categories%0A// @namespace https://blog.jverkamp.com/%0A// @version 0.1%0A// @description Hide all top level categories from Mint except Misc%0A// @author JP Verkamp%0A// @match https://mint.intuit.com/*%0A// @grant none%0A//... | |
212b6c1d2c594258ebc36ed1640a3c115dc188b8 | support Meteor 0.8.3 -> replace HTML.toHTML(template.render()) with Blaze.toHTML(template) | modules/ngMeteor-template.js | modules/ngMeteor-template.js | var ngMeteorTemplate = angular.module('ngMeteor.template', []);
ngMeteorTemplate.run(['$templateCache',
function($templateCache) {
angular.forEach(Template, function(template, name){
if(name.charAt(0) != "_"){
var templateString = HTML.toHTML(template.render());
$templateCache.put(name, templateString);
... | JavaScript | 0.000001 | @@ -207,16 +207,39 @@
) != %22_%22
+ && name != %22prototype%22
)%7B%0A%09%09%09%09v
@@ -258,20 +258,21 @@
tring =
-HTML
+Blaze
.toHTML(
@@ -283,17 +283,8 @@
late
-.render()
);%0A%09
|
0a679577a8b7146dc3a12b713322a3b8637411dc | Add PrivateRoute for protecting routes | client/app/components/auth/PrivateRoute.js | client/app/components/auth/PrivateRoute.js | JavaScript | 0 | @@ -0,0 +1,664 @@
+import React from 'react';%0Aimport %7B connect %7D from 'react-redux';%0Aimport %7B Route, Redirect %7D from 'react-router-dom';%0A%0A/* eslint-disable react/prop-types */%0Aconst PrivateRoute = (%7B component: Component, authenticated, ...rest %7D) =%3E (%0A %3CRoute%0A %7B...rest%7D%0A rend... | |
db7595880ce548cb004fea3dda7de86900b420f1 | fix example | example.js | example.js | var validator = require('./')
var validate = validator({
type: 'object',
properties: {
hello: {
required: true,
type: 'string'
}
}
})
console.log('should be valid', validate({hello: 'world'}))
console.log('should not be valid', validate({}))
// get the last error message by checking validat... | JavaScript | 0.0001 | @@ -400,16 +400,18 @@
rror
- was %22'+
+s were:',
vali
@@ -424,10 +424,7 @@
rror
-+'%22'
+s
)%0A
|
73e91746eff433d72efe9c716ffb105cf48e0204 | use correct value for plasmid name | src/components/Stocks/Plasmids/Catalog/PlasmidCatalogAppBarSearch.js | src/components/Stocks/Plasmids/Catalog/PlasmidCatalogAppBarSearch.js | // @flow
import React from "react"
import gql from "graphql-tag"
import { makeStyles } from "@material-ui/core/styles"
import Grid from "@material-ui/core/Grid"
import Paper from "@material-ui/core/Paper"
import InputBase from "@material-ui/core/InputBase"
import IconButton from "@material-ui/core/IconButton"
import Fo... | JavaScript | 0.00004 | @@ -3022,16 +3022,24 @@
value=%22
+plasmid_
name%22%3ENa
|
489e8405db2554dfe363e2423e12025a6a86e193 | add tests for mysql.format() function | test/unit/test-Mysql.js | test/unit/test-Mysql.js | JavaScript | 0.000006 | @@ -0,0 +1,635 @@
+var assert = require('assert');%0Avar common = require('../common');%0Avar path = require('path');%0Avar test = require('utest');%0Avar Mysql = require(path.resolve(common.lib, '../index'));%0A%0Atest('Mysql.format', %7B%0A 'format SQL with identifiers and values': function() %7B%0A assert.e... | |
214e424789f433a4906d9e13b8c0f17d8377f505 | Remove `window.React` global variable | src/app.js | src/app.js | /*
* React.js Starter Kit
* Copyright (c) 2014 Konstantin Tarkus (@koistya), KriaSoft LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
'use strict';
require('6to5/polyfill');
var React = require('react');
var emptyFunction... | JavaScript | 0.000001 | @@ -547,115 +547,8 @@
);%0A%0A
-// Export React so the dev tools can find it%0A(window !== window.top ? window.top : window).React = React;%0A%0A
var
|
798497b0c164f70a974d8c2c3cba9b223a9aea76 | Add gulpfile | Gulpfile.js | Gulpfile.js | JavaScript | 0.000002 | @@ -0,0 +1,96 @@
+var gulp = require('gulp');%0A%0Agulp.task('default', function() %7B%0A%09console.log('Hello world!');%0A%7D);
| |
55359728e52105bb964ff9ccaf786432bc2e68a3 | add snowboard http subcommand | packages/snowboard/src/commands/http.js | packages/snowboard/src/commands/http.js | JavaScript | 0 | @@ -0,0 +1,1392 @@
+import %7B Command, flags %7D from %22@oclif/command%22;%0Aimport %7B httpBundle %7D from %22snowboard-bundler%22;%0Aimport %7B parseBinding %7D from %22../helper%22;%0A%0Aclass HttpCommand extends Command %7B%0A static args = %5B%7B name: %22input%22, required: true %7D%5D;%0A%0A async run() %7B%... | |
57ddcc8b50244d2eb4ce600db99b6b8e90aa3da7 | add Provider resource | lib/resource/Provider.js | lib/resource/Provider.js | JavaScript | 0 | @@ -0,0 +1,239 @@
+'use strict';%0Avar utils = require('../utils');%0Avar InstanceResource = require('./InstanceResource');%0A%0Afunction Provider() %7B%0A Provider.super_.apply(this, arguments);%0A%7D%0Autils.inherits(Provider, InstanceResource);%0A%0Amodule.exports = Provider;
| |
39c4f4b94d30bee6d744123df39f37bf934c2ae7 | add sticky footer to curriculum | js/curriculum-page.js | js/curriculum-page.js | 'use strict';
$(function () {
var $curriculumLogoutButton = $('#curriculumLogoutButton');
var $taipei1016Eng = $('.taipei1016-eng');
var $taipei2016Cn = $('.taipei2016-cn');
var $taipei2016ChineseCurriculum = $('#taipei2016-chinese-curriculum');
var $taipei2016EnglishCurriculum = $('#taipei2016-english-curriculum... | JavaScript | 0 | @@ -1364,31 +1364,205 @@
%09%09%09%09
-%7D%0A %09%09%09%7D);%0A %09%09%7D);%0A %09%7D);%0A
+%09homepageStickyFooter();%0A %09%09%09%09// setTimeout(homepageStickyFooter, 420);%0A %09%09%09%09%7D%0A %09%09%09%7D);%0A %09%09%7D);%0A %09%7D);%0A %09$('a').click(function() %7B%0A %09%09stickyFooter();%0A %09%7D)%0A %09h... |
eba6aa1767c4624a9bfddfd9a92c9d58367ae520 | fix .version | lib/express.js | lib/express.js | /**
* Module dependencies.
*/
var connect = require('connect')
, proto = require('./application')
, Route = require('./router/route')
, Router = require('./router')
, req = require('./request')
, res = require('./response')
, utils = connect.utils;
/**
* Expose `createApplication()`.
*/
exports = mod... | JavaScript | 0.000003 | @@ -401,17 +401,17 @@
= '3.0.
-0
+1
';%0A%0A/**%0A
|
8592ba79572dedd82c3eff399c1fd233a700efcd | Add docker Reducer | plugins/services/src/js/reducers/serviceForm/Docker.js | plugins/services/src/js/reducers/serviceForm/Docker.js | JavaScript | 0.000001 | @@ -0,0 +1,324 @@
+import %7BcombineReducers, simpleReducer%7D from '../../../../../../src/js/utils/ReducerUtil';%0A%0Amodule.exports = combineReducers(%7B%0A privileged: simpleReducer('container.docker.privileged', null),%0A forcePullImage: simpleReducer('container.docker.forcePullImage', null),%0A image: simpleRed... | |
2e4c6857101ecd7a4a8708c628bb93886ede2b83 | add new file | Algorithms/JS/trees/sumRootToLeafNumbers.js | Algorithms/JS/trees/sumRootToLeafNumbers.js | JavaScript | 0.000006 | @@ -0,0 +1,24 @@
+sumRootToLeafNumbers.js%0A
| |
4958702ba3cc7c9206d1c5c0a730691010f503b9 | Add fields filtering to customer | models/customer.js | models/customer.js | /**
* Module Dependencies
*/
var db = require("../data-sources/db");
var config = require("./customer.json");
var loop... | JavaScript | 0 | @@ -793,17 +793,16 @@
o(db);%0A%0A
-%0A
// TODO
@@ -865,21 +865,22 @@
mer.
-after
+before
Remote('
**',
@@ -875,18 +875,20 @@
Remote('
-**
+find
', funct
@@ -917,117 +917,186 @@
%7B%0A
-if(Array.isArray(inst)) %7B%0A inst.forEach(removePassword);%0A %7D else if(inst) %7B%0A removePassword(inst);%0A %... |
c043ca4b069b8e50bc892fdb3c113232c6ddeb8a | Add command to get the hash of the git commit that is currently being run | modules/version.js | modules/version.js | JavaScript | 0 | @@ -0,0 +1,396 @@
+var exec = require('child_process').exec;%0A%0Avar hash;%0A%0Amodule.exports.init = function(b) %7B%0A%09exec('git rev-parse HEAD', function(error, stdout, stderr) %7B%0A%09%09if(error != null) %7B%0A%09%09%09hash = null;%0A%09%09%09console.err(%22git's broken yo%22);%0A%09%09%7D%0A%09%09hash = stdou... | |
6c4287133af6f37337e77aecf88ecd1872aae9d5 | Add Challenge 7.2 file | week-7/eloquent.js | week-7/eloquent.js | JavaScript | 0 | @@ -0,0 +1,1074 @@
+// Eloquent JavaScript%0A%0A// Run this file in your terminal using %60node my_solution.js%60. Make sure it works before moving on!%0A%0A// Program Structure%0A// Write your own variable and do something to it.%0Avar fun = 10 + 2 - 3;%0A%0Aprompt(%22What is your favourite food?%22);%0Aalert(%22Hey! ... | |
0b58f9495129964e72bc5c34dc697334e2039b75 | Remove debug statement | nbextensions/nbgrader.js | nbextensions/nbgrader.js | /*global define*/
/**
* To load this extension, add the following to your custom.js:
*
* IPython.load_extensions('nbgrader');
*
**/
define([
'require',
'jquery',
'base/js/namespace',
'notebook/js/celltoolbar',
], function (require, $, IPython, celltoolbar) {
"use strict";
var CellToolbar ... | JavaScript | 0.000021 | @@ -4455,35 +4455,8 @@
');%0A
- console.log(link);%0A
|
9e0f135ed419ad32ba414988186637f246c65b60 | fix fakefetcher | lib/jet/peer/fetch.js | lib/jet/peer/fetch.js | var jetUtils = require('../utils');
var fetchCommon = require('../fetch-common');
var Elements = require('../element').Elements;
var Bluebird = require('bluebird');
var isDef = jetUtils.isDefined;
var fetchId = 1;
var createFetchDispatcher = function (params, f, ref) {
if (isDef(params.sort)) {
if (params.sort.asA... | JavaScript | 0.000019 | @@ -2698,32 +2698,56 @@
%0A%0A%09%09this.fetch =
+ function () %7B%0A%09%09%09return
new Bluebird(fu
@@ -2773,16 +2773,17 @@
ject) %7B%0A
+%09
%09%09%09jsonr
@@ -2810,16 +2810,17 @@
%7B%7D)%0A%09%09%09%09
+%09
.then(fu
@@ -2840,24 +2840,25 @@
SimpleId) %7B%0A
+%09
%09%09%09%09%09jsonrpc
@@ -2918,16 +2918,17 @@... |
b7ef13995f33f028994596e8158f6a0f8abde372 | Add touch command. | lib/wash/exe/touch.js | lib/wash/exe/touch.js | JavaScript | 0 | @@ -0,0 +1,1939 @@
+// Copyright 2014 Google Inc. All rights reserved.%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/licenses/LICENSE-2.0... | |
bf8e163558e88261e82323a15a4f42e4c6f4717f | Add preview how we're going to organize as ES6 module | design/es6.js | design/es6.js | JavaScript | 0 | @@ -0,0 +1,418 @@
+// note we can also import/export in CS2%0A%0A// fragment.js%0A%0Afunction replace() %7B%0A%7D%0A%0Afunction extract() %7B%0A%7D%0A%0Afunction three() %7B%0A%7D%0A%0Aexport default %7B one, two %7D%0A%0A%0A%0A// unpoly.js%0A%0Aimport fragment from './fragment'%0Aimport modal from './modal'%0Aimport ... | |
afa36060899da8e20281bf52b71f7f1d1b3345a9 | Add manifest to test app | test/dummy/app/assets/config/manifest.js | test/dummy/app/assets/config/manifest.js | JavaScript | 0 | @@ -0,0 +1,101 @@
+//= link_tree ../images%0A//= link_directory ../javascripts .js%0A//= link_directory ../stylesheets .css%0A
| |
0d330c66e27e493fe21e331eb9e69f544c4d4fec | Add factor out columns and create getColumns function | src/pages/dataTableUtilities/columns.js | src/pages/dataTableUtilities/columns.js | JavaScript | 0.000001 | @@ -0,0 +1,1210 @@
+/**%0A * mSupply Mobile%0A * Sustainable Solutions (NZ) Ltd. 2016%0A */%0A%0Aimport %7B tableStrings %7D from '../../localization';%0A%0Aconst customerInvoice = %5B'itemCode', 'itemName', 'availableQuantity', 'totalQuantity', 'remove'%5D;%0A%0Aconst PAGE_COLUMNS = %7B%0A customerInvoice,%0A%7D;%0A%... | |
3d8d44a355f342c25907057e1925b1f13d7c2644 | Add Schema for Polls. | models/poll.js | models/poll.js | JavaScript | 0 | @@ -0,0 +1,424 @@
+var mongoose = require('mongoose');%0Avar Schema = mongoose.Schema;%0A%0Avar PollSchema = new Schema(%7B%0A owner : %7B%0A type : Schema.Types.ObjectId, ref: 'User',%0A required : true%0A %7D,%0A created : %7B%0A type : Date,%0A default : Date.now%0A %7D,%0A subject : %7B... | |
068d70eeb9f7ca1634786ebbeb0f28f67bc19687 | Add action auth | src/actions/auth/index.js | src/actions/auth/index.js | JavaScript | 0.000005 | @@ -0,0 +1,1046 @@
+import firebase from 'firebase';%0Aimport %7B%0A EMAIL_CHANGED,%0A PASSWORD_CHANGED,%0A LOGIN_USER_SUCCESS,%0A LOGIN_USER_FAIL,%0A LOGIN_USER%0A%7D from './types';%0A%0Aexport const emailChanged = (text) =%3E %7B%0A return %7B%0A type: EMAIL_CHANGED,%0A payload: text%0A %7D;%0A%7D;%0A%0... | |
333b001dd7cfe509a19543f7e8cfc1d7f49c49ea | Add post detail component | client/src/components/post/PostDetail.js | client/src/components/post/PostDetail.js | JavaScript | 0 | @@ -0,0 +1,1849 @@
+import _ from 'lodash';%0Aimport React, %7B Component %7D from 'react';%0Aimport %7B connect %7D from 'react-redux';%0Aimport %7B Link %7D from 'react-router-dom';%0A%0Aimport %7B fetchCommentForPost %7D from '../../actions/CommentActions';%0Aimport %7B fetchAllPosts, deletePost %7D from '../../acti... | |
9417f4d551f06398cdf3645704aa06bca69d1285 | add tests for canOpenUrl | source/views/components/__tests__/open-url.test.js | source/views/components/__tests__/open-url.test.js | JavaScript | 0 | @@ -0,0 +1,795 @@
+/* eslint-env jest */%0A%0Aimport %7BcanOpenUrl%7D from '../open-url'%0A%0Adescribe('canOpenUrl', () =%3E %7B%0A test('opens http:// links', () =%3E %7B%0A expect(canOpenUrl('http://google.com')).toBe(true)%0A %7D)%0A test('opens https:// links', () =%3E %7B%0A expect(canOpenUr... | |
3d7b04b28b48e8975586ab62928aee109fcaf12a | Build v0.0.1 | dist/hx-ui.js | dist/hx-ui.js | JavaScript | 0.000011 | @@ -0,0 +1,2506 @@
+/**%0A * @ngdoc module%0A * @name hxDragDrop.%0A *%0A * Author: ivazquez@hexacta.com%0A *%0A * @description%0A *%0A */%0Aangular.module('hx-ui', %5B%5D);%0A/**%0A * @ngdoc directive%0A * @name HX-Draggable.%0A *%0A * Author: ivazquez@hexacta.com%0A *%0A * @description%0A *%0A */%0Aangular.module('hx... | |
c09ed9a353b654290f5f1a0b927dd553530c8a37 | Create piegress.jquery.js | piegress.jquery.js | piegress.jquery.js | JavaScript | 0.000001 | @@ -0,0 +1,2466 @@
+// Piegress jQuery Plugin%0A// version 1.0.0%0A// by Caffeina - http://caffeina.co%0A%0A(function($) %7B%0A%0A $.Piegress = function(element, options) %7B%0A%0A var defaults = %7B%0A color: '#000',%0A size: '50',%0A speed: 8,%0A value: 0%0A ... | |
82a5df5c978bd7658883e663bf8f22866a535fcf | add diggest component | src/components/diggest.js | src/components/diggest.js | JavaScript | 0 | @@ -0,0 +1,527 @@
+import Scope from './scope';%0Aimport Injector from './injector';%0A%0Afunction safe(scope, fn) %7B%0A var phase = scope.$root.$$phase;%0A if(phase == '$apply' %7C%7C phase == '$digest') %7B%0A if(angular.isFunction(fn)) %7B%0A fn();%0A %7D%0A %7D else %7B%0A scope.$apply(fn);%0A %7... | |
7982a703b0bfa2090bd37af6db79c53f998c556f | clean up people who've deleted themselves | migrations/clean_up_memberships.js | migrations/clean_up_memberships.js | JavaScript | 0 | @@ -0,0 +1,859 @@
+if (typeof(_) === 'undefined')%0A throw new Error('precede this with node_modules/underscore/underscore.js');%0A%0A// grab all members%0Avar members = db.teams.find(%7B%7D, %7BpeopleIds: 1%7D);%0Amembers = members.map(function(t) %7B return t.peopleIds; %7D);%0Amembers = _.flatten(members);%0Amember... | |
f5e8ae0209c5c8c376b7ee7a445b36ccf4b60cd5 | add objectsDemo | objectsDemo.js | objectsDemo.js | JavaScript | 0.000001 | @@ -0,0 +1,85 @@
+//Objects demo%0A%0A//villain damage health%0A%0A//inheritance skeleton zombie%0A%0A//prototypal%0A
| |
5b098767bc3af38696f4b0483f6f4bce5f30fdf9 | Add WindowsGraphUsersRetriever tests | test/server/windows-graph-users-retriever.tests.js | test/server/windows-graph-users-retriever.tests.js | JavaScript | 0 | @@ -0,0 +1,1374 @@
+/* eslint-disable no-magic-numbers */%0A%0Aimport test from 'ava';%0Aimport winston from 'winston';%0Aconst proxyquire = require('proxyquire').noCallThru();%0A%0Atest.before(() =%3E %7B%0A winston.level = 'error';%0A%7D);%0A%0Atest('getUsers should return expected single page of results', t =%3E %7... | |
284d7e26d1e2d00fdaac7d1caa68787daabaf17d | Initialize list of supported languages from directories in the locale folder. | red/i18n.js | red/i18n.js | /**
* Copyright 2015 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 | @@ -724,16 +724,43 @@
%22en-US%22;
+%0Avar supportedLangs = null;
%0A%0Avar re
@@ -1271,24 +1271,358 @@
%0A %7D);%0A%7D%0A%0A
+var initSupportedLangs = function() %7B%0A return when.promise(function(resolve,reject) %7B%0A fs.readdir(resourceMap.editor.basedir, function(err,files) %7B%0A if(er... |
508ee20af1a1d963042ca7cc0bbf632012b4702a | Add validator | addon/validators/local/strong-password.js | addon/validators/local/strong-password.js | JavaScript | 0.000005 | @@ -0,0 +1,1109 @@
+import Base from 'ember-validations/validators/base';%0A%0Aexport default Base.extend( %7B%0A%0A call: function()%7B%0A var password = this.model.get( this.property );%0A var passwordLength = 8;%0A var allowBadPassword = this.model.get( 'allowBadPassword' );%0A%0A if( ... | |
7b66230134e8bbe5eec0c9cf5056615db766e212 | Create fact.user.js | other/fact.user.js | other/fact.user.js | JavaScript | 0.000004 | @@ -0,0 +1,2049 @@
+// ==UserScript==%0A// @name Fact Provider%0A// @description provides daily facts%0A// @namespace a@nus.avi%0A// @include http://mods.factorio.com/*%0A// @include https://mods.factorio.com/*%0A// @version 1.0%0A// @grant GM_xmlhttpRequest%0A// ==/UserScript==%0A%0A// %3Cif... | |
b99b615effcba1a5d083a661a81fa438535a539b | Update mediamessage.js | client/assets/src/views/mediamessage.js | client/assets/src/views/mediamessage.js | _kiwi.view.MediaMessage = Backbone.View.extend({
events: {
'click .media_close': 'close'
},
initialize: function () {
// Get the URL from the data
this.url = this.$el.data('url');
},
// Close the media content and remove it from display
close: function () {
var ... | JavaScript | 0 | @@ -4369,24 +4369,25 @@
0%22 src=%22http
+s
://www.youtu
|
d5a64c555075d28f62c39b3b0ed3caf3f538029e | Return early if no `ctx` can be obtained | src/components/common/Checkboard.js | src/components/common/Checkboard.js | 'use strict'; /* @flow */
import React from 'react';
import ReactCSS from 'reactcss';
let _checkboardCache = {};
function renderCheckboard(c1: string, c2: string, size: number): any {
if (typeof document == 'undefined') return null; // Dont Render On Server
var canvas: any = document.createElement('canvas');
c... | JavaScript | 0.000011 | @@ -390,16 +390,86 @@
('2d');%0A
+ if (!ctx) return null; // If no context can be found, return early.%0A
ctx.fi
|
092ec15a01786696fa85b02545555d352a0731a5 | Create resource-router.js | resource-router.js | resource-router.js | JavaScript | 0.000004 | @@ -0,0 +1,683 @@
+var Router = require('express').Router;%0A%0Avar keyed = %5B'get', 'put', 'patch', 'delete', 'del'%5D;%0A%0Amodule.exports = function ResourceRouter(route) %7B%0A%09var router = Router(),%0A%09%09key, url;%0A%0A%09%5B%5D.concat(route.middleware %7C%7C %5B%5D).forEach(router.use.bind(router));%0A%0A%0... | |
0e790bc4c0462d24211d83747faa7fe2a4e7fb7d | De-duplicate ember templats | Gruntfile.js | Gruntfile.js | module.exports = function (grunt) {
'use strict';
var path = require('path');
var templatesDir = "./src/templates/";
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-less');... | JavaScript | 0.999998 | @@ -1070,68 +1070,8 @@
.js'
-,%0A './build/src/ember-table-templates.js'
%0A
|
69071847ce857d7d5a2de2f62b95a9485b996d20 | Add DateTime function: 1st function: Generate current date and time | sashimi-webapp/src/database/generated-data/DateTime.js | sashimi-webapp/src/database/generated-data/DateTime.js | JavaScript | 0.999991 | @@ -0,0 +1,771 @@
+import StringManipulator from '../StringManipulation';%0A%0Aconst date = new Date();%0A%0Aconst stringManipulator = new StringManipulator();%0A%0Aexport default function dateTime() %7B%0A this.getCurrentDateTime = function getCurrentDateTime() %7B%0A const year = date.getFullYear();%0A const m... | |
f21c5ee0be0f81a082c8f35f44b887287bdc155b | Implement Ser Gregor's Marauders (#459) | server/game/cards/characters/05/sergregorsmarauders.js | server/game/cards/characters/05/sergregorsmarauders.js | JavaScript | 0 | @@ -0,0 +1,575 @@
+const DrawCard = require('../../../drawcard.js');%0A%0Aclass SerGregorsMarauders extends DrawCard %7B%0A setupCardAbilities() %7B%0A this.reaction(%7B%0A when: %7B%0A onPillage: (event, challenge, card, discarded) =%3E card === this && discarded.getType() === 'even... | |
0ab7abba316649f69bf3a83641eb976635382360 | Create the listings model | models/listings_model.js | models/listings_model.js | JavaScript | 0.000001 | @@ -0,0 +1,600 @@
+import mongoose, %7B Schema %7D from 'mongoose';%0A%0Aconst listingSchema = new Schema(%7B%0A title: %7B type: String, required: true %7D,%0A description: %7B type: String, required: true %7D,%0A condition: %7B type: String, enum: %5B'new', 'used'%5D, required: true %7D,%0A price: %7B typ... | |
b92adbee8bb1bcc53ddb1b6d6a34b76623b84214 | remove debugger | app/components/lb-addtl-info/component.js | app/components/lb-addtl-info/component.js | import Ember from 'ember';
import {
parseTarget
}
from 'ui/utils/parse-target';
export default Ember.Component.extend({
service: null,
serviceContainers: null,
listenersArray: null,
targetsArray: null,
defaultCert: null,
secondaryCerts: null,
tagName: '',
willInsertElement: function() {
this.se... | JavaScript | 0.000133 | @@ -1280,22 +1280,8 @@
%5B%5D;%0A
- debugger;%0A
|
29587f84e8efbeb1c06bb9be1e898dd3b093b86a | Add tests to isNumber() | src/objects/isNumber/tests/specs.js | src/objects/isNumber/tests/specs.js | JavaScript | 0.000008 | @@ -0,0 +1,525 @@
+/*global isNumber*/%0A%0A(function () %7B%0A 'use strict';%0A%0A describe('objects/isNumber', function () %7B%0A it('isNumber(404) should return true', function () %7B%0A expect(isNumber(404)).toEqual(true);%0A %7D);%0A%0A it('isNumber(new Date().getTime()) shoul... | |
0761e6576ca95e3f63780b011f35d0be2d3fea51 | Simplify DashboardController slightly. | app/assets/javascripts/controllers/dashboard_controller.js | app/assets/javascripts/controllers/dashboard_controller.js | HB.DashboardController = Ember.ArrayController.extend({
currentTab: "dashboard",
highlightDasboard: function() { return this.get('currentTab') == "dashboard" }.property('currentTab'),
highlightPosts: function() { return this.get('currentTab') == "posts" }.property('currentTab'),
highlightMedia: function() { r... | JavaScript | 0 | @@ -49,17 +49,16 @@
xtend(%7B%0A
-%0A
curren
@@ -398,16 +398,194 @@
s: %5B%5D,%0A%0A
+ postsOnly: Em.computed.filter('content', function(item)%7B%0A return item.get('type') === %22comment%22;%0A %7D),%0A mediaOnly: Em.computed.filterBy('content', 'type', %22media_story%22),%0A%0A
arrang
@@ -832,223 +832,8... |
781d5cb88a6aec5148640ca6eee9d968558c4e1a | add correct file paths to jasmine test | Gruntfile.js | Gruntfile.js | 'use strict';
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-simple-mocha');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-jscs');
// initialize Grunt
grunt.initConfig({
// create jshint task
jshint: {
dev: {
// tell jshint what check
src: ['... | JavaScript | 0.000001 | @@ -1401,64 +1401,56 @@
: %5B'
-tests/karma_tests/*test.js', 'app/js/*.js', 'app/js/*.js
+%3C%25= jshint.dev.src %25%3E', '%3C%25= jshint.mocha.src %25%3E
'%5D,%0A
|
07056d43971a2e43445af381d00c6dd233be4e39 | add warning if push plugin not installed | cordova/www/js/index.js | cordova/www/js/index.js | /* JBoss, Home of Professional Open Source
* Copyright Red Hat, Inc., and individual contributors
*
* 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/LICENS... | JavaScript | 0.000001 | @@ -1705,16 +1705,58 @@
%7D;%0A
+ if (typeof push != 'undefined') %7B%0A
pu
@@ -1829,16 +1829,93 @@
Config);
+%0A %7D else %7B%0A app.addMessage('Push plugin not installed!');%0A %7D
%0A%0A
|
d009cd66885dec14cca4bffd7ff9e9c143e909bc | Remove publish-meteor from release task | Gruntfile.js | Gruntfile.js | module.exports = function (grunt) {
var embedOption = grunt.option('embedLocales'),
embedLocaleDest = embedOption ?
'min/moment-with-customlocales.js' :
'min/moment-with-locales.js',
embedLocaleSrc = 'locale/*.js';
if (embedOption && embedOption.match(/,/)) {
emb... | JavaScript | 0.000003 | @@ -8355,30 +8355,30 @@
erTask('
+meteor-
publish
--meteor
', %5B'exe
@@ -8623,34 +8623,8 @@
ain'
-,%0A 'publish-meteor'
%0A
|
958314dd77ba33bab8098a5f37d58e8c0a2247fb | Create IBMWatsonUpdated.js | IBMWatsonUpdated.js | IBMWatsonUpdated.js | JavaScript | 0.000001 | @@ -0,0 +1,2619 @@
+// require xhr%0Aconst XHR = require('xhr');%0A%0A// require state%0Aconst db = require('kvstore');%0Aconst qs = require('codec/query_string');%0A%0Aexport default (request) =%3E %7B%0A %0A // api credentials%0A const apiUsername = 'IBM_API_Username';%0A const apiPW = 'IBM_API_Password';... | |
3a500be9a6d949e0fa60be92c74552c0afad05d8 | Update and rename chat-plugins to chat-plugins/coldfront.js | chat-plugins/coldfront.js | chat-plugins/coldfront.js | JavaScript | 0 | @@ -0,0 +1,1283 @@
+/**%0A* Frost ___ Plugin%0A* Informational commands%0A* by: panpawn%0A*/%0A%0Aexports.commands = %7B%0A%0A%09coldfront: 'frostmag',%0A%09frostmag: function (target, room, user, connection) %7B%0A%09%09if (room.id !== 'coldfront') return false;%0A%09%09if (!this.canTalk()) return;%0A%09%09if (!this.c... | |
01324eb6ed248d82829350d335d321464e8a1dd8 | Add filter plugin for dataTables | assets/js/dataTables.filter.perlModule.js | assets/js/dataTables.filter.perlModule.js | JavaScript | 0 | @@ -0,0 +1,636 @@
+/**%0A * This filtering plugin will allow matching of module names in either%0A * form of 'Foo::Bar', or 'Foo-Bar'.%0A *%0A * Based on dataTables.filter.phoneNumber.js%0A *%0A * @summary Make Perl module names searchable%0A * @name Perl module%0A * @author Zak B. Elep%0A *%0A * @example%0A * $(docu... | |
033b61c4a6a7b1af63c1f0c37bd897a10a3b431b | add SprkBox stories for React | react/src/objects/box/SprkBox.stories.js | react/src/objects/box/SprkBox.stories.js | JavaScript | 0 | @@ -0,0 +1,574 @@
+import React from 'react';%0Aimport SprkBox from './SprkBox';%0Aimport %7B markdownDocumentationLinkBuilder %7D from '../../../../storybook-utilities/markdownDocumentationLinkBuilder';%0A%0Aexport default %7B%0A title: 'Components/Box',%0A component: SprkBox,%0A decorators: %5B%0A story =%3E %3... | |
dd6f6cac357361939d79499533f294c5e1562c1c | Create ie10-viewport-bug-workaround.js | assets/js/ie10-viewport-bug-workaround.js | assets/js/ie10-viewport-bug-workaround.js | JavaScript | 0 | @@ -0,0 +1,641 @@
+/*!%0A * IE10 viewport hack for Surface/desktop Windows 8 bug%0A * Copyright 2014-2015 Twitter, Inc.%0A * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)%0A */%0A%0A// See the Getting Started docs for more information:%0A// http://getbootstrap.com/getting-started/#support-i... | |
d7bb7f5007dcbb820f0db679810137a7413a2559 | Set up Sweet Alert link to resume | app/assets/javascripts/resume.js | app/assets/javascripts/resume.js | JavaScript | 0 | @@ -0,0 +1,305 @@
+$(document).ready(function()%7B%0A%0A $('nav').children().eq(3).on('click', function(event)%7B%0A event.preventDefault;%0A swal(%7B%0A title: %22%3Ca style='color:#575c7a' href='https://www.dropbox.com/s/c8095pa2vma5z3v/Resume%25202016%2520PDF.pdf?dl=0'%3EClick Here To View Resume%3C/a%3E... | |
cb474e6747f3de6357f5d23c32b9c3c68d1ad32e | Create escapeHTML.js | escapeHTML.js | escapeHTML.js | JavaScript | 0.000005 | @@ -0,0 +1,181 @@
+function escapeHTML(myString)%7B%0A var pre = document.createElement('pre');%0A var text = document.createTextNode(myString);%0A pre.appendChild(text);%0A return pre.innerHTML;%0A%7D%0A
| |
34f8c456d14a9bc8572c7ce21981b3c012c509e6 | Remove sloppy copy/paste error line | test/specs/linters/property_ordering.js | test/specs/linters/property_ordering.js | 'use strict';
var expect = require('chai').expect;
var spec = require('../util.js').setup();
describe('lesshint', function () {
describe('#propertyOrdering()', function () {
it('should have the proper node types', function () {
var source = '.foo {}';
return spec.parse(source, fun... | JavaScript | 0.000001 | @@ -2713,61 +2713,8 @@
';%0A%0A
- source += '.foo %7B margin-bottom: 0; %7D';%0A%0A
|
312ac32a254639070a61d2284bebb21c9f06aca6 | Add help command | commands/help_commands.js | commands/help_commands.js | JavaScript | 0.000049 | @@ -0,0 +1,869 @@
+%0Amodule.exports = %7B%0A help: (message, config) =%3E %7B%0A const p = config.prefix;%0A message.channel.send(%0A%60%5C%60%5C%60%5C%60diff%0A++ MUSIC COMMANDS ++%0A$%7Bp%7Dplay URL - Plays a song at a YouTube URL.%0A$%7Bp%7Dstop - Interrupts the current song.%0A$%7Bp%7Dqueue ... | |
33e24ee6c85bdeab68cb8b46ab9783b241d94dbe | Create rest-comms.js | rest-comms.js | rest-comms.js | JavaScript | 0 | @@ -0,0 +1,1575 @@
+//Retrieve pending deposits and withdrawals from REST api%0A//uses code from https://www.npmjs.org/package/node-rest-client%0A//Bunch of unused stuff kept for future reference%0A%0A//This module retrieves deposits and withdrawals on request *after* listener.js sees a relevant transaction.%0A//An eve... | |
3aa3b565a659dcef196e24a51b90eedce712db3c | index page viewmodel added | public/js/index.js | public/js/index.js | JavaScript | 0 | @@ -0,0 +1,585 @@
+function IndexPageViewModel(elementSelector)%7B%0A var element = $(elementSelector);%0A this.init(element);%0A%7D%0A%0AIndexPageViewModel.prototype.init = function(element)%7B%0A this.initNumbers(element);%0A%7D%0A%0AIndexPageViewModel.prototype.initNumbers = function(element)%7B%0A eleme... | |
8fc5f419460926efb1a7d59d0c8249bf422c9180 | Add end-to-end tests for autocomplete | test/client/autocomplete.clienttest.js | test/client/autocomplete.clienttest.js | JavaScript | 0.000004 | @@ -0,0 +1,1960 @@
+module.exports = %7B%0A 'Should autocomplete words on home page': function (browser) %7B%0A browser%0A .url('http://localhost:8000/')%0A .waitForElementVisible('body', 1000)%0A .setValue('input%5Btype=search%5D.searchbox__search.tt-input', 'babb')%0A // Wait for the suggestio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.