commit stringlengths 40 40 | old_file stringlengths 4 150 | new_file stringlengths 4 150 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 501 | message stringlengths 15 4.06k | lang stringclasses 4
values | license stringclasses 13
values | repos stringlengths 5 91.5k | diff stringlengths 0 4.35k |
|---|---|---|---|---|---|---|---|---|---|---|
02b3bb70674d192b864f1c15f542af125a1655ef | public/js/main.js | public/js/main.js | $(document).ready(function () {
$(".carousel-inner-download").cycle({
fx:'scrollVert',
pager: '.pager',
timeout: 4000,
speed: 500,
// pause: 1,
});
$(".c1-right").on("click", function(e) {
var activeImage = $(".c1-image-shown");
var nextImage = activeImage.next();
if(nextImage... | $(document).ready(function () {
$(".carousel-inner-download").cycle({
fx:'scrollVert',
pager: '.pager',
timeout: 4000,
speed: 1000,
// pause: 1,
});
$(".c1-right").on("click", function(e) {
var activeImage = $(".c1-image-shown");
var nextImage = activeImage.next();
if(nextImag... | Add slow down carousel speed | Add slow down carousel speed
| JavaScript | mit | ZachKGordon/project_week_one,ZachKGordon/project_week_one | ---
+++
@@ -4,7 +4,7 @@
fx:'scrollVert',
pager: '.pager',
timeout: 4000,
- speed: 500,
+ speed: 1000,
// pause: 1,
});
|
031a0774e1995ca132120617131b5582bdf67b07 | lib/handlers/documents/index.js | lib/handlers/documents/index.js | "use strict";
var restify = require('restify');
var async = require('async');
var Anyfetch = require('anyfetch');
module.exports.get = function get(req, res, next) {
if(!req.query.context) {
return next(new restify.ConflictError("Missing query parameter"));
}
async.waterfall([
function getDocuments(cb)... | "use strict";
var restify = require('restify');
var async = require('async');
var Anyfetch = require('anyfetch');
module.exports.get = function get(req, res, next) {
if(!req.query.context) {
return next(new restify.ConflictError("Missing query parameter"));
}
async.waterfall([
function getDocuments(cb)... | Handle null case for client id | Handle null case for client id
| JavaScript | mit | AnyFetch/companion-server | ---
+++
@@ -32,7 +32,7 @@
return {
documentId: document.id,
typeId: document.document_type.id,
- providerId: document.provider.client ? document.provider.client.id : null,
+ providerId: document.provider.client ? document.provider.client.id : "",
date: docum... |
7001a99ac6e7341b900472cb72eb92385765bf6d | contactmps/static/javascript/embed.js | contactmps/static/javascript/embed.js | if (document.location.hostname == "localhost") {
var baseurl = "";
} else {
var baseurl = "https://noconfidencevote.openup.org.za";
}
var initContactMPsPymParent = function() {
var pymParent = new pym.Parent('contactmps-embed-parent', baseurl + '/campaign/newsmedia/', {});
};
var agent = navigator.userAgent... | if (document.location.hostname == "localhost") {
var baseurl = "";
} else {
var baseurl = "https://noconfidencevote.openup.org.za";
}
var initContactMPsPymParent = function() {
var pymParent = new pym.Parent('contactmps-embed-parent', baseurl + '/campaign/newsmedia/', {});
};
var agent = navigator.userAgent... | Fix background - abs url for injected code | Fix background - abs url for injected code
| JavaScript | mit | OpenUpSA/contact-mps,OpenUpSA/contact-mps,OpenUpSA/contact-mps,OpenUpSA/contact-mps | ---
+++
@@ -17,7 +17,7 @@
});
});
// Don't initialise pymParent! we iframe it ourselves!
- document.write('<div id="contactmps-embed-parent" style="height: 2500px; background: url(\'/static/images/background.svg\'); background-repeat: no-repeat"><iframe src="' + baseurl + '/campaign/newsmedia/" width="100... |
740fe7c68a3dc0c66621ac83b04df579d7e0b180 | pages/about.js | pages/about.js | /**
* React Static Boilerplate
* https://github.com/koistya/react-static-boilerplate
* Copyright (c) Konstantin Tarkus (@koistya) | MIT license
*/
import React, { Component } from 'react';
export default class extends Component {
render() {
return (
<div>
<h1>About Us</h1>
<p>We are a... | /**
* React Static Boilerplate
* https://github.com/koistya/react-static-boilerplate
* Copyright (c) Konstantin Tarkus (@koistya) | MIT license
*/
import React, { Component } from 'react';
export default class extends Component {
render() {
return (
<div>
<h1>About Us</h1>
<p>We are a... | Revert "Added revert test line" | Revert "Added revert test line"
This reverts commit 493c18f25d20e16f044d7ec489f836f72151e3bb.
| JavaScript | mit | Princeton-SSI/organization-website | ---
+++
@@ -13,7 +13,7 @@
<div>
<h1>About Us</h1>
<p>We are a team of undergraduate students dedicated to using software to address sustainability challenges.</p>
- <p>We are a project-focused organization. We also hold programming workshops and guest lectures. Revert sample</p>
+ ... |
dd0fc15d814acf458ce1e2e53859552c8ebe19da | server/routers/cars-router.js | server/routers/cars-router.js | var express = require('express'),
router = express.Router(),
carsData = require('../data/data-cars'),
carsController = require('../controllers/cars-controller')(carsData),
passport = require('passport');
// TODO: Add more routes.
router
.get('/:id', carsController.getCarById)
.post('/delete', p... | var express = require('express'),
router = express.Router(),
carsData = require('../data/data-cars'),
carsController = require('../controllers/cars-controller')(carsData),
passport = require('passport');
// TODO: Add more routes.
router
.get('/all', carsController.getAllCars)
.get('/:id', carsC... | Add routing for getting cars and buying car. | Add routing for getting cars and buying car.
| JavaScript | mit | TA-2016-NodeJs-Team2/Telerik-Racer,TA-2016-NodeJs-Team2/Telerik-Racer | ---
+++
@@ -6,11 +6,13 @@
// TODO: Add more routes.
router
+ .get('/all', carsController.getAllCars)
.get('/:id', carsController.getCarById)
+ .post('/:id/buy', carsController.buyCar)
.post('/delete', passport.authenticate('bearer', {
session: false
}), carsController.removeCar);
... |
217dac82baeb840fc9f6c0e65962cd1b817b7f10 | client/templates/bets/create.js | client/templates/bets/create.js | var createBetNotification = function(bet){
var bet = Bets.findOne({ _id: bet });
BetNotifications.insert({
toNotify: bet.bettors[1],
betBy: bet.bettors[0],
bet: bet._id
});
}
Template.createBetForm.events({
"submit .create-bet" : function(event){
event.preventDefault();
var title = even... | var createBetNotification = function(bet){
var bet = Bets.findOne({ _id: bet });
BetNotifications.insert({
toNotify: bet.bettors[1],
betBy: bet.bettors[0],
bet: bet._id
});
}
Template.createBetForm.events({
"submit .create-bet" : function(event){
event.preventDefault();
var title = event.... | Fix spacing in multiline variables | Fix spacing in multiline variables
| JavaScript | mit | nmmascia/webet,nmmascia/webet | ---
+++
@@ -10,12 +10,12 @@
Template.createBetForm.events({
"submit .create-bet" : function(event){
+ event.preventDefault();
- event.preventDefault();
- var title = event.target.betTitle.value;
- wager = event.target.betWager.value;
- user = Meteor.user()
- username = user.use... |
94468916921501961db178a80f93439f686bf830 | config.js | config.js | module.exports = {
auth : {
github: {
appId: 'edfc013fd01cf9d52a31',
appSecret: 'a9ebb79267b7d968f10e9004724a9d9ac817a8ee',
callbackURL : 'http://akrasia.ujo.guru:7173/auth/github/callback',
username : "Zeukkari"
},
local : {
subnets : [ "192.168.1.0/24", "127.0.0.1/32" ]
... | var process = require('process');
module.exports = {
auth : {
local : {
subnets : [ "192.168.1.0/24", "127.0.0.1/32" ]
},
github : {
/*
* FIXME: Authentication mechanism is improperly implemented.
*
* - Username checkup seems a little strange
* - appSecret should remain secr... | Read app secret from environment | Read app secret from environment
| JavaScript | apache-2.0 | Zeukkari/node-telldusserver,Zeukkari/node-telldusserver | ---
+++
@@ -1,13 +1,21 @@
+var process = require('process');
+
module.exports = {
auth : {
- github: {
- appId: 'edfc013fd01cf9d52a31',
- appSecret: 'a9ebb79267b7d968f10e9004724a9d9ac817a8ee',
- callbackURL : 'http://akrasia.ujo.guru:7173/auth/github/callback',
- username : "Zeukkari"
- ... |
eeb4f53559cecab3c01b3d62c69eaf1a599c3f0e | config/models.js | config/models.js | /**
* Default model configuration
* (sails.config.models)
*
* Unless you override them, the following properties will be included
* in each of your models.
*
* For more info on Sails models, see:
* http://sailsjs.org/#!/documentation/concepts/ORM
*/
module.exports.models = {
/******************************... | /**
* Default model configuration
* (sails.config.models)
*
* Unless you override them, the following properties will be included
* in each of your models.
*
* For more info on Sails models, see:
* http://sailsjs.org/#!/documentation/concepts/ORM
*/
module.exports.models = {
/******************************... | Set sails.js migration property to 'alter' | Set sails.js migration property to 'alter'
We want Sails.js to try to perform migration automatically
| JavaScript | agpl-3.0 | romain-ortega/nanocloud,Nanocloud/nanocloud,Gentux/nanocloud,Leblantoine/nanocloud,corentindrouet/nanocloud,romain-ortega/nanocloud,corentindrouet/nanocloud,corentindrouet/nanocloud,Nanocloud/nanocloud,Gentux/nanocloud,corentindrouet/nanocloud,Nanocloud/nanocloud,dynamiccast/nanocloud,Gentux/nanocloud,dynamiccast/nanoc... | ---
+++
@@ -27,6 +27,6 @@
* See http://sailsjs.org/#!/documentation/concepts/ORM/model-settings.html *
* *
***************************************************************************/
- // migrate: 'alter'
+ migrate: 'alter'
}; |
4c2f94d399f37f39bd9cb4d4fad8b0cce35f2231 | data/assets.js | data/assets.js | module.exports = [
{
id: 'Hairstyles',
required: false,
sortOrder: 1
},
{
id: 'Beards',
required: false,
sortOrder: 4
},
{
id: 'Body',
required: true,
sortOrder: 0
},
{
id: 'Glasses',
required: false,
sortOrder: 2
},
{
id: 'Scarfes',
required: fa... | module.exports = [
{
id: 'Hairstyles',
required: false,
sortOrder: 1
},
{
id: 'Beards',
required: false,
sortOrder: 5
},
{
id: 'Body',
required: true,
sortOrder: 0
},
{
id: 'Glasses',
required: false,
sortOrder: 2
},
{
id: 'Scarfes',
required: fa... | Update sort order in order to fix tie to be under jackets | Update sort order in order to fix tie to be under jackets
| JavaScript | mit | g8extended/Character-Generator,g8extended/Character-Generator | ---
+++
@@ -7,7 +7,7 @@
{
id: 'Beards',
required: false,
- sortOrder: 4
+ sortOrder: 5
},
{
id: 'Body',
@@ -22,7 +22,7 @@
{
id: 'Scarfes',
required: false,
- sortOrder: 3
+ sortOrder: 4
},
{
id: 'Shirts',
@@ -43,7 +43,7 @@
{
id: 'Jackets',
requi... |
33f0d928fa52c7bab202017d31bbed5be43bb57f | data/search-data.js | data/search-data.js | module.exports = function (models) {
const {
Photo,
User
} = models;
return {
searchPhotos(pattern) {
let regex = new RegExp(pattern, 'i');
return new Promise((resolve, reject) => {
Photo.find({
$or: [{
... | module.exports = function (models) {
const {
Photo,
User
} = models;
return {
searchPhotos(pattern) {
let regex = new RegExp(pattern, 'i');
return new Promise((resolve, reject) => {
Photo.find({
$or: [{
... | Tag searching now really works! | Tag searching now really works!
| JavaScript | mit | Bird-Shamaness/MuchPixels,Bird-Shamaness/MuchPixels | ---
+++
@@ -51,11 +51,10 @@
},
searchTags(tag) {
return new Promise((resolve, reject) => {
- let regex = new RegExp(tag, 'i');
Photo.find({
$or: [{
- 'tags': regex
+ 'tags': ... |
dfaea825bc63b9930a3ed2ae4e170771981f9c0a | app.js | app.js | var RtmClient = require('@slack/client').RtmClient;
var RTM_CLIENT_EVENTS = require('@slack/client').CLIENT_EVENTS.RTM;
var RTM_EVENTS = require('@slack/client').RTM_EVENTS;
var Conversation = require('watson-developer-cloud/conversation/v1')
var conversation = new Conversation({
username: process.env.CONVERSATION_US... | var RtmClient = require('@slack/client').RtmClient;
var RTM_CLIENT_EVENTS = require('@slack/client').CLIENT_EVENTS.RTM;
var RTM_EVENTS = require('@slack/client').RTM_EVENTS;
var Conversation = require('watson-developer-cloud/conversation/v1')
var conversation = new Conversation({
username: process.env.CONVERSATION_US... | Fix history message user issue | Fix history message user issue
| JavaScript | mit | SinisterBlade/slackbot | ---
+++
@@ -17,9 +17,7 @@
context: {}
}
rtm.on(RTM_EVENTS.MESSAGE, function handleRtmMessage(message) {
- if (!responseObj.context.user) {
- responseObj.context.user = message.user
- }
+ responseObj.context.user = message.user
conversation.message({
input: {text: message.text},
context: respon... |
1348dbf2b3dc6150ed1939da81a630943eafe99c | lib/octobat-moss-service.js | lib/octobat-moss-service.js | 'use strict';
var rest = require('restler-q');
var q = require('q');
module.exports = function(options) {
return q.fcall(function() {
if (!options) {
throw new Error("options required");
}
var supplier = options.supplier;
var customer = options.customer;
if (!supplier || !customer) {
... | 'use strict';
var rest = require('restler-q');
var q = require('q');
module.exports = function(options) {
return q.fcall(function() {
if (!options) {
throw new Error("options required");
}
var supplier = options.supplier;
var customer = options.customer;
if (!supplier || !customer) {
... | Handle change to octobat service api. | Handle change to octobat service api.
| JavaScript | mit | gitterHQ/vat-calculator | ---
+++
@@ -24,14 +24,26 @@
throw new Error("options.customer expects country");
}
+ var eservice, transactionType;
+ if(customer.vatNumber) {
+ transactionType = "B2B";
+ } else {
+ transactionType = "B2C";
+ eservice = options.eservice === undefined ? true : options.eservice;
... |
f60c3ffc40204c6c92581b96584a176d88fc21ec | lib/transport/demo/index.js | lib/transport/demo/index.js | "use babel";
import github from './github';
import git from './git';
export default {
github,
git,
make: function ({git, github}) {
let dup = Object.create(this);
if (git) {
let g = Object.create(this.git);
Object.keys(git).forEach((k) => {
g[k] = git[k];
});
dup.git ... | "use babel";
import github from './github';
import git from './git';
function validStub(name, real, stub) {
if (real === undefined) {
throw new Error(`Attempt to stub nonexistent property: ${name}`);
}
if (typeof real !== typeof stub) {
throw new Error(`Attempt to stub ${name} (${typeof real}) with ${t... | Validate stubs before permitting them. | Validate stubs before permitting them.
| JavaScript | mit | smashwilson/pull-request | ---
+++
@@ -2,6 +2,20 @@
import github from './github';
import git from './git';
+
+function validStub(name, real, stub) {
+ if (real === undefined) {
+ throw new Error(`Attempt to stub nonexistent property: ${name}`);
+ }
+
+ if (typeof real !== typeof stub) {
+ throw new Error(`Attempt to stub ${name} ... |
d27e66c219a2b0f175ea392ca41b074f25fdd4ef | source/moon-container-init.js | source/moon-container-init.js | (function (enyo, scope) {
enyo.kind({
name: 'moon.ContainerInitializer',
components: [
{kind: 'moon.Drawers', drawers: [{}], components: [
{kind: 'moon.Panels', pattern: 'activity', components: [
{components: [
{kind: 'moon.TooltipDecorator', components: [{kind: 'moon.Button'},{kind: 'moon.Toolti... | (function (enyo, scope) {
enyo.kind({
name: 'moon.ContainerInitializer',
components: [
{kind: 'moon.Drawers', drawers: [{}], components: [
{kind: 'moon.Panels', pattern: 'activity', components: [
{components: [
{kind: 'moon.TooltipDecorator', components: [{kind: 'moon.Button'},{kind: 'moon.Toolti... | Remove moon.Slider from set of pre-[initialized, rendered, destroyed] controls. | ENYO-373: Remove moon.Slider from set of pre-[initialized, rendered, destroyed] controls.
Enyo-DCO-1.1-Signed-off-by: Aaron Tam <aaron.tam@lge.com>
| JavaScript | apache-2.0 | mcanthony/moonstone,mcanthony/moonstone,mcanthony/moonstone,enyojs/moonstone | ---
+++
@@ -12,7 +12,6 @@
{kind: 'moon.Image'},
{kind: 'moon.SelectableItem'},
{kind: 'moon.ProgressBar'},
- {kind: 'moon.Slider'},
{kind: 'moon.Spinner'},
{kind: 'moon.BodyText'},
{kind: 'moon.LabeledTextItem'}, |
120371b68002767acad1310860cbfaecef5dfd7d | server/routes/schema-info.js | server/routes/schema-info.js | require('../typedefs');
const router = require('express').Router();
const mustHaveConnectionAccess = require('../middleware/must-have-connection-access.js');
const ConnectionClient = require('../lib/connection-client');
const wrap = require('../lib/wrap');
/**
* @param {Req} req
* @param {Res} res
*/
async function... | require('../typedefs');
const router = require('express').Router();
const mustHaveConnectionAccess = require('../middleware/must-have-connection-access.js');
const ConnectionClient = require('../lib/connection-client');
const wrap = require('../lib/wrap');
/**
* @param {Req} req
* @param {Res} res
*/
async function... | Send schema info error as 400 | Send schema info error as 400
This assume schema info failure is due to user input, not application code. This could be that the server is unavailable however. Regardless it is something to be expected as opposed to an internal server error
| JavaScript | mit | rickbergfalk/sqlpad,rickbergfalk/sqlpad,rickbergfalk/sqlpad | ---
+++
@@ -28,7 +28,14 @@
return res.utils.data(schemaInfo);
}
- schemaInfo = await connectionClient.getSchema();
+ try {
+ schemaInfo = await connectionClient.getSchema();
+ } catch (error) {
+ // Assumption is that error is due to user configuration
+ // letting it bubble up results in 500, b... |
3869efee28f86209ba9bb692d9f70c63f1b3bc8c | share/spice/youtube/spice.js | share/spice/youtube/spice.js | function ddg_spice_youtube(api_result) {
"use strict";
DDG.require("/js/nryt.js", {
success: function() {
window.iqyt = 2;
ddgyt.nryt(api_result);
}
});
} | function ddg_spice_youtube(api_result) {
"use strict";
DDG.load("/js/nryt.js", {
success: function() {
window.iqyt = 2;
ddgyt.nryt(api_result);
}
});
} | Use DDG.load instead of DDG.require on the YouTube plugin. | Use DDG.load instead of DDG.require on the YouTube plugin.
- DDG.require was renamed to DDG.load.
| JavaScript | apache-2.0 | digit4lfa1l/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,stennie/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,bdjnk/zeroclickinfo-spice,marianosimone/zero... | ---
+++
@@ -1,6 +1,6 @@
function ddg_spice_youtube(api_result) {
"use strict";
- DDG.require("/js/nryt.js", {
+ DDG.load("/js/nryt.js", {
success: function() {
window.iqyt = 2;
ddgyt.nryt(api_result); |
1ee9edda855c8570fe016fd4abb1cf6857a0396a | lib/util/badgeVault.js | lib/util/badgeVault.js | 'use strict';
const Promise = require('bluebird');
const readFile = Promise.promisify(require('fs').readFile);
const stat = Promise.promisify(require('fs').stat);
const cache = {};
const badgesDir = `${__dirname}/../../badges`;
function info(score, options) {
const isUnknown = typeof score !== 'number';
opt... | 'use strict';
const Promise = require('bluebird');
const readFile = Promise.promisify(require('fs').readFile);
const stat = Promise.promisify(require('fs').stat);
const cache = {};
const badgesDir = `${__dirname}/../../badges`;
function info(score, options) {
const isUnknown = typeof score !== 'number';
opt... | Change rev option to 0. | Change rev option to 0.
| JavaScript | mit | npms-io/npms-badges | ---
+++
@@ -10,7 +10,7 @@
function info(score, options) {
const isUnknown = typeof score !== 'number';
- options = Object.assign({ format: 'svg', style: 'flat', revision: 1 }, options);
+ options = Object.assign({ format: 'svg', style: 'flat', revision: 0 }, options);
const percentage = !isUnknow... |
184d6265997ef8fd114e0a605a1a2b279c150543 | game/game-state-managers/instructionsState.js | game/game-state-managers/instructionsState.js | var instructionsState = {
create: function () {
_setBackgroundImage('instructions');
battleStateButton = new MenuButton(528, 175, "mainMenuButtons", "mapSelectState", "battleGround", "map", "army1", "army2", "battleButton", 0, 0, 1, 0);
campaignStateButton = new MenuButton(528, 275, "mainMenuButtons", "m... | var instructionsState = {
create: function () {
_setBackgroundImage('instructions');
battleStateButton = new MenuButton(175, 500, "mainMenuButtons", "mapSelectState", "battleGround", "map", "army1", "army2", "battleButton", 0, 0, 1, 0);
campaignStateButton = new MenuButton(450, 500, "mainMenuButtons", "m... | Adjust buttons on instructions page | Adjust buttons on instructions page
| JavaScript | mit | JohnP42/Fantasy-Wars,JohnP42/Fantasy-Wars | ---
+++
@@ -2,8 +2,8 @@
create: function () {
_setBackgroundImage('instructions');
- battleStateButton = new MenuButton(528, 175, "mainMenuButtons", "mapSelectState", "battleGround", "map", "army1", "army2", "battleButton", 0, 0, 1, 0);
- campaignStateButton = new MenuButton(528, 275, "mainMenuButtons... |
d92515ee55752ab9054441ac2dc2ae7f2dd7fc07 | source/nestedSortableCtrl.js | source/nestedSortableCtrl.js | (function () {
'use strict';
angular.module('ui.nestedSortable')
.controller('NestedSortableController', ['$scope', '$attrs', 'nestedSortableConfig',
function ($scope, $attrs, nestedSortableConfig) {
$scope.sortableElement = null;
$scope.sortableModelValue = null;
$scope.callba... | (function () {
'use strict';
angular.module('ui.nestedSortable')
.controller('NestedSortableController', ['$scope', 'nestedSortableConfig',
function ($scope, nestedSortableConfig) {
$scope.sortableElement = null;
$scope.sortableModelValue = null;
$scope.callbacks = null;
... | Remove unexisting $attrs provider + unused itemScope parameter | Remove unexisting $attrs provider + unused itemScope parameter
| JavaScript | mit | joaocc/angular-ui-tree,TommyM/angular-ui-tree,akshath4u/akkutest,kotmatpockuh/angular-ui-tree,robertdamoc/angular-ui-tree,faceleg/angular-ui-tree,Movideo/angular-ui-tree,fmoliveira/angular-ui-tree,foglerek/angular-ui-tree,BlakeBrown/angular-ui-tree,albi34/angular-ui-tree,zachlysobey/angular-ui-tree,asciicode/angular-ui... | ---
+++
@@ -3,8 +3,8 @@
angular.module('ui.nestedSortable')
- .controller('NestedSortableController', ['$scope', '$attrs', 'nestedSortableConfig',
- function ($scope, $attrs, nestedSortableConfig) {
+ .controller('NestedSortableController', ['$scope', 'nestedSortableConfig',
+ function ($scop... |
3d95a7876e938cc9dc7ade149a3b7e4b460f854a | web/src/constants/stocks.js | web/src/constants/stocks.js | const stockIndexRegex = /^([^/]+)\/([^/]+)$/;
export const STOCK_INDICES = (process.env.STOCK_INDICES || '')
.split(',')
.map(code => code.match(stockIndexRegex))
.filter(code => code)
.reduce((last, [, code, name]) => ({
...last,
[code]: name
}), {});
export const DO_STOCKS_LIST =... | const stockIndexRegex = /^([^/]+)\/([^/]+)$/;
export const STOCK_INDICES = (process.env.STOCK_INDICES || '')
.split(',')
.map(code => code.match(stockIndexRegex))
.filter(code => code)
.reduce((last, [, code, name]) => ({
...last,
[code]: name
}), {});
export const DO_STOCKS_LIST =... | Fix reference to DO_STOCKS_LIST environment variable | Fix reference to DO_STOCKS_LIST environment variable
| JavaScript | mit | felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget | ---
+++
@@ -9,7 +9,7 @@
[code]: name
}), {});
-export const DO_STOCKS_LIST = process.env.SKIP_STOCKS_LIST !== 'true';
+export const DO_STOCKS_LIST = process.env.DO_STOCKS_LIST !== 'false';
export const FAKE_STOCK_PRICES = process.env.FAKE_STOCK_PRICES === 'true';
export const STOCKS_GRAPH_RESOLUTION... |
07ceb4095f62f37ba36b401f8834706f9aeb712a | app.js | app.js | /*jslint node: true*/
"use strict";
var site = require("./lib/scraper").site;
site.
getRecipeUrls().
then(function (recipeUrls) {
return site.getRecipe(recipeUrls[0]);
}).
then(function (recipe) {
console.log(JSON.stringify(recipe));
});
| /*jslint node: true*/
"use strict";
var site = require("./lib/scraper").site;
site.
getRecipeUrls().
then(function (recipeUrls) {
return site.getRecipe(recipeUrls[0]);
}).
then(function (recipe) {
console.log(JSON.stringify(recipe));
}).
done();
| Make sure to call done to end the promise chain | Make sure to call done to end the promise chain
| JavaScript | mit | Koekelas/dagelijkse-kost,Koekelas/dagelijkse-kost | ---
+++
@@ -11,4 +11,5 @@
}).
then(function (recipe) {
console.log(JSON.stringify(recipe));
- });
+ }).
+ done(); |
d859978c912d6a49ca1d87f012647eccdd7378d9 | app.js | app.js | const Server = require('./server.heroku.js')
const port = (process.env.PORT || 8080)
const app = Server.app()
/*if (process.env.NODE_ENV !== 'production') {
const webpack = require('webpack')
const webpackDevMiddleware = require('webpack-dev-middleware')
const webpackHotMiddleware = require('webpack-hot-middlewa... | const Server = require('./server.heroku.js')
const port = (process.env.PORT || 8080)
const app = Server.app()
if (process.env.NODE_ENV !== 'production') {
const webpack = require('webpack')
const WebpackDevServer = require('webpack-dev-server');
const config = require('./webpack.config.js')
new WebpackDevServ... | Consolidate dev and prod server initialization | Consolidate dev and prod server initialization
| JavaScript | mit | kngroo/Kngr,kngroo/Kngr | ---
+++
@@ -2,18 +2,23 @@
const port = (process.env.PORT || 8080)
const app = Server.app()
-/*if (process.env.NODE_ENV !== 'production') {
+if (process.env.NODE_ENV !== 'production') {
const webpack = require('webpack')
- const webpackDevMiddleware = require('webpack-dev-middleware')
- const webpackHotMiddle... |
2a6d614b453c545bce4c8a8b0ef9d7548554c74b | app.js | app.js | var config = require('./config');
var express = require('express');
var bodyParser = require('body-parser');
var winston = require('winston');
winston.add(winston.transports.File, { filename: 'info.log', level: 'info' });
winston.remove(winston.transports.Console);
winston.add(winston.transports.Console, { level: 'info... | var config = require('./config');
var express = require('express');
var bodyParser = require('body-parser');
var winston = require('winston');
winston.add(winston.transports.File, { filename: 'info.log', level: 'info' });
winston.remove(winston.transports.Console);
winston.add(winston.transports.Console, { level: 'info... | Test serving static log file. | Test serving static log file.
| JavaScript | mit | membersheep/4bot | ---
+++
@@ -7,7 +7,7 @@
winston.add(winston.transports.Console, { level: 'info' });
var statusHandler = require('./routes/status');
-
+var logHandler = require('./routes/log');
var telegramHandler = require('./routes/telegram');
var app = express();
@@ -17,6 +17,7 @@
app.get('/status', statusHandler);
app... |
d927134ca685dcdadfafbea6a732cb95120399ff | app.js | app.js | const discord = require('discord.js');
const fs = require('fs');
const yaml = require('js-yaml');
const client = new discord.Client({
fetchAllMembers: true,
messageCacheMaxSize: 100000
});
if (fs.existsSync('./config.yml')) {
var config = yaml.safeLoad(fs.readFileSync('./config.yml', 'utf8'));
} else {
th... | const discord = require('discord.js');
const fs = require('fs');
const yaml = require('js-yaml');
const client = new discord.Client({
fetchAllMembers: true,
messageCacheMaxSize: 100000
});
if (fs.existsSync('./config.yml')) {
var config = yaml.safeLoad(fs.readFileSync('./config.yml', 'utf8'));
} else {
th... | Add some basic error logging | Add some basic error logging
| JavaScript | mit | IanMurray/AnnuBot | ---
+++
@@ -17,4 +17,9 @@
console.log('Ready event emitted.');
});
+client.on('debug', console.log);
+client.on('error', console.error);
+client.on('warn', console.warn);
+client.on('disconnect', console.warn);
+
client.login(config.token); |
75534b5dca41c6e5a36b34094ce50d72a23a3889 | app.js | app.js | var app = require('express')();
var server = require('http').Server(app);
var io = require('socket.io')(server);
var path = require('path');
var game = require('./game.js');
server.listen(3000, function() {
console.log("listening on port 3000");
});
app.set('views', path.join(__dirname, 'templates'));
app.set('view... | var express = require('express');
var http = require('http');
var socketIO = require('socket.io');
var path = require('path');
var game = require('./game.js');
var app = express();
var server = http.Server(app);
var io = socketIO(server);
app.set('views', path.join(__dirname, 'templates'));
app.set('view engine', 'ja... | Rename imports to get access to express | Rename imports to get access to express
| JavaScript | mit | vakila/net-set,vakila/net-set | ---
+++
@@ -1,12 +1,12 @@
-var app = require('express')();
-var server = require('http').Server(app);
-var io = require('socket.io')(server);
+var express = require('express');
+var http = require('http');
+var socketIO = require('socket.io');
var path = require('path');
var game = require('./game.js');
-server.l... |
cc41abb3c8ea389bdf526c3fcafbc83b5b2a1785 | cli.js | cli.js | #!/usr/bin/env node
'use strict';
var meow = require('meow');
var w3counter = require('./');
var cli = meow({
help: [
'Usage',
' $ w3counter <type>',
'',
'Example',
' $ w3counter browser',
' $ w3counter country',
' $ w3counter os',
' $ w3counter res'
].join('\n')
});
if (!cli.input.length) {
... | #!/usr/bin/env node
'use strict';
var meow = require('meow');
var w3counter = require('./');
var cli = meow({
help: [
'Usage',
' $ w3counter <type>',
'',
'Example',
' $ w3counter browser',
' $ w3counter country',
' $ w3counter os',
' $ w3counter res'
].join('\n')
});
if (!cli.input.length) {
... | Add percentage to CLI output | Add percentage to CLI output
| JavaScript | mit | kevva/w3counter | ---
+++
@@ -39,6 +39,6 @@
types.forEach(function (type, i) {
i = i + 1;
- console.log(i + '. ' + type.item);
+ console.log(i + '. ' + type.item + ' (' + type.percent + ')');
});
}); |
b5351acc81211a1f57362ed02283e8215a7feca3 | src/components/posts_show.js | src/components/posts_show.js | import React from 'react';
import connect from 'react-redux';
import { fetchPost } from '../actions';
class PostsShow extends React.Component {
componentDidMount() {
const { id } = this.props.match.params;
this.props.fetchPost(id);
}
render() {
return (
<div>
Posts Show
</div>
... | import React from 'react';
import connect from 'react-redux';
import { fetchPost } from '../actions';
class PostsShow extends React.Component {
componentDidMount() {
const { id } = this.props.match.params;
this.props.fetchPost(id);
}
render() {
const { post } = this.props;
return (
<div>
... | Add basic markup of single post | Add basic markup of single post
| JavaScript | mit | monsteronfire/redux-learning-blog,monsteronfire/redux-learning-blog | ---
+++
@@ -9,9 +9,13 @@
}
render() {
+ const { post } = this.props;
+
return (
<div>
- Posts Show
+ <h3>{post.title}</h3>
+ <h6>Categories: {post.categories}</h6>
+ <p>{post.content}</p>
</div>
)
} |
6d4640854d6842b3c283cea18efd4a5f008d5121 | packages/core/module.js | packages/core/module.js | /**
* @copyright 2016-2019, Miles Johnson
* @license https://opensource.org/licenses/MIT
*/
// Our index re-exports TypeScript types, which Babel is unable to detect and omit.
// Because of this, Webpack and other bundlers attempt to import values that do not exist.
// To mitigate this issue, we need this mod... | /**
* @copyright 2016-2019, Miles Johnson
* @license https://opensource.org/licenses/MIT
*/
// Our index re-exports TypeScript types, which Babel is unable to detect and omit.
// Because of this, Webpack and other bundlers attempt to import values that do not exist.
// To mitigate this issue, we need this mod... | Add Element and Parser to esm index. | Add Element and Parser to esm index.
| JavaScript | mit | milesj/interweave,milesj/interweave,milesj/interweave | ---
+++
@@ -11,7 +11,9 @@
import Markup from './esm/Markup';
import Filter from './esm/Filter';
import Matcher from './esm/Matcher';
+import Element from './esm/Element';
+import Parser from './esm/Parser';
-export { Markup, Filter, Matcher };
+export { Markup, Filter, Matcher, Element, Parser };
export defau... |
e3726db6f132c4c170c892da74a542f9967bc1ff | server/migrations/20180201131052-create-shares.js | server/migrations/20180201131052-create-shares.js | 'use strict'
var Sequelize = require('sequelize')
var tableName = 'Shares'
var schema = {
id: {
type: Sequelize.INTEGER,
primaryKey: true,
autoIncrement: true
},
sharer: {
type: Sequelize.INTEGER,
allowNull: false
},
sharee: {
type: Sequelize.INTEGER,
allowNull: false
}
}
mod... | 'use strict'
var Sequelize = require('sequelize')
var tableName = 'Shares'
var schema = {
id: {
type: Sequelize.INTEGER,
primaryKey: true,
autoIncrement: true
},
sharer: {
type: Sequelize.INTEGER,
allowNull: false
},
sharee: {
type: Sequelize.INTEGER,
allowNull: false
}
}
mod... | Enable shares migration for all databases | Enable shares migration for all databases
| JavaScript | agpl-3.0 | BspbOrg/smartbirds-server,BspbOrg/smartbirds-server,BspbOrg/smartbirds-server | ---
+++
@@ -22,12 +22,10 @@
module.exports = {
up: async function (queryInterface, Sequelize) {
- if (queryInterface.sequelize.options.dialect !== 'postgres') return
await queryInterface.createTable(tableName, schema)
},
down: async function (queryInterface, Sequelize) {
- if (queryInterface.... |
0cb7904353a5b900e026d22df28a0357acad58b0 | server/services/signup/hooks/getSignupAndEvent.js | server/services/signup/hooks/getSignupAndEvent.js | const config = require('../../../../config/ilmomasiina.config'); // eslint-disable-line
const md5 = require('md5');
module.exports = () => (hook) => {
const models = hook.app.get('models');
const id = hook.id;
const editToken = hook.params.query.editToken;
if (editToken !== md5(`${`${hook.id}`}${config.editTo... | const _ = require('lodash');
const config = require('../../../../config/ilmomasiina.config'); // eslint-disable-line
const md5 = require('md5');
module.exports = () => (hook) => {
const models = hook.app.get('models');
const id = hook.id;
const editToken = hook.params.query.editToken;
const fields = [];
cons... | Add necessary data to server response and improve error handling | Add necessary data to server response and improve error handling
| JavaScript | mit | athenekilta/ilmomasiina,athenekilta/ilmomasiina | ---
+++
@@ -1,3 +1,4 @@
+const _ = require('lodash');
const config = require('../../../../config/ilmomasiina.config'); // eslint-disable-line
const md5 = require('md5');
@@ -5,38 +6,64 @@
const models = hook.app.get('models');
const id = hook.id;
const editToken = hook.params.query.editToken;
+ const fi... |
d0768e1473108f14abeb9d2d29fdbceae87caf94 | playground/parseMson.js | playground/parseMson.js | import protagonist from 'protagonist';
export default function parseMson(mson, cb) {
protagonist.parse(mson.trim(), (err, parseResult) => {
let dataStructureElements;
if (err) {
return cb(err);
}
dataStructureElements = parseResult.content[0].content;
dataStructureElements = dataStructure... | import protagonist from 'protagonist';
export default function parseMson(mson, cb) {
protagonist.parse(mson.trim(), (err, parseResult) => {
let dataStructureElements;
if (err) {
return cb(err);
}
dataStructureElements = parseResult.content[0].content[0].content;
dataStructureElements = ... | Send a list of all data structure elements. | Send a list of all data structure elements.
| JavaScript | mit | apiaryio/attributes-kit,apiaryio/attributes-kit,apiaryio/attributes-kit | ---
+++
@@ -8,14 +8,12 @@
return cb(err);
}
- dataStructureElements = parseResult.content[0].content;
- dataStructureElements = dataStructureElements.map((element) => {
- if (element.content && element.content[0] && element.content[0].content) {
- return element.content[0].content[0];
... |
58d6977d32d96b19bbf76d51f5612313b29fdc4a | src/plugins/plugin-shim.js | src/plugins/plugin-shim.js | /**
* Add shim config for configuring the dependencies and exports for
* older, traditional "browser globals" scripts that do not use define()
* to declare the dependencies and set a module value.
*/
(function(seajs, global) {
// seajs.config({
// shim: {
// "jquery": {
// src: "lib/jquery.js",
// ... | /**
* Add shim config for configuring the dependencies and exports for
* older, traditional "browser globals" scripts that do not use define()
* to declare the dependencies and set a module value.
*/
(function(seajs, global) {
// seajs.config({
// shim: {
// "jquery": {
// src: "lib/jquery.js",
// ... | Fix a bug in Node.js | Fix a bug in Node.js
| JavaScript | mit | LzhElite/seajs,Lyfme/seajs,seajs/seajs,miusuncle/seajs,imcys/seajs,tonny-zhang/seajs,miusuncle/seajs,lianggaolin/seajs,eleanors/SeaJS,evilemon/seajs,wenber/seajs,eleanors/SeaJS,treejames/seajs,coolyhx/seajs,MrZhengliang/seajs,JeffLi1993/seajs,uestcNaldo/seajs,Gatsbyy/seajs,liupeng110112/seajs,Lyfme/seajs,kuier/seajs,Mr... | ---
+++
@@ -42,5 +42,5 @@
}
}
-})(seajs, this);
+})(seajs, typeof global === "undefined" ? this : global);
|
c8aefb887e233ad064db33ba87fe6b83a7b67338 | test/grunt-accessibility_test.js | test/grunt-accessibility_test.js | 'use strict';
var grunt = require('grunt');
exports.accessibilityTests = {
matchReports: function(test) {
var actual;
var expected;
test.expect(2);
actual = grunt.file.read('reports/txt/test.txt');
expected = grunt.file.read('test/expected/txt/test.txt');
test.equal(actual, expected, 'Sho... | 'use strict';
var grunt = require('grunt');
function readFile(file) {
var contents = grunt.file.read(file);
if (process.platform === 'win32') {
contents = contents.replace(/\r\n/g, '\n');
}
return contents;
}
exports.accessibilityTests = {
matchReports: function(test) {
var actual;
var expec... | Fix tests on Windows with autocrlf on. | Fix tests on Windows with autocrlf on.
| JavaScript | mit | yargalot/grunt-accessibility,yargalot/grunt-accessibility | ---
+++
@@ -1,6 +1,16 @@
'use strict';
var grunt = require('grunt');
+
+function readFile(file) {
+ var contents = grunt.file.read(file);
+
+ if (process.platform === 'win32') {
+ contents = contents.replace(/\r\n/g, '\n');
+ }
+
+ return contents;
+}
exports.accessibilityTests = {
matchReports: func... |
8341dad7f0ca21d296253c8668f99d9c27b9f175 | app/models/virtualMachines.js | app/models/virtualMachines.js | /*global Backbone*/
var URL = require('./URL');
var VirtualMachine = require('./virtualMachine');
//define a collection of virtual machines
module.exports = Backbone.Collection.extend({
model: VirtualMachine,
url: URL.virtualMachine
}); | /*global Backbone*/
//Dependencies.
var URL = require('./URL');
var VirtualMachine = require('./virtualMachine');
//define a collection of virtual machines
module.exports = Backbone.Collection.extend({
//A collection only need a model property in order to _Type_ each element of the collection.
model: VirtualMachine,... | Add the comments on the Virtual machine collection. | Add the comments on the Virtual machine collection.
| JavaScript | mit | KleeGroup/front-end-spa,pierr/front-end-spa,pierr/front-end-spa,KleeGroup/front-end-spa | ---
+++
@@ -1,9 +1,13 @@
/*global Backbone*/
+//Dependencies.
var URL = require('./URL');
var VirtualMachine = require('./virtualMachine');
//define a collection of virtual machines
module.exports = Backbone.Collection.extend({
+ //A collection only need a model property in order to _Type_ each element of the ... |
63743241a188b427c061bea2dc4572a208567daa | troposphere/static/js/components/modals/instance/launch/components/AdvancedOptionsFooter.react.js | troposphere/static/js/components/modals/instance/launch/components/AdvancedOptionsFooter.react.js | import React from 'react';
export default React.createClass({
render: function() {
let saveOptionsDisabled = this.props.saveOptionsDisabled ? "disabled" : "";
return (
<div className="modal-footer">
<button type="button"
disabled={this.props.saveOptio... | import React from 'react';
import Button from 'components/common/ui/Button.react';
export default React.createClass({
render: function() {
let saveOptionsDisabled = this.props.saveOptionsDisabled ? "disabled" : "";
return (
<div className="modal-footer">
<Button
... | Refactor to use new button and add tooltip message | Refactor to use new button and add tooltip message
| JavaScript | apache-2.0 | CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend | ---
+++
@@ -1,24 +1,33 @@
import React from 'react';
+import Button from 'components/common/ui/Button.react';
export default React.createClass({
+
render: function() {
let saveOptionsDisabled = this.props.saveOptionsDisabled ? "disabled" : "";
return (
<div className="modal-foo... |
4d11031607c718fb0ede81562c36b0e6cf50af13 | src/reducers/aboutReducer.js | src/reducers/aboutReducer.js | import * as actions from '../constants/actionTypes';
export default function(state = {}, action) {
switch(action.type) {
case actions.ABOUT_FETCH:
return Object.assign(...state, action.payload.data);
default:
return state;
}
} | import * as actions from '../constants/actionTypes';
import initialState from './initialState';
export default function(state = initialState.about, action) {
switch(action.type) {
case actions.ABOUT_FETCH:
return Object.assign(...state, action.payload.data);
default:
return state;
}
} | Update about reducer to use initial state | Update about reducer to use initial state
| JavaScript | mit | veryaustin/veryaustin-2017-frontend,veryaustin/veryaustin-2017-frontend | ---
+++
@@ -1,6 +1,7 @@
import * as actions from '../constants/actionTypes';
+import initialState from './initialState';
-export default function(state = {}, action) {
+export default function(state = initialState.about, action) {
switch(action.type) {
case actions.ABOUT_FETCH:
return Object.assign(... |
679ce7c3942f7b6d150653ba3a8e9cfda3af1b99 | extensions/tools/targets/myCreeps.js | extensions/tools/targets/myCreeps.js | 'use strict';
var all = false;
var cache = {};
function getCache(room) {
if (all === false) {
all = [];
for (var i in Game.creeps) {
if (!Game.creeps.spawning) {
if (cache[Game.creeps[i].room] === undefined) {
cache[Game.creeps[i].room] = [Game.creep... | 'use strict';
var all = false;
var cache = {};
function getCache(room) {
if (all === false) {
all = [];
for (var i in Game.creeps) {
if (!Game.creeps.spawning) {
if (cache[Game.creeps[i].room.name] === undefined) {
cache[Game.creeps[i].room.name] = [... | Use room name as string, instead as object for key value | Use room name as string, instead as object for key value
| JavaScript | mit | avdg/screeps | ---
+++
@@ -8,10 +8,10 @@
all = [];
for (var i in Game.creeps) {
if (!Game.creeps.spawning) {
- if (cache[Game.creeps[i].room] === undefined) {
- cache[Game.creeps[i].room] = [Game.creeps[i]];
+ if (cache[Game.creeps[i].room.name] === und... |
7cf0a253819661c84e593d4a8dade96d1f4f253c | ghost/admin/controllers/forgotten.js | ghost/admin/controllers/forgotten.js | /* jshint unused: false */
import ajax from 'ghost/utils/ajax';
import ValidationEngine from 'ghost/mixins/validation-engine';
var ForgottenController = Ember.Controller.extend(ValidationEngine, {
email: '',
submitting: false,
// ValidationEngine settings
validationType: 'forgotten',
a... | /* jshint unused: false */
import ajax from 'ghost/utils/ajax';
import ValidationEngine from 'ghost/mixins/validation-engine';
var ForgottenController = Ember.Controller.extend(ValidationEngine, {
email: '',
submitting: false,
// ValidationEngine settings
validationType: 'forgotten',
a... | Stop validation error notification stack | Stop validation error notification stack
closes #3383
- Calls closePassive() if a new validation error is thrown to display
only the latest validation error
| JavaScript | mit | TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost | ---
+++
@@ -30,10 +30,12 @@
self.transitionToRoute('signin');
}).catch(function (resp) {
self.toggleProperty('submitting');
+ self.notifications.closePassive();
self.notifications.showAPIError(resp, 'There was a problem... |
4d491cc111a7084cae7069b26f597e7993acafa4 | web/app/themes/theme/assets/ng/events/directives/preview.directive.js | web/app/themes/theme/assets/ng/events/directives/preview.directive.js | angular
.module('events.preview.directive', ['ui.router'])
.directive('eventPreview', function () {
return {
restrict: 'E',
replace: true,
template: '<div class="event-preview__item">'+
'<div class="event-preview__image-overlay event-preview__image-overlay--gradient"></div>' ... | angular
.module('events.preview.directive', ['ui.router'])
.directive('eventPreview', function () {
return {
restrict: 'E',
replace: true,
template: '<div class="event-preview__item">'+
'<div class="event-preview__image-overlay event-preview__image-overlay--gradient"></div>' ... | Fix the preview image size | Fix the preview image size
| JavaScript | mit | rslnk/reimagine-belonging,rslnk/reimagine-belonging,rslnk/reimagine-belonging | ---
+++
@@ -19,7 +19,12 @@
slug: '@'
},
link: function (scope, element, attr) {
- element.css('background-image', 'url('+attr.image+')');
+ var imgArr = attr.image.split('.');
+ imgArr[imgArr.length-2] += '-250x250';
+ var previewImgPath = imgArr.join('.');
+
+ ... |
01b7581484ef5ec3e020a4da099e6407b5744a76 | assets/js/modules/analytics/common/account-create/create-account-field.js | assets/js/modules/analytics/common/account-create/create-account-field.js | /**
* CreateAccountField component.
*
* Site Kit by Google, Copyright 2020 Google LLC
*
* 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
*
* https://www.apache.org/licenses/LICENSE-... | /**
* CreateAccountField component.
*
* Site Kit by Google, Copyright 2020 Google LLC
*
* 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
*
* https://www.apache.org/licenses/LICENSE-... | Change event parameter name from `e` to `event`. | Change event parameter name from `e` to `event`.
| JavaScript | apache-2.0 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp | ---
+++
@@ -44,8 +44,8 @@
) }
label={ label }
name={ name }
- onChange={ ( e ) => {
- setValue( e.target.value, name );
+ onChange={ ( event ) => {
+ setValue( event.target.value, name );
} }
outlined
required |
630f21ebededd3ab940137187925c47af789f2c6 | realtime/index.js | realtime/index.js | const io = require('socket.io'),
winston = require('winston');
winston.remove(winston.transports.Console);
winston.add(winston.transports.Console, {'timestamp': true});
const PORT = 3031;
winston.info('Rupture real-time service starting');
winston.info('Listening on port ' + PORT);
var socket = io.listen(PORT... | const io = require('socket.io'),
winston = require('winston'),
http = require('http');
winston.remove(winston.transports.Console);
winston.add(winston.transports.Console, {'timestamp': true});
const PORT = 3031;
winston.info('Rupture real-time service starting');
winston.info('Listening on port ' + PORT)... | Add get-work request from realtime to backend | Add get-work request from realtime to backend
| JavaScript | mit | esarafianou/rupture,dimriou/rupture,dionyziz/rupture,dimkarakostas/rupture,esarafianou/rupture,dimkarakostas/rupture,dimkarakostas/rupture,esarafianou/rupture,dionyziz/rupture,dimriou/rupture,dimriou/rupture,esarafianou/rupture,dionyziz/rupture,dimriou/rupture,dimkarakostas/rupture,dimriou/rupture,dionyziz/rupture,dion... | ---
+++
@@ -1,5 +1,6 @@
const io = require('socket.io'),
- winston = require('winston');
+ winston = require('winston'),
+ http = require('http');
winston.remove(winston.transports.Console);
winston.add(winston.transports.Console, {'timestamp': true});
@@ -11,11 +12,29 @@
var socket = io.listen... |
7b9419174ef72b0ff19dd60657272d894d5fd165 | games/common/js/submit_score.js | games/common/js/submit_score.js | function submit_score(score) {
auth_data = get_auth_data()
submit_data = auth_data + "&" + score
call_api("set_score", submit_data)
}
function get_auth_data() {
hash = window.location.hash
return hash.substring(1, hash.indexOf("&"))
}
function call_api(name, data) {
request = new XMLHttpReques... | function submit_score(score) {
auth_data = get_auth_data()
submit_data = auth_data + "&" + score
call_api("set_score", submit_data)
}
function get_auth_data() {
hash = window.location.hash
auth_data = hash.substring(1)
additionalDataStart = auth_data.indexOf("&")
if (additionalDataStart > 0... | Fix get_auth_data when no additional data on hash | Fix get_auth_data when no additional data on hash
| JavaScript | apache-2.0 | alvarogzp/telegram-games,alvarogzp/telegram-games,alvarogzp/telegram-games,alvarogzp/telegram-games | ---
+++
@@ -6,7 +6,12 @@
function get_auth_data() {
hash = window.location.hash
- return hash.substring(1, hash.indexOf("&"))
+ auth_data = hash.substring(1)
+ additionalDataStart = auth_data.indexOf("&")
+ if (additionalDataStart > 0) {
+ auth_data = auth_data.substring(0, additionalDataSt... |
e743fab34e49352d902d8b027252bf013e039b40 | snippet.js | snippet.js | (function (instanceName) {
var i,
s,
z,
w = window,
d = document,
q = 'script',
f = ['config', 'track', 'identify', 'push', 'call'],
c = function () {
var self = this;
self._e = [];
for (i = 0; i < f.length; i++) {
... | (function (instanceName) {
var i,
s,
z,
w = window,
d = document,
q = 'script',
f = ['config', 'track', 'identify', 'visit', 'push', 'call'],
c = function () {
var self = this;
self._e = [];
for (i = 0; i < f.length; i++) {
... | Add 'visit' to tracker stub | Add 'visit' to tracker stub
| JavaScript | mit | Woopra/js-client-tracker,Woopra/js-client-tracker | ---
+++
@@ -5,7 +5,7 @@
w = window,
d = document,
q = 'script',
- f = ['config', 'track', 'identify', 'push', 'call'],
+ f = ['config', 'track', 'identify', 'visit', 'push', 'call'],
c = function () {
var self = this;
self._e = [];
@@ -26,7 +... |
1194543426bba9f5620423f53920a0eaf96e1601 | client/mobilizations/paths.js | client/mobilizations/paths.js | import DefaultConfigServer from '~server/config'
export const mobilizations = () => '/'
export const mobilization = (mobilization, domain = DefaultConfigServer.appDomain) => {
if (domain && domain.indexOf('staging') !== -1) {
return `http://${mobilization.slug}.${domain}`
}
return mobilization.custom_domain... | import DefaultConfigServer from '~server/config'
export const mobilizations = () => '/mobilizations'
export const mobilization = (mobilization, domain = DefaultConfigServer.appDomain) => {
if (domain && domain.indexOf('staging') !== -1) {
return `http://${mobilization.slug}.${domain}`
}
return mobilization.... | Change mobilization root path to /mobilizations | Change mobilization root path to /mobilizations
| JavaScript | agpl-3.0 | nossas/bonde-client,nossas/bonde-client,nossas/bonde-client | ---
+++
@@ -1,6 +1,6 @@
import DefaultConfigServer from '~server/config'
-export const mobilizations = () => '/'
+export const mobilizations = () => '/mobilizations'
export const mobilization = (mobilization, domain = DefaultConfigServer.appDomain) => {
if (domain && domain.indexOf('staging') !== -1) {
re... |
d9d6e8e84f038a08d4bdbf33256f7cf8f9d23cd0 | src/app.js | src/app.js | (function (window) {
'use strict';
var hearingTest = HearingTest;
var hearing = hearingTest.init();
var app = new Vue({
el: '#hearing-test-app',
data: {
frequency: 1000
},
methods: {
changeFrequency: function() {
hearing.sound.frequency.value = this.frequency;
}
}
});
}(window));
| (function (window) {
'use strict';
var hearingTest = HearingTest;
var hearing = hearingTest.init();
var app = new Vue({
el: '#hearing-test-app',
data: {
isPlaySound: false,
frequency: 1000
},
methods: {
changeFrequency: function() {
hearing.sound.frequency.value = this.frequency;
}
}
})... | Add a play sound flag | Add a play sound flag
| JavaScript | mit | kubosho/hearing-test-app | ---
+++
@@ -7,6 +7,7 @@
var app = new Vue({
el: '#hearing-test-app',
data: {
+ isPlaySound: false,
frequency: 1000
},
methods: { |
aaa8f64c4ce06e67dc078cb417e085499fb4504d | scripts/views/quizz-view.js | scripts/views/quizz-view.js | var QuizzListView = Backbone.View.extend({
el: '#app',
templateHandlebars: Handlebars.compile(
$('#play-template-handlebars').html()
),
remove: function() {
this.$el.empty();
return this;
},
initialize: function() {
console.log('Initialize in quizz view');
this.myQuizzCollection = ne... | var QuizzListView = Backbone.View.extend({
el: '#app',
templateHandlebars: Handlebars.compile(
$('#play-template-handlebars').html()
),
remove: function() {
this.$el.empty();
return this;
},
shuffleArray: function (o){
for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x =... | Add random on quizz list | Add random on quizz list
| JavaScript | mit | KillianKemps/MovieQuizz,KillianKemps/MovieQuizz | ---
+++
@@ -11,6 +11,11 @@
return this;
},
+ shuffleArray: function (o){
+ for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
+ return o;
+ },
+
initialize: function() {
console.log('Initialize in quizz view');
this.myQuizzCollection = ... |
11f7957362867684b2e30c70944f3496fc6f99b6 | renderer/index.js | renderer/index.js | require('./patches/gherkin')
require('./keyboard/bindings')
const electron = require('electron')
const Cucumber = require('cucumber')
const Options = require('../cli/options')
const Output = require('./output')
const output = new Output()
const options = new Options(electron.remote.process.argv)
process.on('unhandl... | require('./patches/gherkin')
require('./keyboard/bindings')
const electron = require('electron')
const Cucumber = require('cucumber')
const Options = require('../cli/options')
const Output = require('./output')
const output = new Output()
const options = new Options(electron.remote.process.argv)
process.on('unhandl... | Remove console.log about exit code | Remove console.log about exit code
| JavaScript | mit | cucumber/cucumber-electron,featurist/cucumber-electron,featurist/cucumber-electron,cucumber/cucumber-electron,cucumber/cucumber-electron,cucumber/cucumber-electron | ---
+++
@@ -17,7 +17,6 @@
function exitWithCode(code) {
if (options.electronDebug) return
- electron.remote.getGlobal('console').log("EXITING WITH CODE", code)
electron.remote.process.exit(code)
}
|
6a8cd955389226e749afd36b85641cc08ac54023 | feelings/client/lib/router.js | feelings/client/lib/router.js | Router.route('/', function () {
this.layout("layout")
this.render('feelings');
});
| Router.route('/', function () {
this.layout("layout")
this.render('feelings');
}, {name: 'feelings'});
Router.route('/results', function () {
this.layout("layout")
this.render('results');
}, {name: 'results'});
| Add results route; name routes | Add results route; name routes
| JavaScript | agpl-3.0 | GeriLife/feelings,GeriLife/feelings | ---
+++
@@ -1,4 +1,9 @@
Router.route('/', function () {
this.layout("layout")
this.render('feelings');
-});
+}, {name: 'feelings'});
+
+Router.route('/results', function () {
+ this.layout("layout")
+ this.render('results');
+}, {name: 'results'}); |
f8c11d94e363d8d3c8d571723a85b4087cfbe6fd | src/map.js | src/map.js | function ObjectMap(){
this._obj = {};
}
let p = ObjectMap.prototype;
p.set = function( key, val ){
this._obj[ key ] = val;
};
p.delete = function( key ){
this._obj[ key ] = null;
};
p.has = function( key ){
return this._obj[ key ] != null;
};
p.get = function( key ){
return this._obj[ key ];
};
// TODO ... | class ObjectMap {
constructor(){
this._obj = {};
}
set( key, val ){
this._obj[ key ] = val;
return this;
}
delete( key ){
this._obj[ key ] = undefined;
return this;
}
clear(){
this._obj = {};
}
has( key ){
return this._obj[ key ] !== undefined;
}
get( key ){
... | Use class syntax for `Map` | Use class syntax for `Map`
| JavaScript | mit | cytoscape/cytoscape.js,cytoscape/cytoscape.js | ---
+++
@@ -1,24 +1,32 @@
-function ObjectMap(){
- this._obj = {};
+class ObjectMap {
+ constructor(){
+ this._obj = {};
+ }
+
+ set( key, val ){
+ this._obj[ key ] = val;
+
+ return this;
+ }
+
+ delete( key ){
+ this._obj[ key ] = undefined;
+
+ return this;
+ }
+
+ clear(){
+ this._obj = ... |
77e82bf90581e98a95ba5c1f58cf1cbb67e8bdc6 | app/config/auth.js | app/config/auth.js | module.exports = {
settings: {
domain: 'your-domain.auth0.com',
clientID: 'your-client-id',
clientSecret: 'your-client-secret'
},
allow: function(user) {
return true;
},
};
| module.exports = {
settings: {
domain: 'your-domain.auth0.com',
clientID: 'your-client-id',
clientSecret: 'your-client-secret'
},
allow: function() {
return false;
},
};
| Set default for allow method to be false | Set default for allow method to be false
| JavaScript | mit | spleenboy/pallium-cms,spleenboy/pallium-cms | ---
+++
@@ -4,7 +4,7 @@
clientID: 'your-client-id',
clientSecret: 'your-client-secret'
},
- allow: function(user) {
- return true;
+ allow: function() {
+ return false;
},
}; |
e9b59975ca5b1f3584a3fa0f828e015205be28be | app/controllers.js | app/controllers.js | 'use strict';
/* Controllers */
var recordControllers = angular.module('myApp.recordControllers', []);
recordControllers.controller('recordCtrl', ['$scope', '$http', '_',
function($scope, $http, _) {
// Initialize
$scope.distance = '25m';
$scope.style = '自由形';
$scope.submit = function() {
let... | 'use strict';
/* Controllers */
var recordControllers = angular.module('myApp.recordControllers', []);
recordControllers.controller('recordCtrl', ['$scope', '$http', '_',
function($scope, $http, _) {
// Initialize
$scope.distance = '25m';
$scope.style = '自由形';
$scope.submit = function() {
let... | Use relative path for db REST API access | Use relative path for db REST API access
| JavaScript | mit | chopstickexe/swimtrack,chopstickexe/swimtrack | ---
+++
@@ -23,7 +23,7 @@
config.params.style = $scope.style;
}
if ($scope.name) {
- $http.get('http://localhost:3000/db', config)
+ $http.get('/db', config)
.success(function(data) {
data = _.uniq(data).sort(function(a, b) {
if (a.year && b.... |
b3cb93f4b798e08841d9681cf06a783bab62de41 | examples/main-page/main.js | examples/main-page/main.js | window.onload = function() {
d3.json("../examples/data/gitstats.json", function(data) {
data.forEach(function(d) {
d.date = new Date(d.date);
d.name = d.name === "ashwinraman9" ? "aramaswamy" : d.name;
});
var dataset = {data: data, metadata: {}};
var commitSVG = d3.select("#intro-chart")... | window.onload = function() {
d3.json("examples/data/gitstats.json", function(data) {
data.forEach(function(d) {
d.date = new Date(d.date);
d.name = d.name === "ashwinraman9" ? "aramaswamy" : d.name;
});
var dataset = {data: data, metadata: {}};
var commitSVG = d3.select("#intro-chart");
... | Fix it gau! oh godgp | Fix it gau! oh godgp
| JavaScript | mit | palantir/plottable,gdseller/plottable,jacqt/plottable,danmane/plottable,RobertoMalatesta/plottable,RobertoMalatesta/plottable,iobeam/plottable,gdseller/plottable,iobeam/plottable,NextTuesday/plottable,palantir/plottable,softwords/plottable,palantir/plottable,danmane/plottable,RobertoMalatesta/plottable,NextTuesday/plot... | ---
+++
@@ -1,5 +1,5 @@
window.onload = function() {
- d3.json("../examples/data/gitstats.json", function(data) {
+ d3.json("examples/data/gitstats.json", function(data) {
data.forEach(function(d) {
d.date = new Date(d.date);
d.name = d.name === "ashwinraman9" ? "aramaswamy" : d.name; |
36e6a4eabfe79f7e0df25621e4380ad49697aba7 | external-ab-neuter/main.js | external-ab-neuter/main.js | 'use strict';
const release_type = process.config.target_defaults.default_configuration;
const ab_neuter = require(`./build/${release_type}/ab_neuter`);
module.exports = neuter;
function neuter(obj) {
ab_neuter.neuter(ArrayBuffer.isView(obj) ? obj.buffer : obj);
}
| 'use strict';
const ab_neuter = require('./build/Release/ab_neuter');
module.exports = neuter;
function neuter(obj) {
ab_neuter.neuter(ArrayBuffer.isView(obj) ? obj.buffer : obj);
}
| Support Release only to simplify webpack | Support Release only to simplify webpack
| JavaScript | mit | silklabs/silk,silklabs/silk,silklabs/silk,silklabs/silk,silklabs/silk,silklabs/silk | ---
+++
@@ -1,7 +1,6 @@
'use strict';
-const release_type = process.config.target_defaults.default_configuration;
-const ab_neuter = require(`./build/${release_type}/ab_neuter`);
+const ab_neuter = require('./build/Release/ab_neuter');
module.exports = neuter;
|
18ebe527e06ffb04d22da5491d7dde5b40943a1c | packages/truffle-core/lib/testing/deployed.js | packages/truffle-core/lib/testing/deployed.js | // Using web3 for its sha function...
var Web3 = require("web3");
var Deployed = {
makeSolidityDeployedAddressesLibrary: function(mapping) {
var self = this;
var source = "";
source += "pragma solidity ^0.4.6; \n\n library DeployedAddresses {" + "\n";
Object.keys(mapping).forEach(function(name) {
... | // Using web3 for its sha function...
var Web3 = require("web3");
var Deployed = {
makeSolidityDeployedAddressesLibrary: function(mapping) {
var self = this;
var source = "";
source += "pragma solidity ^0.4.6; \n\n library DeployedAddresses {" + "\n";
Object.keys(mapping).forEach(function(name) {
... | Use revert() instead of throw | Use revert() instead of throw
| JavaScript | mit | ConsenSys/truffle | ---
+++
@@ -12,7 +12,7 @@
Object.keys(mapping).forEach(function(name) {
var address = mapping[name];
- var body = "throw;";
+ var body = "revert();";
if (address) {
address = self.toChecksumAddress(address); |
658ba7209b07bb763e6e93592bfefdde9c9ce78a | server/src/app.js | server/src/app.js | const express = require('express')
const bodyParser = require('body-parser')
const cors = require('cors')
const morgan = require('morgan')
const app = express()
// Seting up middleware
app.use(morgan('combined'))
app.use(bodyParser.json())
app.use(cors())
app.get('/', (req, res) => {
res.send('Hello world')
})
app.... | const express = require('express')
const bodyParser = require('body-parser')
const cors = require('cors')
const morgan = require('morgan')
const app = express()
// Seting up middleware
app.use(morgan('combined'))
app.use(bodyParser.json())
app.use(cors())
app.get('/', (req, res) => {
res.send('Hello world')
})
app.... | Test post register response with Postman | Test post register response with Postman
| JavaScript | mit | rahman541/tab-tracker,rahman541/tab-tracker | ---
+++
@@ -19,6 +19,13 @@
})
})
+app.post('/register', (req, res) => {
+ console.log(req.body);
+ res.send({
+ message: `User ${req.body.email}! was registered!`
+ })
+})
+
app.listen(process.env.PORT || 8081, () => {
console.log('Server started at http://127.0.0.1:8081')
}); |
76c112da2263ea398e5da129e1f9663f727d031e | ember-cli-build.js | ember-cli-build.js | 'use strict';
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
const Project = require('ember-cli/lib/models/project');
module.exports = function(defaults) {
let project = Project.closestSync(process.cwd());
project.pkg['ember-addon'].paths = ['sandbox'];
defaults.project = project;
var ap... | 'use strict';
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
const Project = require('ember-cli/lib/models/project');
module.exports = function(defaults) {
let project = Project.closestSync(process.cwd());
project.pkg['ember-addon'].paths = ['sandbox'];
defaults.project = project;
var ap... | Stop including jquery and shims in the output | Stop including jquery and shims in the output
| JavaScript | mit | ember-learn/ember-cli-addon-docs,ember-learn/ember-cli-addon-docs,ember-learn/ember-cli-addon-docs | ---
+++
@@ -12,6 +12,7 @@
var app = new EmberAddon(defaults, {
project,
+ vendorFiles: { 'jquery.js': null, 'app-shims.js': null },
svgJar: {
sourceDirs: [
'public', |
14d9151ba1d0376b1ba9a86761c0aaf9e02d37f6 | ember-cli-build.js | ember-cli-build.js | 'use strict';
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
module.exports = function(defaults) {
let app = new EmberAddon(defaults, {
// Import _all_ Froala Editor files
// for the "dummy" app
'ember-froala-editor': {
plugins : [
'align','char_counter','colors','emot... | 'use strict';
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
module.exports = function(defaults) {
let app = new EmberAddon(defaults, {
'ember-froala-editor': {
plugins : [
'align','char_counter','colors','emoticons','entities','font_family','font_size',
'line_breaker'... | Remove comment about importing all plugins | Remove comment about importing all plugins
No longer the case
| JavaScript | mit | Panman8201/ember-froala-editor,Panman8201/ember-froala-editor,froala/ember-froala-editor,froala/ember-froala-editor | ---
+++
@@ -5,8 +5,6 @@
module.exports = function(defaults) {
let app = new EmberAddon(defaults, {
- // Import _all_ Froala Editor files
- // for the "dummy" app
'ember-froala-editor': {
plugins : [
'align','char_counter','colors','emoticons','entities','font_family','font_size', |
0f5d2e7a73abf567750489748058a75cb6a4989b | ember-cli-build.js | ember-cli-build.js | /* eslint-env node */
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
module.exports = function(defaults) {
var app = new EmberAddon(defaults, {
// Add options here
});
/*
This build file specifies the options for the dummy test app of this
addon, located in `/tests/dummy`
This... | /* eslint-env node */
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
module.exports = function(defaults) {
var app = new EmberAddon(defaults, {
sourcemaps: {
enabled: false,
extensions: ['js'],
}
});
/*
This build file specifies the options for the dummy test app of th... | Disable source map in dev | Disable source map in dev
| JavaScript | mit | masonwan/ember-render-validate,masonwan/ember-render-validate | ---
+++
@@ -3,7 +3,10 @@
module.exports = function(defaults) {
var app = new EmberAddon(defaults, {
- // Add options here
+ sourcemaps: {
+ enabled: false,
+ extensions: ['js'],
+ }
});
/* |
e91126a3233e719eedba767dbcc656750ac0f523 | app/src/upgrade.js | app/src/upgrade.js | var path = require('path');
var fs = require('fs-extra');
function upgradeNeeded(config, callback) {
var oldSyncDir = syncDirWrong(config);
var needsUpgrade = oldSyncDir;
callback(needsUpgrade);
//return oldSyncDir;
}
function syncDirWrong(config) {
for (var r in config.roots) {
var old... | var path = require('path');
var fs = require('fs-extra');
function upgradeNeeded(config, callback) {
var oldSyncDir = syncDirWrong(config);
var needsUpgrade = oldSyncDir;
callback(needsUpgrade);
//return oldSyncDir;
}
function syncDirWrong(config) {
for (var r in config.roots) {
var old... | Add help for upgrading to latest version. | Add help for upgrading to latest version.
| JavaScript | mit | dynamicdan/filesync,dynamicdan/sn-filesync,Echo3ToEcho7/filesync | ---
+++
@@ -16,6 +16,7 @@
var oldDir = path.join(r, '.sync');
//console.log('Checking for old dir: ' + oldDir);
if (fs.existsSync(oldDir)) {
+ console.log('Please remove ' + oldDir + ' and re-run with "--resync"');
return true;
}
} |
90ab18f216757cb67af21d2b28d1da3cf4e8b1b4 | source/components/SiteHeader.js | source/components/SiteHeader.js | import React from 'react'
import { Link } from 'react-router-dom'
import Facebook from '../components/Facebook'
import SearchBox from '../components/SearchBox'
const SiteHeader = ({ user }) => (
<header className="site-header">
<div className="logo icon-axis">
<Link to="/"><b>Axis</b>RPG</Link>
</div>
... | import React from 'react'
import { Link } from 'react-router-dom'
import Facebook from '../components/Facebook'
import SearchBox from '../components/SearchBox'
const SiteHeader = ({ user }) => (
<header className="site-header">
<Link className="logo icon-axis" to="/">
<span className="name"><b>Axis</b>RPG<... | Add Axis icon to the clickable area of logo | Add Axis icon to the clickable area of logo
| JavaScript | mit | TroyAlford/axis-wiki,TroyAlford/axis-wiki | ---
+++
@@ -5,9 +5,9 @@
const SiteHeader = ({ user }) => (
<header className="site-header">
- <div className="logo icon-axis">
- <Link to="/"><b>Axis</b>RPG</Link>
- </div>
+ <Link className="logo icon-axis" to="/">
+ <span className="name"><b>Axis</b>RPG</span>
+ </Link>
<SearchBox /... |
5a26dfebaf9bf2a9604df92f6dd029c43ab9bddc | troposphere/static/js/components/modals/instance_launch/ProjectOption.react.js | troposphere/static/js/components/modals/instance_launch/ProjectOption.react.js | /** @jsx React.DOM */
define(
[
'react',
'backbone'
],
function (React, Backbone) {
return React.createClass({
propTypes: {
project: React.PropTypes.instanceOf(Backbone.Model).isRequired
},
render: function () {
var projectName = this.props.project.get('name');
... | /** @jsx React.DOM */
define(
[
'react',
'backbone'
],
function (React, Backbone) {
return React.createClass({
propTypes: {
project: React.PropTypes.instanceOf(Backbone.Model).isRequired
},
render: function () {
var project = this.props.project;
return (
... | Remove alternate statement for Default project | Remove alternate statement for Default project
| JavaScript | apache-2.0 | CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend | ---
+++
@@ -14,11 +14,11 @@
},
render: function () {
- var projectName = this.props.project.get('name');
- if(projectName === "Default") projectName = "Do not add to a project";
+ var project = this.props.project;
+
return (
- <option value={this.props.project.id... |
1ea825202a2b67d05e6be5f9fc1cf3009f263764 | server/server.js | server/server.js | const express = require('express');
const mongoose = require('mongoose');
const app = express();
mongoose.connect('mongodb://localhost/speechdoctor');
require('./config/middleware')(app, express);
require('./config/routes.js')(app);
const port = process.env.PORT || 8080;
app.listen(port);
console.log('Listening o... | const express = require('express');
const mongoose = require('mongoose');
const app = express();
mongoose.connect('mongodb://localhost/speechdoctor');
require('./config/middleware')(app, express);
require('./config/routes.js')(app);
const port = process.env.PORT || 80;
app.listen(port);
console.log('Listening on ... | Change port number from 8080 to 80 for deployment | Change port number from 8080 to 80 for deployment
| JavaScript | mit | nonchalantkettle/SpeechDoctor,nonchalantkettle/SpeechDoctor,alexxisroxxanne/SpeechDoctor,alexxisroxxanne/SpeechDoctor | ---
+++
@@ -8,7 +8,7 @@
require('./config/middleware')(app, express);
require('./config/routes.js')(app);
-const port = process.env.PORT || 8080;
+const port = process.env.PORT || 80;
app.listen(port);
|
30a571553b09a4e221445f9f0292fd9da449c3ce | app/assets/javascripts/student_profile/provided_by_educator_dropdown.js | app/assets/javascripts/student_profile/provided_by_educator_dropdown.js | (function() {
window.shared || (window.shared = {});
var dom = window.shared.ReactHelpers.dom;
var ProvidedByEducatorDropdown = window.shared.ProvidedByEducatorDropdown = React.createClass({
displayName: 'ProvidedByEducatorDropdown',
propTypes: {
educatorsForServicesDropdown: React.PropTypes.array... | (function() {
window.shared || (window.shared = {});
var dom = window.shared.ReactHelpers.dom;
var ProvidedByEducatorDropdown = window.shared.ProvidedByEducatorDropdown = React.createClass({
displayName: 'ProvidedByEducatorDropdown',
propTypes: {
educatorsForServicesDropdown: React.PropTypes.array... | Add placeholder text and suggest Last Name, First Name | Add placeholder text and suggest Last Name, First Name
| JavaScript | mit | studentinsights/studentinsights,jhilde/studentinsights,jhilde/studentinsights,jhilde/studentinsights,jhilde/studentinsights,studentinsights/studentinsights,erose/studentinsights,erose/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights,erose/studentinsights,erose/studentinsights | ---
+++
@@ -14,6 +14,7 @@
return dom.input({
className: 'ProvidedByEducatorDropdown',
onChange: this.props.onChange,
+ placeholder: 'Last Name, First Name...',
style: {
marginTop: 2,
fontSize: 14, |
9b00021f5bf69a6d76e26543a527802319d6cdd3 | grunt-tasks/grunt-babel.js | grunt-tasks/grunt-babel.js | module.exports = function gruntBabel(grunt) {
grunt.config('babel', {
options: {
sourceMap: false,
modules: 'amd',
moduleIds: true,
moduleRoot: 'crm',
sourceRoot: 'src',
blacklist: [
'strict',
],
},
dist: {
files: [{
expand: true,
cwd... | module.exports = function gruntBabel(grunt) {
grunt.config('babel', {
options: {
sourceMaps: 'inline',
modules: 'amd',
moduleIds: true,
moduleRoot: 'crm',
sourceRoot: 'src',
blacklist: [
'strict',
],
},
dist: {
files: [{
expand: true,
... | Enable inline sourcemaps for better ES6 debugging. | Enable inline sourcemaps for better ES6 debugging.
| JavaScript | apache-2.0 | Saleslogix/argos-saleslogix,Saleslogix/argos-saleslogix,Saleslogix/argos-saleslogix,Saleslogix/argos-saleslogix | ---
+++
@@ -1,7 +1,7 @@
module.exports = function gruntBabel(grunt) {
grunt.config('babel', {
options: {
- sourceMap: false,
+ sourceMaps: 'inline',
modules: 'amd',
moduleIds: true,
moduleRoot: 'crm', |
8f220780ef56b5b3c010c3368e83a86452ef3042 | assets/js/index.js | assets/js/index.js | function ready(fn) {
if (document.readyState != 'loading'){
fn();
} else {
document.addEventListener('DOMContentLoaded', fn);
}
}
function previousElementSibling( elem ) {
do {
elem = elem.previousSibling;
} while ( elem && elem.nodeType !== 1 );
return elem;
}
function pullPullQuotes(){
var... | function previousElementSibling( elem ) {
do {
elem = elem.previousSibling;
} while ( elem && elem.nodeType !== 1 );
return elem;
}
function pullPullQuotes(){
var pullquotes = document.getElementsByClassName('pullquote');
for (var i = 0; i < pullquotes.length; i++) {
var el = pullquotes[i];
for (... | Simplify js ready function (and make it work…) | Simplify js ready function (and make it work…)
| JavaScript | mit | curiositry/mnml-ghost-theme,omphalosskeptic/mnml-ghost-theme,omphalosskeptic/mnml-ghost-theme | ---
+++
@@ -1,11 +1,3 @@
-function ready(fn) {
- if (document.readyState != 'loading'){
- fn();
- } else {
- document.addEventListener('DOMContentLoaded', fn);
- }
-}
-
function previousElementSibling( elem ) {
do {
elem = elem.previousSibling;
@@ -33,11 +25,8 @@
}
}
-ready(pullPullQuotes());
... |
623da4bb405c483555eb97857be9b675437230bb | src/Store.js | src/Store.js | import Reflux from 'reflux';
import Actions from './Actions';
import Handlers from './Handlers';
export default class Store extends Reflux.Store {
constructor() {
super();
this.state = {
retrievingLocation: false,
fetchingData: false,
radius: process.env.REACT_APP_DEFAULT_RADIUS,
addr... | import Reflux from 'reflux';
import Actions from './Actions';
import Handlers from './Handlers';
export default class Store extends Reflux.Store {
constructor() {
super();
this.state = {
retrievingLocation: false,
fetchingData: false,
radius: process.env.REACT_APP_DEFAULT_RADIUS,
addr... | Remove useless var in store | Remove useless var in store
| JavaScript | mit | mdcarter/lunchfinder.io,mdcarter/lunchfinder.io | ---
+++
@@ -12,8 +12,7 @@
address: null,
latitude: null,
longitude: null,
- restaurant: null,
- excludedCategories: []
+ restaurant: null
};
this.handlers = new Handlers(); |
73e797b3b9765455d66cdc7ee9edb67d2e321689 | BookShelf.Mobile/views/BookAdd.js | BookShelf.Mobile/views/BookAdd.js | BookShelf.BookAdd = function(params) {
return $.extend(BookShelf.BookForm(params), {
resetBook: function() {
this.book.title("");
this.book.author("");
},
save: function() {
BookShelf.db.books.add(this.getBook());
BookShelf.app.back();
... | BookShelf.BookAdd = function(params) {
return $.extend(BookShelf.BookForm(params), {
resetBook: function() {
this.book.title("");
this.book.author("");
this.book.status(params.status);
this.book.startDate(new Date());
this.book.finishDate(new Da... | Reset book status and start/finish dates on add form | Views: Reset book status and start/finish dates on add form
| JavaScript | mit | tabalinas/BookShelf,tabalinas/BookShelf | ---
+++
@@ -5,6 +5,9 @@
resetBook: function() {
this.book.title("");
this.book.author("");
+ this.book.status(params.status);
+ this.book.startDate(new Date());
+ this.book.finishDate(new Date());
},
save: function() { |
7361ad915b14e267ac9848cc3c88f37fd3404849 | server/scoring.js | server/scoring.js | // TODO: should the baseScore be stored, and updated at vote time?
// This interface should change and become more OO, this'll do for now
var Scoring = {
// re-run the scoring algorithm on a single object
updateObject: function(object) {
if(isNaN(object.score)){
object.score=0;
}
// just count t... | // TODO: should the baseScore be stored, and updated at vote time?
// This interface should change and become more OO, this'll do for now
var Scoring = {
// re-run the scoring algorithm on a single object
updateObject: function(object) {
if(isNaN(object.score)){
object.score=0;
}
// just count t... | Change to updating every 10s | Change to updating every 10s | JavaScript | mit | IQ2022/Telescope,basehaar/sumocollect,jparyani/Telescope,GeoffAbbott/dfl,STANAPO/Telescope,gzingraf/GreenLight-Pix,Daz2345/dhPulse,sethbonnie/StartupNews,eruwinu/presto,jkuruzovich/projecthunt,TribeMedia/Screenings,Leeibrah/telescope,jonmc12/heypsycho,dima7b/stewardsof,cydoval/Telescope,aichane/digigov,liamdarmody/tele... | ---
+++
@@ -34,7 +34,9 @@
}
}
-Meteor.Cron = new Cron();
-Meteor.Cron.addJob(1, function() {
+// tick every second
+Meteor.Cron = new Cron(1000);
+// update scores every 10 seconds
+Meteor.Cron.addJob(10, function() {
Scoring.updateScores();
}) |
b114afe32fdcbedc20af613e940bf8196b069b47 | src/index.js | src/index.js | import React, { Component } from 'react';
import ReactDom from 'react-dom';
import YTSearch from 'youtube-api-search';
import SearchBar from './components/search_bar';
import VideoList from './components/video_list';
// const API_KEY = 'PLACE_YOUR_API_KEY_HERE';
class App extends Component {
constructor (props) {
s... | import React, { Component } from 'react';
import ReactDom from 'react-dom';
import YTSearch from 'youtube-api-search';
import SearchBar from './components/search_bar';
import VideoList from './components/video_list';
import VideoDetail from './components/video_detail';
// const API_KEY = 'PLACE_YOUR_API_KEY_HERE';
cla... | Add the video detail component. | Add the video detail component.
| JavaScript | mit | JosephLeon/redux-simple-starter-tutorial,JosephLeon/redux-simple-starter-tutorial | ---
+++
@@ -3,6 +3,7 @@
import YTSearch from 'youtube-api-search';
import SearchBar from './components/search_bar';
import VideoList from './components/video_list';
+import VideoDetail from './components/video_detail';
// const API_KEY = 'PLACE_YOUR_API_KEY_HERE';
class App extends Component {
@@ -21,6 +22,7 @... |
911f44c4a6ffc730060687e589cbf63d0a7be4fc | src/index.js | src/index.js | import { setItemsActionCreator as setItems } from './setItems'
import { rangeToActionCreator as rangeTo } from './rangeTo'
import { removeActionCreator as remove } from './remove'
import { removeAllActionCreator as removeAll } from './removeAll'
import { replaceActionCreator as replace } from './replace'
import { toggl... | import { setItemsActionCreator as setItems } from './setItems'
import { rangeToActionCreator as rangeTo } from './rangeTo'
import { removeActionCreator as remove } from './remove'
import { removeAllActionCreator as removeAll } from './removeAll'
import { replaceActionCreator as replace } from './replace'
import { toggl... | Remove code of old API | Remove code of old API
- bound `actions` and `selectors` will be provided by `bindToSelection`
| JavaScript | mit | actano/yourchoice-redux | ---
+++
@@ -23,6 +23,5 @@
export {
actionTypes,
reducer,
- selectors,
bindToSelection,
} |
6254538340e9e0390f03fa810f5c06404e36e48f | src/index.js | src/index.js | // We load the Safari fix before document-register-element because DRE
// overrides attachShadow() and calls back the one it finds on HTMLElement.
import './fix/safari';
import 'document-register-element';
import '@webcomponents/shadydom';
import '@webcomponents/shadycss';
| // We load the Safari fix before document-register-element because DRE
// overrides attachShadow() and calls back the one it finds on HTMLElement.
import './fix/safari';
import 'document-register-element/build/document-register-element';
import '@webcomponents/shadydom';
import '@webcomponents/shadycss';
| Fix to import the browser version of document-register-element. | fix: Fix to import the browser version of document-register-element.
#26
| JavaScript | mit | skatejs/web-components | ---
+++
@@ -1,6 +1,6 @@
// We load the Safari fix before document-register-element because DRE
// overrides attachShadow() and calls back the one it finds on HTMLElement.
import './fix/safari';
-import 'document-register-element';
+import 'document-register-element/build/document-register-element';
import '@webco... |
35f06cce46eef1d1dadd3c7b512dd2378d1ea9d5 | src/jokes.js | src/jokes.js | define(['lib/def', 'handler'], function(Def, Handler) {
var Jokes = Def.type(Handler, function(source) {
this.constructor.__super__.call(this);
this.def_prop('source', source);
});
Jokes.def_method(function next() {
return this.source.next();
});
Jokes.def_method(function match(msg) {
retur... | define(['lib/def', 'handler'], function(Def, Handler) {
var Jokes = Def.type(Handler, function(source) {
this.constructor.__super__.call(this);
this.def_prop('source', source);
});
Jokes.def_method(function next() {
return this.source.next();
});
Jokes.def_method(function match(msg) {
retur... | Fix bug where Jokes.on_message did not pass on non-matching messages. | Fix bug where Jokes.on_message did not pass on non-matching messages.
| JavaScript | mit | bassettmb/slack-bot-dev | ---
+++
@@ -14,7 +14,7 @@
});
Jokes.def_method(function on_message(msg, cont) {
- return this.match(msg.text) ? msg.reply(this.next(), cont) : cont();
+ return this.match(msg.text) ? msg.reply(this.next(), cont) : cont(msg);
});
return Jokes; |
74a4b20404fc506fef118a6553e171c0967f5f40 | src/preload.js | src/preload.js | 'use strict';
console.log('Loading preload script');
const { ipcRenderer } = require('electron');
const OldNotification = Notification;
Notification = function(title, options) {
const notificationSettings = ipcRenderer.sendSync('get-notification-settings', {
title,
body: options.body,
isDirect: !op... | 'use strict';
console.log('Loading preload script');
const { ipcRenderer } = require('electron');
const OldNotification = Notification;
Notification = function(title, options) {
const notificationSettings = ipcRenderer.sendSync('get-notification-settings', {
title,
body: options.body,
isDirect: !op... | Add empty close funciton to silence error | Add empty close funciton to silence error
| JavaScript | mit | Faithlife/FaithlifeMessages | ---
+++
@@ -13,7 +13,7 @@
});
if (notificationSettings.ignoreNotification) {
- return {};
+ return { close: function() {} };
} else {
return new OldNotification(title, {
body: options.body, |
7510b80e8b5aa5c34b91825a29eb9443bf6387fa | src/components/VmDisks/utils.js | src/components/VmDisks/utils.js |
import { locale as appLocale } from '../../intl'
function localeCompare (a, b, locale = appLocale) {
return a.localeCompare(b, locale, { numeric: true })
}
/*
* Sort an Immutable List of Maps (set of disks) for display on the VmDisks list.
* Bootable drives sort first, then sorted number aware alphabetically.
*... |
import { locale as appLocale } from '../../intl'
function localeCompare (a, b, locale = appLocale) {
return a.localeCompare(b, locale, { numeric: true })
}
/*
* Sort an Immutable List of Maps (set of disks) for display on the VmDisks list.
* Bootable drives sort first, then sorted number aware alphabetically.
*... | Improve readability of ternary operator | Improve readability of ternary operator
| JavaScript | apache-2.0 | mareklibra/userportal,oVirt/ovirt-web-ui,mareklibra/userportal,oVirt/ovirt-web-ui,mareklibra/userportal,oVirt/ovirt-web-ui,mareklibra/userportal | ---
+++
@@ -14,8 +14,8 @@
const aBoot = a.get('bootable')
const bBoot = b.get('bootable')
- return aBoot && !bBoot ? -1
- : !aBoot && bBoot ? 1
- : localeCompare(a.get('name'), b.get('name'), locale)
+ return (aBoot && !bBoot) ? -1 : (
+ (!aBoot && bBoot) ? 1 : localeCompare(a.get('... |
8bad7a944039d5b374bf963c97c3428c05eb7980 | jenkins-show-advanced.user.js | jenkins-show-advanced.user.js | /*
Copyright 2015 Ops For Developers
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 ... | /*
Copyright 2015 Ops For Developers
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 ... | Change the @match metadata to the */job/*/configure pattern to be as generic as possible | Change the @match metadata to the */job/*/configure pattern to be as generic as possible
| JavaScript | apache-2.0 | opsfordevelopers/jenkins-show-advanced | ---
+++
@@ -17,8 +17,7 @@
// @name Jenkins Show Advanced
// @namespace http://opsfordevelopers.com/jenkins/userscripts
// @description Automatically shows the configuration hidden beneath the "Advanced..." buttons in Jenkins jobs
-// @match https://*/jenkins/*
-// @match http://*/jenkins/*
+//... |
23b1947d2b1aec2325178c8d426167c74e414e74 | jsbeautifierSettingsTweaks.js | jsbeautifierSettingsTweaks.js | /*! jsbeautifierSettingsTweaks.js v0.1.1 by ryanpcmcquen */
(function () {
'use strict';
window.addEventListener('load', function () {
// set any vars you want to change here
var jslintCheckbox = document.getElementById('jslint-happy');
var tabSize = document.getElementById('tabsize');
// set you... | /*! jsbeautifierSettingsTweaks.js v0.2.0 by ryanpcmcquen */
window.addEventListener('load', function () {
'use strict';
// Set any vars you want to change here:
var jslintCheckbox = document.getElementById('jslint-happy');
var tabSize = document.getElementById('tabsize');
var wrapLength = document.getElementB... | Add 80 character wrap length. | Add 80 character wrap length. | JavaScript | mpl-2.0 | ryanpcmcquen/jsbeautifierSettingsTweaks.js | ---
+++
@@ -1,16 +1,13 @@
-/*! jsbeautifierSettingsTweaks.js v0.1.1 by ryanpcmcquen */
-(function () {
+/*! jsbeautifierSettingsTweaks.js v0.2.0 by ryanpcmcquen */
+window.addEventListener('load', function () {
+ 'use strict';
+ // Set any vars you want to change here:
+ var jslintCheckbox = document.getElementByI... |
f439ac809210f9dbfaf176bdff00569f7dcc4fa6 | source/helpers.js | source/helpers.js | /**
* Truncate a string to the given length.
*
* @param string The string to truncate.
* @param length The length to truncate by.
*
* @returns {string}
*/
export const truncateString = (string, length) => {
return string.slice(0, length) + '...';
};
export const formatRant = (rant) => {
return {
... | /**
* Truncate a string to the given length.
*
* @param string The string to truncate.
* @param length The length to truncate by.
*
* @returns {string}
*/
export const truncateString = (string, length) => {
return string.slice(0, length) + '...';
};
export const formatRant = (rant) => {
return {
... | Change link URLs to avoid redirect | Change link URLs to avoid redirect
| JavaScript | mit | nblackburn/devrant-bot | ---
+++
@@ -17,8 +17,8 @@
author_name: rant.user_username,
image_url: rant.attached_image.url,
title: truncateString(rant.text, 100),
- title_link: `https://devrant.io/rants/${rant.id}?ref=devrant-bot`,
- author_link: `https://devrant.io/users/${rant.user_username}?ref=devrant... |
8a77f3189ac621c3530c006500f8b5e89a365585 | src/app/logger.js | src/app/logger.js | /* global DEBUG */
/* eslint-disable no-console */
import { argv } from "nwjs/argv";
import Logger from "utils/Logger";
const { logDebug, logError } = new Logger( "Application" );
const onError = async ( type, err, debug ) => {
if ( DEBUG ) {
console.error( type, err, debug );
}
try {
await logError( type ? ... | /* global DEBUG */
/* eslint-disable no-console */
import Ember from "ember";
import { argv } from "nwjs/argv";
import Logger from "utils/Logger";
const { logDebug, logError } = new Logger( "Application" );
const onError = async ( type, err, debug ) => {
if ( DEBUG ) {
console.error( type, err, debug );
}
try ... | Fix ErrorEvent logging + add Ember error listener | Fix ErrorEvent logging + add Ember error listener
| JavaScript | mit | streamlink/streamlink-twitch-gui,streamlink/streamlink-twitch-gui,chhe/livestreamer-twitch-gui,streamlink/streamlink-twitch-gui,chhe/livestreamer-twitch-gui,chhe/livestreamer-twitch-gui | ---
+++
@@ -1,5 +1,6 @@
/* global DEBUG */
/* eslint-disable no-console */
+import Ember from "ember";
import { argv } from "nwjs/argv";
import Logger from "utils/Logger";
@@ -19,7 +20,8 @@
process.on( "uncaughtException", e => onError( "uncaughtException", e ) );
window.addEventListener( "unhandledrejectio... |
fa3bc8b524f281d8bae728aa556cba6bc45c0566 | src/webroot/js/quickSearch.js | src/webroot/js/quickSearch.js | //autocomplete for organism search
$("#search_organism").autocomplete({
position: {
my: "right top", at: "right bottom"
},
source: function (request, response) {
var $search = request.term;
$.ajax({
url: WebRoot.concat("/ajax/listing/Organisms"),
data: {term: ... | //autocomplete for organism search
$("#search_organism").autocomplete({
position: {
my: "right top", at: "right bottom"
},
source: function (request, response) {
var $search = request.term;
$.ajax({
url: WebRoot.concat("/ajax/listing/Organisms"),
data: {term: ... | Add onclick function for button. The function is called after submitting the search. It gets the value of the search field and get the data objects via ajax | Add onclick function for button. The function is called after submitting the search. It gets the value of the search field and get the data objects via ajax
| JavaScript | mit | molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec | ---
+++
@@ -25,3 +25,16 @@
};
+$("#btn_search_organism").click(function(){
+ $searchTerm = $("#search_organism").val();
+ $.ajax({
+ url: WebRoot.concat("/ajax/listing/Organisms"),
+ data: {limit: 500, search: $searchTerm},
+ dataType: "json",
+ success: function (data) {
+ ... |
fded4d32e273e3d2183005c803bcecc68fa616e0 | spec/main-spec.js | spec/main-spec.js | 'use strict'
describe('StreamPromise', function() {
const StreamPromise = require('../')
const FS = require('fs')
it('works', function() {
waitsForPromise(function() {
return StreamPromise.create(FS.createReadStream(`${__dirname}/fixtures/something.txt`))
.then(function(contents) {
exp... | 'use strict'
describe('StreamPromise', function() {
const StreamPromise = require('../')
const FS = require('fs')
it('works', function() {
waitsForPromise(function() {
return StreamPromise.create(FS.createReadStream(`${__dirname}/fixtures/something.txt`))
.then(function(contents) {
exp... | Add specs for rejecting promise on stream error | :new: Add specs for rejecting promise on stream error
| JavaScript | mit | steelbrain/stream-promise | ---
+++
@@ -22,4 +22,16 @@
})
})
})
+ it('rejects promise on stream error', function() {
+ waitsForPromise(function() {
+ let Threw = false
+ return StreamPromise.create(FS.createReadStream(`/etc/some-non-existing-file`))
+ .catch(function(e) {
+ Threw = true
+ })... |
13ddf46c44933bcc21a37fa626e723729d7768c2 | src/engine/scene/text/enable.js | src/engine/scene/text/enable.js | // Dependencies
import 'engine/scene/sprites/enable';
// Loader middleware
import bitmap_font_parser from './bitmap_font_parser';
import { loader_use_procs } from 'engine/registry';
loader_use_procs.push(bitmap_font_parser);
// Renderer
// Class
export { default as BitmapText } from './BitmapText';
export { default ... | // Dependencies
import 'engine/scene/sprites/enable';
// Loader middleware
import bitmap_font_parser from './bitmap_font_parser';
import { loader_use_procs } from 'engine/registry';
loader_use_procs.push(bitmap_font_parser);
// Register to global node class map
import { node_class_map } from 'engine/registry';
impor... | Add Text and BitmapText to node class map | Add Text and BitmapText to node class map
| JavaScript | mit | pixelpicosean/voltar,pixelpicosean/voltar | ---
+++
@@ -6,8 +6,11 @@
import { loader_use_procs } from 'engine/registry';
loader_use_procs.push(bitmap_font_parser);
-// Renderer
+// Register to global node class map
+import { node_class_map } from 'engine/registry';
-// Class
-export { default as BitmapText } from './BitmapText';
-export { default as Text... |
4da6eb8cee0e4463bd7436da58c1caf352ae6c31 | test-loader.js | test-loader.js | /* globals requirejs, require */
QUnit.config.urlConfig.push({ id: 'nojshint', label: 'Disable JSHint'});
// TODO: load based on params
for (var moduleName in requirejs.entries) {
var shouldLoad;
if (moduleName.match(/-test$/)) { shouldLoad = true; }
if (!QUnit.urlParams.nojshint && moduleName.match(/\.jshint$... | /* globals requirejs, require */
QUnit.config.urlConfig.push({ id: 'nojshint', label: 'Disable JSHint'});
// TODO: load based on params
for (var moduleName in requirejs.entries) {
var shouldLoad;
if (moduleName.match(/[-_]test$/)) { shouldLoad = true; }
if (!QUnit.urlParams.nojshint && moduleName.match(/\.jshi... | Allow tests to be underscored. | Allow tests to be underscored.
This is to support legacy projects that are still using underscored
names (looking at you backburner).
| JavaScript | mit | ember-cli/ember-cli-test-loader | ---
+++
@@ -6,7 +6,7 @@
for (var moduleName in requirejs.entries) {
var shouldLoad;
- if (moduleName.match(/-test$/)) { shouldLoad = true; }
+ if (moduleName.match(/[-_]test$/)) { shouldLoad = true; }
if (!QUnit.urlParams.nojshint && moduleName.match(/\.jshint$/)) { shouldLoad = true; }
if (shouldLoad... |
97aeed066aee1b166e7c635755f275bf58eb530c | ngrinder-controller/src/main/resources/ngrinder_home_template/process_and_thread_policy.js | ngrinder-controller/src/main/resources/ngrinder_home_template/process_and_thread_policy.js | function getProcessCount(total) {
if (total < 2) {
return 1;
}
if (total > 80) {
return parseInt(total / 30);
}
return 2;
}
function getThreadCount(total) {
if (total < 2) {
return 1;
}
if (total > 80) {
return parseInt(total / (parseInt(total / 30)));
}
return parseInt(total / 2 ... | function getProcessCount(total) {
if (total < 2) {
return 1;
}
var processCount = 2;
if (total > 80) {
processCount = parseInt(total / 40) + 1;
}
if (processCount > 20) {
processCount = 20;
}
return processCount;
}
function getThreadCount(total) {
var processCount = getProcessCount(total);
return ... | Modify process and thread calc to support vuser more than 600. | [NGRINDER-495] Modify process and thread calc to support vuser more than
600. | JavaScript | apache-2.0 | bwahn/ngrinder,nanpa83/ngrinder,bwahn/ngrinder,SRCB-CloudPart/ngrinder,chengaomin/ngrinder,ropik/ngrinder,songeunwoo/ngrinder,chengaomin/ngrinder,SRCB-CloudPart/ngrinder,ropik/ngrinder,GwonGisoo/ngrinder,songeunwoo/ngrinder,bwahn/ngrinder,SRCB-CloudPart/ngrinder,ropik/ngrinder,SRCB-CloudPart/ngrinder,songeunwoo/ngrinde... | ---
+++
@@ -2,18 +2,20 @@
if (total < 2) {
return 1;
}
+
+ var processCount = 2;
+
if (total > 80) {
- return parseInt(total / 30);
+ processCount = parseInt(total / 40) + 1;
}
- return 2;
+
+ if (processCount > 20) {
+ processCount = 20;
+ }
+ return processCount;
}
function getThreadCount(tot... |
ad8527e1d63d99f14f956b69a3a52e018b4b3058 | src/js/single/committee/edit.js | src/js/single/committee/edit.js | $(function () {
'use strict';
var $coordinator_select = $('#coordinator_id');
var $group_select = $('#group_id');
$coordinator_select.select2();
$group_select.select2();
function set_group_users() {
var group_id = $group_select.val();
$.get('/api/group/users/' + group_id, {},... | $(function () {
'use strict';
var $coordinator_select = $('#coordinator_id');
var $group_select = $('#group_id');
function set_group_users() {
var group_id = $group_select.val();
$.get('/api/group/users/' + group_id, {}, function (data) {
$coordinator_select.empty();
... | Remove select2 again, because that sucked | Remove select2 again, because that sucked
| JavaScript | mit | viaict/viaduct,viaict/viaduct,viaict/viaduct,viaict/viaduct,viaict/viaduct | ---
+++
@@ -3,9 +3,6 @@
var $coordinator_select = $('#coordinator_id');
var $group_select = $('#group_id');
-
- $coordinator_select.select2();
- $group_select.select2();
function set_group_users() {
var group_id = $group_select.val(); |
3124a0955dbedcd57b78858a5c7af9f197bb3d68 | src/orm-tests.js | src/orm-tests.js | /* eslint-disable no-unused-expressions */
import { expect } from 'chai';
export default function orm (people, _ids, errors) {
describe('Feathers ORM Specific Tests', () => {
it('wraps an ORM error in a feathers error', () => {
return people.create({}).catch(error =>
expect(error instanceof errors... | /* eslint-disable no-unused-expressions */
import { expect } from 'chai';
export default function orm (people, errors, idProp = 'id') {
describe('Feathers ORM Common Tests', () => {
it('wraps an ORM error in a feathers error', () => {
return people.create({}).catch(error => {
expect(error instance... | Update ORM tests to ensure plain objects are returned | Update ORM tests to ensure plain objects are returned
| JavaScript | mit | feathersjs/feathers-service-tests | ---
+++
@@ -2,12 +2,73 @@
import { expect } from 'chai';
-export default function orm (people, _ids, errors) {
- describe('Feathers ORM Specific Tests', () => {
+export default function orm (people, errors, idProp = 'id') {
+ describe('Feathers ORM Common Tests', () => {
it('wraps an ORM error in a feathe... |
848ee33109b35c83ac846a91d106e9268d1336d4 | test/app.spec.js | test/app.spec.js | import { expect } from 'chai';
describe('smoke test', () => {
it('run a test', () => {
expect(true).to.equal(true);
});
});
| import { expect } from 'chai';
describe('smoke test', () => {
it('run a test', () => {
expect(true).to.equal(false);
});
});
| Make the fail the test to demo CircleCI | CSRA-000: Make the fail the test to demo CircleCI
| JavaScript | mit | noms-digital-studio/csra-app,noms-digital-studio/csra-app,noms-digital-studio/csra-app | ---
+++
@@ -2,6 +2,6 @@
describe('smoke test', () => {
it('run a test', () => {
- expect(true).to.equal(true);
+ expect(true).to.equal(false);
});
}); |
eb3311239dac49183579a91ad99d9f1e6733e0bc | test/fixtures.js | test/fixtures.js | 'use strict'
const packageJson = require('../package')
const channelHeader = `Node.js-${process.version}-SDK-v${packageJson.version}`
module.exports = {
reqWithBody: {
reqheaders: {
'X-App-Id': 'node-sdk-test-id',
'X-App-Token': 'node-sdk-test-secret',
'X-Voucherify-Channel': channelHeader,
... | 'use strict'
// FIXME leaving var to satisfy tests for node v0.10 and v0.12
var packageJson = require('../package')
var channelHeader = `Node.js-${process.version}-SDK-v${packageJson.version}`
module.exports = {
reqWithBody: {
reqheaders: {
'X-App-Id': 'node-sdk-test-id',
'X-App-Token': 'node-sdk-te... | Use var to satisfy tests for prehistoric nodejs versions | Use var to satisfy tests for prehistoric nodejs versions
| JavaScript | mit | voucherifyio/voucherify-nodejs-sdk,rspective/voucherify-nodejs-sdk | ---
+++
@@ -1,7 +1,8 @@
'use strict'
-const packageJson = require('../package')
-const channelHeader = `Node.js-${process.version}-SDK-v${packageJson.version}`
+// FIXME leaving var to satisfy tests for node v0.10 and v0.12
+var packageJson = require('../package')
+var channelHeader = `Node.js-${process.version}-S... |
d9d8003d5a91f8849b6d63e78c95a384f4643ef6 | bin/execbin.js | bin/execbin.js | #!/usr/bin/env node
var Janeway = require('../lib/init.js'),
libpath = require('path'),
main_file;
// Get the wanted file to require
main_file = libpath.resolve(process.cwd(), process.argv[2]);
// Remove janeway from the arguments array
process.argv.splice(1, 1);
// Start initializing janeway
Janeway.start(f... | #!/usr/bin/env node
var Janeway = require('../lib/init.js'),
libpath = require('path'),
main_file;
// Get the wanted file to require
if (process.argv[2]) {
main_file = libpath.resolve(process.cwd(), process.argv[2]);
}
// Remove janeway from the arguments array
process.argv.splice(1, 1);
// Start initializ... | Allow lauching without specifying main_file | Allow lauching without specifying main_file
| JavaScript | mit | skerit/janeway | ---
+++
@@ -4,7 +4,9 @@
main_file;
// Get the wanted file to require
-main_file = libpath.resolve(process.cwd(), process.argv[2]);
+if (process.argv[2]) {
+ main_file = libpath.resolve(process.cwd(), process.argv[2]);
+}
// Remove janeway from the arguments array
process.argv.splice(1, 1);
@@ -17,8 +19,1... |
df476029bd49caf6de34eeee05ef3af83649173b | bin/m3u-export.js | bin/m3u-export.js | #!/usr/bin/env node
var LineReader = require('line-by-line'),
minimist = require('minimist'),
exec = require('exec'),
path = require('path'),
fs = require('fs');
var filenames = minimist(process.argv.slice(2))._;
filenames.forEach(function (filename) {
if (!fs.existsSync(filen... | #!/usr/bin/env node
var LineReader = require('line-by-line'),
minimist = require('minimist'),
exec = require('exec'),
path = require('path'),
fs = require('fs'),
// Get all the arguments that don't have an option associated with them
filenames = minimist(process.argv.slic... | Write output m3u to local directory Regardless of whether source m3u is in local dir or not | Write output m3u to local directory
Regardless of whether source m3u is in local dir or not
| JavaScript | mit | rowanoulton/m3u-export | ---
+++
@@ -4,9 +4,9 @@
minimist = require('minimist'),
exec = require('exec'),
path = require('path'),
- fs = require('fs');
-
-var filenames = minimist(process.argv.slice(2))._;
+ fs = require('fs'),
+ // Get all the arguments that don't have an option associate... |
dcc87fda6efccbc88a74ef556c1a5a5868500cf2 | lib/resource/client/Company.js | lib/resource/client/Company.js | 'use strict';
//var P = require('bluebird');
var Resource = require('../Resource');
function Company(primus)
{
Resource.call(this, primus, 'Company');
this._cache = { // contains Promises
all: null
};
}
require('inherits')(Company, Resource);
module.exports = Company;
Compan... | 'use strict';
//var P = require('bluebird');
var Resource = require('../Resource');
function Company(primus)
{
Resource.call(this, primus, 'Company');
this._cache = { // contains Promises
all: null
};
}
require('inherits')(Company, Resource);
module.exports = Company;
Compan... | Update cache after an edit | Update cache after an edit
| JavaScript | agpl-3.0 | dealport/dealport | ---
+++
@@ -26,5 +26,33 @@
{
// todo update cache
- return this.rpc('updateCompany', id, values);
+ var p = this.rpc('updateCompany', id, values);
+
+ // The caller of updateCompany does not have to wait for this stuff:
+ p.then(function(rpcReturn)
+ {
+ i... |
016209fd667a21ac2c9800c29efd3e2be4bae872 | Gulpfile.js | Gulpfile.js | var gulp = require('gulp');
gulp.task('test', function () {
require('./');
var mocha = require('gulp-mocha');
return gulp.src('test/**/*.es6', {
read: false
})
.pipe(mocha({
bail: true
}));
});
gulp.task('watch', ['default'], function () {
gulp.watch([
'index.js',
'... | var gulp = require('gulp');
gulp.task('test', function () {
require('babel/register')({
// All the subsequent files required by node with the extension of `.es6`
// will be transformed to ES5
extensions: ['.es6']
});
var mocha = require('gulp-mocha');
return gulp.src('test/**/*.es6', {
... | Enable Babel properly while testing | Enable Babel properly while testing
| JavaScript | mit | OEvgeny/postcss-assets,borodean/postcss-assets,justinanastos/postcss-assets,assetsjs/postcss-assets,glebmachine/postcss-assets | ---
+++
@@ -1,7 +1,11 @@
var gulp = require('gulp');
gulp.task('test', function () {
- require('./');
+ require('babel/register')({
+ // All the subsequent files required by node with the extension of `.es6`
+ // will be transformed to ES5
+ extensions: ['.es6']
+ });
var mocha = require('gulp-moch... |
a3c2fdadd697e0bcdece46a8d6ecf1affa5c572d | lib/core/src/server/config.js | lib/core/src/server/config.js | import path from 'path';
import loadPresets from './presets';
import serverRequire from './serverRequire';
function customPreset({ configDir }) {
return serverRequire(path.resolve(configDir, 'presets')) || [];
}
function getWebpackConfig(options, presets) {
const babelOptions = presets.extendBabel({}, options);
... | import path from 'path';
import { logger } from '@storybook/node-logger';
import loadPresets from './presets';
import serverRequire from './serverRequire';
function customPreset({ configDir }) {
const presets = serverRequire(path.resolve(configDir, 'presets'));
if (presets) {
logger.warn(
'"Custom prese... | Add warning about custom presets | Add warning about custom presets
| JavaScript | mit | storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook | ---
+++
@@ -1,9 +1,20 @@
import path from 'path';
+import { logger } from '@storybook/node-logger';
import loadPresets from './presets';
import serverRequire from './serverRequire';
function customPreset({ configDir }) {
- return serverRequire(path.resolve(configDir, 'presets')) || [];
+ const presets = serve... |
e939cdd71013934a26e477288d22e0240bd8bb7f | src/server/entrypoint-render.js | src/server/entrypoint-render.js | import prerender from './prerender'
// This is a wrapper to handle a single isomorphic render inside a child process
function startRender(context) {
prerender(context).then((result) => {
process.send(result, null, {}, () => {
process.exit(0)
})
}).catch(() => {
process.exit(1)
})
}
process.on... | import prerender from './prerender'
import { updateStrings as updateTimeAgoStrings } from './../lib/time_ago_in_words'
updateTimeAgoStrings({ about: '' })
// This is a wrapper to handle a single isomorphic render inside a child process
function startRender(context) {
prerender(context).then((result) => {
proce... | Add time ago in words to the server render | Add time ago in words to the server render
| JavaScript | mit | ello/webapp,ello/webapp,ello/webapp | ---
+++
@@ -1,4 +1,7 @@
import prerender from './prerender'
+import { updateStrings as updateTimeAgoStrings } from './../lib/time_ago_in_words'
+
+updateTimeAgoStrings({ about: '' })
// This is a wrapper to handle a single isomorphic render inside a child process
|
5871c8b7077eaeaf04049135142d7e34f6130e30 | lib/flatten.js | lib/flatten.js | /*
Copyright (c) 2014, Ryuichi Okumura. All rights reserved.
Code licensed under the BSD License:
https://github.com/okuryu/package-json-flatten/blob/master/LICENSE.md
*/
"use strict";
/*
Based on order of the NPM official package.json reference.
https://www.npmjs.org/doc/package.json.html
*/
var priorityKeys =... | /*
Copyright (c) 2014, Ryuichi Okumura. All rights reserved.
Code licensed under the BSD License:
https://github.com/okuryu/package-json-flatten/blob/master/LICENSE.md
*/
"use strict";
/*
Based on order of the NPM official package.json reference.
https://www.npmjs.org/doc/package.json.html
*/
var priorityKeys =... | Move out checking by using hasOwnProperty() | Move out checking by using hasOwnProperty()
| JavaScript | bsd-3-clause | okuryu/package-json-flatten | ---
+++
@@ -52,9 +52,7 @@
});
for (formerKey in inputData) {
- if (inputData.hasOwnProperty(formerKey)) {
- flattenData[formerKey] = inputData[formerKey];
- }
+ flattenData[formerKey] = inputData[formerKey];
}
return flattenData; |
4ab6a6db8542d018ca1068808f83daa5f09bc3dc | src/client/es6/routers.js | src/client/es6/routers.js | export default function CartRouters($stateProvider, $urlRouterProvider) {
}
| function CartRouters($stateProvider, $urlRouterProvider) {
}
CartRouters.$inject = ['$stateProvider', '$urlRouterProvider'];
export default CartRouters;
| Use injector to do angular config function. | Use injector to do angular config function.
| JavaScript | mit | agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart | ---
+++
@@ -1,3 +1,6 @@
-export default function CartRouters($stateProvider, $urlRouterProvider) {
+function CartRouters($stateProvider, $urlRouterProvider) {
+}
-}
+CartRouters.$inject = ['$stateProvider', '$urlRouterProvider'];
+
+export default CartRouters; |
62e3f095c37976d67d28a16056b188ac643124a4 | static/js/main.js | static/js/main.js | (function($) {
"use strict";
var apiUrl = "http://redjohn.herokuapp.com/api/tweets";
function addScoresToSuspects(response) {
_.each(response.results, function(mentions, suspect) {
$("#" + suspect).find(".mentions").text(mentions);
});
}
function addTotal(response) {
... | (function($) {
"use strict";
var apiUrl = "http://redjohn.herokuapp.com/api/tweets/";
function addScoresToSuspects(response) {
_.each(response.results, function(mentions, suspect) {
$("#" + suspect).find(".mentions").text(mentions);
});
}
function addTotal(response) {... | Add a trailing slash to the base API URL | Add a trailing slash to the base API URL
| JavaScript | mit | AnSavvides/redjohn,AnSavvides/redjohn | ---
+++
@@ -2,7 +2,7 @@
"use strict";
- var apiUrl = "http://redjohn.herokuapp.com/api/tweets";
+ var apiUrl = "http://redjohn.herokuapp.com/api/tweets/";
function addScoresToSuspects(response) {
_.each(response.results, function(mentions, suspect) { |
4593b652c4791c7b30cacd9b60fe90fad0d1aa98 | lib/renderers/JsonRenderer.js | lib/renderers/JsonRenderer.js | function JsonRenderer() {
this._nrLogs = 0;
}
JsonRenderer.prototype.end = function (data) {
if (this._nrLogs) {
process.stderr.write(']\n');
}
if (data) {
process.stdout.write(this._stringify(data) + '\n');
}
};
JsonRenderer.prototype.error = function (err) {
err.id = err.cod... | function JsonRenderer() {
this._nrLogs = 0;
}
JsonRenderer.prototype.end = function (data) {
if (this._nrLogs) {
process.stderr.write(']\n');
}
if (data) {
process.stdout.write(this._stringify(data) + '\n');
}
};
JsonRenderer.prototype.error = function (err) {
var message = er... | Fix log of errors not rendering the error message/data in the JSON renderer. | Fix log of errors not rendering the error message/data in the JSON renderer.
| JavaScript | mit | mattpugh/bower,haolee1990/bower,Teino1978-Corp/bower,unilynx/bower,lukemelia/bower,angeliaz/bower,Jeremy017/bower,Teino1978-Corp/Teino1978-Corp-bower,jvkops/bower,pjump/bower,rajzshkr/bower,pwang2/bower,bower/bower,return02/bower,fernandomoraes/bower,wenyanw/bower,sanyueyu/bower,rlugojr/bower,supriyantomaftuh/bower,gri... | ---
+++
@@ -13,8 +13,16 @@
};
JsonRenderer.prototype.error = function (err) {
+ var message = err.message;
+
err.id = err.code || 'error';
err.level = 'error';
+ err.data = err.data || {};
+
+ // Need to set message again because it is
+ // not enumerable in some cases
+ delete err.messag... |
d03a772f541090e8d9165314371cb222702d435d | test/queue/with_delay_test.js | test/queue/with_delay_test.js | 'use strict';
require('../helpers');
const assert = require('assert');
const Ironium = require('../..');
describe('Queue with delay', function() {
const captureQueue = Ironium.queue('capture');
// Capture processed jobs here.
const processed = [];
before(function() {
captureQueue.eachJob(function(job)... | 'use strict';
require('../helpers');
const assert = require('assert');
const Ironium = require('../..');
const ms = require('ms');
const TimeKeeper = require('timekeeper');
describe('Queue with delay', function() {
const captureQueue = Ironium.queue('capture');
// Capture processed jobs here.... | Update delayJob test to use TimeKeeper | Update delayJob test to use TimeKeeper
| JavaScript | mit | assaf/ironium | ---
+++
@@ -1,7 +1,9 @@
'use strict';
require('../helpers');
-const assert = require('assert');
-const Ironium = require('../..');
+const assert = require('assert');
+const Ironium = require('../..');
+const ms = require('ms');
+const TimeKeeper = require('timekeeper');
describe('Queue with... |
775bf364fc17512bd16827526bd7745352c015a6 | src/js/models/model-timeline-base.js | src/js/models/model-timeline-base.js | YUI.add("model-timeline-base", function(Y) {
"use strict";
var models = Y.namespace("Falco.Models"),
TimelineBase;
TimelineBase = Y.Base.create("timeline", Y.Model, [], {
initializer : function(config) {
var tweets;
config || (confi... | YUI.add("model-timeline-base", function(Y) {
"use strict";
var models = Y.namespace("Falco.Models"),
TimelineBase;
TimelineBase = Y.Base.create("timeline", Y.Model, [], {
initializer : function(config) {
var tweets;
if(!config) {
... | Clean up how timelines respond to tweets | Clean up how timelines respond to tweets
| JavaScript | mit | tivac/falco,tivac/falco | ---
+++
@@ -9,7 +9,9 @@
initializer : function(config) {
var tweets;
- config || (config = {});
+ if(!config) {
+ config = {};
+ }
tweets = new models.Tweets({
items : config.tweets || []
@@... |
bfc7ae42c589838f6ae04b3d2e944d585e8382bb | www/app/app.js | www/app/app.js | 'use strict';
/*
* Angular Seed - v0.1
* https://github.com/rachellcarbone/angular-seed/
* Copyright (c) 2015 Rachel L Carbone; Licensed MIT
*/
// Include modules, and run application.
angular.module('theApp', [
'ui.bootstrap',
'ui.bootstrap.showErrors',
'datatables',
'datatables.bootstrap',
... | 'use strict';
/*
* Angular Seed - v0.1
* https://github.com/rachellcarbone/angular-seed/
* Copyright (c) 2015 Rachel L Carbone; Licensed MIT
*/
// Include modules, and run application.
angular.module('theApp', [
'ui.bootstrap',
'ui.bootstrap.showErrors',
'datatables',
'datatables.bootstrap',
... | Include new libraries in the project. | Include new libraries in the project.
| JavaScript | mit | rachellcarbone/angular-seed,rachellcarbone/angular-seed,rachellcarbone/angular-seed | ---
+++
@@ -14,6 +14,8 @@
'datatables.bootstrap',
'ngCookies',
'ngMessages',
+ 'ngFileUpload',
+ 'ngImgCrop',
'angular-md5',
'api.v1',
'rcDirectives', |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.