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 |
|---|---|---|---|---|---|---|---|---|---|---|
2042a3e49ee1e3ab461f79acd488d34b2d5ec219 | editor/js/Menubar.Status.js | editor/js/Menubar.Status.js | /**
* @author mrdoob / http://mrdoob.com/
*/
Menubar.Status = function ( editor ) {
var container = new UI.Panel();
container.setClass( 'menu right' );
var checkbox = new UI.Checkbox( editor.config.getKey( 'autosave' ) );
checkbox.onChange( function () {
editor.config.setKey( 'autosave', this.getValue() );
... | /**
* @author mrdoob / http://mrdoob.com/
*/
Menubar.Status = function ( editor ) {
var container = new UI.Panel();
container.setClass( 'menu right' );
var checkbox = new UI.Checkbox( editor.config.getKey( 'autosave' ) );
checkbox.onChange( function () {
var value = this.getValue();
editor.config.setKey(... | Save scene when enabling autosave. | Editor: Save scene when enabling autosave. | JavaScript | mit | srifqi/three.js,NicolasRannou/three.js,colombod/three.js,dhritzkiv/three.js,Zerschmetterling91/three.js,matgr1/three.js,njam/three.js,aardgoose/three.js,tamarintech/three.js,dushmis/three.js,stevenliujw/three.js,WoodMath/three.js,hacksalot/three.js,davidvmckay/three.js,ZhenxingWu/three.js,fta2012/three.js,AntTech/three... | ---
+++
@@ -10,7 +10,15 @@
var checkbox = new UI.Checkbox( editor.config.getKey( 'autosave' ) );
checkbox.onChange( function () {
- editor.config.setKey( 'autosave', this.getValue() );
+ var value = this.getValue();
+
+ editor.config.setKey( 'autosave', value );
+
+ if ( value === true ) {
+
+ editor.sign... |
678a5f6f558c833bc05de1f68120efed8cbcdb18 | frameworks/datastore/tests/models/record/core_methods.js | frameworks/datastore/tests/models/record/core_methods.js | // ==========================================================================
// Project: SproutCore - JavaScript Application Framework
// Copyright: ©2006-2009 Apple, Inc. and contributors.
// License: Licened under MIT license (see license.js)
// ===================================================================... | // ==========================================================================
// Project: SproutCore - JavaScript Application Framework
// Copyright: ©2006-2009 Apple, Inc. and contributors.
// License: Licened under MIT license (see license.js)
// ===================================================================... | Fix SC.Record statusString unit test | Fix SC.Record statusString unit test
| JavaScript | mit | Eloqua/sproutcore,Eloqua/sproutcore,Eloqua/sproutcore | ---
+++
@@ -25,7 +25,6 @@
}
});
-test("statusToString", function() {
- var status = MyApp.store.readStatus(MyApp.foo);
- equals(SC.Record.statusToString(status), 'EMPTY', 'status string should be EMPTY');
+test("statusString", function() {
+ equals(MyApp.foo.statusString(), 'READY_NEW', 'status string should... |
ce627bb604bbb4ce42a14af38f5f7aceef11df4d | gulp/config.js | gulp/config.js | //
// https://github.com/kogakure/gulp-tutorial/blob/master/gulp/config.js
//
var banner = [
'/**',
' * <%= pkg.name %> - <%= pkg.description %>',
' * <%= pkg.author %>',
' * Version <%= pkg.version %>',
' * <%= pkg.license %> Licensed',
' */',
''].join('\n');
module.exports = {
banner:... | //
// https://github.com/kogakure/gulp-tutorial/blob/master/gulp/config.js
//
var banner = [
'/**',
' * <%= pkg.name %> - <%= pkg.description %>',
' * <%= pkg.author %>',
' * Version <%= pkg.version %>',
' * <%= pkg.license %> Licensed',
' */',
''].join('\n');
module.exports = {
banner:... | Validate files under lib with jshint | Validate files under lib with jshint
| JavaScript | mit | cheton/i18next-text | ---
+++
@@ -21,7 +21,8 @@
src: [
'index.js',
'gulpfile.js',
- 'src/**/*.js'
+ 'src/**/*.js',
+ 'lib/**/*.js'
],
options: require('../config/jshint')
}, |
9686768f335f876d674183fd899125a5fb09e101 | lib/node_modules/@stdlib/buffer/from-string/lib/index.js | lib/node_modules/@stdlib/buffer/from-string/lib/index.js | 'use strict';
/**
* Allocate a buffer containing a provided string.
*
* @module @stdlib/buffer/from-string
*
* @example
* var string2buffer = require( '@stdlib/buffer/from-string' );
*
* var buf = string2buffer( 'beep boop' );
* // returns <Buffer>
*/
// MODULES //
var hasFrom = require( './has_from.js' );
// MAIN... | 'use strict';
/**
* Allocate a buffer containing a provided string.
*
* @module @stdlib/buffer/from-string
*
* @example
* var string2buffer = require( '@stdlib/buffer/from-string' );
*
* var buf = string2buffer( 'beep boop' );
* // returns <Buffer>
*/
// MODULES //
var hasFrom = require( './has_from.js' );
var main ... | Refactor to avoid dynamic module resolution | Refactor to avoid dynamic module resolution
| JavaScript | apache-2.0 | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib | ---
+++
@@ -15,15 +15,17 @@
// MODULES //
var hasFrom = require( './has_from.js' );
+var main = require( './main.js' );
+var polyfill = require( './polyfill.js' );
// MAIN //
var string2buffer;
if ( hasFrom ) {
- string2buffer = require( './main.js' );
+ string2buffer = main;
} else {
- string2buffer = ... |
ea020e5e5759189d2576aea6a58114ddb24dd001 | src/index.js | src/index.js | import React from 'react'
import ReactDOM from 'react-dom'
import { createGlobalStyle } from 'styled-components'
import { App } from './App'
import woff2 from './fonts/source-sans-pro-v11-latin-regular.woff2'
import woff from './fonts/source-sans-pro-v11-latin-regular.woff'
import registerServiceWorker from './registe... | import React from 'react'
import ReactDOM from 'react-dom'
import { createGlobalStyle } from 'styled-components'
import { App } from './App'
import woff2 from './fonts/source-sans-pro-v11-latin-regular.woff2'
import woff from './fonts/source-sans-pro-v11-latin-regular.woff'
import registerServiceWorker from './registe... | Use border-box style for all elements | Use border-box style for all elements
| JavaScript | mit | joelgeorgev/file-hash-verifier,joelgeorgev/file-hash-verifier | ---
+++
@@ -8,6 +8,14 @@
import registerServiceWorker from './registerServiceWorker'
const GlobalStyle = createGlobalStyle`
+ html {
+ box-sizing: border-box;
+ }
+
+ *, *:before, *:after {
+ box-sizing: inherit;
+ }
+
body {
margin: 0;
padding: 0; |
12ee708accce42f2bdeb557888590851df1ff12c | src/index.js | src/index.js | var Transmitter = function (config) {
var router = require('./router.js');
router(config);
var io = require('socket.io')(router.server);
// Socket.io connection handling
io.on('connection', function(socket){
console.log('PULSAR: client connected');
socket.on('disconnect', function() {
console.... | class Detector {
constructor(config) {
let router = require('./router.js');
router(config);
this.io = require('socket.io')(router.server);
// Socket.io connection handling
this.io.on('connection', function(socket){
console.log('PULSAR: client connected');
socket.on('disconnect', funct... | Convert export to a class with a pulse detector function | Convert export to a class with a pulse detector function
| JavaScript | mit | Dermah/pulsar-transmitter | ---
+++
@@ -1,29 +1,21 @@
-var Transmitter = function (config) {
+class Detector {
+ constructor(config) {
+ let router = require('./router.js');
+ router(config);
- var router = require('./router.js');
- router(config);
+ this.io = require('socket.io')(router.server);
+ // Socket.io connection handl... |
78d557fc3c8bda380271c29f02b9a2b3cceb6b9a | src/index.js | src/index.js | /**
*
* ___| | | | |
* | | | | |
* | ___ |___ __|
* \____|_| _| _|
*
* @author Shinichirow KAMITO
* @license MIT
*/
import {
createStore,
destroyStore,
getAllStores,
destroyAllStores,
trigger,
regist
} from './core';
import dispatcher from './dispatcher';
let ch4 = {
createS... | /**
*
* ___| | | | |
* | | | | |
* | ___ |___ __|
* \____|_| _| _|
*
* @author Shinichirow KAMITO
* @license MIT
*/
import {
createStore,
destroyStore,
getAllStores,
destroyAllStores,
trigger,
regist
} from './core';
import dispatcher from './dispatcher';
import logger from './... | Add logger to export modules. | Add logger to export modules.
| JavaScript | mit | kamito/ch4 | ---
+++
@@ -17,6 +17,7 @@
regist
} from './core';
import dispatcher from './dispatcher';
+import logger from './logger';
let ch4 = {
createStore: createStore,
@@ -25,7 +26,8 @@
destroyAllStores: destroyAllStores,
trigger: trigger,
regist: regist,
- dispatcher: dispatcher
+ dispatcher: dispatcher... |
1f7a9bd17e7611c0afb13b4c9f546cb8c7ef06af | src/index.js | src/index.js | export function createSelectorCreator(valueEquals) {
return (selectors, resultFunc) => {
if (!Array.isArray(selectors)) {
selectors = [selectors];
}
const memoizedResultFunc = memoize(resultFunc, valueEquals);
return state => {
const params = selectors.map(sel... | export function createSelectorCreator(valueEquals) {
return (selectors, resultFunc) => {
if (!Array.isArray(selectors)) {
selectors = [selectors];
}
const memoizedResultFunc = memoize(resultFunc, valueEquals);
return state => {
const params = selectors.map(sel... | Remove unnecessary use of spread | Remove unnecessary use of spread
| JavaScript | mit | sericaia/reselect,chentsulin/reselect,faassen/reselect,SpainTrain/reselect,reactjs/reselect,chromakode/reselect,reactjs/reselect,tgriesser/reselect,scottcorgan/reselect,zalmoxisus/reselect,babsonmatt/reselect,rackt/reselect,ellbee/reselect | ---
+++
@@ -6,7 +6,7 @@
const memoizedResultFunc = memoize(resultFunc, valueEquals);
return state => {
const params = selectors.map(selector => selector(state));
- return memoizedResultFunc(...params);
+ return memoizedResultFunc(params);
}
};
}
@@ -... |
79e51f7510a554c5fa900759f9ad55f9201c7715 | app/components/ocre-step.js | app/components/ocre-step.js | import Ember from 'ember';
import _ from 'lodash/lodash';
import steps from '../ressources/ocre-quest';
export default Ember.Component.extend({
progress: '',
stepIndex: 0,
target: 0,
onChange: () => {},
actions: {
update(item, delta) {
let progress = this.get('progress');
... | import Ember from 'ember';
import _ from 'lodash/lodash';
import steps from '../ressources/ocre-quest';
export default Ember.Component.extend({
progress: '',
stepIndex: 0,
target: 0,
onChange: () => {},
actions: {
update(item, delta) {
let progress = this.get('progress');
... | Fix the bug where a mob can't be put back to 0 | Fix the bug where a mob can't be put back to 0
| JavaScript | mit | pboutin/dofus-workbench,pboutin/dofus-workbench | ---
+++
@@ -43,7 +43,7 @@
note: item[1],
index: index,
cantAdd: value >= 9,
- cantRemove: value <= 1,
+ cantRemove: value <= 0,
value: value
};
}); |
c1bf4d635ecfb5f471f4d4230401ae3c0ded3468 | app/controllers/PhotoRow.js | app/controllers/PhotoRow.js | var FileLoader = require("file_loader");
var args = arguments[0] || {};
var url = "http://photos.tritarget.org/photos/washington2012/" + args.photo;
FileLoader.download(url)
.then(function(file) {
// Ti.API.info("Displaying image: " + file.getPath());
$.photo.image = file.getFile();
$.info.color = file.... | var FileLoader = require("file_loader");
var args = arguments[0] || {};
var url = "http://photos.tritarget.org/photos/washington2012/" + args.photo;
function updateRow(file) {
$.photo.image = file.getFile();
$.info.color = file.downloaded ? "#CF0000" : "#07D100";
$.info.text = (file.downloaded ? "Downloaded" : ... | Add support for choosing promises or callbacks | Add support for choosing promises or callbacks
For testing and demo
| JavaScript | mit | sukima/TiCachedImages,0x00evil/TiCachedImages,0x00evil/TiCachedImages,sukima/TiCachedImages | ---
+++
@@ -3,20 +3,28 @@
var args = arguments[0] || {};
var url = "http://photos.tritarget.org/photos/washington2012/" + args.photo;
-FileLoader.download(url)
- .then(function(file) {
- // Ti.API.info("Displaying image: " + file.getPath());
- $.photo.image = file.getFile();
- $.info.color = file.downlo... |
cd93d090958b3b4c058cabe384668725d23622b1 | app/components/layer-file/component.js | app/components/layer-file/component.js | import Ember from 'ember';
export default Ember.Component.extend({
showSelect: false,
noFileFound: true,
didRender() {
if(!this.get('layer.settings.values.downloadLink')){
this.get('node.files').then((result)=>{
result.objectAt(0).get('files').then((files)=>{
... | import Ember from 'ember';
export default Ember.Component.extend({
showSelect: false,
noFileFound: true, //make computed property that observers the layers.[] and if change see if there is a file
didRender() {
console.log(this.get('layer.settings.values.downloadLink') , this.get('noFileFound'))
... | Fix 'No Files Found" showing when files are found | Fix 'No Files Found" showing when files are found
| JavaScript | apache-2.0 | caneruguz/osfpages,caneruguz/osfpages,Rytiggy/osfpages,Rytiggy/osfpages | ---
+++
@@ -2,11 +2,14 @@
export default Ember.Component.extend({
showSelect: false,
- noFileFound: true,
+ noFileFound: true, //make computed property that observers the layers.[] and if change see if there is a file
didRender() {
+
+ console.log(this.get('layer.settings.values.downloadLink... |
bd812f12f00375232dd413e17a4356d8320f9c80 | lib/vttregion-extended.js | lib/vttregion-extended.js | // If we're in Node.js then require VTTRegion so we can extend it, otherwise assume
// VTTRegion is on the global.
if (typeof module !== "undefined" && module.exports) {
this.VTTRegion = require("./vttregion").VTTRegion;
}
// Extend VTTRegion with methods to convert to JSON, from JSON, and construct a
// VTTRegion f... | // If we're in Node.js then require VTTRegion so we can extend it, otherwise assume
// VTTRegion is on the global.
if (typeof module !== "undefined" && module.exports) {
this.VTTRegion = require("./vttregion").VTTRegion;
}
// Extend VTTRegion with methods to convert to JSON, from JSON, and construct a
// VTTRegion f... | Fix accidental change of fromJSON() to create(). | Fix accidental change of fromJSON() to create().
| JavaScript | apache-2.0 | gkatsev/vtt.js,mozilla/vtt.js,gkatsev/vtt.js,mozilla/vtt.js | ---
+++
@@ -20,7 +20,7 @@
return region;
};
- root.VTTRegion.create = function(json) {
+ root.VTTRegion.fromJSON = function(json) {
return this.create(JSON.parse(json));
};
|
4a5944329d737b0671a5a094e428e23b803b359c | lib/constants.js | lib/constants.js | var fs = require('fs')
var pkg = JSON.parse(fs.readFileSync(__dirname + '/../package.json').toString())
exports.VERSION = pkg.version
exports.DEFAULT_PORT = process.env.PORT || 9876
exports.DEFAULT_HOSTNAME = process.env.IP || 'localhost'
// log levels
exports.LOG_DISABLE = 'OFF'
exports.LOG_ERROR = 'ERROR'
exports... | var fs = require('fs')
var pkg = JSON.parse(fs.readFileSync(__dirname + '/../package.json').toString())
exports.VERSION = pkg.version
exports.DEFAULT_PORT = process.env.PORT || 9876
exports.DEFAULT_HOSTNAME = process.env.IP || 'localhost'
// log levels
exports.LOG_DISABLE = 'OFF'
exports.LOG_ERROR = 'ERROR'
exports... | Add date/time stamp to log output | feat(logger): Add date/time stamp to log output
The `"%d{DATE}"` in the log pattern adds a date and time stamp to log
lines.
So you get output like this from karma's logging:
```
30 06 2015 15:19:56.562:DEBUG [temp-dir]: Creating temp dir at /tmp/karma-43808925
```
The date and time are handy for figuring out if karma... | JavaScript | mit | clbond/karma,powerkid/karma,brianmhunt/karma,hitesh97/karma,simudream/karma,karma-runner/karma,skycocker/karma,vtsvang/karma,SamuelMarks/karma,unional/karma,tomkuk/karma,gayancliyanage/karma,kahwee/karma,IsaacChapman/karma,Sanjo/karma,rhlass/karma,clbond/karma,kahwee/karma,maksimr/karma,maksimr/karma,skycocker/karma,ch... | ---
+++
@@ -15,8 +15,8 @@
exports.LOG_DEBUG = 'DEBUG'
// Default patterns for the pattern layout.
-exports.COLOR_PATTERN = '%[%p [%c]: %]%m'
-exports.NO_COLOR_PATTERN = '%p [%c]: %m'
+exports.COLOR_PATTERN = '%[%d{DATE}:%p [%c]: %]%m'
+exports.NO_COLOR_PATTERN = '%d{DATE}:%p [%c]: %m'
// Default console append... |
3601d7ce7c5e2863c27e0a0c5a08746cbaddfcba | app/assets/javascripts/global.js | app/assets/javascripts/global.js | $(document)
.ready(function() {
// fix menu when passed
$('.masthead')
.visibility({
once: false,
onBottomPassed: function() {
$('.fixed.menu').transition('fade in');
},
onBottomPassedReverse: function() {
$('.fixed.menu').transition('fade out');
... | $(document)
.ready(function() {
// fix menu when passed
$('.masthead')
.visibility({
once: false,
onBottomPassed: function() {
$('.fixed.menu').transition('fade in');
},
onBottomPassedReverse: function()... | Make the flash message dismissable | Make the flash message dismissable
| JavaScript | bsd-3-clause | payloadtech/payload,payloadtech/payload,amingilani/starter-web-app,amingilani/starter-web-app,payloadtech/payload,amingilani/starter-web-app | ---
+++
@@ -1,23 +1,27 @@
$(document)
- .ready(function() {
+ .ready(function() {
- // fix menu when passed
- $('.masthead')
- .visibility({
- once: false,
- onBottomPassed: function() {
- $('.fixed.menu').transition('fade in');
- },
- onBottomPassedReverse: func... |
52213504d4c43fe43f572dc8bf84113a9af07797 | routes/index.js | routes/index.js | var express = require('express');
var request = require('request');
var http = require('http');
var router = express.Router();
var fixtures = require('./fixtures');
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index', { title: 'FootScores' });
});
/* GET any leagues matches */
router.... | var express = require('express');
var request = require('request');
var http = require('http');
var router = express.Router();
var fixtures = require('./fixtures');
var database = require('../database/mongo');
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index', { title: 'FootScores' }... | Change names to be more self-explanatory | Change names to be more self-explanatory
| JavaScript | mit | ngomez22/FootScores,ngomez22/FootScores | ---
+++
@@ -3,6 +3,7 @@
var http = require('http');
var router = express.Router();
var fixtures = require('./fixtures');
+var database = require('../database/mongo');
/* GET home page. */
router.get('/', function(req, res, next) {
@@ -11,9 +12,16 @@
/* GET any leagues matches */
router.get('/fixtures/:id',... |
368c10724ead9b725bbd75f31a7922fcbe6fc0aa | app/javascript/helpers/string.js | app/javascript/helpers/string.js | /* FILE string.js */
(function () {
this.sparks.string = {};
var str = sparks.string;
str.strip = function (s) {
s = s.replace(/\s*([^\s]*)\s*/, '$1');
return s;
};
// Remove a dot in the string, and then remove 0's on both sides
// e.g. '20100' => '201', '0.... | /* FILE string.js */
(function () {
this.sparks.string = {};
var str = sparks.string;
str.strip = function (s) {
s = s.replace(/\s*([^\s]*)\s*/, '$1');
return s;
};
// Remove a dot in the string, and then remove 0's on both sides
// e.g. '20100' => '201', '0.... | Add capitalize-first function to String | Add capitalize-first function to String | JavaScript | apache-2.0 | concord-consortium/sparks,concord-consortium/sparks,concord-consortium/sparks,concord-consortium/sparks,concord-consortium/sparks | ---
+++
@@ -26,5 +26,10 @@
return s;
};
+
+ String.prototype.capFirst = function() {
+ return this.charAt(0).toUpperCase() + this.slice(1);
+ }
+
})(); |
84854a6494b5c9f1a56be857ba2fc8762883f1c9 | app/mixins/pagination-support.js | app/mixins/pagination-support.js | import Ember from 'ember';
export default Ember.Mixin.create({
hasPaginationSupport: true,
total: 0,
page: 0,
pageSize: 10,
didRequestPage: Ember.K,
first: function () {
return this.get('page') * this.get('pageSize') + 1;
}.property('page', 'pageSize').cacheable(),
last: funct... | import Ember from 'ember';
export default Ember.Mixin.create({
hasPaginationSupport: true,
total: 0,
page: 0,
pageSize: 10,
didRequestPage: Ember.K,
first: function () {
return this.get('page') * this.get('pageSize') + 1;
}.property('page', 'pageSize'),
last: function () {
... | Fix deprecation warnings for Ember 1.10.0. | Fix deprecation warnings for Ember 1.10.0.
| JavaScript | apache-2.0 | davidvmckay/Klondike,Stift/Klondike,davidvmckay/Klondike,jochenvangasse/Klondike,jochenvangasse/Klondike,themotleyfool/Klondike,Stift/Klondike,fhchina/Klondike,jochenvangasse/Klondike,fhchina/Klondike,themotleyfool/Klondike,fhchina/Klondike,themotleyfool/Klondike,Stift/Klondike,davidvmckay/Klondike | ---
+++
@@ -9,19 +9,19 @@
first: function () {
return this.get('page') * this.get('pageSize') + 1;
- }.property('page', 'pageSize').cacheable(),
+ }.property('page', 'pageSize'),
last: function () {
return Math.min((this.get('page') + 1) * this.get('pageSize'), this.get('total'))... |
6cce0db72acfc12bf7fae13346be29928976b641 | public/modules/core/controllers/sound-test.client.controller.js | public/modules/core/controllers/sound-test.client.controller.js | 'use strict';
angular.module('core').controller('SoundTestController', ['$scope', 'TrialData',
function($scope, TrialData) {
/* global io */
var socket = io();
socket.on('oscMessageSent', function(data) {
console.log('socket "oscMessageSent" event received with data: ' + data);
});
socke... | 'use strict';
angular.module('core').controller('SoundTestController', ['$scope', 'TrialData',
function($scope, TrialData) {
/* global io */
var socket = io();
socket.on('oscMessageSent', function(data) {
console.log('socket "oscMessageSent" event received with data: ' + data);
});
socke... | Reformat SoundTest OSC; stop sound test on SoundTest destroy | Reformat SoundTest OSC; stop sound test on SoundTest destroy
| JavaScript | mit | brennon/eim,brennon/eim,brennon/eim,brennon/eim | ---
+++
@@ -12,23 +12,38 @@
socket.emit('sendOSCMessage', {
oscType: 'message',
- address: '/eim/control/startSoundTest',
- args: {
- type: 'string',
- value: TrialData.data.metadata.session_number
- }
+ address: '/eim/control/soundTest',
+ args: [
+ {
+ ... |
4f93585a82adcc93b713cfd983d5343a23e262b3 | app/renderer/reducers/player.js | app/renderer/reducers/player.js | import {
SEEK,
SET_DURATION,
SET_CURRENT_SONG,
CHANGE_VOLUME,
CHANGE_CURRENT_SECONDS,
PLAY,
PAUSE
} from './../actions/actionTypes'
const initialState = {
isPlaying: false,
playFromSeconds: 0,
totalSeconds: 0,
currentSeconds: 0,
currentSong: {
title: '',
artist: '',
album: '',
a... | import {
SEEK,
SET_DURATION,
SET_CURRENT_SONG,
CHANGE_VOLUME,
CHANGE_CURRENT_SECONDS,
PLAY,
PAUSE
} from './../actions/actionTypes'
const initialState = {
isPlaying: false,
playFromSeconds: 0,
totalSeconds: 0,
currentSeconds: 0,
currentSong: {
id: '',
title: '',
artist: '',
albu... | Add missing id in initial state | Add missing id in initial state
| JavaScript | mit | AbsoluteZero273/Deezic | ---
+++
@@ -14,6 +14,7 @@
totalSeconds: 0,
currentSeconds: 0,
currentSong: {
+ id: '',
title: '',
artist: '',
album: '', |
e844bc03546c0189ba47bf1ff7915079abf2ca31 | app/service/containers/route.js | app/service/containers/route.js | import Ember from 'ember';
import MultiStatsSocket from 'ui/utils/multi-stats';
export default Ember.Route.extend({
statsSocket: null,
model() {
return this.modelFor('service').get('service');
},
activate() {
var stats = MultiStatsSocket.create({
resource: this.modelFor('service').get('service'... | import Ember from 'ember';
import MultiStatsSocket from 'ui/utils/multi-stats';
export default Ember.Route.extend({
statsSocket: null,
model() {
var promises = [];
// Load the hosts for the instances if they're not already there
var service = this.modelFor('service').get('service');
service.get('... | Fix unknown host on services | Fix unknown host on services
| JavaScript | apache-2.0 | vincent99/ui,westlywright/ui,lvuch/ui,rancherio/ui,pengjiang80/ui,vincent99/ui,rancherio/ui,nrvale0/ui,rancher/ui,nrvale0/ui,pengjiang80/ui,ubiquityhosting/rancher_ui,westlywright/ui,pengjiang80/ui,westlywright/ui,nrvale0/ui,rancher/ui,vincent99/ui,rancherio/ui,lvuch/ui,rancher/ui,ubiquityhosting/rancher_ui,lvuch/ui,ub... | ---
+++
@@ -5,7 +5,20 @@
statsSocket: null,
model() {
- return this.modelFor('service').get('service');
+ var promises = [];
+
+ // Load the hosts for the instances if they're not already there
+ var service = this.modelFor('service').get('service');
+ service.get('instances').forEach((instance... |
8e1cba95872a228b21a76b1fb2edec7bc86af86b | app/src/Components/Base/Root.js | app/src/Components/Base/Root.js | import React from 'react'
import PropTypes from 'prop-types'
import { Provider } from 'react-redux'
import { BrowserRouter } from 'react-router-dom'
import ApolloClient from 'apollo-boost';
import { ApolloProvider } from 'react-apollo';
import BaseDataView from './BaseDataView'
function getCookieValue(a) {
var b = ... | import React from 'react'
import PropTypes from 'prop-types'
import { Provider } from 'react-redux'
import { BrowserRouter } from 'react-router-dom'
import ApolloClient from 'apollo-boost';
import { ApolloProvider } from 'react-apollo';
import BaseDataView from './BaseDataView'
function getCookieValue(a) {
var b = ... | Use correct uri for AppolloClient | Use correct uri for AppolloClient
| JavaScript | apache-2.0 | alexisrolland/data-quality,alexisrolland/data-quality,alexisrolland/data-quality,alexisrolland/data-quality | ---
+++
@@ -14,7 +14,7 @@
const client = new ApolloClient({
- uri: process.env.REACT_APP_GRAPHQL_API_URL + 'graphql',
+ uri: process.env.REACT_APP_FLASK_API_URL + 'graphql',
headers: {
'Authorization': 'Bearer ' + getCookieValue('token')
} |
2402f07c8ce1114389bac47c49b318d931134cdb | web_app/public/js/app.js | web_app/public/js/app.js | 'use strict';
// Declare app level module which depends on filters, and services
var app = angular.module( 'myApp', [
'ngRoute',
'myApp.controllers',
'myApp.filters',
'myApp.services',
'myApp.directives',
// 3rd party dependencies
'btford.socket-io'
] );
app.config( function ( $routePro... | 'use strict';
// Declare app level module which depends on filters, and services
var app = angular.module( 'myApp', [
'ngRoute',
'myApp.controllers',
'myApp.filters',
'myApp.services',
'myApp.directives',
// 3rd party dependencies
'btford.socket-io',
'fully-loaded'
] );
app.config( ... | Install this the right way | Install this the right way
| JavaScript | mit | projectweekend/Pi-Jukebox,projectweekend/Pi-Jukebox,projectweekend/Pi-Jukebox | ---
+++
@@ -11,7 +11,8 @@
'myApp.directives',
// 3rd party dependencies
- 'btford.socket-io'
+ 'btford.socket-io',
+ 'fully-loaded'
] );
app.config( function ( $routeProvider, $locationProvider ) { |
5de143e2e7268f50b55fedc392f7408e78355c28 | src/client/assets/javascripts/app/App.js | src/client/assets/javascripts/app/App.js | import React, { PropTypes } from 'react';
const App = ({ children }) => (
<div className="page-container">
{children}
</div>
);
App.propTypes = {
children: PropTypes.element.isRequired
};
export default App;
| import React, { PropTypes } from 'react';
const App = (props) => (
<div className="page-container">
{React.cloneElement({...props}.children, {...props})}
</div>
);
App.propTypes = {
children: PropTypes.element.isRequired
};
export default App;
| Fix warning messages regarding refs and key | Fix warning messages regarding refs and key
| JavaScript | mit | dead-in-the-water/ditw,nicksp/redux-webpack-es6-boilerplate,cloady/battleship,cloady/battleship,nicksp/redux-webpack-es6-boilerplate,richbai90/CS2810,dead-in-the-water/ditw,richbai90/CS2810,richbai90/CS2810,richbai90/CS2810 | ---
+++
@@ -1,8 +1,8 @@
import React, { PropTypes } from 'react';
-const App = ({ children }) => (
+const App = (props) => (
<div className="page-container">
- {children}
+ {React.cloneElement({...props}.children, {...props})}
</div>
);
|
c14e89ab83e035103c58ed57c3681b64278c4a75 | lib/utils/cmd.js | lib/utils/cmd.js | const fs = require('fs');
const path = require('path');
/**
* Finds package.json file from either the directory the script was called from or a supplied path.
*
* console.log(findPackageFileInPath());
* console.log(findPackageFileInPath('./package.json'));
* console.log(findPackageFileInPath('~/git/gi... | const fs = require('fs');
const path = require('path');
/**
* Finds package.json file from either the directory the script was called from or a supplied path.
*
* console.log(findPackageFileInPath());
* console.log(findPackageFileInPath('./package.json'));
* console.log(findPackageFileInPath('~/git/gi... | Change how method is exported. | Change how method is exported.
| JavaScript | mit | neogeek/doxdox | ---
+++
@@ -13,7 +13,7 @@
* @public
*/
-module.exports.findPackageFileInPath = input => {
+const findPackageFileInPath = input => {
if (!input) {
@@ -40,3 +40,7 @@
return null;
};
+
+module.exports = {
+ findPackageFileInPath
+}; |
f1ab62de1b6c7bbe13e67361311f8cb14a38813e | src/helpers/find-root.js | src/helpers/find-root.js | 'use babel'
/* @flow */
import Path from 'path'
import {findCached} from './common'
import {CONFIG_FILE_NAME} from '../defaults'
export function findRoot(directory: string): string {
const configFile = findCached(directory, CONFIG_FILE_NAME)
if (configFile !== null) {
return Path.dirname(String(configFile))
... | 'use babel'
/* @flow */
import Path from 'path'
import {findCached} from './common'
import {CONFIG_FILE_NAME} from '../defaults'
export async function findRoot(directory: string): Promise<string> {
const configFile = await findCached(directory, CONFIG_FILE_NAME)
if (configFile) {
return Path.dirname(configFi... | Upgrade findRoot to be async | :new: Upgrade findRoot to be async
| JavaScript | mit | steelbrain/UCompiler | ---
+++
@@ -6,9 +6,9 @@
import {findCached} from './common'
import {CONFIG_FILE_NAME} from '../defaults'
-export function findRoot(directory: string): string {
- const configFile = findCached(directory, CONFIG_FILE_NAME)
- if (configFile !== null) {
- return Path.dirname(String(configFile))
+export async fun... |
2ee0ebe084b73502b15a4a2f885a37a42abe7586 | app/templates/Gruntfile.js | app/templates/Gruntfile.js | /*!
* Generator-Gnar Gruntfile
* http://gnarmedia.com
* @author Adam Murphy
*/
// Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= pkg.name %> <%= pkg.version %>
'use strict';
/**
* Grunt module
*/
module.exports = function (grunt) {
/**
* Generator-Gnar Grunt config
*/
grunt.ini... | /*!
* Generator-Gnar Gruntfile
* http://gnarmedia.com
* @author Adam Murphy
*/
// Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= pkg.name %> <%= pkg.version %>
'use strict';
/**
* Grunt module
*/
module.exports = function (grunt) {
/**
* Generator-Gnar Grunt config
*/
grunt.ini... | Add html property to project object | Add html property to project object
| JavaScript | mit | gnarmedia/gnenerator-gnar | ---
+++
@@ -32,6 +32,9 @@
],
js: [
'<%= project.src %>/js/*.js'
+ ],
+ html: [
+ '<%= project.src %>/html/*.html'
]
}
|
f0d015f6b45f599518e247c24c152fa5f17ba017 | esm-samples/jsapi-custom-workers/webpack.config.js | esm-samples/jsapi-custom-workers/webpack.config.js | const path = require('path');
const HtmlWebPackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
entry: {
index: ['./src/index.css', './src/index.js']
},
node: false,
output: {
path: path.join(__dirname, 'dist'),
chunkFilen... | const path = require('path');
const HtmlWebPackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
entry: {
index: ['./src/index.css', './src/index.js']
},
node: false,
output: {
path: path.join(__dirname, 'dist'),
chunkFilen... | Update webpack static, remove webpack clean so dist builds work again. | Update webpack static, remove webpack clean so dist builds work again.
| JavaScript | apache-2.0 | Esri/jsapi-resources,Esri/jsapi-resources,Esri/jsapi-resources | ---
+++
@@ -10,11 +10,10 @@
node: false,
output: {
path: path.join(__dirname, 'dist'),
- chunkFilename: 'chunks/[id].js',
- clean: true
+ chunkFilename: 'chunks/[id].js'
},
devServer: {
- static: './dist',
+ static: path.join(__dirname, 'dist'),
compress: true,
port: 3001,
... |
16e45622c0de9f26679cd0cdcbe6f301d3d6fd16 | src/js/schemas/service-schema/EnvironmentVariables.js | src/js/schemas/service-schema/EnvironmentVariables.js | import {Hooks} from 'PluginSDK';
let EnvironmentVariables = {
description: 'Set environment variables for each task your service launches in addition to those set by Mesos.',
type: 'object',
title: 'Environment Variables',
properties: {
variables: {
type: 'array',
duplicable: true,
addLab... | import {Hooks} from 'PluginSDK';
let EnvironmentVariables = {
description: 'Set environment variables for each task your service launches in addition to those set by Mesos.',
type: 'object',
title: 'Environment Variables',
properties: {
variables: {
type: 'array',
duplicable: true,
addLab... | Remove empty object from variables array | Remove empty object from variables array
| JavaScript | apache-2.0 | dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui | ---
+++
@@ -12,7 +12,7 @@
getter: function (service) {
let variableMap = service.getEnvironmentVariables();
if (variableMap == null) {
- return [{}];
+ return [];
}
return Object.keys(variableMap).map(function (key) {
return Hooks.applyFilter('va... |
485e7c6a5c29f5e9f89048ef819ed2338cd54830 | src/schema/infoSchema.js | src/schema/infoSchema.js | "use strict";
const Joi = require('joi');
const contactSchema = require('./contactSchema');
const licenseSchema = require('./licenseSchema');
const pathsSchema = require('./pathsSchema');
module.exports = Joi.object({
'title': Joi.string()
.required(),
'description': Joi.string(),
'termsOfService': Joi.str... | "use strict";
const Joi = require('joi');
const contactSchema = require('./contactSchema');
const licenseSchema = require('./licenseSchema');
const pathsSchema = require('./pathsSchema');
module.exports = Joi.object({
'title': Joi.string()
.required(),
'description': Joi.string(),
'termsOfService': Joi.str... | Add permission provider to the info schema | Add permission provider to the info schema
| JavaScript | mit | Teagan42/Deepthought-Routing | ---
+++
@@ -13,5 +13,6 @@
'termsOfService': Joi.string(),
'contact': contactSchema.required(),
'license': licenseSchema,
- 'paths': pathsSchema
+ 'paths': pathsSchema,
+ 'permissionProvider': Joi.func()
}); |
f1749939532bd2e7aa659e2261aac94ded794285 | client/main.js | client/main.js | import Vue from 'vue'
import App from './App'
import I18n from 'vue-i18n'
import Cookie from 'vue-cookie'
import { sync } from 'vuex-router-sync'
import router from './router'
import store from './store'
import en from 'locales/en'
import ja from 'locales/ja'
if (process.env.NODE_ENV === 'production') {
// Enable Pr... | import Vue from 'vue'
import App from './App'
import I18n from 'vue-i18n'
import Cookie from 'vue-cookie'
import { sync } from 'vuex-router-sync'
import router from './router'
import store from './store'
import en from 'locales/en'
import ja from 'locales/ja'
if (process.env.NODE_ENV === 'production') {
// Enable Pr... | Use Cloudflare for HTTPS redirect | Use Cloudflare for HTTPS redirect
| JavaScript | mit | wopian/hibari,wopian/hibari | ---
+++
@@ -13,9 +13,9 @@
require('./pwa')
// Redirect HTTP to HTTPS
- if (window.location.protocol === 'http:') {
- window.location.protocol = 'https'
- }
+ // if (window.location.protocol === 'http:') {
+ // window.location.protocol = 'https'
+ // }
}
sync(store, router) |
3f594741d55735c20ae1b7f083222e9d10e35fb5 | js/Main.js | js/Main.js | // Main JavaScript Document
var cards = [];
var mainContent = document.getElementId('main-content');
var mainContentRegion = new ZingTouch.Region(mainContent);
//Create the card object template
function contentCard(title, img, desc, link) {
"use strict";
this.title = title;
this.img = img;
this.desc = desc;... | // Main JavaScript Document
var cards = [];
var mainContent = document.getElementId('main-content');
var mainContentRegion = new ZingTouch.Region(mainContent);
//Create the card object template
function contentCard(title, img, desc, link) {
"use strict";
this.title = title;
this.img = img;
this.desc = desc;
th... | Create Card Object template and Card Picker | Create Card Object template and Card Picker
| JavaScript | mit | AnthonyGordon1/sneaker-app,AnthonyGordon1/sneaker-app | ---
+++
@@ -5,13 +5,31 @@
//Create the card object template
function contentCard(title, img, desc, link) {
- "use strict";
- this.title = title;
- this.img = img;
- this.desc = desc;
- this.link = link;
+ "use strict";
+ this.title = title;
+ this.img = img;
+ this.desc = desc;
+ this.link = link;
}... |
b0a2e9415545bd7ee6d592c3a270b2d308b80a73 | src/main/webapp/resources/js/modules/notifications.js | src/main/webapp/resources/js/modules/notifications.js | import Noty from "noty";
import "noty/src/noty.scss";
import "noty/src/themes/sunset.scss";
export function showNotification({ text, type = "success" }) {
return new Noty({
theme: "sunset",
timeout: 3500, // [integer|boolean] delay for closing event in milliseconds. Set false for sticky notifications
lay... | import Noty from "noty";
import "noty/src/noty.scss";
import "noty/src/themes/relax.scss";
export function showNotification({ text, type = "success" }) {
return new Noty({
theme: "relax",
timeout: 3500, // [integer|boolean] delay for closing event in milliseconds. Set false for sticky notifications
layou... | Update to use relax theme | Update to use relax theme
| JavaScript | apache-2.0 | phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida | ---
+++
@@ -1,10 +1,10 @@
import Noty from "noty";
import "noty/src/noty.scss";
-import "noty/src/themes/sunset.scss";
+import "noty/src/themes/relax.scss";
export function showNotification({ text, type = "success" }) {
return new Noty({
- theme: "sunset",
+ theme: "relax",
timeout: 3500, // [integ... |
0ba67c44d9151fe6286603180e48d1f217344d26 | client/util.js | client/util.js | var validateFloat = function(val) {
if (typeof val != 'undefined') {
val = parseFloat(val);
if (! isNaN(val)) {
if (val > -99999 ) {
return val;
}
}
}
return Infinity;
};
var enableFilter = function (id) {
var f = window.app.filters.get(i... | var validateFloat = function(val) {
if (typeof val != 'undefined') {
val = parseFloat(val);
if (! isNaN(val)) {
if (val > -99999 ) {
return val;
}
}
}
return Infinity;
};
var enableFilter = function (id) {
var f = window.app.filters.get(i... | Fix bug where filter was not set to inacative | Fix bug where filter was not set to inacative
| JavaScript | apache-2.0 | summerinthecity/uhitool,jspaaks/spot,NLeSC/spot,jspaaks/spot,jiskattema/uhitool,summerinthecity/uhitool,jiskattema/uhitool | ---
+++
@@ -25,6 +25,8 @@
f._dx.dispose();
delete f._dx;
+
+ f.active = false;
};
module.exports = { |
204de9d56b72ce5387af7bdd5dffab60d16e31e9 | nodejs/config.js | nodejs/config.js | require('dotenv').config({
silent: true,
})
let makeHostConfig = (env, prefix) => {
let host = env[prefix + '_HOST'] || '127.0.0.1'
let port = parseInt(env[prefix + '_PORT'], 10) || 3030
let https = env[prefix + '_HTTPS'] === 'true' || env[prefix + '_HTTPS'] === true
let default_port, protocol
... | require('dotenv').config({
silent: true,
})
let makeHostConfig = (env, prefix) => {
let host = env[prefix + '_HOST'] || '127.0.0.1'
let port = parseInt(env[prefix + '_PORT'], 10) || 3030
let https = env[prefix + '_HTTPS'] === 'true' || env[prefix + '_HTTPS'] === true
let default_port, protocol
... | Implement HTTPS support for Docker | Implement HTTPS support for Docker
| JavaScript | mit | viblo-asia/api-proxy | ---
+++
@@ -38,7 +38,10 @@
node: makeHostConfig(process.env, 'NODE'),
api: makeHostConfig(process.env, 'API'),
external: makeHostConfig(process.env, 'APP'),
- websocket: makeHostConfig(process.env, 'ECHO'),
+ websocket: {
+ host: process.env.ECHO_HOST || 'localhost',
+ port: process... |
796488305ab4f2231a58bd18474268bd8c7b5952 | components/EditableEntry.js | components/EditableEntry.js | /**
* @flow
*/
import React from 'react';
import { StyleSheet, TextInput } from 'react-native';
import PropTypes from 'prop-types';
import Box from './Box';
class EditableEntry extends React.Component {
render() {
return (
<Box numberOfLines={1}>
<TextInput
style={styles.te... | /**
* @flow
*/
import React from 'react';
import { StyleSheet, TextInput } from 'react-native';
import PropTypes from 'prop-types';
import Box from './Box';
class EditableEntry extends React.Component {
render() {
return (
<Box numberOfLines={1}>
<TextInput
style={styles.te... | Add a returnKeyType to the input keyboard | Add a returnKeyType to the input keyboard
| JavaScript | mit | nikhilsaraf/react-native-todo-app | ---
+++
@@ -17,6 +17,7 @@
onSubmitEditing={(event) => this.props.onSubmit(event.nativeEvent.text)}
autoFocus={true}
value={this.props.text}
+ returnKeyType="done"
/>
</Box>
); |
65bbd24974974672c60eea3f250564be6a4bfead | webroot/rsrc/js/application/differential/behavior-user-select.js | webroot/rsrc/js/application/differential/behavior-user-select.js | /**
* @provides javelin-behavior-differential-user-select
* @requires javelin-behavior
* javelin-dom
* javelin-stratcom
*/
JX.behavior('differential-user-select', function() {
var unselectable;
function isOnRight(node) {
return node.parentNode.firstChild != node.previousSibling;
}
... | /**
* @provides javelin-behavior-differential-user-select
* @requires javelin-behavior
* javelin-dom
* javelin-stratcom
*/
JX.behavior('differential-user-select', function() {
var unselectable;
function isOnRight(node) {
return node.previousSibling &&
node.parentNode.firstChild... | Enable selecting text in Differential shield and gap | Enable selecting text in Differential shield and gap
Test Plan:
Selected text in shield.
Selected text in right side.
Reviewers: epriestley, btrahan
Reviewed By: btrahan
CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3522
| JavaScript | apache-2.0 | vuamitom/phabricator,r4nt/phabricator,denisdeejay/phabricator,Automattic/phabricator,Automattic/phabricator,hshackathons/phabricator-deprecated,wangjun/phabricator,telerik/phabricator,zhihu/phabricator,devurandom/phabricator,christopher-johnson/phabricator,huaban/phabricator,matthewrez/phabricator,aswanderley/phabricat... | ---
+++
@@ -10,7 +10,8 @@
var unselectable;
function isOnRight(node) {
- return node.parentNode.firstChild != node.previousSibling;
+ return node.previousSibling &&
+ node.parentNode.firstChild != node.previousSibling;
}
JX.Stratcom.listen( |
9d7031b6dcf8c8ce6a36cdfc73c9d467a44517b5 | js/game.js | js/game.js | var Game = function(boardString){
var board = '';
this.board = '';
if (arguments.length === 1) {
this.board = this.toArray(boardString);
} else {
function random() {
return Math.floor(Math.random() * 10 + 6);
};
var firstTwo = random(), secondTwo = random();
for ( var i = 0; i < 16; i+... | var Game = function(boardString){
var board = '';
this.board = '';
if (arguments.length === 1) {
this.board = this.toArray(boardString);
} else {
function random() {
return Math.floor(Math.random() * 10 + 6);
};
var firstTwo = random(), secondTwo = random();
for ( var i = 0; i < 16; i+... | Modify toString method for board array format | Modify toString method for board array format
| JavaScript | mit | suprfrye/galaxy-256,suprfrye/galaxy-256 | ---
+++
@@ -22,10 +22,9 @@
Game.prototype = {
toString: function() {
- for( var i = 0; i < 16; i += 4){
- this.array = this.board.slice(0 + i, 4 + i)
- console.log(this.array)
- }
+ this.board.forEach(function(row) {
+ console.log(row.join(''));
+ });
},
toArray: function(char... |
b795f71c87be22da3892c6cc9eca607b229c66bf | packages/ember-data/lib/instance-initializers/initialize-store-service.js | packages/ember-data/lib/instance-initializers/initialize-store-service.js | /**
Configures a registry for use with an Ember-Data
store.
@method initializeStore
@param {Ember.ApplicationInstance} applicationOrRegistry
*/
export default function initializeStoreService(applicationOrRegistry) {
var registry, container;
if (applicationOrRegistry.registry && applicationOrRegistry.container... | /**
Configures a registry for use with an Ember-Data
store.
@method initializeStore
@param {Ember.ApplicationInstance} applicationOrRegistry
*/
export default function initializeStoreService(applicationOrRegistry) {
var registry, container;
if (applicationOrRegistry.registry && applicationOrRegistry.container... | Support for Ember 1.9's container API after `store:application` refactor. | Support for Ember 1.9's container API after `store:application` refactor.
| JavaScript | mit | andrejunges/data,Turbo87/ember-data,fpauser/data,Turbo87/ember-data,gniquil/data,flowjzh/data,Kuzirashi/data,tstirrat/ember-data,webPapaya/data,gkaran/data,eriktrom/data,minasmart/data,dustinfarris/data,danmcclain/data,workmanw/data,ryanpatrickcook/data,jgwhite/data,minasmart/data,HeroicEric/data,ryanpatrickcook/data,o... | ---
+++
@@ -18,7 +18,11 @@
// an instanceInitializer. The first argument is a registy. This
// case allows ED to support Ember pre 1.12
registry = applicationOrRegistry;
- container = registry.container();
+ if (registry.container) { // Support Ember 1.10 - 1.11
+ container = registry.contai... |
81248f3d84a40336e9d9d0e9a4f5c43441d0e381 | main.js | main.js | var app = require('http').createServer(handler);
var io = require('socket.io').listen(app);
var fs = require('fs');
var util = require('util');
var Tail = require('tail').Tail;
var static = require('node-static');
var file = new static.Server('./web', {cache: 6}); //cache en secondes
function handler (req, res) {
... | var app = require('http').createServer(handler);
var io = require('socket.io').listen(app);
var fs = require('fs');
var util = require('util');
var Tail = require('tail').Tail;
var static = require('node-static');
var file = new static.Server('./web', {cache: 6}); //cache en secondes
var loadNbLines = 10;
function h... | Read 10 lines from the file when starting to follow | Read 10 lines from the file when starting to follow | JavaScript | mit | feuloren/logreader | ---
+++
@@ -6,6 +6,8 @@
var static = require('node-static');
var file = new static.Server('./web', {cache: 6}); //cache en secondes
+
+var loadNbLines = 10;
function handler (req, res) {
if( req.url == '/') {
@@ -26,6 +28,17 @@
socket.emit('cant follow', {reason: err.code, file: file});
... |
2e5ed8a3bbf39be10cc528047345b43c9595eecf | client/app/components/printerList/index.js | client/app/components/printerList/index.js | import React, { PropTypes } from 'react';
import style from './style.css';
import Printer from '../printer';
class PrinterListComponent extends React.Component {
getPrinterComponent(key) {
return (<Printer
{...this.props.printers[key]} key={key}
toggleSelected={() => { this.props.toggleSelected(key... | import React, { PropTypes } from 'react';
import style from './style.css';
import Printer from '../printer';
class PrinterListComponent extends React.Component {
getPrinterComponent(key) {
return (<Printer
{...this.props.printers[key]} key={key}
toggleSelected={() => { this.props.toggleSelected(key... | Fix last printer not showing when there was odd number of printers | Fix last printer not showing when there was odd number of printers
| JavaScript | agpl-3.0 | MakersLab/farm-client,MakersLab/farm-client | ---
+++
@@ -15,9 +15,8 @@
let keys = Object.keys(this.props.printers);
let printerRows = [];
if (keys.length > 0) {
- let howManyTimes = Math.floor(keys.length / 2);
+ let howManyTimes = Math.ceil(keys.length / 2);
for (let i = 0; i < howManyTimes; i+=1) {
- console.log(Math.flo... |
bc548adb239f564fa0815fa050a9c0e9d6f59ed7 | main.js | main.js | import Bot from 'telegram-api/build';
import Message from 'telegram-api/types/Message';
import subscribe from './commands/subscribe';
import doc from './commands/doc';
let bot = new Bot({
token: '121143906:AAFJz_-Bjwq_8KQqTmyY2MtlcPb-bX_1O7M'
});
bot.start();
const welcome = new Message().text(`Hello!
I give you s... | import Bot from 'telegram-api/build';
import Message from 'telegram-api/types/Message';
import subscribe from './commands/subscribe';
import doc from './commands/doc';
let bot = new Bot({
token: '121143906:AAFJz_-Bjwq_8KQqTmyY2MtlcPb-bX_1O7M'
});
bot.start();
const COMMANDS = `Commands:
/subscribe - Subscribe to /... | Add help command Add github and npm to commands | Add help command
Add github and npm to commands
| JavaScript | artistic-2.0 | mdibaiee/webdevrobot | ---
+++
@@ -9,15 +9,25 @@
bot.start();
-const welcome = new Message().text(`Hello!
+const COMMANDS = `Commands:
+/subscribe - Subscribe to /r/javascript and get a message for each new message
+/unsubscribe - Unsubscribe
+/doc [subject] - Search MDN for the given subject
+/github [subject] - Search GitHub for a r... |
d23a9060c4174db9b99a2e54924223e79ac5a828 | packages/custom/voteeHome/public/tests/voteeHome.spec.js | packages/custom/voteeHome/public/tests/voteeHome.spec.js | 'use strict';
(function() {
describe("voteeHome", function() {
beforeEach(function() {
module('mean');
module('mean.voteeHome');
});
var $controller;
var $scope;
beforeEach(inject(function(_$controller_){
// The injector unwraps the un... | 'use strict';
(function() {
describe("voteeHome", function() {
beforeEach(function() {
module('mean');
module('mean.voteeHome');
});
var $controller;
var $scope;
beforeEach(inject(function(_$controller_){
// The injector unwraps the un... | Use the 'should expose some global scope' test | Use the 'should expose some global scope' test
As seen in examples when there doesn't seem to be anything else to test. | JavaScript | mit | lewkoo/Votee,lewkoo/Votee,lewkoo/Votee | ---
+++
@@ -23,8 +23,8 @@
var controller = $controller('VoteeHomeController', { $scope: $scope });
});
- it("stub", function() {
- expect(true).toBe(true);
+ it('should expose some global scope', function() {
+ expect(true).toBeTruthy()... |
ce9abc43dbc217d800f833cff36ee3e51e85a2e9 | assignFAST/assignFASTExample.js | assignFAST/assignFASTExample.js | /*
javascript in this file controls the html page demonstrating the autosubject functionality
*/
/**************************************************************************************/
/* Set up and initialization */
/*****************************************************************************... | /*
javascript in this file controls the html page demonstrating the autosubject functionality
*/
/**************************************************************************************/
/* Set up and initialization */
/*****************************************************************************... | Revert "Display the tag/facet of the selected term in the input" | Revert "Display the tag/facet of the selected term in the input"
This reverts commit f85613a9af711a4aeb27b3bbe6efe8592e8318ce.
| JavaScript | mit | dkudeki/metadata-maker,dkudeki/metadata-maker | ---
+++
@@ -13,7 +13,7 @@
*/
-var currentSuggestIndexDefault = "suggestall"; //initial default value
+var currentSuggestIndexDefault = "suggest50"; //initial default value
function setUpPage(number) {
// connect the autoSubject to the input areas
@@ -42,5 +42,5 @@
For this example, replace the common su... |
81b1d18eff0f5734aa64b780897bd8f7bb1bdb31 | models/user.js | models/user.js | var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var UserSchema = new Schema(
{
lastName : String,
firstName : String,
username : String,
passwordHash : String,
privateKey : String,
picture : String,
level : String,
description : String,
created : Date,
... | var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var UserSchema = new Schema(
{
lastName : String,
firstName : String,
username : String,
email : String,
passwordHash : String,
privateKey : String,
picture : String,
level : String,
description : String,
... | Add Email field to User | Add Email field to User
| JavaScript | mit | asso-labeli/labeli-api,asso-labeli/labeli-api,asso-labeli/labeli-api | ---
+++
@@ -6,6 +6,7 @@
lastName : String,
firstName : String,
username : String,
+ email : String,
passwordHash : String,
privateKey : String,
picture : String, |
be01e76023213f35d99f69ffc440906022e218ee | src/js/select2/i18n/hu.js | src/js/select2/i18n/hu.js | define(function () {
// Hungarian
return {
errorLoading: function () {
return 'Az eredmények betöltése nem sikerült.';
},
inputTooLong: function (args) {
var overChars = args.input.length - args.maximum;
return 'Túl hosszú. ' + overChars + ' karakterrel több, mint kellene.';
},
... | define(function () {
// Hungarian
return {
errorLoading: function () {
return 'Az eredmények betöltése nem sikerült.';
},
inputTooLong: function (args) {
var overChars = args.input.length - args.maximum;
return 'Túl hosszú. ' + overChars + ' karakterrel több, mint kellene.';
},
... | Update Hungarian translation for new strings | Update Hungarian translation for new strings
Updated Hungarian translation. | JavaScript | mit | select2/select2,select2/select2 | ---
+++
@@ -28,6 +28,12 @@
},
removeAllItems: function () {
return 'Távolítson el minden elemet';
+ },
+ removeItem: function () {
+ return 'Elem eltávolítása';
+ },
+ search: function() {
+ return 'Keresés';
}
};
}); |
36a42af4fa6a02fa45c357020269ca52ca9e27d1 | modules/udp.js | modules/udp.js | module.exports = {
events: {
udp: function (bot, msg, rinfo) {
if (rinfo.address === bot.config.get('yakc.ip')) {
bot.fireEvents('yakc', msg.toString(), rinfo)
} else {
bot.notice(bot.config.get('udp.channel'), msg.toString())
}
}
}
}
| module.exports = {
events: {
udp: function (bot, msg, rinfo) {
if (rinfo.address === bot.config.get('yakc.ip')) {
bot.fireEvents('yakc', msg.toString(), rinfo)
} else {
bot.notice(bot.config.get('udp.channel'), msg.toString())
// copy https://github.com/zuzak/twitter-irc-udp m... | Copy interesting tweets to control channel | Copy interesting tweets to control channel
| JavaScript | isc | zuzakistan/civilservant,zuzakistan/civilservant | ---
+++
@@ -5,6 +5,11 @@
bot.fireEvents('yakc', msg.toString(), rinfo)
} else {
bot.notice(bot.config.get('udp.channel'), msg.toString())
+
+ // copy https://github.com/zuzak/twitter-irc-udp messages from verified users:
+ if (msg.toString().includes('✓')) {
+ bot.notic... |
36c93b468c7957a5b793c4eacb1a739c61100ef3 | src/Overview.js | src/Overview.js | /* global fetch */
import React from 'react';
import TotalWidget from './TotalWidget';
import NextTripWidget from './NextTripWidget';
import TripTable from './TripTable';
import Map from './Map';
import './scss/overview.scss';
class Overview extends React.Component {
constructor() {
super();
this.loading =... | /* global fetch document */
import React from 'react';
import TotalWidget from './TotalWidget';
import NextTripWidget from './NextTripWidget';
import TripTable from './TripTable';
import Map from './Map';
import './scss/overview.scss';
class Overview extends React.Component {
constructor() {
super();
this.... | Make fetch URL less specific | Make fetch URL less specific
| JavaScript | mpl-2.0 | MichaelKohler/where,MichaelKohler/where | ---
+++
@@ -1,4 +1,4 @@
-/* global fetch */
+/* global fetch document */
import React from 'react';
import TotalWidget from './TotalWidget';
@@ -22,7 +22,7 @@
}
getData() {
- fetch('http://localhost:4444/trips')
+ fetch(`${document.location.protocol}//${document.location.hostname}:4444/trips`)
... |
8b2d2153271eec59b4b2d43a75ba9a83ed432a5d | client/components/login.js | client/components/login.js | Accounts.ui.config({
requestPermissions: {
github: ['user', 'repo', 'gist']
}
})
//
// Accounts.onLogin(function () {
// Router.go('/profile')
// })
Template.login.helpers({
currentUser: function () {
return Meteor.user()
}
})
Template.login.events({
})
| Accounts.ui.config({
requestPermissions: {
github: ['user', 'public_gist']
}
})
//
// Accounts.onLogin(function () {
// Router.go('/profile')
// })
Template.login.helpers({
currentUser: function () {
return Meteor.user()
}
})
Template.login.events({
})
| Update access request for public gists | Update access request for public gists
| JavaScript | isc | caalberts/code-hangout,caalberts/code-hangout | ---
+++
@@ -1,9 +1,9 @@
Accounts.ui.config({
requestPermissions: {
- github: ['user', 'repo', 'gist']
+ github: ['user', 'public_gist']
}
})
-//
+//
// Accounts.onLogin(function () {
// Router.go('/profile')
// }) |
d25293f6af7ce9d646d64c681b59983d442eab42 | js/main.js | js/main.js | $(document).ready(function(){
// Include common elements
$("#footer").load("common/footer.html");
$("#header").load("common/header.html", function()
{
// Add current navigation class based on url
locations = location.pathname.split("/");
$('#topnav a[href^="' + locations[locations.length - 1] + '"]... | $(document).ready(function(){
// Include common elements
$("#footer").load("common/footer.html");
$("#header").load("common/header.html", function()
{
// Add current navigation class based on url
locations = location.pathname.split("/");
current = $('#topnav a[href^="' + locations[locations.length ... | Select first nav li by default | Select first nav li by default
| JavaScript | mit | mbdimitrova/bmi-fmi,mbdimitrova/bmi-fmi | ---
+++
@@ -6,7 +6,12 @@
{
// Add current navigation class based on url
locations = location.pathname.split("/");
- $('#topnav a[href^="' + locations[locations.length - 1] + '"]').parent().addClass('current');
+ current = $('#topnav a[href^="' + locations[locations.length - 1] + '"]')
+ if (curr... |
b30d1d1e94b6c65babb2c9351cfe49153926d3b9 | js/main.js | js/main.js | var updatePreviewTarget = function(data, status) {
$('.spinner').hide();
$('#preview-target').html(data);
renderLatexExpressions();
}
var renderLatexExpressions = function() {
$('.latex-container').each(
function(index) {
katex.render(
this.textContent,
this,
{ displayMode: $(... | var updatePreviewTarget = function(data, status) {
$('.spinner').hide();
$('#preview-target').html(data);
renderLatexExpressions();
}
var renderLatexExpressions = function() {
$('.latex-container').each(
function(index) {
katex.render(
this.textContent,
this,
{ displayMode: $(... | Make footnote textarea expand upon focus | Make footnote textarea expand upon focus
| JavaScript | mit | erettsegik/erettsegik.hu,erettsegik/erettsegik.hu,erettsegik/erettsegik.hu | ---
+++
@@ -31,6 +31,12 @@
);
renderLatexExpressions();
+
+ $("textarea[name='footnotes']").focusin(function(){
+ $(this).height($(this).height() + 300);
+ }).focusout(function(){
+ $(this).height($(this).height() - 300);
+ });
};
function searchRedirect(event, searchpage) { |
08229bff7728a349aa93eb0dc8db248106cbda97 | scripts/export_map.js | scripts/export_map.js | var casper = require('casper').create();
// casper.on('remote.message', function(message) {
// console.log(message);
// });
var out_dir = 'static/tmp/';
var key = casper.cli.get(0);
var url = casper.cli.get(1);
var filepath = out_dir + key + '.png';
casper.start();
casper.viewport(1024, 650).thenOpen(url, func... | var casper = require('casper').create();
// casper.on('remote.message', function(message) {
// console.log(message);
// });
var out_dir = 'static/tmp/';
var key = casper.cli.get(0);
var url = casper.cli.get(1);
var filepath = out_dir + key + '.png';
casper.start();
casper.viewport(1024, 650).thenOpen(url, func... | Use casper.wait to wait until image are loaded and transitioned | Use casper.wait to wait until image are loaded and transitioned
| JavaScript | mit | AstunTechnology/NRW_FishMapMon,AstunTechnology/NRW_FishMapMon,AstunTechnology/NRW_FishMapMon,AstunTechnology/NRW_FishMapMon | ---
+++
@@ -13,9 +13,14 @@
casper.start();
casper.viewport(1024, 650).thenOpen(url, function() {
- this.wait(1000);
- this.capture(filepath);
- casper.echo(filepath);
+ casper.then(function() {
+ this.wait(2000, (function() {
+ return function() {
+ casper.capture(file... |
b13fd8658d216732d4e54e40e029a8246e73202d | main.js | main.js | 'use strict';
var app = require('app');
var dribbbleapi = require('./dribbbleapi');
var mainWindow = null;
var dribbbleData = null;
var menubar = require('menubar')
var mb = menubar({
index: 'file://' + __dirname + '/app/index.html',
icon: __dirname + '/app/assets/HotshotIcon.png',
width: 400,
height: 700,
... | 'use strict';
var app = require('app');
var mainWindow = null;
var dribbbleData = null;
var menubar = require('menubar')
var mb = menubar({
index: 'file://' + __dirname + '/app/index.html',
icon: __dirname + '/app/assets/HotshotIcon.png',
width: 400,
height: 700,
'max-width': 440,
'min-height': 300,
'm... | Remove reference to deleted dribbbleApi.js | Remove reference to deleted dribbbleApi.js
| JavaScript | cc0-1.0 | andrewnaumann/hotshot,andrewnaumann/hotshot | ---
+++
@@ -1,6 +1,5 @@
'use strict';
var app = require('app');
-var dribbbleapi = require('./dribbbleapi');
var mainWindow = null;
var dribbbleData = null; |
21f7adb8f7e293f205c7b0813726c10a2a1224f1 | tests/dummy/config/dependency-lint.js | tests/dummy/config/dependency-lint.js | /* eslint-env node */
'use strict';
module.exports = {
allowedVersions: {
'ember-in-element-polyfill': '*',
'ember-get-config': '0.3.0 || 0.4.0 || 0.5.0',
'@embroider/util': '*',
},
};
| /* eslint-env node */
'use strict';
module.exports = {
allowedVersions: {
'ember-in-element-polyfill': '*',
},
};
| Remove unneeded dependency lint overrides | Remove unneeded dependency lint overrides
| JavaScript | mit | ilios/common,ilios/common | ---
+++
@@ -4,7 +4,5 @@
module.exports = {
allowedVersions: {
'ember-in-element-polyfill': '*',
- 'ember-get-config': '0.3.0 || 0.4.0 || 0.5.0',
- '@embroider/util': '*',
},
}; |
14fb941b6db1aa53e7906a46e8cf7f6d4abb6d94 | Rightmove_Enhancement_Suite.user.js | Rightmove_Enhancement_Suite.user.js | // ==UserScript==
// @name Rightmove Enhancement Suite
// @namespace https://github.com/chigley/
// @description Keyboard shortcuts
// @include http://www.rightmove.co.uk/*
// @version 1
// @grant GM_addStyle
// @grant GM_getResourceText
// @resource style style.css
// ==/UserScript==
v... | // ==UserScript==
// @name Rightmove Enhancement Suite
// @namespace https://github.com/chigley/
// @description Keyboard shortcuts
// @include http://www.rightmove.co.uk/*
// @version 1
// @grant GM_addStyle
// @grant GM_getResourceText
// @resource style style.css
// ==/UserScript==
v... | Fix selector to only match list items | Fix selector to only match list items
| JavaScript | mit | chigley/rightmove-enhancement-suite | ---
+++
@@ -13,10 +13,10 @@
GM_addStyle(GM_getResourceText("style"));
-$("#summaries li").mouseenter(function () {
+$("[name=summary-list-item]").mouseenter(function () {
$(this).addClass("hovered");
});
-$("#summaries li").mouseleave(function () {
+$("[name=summary-list-item]").mouseleave(function () {
$... |
c2b47f8a3c1d3f844152127c9218d90dfa66bbf2 | packages/storefront/app/routes/yebo/taxons/show.js | packages/storefront/app/routes/yebo/taxons/show.js | // Ember!
import Ember from 'ember';
import SearchRoute from 'yebo-ember-storefront/mixins/search-route';
/**
* Taxons show page
* This page shows products related to the current taxon
*/
export default Ember.Route.extend(SearchRoute, {
/**
* Define the search rules
*/
searchRules(query, params) {
// ... | // Ember!
import Ember from 'ember';
import SearchRoute from 'yebo-ember-storefront/mixins/search-route';
/**
* Taxons show page
* This page shows products related to the current taxon
*/
export default Ember.Route.extend(SearchRoute, {
/**
* Define the search rules
*/
searchRules(query, params) {
// ... | Return a promise in the searchModel method | Return a promise in the searchModel method
| JavaScript | mit | yebo-ecommerce/ember,yebo-ecommerce/ember,yebo-ecommerce/ember | ---
+++
@@ -43,9 +43,9 @@
*/
searchModel(params) {
// Search all the taxonomies and the current taxon
- return {
+ return Ember.RSVP.hash({
taxonomies: this.yebo.store.findAll('taxonomy'),
taxon: this.yebo.store.find('taxon', params.taxon),
- };
+ });
}
}); |
764743d6b08899286262a50203b11410d90f9694 | cypress/support/commands.js | cypress/support/commands.js | // ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***************************... | // ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***************************... | Add functionality for filling in checkboxes | Add functionality for filling in checkboxes | JavaScript | mit | ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public | ---
+++
@@ -32,3 +32,7 @@
Cypress.Commands.add('setTextInput', (selector, value) => {
cy.get(`#${selector}`).type(value);
})
+
+Cypress.Commands.add('setCheckboxInput', (selector) => {
+ cy.get(`#${selector}`).check();
+}) |
205535d3723b96163f74e4d18a3dd3a5fa84dcf9 | screens/MemoriesScreen.js | screens/MemoriesScreen.js | import React from "react";
import {
Text
} from "react-native";
export default class MemoriesScreen extends React.Component {
render() {
return (
<Text>My memories</Text>
);
}
}
MemoriesScreen.route = {
navigationBar: {
title: "My memories",
}
};
| import React from "react";
import {
Text
} from "react-native";
var memory = {
eventName: "Tree planting",
eventDate: Date(),
image: require("../static/content/images/memories/01.jpg")
};
var userData = {
name: "Sara",
image: require("../static/content/images/people/users/01_sara_douglas.jpg"),
memories... | Add sample data example to memories screen for UI dev | Add sample data example to memories screen for UI dev
| JavaScript | mit | ottobonn/roots | ---
+++
@@ -2,6 +2,22 @@
import {
Text
} from "react-native";
+
+var memory = {
+ eventName: "Tree planting",
+ eventDate: Date(),
+ image: require("../static/content/images/memories/01.jpg")
+};
+
+var userData = {
+ name: "Sara",
+ image: require("../static/content/images/people/users/01_sara_douglas.jpg"... |
8caa309f6a807555825f277e5f277007544b9957 | js/end_game.js | js/end_game.js | var endGame = function(game){
if (game.player.lives > 0) {
missBall(game.ball, game.player)
} else if (game.player.lives <= 0 ){
gameOver()
}
}
var missBall = function(ball, player){
if ( ball.bottomEdge().y == canvas.height){
return player.loseLife()
}
return false
}
function gameOver() {
... | var endGame = function(game){
if (game.player.lives > 0) {
missBall(game.ball, game.player)
} else if (game.player.lives <= 0 ){
gameOver()
}
if (stillBricks(game.bricks)) {
winGame()
}
}
var missBall = function(ball, player){
if ( ball.bottomEdge().y == canvas.height){
console.log("Lost L... | Implement win game prompt after all bricks destroyed | Implement win game prompt after all bricks destroyed
| JavaScript | mit | theomarkkuspaul/Brick-Breaker,theomarkkuspaul/Brick-Breaker | ---
+++
@@ -5,13 +5,16 @@
} else if (game.player.lives <= 0 ){
gameOver()
}
+ if (stillBricks(game.bricks)) {
+ winGame()
+ }
}
var missBall = function(ball, player){
if ( ball.bottomEdge().y == canvas.height){
+ console.log("Lost Life")
return player.loseLife()
- }
- return false
+ ... |
7388412cc4908793883e0de2348f8b44b72e2256 | js/main.js | js/main.js | document.addEventListener('DOMContentLoaded', function() {
var searchButton = document.getElementById('search');
searchButton.addEventListener('click', (function() {
var query = document.getElementById('form').query.value;
var engine = document.querySelector('input[name="engine"]:checked').value;
var u... | document.addEventListener('DOMContentLoaded', function() {
var searchButton = document.getElementById('search');
document.querySelector('input[name="engine"]:checked').focus();
searchButton.addEventListener('click', (function() {
var query = document.getElementById('form').query.value;
var engine = docum... | Add focus on the first radio button | Add focus on the first radio button
| JavaScript | mit | yu-i9/HoogleSwitcher,yu-i9/HoogleSwitcher | ---
+++
@@ -1,5 +1,6 @@
document.addEventListener('DOMContentLoaded', function() {
var searchButton = document.getElementById('search');
+ document.querySelector('input[name="engine"]:checked').focus();
searchButton.addEventListener('click', (function() {
var query = document.getElementById('form').que... |
5641a9bc6a72b30572840e4067c9421ecd973f27 | app/assets/javascripts/angular/main/register-controller.js | app/assets/javascripts/angular/main/register-controller.js | (function(){
'use strict';
angular
.module('secondLead')
.controller('RegisterCtrl', [
'Restangular',
'$state',
'store',
'UserModel',
function (Restangular, $state, store, UserModel) {
var register = this;
register.newUser = {};
register.onSubmit = function () {
UserMode... | (function(){
'use strict';
angular
.module('secondLead')
.controller('RegisterCtrl', [
'Restangular',
'$state',
'store',
'UserModel',
function (Restangular, $state, store, UserModel) {
var register = this;
register.newUser = {};
register.onSubmit = function () {
UserMode... | Add update to usermodel upon signup with register controller | Add update to usermodel upon signup with register controller
| JavaScript | mit | ac-adekunle/secondlead,ac-adekunle/secondlead,ac-adekunle/secondlead | ---
+++
@@ -21,6 +21,7 @@
if (response.errors){
register.error = response.errors[0];
} else {
+ UserModel.setLoggedIn(true);
store.set('jwt',response.token);
store.set('user',response.user);
$state.go('user.lists', {userID: response... |
917b47168540b27682825b50155aaf34ecef3b62 | compassion.colleague/ua.js | compassion.colleague/ua.js | var cadence = require('cadence')
var util = require('util')
function UserAgent (ua) {
this._ua = ua
}
UserAgent.prototype.send = cadence(function (async, properties, body) {
var url = util.format('http://%s/kibitz', properties.location)
this._ua.fetch({
url: url,
post: {
island... | var cadence = require('cadence')
var util = require('util')
function UserAgent (ua) {
this._ua = ua
}
UserAgent.prototype.send = cadence(function (async, properties, body) {
var url = util.format('http://%s/kibitz', properties.location)
this._ua.fetch({
url: url,
post: {
key: '... | Adjust user agent for new keyed protocol. | Adjust user agent for new keyed protocol.
| JavaScript | mit | bigeasy/compassion | ---
+++
@@ -10,9 +10,8 @@
this._ua.fetch({
url: url,
post: {
- islandName: properties.islandName,
- colleagueId: properties.colleagueId,
- kibitz: body
+ key: '(' + properties.islandName + ')' + properties.colleagueId,
+ post: { kibitz: bod... |
4025d7a5b28d6b3b88af5d78b5b31c304d0afca6 | assets/src/stories-editor/helpers/test/addAMPExtraProps.js | assets/src/stories-editor/helpers/test/addAMPExtraProps.js | /**
* Internal dependencies
*/
import { addAMPExtraProps } from '../';
describe( 'addAMPExtraProps', () => {
it( 'does not modify non-child blocks', () => {
const props = addAMPExtraProps( {}, { name: 'foo/bar' }, {} );
expect( props ).toStrictEqual( {} );
} );
it( 'generates a unique ID', () => {
const p... | /**
* Internal dependencies
*/
import { addAMPExtraProps } from '../';
describe( 'addAMPExtraProps', () => {
it( 'does not modify non-child blocks', () => {
const props = addAMPExtraProps( {}, { name: 'foo/bar' }, {} );
expect( props ).toStrictEqual( {} );
} );
it( 'adds a font family attribute', () => {
... | Remove tests that are not relevant anymore. | Remove tests that are not relevant anymore.
| JavaScript | apache-2.0 | ampproject/amp-toolbox-php,ampproject/amp-toolbox-php | ---
+++
@@ -8,18 +8,6 @@
const props = addAMPExtraProps( {}, { name: 'foo/bar' }, {} );
expect( props ).toStrictEqual( {} );
- } );
-
- it( 'generates a unique ID', () => {
- const props = addAMPExtraProps( {}, { name: 'amp/amp-story-text' }, {} );
-
- expect( props ).toHaveProperty( 'id' );
- } );
-
- it( ... |
e5c906b30e793d73972b133cc3099f48a0a1a919 | adapter.js | adapter.js | (function() {
var global = this;
var karma = global.__karma__;
karma.start = function(runner) {
var suites = global.__karma_benchmark_suites__;
var hasTests = !!suites.length;
var errors = [];
if (!hasTests) {
return complete();
}
runNextSuite();
function logResult(event) {
... | (function() {
var global = this;
var karma = global.__karma__;
karma.start = function(runner) {
var suites = global.__karma_benchmark_suites__;
var hasTests = !!suites.length;
var errors = [];
if (!hasTests) {
return complete();
}
runNextSuite();
function logResult(event) {
... | Fix logging of errors, Karma expects a string. Reset errors after every cycle. | Fix logging of errors, Karma expects a string. Reset errors after every cycle.
| JavaScript | mit | JamieMason/karma-benchmark,JamieMason/karma-benchmark | ---
+++
@@ -35,10 +35,13 @@
hz: result.hz
}
});
+
+ // Reset errors
+ errors = [];
}
function logError(evt) {
- errors.push(evt.target.error);
+ errors.push(evt.target.error.toString());
}
function runNextSuite() { |
474fbf5b088004ad676fe71b15f3031755b02b74 | src/index.js | src/index.js | import middleware from './internal/middleware'
export default middleware
export { runSaga } from './internal/runSaga'
export { END, eventChannel, channel } from './internal/channel'
export { buffers } from './internal/buffers'
export { takeEvery, takeLatest } from './internal/sagaHelpers'
import { CANCEL } from './i... | import middleware from './internal/middleware'
export default middleware
export { runSaga } from './internal/runSaga'
export { END, eventChannel, channel } from './internal/channel'
export { buffers } from './internal/buffers'
export { takeEvery, takeLatest } from './internal/sagaHelpers'
import { CANCEL } from './i... | Replace `setTimeout` call with 2-args version | Replace `setTimeout` call with 2-args version
| JavaScript | mit | yelouafi/redux-saga,eiriklv/redux-saga,HansDP/redux-saga,baldwmic/redux-saga,redux-saga/redux-saga,yelouafi/redux-saga,redux-saga/redux-saga,HansDP/redux-saga,eiriklv/redux-saga,granmoe/redux-saga,baldwmic/redux-saga,ipluser/redux-saga,granmoe/redux-saga,ipluser/redux-saga | ---
+++
@@ -14,7 +14,7 @@
export function delay(ms, val=true) {
let timeoutId;
const promise = new Promise((resolve) => {
- timeoutId = setTimeout(resolve, ms, val);
+ timeoutId = setTimeout(() => resolve(val), ms);
});
promise[CANCEL] = () => clearTimeout(timeoutId); |
3a1caf79f987bfa48d53ae06e1a4156fd09a313a | js/models/geonames-data.js | js/models/geonames-data.js | (function(app) {
'use strict';
var dom = app.dom || require('../dom.js');
var GeoNamesData = function(url) {
this._url = url;
this._loadPromise = null;
this._data = [];
};
GeoNamesData.prototype.load = function() {
if (!this._loadPromise) {
this._loadPromise = dom.loadJSON(this._url).... | (function(app) {
'use strict';
var dom = app.dom || require('../dom.js');
var Events = app.Events || require('../base/events.js');
var GeoNamesData = function(url) {
this._url = url;
this._loadPromise = null;
this._data = [];
this._events = new Events();
};
GeoNamesData.prototype.on = fun... | Make events of GeoNames data | Make events of GeoNames data
| JavaScript | mit | ionstage/loclock,ionstage/loclock | ---
+++
@@ -2,17 +2,25 @@
'use strict';
var dom = app.dom || require('../dom.js');
+ var Events = app.Events || require('../base/events.js');
var GeoNamesData = function(url) {
this._url = url;
this._loadPromise = null;
this._data = [];
+ this._events = new Events();
+ };
+
+ GeoName... |
90ef58c5a31967bf1e172f792bdbff3fba9e7f4a | src/_assets/scripts/components/app/reddit.posts.js | src/_assets/scripts/components/app/reddit.posts.js | import React from 'react';
import { BaseViewComponent } from '../higher-order/index.js';
class RedditPosts extends BaseViewComponent {
constructor(props) {
super(props);
}
render() {
return (
<div className="posts">
<div className="posts-fetch">
<p onClick={this.props.fetchPosts}... | import React from 'react';
import { Avatar, List, ListItem } from 'material-ui';
import { BaseViewComponent } from '../higher-order/index.js';
class RedditPosts extends BaseViewComponent {
constructor(props) {
super(props);
}
render() {
return (
<div className="posts">
<div className="post... | Make songs-list a list of list-items | Make songs-list a list of list-items
| JavaScript | mit | yanglinz/reddio,yanglinz/reddio | ---
+++
@@ -1,4 +1,5 @@
import React from 'react';
+import { Avatar, List, ListItem } from 'material-ui';
import { BaseViewComponent } from '../higher-order/index.js';
class RedditPosts extends BaseViewComponent {
@@ -14,14 +15,19 @@
</div>
<div className="posts-list">
+ <List>
... |
9fec01f2148a57035bea95fc93f56937473cb510 | chrome/browser/resources/net_internals/http_cache_view.js | chrome/browser/resources/net_internals/http_cache_view.js | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* This view displays information on the HTTP cache.
* @constructor
*/
function HttpCacheView() {
const mainBoxId = 'http-cache-view-tab-cont... | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* This view displays information on the HTTP cache.
*/
var HttpCacheView = (function() {
// IDs for special HTML elements in http_cache_view.... | Refactor HttpCacheView to be defined inside an anonymous namespace. | Refactor HttpCacheView to be defined inside an anonymous namespace.
BUG=90857
Review URL: http://codereview.chromium.org/7544008
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@94868 0039d316-1c4b-4281-b951-d872f2087c98
| JavaScript | bsd-3-clause | ropik/chromium,adobe/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,rop... | ---
+++
@@ -4,38 +4,54 @@
/**
* This view displays information on the HTTP cache.
- * @constructor
*/
-function HttpCacheView() {
- const mainBoxId = 'http-cache-view-tab-content';
- const statsDivId = 'http-cache-view-cache-stats';
- DivView.call(this, mainBoxId);
+var HttpCacheView = (function() {
+ /... |
9b12e26b863386ae30b34d5756a45f598b1e0ba0 | packages/components/containers/members/MemberAddresses.js | packages/components/containers/members/MemberAddresses.js | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import { msgid, c } from 'ttag';
import { SimpleDropdown, DropdownMenu } from 'react-components';
const MemberAddresses = ({ member, addresses }) => {
const list = addresses.map(({ ID, Email }) => (
<div... | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import { msgid, c } from 'ttag';
import { SimpleDropdown, DropdownMenu } from 'react-components';
const MemberAddresses = ({ member, addresses }) => {
const list = addresses.map(({ ID, Email }) => (
<div... | Fix dropdown width in adresses settings | Fix dropdown width in adresses settings
| JavaScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -6,7 +6,7 @@
const MemberAddresses = ({ member, addresses }) => {
const list = addresses.map(({ ID, Email }) => (
- <div key={ID} className="inbl w100 pt0-5 pb0-5 pl1 pr1 ellipsis">
+ <div key={ID} className="w100 flex flex-nowrap pl1 pr1 pt0-5 pb0-5">
{Email}
</... |
11ee849dab45f6f3d8f3a6fd23d179b561937ece | packages/tslint/index.js | packages/tslint/index.js | /**
* Tslint webpack block.
*
* @see https://github.com/wbuchwalter/tslint-loader
*/
module.exports = tslint
/**
* @param {object} [options] See https://github.com/wbuchwalter/tslint-loader#usage
* @return {Function}
*/
function tslint (options) {
options = options || {}
const loader = ... | /**
* Tslint webpack block.
*
* @see https://github.com/wbuchwalter/tslint-loader
*/
module.exports = tslint
/**
* @param {object} [options] See https://github.com/wbuchwalter/tslint-loader#usage
* @return {Function}
*/
function tslint (options) {
options = options || {}
const setter = ... | Update tslint block to use new API | Update tslint block to use new API
| JavaScript | mit | andywer/webpack-blocks,andywer/webpack-blocks,andywer/webpack-blocks | ---
+++
@@ -13,31 +13,29 @@
function tslint (options) {
options = options || {}
- const loader = (context, extra) => Object.assign({
- test: context.fileType('application/x-typescript'),
- loaders: [ 'tslint-loader' ]
- }, extra)
-
- const module = (context) => ({
- loaders: [ loader(context, { enfo... |
4b120aabea20e0f8631b61cc1d9ea4a306b03aad | cypress/integration/list_view.js | cypress/integration/list_view.js | context('List View', () => {
before(() => {
cy.login('Administrator', 'qwe');
cy.visit('/desk');
cy.window().its('frappe').then(frappe => {
frappe.call("frappe.tests.test_utils.setup_workflow");
cy.reload();
});
});
it('Bulk Workflow Action', () => {
cy.go_to_list('ToDo');
cy.get('.level-item.list-... | context('List View', () => {
before(() => {
cy.login('Administrator', 'qwe');
cy.visit('/desk');
cy.window().its('frappe').then(frappe => {
frappe.call("frappe.tests.test_utils.setup_workflow");
cy.reload();
});
});
it('enables "Actions" button', () => {
const actions = ['Approve', 'Reject', 'Edit', ... | Update list view UI test | test: Update list view UI test
| JavaScript | mit | vjFaLk/frappe,almeidapaulopt/frappe,almeidapaulopt/frappe,yashodhank/frappe,mhbu50/frappe,saurabh6790/frappe,yashodhank/frappe,almeidapaulopt/frappe,adityahase/frappe,adityahase/frappe,frappe/frappe,vjFaLk/frappe,saurabh6790/frappe,mhbu50/frappe,frappe/frappe,mhbu50/frappe,StrellaGroup/frappe,StrellaGroup/frappe,aditya... | ---
+++
@@ -7,9 +7,29 @@
cy.reload();
});
});
- it('Bulk Workflow Action', () => {
+ it('enables "Actions" button', () => {
+ const actions = ['Approve', 'Reject', 'Edit', 'Assign To', 'Print','Delete'];
cy.go_to_list('ToDo');
cy.get('.level-item.list-row-checkbox.hidden-xs').click({ multiple: true, f... |
aee10877af895edd2a8016ddf547ed3f89aed51c | app/config.js | app/config.js | // Use this file to change prototype configuration.
// Note: prototype config can be overridden using environment variables (eg on heroku)
module.exports = {
// Service name used in header. Eg: 'Renew your passport'
serviceName: '[Service Name]',
// Default port that prototype runs on
port: '3000',
// Ena... | // Use this file to change prototype configuration.
// Note: prototype config can be overridden using environment variables (eg on heroku)
module.exports = {
// Service name used in header. Eg: 'Renew your passport'
serviceName: 'Dart crossing charge',
// Default port that prototype runs on
port: '3000',
... | Update service name to Dart crossing charge for testing | Update service name to Dart crossing charge for testing | JavaScript | mit | soniaturcotte/make-adhoc-payment,soniaturcotte/make-adhoc-payment,soniaturcotte/make-adhoc-payment | ---
+++
@@ -4,7 +4,7 @@
module.exports = {
// Service name used in header. Eg: 'Renew your passport'
- serviceName: '[Service Name]',
+ serviceName: 'Dart crossing charge',
// Default port that prototype runs on
port: '3000', |
908eb28bac7678ddfc89e9009caea52c47f602f7 | src/Leaves/Admin/Products/ProductVariations/ProductVariationsViewBridge.js | src/Leaves/Admin/Products/ProductVariations/ProductVariationsViewBridge.js | scms.create('ProductVariationsViewBridge', function(){
return {
attachEvents:function () {
var self = this;
$(this.viewNode, '.product-variation-tab').click(function(event) {
if (!event.target.classList.contains('fa')) {
self.changeTab($(this).par... | scms.create('ProductVariationsViewBridge', function(){
return {
attachEvents:function () {
var self = this;
$('.product-variation-tab', this.viewNode).click(function(event) {
if (!event.target.classList.contains('fa')) {
self.changeTab($(this).par... | Fix for active class not being set properly | Fix for active class not being set properly
| JavaScript | apache-2.0 | rojr/SuperCMS,rojr/SuperCMS | ---
+++
@@ -3,7 +3,7 @@
attachEvents:function () {
var self = this;
- $(this.viewNode, '.product-variation-tab').click(function(event) {
+ $('.product-variation-tab', this.viewNode).click(function(event) {
if (!event.target.classList.contains('fa')) {
... |
5796d850680779441489c60730d1655d8ee5444a | js/validate.js | js/validate.js | var ContextElement = require('./contextElement')
module.exports = function (el, cb) {
if ( ! (el instanceof ContextElement)) return cb('Given element is not a ContextElement.')
var attributes = el.getMapping().attributes
for (var i in attributes) {
var attr = attributes[i]
if ( ! Array.isArray(attr.metadatas... | var ContextElement = require('./contextElement')
var validators = {
min: function (current, valid) { return Math.max(current, valid) },
max: function (current, valid) { return Math.min(current, valid) },
}
module.exports = function (el, cb) {
if ( ! (el instanceof ContextElement)) return cb('Given element is not a... | Make it easy to add validators. | Make it easy to add validators.
| JavaScript | mit | kukua/concava | ---
+++
@@ -1,4 +1,9 @@
var ContextElement = require('./contextElement')
+
+var validators = {
+ min: function (current, valid) { return Math.max(current, valid) },
+ max: function (current, valid) { return Math.min(current, valid) },
+}
module.exports = function (el, cb) {
if ( ! (el instanceof ContextElement)... |
5ea5cf60359a2105a49bf54b7b5c7a9a4ecd7855 | tests/system/test-simple-image-resize.js | tests/system/test-simple-image-resize.js | const numberOfPlannedTests = 6
casper.test.begin('test-simple-image-resize', numberOfPlannedTests, (test) => {
casper.start(`http://${testhost}`, function () {
})
casper.then(function () {
const curr = this.getCurrentUrl()
const fixturePath = this.fetchText('#fixture_path')
this.fill('#entryF... | const numberOfPlannedTests = 5
casper.test.begin('test-simple-image-resize', numberOfPlannedTests, (test) => {
casper.start(`http://${testhost}`, function () {
})
casper.then(function () {
const curr = this.getCurrentUrl()
const fixturePath = this.fetchText('#fixture_path')
this.fill('#entryF... | Change num of planned tests. | Change num of planned tests.
| JavaScript | mit | transloadit/jquery-sdk,transloadit/jquery-sdk,transloadit/jquery-sdk | ---
+++
@@ -1,4 +1,4 @@
-const numberOfPlannedTests = 6
+const numberOfPlannedTests = 5
casper.test.begin('test-simple-image-resize', numberOfPlannedTests, (test) => {
casper.start(`http://${testhost}`, function () {
}) |
b14dd5a3691cc906209194ba82becfad17a9abde | src/index.js | src/index.js | /**
* _____ __
* / ___// /_ _____
* \__ \/ / / / / _ \
* ___/ / / /_/ / __/
* /____/_/\__, /\___/
* /____/
* Copyright 2017 Slye Development Team. All Rights Reserved.
* Licence: MIT License
*/
const tree = require('./core/tree');
const compile = require('./core/compile');
c... | /**
* _____ __
* / ___// /_ _____
* \__ \/ / / / / _ \
* ___/ / / /_/ / __/
* /____/_/\__, /\___/
* /____/
* Copyright 2017 Slye Development Team. All Rights Reserved.
* Licence: MIT License
*/
const tree = require('./core/tree');
const compile = require('./core/compile');
c... | Load modules from modules dir | Load modules from modules dir
| JavaScript | mit | Slye-team/esy-language | ---
+++
@@ -15,6 +15,8 @@
const blocks = require('./core/blocks');
const configs = require('./core/config');
const cache = require('./core/cache');
+const glob = require('glob');
+const path = require('path');
var esy_lang = {
tree : tree,
@@ -22,7 +24,16 @@
cache : cache,
configs... |
df1b6c8807ea91bb0f8f5fa5131427699e1d05ca | ignite-base/App/Containers/Styles/ListviewExampleStyle.js | ignite-base/App/Containers/Styles/ListviewExampleStyle.js | // @flow
import { StyleSheet } from 'react-native'
import { ApplicationStyles, Metrics, Colors } from '../../Themes/'
export default StyleSheet.create({
...ApplicationStyles.screen,
container: {
flex: 1,
marginTop: Metrics.navBarHeight,
backgroundColor: Colors.background
},
row: {
flex: 1,
... | // @flow
import { StyleSheet } from 'react-native'
import { ApplicationStyles, Metrics, Colors } from '../../Themes/'
export default StyleSheet.create({
...ApplicationStyles.screen,
container: {
flex: 1,
marginTop: Metrics.navBarHeight,
backgroundColor: Colors.background
},
row: {
flex: 1,
... | Modify listview styles for search listview and general margin | Modify listview styles for search listview and general margin
| JavaScript | mit | ruddell/ignite,infinitered/ignite,infinitered/ignite,infinitered/ignite,infinitered/ignite,infinitered/ignite,infinitered/ignite,ruddell/ignite,infinitered/ignite,ruddell/ignite,infinitered/ignite | ---
+++
@@ -21,11 +21,12 @@
alignSelf: 'center',
color: Colors.snow,
textAlign: 'center',
- marginBottom: Metrics.smallMargin
+ marginVertical: Metrics.smallMargin
},
label: {
textAlign: 'center',
- color: Colors.snow
+ color: Colors.snow,
+ marginBottom: Metrics.smallMargin
... |
7dc9c68f59884e13e93dd9d79eff89da545b9315 | js/site.js | js/site.js | // Here be the site javascript!
$(document).ready(function () {
$(".button-collapse").sideNav();
$('.scrollspy').scrollSpy();
$("form").submit(function (event) {
event.preventDefault();
$("#send-msg").attr("disabled", true);
$("#fa-send").toggleClass("fa-envelope-o").toggleClass("fa-s... | // Here be the site javascript!
$(document).ready(function () {
$(".button-collapse").sideNav();
$('.scrollspy').scrollSpy();
$("form").submit(function (event) {
event.preventDefault();
$("#send-msg").attr("disabled", true);
$("#fa-send").toggleClass("fa-envelope-o").toggleClass("fa-s... | Add url to contact form | Add url to contact form
| JavaScript | mit | melonmanchan/My-Website,melonmanchan/My-Website,melonmanchan/My-Website,melonmanchan/My-Website | ---
+++
@@ -17,7 +17,7 @@
// Send mail to the local python mail server
$.ajax({
type: "POST",
- url: "http://46.101.248.58:5000/sendmail",
+ url: "http://mattij.com:5000/sendmail",
crossDomain: true,
data: payload,
... |
83bfffe5280fb58d27525f18495e0c3ddd8fa6a4 | favit/static/js/favorite.js | favit/static/js/favorite.js | function getCookie(name) {
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we ... | $('.btn.favorite').click(function() {
var $obj = $(this);
var target_id = $obj.attr('id').split('_')[1];
$obj.prop('disabled', true);
$.ajax({
url: $obj.attr('href'),
type: 'POST',
data: {target_model: $obj.attr('model'),
target_object_id: target_id},
success: function(response) {
if (r... | Remove jQuery ajax CSRF headers setting | Remove jQuery ajax CSRF headers setting
This should not be done by a library, this is standard Django configuration that should be in any project that uses ajax posting.
Also, this conflicts with custom CSRF settings, like different cookie name. | JavaScript | mit | mjroson/django-favit,streema/django-favit,mjroson/django-favit,streema/django-favit,streema/django-favit,mjroson/django-favit | ---
+++
@@ -1,26 +1,3 @@
-function getCookie(name) {
- var cookieValue = null;
- if (document.cookie && document.cookie != '') {
- var cookies = document.cookie.split(';');
- for (var i = 0; i < cookies.length; i++) {
- var cookie = jQuery.trim(cookies[i]);
- // Does this coo... |
651fd66f865d4a091a507ef935cf204522ff687e | src/background/contexts/speeddial/SpeeddialContext.js | src/background/contexts/speeddial/SpeeddialContext.js |
var SpeeddialContext = function() {
this.properties = {};
global.opr.speeddial.get(function(speeddialProperties) {
this.properties.url = speeddialProperties.url;
this.properties.title = speeddialProperties.title;
// Set WinTabs feature to LOADED
deferredComponentsLoadStatus['SPEEDDIAL_LO... |
var SpeeddialContext = function() {
this.properties = {};
global.opr.speeddial.get(function(speeddialProperties) {
this.properties.url = speeddialProperties.url;
this.properties.title = speeddialProperties.title;
// Set WinTabs feature to LOADED
deferredComponentsLoadStatus['SPEEDDIAL_LO... | Update Speed Dial API implementation to set attributes independent of Chromium call to update attributes. | Update Speed Dial API implementation to set attributes independent of Chromium call to update attributes.
| JavaScript | mit | operasoftware/operaextensions.js,operasoftware/operaextensions.js,operasoftware/operaextensions.js | ---
+++
@@ -21,9 +21,9 @@
SpeeddialContext.prototype.__defineSetter__('url', function(val) {
- global.opr.speeddial.update({ 'url': val }, function(speeddialProperties) {
- this.properties.url = speeddialProperties.url;
- }.bind(this));
+ this.properties.url = val;
+
+ global.opr.speeddial.update({ 'u... |
48229ca6df978a16a071259083b0a3655d66cfd8 | lib/Node/prototype/_replace-content.js | lib/Node/prototype/_replace-content.js | 'use strict';
var normalize = require('../../Document/prototype/normalize');
module.exports = function (child/*, …child*/) {
var oldNodes = this.childNodes, df, nu, i = 0, old;
df = normalize.apply(this.ownerDocument, arguments);
while ((nu = df.firstChild)) {
old = oldNodes[i++];
if (old !== nu) {
if (old)... | 'use strict';
var normalize = require('../../Document/prototype/normalize')
, isDF = require('../../DocumentFragment/is-document-fragment');
module.exports = function (child/*, …child*/) {
var oldNodes = this.childNodes, dom, nu, i = 0, old;
dom = normalize.apply(this.ownerDocument, arguments);
if (isDF(do... | Update up to change in normalize | Update up to change in normalize
| JavaScript | mit | medikoo/dom-ext | ---
+++
@@ -1,15 +1,25 @@
'use strict';
-var normalize = require('../../Document/prototype/normalize');
+var normalize = require('../../Document/prototype/normalize')
+ , isDF = require('../../DocumentFragment/is-document-fragment');
module.exports = function (child/*, …child*/) {
- var oldNodes = this.ch... |
d2a8b435cd8af2788f213163dad7d12bddb4bc11 | lib/dictionaries/jscs/requireSpaceAfterKeywords.js | lib/dictionaries/jscs/requireSpaceAfterKeywords.js | /**
* @fileoverview Translation for `requireSpaceAfterKeywords` (JSCS) to ESLint
* @author Breno Lima de Freitas <https://breno.io>
* @copyright 2016 Breno Lima de Freitas. All rights reserved.
* See LICENSE file in root directory for full license.
*/
'use strict'
//---------------------------------------------------... | /**
* @fileoverview Translation for `requireSpaceAfterKeywords` (JSCS) to ESLint
* @author Breno Lima de Freitas <https://breno.io>
* @copyright 2016 Breno Lima de Freitas. All rights reserved.
* See LICENSE file in root directory for full license.
*/
'use strict'
//---------------------------------------------------... | Fix `missing rule name` eslint conversion error | Fix `missing rule name` eslint conversion error
| JavaScript | mit | brenolf/polyjuice | ---
+++
@@ -11,4 +11,10 @@
// Rule Translation Definition
//------------------------------------------------------------------------------
-module.exports = 2;
+module.exports = {
+ name: 'keyword-spacing',
+ truthy: [
+ 2,
+ 'always'
+ ]
+}; |
b759f8c8cb9dee4797dd9dd1741d3dc274403eba | tests/spec/SpecHelper.js | tests/spec/SpecHelper.js | beforeEach(function() {
this.addMatchers({
toBeLessThan: function(expected) {
return this.actual < expected;
},
toHaveAllValuesInRange: function (low, high) {
for (var idx = 0; idx < this.actual.length; idx += 1) {
if (this.actual[idx] < low || this.actual[idx] > high) {
... | beforeEach(function() {
this.addMatchers({
toBeLessThan: function(expected) {
return this.actual < expected;
},
toHaveAllValuesInRange: function (low, high) {
for (var idx = 0; idx < this.actual.length; idx += 1) {
if (this.actual[idx] < low || this.actual[idx] > high) {
... | Add test helper to set default values on variables | Add test helper to set default values on variables
| JavaScript | mit | sbnb/capensis-steganography | ---
+++
@@ -14,3 +14,7 @@
});
});
+function setIfUndefined(variable, defaultValue) {
+ variable = (typeof variable === "undefined") ? defaultValue : variable;
+ return variable;
+} |
283d7b238b0a778971a9b77d929acf697b4bd501 | lib/resolve-script/find-executables.js | lib/resolve-script/find-executables.js | var _ = require('lodash')
var globFirst = require('./glob-first')
var log = require('../run/log')
var path = require('path')
var async = require('async')
var isExecutable = require('./is-executable')
module.exports = function (patterns, cb) {
globFirst(patterns, function (er, results) {
if (er) return cb(er)
... | var _ = require('lodash')
var globFirst = require('./glob-first')
var log = require('../run/log')
var path = require('path')
var async = require('async')
var isExecutable = require('./is-executable')
module.exports = function (patterns, cb) {
globFirst(patterns, function (er, results) {
if (er) return cb(er)
... | Leverage util.format for printf-style logging | Leverage util.format for printf-style logging
| JavaScript | mit | testdouble/scripty,testdouble/scripty | ---
+++
@@ -15,10 +15,9 @@
cb(er, path.resolve(result))
} else {
log(
- 'Warning: scripty - ignoring script "' + result + '" because it' +
- ' was not executable. Run `chmod +x "' + result + '" if you want' +
- ' scripty to run it.'
- )
+ ... |
d9c4ad44e8646db294a1b46b6d10955125d2da9c | src/index.js | src/index.js | // TODO consider using https://babeljs.io/docs/plugins/transform-runtime/ instead of babel-polyfill
import "babel-polyfill"
import React from "react"
import { render } from "react-dom"
import { createStore, applyMiddleware } from "redux"
import { Provider } from "react-redux"
import createSagaMiddleware from "redux-sag... | // TODO consider using https://babeljs.io/docs/plugins/transform-runtime/ instead of babel-polyfill
import "babel-polyfill"
import React from "react"
import { render } from "react-dom"
import { createStore, applyMiddleware } from "redux"
import { Provider } from "react-redux"
import createSagaMiddleware from "redux-sag... | Save token to localStorage only if it changes | Save token to localStorage only if it changes
| JavaScript | isc | bostrom/harvest-balance,bostrom/harvest-balance | ---
+++
@@ -23,13 +23,16 @@
)
sagaMiddleware.run(rootSaga)
-const token = getToken()
+let token = getToken()
if (token) {
store.dispatch(loginSuccess(token))
}
store.subscribe(debounce(() => {
- console.log("setting token", store.getState().auth.token)
- setToken(store.getState().auth.token)
+ const newT... |
56d3feba455c9776a17e311b2cfb294f321ade8e | lib/exprexo.js | lib/exprexo.js | const router = require('./router')
const express = require('express')
const cors = require('cors')
/**
* Creates a new server with the given options.
* @param {Object} options configurable options.
* @param {Function} callback function to be called on start.
* @return {Object} express app instance.... | const router = require('./router')
const express = require('express')
const cors = require('cors')
/**
* Creates a new server with the given options.
* @param {Object} options configurable options.
* @param {Function} callback function to be called on start.
* @return {Object} express app instance.... | Add parsers as a default. | feat: Add parsers as a default.
* Add parser middleware for parsing `application/json`.
* Add parser middleware for parsing `application/x-www-form-urlencoded`.
BREAKING CHANGE: `req.body` will not longer be `undefined`,
will include a parsed json instead with the request payload.
| JavaScript | mit | exprexo/exprexo | ---
+++
@@ -12,6 +12,10 @@
const app = express()
app.use(cors())
+ // For parsing `application/json`.
+ app.use(express.json())
+ // For parsing `application/x-www-form-urlencoded`.
+ app.use(express.urlencoded({ extended: true }))
// TODO morgan as verbose?
// app.use(logger('dev')) |
78e4bb29dce00ed1a5edcd296790dcbb0959f40b | src/index.js | src/index.js | /* eslint-disable no-console */
console.log('hi');
// Old ES5 way of creating a Class Component
// var HelloWorld = React.createClass({
// render: function() {
// return (
// <h1>Hello world!</h1>
// );
// };
// });
//Old ES5 Stateless Functional Component
// var HelloWorld = function(props) {
// r... | /* eslint-disable no-console */
console.log('hi');
// Old ES5 way of creating a Class Component
// var HelloWorld = React.createClass({
// render: function() {
// return (
// <h1>Hello world!</h1>
// );
// };
// });
//Old ES5 Stateless Functional Component
// var HelloWorld = function(props) {
// r... | Add ES6 examples for component creation | Add ES6 examples for component creation
| JavaScript | mit | mtheoryx/react-redux-es6,mtheoryx/react-redux-es6 | ---
+++
@@ -15,3 +15,15 @@
// <h1>Hello World!</h1>
// );
// };
+
+//ES6 Stateless Functional Component
+// const HelloWorld = (props) => {
+// return (
+// <h1>Hello ES6 World!</h1>
+// )
+// };
+
+//Even simpler ES6 Statelss Functional Component
+// const HelloWorld = props => (
+// <h1>Hello ES6... |
79ff48d6a9ea971e23087791dba13c8faf4086a4 | src/index.js | src/index.js | import createFormatters from './createFormatters';
// Check for globally defined Immutable and add an install method to it.
if (typeof Immutable !== "undefined") {
Immutable.installDevTools = install.bind(null, Immutable);
}
// I imagine most people are using Immutable as a CommonJS module though...
let installed ... | import createFormatters from './createFormatters';
// Check for globally defined Immutable and add an install method to it.
if (typeof Immutable !== "undefined") {
Immutable.installDevTools = install.bind(null, Immutable);
}
// I imagine most people are using Immutable as a CommonJS module though...
let installed ... | Add support for server side Immutable DevTools | Add support for server side Immutable DevTools
Fixes issue #31 | JavaScript | bsd-3-clause | andrewdavey/immutable-devtools,andrewdavey/immutable-devtools | ---
+++
@@ -9,16 +9,14 @@
let installed = false;
function install(Immutable) {
- if (typeof window === "undefined") {
- throw new Error("Can only install immutable-devtools in a browser environment.");
- }
+ const gw = typeof window === "undefined" ? global : window;
// Don't install more than once.
... |
26a5db8b6f14d411fc9f05ff016e35558a6c18da | src/index.js | src/index.js | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';
import Odometer from 'odometer';
export default class ReactOdometer extends Component {
static propTypes = {
value: PropTypes.number.isRequired,
options: PropTypes.object,
};
componentDidMount... | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Odometer from 'odometer';
export default class ReactOdometer extends Component {
static defaultProps = {
options: {},
};
static propTypes = {
value: PropTypes.number.isRequired,
options: PropTypes.object,
};
co... | Use ref instead of findDOMNode | Use ref instead of findDOMNode
| JavaScript | mit | inferusvv/react-odometerjs | ---
+++
@@ -1,19 +1,23 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
-import ReactDOM from 'react-dom';
import Odometer from 'odometer';
export default class ReactOdometer extends Component {
+ static defaultProps = {
+ options: {},
+ };
+
static propTypes = {
val... |
405b7f10323ba2780a2e2f2376430bf467d9582a | lib/weather.js | lib/weather.js | const needle = require('needle');
const config = require('../config');
const _ = require('lodash');
const weather = {
getWeatherInfo: function(req, res){
//TODO add country/city validation here
const url = getOpenWeatherUrl(req);
needle.get(url, function(error, response) {
if (!... | const needle = require('needle');
const _ = require('lodash');
const config = require('../config');
const countriesCities = require('../countries-cities');
const weather = {
getWeatherInfo: function(req, res){
const city = req.query.city? req.query.city.toLowerCase():req.query.city;
const country ... | Add validation for city and country | Add validation for city and country
| JavaScript | mit | umasudhan/weather | ---
+++
@@ -1,30 +1,45 @@
const needle = require('needle');
+const _ = require('lodash');
+
const config = require('../config');
-const _ = require('lodash');
+const countriesCities = require('../countries-cities');
const weather = {
getWeatherInfo: function(req, res){
- //TODO add country/city valid... |
5162dba0bcf51d1d86c64deebe289000eb966ad5 | lib/short-url-controller.js | lib/short-url-controller.js | "use strict";
let db = require('./db');
function generateStub(length) {
let result = ""
for(let i = 0; i < length; i++) {
let value = Math.round(Math.random() * 35)
if (value > 9)
result += String.fromCharCode(value + 87);
else
result += value
}
return result;
}
function shortenUrl(req... | "use strict";
let db = require('./db');
function generateBase36Stub(length) {
let result = ""
for(let i = 0; i < length; i++) {
let value = Math.round(Math.random() * 35)
if (value > 9)
result += String.fromCharCode(value + 87);
else
result += value
}
return result;
}
function shortenU... | Make function name more descript | Make function name more descript
| JavaScript | mit | glynnw/url-shortener,glynnw/url-shortener | ---
+++
@@ -1,7 +1,7 @@
"use strict";
let db = require('./db');
-function generateStub(length) {
+function generateBase36Stub(length) {
let result = ""
for(let i = 0; i < length; i++) {
let value = Math.round(Math.random() * 35)
@@ -15,14 +15,14 @@
function shortenUrl(req, res) {
let url = req.pa... |
1d1075a1eec288c1372ccd001c197fab29f71980 | lib/skeletonDependencies.js | lib/skeletonDependencies.js | export default {
connect: '3.5.0',
'server-destroy': '1.0.1',
'connect-modrewrite': '0.9.0',
winston: '2.3.0',
'find-port': '2.0.1',
rimraf: '2.5.4',
shelljs: '0.7.5',
lodash: '4.17.2',
request: '2.79.0',
queue: '4.0.0',
reify: '0.4.4',
send: '0.14.1',
'fs-plus': '2.9... | export default {
connect: '3.5.0',
'server-destroy': '1.0.1',
'connect-modrewrite': '0.9.0',
winston: '2.3.0',
'find-port': '2.0.1',
rimraf: '2.5.4',
shelljs: '0.7.5',
lodash: '4.17.4',
request: '2.79.0',
queue: '4.0.1',
reify: '0.4.4',
send: '0.14.1',
'fs-plus': '2.9... | Update skeleton app default dependencies | Update skeleton app default dependencies
| JavaScript | mit | wojtkowiak/meteor-desktop,wojtkowiak/meteor-desktop | ---
+++
@@ -6,9 +6,9 @@
'find-port': '2.0.1',
rimraf: '2.5.4',
shelljs: '0.7.5',
- lodash: '4.17.2',
+ lodash: '4.17.4',
request: '2.79.0',
- queue: '4.0.0',
+ queue: '4.0.1',
reify: '0.4.4',
send: '0.14.1',
'fs-plus': '2.9.3' |
d8384f73dd7b4e8b447634b3111fc58ae19e1435 | content.js | content.js |
var themes = [
"faded",
"grayscale",
"sepia",
"wide-blur",
"overexposed",
"flip-hue",
"none"
];
function defaultTheme() {
return "faded";
}
document.body.classList.add("ugly-http-status-loaded");
if (!window.isSecureContext) {
chrome.storage.local.get({
theme: "default"
}, function(items) {
... |
var themes = [
"faded",
"grayscale",
"sepia",
"wide-blur",
"overexposed",
"flip-hue",
"none"
];
function defaultTheme() {
return "faded";
}
if (!window.isSecureContext) {
chrome.storage.local.get({
theme: "default"
}, function(items) {
var theme = items.theme;
if (themes.indexOf(theme... | Remove loading dimmer briefly *after* applying theme. | Remove loading dimmer briefly *after* applying theme.
Otherwise, the page can briefly flash in full color before the theme is applied.
| JavaScript | mit | lgarron/ugly-http-extension,lgarron/ugly-http-extension | ---
+++
@@ -13,7 +13,6 @@
return "faded";
}
-document.body.classList.add("ugly-http-status-loaded");
if (!window.isSecureContext) {
chrome.storage.local.get({
theme: "default"
@@ -26,3 +25,6 @@
document.body.classList.add("ugly-http-theme-" + theme);
});
}
+setTimeout(function() {
+document.bo... |
4ca56946ccc518ce57188ef64e9327f97f6f30be | tests/unit/utils/build-provider-asset-path-test.js | tests/unit/utils/build-provider-asset-path-test.js | import buildProviderAssetPath from 'preprint-service/utils/build-provider-asset-path';
import { module, test } from 'qunit';
module('Unit | Utility | build provider asset path');
// Replace this with your real tests.
test('it works', function(assert) {
let result = buildProviderAssetPath();
assert.ok(result);
});... | import config from 'ember-get-config';
import buildProviderAssetPath from 'preprint-service/utils/build-provider-asset-path';
import { module, test } from 'qunit';
module('Unit | Utility | build provider asset path');
test('build correct path for domain', function(assert) {
let result = buildProviderAssetPath('fo... | Update buildProviderAssetPath unit test to do something useful | Update buildProviderAssetPath unit test to do something useful
| JavaScript | apache-2.0 | baylee-d/ember-preprints,CenterForOpenScience/ember-preprints,laurenrevere/ember-preprints,laurenrevere/ember-preprints,CenterForOpenScience/ember-preprints,baylee-d/ember-preprints | ---
+++
@@ -1,10 +1,15 @@
+import config from 'ember-get-config';
import buildProviderAssetPath from 'preprint-service/utils/build-provider-asset-path';
import { module, test } from 'qunit';
module('Unit | Utility | build provider asset path');
-// Replace this with your real tests.
-test('it works', function(... |
ca9dfe7879ff24cf241e6edbc7c3507562193d77 | DynamixelServo.Quadruped.WebInterface/wwwroot/js/VideoStreaming.js | DynamixelServo.Quadruped.WebInterface/wwwroot/js/VideoStreaming.js | let videoImage = document.getElementById('video_image');
videoImage.src = `http://${document.domain}:8080/?action=stream`;
let cameraJoystick = {
zone: videoImage,
color: 'red'
};
let cameraJoystickManager = nipplejs.create(cameraJoystick);
const clickTimeout = 500;
var lastStartClick = Date.now();
cameraJoyst... | let videoImage = document.getElementById('video_image');
videoImage.src = `http://${document.domain}:8080/?action=stream`;
let cameraJoystick = {
zone: videoImage,
color: 'red'
};
let cameraJoystickManager = nipplejs.create(cameraJoystick);
const clickTimeout = 500;
var lastStopClick = Date.now();
cameraJoysti... | Move reset to on stop | Move reset to on stop
| JavaScript | apache-2.0 | dmweis/DynamixelServo,dmweis/DynamixelServo,dmweis/DynamixelServo,dmweis/DynamixelServo | ---
+++
@@ -6,7 +6,7 @@
};
let cameraJoystickManager = nipplejs.create(cameraJoystick);
const clickTimeout = 500;
-var lastStartClick = Date.now();
+var lastStopClick = Date.now();
cameraJoystickManager.on('added',
function (evt, nipple) {
nipple.on('move',
@@ -21,23 +21,23 @@
});
... |
72c21eee8ad0dfc11b10a70fc2da23ded965b4ec | speclib/jasmineHelpers.js | speclib/jasmineHelpers.js | beforeEach(function () {
this.addMatchers({
// Expects that property is synchronous
toHold: function () {
var actual = this.actual;
var notText = this.isNot ? " not" : "";
var r = jsc.check(actual, { quiet: true });
var counterExampleText = r === true ? "" : "Counter example found: " + JSON.stringify(r.c... | beforeEach(function () {
this.addMatchers({
// Expects that property is synchronous
toHold: function () {
var actual = this.actual;
var notText = this.isNot ? " not" : "";
/* global window */
var quiet = window && !(/verbose=true/).test(window.location.search);
var r = jsc.check(actual, { quiet: quiet }... | Add verbose=true flag to toHold matcher | Add verbose=true flag to toHold matcher
| JavaScript | mit | vilppuvuorinen/jsverify,StoneCypher/jsverify,jsverify/jsverify,jsverify/jsverify,dmitriid/jsverify,izaakschroeder/jsverify,StoneCypher/jsverify | ---
+++
@@ -4,8 +4,10 @@
toHold: function () {
var actual = this.actual;
var notText = this.isNot ? " not" : "";
+ /* global window */
+ var quiet = window && !(/verbose=true/).test(window.location.search);
- var r = jsc.check(actual, { quiet: true });
+ var r = jsc.check(actual, { quiet: quiet });
... |
6625342ffa4c5746a19eef757e539f32290f2925 | lib/irc.js | lib/irc.js | /* eslint no-console: 0 */
'use strict';
const irc = require('irc');
const server = process.env.IRC_SERVER;
const user = process.env.IRC_USER;
const channel = process.env.IRC_CHANNEL;
const client = module.exports.client = new irc.Client(server, user, {
debug: true,
autoConnect: false,
autoRejoin: true,
chan... | /* eslint no-console: 0 */
'use strict';
const irc = require('irc');
const server = process.env.IRC_SERVER;
const user = process.env.IRC_USER;
const channel = process.env.IRC_CHANNEL;
const client = module.exports.client = new irc.Client(server, user, {
autoConnect: false,
autoRejoin: true,
channels: [channel]... | Make IRC handler a bit less verbose | Make IRC handler a bit less verbose
| JavaScript | mit | Starefossen/jenkins-monitor | ---
+++
@@ -8,7 +8,6 @@
const channel = process.env.IRC_CHANNEL;
const client = module.exports.client = new irc.Client(server, user, {
- debug: true,
autoConnect: false,
autoRejoin: true,
channels: [channel],
@@ -16,7 +15,7 @@
});
client.connect(5, function() {
- console.log(arguments);
+ console.... |
b8fb8cb98d070481c4ec88230c3f21325129ffde | library.js | library.js | (function(Reddit) {
"use strict";
var anchor = '<a href="http://reddit.com$1" target="_blank">$1</a>';
Reddit.parse = function(postContent, callback) {
var regex = /(\/r\/\w+)/g;
if (postContent.match(regex)) {
postContent = postContent.replace(regex, anchor);
}
callback(null, postContent);
};
}(modul... | (function(Reddit) {
"use strict";
var anchor = '<a href="http://reddit.com$1" target="_blank">$1</a>';
Reddit.parse = function(postContent, callback) {
var regex = /(?:^|\s)(\/r\/\w+)/g;
if (postContent.match(regex)) {
postContent = postContent.replace(regex, anchor);
}
callback(null, postContent);
};... | Update regex Only match if /r/* is the beginning of the string or if it is prefixed by a whitespace | Update regex
Only match if /r/* is the beginning of the string or if it is prefixed by a whitespace
| JavaScript | bsd-2-clause | Schamper/nodebb-plugin-reddit | ---
+++
@@ -3,7 +3,7 @@
var anchor = '<a href="http://reddit.com$1" target="_blank">$1</a>';
Reddit.parse = function(postContent, callback) {
- var regex = /(\/r\/\w+)/g;
+ var regex = /(?:^|\s)(\/r\/\w+)/g;
if (postContent.match(regex)) {
postContent = postContent.replace(regex, anchor); |
1252f56a802deb2528cfabb2b7cdcedc4d17a1fe | models/vote.js | models/vote.js | var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var VoteSchema = new Schema(
{
value : Number,
created : {type : Date, default : Date.now},
lastEdited : {type : Date, default : Date.now},
project : {type: mongoose.Schema.Types.ObjectId, ref: 'Project'},
author : {type:... | var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var VoteSchema = new Schema(
{
value : Number,
created : {type : Date, default : Date.now},
lastEdited : {type : Date, default : Date.now},
project : {type: mongoose.Schema.Types.ObjectId, ref: 'Project'},
author : {type:... | Add value constants to Vote model | Add value constants to Vote model
| JavaScript | mit | asso-labeli/labeli-api,asso-labeli/labeli-api,asso-labeli/labeli-api | ---
+++
@@ -11,3 +11,8 @@
});
module.exports = mongoose.model('Vote', VoteSchema);
+
+module.exports.Value = {};
+module.exports.Value.Negative = -1;
+module.exports.Value.Neutral = 0;
+module.exports.Value.Positive = 1; |
1b17a79157db5681fb31fd8d911ee2d47a645b9d | wdio.conf.js | wdio.conf.js | exports.config = {
specs: [
"./e2e-tests/**/*.tests.js"
],
exclude: [],
maxInstances: 10,
sync: true,
logLevel: "result",
coloredLogs: true,
screenshotPath: "./error-screenshots",
baseUrl: "http://the8-dev.azurewebsites.net",
waitforTimeout: 10000,
connectionRetryTimeout: 90000,
connectionRe... | exports.config = {
specs: [
"./e2e-tests/**/*.tests.js"
],
exclude: [],
maxInstances: 10,
sync: true,
logLevel: "result",
coloredLogs: true,
screenshotPath: "./error-screenshots",
baseUrl: "http://the8-dev.azurewebsites.net",
waitforTimeout: 10000,
connectionRetryTimeout: 90000,
connectionRe... | Use PhantomJS for e2e tests | Use PhantomJS for e2e tests | JavaScript | mit | joekrie/the8,joekrie/the8,joekrie/the8 | ---
+++
@@ -20,7 +20,7 @@
reporterOptions: {
outputDir: "./e2e-tests/test-results"
},
- services: ["selenium-standalone"],
+ services: ["phantomjs"],
capabilities: [
{
maxInstances: 5, |
de57ef6dcbf79559c50bb6b9298578def2c98529 | src/app/lib/api_limits.js | src/app/lib/api_limits.js | const Promise = require('bluebird');
const PERIOD_TIME = 30000;
const REQUESTS_PER_PERIOD = 10;
function currentTime() {
return Date.now();
}
class APILimiter {
constructor() {
this.lastPeriod = 0;
this.requests = 0;
}
makeRequest() {
if(this._isPeriodTimedOut()) {
... | const Promise = require('bluebird');
const PERIOD_TIME = 30000;
const REQUESTS_PER_PERIOD = 10;
function currentTime() {
return Date.now();
}
class APILimiter {
constructor() {
this.lastPeriod = 0;
this.requests = 0;
}
makeRequest() {
if(this._isPeriodTimedOut()) {
... | Make sure to wait for a free limit even after delay | Make sure to wait for a free limit even after delay
We have to (possibly) wait again after initially delaying the request
when reaching the API Limit.
Reason being that more requests get piled up than the next limit is
allowing to get through. By waiting for the limit again we ensure that
if more requests than the lim... | JavaScript | mit | kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop | ---
+++
@@ -29,7 +29,9 @@
if(this.canMakeRequest()) {
return Promise.resolve();
} else {
- return Promise.delay(PERIOD_TIME - (currentTime() - this.lastPeriod));
+ return Promise.delay(PERIOD_TIME - (currentTime() - this.lastPeriod)).then(() => {
+ r... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.