commit
stringlengths
40
40
old_file
stringlengths
4
236
new_file
stringlengths
4
236
old_contents
stringlengths
1
3.26k
new_contents
stringlengths
16
4.43k
subject
stringlengths
16
624
message
stringlengths
17
3.29k
lang
stringclasses
5 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
a3b61232879b9722511f1bcc6a4b02d06478cefe
lib/create.js
lib/create.js
'use strict'; var NET = require('net'); var PORTS = {}; function CreateServer( port, callback ){ if( (typeof port === 'number') ){ port = parseFloat(port); if( (PORTS[port.toString()]) ){ process.nextTick(CreateServer,port,callback); ...
'use strict'; var NET = require('net'); var PORTS = {}; function CreateServer( port, callback ){ if( (typeof port === 'number') ){ port = parseFloat(port); if( (PORTS[port.toString()]) ){ process.nextTick(CreateServer,port,callback); ...
Reorganize the CreateServer to allow optimization.
Reorganize the CreateServer to allow optimization.
JavaScript
mit
METACEO/nodejs.chasm
2df2d29b9b7eef789c3c483075d712ea33f045c2
lib/dowhen.js
lib/dowhen.js
var async = require('async'); var DoWhen = function(obj, ev) { var objCallback, triggerCallbacks, args = null, callbacks = []; if (typeof(obj) == 'undefined') { // error } if (typeof(ev) == 'undefined') { //error } triggerCallbacks = function() { ...
var async = require('async'); var DoWhen = function(obj, ev) { var objCallback, triggerCallbacks, args = null, callbacks = []; if (typeof(obj) != 'undefined') { throw TypeError('obj argument must be an EventEmitter-like object'); } if (typeof(ev) == 'undefined') { ...
Throw errors if either arg is wrong
Throw errors if either arg is wrong
JavaScript
bsd-2-clause
1stvamp/dowhen.js
c594a90f86c0534a97389d31dbef6ee49f2be801
static/js/add_post.js
static/js/add_post.js
document.addEventListener("DOMContentLoaded", function(event){ var editorContainer = document.querySelector("textarea#post-body") var containerStyle = getComputedStyle(editorContainer) var editor = CKEDITOR.replace("post-body", {width: containerStyle.width, height: containerStyle.height}) //editor.resize("80%", "20...
document.addEventListener("DOMContentLoaded", function(event){ var editorContainer = document.querySelector("textarea#post-body") var containerStyle = getComputedStyle(editorContainer) var editor = CKEDITOR.replace("post-body", {width: containerStyle.width, height: containerStyle.height}) //editor.resize("80%", "20...
Remove js for removal button which is no longer displayed
Remove js for removal button which is no longer displayed
JavaScript
mit
ollien/Timpani,ollien/Timpani,ollien/Timpani
cdbaa0206f6550bf39142046bfc5a13a4a681e2e
app/scripts/components/slurm/actions.js
app/scripts/components/slurm/actions.js
// @ngInject export default function actionConfig(ActionConfigurationProvider, DEFAULT_EDIT_ACTION) { ActionConfigurationProvider.register('SLURM.Allocation', { order: [ 'details', 'edit', 'cancel', 'destroy' ], options: { details: { title: gettext('Details'), ...
// @ngInject export default function actionConfig(ActionConfigurationProvider, DEFAULT_EDIT_ACTION) { ActionConfigurationProvider.register('SLURM.Allocation', { order: [ 'details', 'pull', 'edit', 'cancel', 'destroy' ], options: { pull: { title: gettext('Synchro...
Enable SLURM allocation synchronization action.
Enable SLURM allocation synchronization action.
JavaScript
mit
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
333cdb9da391c1e2c0c6c9eb9428928f35d83fea
app/scripts/sparql/sparql.controller.js
app/scripts/sparql/sparql.controller.js
(function() { 'use strict'; function SparqlController($scope, AuthenticationService, SparqlService) { this.resultText = ''; this.errorMessage = ''; AuthenticationService.ready.then(function() { SparqlService.doQuery().then(function (result){ if( typeof(result) === 'string' ){ i...
(function() { 'use strict'; function SparqlController($scope, AuthenticationService, SparqlService) { this.resultText = ''; this.errorMessage = ''; AuthenticationService.ready.then(function() { SparqlService.doQuery().then(function (result){ if( typeof(result) === 'string' ){ i...
Update error message when flask sparql app does not work
Update error message when flask sparql app does not work
JavaScript
apache-2.0
NLeSC/UncertaintyVisualization,NLeSC/UncertaintyVisualization
bb2c15182b04a7e7c6013cb488a6d36c5e8f5232
lib/node_modules/@stdlib/utils/keys/lib/builtin.js
lib/node_modules/@stdlib/utils/keys/lib/builtin.js
/** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
Resolve discrepancy in ES5/ES6 behavior by always casting to an object
Resolve discrepancy in ES5/ES6 behavior by always casting to an object
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
e40f952f97fe90d1b41585cf0c9ed9e35a29a58c
test/src/pieces/nullPiece_test.js
test/src/pieces/nullPiece_test.js
import NullPiece from '../../../frontend/src/shogi/pieces/nullPiece'; import memo from 'memo-is'; import _ from 'lodash'; describe('NullPiece', () => { describe('#constructor', () => { it('this.type is `*`', () => { const piece = new NullPiece({ type: '*' }); piece.type.should.eql('*'); }); });...
import NullPiece from '../../../frontend/src/shogi/pieces/nullPiece'; import memo from 'memo-is'; import should from 'should'; import _ from 'lodash'; describe('NullPiece', () => { describe('#constructor', () => { it('this.type is `*`', () => { const piece = new NullPiece({ type: '*' }); piece.type.s...
Refactor spec for using should.
Refactor spec for using should.
JavaScript
mit
mgi166/usi-front,mgi166/usi-front
f6118aa94535412a71cbd9fdc6c6a52b133c497f
app/users/user-links.directive.js
app/users/user-links.directive.js
{ angular .module('meganote.users') .directive('userLinks', [ 'CurrentUser', (CurrentUser) => { class UserLinksController { user() { return CurrentUser.get(); } signedIn() { return CurrentUser.signedIn(); } } ...
{ angular .module('meganote.users') .directive('userLinks', [ 'CurrentUser', 'AuthToken', (CurrentUser, AuthToken) => { class UserLinksController { user() { return CurrentUser.get(); } signedIn() { return CurrentUser.signedIn();...
Add a working logout link and redirect to sign-up
Add a working logout link and redirect to sign-up
JavaScript
mit
mreed19/meganote,mreed19/meganote
b758e0896224f7ad5aa65365231a2edcd89e92fb
Pizza/modules/processor.js
Pizza/modules/processor.js
'use strict' var _ = require('lodash'); function process(result){ console.log("TODO"); } module.exports = { process : process }
'use strict' var _ = require('lodash'); function process(result){ let result = { nbCacheServers: 1, cacheServers: [ { id: 0, videoIds:[] } ] }; writeOutput(result); } function writeOutput(result) { } module.exports = { process : process }
ADD : Dummy writing results
ADD : Dummy writing results
JavaScript
mit
bebelz/JsParser
e6207b67b6e07ada1f1e50b066939e0e4d2eeab9
tests/helpers/assertFileEquals.js
tests/helpers/assertFileEquals.js
'use strict'; var expect = require('chai').expect; var fs = require('fs'); /* Assert that a given file matches another. @method assertFileEqual @param {String} pathToActual @param {String} pathToExpected */ module.exports = function assertFileEquals(pathToActual, pathToExpected) { var actual = fs.readFileSync...
'use strict'; var expect = require('chai').expect; var fs = require('fs'); /* Assert that a given file matches another. @method assertFileEqual @param {String} pathToActual @param {String} pathToExpected */ module.exports = function assertFileEquals(pathToActual, pathToExpected) { // Strip leading and trailin...
Trim whitespace when comparing file equality in tests
Trim whitespace when comparing file equality in tests This is needed because some operating systems add newlines at the end of generated files, and others do not.
JavaScript
mit
codepreneur/sane,devinus/sane,IanVS/sane,ndufreche/sane,artificialio/sane,kriswill/sane,devinus/sane,imfly/sane,sane/sane,artificialio/sane,ndufreche/sane,sane/sane,codepreneur/sane,imfly/sane,IanVS/sane,kriswill/sane
4de23fee383ec1600636bce78de1715925d9925f
app/controllers/dashboard/session-manager/session/contests/index.js
app/controllers/dashboard/session-manager/session/contests/index.js
import Ember from 'ember'; export default Ember.Controller.extend({ store: Ember.inject.service(), contestSortProperties: [ 'organizationKindSort', 'awardQualifier', 'awardPrimary:desc', 'awardAgeSort', 'awardName', ], sortedContests: Ember.computed.sort( 'model.contests', 'contestS...
import Ember from 'ember'; export default Ember.Controller.extend({ store: Ember.inject.service(), contestSortProperties: [ 'organizationKindSort', 'awardQualifier', 'awardPrimary:desc', 'awardAgeSort', 'awardName', ], sortedContests: Ember.computed.sort( 'model.contests', 'contestS...
Extend page_size on grantor lookup
Extend page_size on grantor lookup
JavaScript
bsd-2-clause
barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web
e2ce7e647d40e5dfc9f73c298e88cf16a7e6b08e
app/assets/javascripts/application_legacy.js
app/assets/javascripts/application_legacy.js
// This file is used as the root JS file for the govuk_admin_template // system aspects of Collections Publisher //= require components/autocomplete.js //= require jquery-ui.sortable.min //= require jquery.clicktoggle //= require ./curated_lists //= require ./ordered_lists //= require ./publishing //= require select2...
// This file is used as the root JS file for the govuk_admin_template // system aspects of Collections Publisher //= require jquery-ui.sortable.min //= require jquery.clicktoggle //= require ./curated_lists //= require ./ordered_lists //= require ./publishing //= require select2 GOVUK.orderedLists.init() GOVUK.curat...
Remove autocomplete from the legacy JS
Remove autocomplete from the legacy JS This component is only used with the design system interface
JavaScript
mit
alphagov/collections-publisher,alphagov/collections-publisher,alphagov/collections-publisher
eb63cab7d63eeaaff8ad737bb2fe2a305a8811f8
views/progress_view.js
views/progress_view.js
Flame.ProgressView = Flame.View.extend({ classNames: ['flame-progress-view'], value: null, maximum: null, animate: false, handlebars: function() { var height = this.get('layout').height; return "<div style='height: %@px;' class='progress-container'></div><div style='height: %@px; w...
Flame.ProgressView = Flame.View.extend({ classNames: ['flame-progress-view'], value: null, maximum: null, animate: false, handlebars: function() { var height = this.get('layout').height; return "<div style='height: %@px;' class='progress-container'></div><div style='height: %@px; w...
Make sure ProgressView still exists when animating width.
Make sure ProgressView still exists when animating width.
JavaScript
mit
lalnuo/flame.js,flamejs/flame.js,lalnuo/flame.js,lalnuo/flame.js
20c529b901115d7b1f57f33f6d69ded65eb9784d
addon/components/upf-checkbox.js
addon/components/upf-checkbox.js
import Component from '@ember/component'; import { observer } from '@ember/object'; import { equal } from '@ember/object/computed'; export default Component.extend({ classNames: ['upf-checkbox'], classNameBindings: [ 'hasLabel:upf-checkbox--has-label', 'sizeSmall:upf-checkbox--sm', 'disabled:upf-checkbox--...
import Component from '@ember/component'; import { observer } from '@ember/object'; import { equal } from '@ember/object/computed'; export default Component.extend({ classNames: ['upf-checkbox'], classNameBindings: [ 'hasLabel:upf-checkbox--has-label', 'sizeSmall:upf-checkbox--sm', 'disabled:upf-checkb...
Add preventDefault argument for UpfCheckbox
Add preventDefault argument for UpfCheckbox
JavaScript
mit
upfluence/oss-components,upfluence/oss-components,upfluence/oss-components,upfluence/oss-components
5f3eeac545de388024222a3bf24c5bae1c5d6d63
app/components/pending-owner-invite-row.js
app/components/pending-owner-invite-row.js
import Component from '@ember/component'; import { inject as service } from '@ember/service'; import { task } from 'ember-concurrency'; export default class PendingOwnerInviteRow extends Component { @service notifications; tagName = ''; isAccepted = false; isDeclined = false; @task(function* () { thi...
import Component from '@ember/component'; import { inject as service } from '@ember/service'; import { tracked } from '@glimmer/tracking'; import { task } from 'ember-concurrency'; export default class PendingOwnerInviteRow extends Component { @service notifications; tagName = ''; @tracked isAccepted = false;...
Convert `isAccepted/Declined` to tracked properties
PendingOwnerInviteRow: Convert `isAccepted/Declined` to tracked properties
JavaScript
apache-2.0
rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io
a6a5fac8a0c7739c9788391eae3b24acdfe71ffa
updateMultidexManifest.js
updateMultidexManifest.js
module.exports = function(ctx) { var fs = ctx.requireCordovaModule('fs'), path = ctx.requireCordovaModule('path'), xml = ctx.requireCordovaModule('cordova-common').xmlHelpers; var manifestPath = path.join(ctx.opts.projectRoot, 'platforms/android/AndroidManifest.xml'); var doc = xml.parseEle...
module.exports = function(ctx) { var fs = ctx.requireCordovaModule('fs'), path = ctx.requireCordovaModule('path'), xml = ctx.requireCordovaModule('cordova-common').xmlHelpers; //manifest path of cordova-android@7+ projects var manifestPath = path.join(ctx.opts.projectRoot, 'platforms/androi...
Handle new AndroidManifest.xml location in cordova-android@^7.0.0
Handle new AndroidManifest.xml location in cordova-android@^7.0.0
JavaScript
mit
podtrackers/cordova-multidex
1f37fe29e4958274d02509ef240a03690486bd64
assets/js/utilities.js
assets/js/utilities.js
function msToTime(ms) { var d = new Date(ms), h = d.getHours(), m = d.getMinutes(); h = h < 10 ? "0" + h : h; m = m < 10 ? "0" + m : m; return h + ":" + m; } function linkify(str) { var e = /\b(?:https?|ftp):\/\/[a-z0-9-+&@#\/%?=~_|!:,.;]*[a-z0-9-+&@#\/%=~_|]/gi, t = /(^|[^\/])(www\.[\S]+(\b|$))/gi, n = /\...
function msToTime(ms) { var d = new Date(ms), h = d.getHours(), m = d.getMinutes(); h = h < 10 ? "0" + h : h; m = m < 10 ? "0" + m : m; return h + ":" + m; } function cleanUp() { this.hide() tray.remove() rele.cleanUp() this.close(true) } function playHighlight(elem) { elem.play() }
Remove old, problematic linkifying methods
Remove old, problematic linkifying methods
JavaScript
mit
Varjelus/rele,Varjelus/rele,Varjelus/rele
dc2be3c622d4551f4d890037695ad999008fcc43
interface.js
interface.js
var Viewer = { /** * Scroll to specified position. * * @param {string} type "frame", "line", or "page". * @param {int} number The offset or the index of destination. * @param {bool} relative If true, use number as offset from current * position. */ goto: function(type, number, relative) {}, /...
var Viewer = { /** * Scroll to specified position. * * @param {string} type "frame", "line", or "page". * @param {int} number The offset or the index of destination. * @param {bool} relative If true, use number as offset from current * position. */ goto: function(type, number, relative) {}, /...
Move key definition into pmore.trigger
Move key definition into pmore.trigger
JavaScript
mit
eight04/pmore-js
a41cb1c9ba3ce6e8428c113c40ba813b70e1dca3
data/message-data.js
data/message-data.js
/* globals module Promise */ 'use strict'; module.exports = function ({ models }) { const { Message } = models; return { createMessage(message) { let messageModel = Message.getMessage(message); return new Promise((resolve, reject) => { messageModel.save(err => { if (err...
/* globals module Promise */ 'use strict'; module.exports = function ({ models }) { const { Message } = models; return { createMessage(message) { let messageModel = Message.getMessage(message); return new Promise((resolve, reject) => { messageModel.save(err => { if (err...
Fix return messages to be limited
Fix return messages to be limited
JavaScript
apache-2.0
course-project-node-webapp/Paycheck,course-project-node-webapp/Paycheck
efd2a3bbb2e3927ec5644c1af6063073a81cc2c4
examples/star-wars/js/reducers/shipInputReducer.js
examples/star-wars/js/reducers/shipInputReducer.js
import { List } from 'immutable'; import { Reducer } from 'flux-reducer'; import factions from '../models/faction'; export default class ShipInputReducer extends Reducer({ shipName: '', factionId: '', factions: new List, }) { static create() { return new ShipInputReducer({ factions: new List(factions...
import { List } from 'immutable'; import { Reducer } from 'flux-reducer'; import factions from '../models/faction'; export default class ShipInputReducer extends Reducer({ shipName: '', factionId: '', factions: new List, }) { static create() { var allFactions = factions.getAll(); return new ShipInputRe...
Fix the initial factionId bug
Fix the initial factionId bug
JavaScript
mit
liuxiong332/graphql-client,liuxiong332/graphql-client,liuxiong332/graphql-client
8b2ed4335b3da33a9ee5fdcec599bc898b36b2dd
documentation/demos/cose-layout/code.js
documentation/demos/cose-layout/code.js
Promise.all([ fetch('cy-style.json', {mode: 'no-cors'}) .then(function(res) { return res.json() }), fetch('data.json', {mode: 'no-cors'}) .then(function(res) { return res.json() }) ]) .then(function(dataArray) { var cy = window.cy = cytoscape({ container: document.getElementB...
Promise.all([ fetch('cy-style.json', {mode: 'no-cors'}) .then(function(res) { return res.json() }), fetch('data.json', {mode: 'no-cors'}) .then(function(res) { return res.json() }) ]) .then(function(dataArray) { var cy = window.cy = cytoscape({ container: document.getElementB...
Fix cose options in demo
Fix cose options in demo
JavaScript
mit
cytoscape/cytoscape.js,cytoscape/cytoscape.js
11e119dc08270c996f08b3bba300ebc582bc4403
app/frontend/entrypoints/application.js
app/frontend/entrypoints/application.js
import '../font_awesome_icons'; import '../reports'; import dataTablesInit from 'datatables.net'; import dataTablesBs5Init from 'datatables.net-bs5'; import Rails from 'rails-ujs'; import $ from 'jquery'; dataTablesInit(window, $); dataTablesBs5Init(window, $); Rails.start(); $.fn.DataTable.defaults.headerCallback =...
import '../font_awesome_icons'; import '../reports'; import dataTablesInit from 'datatables.net'; import dataTablesBs5Init from 'datatables.net-bs5'; import Rails from 'rails-ujs'; import $ from 'jquery'; dataTablesInit(window, $); dataTablesBs5Init(window, $); // Conditional needed: // https://github.com/ElMassimo/v...
Fix production build for rails-ujs.
Fix production build for rails-ujs.
JavaScript
mit
GUI/sahc-monitoring-reports,GUI/sahc-monitoring-reports,GUI/sahc-monitoring-reports,GUI/sahc-monitoring-reports,GUI/sahc-monitoring-reports
1155b59e50689ccb06a2a5b6a5b62c8765c6de56
src/framework/common/load-polyfills.js
src/framework/common/load-polyfills.js
import global from 'global'; import '../../shared/regenerator'; export default function loadPolyfills() { const promises = []; if (!global.Intl) { promises.push( System.import('intl'), System.import('intl/locale-data/jsonp/en.js'), ); } if (webpack_globals.SIDE === 'server') { // eslint-d...
import global from 'global'; import '../../shared/regenerator'; import { isServer } from '../../shared/EnvUtil'; export default function loadPolyfills() { const promises = []; if (!global.Intl) { promises.push( import('intl'), import('intl/locale-data/jsonp/en.js'), ); } if (isServer) { /...
Use import instead of System.import
Use import instead of System.import
JavaScript
mit
reworkjs/reworkjs,foobarhq/reworkjs,reworkjs/reworkjs,reworkjs/reworkjs,foobarhq/reworkjs
f387d25cf9a5e56549866e1d8fe78e02a7db30ab
concepts/frame-list/main.js
concepts/frame-list/main.js
var mercury = require("mercury") var FrameList = require("./views/frame-list") var FrameEditor = require("./views/frame-editor") var FrameData = require("./data/frames") // Load the data var initialFrameData = FrameData.load() // Create the default view using the frame set var frameList = FrameList(frames) var stat...
var mercury = require("mercury") var FrameList = require("./views/frame-list") var FrameEditor = require("./views/frame-editor") var FrameData = require("./data/frames") // Load the data var initialFrameData = FrameData.load() // Create the default view using the frame set var frameList = FrameList(frames) var stat...
Use two values in the state for editor & frameList
Use two values in the state for editor & frameList This reduces confusion between what is currently rendering. This will avoid duck type checks in the view and allow the rendering wrapper to have a slightly different container for each type of widget.
JavaScript
mit
tommymessbauer/mercury,Raynos/mercury,martintietz/mercury,staltz/mercury,staltz/mercury,jxson/mercury,vlad-x/mercury,eightyeight/mercury,mpal9000/mercury,eriser/mercury,beni55/mercury
6f53b8df0c4b187dc5e487d582abd945353eb230
geogoose/util.js
geogoose/util.js
var mongoose = require('mongoose'), _ = require('cloneextend'), adHocModels = {}; var adHocModel = function(collectionName, Schema, options) { if (!adHocModels[collectionName]) { var options = options || {}; if (options.strict == undefined) { options.strict = false; } ...
var mongoose = require('mongoose'), _ = require('cloneextend'), adHocModels = {}; var adHocModel = function(collectionName, Schema, options) { if (!adHocModels[collectionName]) { var options = options || {}; if (options.strict == undefined) { options.strict = false; } ...
Send bbox for Point features
Send bbox for Point features
JavaScript
mit
Safecast/GeoSense,Safecast/GeoSense,Safecast/GeoSense,Safecast/GeoSense,Safecast/GeoSense
6f5d1137b3a60ec9bbfce5d4622635c2cd3f3a82
js/navbar.js
js/navbar.js
/* -------------------------------------------------------------------------- *\ JavaScript for animated navigation bar -------------------------------------------------------------------------- This file is part of XML-to-bootstrap. https://github.com/acch/XML-to-bootstrap Copyright 2016 Achim Christ ...
/* -------------------------------------------------------------------------- *\ JavaScript for animated navigation bar -------------------------------------------------------------------------- This file is part of XML-to-bootstrap. https://github.com/acch/XML-to-bootstrap Copyright 2016 Achim Christ ...
Use explicit addEventListener instead of onclick
Use explicit addEventListener instead of onclick
JavaScript
mit
acch/XML-to-bootstrap,acch/XML-to-bootstrap
85038c35b48b022c4f3cc6e50bd1d79ca5cdf54f
src/stores/slide-deck.js
src/stores/slide-deck.js
export default { state: { slides: [], activeSlideId: 0, activeSlide: {}, }, activateSlide: function activateSlide(slideId) { if (this.state.slides[slideId]) { this.state.activeSlideId = slideId; this.state.activeSlide = this.state.slides[slideId]; } }, };
export default { state: { slides: [], activeSlideId: null, activeSlide: null, }, activateSlide(uuid) { const slide = this.state.slides.find(slide => { return slide._uuid == uuid; }); if(slide) { this.state.activeSlideId = uuid; this.state.activeSlide = slide; retur...
Fix slide deck store slide adding & - activation.
Fix slide deck store slide adding & - activation.
JavaScript
mit
guidobouman/prsnt.co,guidobouman/prsnt.co
20ed09e2708808239d0b64a8b7d9d08240cc12ad
src/main/webapp/resources/marketplace/js/StoreManager.js
src/main/webapp/resources/marketplace/js/StoreManager.js
/** * Copyright (c) 2015, CoNWeT Lab., Universidad Politécnica de Madrid * Code licensed under BSD 3-Clause (https://github.com/conwetlab/WMarket/blob/master/LICENSE) */ var StoreManager = (function () { "use strict"; var StoreManager = function StoreManager() { this.storeList = []; }; St...
/** * Copyright (c) 2015, CoNWeT Lab., Universidad Politécnica de Madrid * Code licensed under BSD 3-Clause (https://github.com/conwetlab/WMarket/blob/master/LICENSE) */ var StoreManager = (function () { "use strict"; var StoreManager = function StoreManager() { this.storeList = {}; }; ...
Change the way to find a store saved
Change the way to find a store saved Signed-off-by: Aitor Magán <a93a7d273b830b2e8a26461c1a80328a1d7ad27a@conwet.com>
JavaScript
bsd-3-clause
Fiware/apps.WMarket,conwetlab/WMarket,Fiware/apps.WMarket,Fiware/apps.WMarket,conwetlab/WMarket,Fiware/apps.WMarket,conwetlab/WMarket,conwetlab/WMarket
c9fa4fa925e6d8aa2282b162397b78912c27b12d
test/eraseones.js
test/eraseones.js
var simpleturing = require('../'), assert = require('assert'); var machine = simpleturing('s0', { 's0': { 0: [0, 's0', 1], 1: [0, 's1', 1] }, 's1': { 0: [0, 'stop'], 1: [0, 's1', 1] } }); assert.ok(machine); var result = machine.run([0, 0, 1, 1, 1, 0]); assert.ok(result); assert...
var simpleturing = require('../'), assert = require('assert'); var machine = simpleturing('s0', { 's0': { 0: [0, 's0', 1], 1: [0, 's1', 1] }, 's1': { 0: [0, 'stop'], 1: [0, 's1', 1] } }); assert.ok(machine); var result = machine.run([0, 0, 1, 1, 1, 0]); assert.ok(result); assert...
Refactor test to use assert.deepEqual for arrays
Refactor test to use assert.deepEqual for arrays
JavaScript
mit
ajlopez/SimpleTuring
022c2fb783a80f025ea2f1231bf98d254dce5a6f
example/webpack.config.js
example/webpack.config.js
var webpack = require('webpack'); module.exports = { node: { // Enable dirname and filename so we can link back to the GitHub source __filename: true, __dirname: true }, resolve: { // Because we load devboard from a parent folder on the filesystem // we'd end up bundling its React devDependen...
module.exports = { node: { // Enable dirname and filename so we can link back to the GitHub source __filename: true, __dirname: true }, resolve: { // Because we load devboard from a parent folder on the filesystem // we'd end up bundling its React devDependencies as well without this // In...
Remove unused import breaking build
Remove unused import breaking build
JavaScript
mit
glenjamin/devboard,glenjamin/devboard,glenjamin/devboard
300538779b4133a7f86603a20b78672a075872cd
test/indexTest.js
test/indexTest.js
'use strict'; var assert = require('chai').assert, fs = require('fs'), hartopage = require('../lib/index'); describe('index', function() { describe('#redirecting', function() { var har = JSON.parse(fs.readFileSync('test/files/aftonbladet.se-redirecting-to-www.har')); var page = hartopage.convert(har);...
'use strict'; var assert = require('chai').assert, fs = require('fs'), hartopage = require('../lib/index'); describe('index', function() { describe('#redirecting', function() { var page; before(function(done) { fs.readFile('test/files/aftonbladet.se-redirecting-to-www.har', 'utf-8', function(err...
Remove sync io from tests.
Remove sync io from tests.
JavaScript
mit
sitespeedio/snufkin,sitespeedio/pagexray,sitespeedio/HARtoPageSummary,sitespeedio/pagexray
11d5e81aa7e89f63b260d3db35a2bb1ba8ac3ccb
server/game/CardSelectors/ExactlyXCardSelector.js
server/game/CardSelectors/ExactlyXCardSelector.js
const BaseCardSelector = require('./BaseCardSelector.js'); class ExactlyXCardSelector extends BaseCardSelector { constructor(numCards, properties) { super(properties); this.numCards = numCards; } defaultActivePromptTitle() { if(this.cardType.length === 1) { return this...
const BaseCardSelector = require('./BaseCardSelector.js'); class ExactlyXCardSelector extends BaseCardSelector { constructor(numCards, properties) { super(properties); this.numCards = numCards; } defaultActivePromptTitle() { if(this.cardType.length === 1) { return this...
Fix ExactlyXCard Selector pretarget bug
Fix ExactlyXCard Selector pretarget bug
JavaScript
mit
jeremylarner/ringteki,gryffon/ringteki,jeremylarner/ringteki,gryffon/ringteki,gryffon/ringteki,jeremylarner/ringteki
6b61b01367ea660f46e54945074a587f820cd1f9
index.android.js
index.android.js
/** * Sample React Native App * https://github.com/facebook/react-native */ 'use strict'; import React, { AppRegistry, Component, StyleSheet } from 'react-native'; import Router from 'react-native-simple-router'; import ContestListScreen from './ContestListScreen'; class JumuNordost extends Component { ren...
/** * Sample React Native App * https://github.com/facebook/react-native */ 'use strict'; import React, { AppRegistry, Component, StyleSheet } from 'react-native'; import Router from 'react-native-simple-router'; import ContestListScreen from './ContestListScreen'; class JumuNordost extends Component { ren...
Add listener for hardware back button
Add listener for hardware back button
JavaScript
mit
richeterre/jumu-nordost-react-native,richeterre/jumu-nordost-react-native,richeterre/jumu-nordost-react-native,richeterre/jumu-nordost-react-native
53445827df23e0109864ca0b4f1e8dc05b8d55e0
src/app/calcFunctionality.js
src/app/calcFunctionality.js
export const myMax = (list) => { return Math.max(...list); }; const vowels = 'aeiouyAEIOUY'; export const vowelCount = (string) => { let count = 0; for (const c of string) { if (vowels.includes(c)) { count++; } } return count; }; export const reverse = (forward) => { let rev = ''; for (...
export const myMax = (list) => { return Math.max(...list); }; const vowels = 'aeiouyAEIOUY'; export const vowelCount = (string) => { let count = 0; for (const c of string) { if (vowels.includes(c)) { count++; } } return count; }; export const reverse = (forward) => { let rev = ''; for (...
Convert all strings/chars to Ints
Convert all strings/chars to Ints
JavaScript
mit
halhenke/js-study-sydney-calculator
274f1ba90717466bdca2732e935a6cd2e28c22c1
core/client/mixins/editor-base-controller.js
core/client/mixins/editor-base-controller.js
/* global console */ var EditorControllerMixin = Ember.Mixin.create({ //## Computed post properties isPublished: Ember.computed.equal('status', 'published'), isDraft: Ember.computed.equal('status', 'draft'), /** * By default, a post will not change its publish state. * Only with a user-set va...
/* global console */ var EditorControllerMixin = Ember.Mixin.create({ //## Computed post properties isPublished: Ember.computed.equal('status', 'published'), isDraft: Ember.computed.equal('status', 'draft'), /** * By default, a post will not change its publish state. * Only with a user-set va...
Fix Editor Save Button not allowing unpublish
Fix Editor Save Button not allowing unpublish Closes #2918
JavaScript
mit
daihuaye/Ghost,ryansukale/ux.ryansukale.com,Coding-House/Ghost,no1lov3sme/Ghost,greenboxindonesia/Ghost,letsjustfixit/Ghost,codeincarnate/Ghost,shrimpy/Ghost,kmeurer/Ghost,bosung90/Ghost,mayconxhh/Ghost,stridespace/Ghost,skmezanul/Ghost,trunk-studio/Ghost,BayPhillips/Ghost,SachaG/bjjbot-blog,thomasalrin/Ghost,notno/Gho...
5bf7c2640c49aee8f82a775fc70ec07ea42d570e
dist/js/schema.js
dist/js/schema.js
// // schema.js // app.schema = function() { // public methods function user(email, password) { var obj = {email: email, password: password}; return obj; } function book() { var obj = {authorFullName: null, title: null, subTitle: null, edition: null, ISBN: null, price:...
// // schema.js // app.schema = function() { // public methods function user(email, password) { var obj = {email: email, password: password}; return obj; } function book() { var obj = {authorFullName: null, title: null, subTitle: null, edition: null, ISBN: null, price:...
Revert "Added "condition" property and clearAllFormData()"
Revert "Added "condition" property and clearAllFormData()" This reverts commit 77e70b36553e8a334c246608413a4ef69009897a.
JavaScript
mit
celeryellery/BookIt,celeryellery/BookIt
4d4f56a3ef887e954c35fb23e79b69b0a6a89516
lib/cb.proxy.rpc/service.js
lib/cb.proxy.rpc/service.js
// Requires var Q = require('q'); var _ = require('underscore'); var request = require('request'); function ProxyRPCService() { _.bindAll(this); } ProxyRPCService.prototype.requests = function(args, meta) { var deferred = Q.defer(); var url = args.url; var method = args.method || "GET"; var options = { "...
// Requires var Q = require('q'); var _ = require('underscore'); var request = require('request'); function ProxyRPCService() { _.bindAll(this); } ProxyRPCService.prototype.requests = function(args, meta) { var deferred = Q.defer(); var url = args.url; var method = args.method || "GET"; var options = { "...
Add support for arg "body" in rpc method proxy/requests
Add support for arg "body" in rpc method proxy/requests
JavaScript
apache-2.0
ahmadassaf/Codebox,listepo/codebox,indykish/codebox,Ckai1991/codebox,lcamilo15/codebox,indykish/codebox,ronoaldo/codebox,rodrigues-daniel/codebox,nobutakaoshiro/codebox,kustomzone/codebox,rodrigues-daniel/codebox,quietdog/codebox,smallbal/codebox,CodeboxIDE/codebox,etopian/codebox,kustomzone/codebox,code-box/codebox,fl...
2134ef5591fc3c4f8d2fa57dc0e9a3e5e53837e4
src/business/UsersService.js
src/business/UsersService.js
'use strict'; const bcrypt = require('bcrypt-nodejs'); class UsersService { constructor(options, usersRepository) { const self = this; self._options = options; self.usersRepository = usersRepository; } getUserById(id, callback) { const self = this; self.usersRepository.findUserById(id, call...
'use strict'; const bcrypt = require('bcrypt-nodejs'); class UsersService { constructor(options, usersRepository) { const self = this; self._options = options; self.usersRepository = usersRepository; } getUserById(id, callback) { const self = this; self.usersRepository.findUserById(id, call...
Set user service to always create a display name if one is not supplied
Set user service to always create a display name if one is not supplied
JavaScript
mit
andrewaramsay/aramsay-server
ee4857368959bcf2eaaaf55df35211ea3e71dce7
utility/GameScreen.js
utility/GameScreen.js
/** @constructor */ PuzL.GameScreen = function( game ) { this.gameShell = null; this.parentScreen = null; }; //window['GameScreen'] = PuzL.GameScreen; PuzL.GameScreen.prototype.id = ""; PuzL.GameScreen.prototype.initialize = function() { }; PuzL.GameScreen.prototype.preload = function() { this.stage.disa...
/** @constructor */ PuzL.GameScreen = function( game ) { this.gameShell = null; this.parentScreen = null; }; //window['GameScreen'] = PuzL.GameScreen; PuzL.GameScreen.prototype.id = ""; PuzL.GameScreen.prototype.initialize = function() { }; PuzL.GameScreen.prototype.preload = function() { this.stage.disa...
Make sure the stage is always set to appropriate smoothed value.
Make sure the stage is always set to appropriate smoothed value.
JavaScript
mit
puzzud/puzl
b673005f7f70e68729d2c1bd4bdc76f9ba6c912a
services/controllers/calibration/js/Interpolator.js
services/controllers/calibration/js/Interpolator.js
class Interpolator { constructor() { this.data = []; } addIndexValue(index, value) { this.data.push({index: index, value: value}); // make sure items are in ascdending order by index //this.data.sort((a, b) => a.index - b.index); } valueAtIndex(target_index) { ...
class Interpolator { constructor() { this.data = []; } addIndexValue(index, value) { this.data.push({index: index, value: value}); // make sure items are in ascdending order by index //this.data.sort((a, b) => a.index - b.index); } valueAtIndex(target_index) { ...
Add ability to convert JS interpolater to an array
Add ability to convert JS interpolater to an array This is used when writing interpolator values to the python server
JavaScript
bsd-3-clause
gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2
d929927d43bd906a1f6b1ec07ee2a45aa716f06f
public/js/comment_display.js
public/js/comment_display.js
$(document).ready(function() { $("comment").hide $(".question").on("click" function(event){ event.preventDefault(); }) });
$(document).ready(function() { $(".comment").hide(); $(".question").on("click", function(event){ $(".comment").toggle(); }); });
Add toggle view of the comments of a question
Add toggle view of the comments of a question
JavaScript
mit
princesadie/hipster-overflow,princesadie/hipster-overflow,princesadie/hipster-overflow
f4c49b6fd069bb27f064d26a4c18476883507cad
test/spec/ControlSpec.js
test/spec/ControlSpec.js
describe('Creating custom map controls', function () { var map; beforeEach(function() { map = map || new GMaps({ el : '#basic-map', lat: -12.0433, lng: -77.0283, zoom: 12 }); }); it('should add default styles for the control', function () { map.addControl({ position: ...
describe('Creating custom map controls', function () { var map; beforeEach(function() { map = map || new GMaps({ el : '#basic-map', lat: -12.0433, lng: -77.0283, zoom: 12 }); }); it('should add default styles for the control', function () { map.addControl({ position: ...
Add unit test for the internal state after removing controls
Add unit test for the internal state after removing controls
JavaScript
mit
Matt-Jensen/gmaps-for-apps,Matt-Jensen/gmaps-for-apps
57797f83a74e437802be58091d71510a2de439a2
packages/npm/src/helpers.js
packages/npm/src/helpers.js
'use strict' /* @flow */ import Path from 'path' import FS from 'fs' export function exists(path: string): Promise<boolean> { return new Promise(function(resolve) { FS.access(path, function(error) { resolve(error === null) }) }) } export function versionFromRange(range: string): Array<string> { ...
'use strict' /* @flow */ import Path from 'path' import FS from 'fs' export function exists(path: string): Promise<boolean> { return new Promise(function(resolve) { FS.access(path, function(error) { resolve(error === null) }) }) } export function versionFromRange(range: string): Array<string> { ...
Make manifestPath search two level up
:art: Make manifestPath search two level up
JavaScript
mpl-2.0
motion/motion,flintjs/flint,flintjs/flint,flintjs/flint,motion/motion
739c1cd1ae164b165dee1c9a0b7d9aa15b765d7b
js/myapp/card.js
js/myapp/card.js
// ---------------------------------------------------------------- // Card Class class CardModel extends SwitchModel { constructor({ name, lsKeyView, triggerSelector, switchSelector, hash = null } = {}) { super({ name: name, lsKeyView: lsKeyView, triggerSelector: trigger...
// ---------------------------------------------------------------- // Card Class class CardModel extends SwitchModel { constructor({ name, lsKeyView, triggerSelector, switchSelector, hash = null } = {}) { super({ name: name, lsKeyView: lsKeyView, triggerSelector: trigger...
Change setUser() argument in CardController
Change setUser() argument in CardController
JavaScript
mit
AyaNakazawa/business_card_bank,AyaNakazawa/business_card_bank,AyaNakazawa/business_card_bank
ab3a071b0cd6d06cf8456ffd26c2d986192163cb
packages/foxman-helpers/lib/logger.js
packages/foxman-helpers/lib/logger.js
const Logger = require('chalklog'); const parrotSay = require('parrotsay-api'); function createLogger(scope) { const logger = new Logger(scope); return { info(msg) { logger.blue(msg); }, success(msg) { logger.green(msg); }, warn(msg) { ...
const os = require('os'); const Logger = require('chalklog'); const parrotSay = require('parrotsay-api'); function createLogger(scope) { const logger = new Logger(scope); return { info(msg) { logger.blue(msg); }, success(msg) { logger.green(msg); }, ...
Use raw console.log in win32 platform
refactor: Use raw console.log in win32 platform #169
JavaScript
mit
kaola-fed/foxman,kaola-fed/foxman,kaola-fed/foxman
e55a152763cf05190b16e492558296eddeb9ce7c
www/js/api-service.js
www/js/api-service.js
'use strict'; angular.module('myApp.apiService', []) .factory('Api', ['$http', function ($http) { return { login: function(user, onSuccess, onFailure) { $http.post("http://offerfans.ngrok.com/api/v1/auth/login", user) .success(onSuccess) ...
'use strict'; angular.module('myApp.apiService', []) .factory('Api', ['$http', function ($http) { return { env: 'development', options: { development: { url: "http://offerfans.ngrok.com", version: 'v1' }, staging: { url: "https://stg.offer...
Add different api urls for staging and production
Add different api urls for staging and production
JavaScript
apache-2.0
kewan/OfferFansScanner
b31812ca99c2ff49c51c540411716eeb765973a0
docs/src/index.js
docs/src/index.js
import React from 'react'; import ReactDOM from 'react-dom'; import { Router } from 'react-router'; import createBrowserHistory from 'history/createBrowserHistory'; import './index.css'; import App from './App'; import registerServiceWorker from './registerServiceWorker'; const history = createBrowserHistory(); histo...
import React from 'react'; import ReactDOM from 'react-dom'; import { Router } from 'react-router'; import createBrowserHistory from 'history/createBrowserHistory'; import './index.css'; import App from './App'; import registerServiceWorker from './registerServiceWorker'; window.__MUI_USE_NEXT_TYPOGRAPHY_VARIANTS__ =...
Remove warning on deprecated mui typography variants
Remove warning on deprecated mui typography variants
JavaScript
mit
mui-org/material-ui,callemall/material-ui,mbrookes/material-ui,callemall/material-ui,rscnt/material-ui,oliviertassinari/material-ui,oliviertassinari/material-ui,mui-org/material-ui,mui-org/material-ui,rscnt/material-ui,callemall/material-ui,dmtrKovalenko/material-ui-pickers,dmtrKovalenko/material-ui-pickers,callemall/m...
98a4a94867843fd8c94eedc46f544fcaf27b6cfb
modules/feature/file-templates/templates/js-mode/__webpack.config.js
modules/feature/file-templates/templates/js-mode/__webpack.config.js
module.exports = { entry: [ ${1:'./app/main.js'} ], output: { path: __dirname + '/dist', filename: "app.bundle.js" }, module: { loaders: [ { test: /\.js$/, include: __dirname + '/app', loader: 'babel-loader' }$0 ] } // plugins: [] };
module.exports = { entry: [ ${1:'./app/main.js'} ], output: { path: __dirname + '/dist', filename: "app.bundle.js" }, module: { rules: [ { test: /\.js$/, exclude: /node_modules/, use: { loader: "b...
Update webpack file template for latest version
Update webpack file template for latest version Webpack 4 has some syntax changes, mainly using rules key instead of plugin.
JavaScript
mit
hlissner/.emacs.d,hlissner/doom-emacs,hlissner/doom-emacs,UndeadKernel/emacs_doom,hlissner/doom-emacs,hlissner/doom-emacs,hlissner/.emacs.d,hlissner/.emacs.d,UndeadKernel/emacs_doom,hlissner/.emacs.d,hlissner/.emacs.d,hlissner/.emacs.d,UndeadKernel/emacs_doom,hlissner/.emacs.d,UndeadKernel/emacs_doom,hlissner/doom-emac...
d6872d237317687d12279f4cd55ce1e4ed1ee5b0
tests/banks.js
tests/banks.js
import { expect } from 'chai'; import NBG from '../src/banks/NBG'; import CreditAgricole from '../src/banks/CreditAgricole'; import CBE from '../src/banks/CBE'; const { describe, it } = global; const banks = [ NBG, CreditAgricole, CBE, ]; describe('Banks', () => { banks.forEach((Bank) => { const bank = ...
import { expect } from 'chai'; import NBG from '../src/banks/NBG'; import CreditAgricole from '../src/banks/CreditAgricole'; import CBE from '../src/banks/CBE'; const { describe, it } = global; const banks = [ NBG, CreditAgricole, CBE, ]; describe('Banks', () => { banks.forEach((Bank) => { const bank = ...
Test code and buy properties
Test code and buy properties
JavaScript
mit
MMayla/egypt-banks-scraper
5e74ed21a36a3b75607c925bd5874b0617436ce4
tests/index.js
tests/index.js
require('babel-polyfill'); // require all test files matching 'lib/**/tests/*-test' const requireTest = require.context('../lib/', true, /(.*?)\/tests\/(.*?)-test/); requireTest.keys().forEach(requireTest);
require('babel-polyfill'); // require all test files matching 'lib/**/tests/*-test' const requireTest = require.context('../lib/', true, /(.*?)\/tests\/(.*?)-test/); requireTest.keys().forEach(requireTest); // require all source files in lib for code coverage (except Pluggable) const componentsContext = require.conte...
Load all files for coverage reporting
Load all files for coverage reporting
JavaScript
apache-2.0
folio-org/stripes-components,folio-org/stripes-components
9fbcaedd31760e2f1f7a4d5f4201a86628bdaf66
src/reducers/initialState.js
src/reducers/initialState.js
import { List, Map, fromJS } from 'immutable'; import moment from 'moment'; export const initialTask = fromJS({ waypoints: [ { name: 'Bicester Airfield', position: { lat: 51.9203333333333, lng: -1.13141666666667 } }, { name: 'Bidford', position: { lat...
import { Map, fromJS } from 'immutable'; export const initialTask = fromJS({ waypoints: [ { name: 'Bicester Airfield', position: { lat: 51.9203333333333, lng: -1.13141666666667 } }, { name: 'Bidford', position: { lat: 51.9203333333333, lng: -1...
Remove unused constants from initial state.
Remove unused constants from initial state.
JavaScript
mit
alistairmgreen/soaring-analyst,alistairmgreen/soaring-analyst
65dcd0b7903ac3719bc2905e1c2ae2c52e3b7ef0
web/app/scripts/services/managers/resultsManager.js
web/app/scripts/services/managers/resultsManager.js
'use strict'; angular .module('irma') .factory('resultsManager', resultsManager); resultsManager.$inject = ['$http', '$q', '$log', 'Result']; function resultsManager($http, $q, $log, Result) { return { getResult: getResult }; function _load(scanId, resultId, deferred) { $http.get('/_api/scan/' + ...
'use strict'; angular .module('irma') .factory('resultsManager', resultsManager); resultsManager.$inject = ['$q', '$log', 'Result', 'bridge']; function resultsManager($q, $log, Result, bridge) { return { getResult: getResult }; function _load(scanId, resultId, deferred) { bridge.get({url: '/scan/...
Remove , use bridge instead
Remove , use bridge instead
JavaScript
apache-2.0
hirokihamasaki/irma,hirokihamasaki/irma,deloittem/irma-frontend,hirokihamasaki/irma,quarkslab/irma,quarkslab/irma,hirokihamasaki/irma,quarkslab/irma,deloittem/irma-frontend,quarkslab/irma,deloittem/irma-frontend,deloittem/irma-frontend,hirokihamasaki/irma
3648c69a9d98cbba324f5061c6fb15a6c286f57d
test/integration/helper-functions/handle-errors.js
test/integration/helper-functions/handle-errors.js
'use strict' module.exports = function handleErrors(err, stats, done) { if (err) { console.error(err.stack || err) if (err.details) { console.error(err.details) } done(err) return } const info = stats.toJson() if (stats.hasErrors()) { console.error(info.errors) done(info.err...
'use strict' function concatChildProps(parent, property) { let children = parent.children || [] let childProps = children.map(c => concatChildProps(c, property)) return Array.prototype.concat.apply(parent[property] || [], childProps) } module.exports = function handleErrors(err, stats, done) { if (err) { ...
Include child-compilation errors when handling test errors
Include child-compilation errors when handling test errors when `stats.hasErrors()` returns true, we might have errors in `info.errors`, or we might have them in, say, `info.children[0].errors`
JavaScript
mit
GProst/webpack-clean-obsolete-chunks
0677d948bab44913986f716446ecbf99b023752e
src/components/TestCardNumber.js
src/components/TestCardNumber.js
import React, { Component } from 'react'; import Popover from 'material-ui/Popover'; import { faintBlack, cyan500 } from 'material-ui/styles/colors'; import ActionHelpOutline from 'material-ui/svg-icons/action/help-outline'; const TEST_CARD_NUMBER = '01-2167-30-92545'; export default class TestCardNumber extends Comp...
import React, { Component } from 'react'; import { faintBlack, cyan500 } from 'material-ui/styles/colors'; import MenuItem from 'material-ui/MenuItem'; import IconMenu from 'material-ui/IconMenu'; import IconButton from 'material-ui/IconButton/IconButton'; import ActionHelpOutline from 'material-ui/svg-icons/action/hel...
Use dropdown list for test data.
Use dropdown list for test data.
JavaScript
apache-2.0
blobor/skipass.site,blobor/skipass.site,blobor/buka,blobor/buka
67582f73918b004160560bb670ff6b466c501d10
ui/shared/lti/jquery/post_message/messageTypes.js
ui/shared/lti/jquery/post_message/messageTypes.js
/* * Copyright (C) 2019 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distribut...
/* * Copyright (C) 2019 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distribut...
Add Mentions Post MessageTypes to whitelist
Add Mentions Post MessageTypes to whitelist fixes VICe-1925 Test Plan 1. With an LTI enabled on discussions, pull down the change 2. Validate that Discussions has Redesign and Mentions FF enabled 3. Trigger a discussion with @ and navigate with up and down arrows 4. No error messages involving messageType should be i...
JavaScript
agpl-3.0
instructure/canvas-lms,sfu/canvas-lms,instructure/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,instructure/canvas-lms,instructure/canvas-lms,instructure/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,instructure/canvas-lms,instructure/canvas-lms,sfu/canvas-lms
a85612b57a4ab0f5a4560cffbf9e31bd156ce0a7
lib/index.js
lib/index.js
"use strict"; var cass = require('cassandra-driver'); var DB = require('./db'); function promisifyClient (client, options) { var methods = ['connect', 'shutdown', 'execute', 'batch']; methods.forEach(function(method) { //console.log(method, client[method]); client[method + '_p'] = Promise.prom...
"use strict"; var cass = require('cassandra-driver'); var DB = require('./db'); Promise.promisifyAll(cass, { suffix: '_p' }); function makeClient (options) { var clientOpts = {}; var conf = options.conf; clientOpts.keyspace = conf.keyspace || 'system'; clientOpts.contactPoints = conf.hosts; if (c...
Simplify the cassandra client setup
Simplify the cassandra client setup - The connection is now maintained implicitly. There is no need to handle reconnecting manually. - We can use promisifyAll instead of doing this manually.
JavaScript
apache-2.0
eevans/restbase-mod-table-cassandra,gwicke/restbase-mod-table-cassandra
cc1b7aa909f2ed9ce9087124fd015f9b8f071f7d
client/interface.js
client/interface.js
/** * Chat interface * really really simple, but im not sure what else to add for now? **/ const Callback = require('events'); const readline = require('readline'); class QuestionCallback extends Callback {} class Display extends Callback { constructor() { super(); this.cli = readline.createInterface({ ...
/** * Chat interface * really really simple, but im not sure what else to add for now? **/ const Callback = require('events'); const readline = require('readline'); class QuestionCallback extends Callback {} class Display extends Callback { constructor() { super(); this.cli = readline.createInterface({ ...
Fix prompt arrow on backspace
Fix prompt arrow on backspace
JavaScript
mit
PokerDaddy/scaling-potato,PokerDaddy/scaling-potato
e5de73619399277b0d1cc45193c611f8ef007cf4
app/_reducers/PortfolioReducers.js
app/_reducers/PortfolioReducers.js
import { Map, fromJS } from 'immutable'; import { SERVER_DATA_PORTFOLIO, SERVER_DATA_PROPOSAL_OPEN_CONTRACT, DETAILS_FOR_CONTRACT, } from '../_constants/ActionTypes'; const initialState = new Map({ detailsShown: false, contractShown: undefined, contracts: [], }); export default (state = initi...
import { Map, fromJS } from 'immutable'; import { SERVER_DATA_PORTFOLIO, SERVER_DATA_PROPOSAL_OPEN_CONTRACT, DETAILS_FOR_CONTRACT, } from '../_constants/ActionTypes'; const initialState = new Map({ detailsShown: false, contractShown: undefined, contracts: [], }); export default (state = initi...
Handle incoming contract proposal updates
Handle incoming contract proposal updates
JavaScript
mit
nuruddeensalihu/binary-next-gen,nuruddeensalihu/binary-next-gen,qingweibinary/binary-next-gen,qingweibinary/binary-next-gen,nazaninreihani/binary-next-gen,nazaninreihani/binary-next-gen,qingweibinary/binary-next-gen,binary-com/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary-next-gen,binary-com/bin...
4b74b75a0e7212593fe4e5785d8dd1d75dd3ae07
app/assets/javascripts/calendar.js
app/assets/javascripts/calendar.js
var calendar; $(document).ready(function() { var calendar_container = document.getElementById('calendar'); if (!calendar_container) { return } calendar = new FullCalendar.Calendar(calendar_container, { 'events': 'assignments.json', 'startParam': 'start_date', 'endParam': 'end_date', 'dayCellClass...
var calendar; $(document).ready(function() { var calendar_container = document.getElementById('calendar'); if (!calendar_container) { return } calendar = new FullCalendar.Calendar(calendar_container, { 'initialDate': sessionStorage.getItem('lastDate') || null, 'events': 'assignments.json', 'startPara...
Store date when viewing a month
Store date when viewing a month
JavaScript
mit
umts/screaming-dinosaur,umts/screaming-dinosaur,umts/screaming-dinosaur
7f6cdd350a2e410931012ba1cad4749a53be079e
packages/fela-tools/src/__tests__/checkFontFormat-test.js
packages/fela-tools/src/__tests__/checkFontFormat-test.js
import checkFontFormat from '../checkFontFormat' describe('Checking the font format', () => { it('should return the correct format', () => { expect(checkFontFormat('foo.ttf')).toEqual('truetype') expect(checkFontFormat('foo.eot')).toEqual('embedded-opentype') }) it('should return an empty string', () =>...
import checkFontFormat from '../checkFontFormat' describe('Checking the font format', () => { it('should return the correct format', () => { expect(checkFontFormat('foo.ttf')).toEqual('truetype') expect(checkFontFormat('foo.eot')).toEqual('embedded-opentype') expect(checkFontFormat('data:application/x-fo...
Add test for base64 encoded fonts
Add test for base64 encoded fonts
JavaScript
mit
as-com/alef,derek-duncan/fela,derek-duncan/fela,rofrischmann/fela,risetechnologies/fela,RafalFilipek/fela,risetechnologies/fela,as-com/alef,derek-duncan/fela,risetechnologies/fela,derek-duncan/fela,rofrischmann/fela,rofrischmann/fela,RafalFilipek/fela,RafalFilipek/fela,RafalFilipek/fela,as-com/alef,RafalFilipek/fela,de...
2b89d59c5252baa4abbff9f59ae6dc8441e9b5d1
client/templates.js
client/templates.js
function getCurrentUserEmail() { var currentUser = Meteor.user(); var emailsArray = currentUser.emails; var firstEmail = emailsArray[0]; return firstEmail.address; } Template.skills.helpers({ hasSkills: function () { var skillService = new SkillService(); var skillsArray = skillServ...
function getCurrentUserEmail() { var currentUser = Meteor.user(); var emailsArray = currentUser.emails; var firstEmail = emailsArray[0]; return firstEmail.address; } Template.skills.helpers({ hasSkills: function () { var skillService = new SkillService(); var skillsArray = skillServ...
Clear input value after submission
Clear input value after submission
JavaScript
unlicense
folkengine/ducking-nemesis,folkengine/ducking-nemesis
fcf2a6423fcff0754943237e52044e08e8cce097
typographic.js
typographic.js
module.exports = function(opts) { var implicit = (opts && opts.implicit == false) ? false : true; return function(style){ style.include(__dirname); if (implicit) { style.import('typographic'); } } }
module.exports = function(opts) { return function(style) { style.include(__dirname); } }
Disable implicit import by default
Disable implicit import by default This way we can override settings: https://github.com/LearnBoost/stylus/issues/1392
JavaScript
mit
aoimedia/typographic,ganlanyuan/typographic,corysimmons/typographic,FranzSkuffka/typographic
1836b0017c4f081336dc81ba6bbe81a657f5e031
app/serializers/section.js
app/serializers/section.js
import DS from "ember-data"; export default DS.RESTSerializer.extend({ serialize: function(section) { var bounds = section.get('bounds'), json = { title: section.get('title'), page_ordinal: section.get('pageOrdinal'), bounds: { x: bounds.x, y: bounds...
import DS from "ember-data"; export default DS.RESTSerializer.extend({ normalize: function(type, hash, prop) { hash.bounds = hash.bounds || {x: 0, y: 0, width: 1, height: 1}; return this._super(type, hash, prop); }, serialize: function(section) { var bounds = section.get('bounds'), json = { ...
Add default bounds value if missing
Add default bounds value if missing
JavaScript
mit
artzte/fightbook-app
27283b54c5460fceb3bbd13aee32e671f2efded2
commands/fun/cat.js
commands/fun/cat.js
/** * @file cat command * @author Sankarsan Kampa (a.k.a k3rn31p4nic) * @license GPL-3.0 */ const request = xrequire('request-promise-native'); exports.exec = async (Bastion, message) => { try { let options = { method: 'HEAD', url: 'https://thecatapi.com/api/images/get', followAllRedirects...
/** * @file cat command * @author Sankarsan Kampa (a.k.a k3rn31p4nic) * @license GPL-3.0 */ const request = xrequire('request-promise-native'); exports.exec = async (Bastion, message) => { try { let options = { method: 'HEAD', url: 'https://thecatapi.com/api/images/get', followAllRedirects...
Update code to use promises
Update code to use promises
JavaScript
mit
snkrsnkampa/Bastion,snkrsnkampa/Bastion
bd2ff09c4fb224c7db41e83edbf1a03c0604336c
addons/docs/src/frameworks/ember/jsondoc.js
addons/docs/src/frameworks/ember/jsondoc.js
/* eslint-disable no-underscore-dangle */ /* global window */ export const setJSONDoc = jsondoc => { window.__EMBER_GENERATED_DOC_JSON__ = jsondoc; }; export const getJSONDoc = () => { return window.__EMBER_GENERATED_DOC_JSON__; }; export const extractProps = componentName => { const json = getJSONDoc(); cons...
/* eslint-disable no-underscore-dangle */ /* global window */ export const setJSONDoc = jsondoc => { window.__EMBER_GENERATED_DOC_JSON__ = jsondoc; }; export const getJSONDoc = () => { return window.__EMBER_GENERATED_DOC_JSON__; }; export const extractProps = componentName => { const json = getJSONDoc(); cons...
FIX ember docs generation if the component parameter is missing (for whatever reason)
FIX ember docs generation if the component parameter is missing (for whatever reason)
JavaScript
mit
storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook
88b7042541e6e7b2fd952e2b5639e1cc9a203707
responses/create.js
responses/create.js
'use strict'; const AWS = require('aws-sdk'); const dynamoDb = new AWS.DynamoDB.DocumentClient(); const validateResponses = function(responsesList) { if (!(Array.isArray(questionList))) return false; for (var i=0; i < responsesList.length; i++) { if (typeof responsesList[i].question !== 'string' || ...
'use strict'; const AWS = require('aws-sdk'); const dynamoDb = new AWS.DynamoDB.DocumentClient(); const validateResponses = function(responsesList) { if (!(Array.isArray(responsesList))) return false; for (var i=0; i < responsesList.length; i++) { if (typeof responsesList[i].question !== 'string' || ...
Align validation. Only allow one response. Fix variable name, Include hash key in row insertion
Align validation. Only allow one response. Fix variable name, Include hash key in row insertion
JavaScript
mit
Vortexmind/survey-api-sls-aws
650e4e0b2cae353458ace9f427ebe4f2dc6fc1f6
app/components/ProductCarousel/index.js
app/components/ProductCarousel/index.js
/** * * ProductCarousel.js * */ import React from 'react'; import 'style!css!./ProductCarousel.css'; class ProductCarousel extends React.Component { constructor(props) { super(props); this.state = { selectedItem: 0, }; this.updateImage = this.updateImage.bind(this); } updateImage(newI...
/** * * ProductCarousel.js * */ import React from 'react'; import 'style!css!./ProductCarousel.css'; class ProductCarousel extends React.Component { constructor(props) { super(props); this.state = { selectedItem: 0, }; this.updateImage = this.updateImage.bind(this); } updateImage(newI...
Make links work in ProductCarousel
Make links work in ProductCarousel
JavaScript
mit
ajfuller/react-casestudy,ajfuller/react-casestudy
6e8b7d5e7c09bf1d14058731473b84e76684e8d2
test/dom/test/basics.spec.js
test/dom/test/basics.spec.js
/** * Basics */ describe('Basics', () => { beforeEach(beforeEachHook); afterEach(afterEachHook); /** * Absolute tracking */ it('absolute tracking', async () => { let times = 0; const targetOne = createTarget({ marginLeft: '-30px' }); const targetTwo = createTarget({ marginTop: '30px' }); ...
/** * Basics */ describe('Basics', () => { beforeEach(beforeEachHook); afterEach(afterEachHook); /** * Absolute tracking */ it('absolute tracking', async () => { let times = 0; let poolCopy; const targetOne = createTarget({ marginLeft: '-30px' }); const targetTwo = createTarget({ margin...
Test (basics): Require target being in the tracked pool
Test (basics): Require target being in the tracked pool
JavaScript
mit
kettanaito/sentinel-dom,kettanaito/sentinel-dom,kettanaito/sentinel-dom
fa72208049819bcce22bdf6e680f2084dc0eb952
src/Components/CommandBar.js
src/Components/CommandBar.js
import React from 'react'; import './CommandBar.css'; export default class CommandBar extends React.Component { onTextChange(eventArgs) { const { onCommandChange } = this.props; if (eventArgs.keyCode === 13) { //return onCommandChange(this.refs.commandText.value); } } render() { const { co...
import React from 'react'; import './CommandBar.css'; export default class CommandBar extends React.Component { onTextChange(eventArgs) { const { onCommandChange } = this.props; if (eventArgs.keyCode === 13) { //return onCommandChange(this.refs.commandText.value); this.refs.commandText.value = '...
Reset commandbar input after pressing return
Reset commandbar input after pressing return
JavaScript
mit
schultyy/spreadsheet,schultyy/spreadsheet
887bcda1448d1f60f9b28524928377e6341bccd1
client/index.js
client/index.js
Template.home.rendered = function() { // Probably erroneous way to clear the previous Famous canvas. // But it works. var mainContext = Engine.createContext(); var contentView = new Scrollview({ size: [undefined, undefined] }); window.content = new Surface({ size: [undefined, undefined], conte...
Template.home.rendered = function() { // Probably erroneous way to clear the previous Famous canvas. // But it works. var mainContext = Engine.createContext(); var contentView = new Scrollview(); var content = new Surface({ size: [undefined, undefined], content: UI.render(Template.homecontent).rende...
Fix homepage scrolling. Can’t test on phone just now, but it should be fine.
Fix homepage scrolling. Can’t test on phone just now, but it should be fine.
JavaScript
mit
tvararu/meteor-famous-playground,tvararu/meteor-famous-playground
e5ccf0ad46c242f382837685acc351d7e40a3d54
webpack.config.js
webpack.config.js
/* eslint-disable @typescript-eslint/no-var-requires */ "use strict"; var resolve = require("path").resolve; var webpack = require("webpack"); module.exports = { mode: "production", entry: ["regenerator-runtime/runtime", resolve(__dirname, "src/web.js")], devtool: "source-map", output: { path: resolve(__di...
/* eslint-disable @typescript-eslint/no-var-requires */ "use strict"; var resolve = require("path").resolve; var webpack = require("webpack"); module.exports = { mode: "production", entry: ["regenerator-runtime/runtime", resolve(__dirname, "src/web.js")], devtool: "source-map", output: { path: resolve(__di...
Fix webpack 5 library type
Fix webpack 5 library type
JavaScript
apache-2.0
arangodb/arangojs,arangodb/arangojs
28e3fc7a0e31e0928965bac34b7447547bf8577d
webpack.config.js
webpack.config.js
var path = require('path'); var webpack = require('webpack'); module.exports = { devtool: 'eval', entry: [ 'webpack-dev-server/client?http://localhost:3000', 'webpack/hot/only-dev-server', './src/index' ], output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js', publicPath: ...
var path = require('path'); var webpack = require('webpack'); module.exports = { devtool: 'eval', entry: [ 'webpack-dev-server/client?http://localhost:3000', 'webpack/hot/only-dev-server', './src/index' ], output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js', publicPath: ...
Fix babel loader to specify react as a preset
Fix babel loader to specify react as a preset
JavaScript
mit
codeforamerica/nyc-january-project,codeforamerica/nyc-january-project
5fc5c85d04c0f39395603e460f78e4a7fd3fbf18
js/rentroll.js
js/rentroll.js
/*jslint browser: true*/ /*globals $, FB, gapi, fbLogin, setSettings, gGetEmail*/ "use strict"; function populateRentRoll(email) { if (email === '') { console.log("populateRentRoll - empty email!"); return; } $.ajax({ url: '/tenants', data: { 'email': email }, succe...
/*jslint browser: true*/ /*globals $, FB, gapi, fbLogin, setSettings, gGetEmail*/ "use strict"; function populateRentRoll(email) { if (email === '') { console.log("populateRentRoll - empty email!"); return; } $.ajax({ url: '/tenants', data: { 'email': email }, succe...
Add blank (g, fb)RentRollTemplate js functions
Add blank (g, fb)RentRollTemplate js functions
JavaScript
mit
bjwbell/renroll,bjwbell/renroll,bjwbell/renroll,bjwbell/renroll
b654b05a31a6a3a96411afb7f33aae1906a691d9
src/Scenes/InventoryScene.js
src/Scenes/InventoryScene.js
import React from 'react' import InventoryContainer from '../containers/InventoryContainer' import ShadowBox from '../Components/ShadowBox' import FlexDiv from '../Components/FlexDiv' const InventoryBox = ShadowBox.extend` width:100%; margin:10px; ` const InventoryDiv = FlexDiv.extend` width:50%; margin-top: ...
import React from 'react' import InventoryContainer from '../containers/InventoryContainer' import ShadowBox from '../Components/ShadowBox' import FlexDiv from '../Components/FlexDiv' const InventoryBox = ShadowBox.extend` width:100%; margin:10px; ` const InventoryDiv = FlexDiv.extend` width:50%; margin-top: ...
Add links to idvidual inventory scenes
Add links to idvidual inventory scenes
JavaScript
mit
severnsc/brewing-app,severnsc/brewing-app
b23bbbb7d751746edc6843bb992b9a130cfb7002
example/app/view/editor/Panel.js
example/app/view/editor/Panel.js
/*jslint browser: true, undef: true *//*global Ext*/ Ext.define('JarvusAceDemo.view.editor.Panel', { extend: 'Ext.Panel', xtype: 'editor-panel', requires: [ 'Jarvus.ace.Editor' ], layout: 'fit', items: [{ xtype: 'jarvus-ace-editor', // Ace configuration option...
/*jslint browser: true, undef: true *//*global Ext*/ Ext.define('JarvusAceDemo.view.editor.Panel', { extend: 'Ext.Panel', xtype: 'editor-panel', requires: [ 'Jarvus.ace.Editor' ], layout: 'fit', items: [{ xtype: 'jarvus-ace-editor', // subcribe to ACE events s...
Update example to reflect configuration changes
Update example to reflect configuration changes
JavaScript
mit
JarvusInnovations/jarvus-ace,JarvusInnovations/jarvus-ace
36ac557ad7143f84873f8810448428fa31412848
lib/commands/join.js
lib/commands/join.js
var request = require('request'), RoomStream = require('../room-stream'); module.exports = function (room) { console.log("Joining room " + room + "..."); request.get('https://streaming.campfirenow.com/room/' + room + '/live.json') .auth('aba80bf92dc8adb1fe7eb438b3bf8c688de1df1b', 'X') .pip...
var request = require('request'), RoomStream = require('../room-stream'); module.exports = function (room) { console.log("Joining room " + room + "..."); request.get('https://streaming.campfirenow.com/room/' + room + '/live.json') .auth('aba80bf92dc8adb1fe7eb438b3bf8c688de1df1b', 'X') .pip...
Send messages from stdin to campfire room.
Send messages from stdin to campfire room.
JavaScript
bsd-3-clause
kelveden/streamfire
670f3e9da704559e900bd561d126fadcdf8b556d
frontend/src/components/chat/body/ChatMessageList.js
frontend/src/components/chat/body/ChatMessageList.js
import React, { Component } from 'react'; import ChatMessage from './ChatMessage'; import Scroll from 'react-scroll'; class ChatMessageList extends Component { getMessages = () => { return this.props.messages.map((message, index) => { return <ChatMessage key={index} message={message} person={me...
import React, { Component } from 'react'; import ChatMessage from './ChatMessage'; import Scroll from 'react-scroll'; class ChatMessageList extends Component { getMessages = () => { return this.props.messages.map((message, index) => { return <ChatMessage key={index} message={message} person={me...
Set scrolling duration to 0
Set scrolling duration to 0
JavaScript
mit
dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet
78c0581ba52e5ddfd4e6f5ff13df29cd75cf0b21
imports/ui/components/giveaways/nearby-giveaways.js
imports/ui/components/giveaways/nearby-giveaways.js
import React from 'react'; import { List, ListItem } from 'material-ui/List'; import Divider from 'material-ui/Divider'; import Subheader from 'material-ui/Subheader'; import Avatar from 'material-ui/Avatar'; import * as Helper from '../../../util/helper'; import * as Colors from 'material-ui/styles/colors'; const gi...
import React from 'react'; import { List, ListItem } from 'material-ui/List'; import Divider from 'material-ui/Divider'; import Subheader from 'material-ui/Subheader'; import Avatar from 'material-ui/Avatar'; import * as Helper from '../../../util/helper'; import * as AvatarHelper from '../../../util/avatar'; import *...
Add avatars for in nearby giveaway sidebar
Add avatars for in nearby giveaway sidebar
JavaScript
mit
irvinlim/free4all,irvinlim/free4all
bbdc05af2c8f26fb8553fa4dc79b786805977ed5
webpack.production.config.js
webpack.production.config.js
var path = require('path'); var webpack = require('webpack'); module.exports = { devtool: 'cheap-module-source-map', entry: [ 'webpack-dev-server/client?http://localhost:3000', 'webpack/hot/only-dev-server', './src/index' ], output: { path: path.join(__dirname, 'dist/static'), filename: 'bu...
var path = require('path'); var webpack = require('webpack'); module.exports = { devtool: 'cheap-module-source-map', entry: [ './src/index' ], output: { path: path.join(__dirname, 'dist/static'), filename: 'bundle.js', publicPath: '/static/' }, plugins: [ new webpack.HotModuleReplacemen...
Remove hot reloading and dev server for production deployment.
Remove hot reloading and dev server for production deployment.
JavaScript
bsd-3-clause
FiviumAustralia/RNSH-Pilot,FiviumAustralia/RNSH-Pilot,FiviumAustralia/RNSH-Pilot
8bc7dca1a1545dd55f20a1e8aec0678b77831b22
web/sites/all/themes/custom/lectionary_bootstrap/js/songbook_refs.js
web/sites/all/themes/custom/lectionary_bootstrap/js/songbook_refs.js
(function ($) { $(function() { /** * Adds links to songbook references on song pages. */ $( "div.field-name-field-songbook-references > div > div" ).wrap(function() { // return "<a href='/songbook/" + $( this ).contents().text().replace(/([A-Z].*)(\s|\-)([0-9].*)/, '$1...
(function ($) { $(function() { /** * Adds links to songbook references on song pages. */ $( "div.field-name-field-songbook-references > div > div" ).wrap(function() { return "<a href='/songbook/" + $( this ).contents().text().replace(/([A-Z].*)(\s|\-)([0-9].*)/, '$1') ...
Change jQuery for songbook references to use clean urls.
Change jQuery for songbook references to use clean urls.
JavaScript
mit
claudinec/singingfromthelectionary,claudinec/singingfromthelectionary,claudinec/singingfromthelectionary,claudinec/singingfromthelectionary
ab0ee453d7385484106de7a79baa86caceaba05f
lib/api/com.js
lib/api/com.js
var $ = require('zepto-browserify').$; var name = '.COM API'; var baseUrl = 'https://public-api.wordpress.com/rest/'; function getRequestUrl(request) { var version = request.version || 'v1'; return baseUrl + version + request.path; } function getDiscoveryUrl(version) { return baseUrl + version + '/help'; } f...
var $ = require('zepto-browserify').$; var name = '.COM API'; var baseUrl = 'https://public-api.wordpress.com/rest/'; function getRequestUrl(request) { var version = request.version || 'v1'; return baseUrl + version + request.path; } function getDiscoveryUrl(version) { return baseUrl + version + '/help'; } f...
Remove arrow function to fix the build
Remove arrow function to fix the build events.js:165 throw err; ^ Error: Uncaught, unspecified "error" event. (SyntaxError: Unexpected token: operator (>) while parsing file: [...]/lib/api/com.js (line: 27, col: 53, pos: 695) Error at new JS_Parse_Error (eval at <anonymous> ([...]/node_modules/uglify...
JavaScript
mit
HamptonParkhp2w/Marong,Hamiltonz6x6/Dungog,Gawlerydyh/Geelong,Hamiltonz6x6/Dungog,Alexandriabez1/Gordon,Oatlandsuvdi/Mentone,Harveypahl/Beachmere,Vermontnapk/Silverwater,Oxleylrej/RingwoodEast,Automattic/rest-api-console2,PortMacquarieghp4/Revesby,Tuggeranongyqe2/Belair,paltasipse/stehnd,Redfernyrzj/Lilydale,Richmondfk...
88523d62cbff561526d107f64a60d30aa7551b0e
lib/services/ec2.js
lib/services/ec2.js
var AWS = require('../core'); AWS.EC2 = AWS.Service.defineService('ec2', ['2013-06-15*', '2013-07-15*', '2013-08-15*', '2013-10-01*', '2013-10-15'], { setupRequestListeners: function setupRequestListeners(request) { request.removeListener('extractError', AWS.EventListeners.Query.EXTRACT_ERROR); request.addLi...
var AWS = require('../core'); AWS.EC2 = AWS.Service.defineService('ec2', ['2013-06-15*', '2013-07-15*', '2013-08-15*', '2013-10-01*', '2013-10-15'], { /** * @api private */ setupRequestListeners: function setupRequestListeners(request) { request.removeListener('extractError', AWS.EventListeners.Query.EXT...
Add @api private on private EC2 methods
Add @api private on private EC2 methods
JavaScript
apache-2.0
jeskew/aws-sdk-js,prestomation/aws-sdk-js,prestomation/aws-sdk-js,GlideMe/aws-sdk-js,ugie/aws-sdk-js,beni55/aws-sdk-js,beni55/aws-sdk-js,jmswhll/aws-sdk-js,ugie/aws-sdk-js,odeke-em/aws-sdk-js,Blufe/aws-sdk-js,AdityaManohar/aws-sdk-js,mohamed-kamal/aws-sdk-js,LiuJoyceC/aws-sdk-js,j3tm0t0/aws-sdk-js,dconnolly/aws-sdk-js,...
ff2c8945a8bd46be483e49f7a1eb7e143e76d6cb
app/js/devit-custom.js
app/js/devit-custom.js
(function($){ "use strict"; var url = "http://devitconf.org/"; var devit = { init: function () { devit.getSocialCounts(); devit.setCurrentYear(); }, getSocialCounts: function () { $.getJSON( "http://urls.api.twitter.com/1/urls/count.json?url=" + url + "&callback=?", ...
(function($){ "use strict"; var url = "http://devitconf.org/"; var devit = { init: function () { devit.getSocialCounts(); devit.setCurrentYear(); }, getSocialCounts: function () { $.getJSON( "http://urls.api.twitter.com/1/urls/count.json?url=" + url + "&callback=?", ...
Add support for abbreviating share numbers larger than 9999
Add support for abbreviating share numbers larger than 9999
JavaScript
mit
skgtech/devit,skgtech/devit,skgtech/devit
bb5a1fb32a82a8b165fa0d830c05d6a7769a6674
lib/ui/widgetrow.js
lib/ui/widgetrow.js
var rb = require('react-bootstrap'); var React = require('react'); var _ = require('lodash'); var Table = rb.Table, tr = rb.tr, td =rb.td, form = rb.form, Input = rb.Input; var WidgetRow = React.createClass({ render: function() { return ( <tr> <td><Input type="checkbox...
var rb = require('react-bootstrap'); var React = require('react'); var _ = require('lodash'); var Table = rb.Table, tr = rb.tr, td =rb.td, form = rb.form, Input = rb.Input; var WidgetRow = React.createClass({ render: function() { return ( <tr> <td><Input type="checkbox...
Add key property to paths list items
Add key property to paths list items
JavaScript
apache-2.0
SignalK/instrumentpanel,SignalK/instrumentpanel
68ce15f3c4e56d8d80a045c4122df46898362d16
lib/with-observe.js
lib/with-observe.js
define(function (require) { 'use strict'; /** * with-observe uses RXJS to implement its observer/observable * patterns. * https://github.com/Reactive-Extensions/RxJS */ var Rx = require('rxjs'); return withObserveState; function withObserveState() { /* jshint validthis:...
define(function (require) { 'use strict'; /** * with-observe uses RXJS to implement its observer/observable * patterns. * https://github.com/Reactive-Extensions/RxJS */ var Rx = require('rxjs'); return withObserve; function withObserve() { /* jshint validthis: true */ ...
Correct mixin name missed in refactor
Correct mixin name missed in refactor Fixes #3
JavaScript
mit
flightjs/flight-with-observe-state,flightjs/flight-with-observe
2cd63cbf915b69de0859ba923a048f93232b0db8
client/app/components/ui-dropdown-remote.js
client/app/components/ui-dropdown-remote.js
import Ember from 'ember'; export default Ember.Component.extend({ tagName: 'div', classNames: ['ui', 'search', 'selection', 'dropdown', 'fluid'], value: null, text: null, bindAttributes: ['value', 'text'], setup: function () { this.$().dropdown({ apiSettings: { url: this.get('query-u...
import Ember from 'ember'; export default Ember.Component.extend({ tagName: 'div', classNames: ['ui', 'search', 'selection', 'dropdown', 'fluid'], value: null, text: null, bindAttributes: ['value', 'text'], setup: function () { this.$().dropdown({ apiSettings: { url: this.get('query-u...
Add support for actions to remote dropdown
Add support for actions to remote dropdown
JavaScript
mit
Turistforeningen/Hytteadmin,Turistforeningen/Hytteadmin
1ec5c102ad1d64fd62e0b42734ade384dd8ff9e1
packages/server/src/__tests__/jestSetup.js
packages/server/src/__tests__/jestSetup.js
const root = __dirname + '/../../../..'; require('@babel/register')({ root, cwd: root, configFile: root + '/packages/server/babel.config.js', extensions: ['.js', '.jsx', '.ts', '.tsx'] }); require.extensions['.scss'] = () => {}; Object.assign(global, require('../../jest.config').globals); const { setup } = ...
const root = __dirname + '/../../../..'; require('@babel/register')({ root, cwd: root, configFile: root + '/packages/server/babel.config.js', extensions: ['.js', '.jsx', '.ts', '.tsx'] }); require.extensions['.scss'] = () => {}; require.extensions['.css'] = () => {}; require.extensions['.less'] = () => {}; ...
Fix jest run when using Less files with Antd
Fix jest run when using Less files with Antd
JavaScript
mit
sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-fullstack-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit
827f45e7b37dff98795627ed8a3c2723b851de82
mods/tiershift/scripts.js
mods/tiershift/scripts.js
exports.BattleScripts = { init: function () { for (var i in this.data.Pokedex) { var tier = ''; var adjustment = 0; // mega evolutions get the same stat boost as their base forme if (this.data.FormatsData[i]) tier = this.data.FormatsData[i].tier || this.data.FormatsData[toId(this.getTemplate(i).baseSpeci...
exports.BattleScripts = { init: function () { for (var i in this.data.Pokedex) { if (!this.data.FormatsData[i]) continue; var tier = this.data.FormatsData[i].tier; var adjustment = 0; if (!tier && this.data.Pokedex[i].baseSpecies) { // mega evolutions get the same stat boost as their base forme ...
Support inheritance from Tier Shift The initialization script of Tier Shift was calling `getTemplate`, which poisoned the dex entries with the `cached` flag
Support inheritance from Tier Shift The initialization script of Tier Shift was calling `getTemplate`, which poisoned the dex entries with the `cached` flag
JavaScript
mit
hayleysworld/Pokemon-Showdown,SilverTactic/Showdown-Boilerplate,Darkshadow6/git-remote-add-scalingo-git-scalingo.com-pokemoonforums,MayukhKundu/Mudkip-Server,KewlStatics/Showdown-Template,JellalTheMage/PS-,ShowdownHelper/Saffron,asdfghjklohhnhn/Pokemon-Showdown,CreaturePhil/Showdown-Boilerplate,lFernanl/Pokemon-Showdow...
05089d4e876cb32b960bb722740f7652e3357e5b
src/notifiers/slack/index.js
src/notifiers/slack/index.js
'use strict'; const assert = require('assert'); function getMessage(service, accounts, mfaStatus) { return ( mfaStatus ? `Users who enabled MFA on \`${service}\` are ${accounts}` : `Users without MFA on \`${service}\` are ${accounts}` ); } /** * @param {secret} SLACK_WEBHOOK_URL * @param {secret} S...
'use strict'; const assert = require('assert'); function getMessage(service, accounts, mfaStatus) { return ( mfaStatus ? `:heart: Users who enabled MFA on \`${service}\` are: ${accounts}` : `:warning: Users without MFA on \`${service}\` are: ${accounts}` ); } /** * @param {secret} SLACK_WEBHOOK_URL ...
Add mfa status icon as an inline message.
Add mfa status icon as an inline message.
JavaScript
mit
radekk/webtask-mfa-monitor,radekk/webtask-tfa-monitor,radekk/mfa-monitor
fb67794ceee40e383063db65ea9fac6648df6c6d
npm_tasks/build-config.js
npm_tasks/build-config.js
var habitat = require('habitat'); // Local environment in .env overwrites everything else habitat.load('.env'); var environment = habitat.get('NODE_ENV', '').toLowerCase(); if (environment === 'production') { habitat.load('config/production.env'); } habitat.load('config/defaults.env'); var config = { CLIENT_ID...
var habitat = require('habitat'); var path = require('path'); var fs = require('fs'); var defaultPath = path.join(__dirname, '../config/defaults.env'); var prodPath = path.join(__dirname, '../config/production.env'); function fileErrors() { process.stderr.write( 'Looks like there is a problem with your config p...
Use absolute paths for config
Use absolute paths for config
JavaScript
mpl-2.0
mozilla/webmaker-core,mozilla/webmaker-core,alicoding/webmaker-core,gvn/webmaker-core,vazquez/webmaker-core,alicoding/webmaker-core,bolaram/webmaker-core,alanmoo/webmaker-core,vazquez/webmaker-core,bolaram/webmaker-core,alanmoo/webmaker-core,gvn/webmaker-core
868fee52cf300322fb59a129a4240eb660a0b1b1
assets/scripts/main.js
assets/scripts/main.js
(function($) { $(document).ready(function() { /** * Site section navigation */ var navLink = $('.nav__link'), navLinkActiveName = 'nav__link--active'; navLink.click(function(e) { // Get the link we clicked var element = $(e.tar...
(function($) { $(document).ready(function() { /** * Site section navigation */ var navLink = $('.nav__link'), navLinkActiveName = 'nav__link--active'; navLink.click(function(e) { // Get the link we clicked var element = $(e.tar...
Remove tempary fix. Need to actually fix this
:bug: Remove tempary fix. Need to actually fix this
JavaScript
mit
jakecleary/.net,jakecleary/.net
dea9359458da72b3df8ace2aa2a4c8a1afa01ece
packages/ember-engines/addon/-private/engine-ext.js
packages/ember-engines/addon/-private/engine-ext.js
import Application from '@ember/application'; import Engine from '@ember/engine'; import require from 'require'; import { gte } from 'ember-compatibility-helpers'; import ExternalLinkComponent from '../components/link-to-external'; Engine.reopen({ buildRegistry() { let registry = this._super(...arguments); ...
import Application from '@ember/application'; import Engine from '@ember/engine'; import require from 'require'; import { gte } from 'ember-compatibility-helpers'; import ExternalLinkComponent from '../components/link-to-external'; Engine.reopen({ buildRegistry() { let registry = this._super(...arguments); ...
Add addon namespace to require so module can be found in embroider
Add addon namespace to require so module can be found in embroider Fixes: embroider-build/embroider#857
JavaScript
mit
ember-engines/ember-engines,ember-engines/ember-engines
766cfe490b42eb9fa11cce9f1e875fbc2e3e05bb
models/publisher.js
models/publisher.js
const mongoose = require('mongoose'); const PublisherSchema = new mongoose.Schema({ name: { type: String, required: true, minlength: 2, maxlength: 256 }, createdBy: String }); PublisherSchema.virtual('response').get(function() { return { id: this.id, name: this.name }; }); module.ex...
const mongoose = require('mongoose'); const PublisherSchema = new mongoose.Schema({ name: { type: String, required: true, minlength: 2, maxlength: 256 }, createdBy: String, createdAt: { type: Date, default: Date.now }, updatedAt: Date, deletedAt: Date }); PublisherSchema.virtual(...
Add timestamp properties to Publisher resource
Add timestamp properties to Publisher resource
JavaScript
mit
biblys/biblys-data-server,biblys/biblys-data-server
6fb09a28728977c645a5c029d8ce2d9ed0f76359
src/yunity/materialConfig.js
src/yunity/materialConfig.js
export default function materialConfig($mdThemingProvider) { 'ngInject'; $mdThemingProvider.theme('default') .primaryPalette('brown') .accentPalette('orange'); }
export default function materialConfig($mdThemingProvider) { 'ngInject'; $mdThemingProvider.theme('default') .primaryPalette('pink', { 'default': '600' }) .accentPalette('blue', { 'default': '800' }); }
Change theme colors to pink+blue
Change theme colors to pink+blue
JavaScript
agpl-3.0
yunity/yunity-webapp-mobile,yunity/yunity-webapp-mobile,yunity/yunity-webapp-mobile
e9fd39357a5e7fc66a9b85b21bd64c327bdecb2e
packages/lesswrong/lib/collections/bans/callbacks.js
packages/lesswrong/lib/collections/bans/callbacks.js
import { Accounts } from 'meteor/accounts-base'; import { Bans } from './collection.js'; import { ForwardedWhitelist } from '../../modules/forwarded_whitelist.js'; // Check during login whether the user currently has their login disabled // User ban callback Accounts.validateLoginAttempt((attempt) => { if (!attemp...
import { Accounts } from 'meteor/accounts-base'; import { Bans } from './collection.js'; import { ForwardedWhitelist } from '../../modules/forwarded_whitelist.js'; // Check during login whether the user currently has their login disabled // User ban callback Accounts.validateLoginAttempt((attempt) => { if (!attemp...
Add a commented-out section for impersonation
Add a commented-out section for impersonation
JavaScript
mit
Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2
a46fdc7502afb1329b4cf7d2a87cd182b1608831
packages/fyndiq-ui-test/.storybook/webpack.config.js
packages/fyndiq-ui-test/.storybook/webpack.config.js
const path = require('path') const webpack = require('webpack') module.exports = { module: { rules: [{ test: /\.less$/, use: [ 'style-loader', 'css-loader?importLoaders=1&sourceMap=true&modules=true', 'less-loader', ], }, { test: /\.(eot|woff|woff2|ttf)$/, ...
const path = require('path') const webpack = require('webpack') module.exports = { module: { rules: [{ test: /\.less$/, use: [ 'style-loader', 'css-loader?importLoaders=1&sourceMap=true&modules=true', 'less-loader', ], }, { test: /\.(eot|woff|woff2|ttf)$/, ...
Use cssnext instead of custom packages
:wrench: Use cssnext instead of custom packages
JavaScript
mit
fyndiq/fyndiq-ui,fyndiq/fyndiq-ui
2ee66982155200df580e1c95c879b4eec586777f
src/Context.js
src/Context.js
// Returns the contexts (short description with bolded matched words) of the // search results. This is only a function to allow the implementation to be // changed if Google ever changes the format of their HTML. function getSearchContexts() { return document.querySelectorAll(".st"); } function insertLinksIntoConte...
// Returns the contexts (short description with bolded matched words) of the // search results. This is only a function to allow the implementation to be // changed if Google ever changes the format of their HTML. function getSearchContexts() { return document.querySelectorAll(".st"); } function forEverySubContext(c...
Add sub-context parsing and linking
Add sub-context parsing and linking
JavaScript
mit
VoidingWarranties/Contextual
4210b579f136fc21c15b8fceb38afeda4f4b4a31
pages/_app.js
pages/_app.js
import { MDXProvider } from '@mdx-js/react'; import components from '../utils/mdx-components'; import App, { Container } from 'next/app'; import React from 'react'; export default class MyApp extends App { static async getInitialProps({ Component, ctx }) { let pageProps = {}; if (Component.getInitialProps) ...
import { MDXProvider } from '@mdx-js/react'; import components from '../utils/mdx-components'; import App, { Container } from 'next/app'; import React from 'react'; export default class MyApp extends App { render() { const { Component, pageProps } = this.props; return ( <Container> <MDXProvider...
Remove automatic static optimization opt-out
Remove automatic static optimization opt-out
JavaScript
mit
styled-components/styled-components-website,styled-components/styled-components-website
dfa89eb214a6ae6b07a89b04a73be23e72d9299e
src/select/index.js
src/select/index.js
const aggregates = require('./aggregates') const createGeometryClause = require('./geometry').createClause const createFieldsClause = require('./fields').createClause function createClause (options) { if (options.aggregates) return aggregates(options.aggregates, options.groupBy, options.esri) const geometryClause ...
const aggregates = require('./aggregates') const createGeometryClause = require('./geometry').createClause const createFieldsClause = require('./fields').createClause function createClause (options) { if (options.aggregates) { return aggregates(options.aggregates, options.groupBy, options.esri) } var fieldsClause...
Remove geometry in SQL Select if option passed in request.
Remove geometry in SQL Select if option passed in request.
JavaScript
apache-2.0
koopjs/winnow,FeatureServer/winnow,dmfenton/winnow
7b21e8e98b906105b61f1ac80bef1cf049ee9722
app/routes/crate/index.js
app/routes/crate/index.js
import Ember from 'ember'; export default Ember.Route.extend({ redirect() { this.transitionTo('crate.version', ''); } });
import Ember from 'ember'; export default Ember.Route.extend({ redirect() { this.replaceWith('crate.version', ''); } });
Fix trailing slash redirect breaking browser back button
Fix trailing slash redirect breaking browser back button
JavaScript
apache-2.0
rust-lang/crates.io,achanda/crates.io,rust-lang/crates.io,rust-lang/crates.io,steveklabnik/crates.io,steveklabnik/crates.io,Susurrus/crates.io,achanda/crates.io,steveklabnik/crates.io,steveklabnik/crates.io,Susurrus/crates.io,Susurrus/crates.io,achanda/crates.io,achanda/crates.io,Susurrus/crates.io,rust-lang/crates.io