commit
stringlengths
40
40
old_file
stringlengths
4
264
new_file
stringlengths
4
264
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
624
message
stringlengths
15
4.7k
lang
stringclasses
3 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
0e7fb78882f5b0e78d3f544857d86717fead0cdb
Renderer/canvas-drawer.js
Renderer/canvas-drawer.js
var CanvasDrawer = (function () { var CanvasDrawer = function (params) { }; CanvasDrawer.prototype = { drawPlayer: { value: function (player) { } }, drawDisc :{ value: function (disc) { } } } }());
var CanvasDrawer = (function () { var CanvasDrawer = function (params) { var canvas = document.getElementById("canvas-field"); this.ctx = canvas.getContext("2d"); this.canvasWidth = canvas.width; this.canvasHeight = canvas.height; }; CanvasDrawer.prototype = { draw...
Add implement CanvasDrawer witch draw player and disc
Add implement CanvasDrawer witch draw player and disc
JavaScript
mit
TeamBarracuda-Telerik/JustDiscBattle,TeamBarracuda-Telerik/JustDiscBattle
ff58d6e6788382e2468994f9550bcc1e8d103e49
utils/network-timing.js
utils/network-timing.js
const {hasAdRequestPath, isImplTag} = require('./resource-classification'); const {URL} = require('url'); /** * Returns end time of tag load (s) relative to system boot. * @param {LH.Artifacts.NetworkRequest[]} networkRecords * @return {number} */ function getTagEndTime(networkRecords) { const tagRecord = networ...
const {hasAdRequestPath, isImplTag} = require('./resource-classification'); const {URL} = require('url'); /** * Returns end time of tag load (s) relative to system boot. * @param {LH.Artifacts.NetworkRequest[]} networkRecords * @return {number} */ function getTagEndTime(networkRecords) { const tagRecord = networ...
Include defaultValue in getPageStartTime function.
Include defaultValue in getPageStartTime function. Change-Id: Ib25db9f76263ffcb907f1c04edb90e1c2c65e4cf
JavaScript
apache-2.0
googleads/publisher-ads-lighthouse-plugin,googleads/publisher-ads-lighthouse-plugin
dd03f8c7fa2499e6d121eea710d3cda9803f94a0
util/bind/bind.js
util/bind/bind.js
steal('can/util', function (can) { /** * @typedef {{bind:function():*,unbind:function():*}} can/util/bind * * Provides mixin-able bind and unbind methods. `bind()` calls `this._bindsetup` * when the first bind happens and. `unbind()` calls `this._bindteardown` when there * are no more event handlers. * ...
steal('can/util', function (can) { /** * @typedef {{bind:function():*,unbind:function():*}} can.util.bind * * Provides mixin-able bind and unbind methods. `bind()` calls `this._bindsetup` * when the first bind happens and. `unbind()` calls `this._bindteardown` when there * are no more event handlers. * ...
Fix @typedef name to be dot-separated.
Fix @typedef name to be dot-separated.
JavaScript
mit
whitecolor/canjs,asavoy/canjs,rjgotten/canjs,patrick-steele-idem/canjs,beno/canjs,patrick-steele-idem/canjs,asavoy/canjs,Psykoral/canjs,Psykoral/canjs,gsmeets/canjs,whitecolor/canjs,tracer99/canjs,patrick-steele-idem/canjs,rasjani/canjs,bitovi/canjs,rjgotten/canjs,bitovi/canjs,gsmeets/canjs,Psykoral/canjs,bitovi/canjs,...
8c3335cf84588aa2ccabe78a96bb668be74fd160
src/lib/mapper.js
src/lib/mapper.js
'use strict'; const _ = require('lodash'); const log = require('./log'); let nameToId = {}; let mapper = { /** * Add light name to identifier mapping. * * @param {string} id - Light identifier * @param {string} name - Light name mapping */ add: function addName(id, name) { if (!id || !name) ...
'use strict'; const _ = require('lodash'); const log = require('./log'); let nameToId = {}; let mapper = { /** * Add light name to identifier mapping. * * @param {string} id - Light identifier * @param {string} name - Light name mapping */ add: function addName(id, name) { if (!id || !name) ...
Fix crash on unknown light name
Fix crash on unknown light name
JavaScript
mit
ristomatti/lifxsh
8d1a0fd2c8f3bf48b6effdbc656df3e6f904d949
examples/index.js
examples/index.js
#! /usr/bin/env node // Ref: http://docopt.org/ /* Chain commands Positional arguments Named arguments Required arguments Limit arguments options Set option type (e.g. string, number) Set number of options (exact, min, & max) Nest commands & arguments */ 'use strict'; (function () { var jargs = require('../src...
#! /usr/bin/env node // Ref: http://docopt.org/ /* Chain commands Positional arguments Named arguments Required arguments Limit arguments options Set option type (e.g. string, number) Set number of options (exact, min, & max) Nest commands & arguments */ 'use strict'; (function () { var jargs = require('../src...
Adjust API to be more "React-like"
Adjust API to be more "React-like"
JavaScript
mit
JakeSidSmith/jargs
b763199fe0d1b6920cd1827f16529ddc1e021422
gulpfile.babel.js
gulpfile.babel.js
'use strict'; import gulp from 'gulp'; import babel from 'gulp-babel'; import istanbul from 'gulp-istanbul'; import mocha from 'gulp-mocha'; gulp.task('pre-test', () => { return gulp.src(['dist/index.js']) // Covering files .pipe(istanbul()) // Force `require` to return covered files ...
'use strict'; import gulp from 'gulp'; import babel from 'gulp-babel'; import istanbul from 'gulp-istanbul'; import mocha from 'gulp-mocha'; gulp.task('pre-test', () => { return gulp.src(['dist/index.js']) // Covering files .pipe(istanbul()) // Force `require` to return covered files ...
Update coverage's minimum acceptable thresholds
Update coverage's minimum acceptable thresholds
JavaScript
mit
cheton/gcode-parser
b73810201d3ef977e8322bc81594c779914eba10
examples/console/start.js
examples/console/start.js
const syrup = require('../../'); const _ = require('lodash'); syrup.scenario('array', `${__dirname}/test-array`); syrup.scenario('object', `${__dirname}/test-object`); syrup.scenario('save', `${__dirname}/test-save`); syrup.scenario('get', `${__dirname}/test-get`, ['save']); syrup.pour(function (error, results) { ...
const syrup = require('../../'); syrup.scenario('array', `${__dirname}/test-array`); syrup.scenario('object', `${__dirname}/test-object`); syrup.scenario('save', `${__dirname}/test-save`); syrup.scenario('get', `${__dirname}/test-get`, ['save']); syrup.pour(function (error, results) { console.log(JSON.stringify(r...
Remove the unneeded lodash require
Remove the unneeded lodash require
JavaScript
mpl-2.0
thejsninja/syrup
9c02fcfd2c70299d7bb785e9ac2a299320bf83d1
src/components/ByLine.js
src/components/ByLine.js
/** * ByLine.js * Description: view component that makes up a news item preview * Modules: React and React Native Modules * Dependencies: styles.js SmallText * Author: Tiffany Tse */ //import modules import React, { PropTypes } from 'react'; import { StyleSheet, View } from 'react-native'; import SmallText from '...
/** * ByLine.js * Description: view component that makes up a news item preview * Modules: React and React Native Modules * Dependencies: styles.js SmallText * Author: Tiffany Tse */ //import modules import React, { PropTypes } from 'react'; import { StyleSheet, View } from 'react-native'; import SmallText from '...
Refactor date in Byline to use string
Refactor date in Byline to use string
JavaScript
mit
titse/NYTimes-Clone,titse/NYTimes-Clone,titse/NYTimes-Clone
47459be879b85fe9daedb2d57ff43c2619dd3620
packages/components/containers/domains/DomainsSection.js
packages/components/containers/domains/DomainsSection.js
import React from 'react'; import { c } from 'ttag'; import { useEventManager, useOrganization, useDomains, SubTitle, Alert, PrimaryButton, Button, Block, useModal } from 'react-components'; import DomainModal from './DomainModal'; import DomainsTable from './DomainsTable'; const D...
import React from 'react'; import { c } from 'ttag'; import { useEventManager, useOrganization, useDomains, SubTitle, Alert, PrimaryButton, Button, Block, useModal } from 'react-components'; import DomainModal from './DomainModal'; import DomainsTable from './DomainsTable'; const D...
Add link for domains section
Add link for domains section
JavaScript
mit
ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient
32b688e53c0170f7e4f0c37d38d4b299bbf9cf66
grunt/scss-lint.js
grunt/scss-lint.js
// Check SCSS for code quality module.exports = function(grunt) { grunt.config('scsslint', { allFiles: [ 'scss/**/*.scss', ], options: { bundleExec: false, colorizeOutput: true, config: '.scss-lint.yml', exclude: [ '...
// Check SCSS for code quality module.exports = function(grunt) { grunt.config('scsslint', { allFiles: [ 'scss/**/*.scss', ], options: { bundleExec: false, colorizeOutput: true, config: '.scss-lint.yml', exclude: [ '...
Exclude forms partial as well.
Exclude forms partial as well.
JavaScript
mit
yellowled/yl-bp,yellowled/yl-bp
49c7b952bd3db9d192ea3074d773c07ade791869
ghost/admin/tests/test-helper.js
ghost/admin/tests/test-helper.js
import resolver from './helpers/resolver'; import { setResolver } from 'ember-mocha'; setResolver(resolver); /* jshint ignore:start */ mocha.setup({ timeout: 5000, slow: 500 }); /* jshint ignore:end */
import resolver from './helpers/resolver'; import { setResolver } from 'ember-mocha'; setResolver(resolver); /* jshint ignore:start */ mocha.setup({ timeout: 15000, slow: 500 }); /* jshint ignore:end */
Increase timeout in ember tests
Increase timeout in ember tests no issue - increases individual test timeout from 5sec to 15sec It seems Travis is occasionally _very_ slow and will timeout on heavier acceptance tests resulting in random failures. Hopefully this will reduce the number of random test failures we see.
JavaScript
mit
TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost
17f67a15419b45e90498982ba77c9d9083eda189
knexfile.js
knexfile.js
require('dotenv').config(); module.exports = { development: { client: 'postgresql', connection: { host : process.env.DB_HOST, user : process.env.DB_USER, password : process.env.DB_PASS, database : process.env.DB_NAME, port : process.env.DB_PORT, ssl : pro...
require('dotenv').config(); module.exports = { development: { client: 'postgresql', connection: { host : process.env.DB_HOST, user : process.env.DB_USER, password : process.env.DB_PASS, database : process.env.DB_NAME, port : process.env.DB_PORT, ssl : pro...
Change config of production server
Change config of production server
JavaScript
mit
potatowave/escolha,potatowave/escolha
5b204b9a00767a0844ce4e364b989b1adcd03360
lib/core/src/client/preview/url.js
lib/core/src/client/preview/url.js
import { history, document } from 'global'; import qs from 'qs'; import { toId } from '@storybook/router/utils'; export function pathToId(path) { const match = (path || '').match(/^\/story\/(.+)/); if (!match) { throw new Error(`Invalid path '${path}', must start with '/story/'`); } return match[1]; } ex...
import { history, document } from 'global'; import qs from 'qs'; import { toId } from '@storybook/router/utils'; export function pathToId(path) { const match = (path || '').match(/^\/story\/(.+)/); if (!match) { throw new Error(`Invalid path '${path}', must start with '/story/'`); } return match[1]; } ex...
Fix initial viewMode parsing typo
Fix initial viewMode parsing typo
JavaScript
mit
storybooks/storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook
1bbdb4ab27bf647f900d5908fab1aa3a6e660a42
scripts/clients/sonar_client.js
scripts/clients/sonar_client.js
const { spawn } = require("child_process"); const options = { sources: function (path) { return `-Dsonar.sources="${path}"`; }, projectName: function (name) { return `-Dsonar.projectName="${name}"`; }, projectKey: function (owner, name) { return `-Dsonar.projectKey="${ow...
Add sonar scanner client script
Add sonar scanner client script
JavaScript
mit
ovidiup13/L5-ProjectSource
2a2ef17d85f9336799c3e39249f960f75cac7cf6
src/core-uri-handlers.js
src/core-uri-handlers.js
// Converts a query string parameter for a line or column number // to a zero-based line or column number for the Atom API. function getLineColNumber (numStr) { const num = parseInt(numStr || 0, 10) return Math.max(num - 1, 0) } function openFile (atom, {query}) { const {filename, line, column} = query atom.w...
const fs = require('fs-plus') // Converts a query string parameter for a line or column number // to a zero-based line or column number for the Atom API. function getLineColNumber (numStr) { const num = parseInt(numStr || 0, 10) return Math.max(num - 1, 0) } function openFile (atom, {query}) { const {filename, ...
Use containsLocation() for URL handler processing
Use containsLocation() for URL handler processing
JavaScript
mit
atom/atom,atom/atom,brettle/atom,brettle/atom,brettle/atom,Mokolea/atom,Mokolea/atom,PKRoma/atom,PKRoma/atom,Mokolea/atom,atom/atom,PKRoma/atom
62d9fedc4b56f986d04480f9b342ae2ef5d37f60
scripts/actions/RepoActionCreators.js
scripts/actions/RepoActionCreators.js
'use strict'; var AppDispatcher = require('../dispatcher/AppDispatcher'), ActionTypes = require('../constants/ActionTypes'), RepoAPI = require('../utils/RepoAPI'), StarredReposByUserStore = require('../stores/StarredReposByUserStore'), RepoStore = require('../stores/RepoStore'); var RepoActionCreators...
'use strict'; var AppDispatcher = require('../dispatcher/AppDispatcher'), ActionTypes = require('../constants/ActionTypes'), RepoAPI = require('../utils/RepoAPI'), StarredReposByUserStore = require('../stores/StarredReposByUserStore'), RepoStore = require('../stores/RepoStore'); var RepoActionCreators...
Add a comment regarding unused action
Add a comment regarding unused action
JavaScript
mit
stylecoder/flux-react-router-example,AnthonyWhitaker/flux-react-router-example,machnicki/healthunlocked,goatslacker/flux-react-router-example,tiengtinh/flux-react-router-example,machnicki/healthunlocked,keshavnandan/flux-react-router-example,bertomartin/flux-react-router-example,ycavatars/flux-react-router-example,kesh...
52a7d329dec734129cf130e79f7a1c4929d02ba7
app/authenticators/api.js
app/authenticators/api.js
import Ember from 'ember'; import Base from 'simple-auth/authenticators/base'; import ENV from 'wordset/config/environment'; export default Base.extend({ restore: function(properties) { var propertiesObject = Ember.Object.create(properties); return new Ember.RSVP.Promise(function(resolve, reject) { if...
import Ember from 'ember'; import Base from 'simple-auth/authenticators/base'; import ENV from 'wordset/config/environment'; export default Base.extend({ restore: function(properties) { var propertiesObject = Ember.Object.create(properties); return new Ember.RSVP.Promise(function(resolve, reject) { if...
Use new namespaced auth API methods
Use new namespaced auth API methods
JavaScript
mit
kaelig/wordset-ui,BryanCode/wordset-ui,wordset/wordset-ui,BryanCode/wordset-ui,wordset/wordset-ui,BryanCode/wordset-ui,kaelig/wordset-ui,wordset/wordset-ui
002452c5b597e98408e5b28b6658f34e54a66500
app/public/sa-tracking.js
app/public/sa-tracking.js
'use strict'; var events = []; var requestInterval = 5000; window.addEventListener('click', function(e) { e = event || window.event; events.push(processEvent(e)); }); var processEvent = function(e) { // Event attributes var eventProps = ['type', 'timeStamp']; // Event target attributes var targetP...
'use strict'; var events = []; var requestInterval = 5000; window.addEventListener('click', function(e) { e = event || window.event; events.push(processEvent(e)); }); var processEvent = function(e) { // Event attributes var eventProps = ['type', 'timeStamp']; // Event target attributes var targetP...
Fix invalid state error by instantiating new XHR with each request
Fix invalid state error by instantiating new XHR with each request
JavaScript
mit
Sextant-WDB/sextant-ng
0b8920aea121ca1483e9cb32e55d4ba38ba2f4b7
src/utils/misc.js
src/utils/misc.js
/* @flow strict */ export const caseInsensitiveCompareFunc = (a: string, b: string): number => a.toLowerCase().localeCompare(b.toLowerCase()); export const numberWithSeparators = (value: number | string): string => value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); export function deeperMerge<K, V>(obj1: { ...
/* @flow strict */ export const caseInsensitiveCompareFunc = (a: string, b: string): number => a.toLowerCase().localeCompare(b.toLowerCase()); export const numberWithSeparators = (value: number | string): string => value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); export function deeperMerge<K, V>(obj1: { ...
Tweak type to accept read-only objects, too.
groupItemsById: Tweak type to accept read-only objects, too.
JavaScript
apache-2.0
vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile
be686e0accb9e8facc652a559b1fb39a8508c97d
awx/ui/client/src/i18n.js
awx/ui/client/src/i18n.js
/* jshint ignore:start */ var sprintf = require('sprintf-js').sprintf; /** * @ngdoc method * @name function:i18n#N_ * @methodOf function:N_ * @description this function marks the translatable string with N_ * for 'grunt nggettext_extract' * */ export function N_(s) { return s; } export default angular...
/* jshint ignore:start */ var sprintf = require('sprintf-js').sprintf; /** * @ngdoc method * @name function:i18n#N_ * @methodOf function:N_ * @description this function marks the translatable string with N_ * for 'grunt nggettext_extract' * */ export function N_(s) { return s; } export default angular...
Tweak logic used by UI to detect language
Tweak logic used by UI to detect language Chromium and WebKit based browsers have the window.navigator.languages attribute, which is an ordered array of preferred languages as configured in the browser’s settings. Although changing the language in Chrome results in an Accept-Language header being added to requests, w...
JavaScript
apache-2.0
snahelou/awx,snahelou/awx,wwitzel3/awx,wwitzel3/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,snahelou/awx
d2702efedfda3ffdb944a8118befc5d6409e8741
lib/visualizer.js
lib/visualizer.js
'use strict' const visualizeBoardS = Symbol('visualizeBoard') const visualizeOrdersS = Symbol('visualizeOrders') module.exports = class Visualizer { constructor (mapSvg, visualizeBoard, visualizeOrders) { this.map = mapSvg this[visualizeBoardS] = visualizeBoard this[visualizeOrdersS] = visualizeOrders ...
'use strict' module.exports = class Visualizer { constructor (mapSvg, visualizeBoard, visualizeOrders) { this.map = mapSvg } visualizeBoard (board) { } visualizeOrders (orders) { } addEventListenerForUnits (event, listener) { const units = this.map.querySelectorAll('.vizdip-unit') if (units...
Fix the signature of Visualizer
Fix the signature of Visualizer ref #1
JavaScript
mit
KarmaMi/vizdip,KarmaMi/vizdip,KarmaMi/vizdip,KarmaMi/vizdip
893f7371ae0d2517d4276ab4e868ce03b0cf1dbe
lint/lib/linters/RuboCop.js
lint/lib/linters/RuboCop.js
"use strict"; function RuboCop(opts) { this.exe = "rubocop"; this.ext = process.platform === 'win32' ? ".bat" : ""; this.path = opts.path; this.responsePath = "stdout"; this.args = ["-s", "{path}", "-f", "json", "--force-exclusion"] ; if (opts.lint) this.args.push("-l"); if (opts.only) this.args = this.args.c...
"use strict"; function RuboCop(opts) { this.exe = "rubocop"; this.ext = process.platform === 'win32' ? ".bat" : ""; this.path = opts.path; this.responsePath = "stdout"; this.args = ["-s", "{path}", "-f", "json"] ; if (opts.lint) this.args.push("-l"); if (opts.only) this.args = this.args.concat("--only", opts....
Remove force exclusion for rubocop
Remove force exclusion for rubocop Fixes https://github.com/rubyide/vscode-ruby/issues/175
JavaScript
mit
rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby
8fdece0b1a17c16ad3028befa34adb56d49c4203
lints/disallowFspathRule.js
lints/disallowFspathRule.js
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const Lint = require("tslint"); class Rule extends Lint.Rules.AbstractRule { apply(sourceFile) { return this.applyWithWalker(new NoFsPathWalker(sourceFile, this.getOptions())); } } Rule.FAILURE_STRING = "Do not use Uri.fsPath (or fsPath...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const Lint = require("tslint"); class Rule extends Lint.Rules.AbstractRule { apply(sourceFile) { return this.applyWithWalker(new NoFsPathWalker(sourceFile, this.getOptions())); } } Rule.FAILURE_STRING = "Do not use Uri.fsPath or TextDoc...
Fix typo and add TODO
Fix typo and add TODO
JavaScript
mit
Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code
18dbfb541960465944971269a393af668ecbb33d
specs/database.js
specs/database.js
var chai = require('chai'); var expect = chai.expect; var db = require('../server/db/config'); var models = require('../server/db/models'); describe('database storage', function() { var testData = { x: 37.783599, y: -122.408974, z: 69, message: 'Brooks was here' }; var invalidTestData = { x: ...
var chai = require('chai'); var expect = chai.expect; var db = require('../server/db/config'); var models = require('../server/db/models'); describe('database storage', function() { var testData = { x: 37.783599, y: -122.408974, z: 69, message: 'Brooks was here' }; var invalidTestData = { x: ...
Add tests to confirm message retrieval
Add tests to confirm message retrieval
JavaScript
mit
team-oath/uncovery,team-oath/uncovery,team-oath/uncovery,team-oath/uncovery,scottdixon/uncovery,scottdixon/uncovery,scottdixon/uncovery,scottdixon/uncovery
d2adfb4288153b333a0aef69428a0312d163d085
Kinect2Scratch.js
Kinect2Scratch.js
(function(ext) { // Cleanup function when the extension is unloaded ext._shutdown = function() {}; // Status reporting code // Use this to report missing hardware, plugin or unsupported browser ext._getStatus = function() { return {status: 2, msg: 'Ready'}; }; // Block...
(function(ext) { // Cleanup function when the extension is unloaded ext._shutdown = function() {}; // Status reporting code // Use this to report missing hardware, plugin or unsupported browser ext._getStatus = function() { return {status: 2, msg: 'Ready'}; }; // Block...
Change boolean to reporter for block with dropdowns
Change boolean to reporter for block with dropdowns
JavaScript
bsd-3-clause
visor841/SkelScratch,Calvin-CS/SkelScratch
2b928608f1bad3f1721838afa00dccddb724f48b
util/schemesPreviewGenerator.js
util/schemesPreviewGenerator.js
const nunjucks = require('nunjucks'); const fs = require('fs-promise'); const path = require('path'); const yaml = require('js-yaml'); const Promise = require('bluebird'); const schemesDir = '../db/schemes'; fs .readdir(schemesDir) .then(function(schemeFileNames) { const promises = []; schemeFileNames.for...
const nunjucks = require('nunjucks'); const fs = require('fs-promise'); const path = require('path'); const yaml = require('js-yaml'); const Promise = require('bluebird'); const schemesDir = path.join(__dirname, '../db/schemes'); fs .readdir(schemesDir) .then(function(schemeFileNames) { const promises = []; ...
Read files relative from script's directory
fix(cli): Read files relative from script's directory
JavaScript
mit
base16-builder/base16-builder,aloisdg/base16-builder,base16-builder/base16-builder,aloisdg/base16-builder,aloisdg/base16-builder,base16-builder/base16-builder
daeb051c4fba5603cad33cc414528052c09a0afd
src/geolocator.js
src/geolocator.js
angular.module('aGeolocator', []) .factory('Geolocator', ['$http', '$q', function($http, $q){ GEOIP_URL = "https://www.telize.com/geoip" _getIPLocation = function() { $http.get(GEOIP_URL).then(function(res) { return res.data; }).catch(function(err){ return $q.reject(err.data); ...
angular.module('aGeolocator', []) .factory('Geolocator', ['$http', '$q', function($http, $q){ var GEOIP_URL = "https://www.telize.com/geoip"; var _getIPLocation = function() { return $http.get(GEOIP_URL).then(function(res) { return res.data; }).catch(function(err){ return $q.rejec...
Fix returned result and variable declaration
Fix returned result and variable declaration
JavaScript
bsd-2-clause
asoesilo/geolocator
966a743b8e9dd75cd68fde99686e12c889103e86
views/components/embed-image.js
views/components/embed-image.js
import React from "react-native"; const { Dimensions, Image } = React; export default class EmbedImage extends React.Component { shouldComponentUpdate(nextProps) { return ( this.props.height !== nextProps.height || this.props.width !== nextProps.width || this.props.uri !== nextProps.uri ); } render...
import React from "react-native"; const { Dimensions, Image } = React; export default class EmbedImage extends React.Component { shouldComponentUpdate(nextProps) { return ( this.props.height !== nextProps.height || this.props.width !== nextProps.width || this.props.uri !== nextProps.uri ); } render...
Fix image size in chat
Fix image size in chat
JavaScript
unknown
wesley1001/io.scrollback.neighborhoods,scrollback/io.scrollback.neighborhoods,wesley1001/io.scrollback.neighborhoods,scrollback/io.scrollback.neighborhoods
227b01b527deab80958e30bd8bf6a194b06317aa
src/components/Admin/Menubar.js
src/components/Admin/Menubar.js
import React from 'react'; import { Link } from 'react-router-dom'; export const Menubar = () => ( <div className="sub-navigation"> <div className="limit-width"> <Link className="sub-navigation__link" to="/admin/profile"><span>Profile</span></Link> <Link className="sub-navigation__l...
import React from 'react'; import { NavLink } from 'react-router-dom'; export const Menubar = () => ( <div className="sub-navigation"> <div className="limit-width"> <NavLink activeClassName="active" className="sub-navigation__link" to="/admin/profile"><span>Profile</span></NavLink> ...
Swap Link to Navlink for settings active class
Swap Link to Navlink for settings active class
JavaScript
apache-2.0
nahody/biografia,nahody/biografia
d59767ea4bf2e0eeeb8537302d071284dc0459e6
src/constants/LanguageColors.js
src/constants/LanguageColors.js
const LANGUAGE_COLORS = { Scala: '#BB0017', Clojure: '#00AA00', JS: '#CCAA00', JavaScript: '#CCAA00', CoffeeScript: '#CCAA00', Ruby: '#9B111E', VB: '#663300', 'C#': '#7600BC', Go: '#996633', HTML5: '#FF0032', Swift: '#FC4831', Shell: '#03C103', Python: '#0000CC', 'C++': '#FF0099', Groovy: ...
import GITHUBCOLORS from '../config/github-colors.json'; const LANGUAGE_COLORS = GITHUBCOLORS; LANGUAGE_COLORS.DEFAULT= '#B3B3B3'; export default LANGUAGE_COLORS;
Add github programming language colrs
Add github programming language colrs
JavaScript
mit
zalando/zalando.github.io-dev,zalando/zalando.github.io-dev
97f346c585a727806718db2b02bed6a9ca5ec5c9
src/js/cordova.js
src/js/cordova.js
'use strict'; // Load only within android app: cordova=android if (window.location.search.search('cordova') > 0) { (function(d, script) { script = d.createElement('script'); script.type = 'text/javascript'; script.src = 'js/cordova/cordova.js'; d.getElementsByTagName('head')[0].appendChild(script); ...
'use strict'; // Load only within android app: cordova=android if (window.location.search.search('cordova') > 0) { (function(d, script) { // When cordova is loaded function onLoad() { d.addEventListener('deviceready', onDeviceReady, false); } // Device APIs are available function onDeviceR...
Update application cache on device resume
Update application cache on device resume
JavaScript
agpl-3.0
P2Pvalue/teem,P2Pvalue/pear2pear,Grasia/teem,P2Pvalue/teem,Grasia/teem,Grasia/teem,P2Pvalue/teem,P2Pvalue/pear2pear
0448d3651cbf8df005ed20dd05ab1241ae940f76
app/helpers/moment-calendar.js
app/helpers/moment-calendar.js
export { default, momentCalendar } from 'ember-moment/helpers/moment-calendar';
import Ember from 'ember'; import config from '../config/environment'; import CalendarHelper from 'ember-moment/helpers/moment-calendar'; export default CalendarHelper.extend({ globalAllowEmpty: !!Ember.get(config, 'moment.allowEmpty') });
Extend the CalendarHelper with global allowEmpty from config.
Extend the CalendarHelper with global allowEmpty from config.
JavaScript
mit
exop-group/ember-moment,stefanpenner/ember-moment,exop-group/ember-moment,stefanpenner/ember-moment
753171601f3471320ac3ec560b5148f9da687622
app/scripts/src/content/item.js
app/scripts/src/content/item.js
'use strict'; /* This was necessary to priorize Star Wars: The Clone Wars (2008) over Star Wars: Clone Wars (2003). I left this object because it could be useful for other movies/shows */ var fullTitles = { 'Star Wars: The Clone Wars': '"Star Wars: The Clone Wars"', 'The Office (U.S.)': 'The Office (US)' } func...
'use strict'; /* This was necessary to priorize Star Wars: The Clone Wars (2008) over Star Wars: Clone Wars (2003). I left this object because it could be useful for other movies/shows */ var fullTitles = { 'Star Wars: The Clone Wars': '"Star Wars: The Clone Wars"', 'The Office (U.S.)': 'The Office (US)', 'The...
Add more fullTitles for Item - The Blind Side was returing Blind Side - The Avengers was returning Avenged
Add more fullTitles for Item - The Blind Side was returing Blind Side - The Avengers was returning Avenged
JavaScript
mit
MrMamen/traktNRK,MrMamen/traktNRK,tegon/traktflix,MrMamen/traktflix,MrMamen/traktflix,tegon/traktflix
15df89b668ce34c7d7e0cec6d44471baf031eb24
www/js/proj4.js
www/js/proj4.js
var proj4 = require('proj4'); proj4.defs('EPSG:25832', '+proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs'); var lat = 59.932624; var lng = 10.734738; var xy = proj4('EPSG:25832', { x: lng, y: lat }) console.log(xy);
var proj4 = require('proj4'); proj4.defs('EPSG:25832', '+proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs'); var lat = 59.932624; var lng = 10.734738; var xy = proj4('EPSG:25832', { x: lng, y: lat }) console.log(xy); // Fetch closest stations: http://reis.ruter.no/reisrest/stop/getcloseststopsbycoordinates/?coordina...
Add note on how to fetch closest stations from the ruter API
Add note on how to fetch closest stations from the ruter API
JavaScript
mit
hkwaller/next,hkwaller/next,hkwaller/next,hkwaller/next
e8ca95728951c633891fe8920f1bd450bf84364d
scripts/footer.js
scripts/footer.js
var months = ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"]; var footer = document.getElementById("footer"); var div = document.createElement("DIV"); var update = new Date(document.lastModified); var day = update.getDate(); var month = upda...
var months = ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"]; var footer = document.getElementById("footer"); var div = document.createElement("DIV"); var update = new Date(document.lastModified); var day = update.getDate(); var month = upda...
Fix month of last update
Fix month of last update
JavaScript
mit
nvdaes/nvdaes.github.io,nvdaes/nvdaes.github.io
0b8a5a18f05eed0c10f357f3f8f7231ff964d087
tools/scripts/property-regex.js
tools/scripts/property-regex.js
const { assemble, writeFile, unicodeVersion } = require('./utils.js'); // This includes only the binary properties required by UTS18 RL1.2 for level 1 Unicode regex // support, minus `Assigned` which has special handling since it is the inverse of Unicode category // `Unassigned`. To include all binary pro...
const { assemble, writeFile, unicodeVersion } = require('./utils.js'); // This includes only the binary properties required by UTS18 RL1.2 for level 1 Unicode regex // support, minus `Assigned` which has special handling since it is the inverse of Unicode category // `Unassigned`. To include all binary pro...
Add Emoji list of `Binary_Property`s
Add Emoji list of `Binary_Property`s
JavaScript
mit
slevithan/xregexp,slevithan/XRegExp,slevithan/XRegExp,slevithan/xregexp,GerHobbelt/xregexp,GerHobbelt/xregexp,slevithan/xregexp,GerHobbelt/xregexp
dce5cf9c470b25f1b6e60d8f5cf710a63ab56afd
service_worker.js
service_worker.js
self.addEventListener('install', function _installHandler(e) { e.waitUntil( caches.open('static') .then(function _addToCache(cache) { cache.addAll([ '/css/master.css', '/js/app.js', '/views/templates.html', ...
Add a functioning service worker
Add a functioning service worker
JavaScript
apache-2.0
vishwaabhinav/xkcd-pwa,vishwaabhinav/xkcd-pwa
91e539f98821963bb0f6fd35ef188660e6ff01c6
imports/client/startup/routes.js
imports/client/startup/routes.js
import { Meteor } from 'meteor/meteor'; import React from 'react'; import { render } from 'react-dom'; import { Router, Route, browserHistory, IndexRoute } from 'react-router'; import AppContainer from '../containers/AppContainer'; import AboutPage from '../pages/AboutPage'; import NotFoundPage from '../pages/NotFound...
import { Meteor } from 'meteor/meteor'; import React from 'react'; import { render } from 'react-dom'; import { Router, Route, browserHistory, IndexRoute } from 'react-router'; import AppContainer from '../containers/AppContainer'; import AboutPage from '../pages/AboutPage'; import NotFoundPage from '../pages/NotFound...
Remove AppContainer layout from 404 page
Remove AppContainer layout from 404 page
JavaScript
apache-2.0
evancorl/skate-scenes,evancorl/skate-scenes,evancorl/portfolio,evancorl/skate-scenes,evancorl/portfolio,evancorl/portfolio
e7f43a25af82d8d840ad7765c7f610f7a8e58a5b
test-projects/electron-log-test-webpack/webpack.config.js
test-projects/electron-log-test-webpack/webpack.config.js
module.exports = [ { mode: "development", entry: ['./src/main.js'], output: { filename: 'main.js' }, target: 'electron-main', module: { rules: [ { test: /.js$/, loader: 'babel-loader', exclude: /node_modules/, options: { presets: [r...
'use strict'; const path = require('path'); module.exports = [ { mode: "development", entry: ['./src/main.js'], output: { filename: 'main.js', path: path.resolve(__dirname, 'dist') }, target: 'electron-main', module: { rules: [ { test: /.js$/, lo...
Fix test-projects install/build: webpack 4 changes
Fix test-projects install/build: webpack 4 changes
JavaScript
mit
megahertz/electron-log,megahertz/electron-log,megahertz/electron-log
666410d49d3aac697200737dea8d19b77d5708a4
resources/public/javascript/tryclojure.js
resources/public/javascript/tryclojure.js
function eval_clojure(code) { var data; $.ajax({ url: "eval.json", data: { expr : code }, async: false, success: function(res) { data = res; } }); return data; } function html_escape(val) { var result = val; result = result.replace(/\n/g, "<br/>"); result = r...
function eval_clojure(code) { var data; $.ajax({ url: "eval.json", data: { command: { expr: code, mode: mode } }, async: false, success: function(res) { data = res; } }); return data; } function html_escape(val) { v...
Send console mode - code or story.
Send console mode - code or story.
JavaScript
mit
maryrosecook/islaclj
525286d37f8fcc29c3ad0a9036f1217b87b4fd81
website/app/application/core/projects/project/files/file-edit-controller.js
website/app/application/core/projects/project/files/file-edit-controller.js
(function (module) { module.controller("FileEditController", FileEditController); FileEditController.$inject = ['file', '$scope']; /* @ngInject */ function FileEditController(file, $scope) { console.log('FileEditController'); var ctrl = this; ctrl.file = file; $scope.$...
(function (module) { module.controller("FileEditController", FileEditController); FileEditController.$inject = ['file']; /* @ngInject */ function FileEditController(file) { var ctrl = this; ctrl.file = file; } }(angular.module('materialscommons')));
Remove debug of ui router state changes.
Remove debug of ui router state changes.
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
f9ba237e2746b485e062c30749c45927af832424
src/js/bin4features.js
src/js/bin4features.js
$(document).ready(function() { var menuUrl = "https://www.bin4burgerlounge.com/our-downtown-menu/"; $.ajax({ url: "http://www.corsmirror.com/v1/cors?url=" + menuUrl, dataType: "html", crossDomain: true, success: writeData }); function writeData(data, textStatus, jqXHR) ...
$(document).ready(function() { var menuUrl = "https://www.bin4burgerlounge.com/our-downtown-menu/"; $.ajax({ url: "https://cors-anywhere.herokuapp.com/" + menuUrl, dataType: "html", crossDomain: true, success: writeData }); function writeData(data, textStatus, jqXHR) { ...
Revert "Update CORS provider, again..."
Revert "Update CORS provider, again..." This reverts commit cdd91c9eca4ea4675296e96c8ede6c8f8d7a3236.
JavaScript
mit
connor-bracewell/nnorco,connor-bracewell/nnorco,connor-bracewell/nnorco,connor-bracewell/nnorco
91ea8bacfefc231cc18c472bdd11c50e14370cf8
spec/responseparser_spec.js
spec/responseparser_spec.js
var ResponseParser = require('../lib/responseparser'), winston = require('winston'), fs = require('fs'), path = require('path'); describe('responseparser', function() { var parser = new ResponseParser({ format: 'xml', logger: new winston.Logger({ transports: [] }) }); it('should return xml when format is xm...
var ResponseParser = require('../lib/responseparser'), winston = require('winston'), fs = require('fs'), path = require('path'); describe('responseparser', function() { var parser = new ResponseParser({ format: 'xml', logger: new winston.Logger({ transports: [] }) }); it('should return xml when format is xm...
Add case sensitive test for format in response parser
Add case sensitive test for format in response parser
JavaScript
isc
raoulmillais/7digital-api,7digital/7digital-api,raoulmillais/node-7digital-api
19fb3ee91715ea8da3a5cb6e1d3dd5e7016ad493
src/charting/MobileChart.js
src/charting/MobileChart.js
import React, { PropTypes } from 'react'; import EChart from './EChart'; import SizeProvider from '../_common/SizeProvider'; import createOptions from './options/MobileChartOptions'; const theme = { background: 'white', line: 'rgba(42, 48, 82, 0.8)', fill: 'rgba(42, 48, 82, 0.2)', text: '#999', gri...
import React, { PropTypes } from 'react'; import EChart from './EChart'; import SizeProvider from '../_common/SizeProvider'; import createOptions from './options/MobileChartOptions'; const theme = { background: 'white', line: 'rgba(42, 48, 82, 0.8)', fill: 'rgba(42, 48, 82, 0.2)', text: '#999', gri...
Fix error when tick history is empty
Fix error when tick history is empty
JavaScript
mit
nazaninreihani/binary-next-gen,qingweibinary/binary-next-gen,binary-com/binary-next-gen,qingweibinary/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary-next-gen,binary-com/binary-next-gen,nuruddeensalihu/binary-next-gen,nuruddeensalihu/binary-next-gen,nazaninreihani/binary-next-gen,qingweibinary/bin...
7fa60523599a56255cde78a49e848166bd233c6e
src/charts/Chart.Scatter.js
src/charts/Chart.Scatter.js
'use strict'; module.exports = function(Chart) { var defaultConfig = { hover: { mode: 'single' }, scales: { xAxes: [{ type: 'linear', // scatter should not use a category axis position: 'bottom', id: 'x-axis-1' // need an ID so datasets can reference the scale }], yAxes: [{ type: '...
'use strict'; module.exports = function(Chart) { var defaultConfig = { hover: { mode: 'single' }, scales: { xAxes: [{ type: 'linear', // scatter should not use a category axis position: 'bottom', id: 'x-axis-1' // need an ID so datasets can reference the scale }], yAxes: [{ type: '...
Update scatter chart default config to hide lines
Update scatter chart default config to hide lines
JavaScript
mit
chartjs/Chart.js,simonbrunel/Chart.js,panzarino/Chart.js,jtcorbett/Chart.js,ldwformat/Chart.js,nnnick/Chart.js,jtcorbett/Chart.js,touletan/Chart.js,supernovel/Chart.js,touletan/Chart.js,chartjs/Chart.js,panzarino/Chart.js,touletan/Chart.js,touletan/Chart.js,chartjs/Chart.js,chartjs/Chart.js,ldwformat/Chart.js,simonbrun...
075d06ec62a91543e3d7caa86656e5ea9e50b17d
src/main/webapp/App.js
src/main/webapp/App.js
import * as React from "react"; import {Header} from "./components/Header"; import {Wrapper} from "./components/Wrapper"; import {BuildSnapshotContainer} from "./components/BuildSnapshotContainer"; /** * Main App that is Rendered to the Page. * * @param {*} props arbituary input properties for our application to u...
import * as React from "react"; import {Header} from "./components/Header"; import {Wrapper} from "./components/Wrapper"; import {BuildSnapshotContainer} from "./components/BuildSnapshotContainer"; /** * Main App that is Rendered to the Page. * * @param {*} props arbituary input properties for our application to u...
Add full stop to comment.
Add full stop to comment.
JavaScript
apache-2.0
googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020
9ce2d3174b07945812805e44a51a0da43c8174a0
portal/www/portal/join-project.js
portal/www/portal/join-project.js
function handle_lookup(data) { if (data.code == 0) { // Project lookup was successful // redirect to join-this-project.php?project_id=id // get project from value field, and project_id from that var project = data.value var url = "join-this-project.php?project_id=" + project.project_id; window...
function show_lookup_error(msg) { $('#finderror').append(msg); $('#findname').select(); } function handle_lookup(data) { if (data.code == 0) { // Project lookup was successful // redirect to join-this-project.php?project_id=id // get project from value field, and project_id from that var project ...
Handle expired projects in join lookup
Handle expired projects in join lookup If a project is expired, notify the user but do not carry on to the join-this-project page.
JavaScript
mit
tcmitchell/geni-portal,tcmitchell/geni-portal,tcmitchell/geni-portal,tcmitchell/geni-portal,tcmitchell/geni-portal
0a078a7649a27614731b15a0f3867f7e025452e3
website/app/application/core/projects/project/project-controller.js
website/app/application/core/projects/project/project-controller.js
Application.Controllers.controller('projectsProject', ["$scope", "provStep", "ui", "project", "current", "pubsub", projectsProject]); function projectsProject ($scope, provStep, ui, project, current, pubsub) { $scope.isActive = function (tab) {...
Application.Controllers.controller('projectsProject', ["$scope", "provStep", "ui", "project", "current", "pubsub", "recent", projectsProject]); function projectsProject ($scope, provStep, ui, project, current, pu...
Move code around to put functions at bottom.
Move code around to put functions at bottom.
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
9884facbb5ebdfefed43a37dcff54896ae99a182
src/components/search_bar.js
src/components/search_bar.js
import React from 'react'; class SearchBar extends React.Component { render() { return <input />; } } export default SearchBar;
import React, { Component } from 'react'; class SearchBar extends Component { render() { return <input onChange={this.onInputChange} />; } onInputChange(event) { console.log(event.target.value); } } export default SearchBar;
Add some syntactic sugar to the import command to shorten the class exstension.
Add some syntactic sugar to the import command to shorten the class exstension.
JavaScript
mit
JosephLeon/redux-simple-starter-tutorial,JosephLeon/redux-simple-starter-tutorial
f266cc41aeb9604393a2b9a2652de609d6d8212a
src/components/viewport/RefreshOnFocus.js
src/components/viewport/RefreshOnFocus.js
const REFRESH_PERIOD = 30 * 60 * 1000 // 30 minutes in microseconds const focusSupported = typeof document !== 'undefined' && typeof document.addEventListener !== 'undefined' && typeof document.visibilityState !== 'undefined' let hiddenAt = null function onHide() { hidd...
const REFRESH_PERIOD = 30 * 60 * 1000 // 30 minutes in microseconds const focusEnabled = ENV.ENABLE_REFRESH_ON_FOCUS const focusSupported = typeof document !== 'undefined' && typeof document.addEventListener !== 'undefined' && typeof document.visibilityState !== 'undefined'...
Enable refresh on focus by env var.
Enable refresh on focus by env var. So in dev and staging we can try to fix bugs without losing critical state.
JavaScript
mit
ello/webapp,ello/webapp,ello/webapp
4c7752df347bdb366f00cfad742a5ab799c34b65
app/assets/javascripts/trln_argon/advanced_search_scope.js
app/assets/javascripts/trln_argon/advanced_search_scope.js
Blacklight.onLoad(function() { $(window).on('load', function(){ //remove default mast search to fix duplicate IDs $(".blacklight-catalog-advanced_search #search-navbar").remove(); $(".blacklight-trln-advanced_search #search-navbar").remove(); // change adv search scope window.location.href.in...
Blacklight.onLoad(function() { $(window).on('load', function(){ //remove default mast search to fix duplicate IDs $(".blacklight-catalog-advanced_search #search-navbar").remove(); $(".blacklight-trln-advanced_search #search-navbar").remove(); // change adv search scope $(".blacklight-trln-adv...
Remove window.location.href in advanced search js
Remove window.location.href in advanced search js
JavaScript
mit
trln/trln_argon,trln/trln_argon,trln/trln_argon,trln/trln_argon
775e2ff03c0be1446def3cb9d815e30e1bac4314
server/routes/itemRoute.js
server/routes/itemRoute.js
"use strict"; const { Router } = require('express') const router = Router() const Item = require('../models/Item') router.get('/api/items', (req, res, err) => Item .find() .then(item => res.json( item )) .catch(err) ) ////////just returning a single id by its id////////// router.get('/api/items/:_id', ...
"use strict"; const { Router } = require('express') const router = Router() const Item = require('../models/Item') router.get('/api/items', (req, res, err) => Item .find() .then(item => res.json( item )) .catch(err) ) ////////just returning a single id by its id////////// router.get('/api/items/:_id', ...
PUT API route is now working in postman
PUT API route is now working in postman
JavaScript
mit
mmeadow3/nodEbay,mmeadow3/nodEbay
97da0fe508b4664086d9391308ae9e0c87e6d16d
src/rebase-prod-css.js
src/rebase-prod-css.js
import postcss from 'postcss' import { readFileSync as slurp } from 'fs' import { resolve, isAbsolute } from 'path' import { parse as parseUrl } from 'url' import { default as rebaseUrl } from 'postcss-url' export default function rebase(pkg, opts, filename) { return postcss([ rebaseUrl({ url: (url, de...
import postcss from 'postcss' import { readFileSync as slurp } from 'fs' import { resolve, isAbsolute } from 'path' import { parse as parseUrl } from 'url' import { default as rebaseUrl } from 'postcss-url' export default function rebase(pkg, opts, filename) { return postcss([ rebaseUrl({ url: (url, de...
Replace `\` with `/` in resolved path
Replace `\` with `/` in resolved path This fixes url rebasing on windows. We probably should use something other than the `path` module for resolving, but that can come at a later time – this'll do for now.
JavaScript
mit
zambezi/ez-build,zambezi/ez-build
1c1dddffb39767e1a99bb371f2b9a39a089ce86c
src/routes/machines.js
src/routes/machines.js
/** * @package admiral * @author Andrew Munsell <andrew@wizardapps.net> * @copyright 2015 WizardApps */ exports = module.exports = function(app, config, fleet) { /** * Get the machines in the cluster */ app.get('/v1/machines', function(req, res) { fleet.list_machinesAsync() .t...
/** * @package admiral * @author Andrew Munsell <andrew@wizardapps.net> * @copyright 2015 WizardApps */ exports = module.exports = function(app, config, fleet) { /** * Get the machines in the cluster */ app.get('/v1/machines', function(req, res) { fleet.list_machinesAsync() .t...
Fix order of headers in response
Fix order of headers in response
JavaScript
mit
andrewmunsell/admiral
ea0abf1f9a2000830c2810ccdbe9685ce9aa1f54
raft/scripts/frames/conclusion.js
raft/scripts/frames/conclusion.js
"use strict"; /*jslint browser: true, nomen: true*/ /*global define*/ define([], function () { return function (frame) { var player = frame.player(), layout = frame.layout(); frame.after(1, function() { frame.model().clear(); layout.invalidate(); }) ...
"use strict"; /*jslint browser: true, nomen: true*/ /*global define*/ define([], function () { return function (frame) { var player = frame.player(), layout = frame.layout(); frame.after(1, function() { frame.model().clear(); layout.invalidate(); }) ...
Update Raft web site link
Update Raft web site link
JavaScript
mit
benbjohnson/thesecretlivesofdata
ece2da770d255a2e016a5aea561cee07f6ba89c9
simul/app/components/profile.js
simul/app/components/profile.js
import React, { Component } from 'react'; import { StyleSheet, Text, View, TouchableHighlight, } from 'react-native'; import I18n from 'react-native-i18n' class Profile extends Component{ async _onPressAddStory(){ try { } } render() { return ( <View style={styles.container}> ...
import React, { Component } from 'react'; import { StyleSheet, Text, View, TouchableHighlight, } from 'react-native'; import I18n from 'react-native-i18n' class Profile extends Component{ _onPressAddStory(){ } render() { return ( <View style={styles.container}> <Text style={styles.ti...
Fix error, need to add PressAddStory button
Fix error, need to add PressAddStory button
JavaScript
mit
sf-red-pandas-2016/simul-react-native,sf-red-pandas-2016/simul-react-native,sf-red-pandas-2016/simul-react-native
30e6cf089f7e8aec41d7edd32d71c168c7db116a
string/dashes-to-camel-case.js
string/dashes-to-camel-case.js
export default function dashesToCamelCase(str) { return str.charAt(0).toUpperCase() + str.slice(1); };
export default function dashesToCamelCase(str) { return str.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); }); };
Add helper for converting dashed words to lower camel case
Add helper for converting dashed words to lower camel case
JavaScript
mit
complayjs/helpers
fb7cd0f61d5b4cca3c3ba30ad79772fc02418b5b
src/build/webpack.base.config.js
src/build/webpack.base.config.js
const path = require('path') const ExtractTextPlugin = require("extract-text-webpack-plugin") const HtmlWebpackPlugin = require('html-webpack-plugin') function resolve (dir) { return path.join(__dirname, '..', dir) } module.exports = { entry: resolve('src/index.js'), output: { path: resolve('dist'), fil...
const path = require('path') const ExtractTextPlugin = require("extract-text-webpack-plugin") const HtmlWebpackPlugin = require('html-webpack-plugin') function resolve (dir) { return path.join(__dirname, '..', dir) } module.exports = { entry: resolve('src/index.js'), output: { path: resolve('dist'), fil...
Update HTML Webpack Plugin to use index.html as template
Update HTML Webpack Plugin to use index.html as template
JavaScript
mit
jocodev1/mithril-cli,jocodev1/mithril-cli
3052dc420f956cdbbf1d2e479287231e40c38308
source/models/v3/application.js
source/models/v3/application.js
define( ['data/data', 'collections/v3/interactions', 'collections/v3/datasuitcases', 'models/v3/DataSuitcase', 'collections/v3/forms', 'models/v3/form'], function (Backbone, InteractionCollection, DataSuitcaseCollection, DataSuitcase, FormCollection, Form) { "use strict"; var Application = Backbone.Model.ex...
define( ['data/data', 'collections/v3/interactions', 'collections/v3/datasuitcases', 'models/v3/DataSuitcase', 'collections/v3/forms', 'models/v3/form'], function (Backbone, InteractionCollection, DataSuitcaseCollection, DataSuitcase, FormCollection, Form) { "use strict"; var Application = Backbone.Model.ex...
Create a collection for Forms
Create a collection for Forms
JavaScript
bsd-3-clause
blinkmobile/bic-jqm,blinkmobile/bic-jqm
5b365981625964aa609f80fa622a0372d558a368
src/protocol/message/compression/index.js
src/protocol/message/compression/index.js
const { KafkaJSNotImplemented } = require('../../../errors') const Types = { None: 0, GZIP: 1, Snappy: 2, LZ4: 3, } const Codecs = { [Types.GZIP]: () => require('./gzip'), [Types.Snappy]: () => { throw new KafkaJSNotImplemented('Snappy compression not implemented') }, [Types.LZ4]: () => { thro...
const { KafkaJSNotImplemented } = require('../../../errors') const MESSAGE_CODEC_MASK = 0x3 const RECORD_BATCH_CODEC_MASK = 0x07 const Types = { None: 0, GZIP: 1, Snappy: 2, LZ4: 3, } const Codecs = { [Types.GZIP]: () => require('./gzip'), [Types.Snappy]: () => { throw new KafkaJSNotImplemented('Snap...
Add support for Record Batch compression codec flag
Add support for Record Batch compression codec flag
JavaScript
mit
tulios/kafkajs,tulios/kafkajs,tulios/kafkajs,tulios/kafkajs
e0cde4d967ddd9e75d55fbf466f57b4f05e1e07b
chrome/browser/resources/chromeos/wallpaper_manager/js/event_page.js
chrome/browser/resources/chromeos/wallpaper_manager/js/event_page.js
// Copyright (c) 2012 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. var WALLPAPER_PICKER_WIDTH = 550; var WALLPAPER_PICKER_HEIGHT = 420; var wallpaperPickerWindow; chrome.app.runtime.onLaunched.addListener(function()...
// Copyright (c) 2012 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. var WALLPAPER_PICKER_WIDTH = 550; var WALLPAPER_PICKER_HEIGHT = 420; var wallpaperPickerWindow; chrome.app.runtime.onLaunched.addListener(function()...
Disable resize of wallpaper picker
Disable resize of wallpaper picker BUG=149937 Review URL: https://codereview.chromium.org/11411244 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@170467 0039d316-1c4b-4281-b951-d872f2087c98
JavaScript
bsd-3-clause
dednal/chromium.src,hujiajie/pa-chromium,Jonekee/chromium.src,timopulkkinen/BubbleFish,mogoweb/chromium-crosswalk,jaruba/chromium.src,timopulkkinen/BubbleFish,jaruba/chromium.src,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,Jonekee/chromium.src,zcbenz/cefode-chromium,Jonekee/chromium.src...
12bb485ef15de677effa7218d5346d3008698dee
lit-config.js
lit-config.js
module.exports = { "extends": "./index.js", "parser": "babel-eslint", "env": { "browser": true }, "plugins": [ "lit", "html" ], "globals": { "D2L": false }, "rules": { "strict": 0, "lit/no-duplicate-template-bindings": 2, "lit/no-legacy-template-syntax": 2, "lit/no-template...
module.exports = { "extends": "./index.js", "parser": "babel-eslint", "env": { "browser": true }, "plugins": [ "lit", "html" ], "globals": { "D2L": false }, "rules": { "strict": [2, "never"], "lit/no-duplicate-template-bindings": 2, "lit/no-legacy-template-syntax": 2, "lit/...
Update strict to error if present since it is redundant in modules, and not really necessary in demo pages.
Update strict to error if present since it is redundant in modules, and not really necessary in demo pages.
JavaScript
apache-2.0
Brightspace/eslint-config-brightspace
7b3f0423b7cf08b743a8244dd6b376bdedbf32f1
www/lib/collections/photos.js
www/lib/collections/photos.js
Photo = function (doc) { _.extend(this, doc); }; _.extend(Photo.prototype, { getImgTag: function (dimension) { return { 'class': 'lazy', 'data-src': _.str.sprintf( '%s/photos/%s/%s', Meteor.settings.public.uri.cdn, dimension, this.filename ), 'data-src-retina': _.str.sprintf( '%s/p...
Photo = function (doc) { _.extend(this, doc); }; _.extend(Photo.prototype, { getImgTag: function (dimension) { return { 'class': 'lazy', 'src': 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7', 'data-src': _.str.sprintf( '%s/photos/%s/%s', Meteor.settings.public.ur...
Use a transparent pixel to hold the height
Use a transparent pixel to hold the height
JavaScript
mit
nburka/black-white
0a811b387401255f9c8f5eda40d3e4e20ba6e9d7
test/transform/noStrictTest.js
test/transform/noStrictTest.js
import createTestHelpers from '../createTestHelpers'; const {expectTransform, expectNoChange} = createTestHelpers(['no-strict']); describe('Removal of "use strict"', () => { it('should remove statement with "use strict" string', () => { expectTransform('"use strict";').toReturn(''); expectTransform('\'use st...
import createTestHelpers from '../createTestHelpers'; const {expectTransform, expectNoChange} = createTestHelpers(['no-strict']); describe('Removal of "use strict"', () => { it('should remove statement with "use strict" string', () => { expectTransform('"use strict";').toReturn(''); expectTransform('\'use st...
Split multiline tests to actual multiple lines
Split multiline tests to actual multiple lines For better readability.
JavaScript
mit
lebab/lebab,mohebifar/lebab,mohebifar/xto6
30172c7bc91ae86cb61d79dbcd2328abca09570d
blueprints/component-test/qunit-files/tests/__testType__/__path__/__test__.js
blueprints/component-test/qunit-files/tests/__testType__/__path__/__test__.js
import { moduleForComponent, test } from 'ember-qunit';<% if (testType === 'integration') { %> import hbs from 'htmlbars-inline-precompile';<% } %> moduleForComponent('<%= componentPathName %>', '<%= friendlyTestDescription %>', { <% if (testType === 'integration' ) { %>integration: true<% } else if(testType === 'un...
import { moduleForComponent, test } from 'ember-qunit';<% if (testType === 'integration') { %> import hbs from 'htmlbars-inline-precompile';<% } %> moduleForComponent('<%= componentPathName %>', '<%= friendlyTestDescription %>', { <% if (testType === 'integration' ) { %>integration: true<% } else if(testType === 'un...
Remove space from generated unit-tests
Remove space from generated unit-tests
JavaScript
mit
GavinJoyce/ember.js,jherdman/ember.js,patricksrobertson/ember.js,thoov/ember.js,bantic/ember.js,szines/ember.js,chadhietala/ember.js,thoov/ember.js,xiujunma/ember.js,mfeckie/ember.js,cbou/ember.js,stefanpenner/ember.js,bantic/ember.js,alexdiliberto/ember.js,givanse/ember.js,rlugojr/ember.js,davidpett/ember.js,trentmwil...
0bcc5afa1f15315173c60c666e8ba2c1b72731ae
ember/mirage/config.js
ember/mirage/config.js
export default function () { this.passthrough('/translations/**'); this.get('/api/locale', { locale: 'en' }); }
export default function () { this.passthrough('/translations/**'); this.get('/api/locale', { locale: 'en' }); this.get('/api/notifications', { events: [] }); }
Add basic `GET /api/notifications` route handler
mirage: Add basic `GET /api/notifications` route handler
JavaScript
agpl-3.0
skylines-project/skylines,skylines-project/skylines,skylines-project/skylines,skylines-project/skylines
8dd652690386b1dde43e154ab3fb0d48e9b0659a
lib/components/form/mode-button.js
lib/components/form/mode-button.js
import React, {PropTypes, Component} from 'react' import { getModeIcon } from '../../util/itinerary' export default class ModeButton extends Component { static propTypes = { active: PropTypes.bool, label: PropTypes.string, mode: PropTypes.string, icons: PropTypes.object, onClick: PropTypes.func ...
import React, {PropTypes, Component} from 'react' import { getModeIcon } from '../../util/itinerary' export default class ModeButton extends Component { static propTypes = { active: PropTypes.bool, label: PropTypes.string, mode: PropTypes.string, icons: PropTypes.object, onClick: PropTypes.func ...
Change color of mode button checkboxes to green
feat(form): Change color of mode button checkboxes to green
JavaScript
mit
opentripplanner/otp-react-redux,opentripplanner/otp-react-redux,opentripplanner/otp-react-redux,opentripplanner/otp-react-redux
d01136d921ec73f2c09d9bb3a748684670a82db4
src/read/elements/loading.js
src/read/elements/loading.js
'use strict'; import React from 'react'; import ActivityIndicator from './pure/activityIndicator'; import ui from '../../ui'; class Loading extends React.Component { static propTypes = { dispatch: React.PropTypes.func.isRequired, kind: React.PropTypes.oneOfType([ React.PropTypes.string, React...
'use strict'; import React from 'react'; import ActivityIndicator from './pure/activityIndicator'; import ui from '../../ui'; class Loading extends React.Component { static propTypes = { dispatch: React.PropTypes.func.isRequired, kind: React.PropTypes.oneOfType([ React.PropTypes.string, React...
Add missing prop validation for readId
Add missing prop validation for readId
JavaScript
mit
netceteragroup/girders-elements
6495cd006c6ab087f971981873ae7202d4fd73e6
includes/js/main.js
includes/js/main.js
var mode = 0; //primary function calc_mode() { var modes = ["primary", "secondary", "tertiary"]; return modes[mode]; } $(function() { $(".add").button(); $(".edit").button(); $(".delete").button().click(function() { var res = confirm("Are you sure you want to delete this item?"); if (res) window.location....
var mode = 0; //primary function calc_mode() { var modes = ["primary", "secondary", "tertiary"]; return modes[mode]; } $(function() { $(".add").button(); $(".edit").button(); $(".delete").button().click(function() { var res = confirm("Are you sure you want to delete this item?"); if (res) window.location....
Add events handler on selected ingredients
Add events handler on selected ingredients
JavaScript
mit
claw68/alchemy,claw68/alchemy,claw68/alchemy,claw68/alchemy
77fa21457a7b503d9086b28b480baa8b96d0715f
src/commands/view/OpenAssets.js
src/commands/view/OpenAssets.js
export default { run(editor, sender, opts = {}) { const modal = editor.Modal; const am = editor.AssetManager; const config = am.getConfig(); const title = opts.modalTitle || editor.t('assetManager.modalTitle') || ''; const types = opts.types; const accept = opts.accept; am.setTarget(opts....
export default { run(editor, sender, opts = {}) { const modal = editor.Modal; const am = editor.AssetManager; const config = am.getConfig(); const title = opts.modalTitle || editor.t('assetManager.modalTitle') || ''; const types = opts.types; const accept = opts.accept; am.setTarget(opts....
Add stop command to openAssets
Add stop command to openAssets
JavaScript
bsd-3-clause
artf/grapesjs,artf/grapesjs,artf/grapesjs
167aa0bf00f03eba76a432f548885636d8a0b28d
.eslintrc.js
.eslintrc.js
module.exports = { 'root': true, 'parser': 'babel-eslint', 'extends': [ 'airbnb', 'plugin:import/errors' ], 'rules': { 'space-before-function-paren': 0, 'comma-dangle': [2, 'never'], 'one-var': 0, 'one-var-declaration-per-line': 0, 'prefer-arrow-callback': 0, 'strict': 0, ...
module.exports = { 'root': true, 'parser': 'babel-eslint', 'extends': [ 'airbnb', 'plugin:import/errors' ], 'rules': { 'space-before-function-paren': 0, 'comma-dangle': [2, 'never'], 'one-var': 0, 'one-var-declaration-per-line': 0, 'prefer-arrow-callback': 0, 'strict': 0, ...
Enforce that defaultProps sit next to statics
Enforce that defaultProps sit next to statics
JavaScript
mit
NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet
3fff4b7571affcbd95cee4bc8df03598019695a6
.eslintrc.js
.eslintrc.js
module.exports = { root: true, parserOptions: { ecmaVersion: 2017, sourceType: "module" }, plugins: ["ember"], extends: [ "eslint:recommended", "plugin:ember/recommended", "plugin:prettier/recommended" ], env: { browser: true }, rules: { "prettier/prettier": 2, "ember/n...
module.exports = { root: true, parserOptions: { ecmaVersion: 2017, sourceType: "module" }, plugins: ["ember", "prettier"], extends: [ "eslint:recommended", "plugin:ember/recommended", "plugin:prettier/recommended" ], env: { browser: true }, rules: { "prettier/prettier": 2, ...
Add prettier as eslint plugin
Add prettier as eslint plugin
JavaScript
mit
adfinis-sygroup/ember-validated-form,adfinis-sygroup/ember-validated-form,adfinis-sygroup/ember-validated-form
851ff5f6511117c9122e7f8b97797171d2372502
example/Button.card.js
example/Button.card.js
import devcards from '../'; import React from 'react'; import Button from './Button'; var devcard = devcards.ns('buttons'); devcard( 'Buttons', ` A simple display of bootstrap buttons. * default * primary * success * info * warning * danger * link `, ( <div> <Button kind="default">d...
import devcards from '../'; import React from 'react'; import Button from './Button'; var devcard = devcards.ns('buttons'); devcard( 'Buttons', ` A simple display of bootstrap buttons. * default * primary * success * info * warning * danger * link `, <div style={{textAlign: 'center'}}> <B...
Align as an option isn't ideal, include inline style example instead
Align as an option isn't ideal, include inline style example instead There are two ways to center align in CSS, neither work well to integrate into the card system 1) text-align: center this cascades into all children, and would force the consumer to override text-align back to what they wanted on other elements 2) ...
JavaScript
mit
glenjamin/devboard,glenjamin/devboard,glenjamin/devboard
10577cdf202b955fa855a31a6df961c37b016a73
src/bot/accountUnlinked.js
src/bot/accountUnlinked.js
import { unlinkUser } from '../lib/postgres'; export default (bot) => { return async (payload, reply) => { const page_scoped_id = payload.sender.id; await unlinkUser(page_scoped_id); await reply({ text: 'You have successfully logged out' }); console.log(`Unlinked account -> ${page_scoped_id}`); };...
import { unlinkUser } from '../lib/postgres'; export default (bot) => { return async (payload, reply) => { const page_scoped_id = payload.sender.id; await unlinkUser(page_scoped_id); await reply({ text: 'You have successfully logged out from EBudgie' }); console.log(`Unlinked account -> ${page_scope...
Change messega for unlinking account
Change messega for unlinking account
JavaScript
mit
nikolay-radkov/ebudgie-server,nikolay-radkov/ebudgie-server
83f761e1bafa07f1998bb845caa69c95d80a0235
src/admin/redux/modules/letter.js
src/admin/redux/modules/letter.js
/* @flow */ import { FETCHED_MEMBER } from '../../../shared/redux/modules/member.js' import { mergeAll, converge, unapply, compose, objOf, prop } from 'ramda' import type { Action, Reducer } from 'redux' type State = {} const reducer: Reducer<State, Action> = (state = { id: 0, address: [], name: '' }, { type, payl...
/* @flow */ import { FETCHED_MEMBER } from '../../../shared/redux/modules/member.js' import { mergeAll, converge, unapply, compose, objOf, prop } from 'ramda' import type { Action, Reducer } from 'redux' type State = {} const reducer: Reducer<State, Action> = (state = { id: 0, address: [], name: '' }, { type, payl...
Fix bug that meant member details not displaying if no first name had been entered.
Fix bug that meant member details not displaying if no first name had been entered.
JavaScript
mit
foundersandcoders/sail-back,foundersandcoders/sail-back
11934adf1a17ae9bf549dfddfcc21f71eb28a2a2
src/app/directives/configModal.js
src/app/directives/configModal.js
define([ 'angular' ], function (angular) { 'use strict'; angular .module('kibana.directives') .directive('configModal', function($modal,$q) { return { restrict: 'A', link: function(scope, elem) { // create a new modal. Can't reuse one modal unforunately as the directive w...
define([ 'angular', 'underscore' ], function (angular,_) { 'use strict'; angular .module('kibana.directives') .directive('configModal', function($modal,$q) { return { restrict: 'A', link: function(scope, elem) { // create a new modal. Can't reuse one modal unforunately ...
Fix saving of top level panel properties
Fix saving of top level panel properties
JavaScript
agpl-3.0
grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana
3c0c8915e6a5590a8d6d0db65a90632bce985c6f
eloquent_js/chapter04/ch04_ex03.js
eloquent_js/chapter04/ch04_ex03.js
function arrayToList(array) { let list = null; for (let i = array.length - 1; i >= 0; --i) { list = {value: array[i], rest: list}; } return list; } function listToArray(list) { let array = []; for (let node = list; node; node = node.rest) { array.push(node.value); } retu...
function arrayToList(arr) { if (arr.length == 0) return null; let list = null; for (let i = arr.length - 1; i >= 0; --i) { list = {value: arr[i], rest: list}; } return list; } function listToArray(list) { let arr = []; for (let node = list; node; node = node.rest) { arr.push(node.value) } return arr; ...
Add chapter 4, exercise 3
Add chapter 4, exercise 3
JavaScript
mit
bewuethr/ctci
847f32fb3980cb624e516d8f3052388de5a8ec49
server/import/import_scripts/category_mapping.js
server/import/import_scripts/category_mapping.js
module.exports = { "Dagens bedrift": "PRESENTATIONS", "Fest og moro": "NIGHTLIFE", "Konsert": "MUSIC", "Kurs og events": "PRESENTATIONS", "Revy og teater": "PERFORMANCES", "Foredrag": "PRESENTATIONS", "Møte": "DEBATE", "Happening": "NIGHTLIFE", "Kurs": "OTHER", "Show": "PERFORMAN...
module.exports = { "Dagens bedrift": "PRESENTATIONS", "Fest og moro": "NIGHTLIFE", "Konsert": "MUSIC", "Kurs og events": "PRESENTATIONS", "Revy og teater": "PERFORMANCES", "Foredrag": "PRESENTATIONS", "Møte": "DEBATE", "Happening": "NIGHTLIFE", "Kurs": "OTHER", "Show": "PERFORMAN...
Add category mapping for exhibitions
Add category mapping for exhibitions Too many exhibition events from TRDEvents got the "other"-category
JavaScript
apache-2.0
Studentmediene/Barteguiden,Studentmediene/Barteguiden
847fa26ac3e5b60e16d6c03c521ce29bdc709164
lib/routes/index.js
lib/routes/index.js
function render(viewName, layoutPath) { if (!layoutPath) { return function (req, res) { res.render(viewName); }; } else { return function (req, res) { res.render(viewName, { layout: layoutPath }); }; } } module.exports = { render: render };
function render(viewName, layoutPath) { return function (req, res) { if (layoutPath) { res.locals.layout = layoutPath; } res.render(viewName); }; } module.exports = { render: render };
Change implementation of `render` route
Change implementation of `render` route
JavaScript
bsd-3-clause
weigang992003/pure-css-chinese,jamesalley/pure-site,yahoo/pure-site,weigang992003/pure-css-chinese,jamesalley/pure-site,pandoraui/pure-site,yahoo/pure-site,chensy0203/pure-site
ef93e13a9e22459c8151c36bae520ed80fdb1b5b
lib/server/index.js
lib/server/index.js
var path = require('path'); var url = require('url'); var compression = require('compression'); var express = require('express'); var ssr = require('../index'); var xhr = require('./xhr'); var proxy = require('./proxy'); module.exports = function (config) { var app = express() .use(compression()) .use(xhr()); ...
var path = require('path'); var url = require('url'); var compression = require('compression'); var express = require('express'); var ssr = require('../index'); var xhr = require('./xhr'); var proxy = require('./proxy'); var doctype = '<!DOCTYPE html>'; module.exports = function (config) { var app = express() .us...
Add HTML5 doctype to all rendered pages.
Add HTML5 doctype to all rendered pages.
JavaScript
mit
donejs/done-ssr,donejs/done-ssr
8065830ff2163bf1178b204a5873b7d56b40a228
src/scripts/commons/d3-utils.js
src/scripts/commons/d3-utils.js
// External import * as d3 from 'd3'; export function mergeSelections (selections) { // Create a new empty selection const mergedSelection = d3.selectAll('.d3-list-graph-not-existent'); function pushSelection (selection) { selection.each(function pushDomNode () { mergedSelection[0].push(this); });...
// External import * as d3 from 'd3'; export function mergeSelections (selections) { // Create a new empty selection const mergedSelection = d3.selectAll('.d3-list-graph-not-existent'); for (let i = selections.length; i--;) { mergedSelection._groups = mergedSelection._groups.concat( selections[i]._gro...
Adjust selection merge method to D3 v4.
Adjust selection merge method to D3 v4.
JavaScript
mit
flekschas/d3-list-graph,flekschas/d3-list-graph
bb8eac7f6c3493a5fb0f644c92bc71229129101c
src/scheduler-assignment.js
src/scheduler-assignment.js
let scheduler = null export function setScheduler (customScheduler) { if (customScheduler) { scheduler = customScheduler } else { scheduler = new DefaultScheduler() } } export function getScheduler () { return scheduler } class DefaultScheduler { constructor () { this.updateRequests = [] th...
let scheduler = null export function setScheduler (customScheduler) { scheduler = customScheduler } export function getScheduler () { if (!scheduler) { scheduler = new DefaultScheduler() } return scheduler } class DefaultScheduler { constructor () { this.updateRequests = [] this.frameRequested ...
Use the DefaultScheduler if none is assigned
Use the DefaultScheduler if none is assigned Fixes #1
JavaScript
mit
smashwilson/etch,atom/etch,lee-dohm/etch,nathansobo/etch
a3a1990d95b3162ecd404610d176e2cb0bccde3b
web/app/store/MapTypes.js
web/app/store/MapTypes.js
/* * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
/* * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
Fix map types class formatting
Fix map types class formatting
JavaScript
apache-2.0
vipien/traccar,joseant/traccar-1,al3x1s/traccar,5of9/traccar,ninioe/traccar,tsmgeek/traccar,ninioe/traccar,jon-stumpf/traccar,renaudallard/traccar,5of9/traccar,tsmgeek/traccar,stalien/traccar_test,duke2906/traccar,jon-stumpf/traccar,orcoliver/traccar,stalien/traccar_test,AnshulJain1985/Roadcast-Tracker,ninioe/traccar,o...
4284ec386be6b909362b28aaa2569f93b1a5e696
t/lib/teamview_check_user.js
t/lib/teamview_check_user.js
/* * Exporst function that checks if given emails of users are shown * on the Teamview page. And if so how they are rendered: as text or link. * * It does not check exact emails, just count numbers. * * */ 'use strict'; var By = require('selenium-webdriver').By, expect = require('chai')...
/* * Exporst function that checks if given emails of users are shown * on the Teamview page. And if so how they are rendered: as text or link. * * It does not check exact emails, just count numbers. * * */ 'use strict'; var By = require('selenium-webdriver').By, expect = require('chai')...
Remove hardcoded localhost in one more place.
Remove hardcoded localhost in one more place.
JavaScript
mit
timeoff-management/application,YulioTech/timeoff,YulioTech/timeoff,timeoff-management/application
7065308e49623e1e54314d9f67fad82600aea00d
tests/unit/models/employee-test.js
tests/unit/models/employee-test.js
import { moduleForModel, test } from 'ember-qunit'; moduleForModel('employee', { // Specify the other units that are required for this test. needs: [] }); test('it exists', function(assert) { var model = this.subject(); // var store = this.store(); assert.ok(!!model); });
import DS from 'ember-data'; import Ember from 'ember'; import { test, moduleForModel } from 'ember-qunit'; //import startApp from '../../helpers/start-app'; //var App; moduleForModel('employee', { // Specify the other units that are required for this test. needs: []//, //setup: function(){ // App =...
Add simple test on employee relation
Add simple test on employee relation
JavaScript
mit
Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry
1aaa87f7e2fca83ad99cb4ef3e1dbe497e63a899
js/models/project_specific_mixin.js
js/models/project_specific_mixin.js
"use strict"; var _ = require('underscore') , Project = require('./project') /* * Mixin for models which require a project to be set. * * Looks for attribute, collection, and explicit passing in options. Will raise * an error if no project is found, or if different projects are found. */ module.exports = { c...
"use strict"; var _ = require('underscore') , Project = require('./project') /* * Mixin for models which require a project to be set. * * Looks for attribute, collection, and explicit passing in options. Will raise * an error if no project is found, or if different projects are found. */ module.exports = { c...
Fix bug in project-specific backbone model mixin
Fix bug in project-specific backbone model mixin
JavaScript
agpl-3.0
editorsnotes/editorsnotes-renderer
6038661b81a3ae849d854678707c7a0826f85d5b
test/conversion-test.js
test/conversion-test.js
var vows = require('vows'), assert = require('assert'), namedColorSamples = require('./samples'), spaces = [ 'rgb', 'hsl', 'hsv' ]; function createTest(bundleFileName) { var Color = require(bundleFileName), batch = {}; Object.keys(namedColorSamples).forEach(func...
var vows = require('vows'), assert = require('assert'), namedColorSamples = require('./samples'), spaces = [ 'rgb', 'hsl', 'hsv' ]; function createTest(bundleFileName) { var Color = require(bundleFileName), batch = {}; Object.keys(namedColorSamples).forEach(func...
Disable XYZ testing. Unclear if the tests or the implementation is wrong
Disable XYZ testing. Unclear if the tests or the implementation is wrong
JavaScript
bsd-3-clause
liuhong1happy/one-color,liuhong1happy/one-color
4ed0b226782d5b2c8c4ee79112a2735ddf6a8953
test/specs/createOrUpdate.js
test/specs/createOrUpdate.js
'use strict'; const assert = require('assert'); const mongoose = require('mongoose'); mongoose.Promise = global.Promise; const dataSchema = new mongoose.Schema({ 'contents': String }); dataSchema.plugin(require('../../index')); const dataModel = mongoose.model('data', dataSchema); describe('createOrUpdate', ...
'use strict'; const assert = require('assert'); const mongoose = require('mongoose'); mongoose.Promise = global.Promise; const dataSchema = new mongoose.Schema({ 'contents': String }); dataSchema.plugin(require('../../index')); const dataModel = mongoose.model('data', dataSchema); describe('createOrUpdate', ...
Test against string version of ID.
Test against string version of ID.
JavaScript
mit
neogeek/mongoose-create-or-update
ec27e6fed4b91d6075c702aed69976ec19061eab
test/statici18n_test.js
test/statici18n_test.js
/*global after, before, describe, it*/ 'use strict'; var assert = require('assert'); var grunt = require('grunt'); var path = require('path'); var sinon = require('sinon'); var statici18n = require('../tasks/statici18n'); statici18n(grunt); describe('exists', function() { after(function() { grunt.log.warn.rest...
/*global after, before, describe, it*/ 'use strict'; var assert = require('assert'); var grunt = require('grunt'); var path = require('path'); var sinon = require('sinon'); var statici18n = require('../tasks/statici18n'); statici18n(grunt); describe('exists', function() { after(function() { grunt.log.warn.rest...
Test for a french file (fails)
Test for a french file (fails)
JavaScript
mit
beck/grunt-static-i18n
631e16f977c65dbd38a532323e10c48dc97b4f50
rollup.config.umd.js
rollup.config.umd.js
import resolve from 'rollup-plugin-node-resolve'; import commonjs from 'rollup-plugin-commonjs'; import angular from 'rollup-plugin-angular'; import typescript from 'rollup-plugin-typescript'; var sass = require('node-sass'); import {nameLibrary,PATH_SRC,PATH_DIST} from './config-library.js'; export default { entry: ...
import resolve from 'rollup-plugin-node-resolve'; import commonjs from 'rollup-plugin-commonjs'; import angular from 'rollup-plugin-angular'; import typescript from 'rollup-plugin-typescript'; var sass = require('node-sass'); import {nameLibrary,PATH_SRC,PATH_DIST} from './config-library.js'; export default { input: ...
Change deprecated config for USM
Change deprecated config for USM
JavaScript
mit
Elecweb/emptytext,Elecweb/emptytext
d76d4072f34e29310e724da392086932e08ed52b
test/analyzer-result.js
test/analyzer-result.js
import test from 'ava'; import 'babel-core/register'; import AnalyzerResult from '../src/lib/analyzer-result'; test('addMessage adds expected message', t => { const testMessageType = 'test'; const testMessageText = 'test-message'; const result = new AnalyzerResult(); result.addMessage(testMessageType, testMe...
import test from 'ava'; import 'babel-core/register'; import AnalyzerResult from '../src/lib/analyzer-result'; test('addMessage adds expected message', t => { const testMessageType = 'test'; const testMessageText = 'test-message'; const result = new AnalyzerResult(); result.addMessage(testMessageType, testMe...
Add tests to implement TODO comment
Add tests to implement TODO comment
JavaScript
mit
ritterim/markdown-proofing
3685283ef4bbff5121146798c16be605ea2a0e2d
packages/presentational-components/src/components/prompt.js
packages/presentational-components/src/components/prompt.js
// @flow import * as React from "react"; import css from "styled-jsx/css"; const promptStyle = css` .prompt { font-family: monospace; font-size: 12px; line-height: 22px; width: var(--prompt-width, 50px); padding: 9px 0; text-align: center; color: var(--theme-cell-prompt-fg, black); ...
// @flow import * as React from "react"; /** * Generate what text goes inside the prompt based on the props to the prompt */ export function promptText(props: PromptProps): string { if (props.running) { return "[*]"; } if (props.queued) { return "[…]"; } if (typeof props.counter === "number") { ...
Make <PromptBuffer> a special case of <Prompt>
Make <PromptBuffer> a special case of <Prompt>
JavaScript
bsd-3-clause
nteract/nteract,rgbkrk/nteract,nteract/composition,jdfreder/nteract,jdfreder/nteract,nteract/composition,rgbkrk/nteract,rgbkrk/nteract,jdfreder/nteract,rgbkrk/nteract,rgbkrk/nteract,jdfreder/nteract,nteract/nteract,nteract/nteract,nteract/composition,nteract/nteract,nteract/nteract
8d4782fdefdaa16fc4ae1c24500d910817a8d3d1
src/models/Feed.js
src/models/Feed.js
const mongoose = require('mongoose') const middleware = require('./middleware/Feed.js') const path = require('path') const fs = require('fs') const packageVersion = JSON.parse(fs.readFileSync(path.join(__dirname, '..', '..', 'package.json'))).version const schema = new mongoose.Schema({ title: { type: String, ...
const mongoose = require('mongoose') const middleware = require('./middleware/Feed.js') const path = require('path') const fs = require('fs') const packageVersion = JSON.parse(fs.readFileSync(path.join(__dirname, '..', '..', 'package.json'))).version const schema = new mongoose.Schema({ title: { type: String, ...
Add enabled key, and if all other keys are empty use default vals
Add enabled key, and if all other keys are empty use default vals
JavaScript
mit
synzen/Discord.RSS,synzen/Discord.RSS
1a721d6b1bd32da9f48fb5f3dc0b26eee8bfd095
test/__snapshots__/show.js
test/__snapshots__/show.js
#!/usr/bin/env node var fs = require('fs') var path = require('path') var chalk = require('chalk') function show (result) { Object.keys(result).sort().reverse().forEach(file => { var test = file.replace(/\.test\.js\.snap$/, '') result[file].split('exports[`') .filter(str => str.indexOf('// ') !== 0) ...
#!/usr/bin/env node var fs = require('fs') var path = require('path') var chalk = require('chalk') var filter = process.argv[2] function show (result) { Object.keys(result).sort().reverse().forEach(file => { var test = file.replace(/\.test\.js\.snap$/, '') result[file].split('exports[`') .filter(str ...
Add filters to snapshot preview
Add filters to snapshot preview
JavaScript
mit
logux/logux-server
bdadb8db1c2ba6c0481fa7fc54d67f762731a3d6
examples/scribuntoConsole.js
examples/scribuntoConsole.js
var bot = require( 'nodemw' ), readline = require( 'readline' ), rl = readline.createInterface( { input: process.stdin, output: process.stdout } ), client = new Bot( { protocol: 'https', server: 'dev.fandom.com', path: '' } ), params = { action: 'scribunto-console', title: 'Module:CLI/testcases/titl...
var Bot = require( 'nodemw' ), readline = require( 'readline' ), rl = readline.createInterface( { input: process.stdin, output: process.stdout } ), client = new Bot( { protocol: 'https', server: 'dev.fandom.com', path: '' } ), params = { action: 'scribunto-console', title: 'Module:CLI/testcases/titl...
Fix unused and undefined vars
Fix unused and undefined vars
JavaScript
bsd-2-clause
macbre/nodemw
a95a786d9c0d5b643f2e6b1c51e55853d1750c74
gulp/config.js
gulp/config.js
module.exports = { // Autoprefixer autoprefixer: { // https://github.com/postcss/autoprefixer#browsers browsers: [ 'Explorer >= 10', 'ExplorerMobile >= 10', 'Firefox >= 30', 'Chrome >= 34', 'Safari >= 7', 'Opera >= 23', 'iOS >= 7', 'Android >= 4.4', 'Bla...
module.exports = { // Autoprefixer autoprefixer: { // https://github.com/postcss/autoprefixer#browsers browsers: [ 'Explorer >= 10', 'ExplorerMobile >= 10', 'Firefox >= 30', 'Chrome >= 34', 'Safari >= 7', 'Opera >= 23', 'iOS >= 7', 'Android >= 4.4', 'Bla...
Revert remote origin to 'origin' for deploy github pages
Revert remote origin to 'origin' for deploy github pages
JavaScript
mit
osr-megha/polymer-starter-kit,StartPolymer/polymer-starter-kit-old,StartPolymer/polymer-static-app,StartPolymer/polymer-starter-kit-old,osr-megha/polymer-starter-kit,StartPolymer/polymer-static-app
eb78a8ff55ffb43880fbba8ff92254c3ddf630c7
routes/trackOrder.js
routes/trackOrder.js
const utils = require('../lib/utils') const challenges = require('../data/datacache').challenges const db = require('../data/mongodb') module.exports = function trackOrder () { return (req, res) => { const id = insecurity.sanitizeProcessExit(utils.trunc(decodeURIComponent(req.params.id), 40)) if (utils.notSo...
const utils = require('../lib/utils') const insecurity = require('../lib/insecurity') const challenges = require('../data/datacache').challenges const db = require('../data/mongodb') module.exports = function trackOrder () { return (req, res) => { const id = insecurity.sanitizeProcessExit(utils.trunc(decodeURICo...
Add missing import of insecurity lib
Add missing import of insecurity lib
JavaScript
mit
bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop
d688400e75fd5282cc3a5a7ef738711a13617e1b
routes/views/main.js
routes/views/main.js
var keystone = require('keystone'), _ = require('underscore'); // Load models to allow fetching of slideshow data var Slideshow = keystone.list('Slideshow'), SlideshowItems = keystone.list('Slideshow Item'); exports = module.exports = function(req, res) { 'use strict'; var view = new keystone.View(req, res), ...
var keystone = require('keystone'), _ = require('underscore'); // Load models to allow fetching of slideshow data var Slideshow = keystone.list('Slideshow'), SlideshowItems = keystone.list('Slideshow Item'); exports = module.exports = function(req, res) { 'use strict'; var view = new keystone.View(req, res), ...
Remove logging messages cluttering the output log.
Remove logging messages cluttering the output log.
JavaScript
mit
autoboxer/MARE,autoboxer/MARE
b4cacf5ed3e4bd98a693cddb2ba48674add19cb6
website/static/website/js/app.js
website/static/website/js/app.js
import React from "react"; import { Chance }from "chance"; import WriteMessage from "./components/WriteMessage"; import Messages from "./components/Messages"; export default class App extends React.Component { constructor(props) { super(props); this.state = { user: chance.name(), messages: [] } } compo...
import React from "react"; import { Chance }from "chance"; import WriteMessage from "./components/WriteMessage"; import Messages from "./components/Messages"; export default class App extends React.Component { constructor(props) { super(props); this.state = { user: chance.name(), messages: [], connected: fa...
Put a connected visual help
Put a connected visual help
JavaScript
mit
Frky/moon,Frky/moon,Frky/moon,Frky/moon,Frky/moon
a305be411f880fa1fdf5c931f562e605c2a208d3
app/components/Button/index.js
app/components/Button/index.js
import React, { Component, PropTypes } from 'react'; import classnames from 'classnames'; import './Button.scss'; export default class Button extends Component { static propTypes = { onClick: PropTypes.func, type: PropTypes.oneOf(['button', 'submit', 'reset']), kind: PropTypes.oneOf(['yes', 'no', 'subtle...
import React, { Component, PropTypes } from 'react'; import classnames from 'classnames'; import './Button.scss'; export default class Button extends Component { static propTypes = { onClick: PropTypes.func, type: PropTypes.oneOf(['button', 'submit', 'reset']), kind: PropTypes.oneOf(['yes', 'no', 'subtle...
Improve semantics of submit button
:page_facing_up: Improve semantics of submit button
JavaScript
mit
JasonEtco/flintcms,JasonEtco/flintcms