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 |
|---|---|---|---|---|---|---|---|---|---|
db978592bc49e4a1e2ea6a4ebb1921c2d2439db0 | src/getFilteredOptions.js | src/getFilteredOptions.js | import {find, isEqual, uniqueId} from 'lodash';
import getOptionLabel from './getOptionLabel';
/**
* Filter out options that don't match the input string or, if multiple
* selections are allowed, that have already been selected.
*/
function getFilteredOptions(options=[], text='', selected=[], props={}) {
const {a... | import {find, isEqual, uniqueId} from 'lodash';
import getOptionLabel from './getOptionLabel';
/**
* Filter out options that don't match the input string or, if multiple
* selections are allowed, that have already been selected.
*/
function getFilteredOptions(options=[], text='', selected=[], props={}) {
const {a... | Update how exact match is found | Update how exact match is found
| JavaScript | mit | ericgio/react-bootstrap-typeahead,Neophy7e/react-bootstrap-typeahead,ericgio/react-bootstrap-typeahead,ericgio/react-bootstrap-typeahead,Neophy7e/react-bootstrap-typeahead,ericgio/react-bootstrap-typeahead,Neophy7e/react-bootstrap-typeahead |
246e6599f31ef09f5de204f87d6b10d28e15bc58 | public/js/application.js | public/js/application.js | var mapSketcherClient;
jQuery(function() {
jQuery.getJSON('/config.json', function(config) {
config.hostname = window.location.hostname
mapSketcherClient = new MapSketcherClient(config);
mapSketcherClient.launch();
});
$("a[rel]").overlay({
mask: {
color: '#ebecff'
, loadSpeed: 200
, opaci... | var mapSketcherClient;
jQuery(function() {
jQuery.getJSON('/config.json', function(config) {
config.hostname = window.location.hostname
mapSketcherClient = new MapSketcherClient(config);
mapSketcherClient.launch();
});
$("a[rel]").overlay({
mask: {
color: '#ebecff'
, loadSpeed: 200
, opaci... | Fix enter key on Collaborative Room selection. | Fix enter key on Collaborative Room selection.
| JavaScript | mit | sagmor/mapsketcher |
aa32378fd966b72ec91fa440ba68c079c98e303b | lib/node/buffer/buffer.js | lib/node/buffer/buffer.js | 'use strict';
var Node = require('../node');
var TYPE = 'buffer';
var PARAMS = {
source: Node.PARAM.NODE,
radio: Node.PARAM.NUMBER
};
var Buffer = Node.create(TYPE, PARAMS);
module.exports = Buffer;
module.exports.TYPE = TYPE;
module.exports.PARAMS = PARAMS;
module.exports.create = require('./factory').crea... | 'use strict';
var Node = require('../node');
var TYPE = 'buffer';
var PARAMS = {
source: Node.PARAM.NODE,
radio: Node.PARAM.NUMBER
};
var Buffer = Node.create(TYPE, PARAMS);
module.exports = Buffer;
module.exports.TYPE = TYPE;
module.exports.PARAMS = PARAMS;
module.exports.create = require('./factory').crea... | Use columns from source node | Use columns from source node
| JavaScript | bsd-3-clause | CartoDB/camshaft |
a96ef266eaf8fe8b1248fe69a6cd51d790f170c0 | cypress/integration/list_spec.js | cypress/integration/list_spec.js | describe('The List Page', () => {
beforeEach(() => {
cy.visit('/list.html')
})
it('successfully loads', () => {})
context('navbar', () => {
it("the 'Home' link works", () => {
cy.contains('Home').click({force: true})
cy.title().should('not.equal', 'Error')
})
it("the 'About' link wor... | describe('The List Page', () => {
beforeEach(() => {
cy.visit('/list.html')
})
it('successfully loads', () => {})
context('navbar', () => {
it("the 'Home' link works", () => {
cy.contains('Home').click({force: true})
cy.title().should('not.equal', 'Error')
})
it("the 'About' link w... | Add tests for all current list items | Add tests for all current list items
| JavaScript | mit | itzsaga/slack-list |
4ea7ec98ad1b490b3a031f183dab0efc2feaa1d7 | NotesApp.js | NotesApp.js | function NoteApplication (author) {
this.author = author;
this.notes = [];
this.create = function(note_content) {
if (note_content.length > 0) {
this.notes.push(note_content);
return "You have created a note";
}
else {
return "You haven't entered a valid note";
}
}
t... | function NoteApplication (author) {
this.author = author;
this.notes = [];
this.create = function(note_content) {
if (note_content.length > 0) {
this.notes.push(note_content);
return "You have created a note";
}
else {
return "You haven't entered a valid note";
}
}
t... | Add search, delete and edit methods | Add search, delete and edit methods
| JavaScript | mit | Mayowa-Adegbola/NotesApp,Mayowa-Adegbola/NotesApp |
6e5d872baaa1e4e72bfe95a32e2ebf55ea594dde | public/app/config/translationConfig.js | public/app/config/translationConfig.js | angular.module('app').config(function ($translateProvider) {
$translateProvider.useStaticFilesLoader({
prefix: '/locale/locale-',
suffix: '.json'
});
$translateProvider.preferredLanguage('fr_FR');
}); | angular.module('app').config(function ($translateProvider) {
$translateProvider.useStaticFilesLoader({
prefix: '/locale/locale-',
suffix: '.json'
});
$translateProvider.useSanitizeValueStrategy('escape');
$translateProvider.determinePreferredLanguage();
}); | Determine preferred language and sanitizy stings | Determine preferred language and sanitizy stings
| JavaScript | mit | BenjaminBini/dilemme,BenjaminBini/dilemme |
7003aada95cfe06d1a89843de4c09d1e4ceae3f4 | test/models/user.js | test/models/user.js | 'use strict'
let imponderous = require('../../index')
class User extends imponderous.Model {
static get schema () {
return {
name: {
index: true
},
email: {
unique: true,
required: true,
validator: 'email'
},
dob: {
type: Date
}
}
... | 'use strict'
let imponderous = require('../../index')
class User extends imponderous.Model {
static get schema () {
return {
name: {
index: true
},
email: {
unique: true,
required: true,
validator: 'email'
},
dob: {
type: Date
},
... | Make "spam" property on test User model a String. | Make "spam" property on test User model a String.
| JavaScript | mit | benhutchins/imponderous |
982fb15759b79e9ec91799c0b841fdd65cf8ccc1 | examples/cli.js | examples/cli.js | #!/usr/bin/node
var convert = require('../'),
localProj = require('local-proj'),
fs = require('fs'),
geojson = JSON.parse(fs.readFileSync(process.argv[2])),
mtl = process.argv[3],
mtllibs = process.argv.slice(4),
options = {
projection: localProj.find(geojson),
mtllib: mtllibs
... | #!/usr/bin/env node
var convert = require('../'),
localProj = require('local-proj'),
fs = require('fs'),
geojson = JSON.parse(fs.readFileSync(process.argv[2])),
mtl = process.argv[3],
mtllibs = process.argv.slice(4),
options = {
projection: localProj.find(geojson),
mtllib: mtlli... | Use env to find node | Use env to find node
| JavaScript | isc | perliedman/geojson2obj |
063bf15bfa562f3708f8608c92095010b12180d5 | tests/chat_tests.js | tests/chat_tests.js | var helpers = require('./../helpers.js')
module.exports = {
'Test Sending Message' : function (browser) {
helpers.setupTest(browser)
helpers.enterText('textarea._1eY_aSnr3MDhZqacV8fugZ', 'test', browser)
browser.end();
}
}; | var helpers = require('./../helpers.js')
module.exports = {
'Test Sending Message' : function (browser) {
helpers.setupTest(browser)
helpers.enterText('textarea._1eY_aSnr3MDhZqacV8fugZ', 'test', browser)
browser.end();
},
'Check Sent Message' : function (browser) {
helpers.setupTest(browser)
... | Create test for checking sent message | Create test for checking sent message
| JavaScript | mit | TheLocust3/Drift-Nightwatch |
2445cb9f2d7c216c357943932074c5b23b99ead3 | bin/eslint_d.js | bin/eslint_d.js | #!/usr/bin/env node
'use strict';
var net = require('net');
var fs = require('fs');
var eslint = require('eslint');
var engine = new eslint.CLIEngine();
var formatter = engine.getFormatter('compact');
var server = net.createServer({
allowHalfOpen: true
}, function (con) {
var data = '';
con.on('data', function... | #!/usr/bin/env node
'use strict';
var net = require('net');
var fs = require('fs');
var eslint = require('eslint');
var engine = new eslint.CLIEngine();
var formatter = engine.getFormatter('compact');
var server = net.createServer({
allowHalfOpen: true
}, function (con) {
var data = '';
con.on('data', function... | Remove port file on kill | Remove port file on kill
| JavaScript | mit | mantoni/eslint_d.js,mantoni/eslint_d.js,clessg/eslint_d.js,ruanyl/eslint_d.js |
617ea4b1ac424daddd02f75727c149b016a26c16 | client/tests/integration/components/f-account-test.js | client/tests/integration/components/f-account-test.js | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('f-account', 'Integration | Component | f account', {
integration: true
});
test('it renders', function(assert) {
// Set any properties with this.set('myProperty', 'value');
// Handle any act... | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('f-account', 'Integration | Component | f account', {
integration: true
});
const accountStub = Ember.Object.create({
name: 'name',
email: 'email',
phone: 'phone'
});
test('it can be submi... | Add test suite for f-account component | Add test suite for f-account component
| JavaScript | mit | yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time |
955bd081bf37c5fd0aa336767766145197b0aeea | client/src/js/views/places-view.js | client/src/js/views/places-view.js | import View from '../base/view';
import Feed from '../models/feed';
import {capfirst} from '../utils';
import FeedView from './feed-view';
import itemTemplate from '../../templates/feed-place.ejs';
export default class PlacesView extends View {
constructor({app, model}) {
super({app, model});
this.feed =... | import View from '../base/view';
import Feed from '../models/feed';
import {capfirst} from '../utils';
import FeedView from './feed-view';
import itemTemplate from '../../templates/feed-place.ejs';
export default class PlacesView extends View {
constructor({app, model}) {
super({app, model});
this.feed =... | Exclude cafes from place list | Exclude cafes from place list
| JavaScript | mit | despawnerer/theatrics,despawnerer/theatrics,despawnerer/theatrics |
197caf952390effc22aaa3c3d11acac23f46a677 | api/lib/domain/models/Assessment.js | api/lib/domain/models/Assessment.js | const _ = require('lodash');
const TYPES_OF_ASSESSMENT_NEEDING_USER = ['PLACEMENT', 'CERTIFICATION'];
const { ObjectValidationError } = require('../errors');
class Assessment {
constructor(attributes) {
Object.assign(this, attributes);
}
isCompleted() {
return this.state === 'completed';
}
getLast... | const _ = require('lodash');
const TYPES_OF_ASSESSMENT_NEEDING_USER = ['PLACEMENT', 'CERTIFICATION'];
const { ObjectValidationError } = require('../errors');
class Assessment {
constructor(attributes) {
Object.assign(this, attributes);
}
isCompleted() {
return this.state === 'completed';
}
getLast... | Add console.log to logs in RA with staging db | Add console.log to logs in RA with staging db
| JavaScript | agpl-3.0 | sgmap/pix,sgmap/pix,sgmap/pix,sgmap/pix |
5ddfe279f1e6d097113c303333198a741bf5f0dd | ghost/admin/models/tag.js | ghost/admin/models/tag.js | /*global Ghost */
(function () {
'use strict';
Ghost.Collections.Tags = Ghost.ProgressCollection.extend({
url: Ghost.paths.apiRoot + '/tags/'
});
}());
| /*global Ghost */
(function () {
'use strict';
Ghost.Collections.Tags = Ghost.ProgressCollection.extend({
url: Ghost.paths.apiRoot + '/tags/',
parse: function (resp) {
return resp.tags;
}
});
}());
| Tag API: Primary Document Format | Tag API: Primary Document Format
Closes #2605
- Change tags browse() response to { tags: [...] }
- Update client side collection to use nested tags document
- Update test references to use response.tags
| JavaScript | mit | TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost |
059c261d2b8bdce31133ac9875a59504d89c4f8f | app/routes/courses.server.routes.js | app/routes/courses.server.routes.js | 'use strict';
module.exports = function(app) {
var users = require('../../app/controllers/users.server.controller');
var courses = require('../../app/controllers/courses.server.controller');
var authorized = ['manager', 'admin'];
// Courses Routes
app.route('/courses')
.get(users.requiresLogin, users.ha... | 'use strict';
module.exports = function(app) {
var users = require('../../app/controllers/users.server.controller');
var courses = require('../../app/controllers/courses.server.controller');
var authorized = ['manager', 'admin'];
// Courses Routes
app.route('/courses')
.get(users.requiresLogin, users.ha... | Update permission to show course detail for teachers | Update permission to show course detail for teachers
| JavaScript | mit | combefis/ECM,combefis/ECM,combefis/ECM |
f54d70fdd2c28ca99d94eb5e9cb10004418e7338 | allcount.js | allcount.js | #!/usr/bin/env node
var argv = require('minimist')(process.argv.slice(2));
var injection = require('./services/injection');
var _ = require('lodash');
var port = argv.port || process.env.PORT || 9080;
var gitUrl = argv.git || process.env.GIT_URL;
var dbUrl = argv.db || process.env.DB_URL;
if (!gitUrl || !dbUrl) {
... | #!/usr/bin/env node
var argv = require('minimist')(process.argv.slice(2));
var injection = require('./services/injection');
var _ = require('lodash');
var port = argv.port || process.env.PORT || 9080;
var gitUrl = argv.git || process.env.GIT_URL;
var dbUrl = argv.db || process.env.DB_URL;
if (!gitUrl || !dbUrl) {
... | Fix exception when one error is thrown during startup | Fix exception when one error is thrown during startup
| JavaScript | mit | allcount/allcountjs,chikh/allcountjs,allcount/allcountjs,chikh/allcountjs |
f92e1de51f035f660d7c736e2869d3c9fa9a53f8 | build/config.js | build/config.js | module.exports = {
assetPath: '{{govukAssetPath}}',
afterHeader: '{{$afterHeader}}{{/afterHeader}}',
bodyClasses: '{{$bodyClasses}}{{/bodyClasses}}',
bodyEnd: '{{$bodyEnd}}{{/bodyEnd}}',
content: '{{$main}}{{/main}}',
cookieMessage: '{{$cookieMessage}}{{/cookieMessage}}',
footerSupportLinks: '{{$footerSup... | module.exports = {
htmlLang: '{{htmlLang}}',
assetPath: '{{govukAssetPath}}',
afterHeader: '{{$afterHeader}}{{/afterHeader}}',
bodyClasses: '{{$bodyClasses}}{{/bodyClasses}}',
bodyEnd: '{{$bodyEnd}}{{/bodyEnd}}',
content: '{{$main}}{{/main}}',
cookieMessage: '{{$cookieMessage}}{{/cookieMessage}}',
foote... | Add local for htmlLang into template | Add local for htmlLang into template
| JavaScript | mit | UKHomeOffice/govuk-template-compiler,UKHomeOffice/govuk-template-compiler |
25b6749b21e4f4f17b7abb239ce2921d279b0ad3 | app/main.js | app/main.js | let http = require('http');
let url = require('url');
let fs = require('fs');
http.createServer(function (req, res) {
let q = url.parse(req.url, true);
let filename = "app/." + q.pathname;
fs.readFile(filename, function (err, data) {
if (err) {
res.writeHead(404, {'Content-Type': 'text/... | let http = require('http');
let url = require('url');
let fs = require('fs');
http.createServer(function (req, res) {
let q = url.parse(req.url, true);
let filename = "app/." + q.pathname;
fs.readFile(filename, function (err, data) {
if (err) {
res.writeHead(404, {'Content-Type': 'text/... | Add informational message when running server | Add informational message when running server
| JavaScript | mit | adilek/jirtdan,adilek/jirtdan |
b6abcef1e466aa09ab920cf56bfe806e71f727ad | src/javascript/binary/base/__tests__/storage.js | src/javascript/binary/base/__tests__/storage.js | var expect = require('chai').expect;
var storage = require('../storage');
var utility = require('../utility');
describe('text.localize', function() {
var text = new storage.Localizable({
key1: 'value',
key2: 'value [_1]',
});
it('should try to return a string from the localised texts', func... | var expect = require('chai').expect;
var storage = require('../storage');
var utility = require('../utility');
describe('text.localize', function() {
var text = new storage.Localizable({
key1: 'value',
key2: 'value [_1]',
'You_can_view_your_[_1]trading_limits_here_': 'Ihre [_1] Handelslimit... | Test with data from real localisation | Test with data from real localisation
| JavaScript | apache-2.0 | negar-binary/binary-static,negar-binary/binary-static,negar-binary/binary-static,4p00rv/binary-static,fayland/binary-static,fayland/binary-static,teo-binary/binary-static,teo-binary/binary-static,4p00rv/binary-static,binary-com/binary-static,binary-static-deployed/binary-static,ashkanx/binary-static,kellybinary/binary-... |
1467a50893393792b8ec47df9796733a40877e7d | lib/helpers/bindResources.js | lib/helpers/bindResources.js | 'use strict'
const resources = require('../resources')
const querySyntax = require('./querySyntax')
module.exports = (propToBind, dispatch) => {
resources.forEach(resource => {
propToBind[resource.name] = query =>
new Promise((resolve, reject) => {
let config = { params: querySyntax(query) }
... | 'use strict'
const resources = require('../resources')
const querySyntax = require('./querySyntax')
module.exports = (propToBind, dispatch) => {
resources.forEach(resource => {
propToBind[resource.name] = query => {
let resourceURL = resource.name
let config = null
if (query) {
confi... | Adjust bindResource and allow integer query | Adjust bindResource and allow integer query
| JavaScript | mit | saschabratton/sparkpay |
558bd4544d76beed8e3d2f8c03c8e228227aed46 | gulpfile.js | gulpfile.js | var gulp = require('gulp')
var connect = require('gulp-connect')
var browserify = require('browserify')
var source = require('vinyl-source-stream');
var gulp = require('gulp');
var mocha = require('gulp-mocha');
gulp.task('connect', function () {
connect.server({
root: '',
port: 4000
})
})
gul... | var gulp = require('gulp')
var connect = require('gulp-connect')
var browserify = require('browserify')
var source = require('vinyl-source-stream');
var gulp = require('gulp');
var mocha = require('gulp-mocha');
gulp.task('connect', function () {
connect.server({
root: '',
port: 4000
})
})
gul... | Add comment explaining what test task is | Add comment explaining what test task is
| JavaScript | mit | Martin-Cox/AirFlow,Martin-Cox/AirFlow |
d55fdf086698484fffdbfc095ab7547b05daa0d7 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var concat = require('gulp-concat');
var sass = require('gulp-sass');
var minifyCSS = require('gulp-minify-css');
var uglify = require('gulp-uglify');
var paths = {
js: ['js/**.js'],
sass: {
src: ['css/sass/**.scss'],
build: 'css/'
}
};
gulp.task... | var gulp = require('gulp');
var concat = require('gulp-concat');
var sass = require('gulp-sass');
var minifyCSS = require('gulp-minify-css');
var uglify = require('gulp-uglify');
var paths = {
js: ['js/**.js'],
sass: {
src: ['css/sass/**.scss'],
build: 'css/'
}
};
gulp.task... | Build gulp task for generating css and js | Build gulp task for generating css and js | JavaScript | mit | andrew/first-pr,andrew/first-pr |
467cab061de0819402d424d2c340c91a445c4f9d | src/components/App/App.js | src/components/App/App.js | import React, { PropTypes } from 'react';
import ReactDOM from 'react-dom';
import { Link } from 'react-router';
import { createPureComponent } from 'utils/createPureComponent';
export default createPureComponent({
displayName: 'App',
renderLink() {
const isEditing = this.props.location.pathname === '/edit... | import React, { PropTypes } from 'react';
import ReactDOM from 'react-dom';
import { Link } from 'react-router';
import { createPureComponent } from 'utils/createPureComponent';
export default createPureComponent({
displayName: 'App',
renderLink() {
const isEditing = this.props.location.pathname === '/edit... | Revert "Revert "Revert "Revert "Revert "Revert "Revert "kein editor""""""" | Revert "Revert "Revert "Revert "Revert "Revert "Revert "kein editor"""""""
This reverts commit 6795b41f5129310bfe89df0ca9bb904b00913597.
| JavaScript | mit | mattesja/mygame,mattesja/mygame |
d3dd2c2766f04d3984a2445d110f4b370e860ec9 | src/lib/core/hyperline.js | src/lib/core/hyperline.js | import React from 'react'
import PropTypes from 'prop-types'
import Component from 'hyper/component'
import decorate from 'hyper/decorate'
class HyperLine extends Component {
static propTypes() {
return {
plugins: PropTypes.array.isRequired
}
}
styles() {
return {
line: {
display... | import React from 'react'
import PropTypes from 'prop-types'
import Component from 'hyper/component'
import decorate from 'hyper/decorate'
class HyperLine extends Component {
static propTypes() {
return {
plugins: PropTypes.array.isRequired
}
}
styles() {
return {
line: {
display... | Use padding instead of margin for x-axis. | Use padding instead of margin for x-axis.
The overflow: hidden; property on the wrapper isn't taking margin into
account for the x-axis. By using padding instead, the x-axis overflow
is correctly hidden.
| JavaScript | mit | Hyperline/hyperline |
f4985c3b6a55f316f3818ff821ee84718b715459 | app/js/init.js | app/js/init.js | document.addEventListener('DOMContentLoaded', () => {
setTimeout(window.browserCheck, 1000);
window.setupGol();
window.navUpdate(true);
window.setupLaptops();
window.onscroll();
// Configure scrolling when navigation trigger clicked
document.getElementById('navigation-trigger').addEventListener('click'... | document.addEventListener('DOMContentLoaded', () => {
setTimeout(window.browserCheck, 1000);
window.setupGol();
window.navUpdate(true);
window.setupLaptops();
window.onscroll();
// Configure scrolling when navigation trigger clicked
document.getElementById('navigation-trigger').addEventListener('click'... | Allow going back up by clicking navigation toggle again | Allow going back up by clicking navigation toggle again
| JavaScript | mit | controversial/controversial.io,controversial/controversial.io,controversial/controversial.io |
cb60f989e6b0174f3a02a69ae9203f52fd163f2e | app/assets/javascripts/map/views/layers/LandRightsLayer.js | app/assets/javascripts/map/views/layers/LandRightsLayer.js | /**
* The LandRights layer module.
*
* @return LandRightsLayer class (extends CartoDBLayerClass)
*/
define([
'abstract/layer/CartoDBLayerClass',
'text!map/cartocss/land_rights.cartocss'
], function(CartoDBLayerClass, LandRightsCartocss) {
'use strict';
var LandRightsLayer = CartoDBLayerClass.extend({
... | /**
* The LandRights layer module.
*
* @return LandRightsLayer class (extends CartoDBLayerClass)
*/
define([
'abstract/layer/CartoDBLayerClass'
], function(CartoDBLayerClass) {
'use strict';
var LandRightsLayer = CartoDBLayerClass.extend({
options: {
sql: 'SELECT the_geom_webmercator, cartodb_id,... | Revert it to the last state before the update | Revert it to the last state before the update | JavaScript | mit | Vizzuality/gfw,Vizzuality/gfw |
508c3e0267346d6a253dccc7ab1c6014a843c50d | spec/backend/integration/branchesIntegrationSpec.js | spec/backend/integration/branchesIntegrationSpec.js | 'use strict';
let request = require('supertest-as-promised');
const instance_url = process.env.INSTANCE_URL;
let app;
let listOfBranches = (res) => {
if (!('branches' in res.body)) {
throw new Error('branches not found');
}
};
let getBranches = () => {
return request(app)
.get('/branches'... | 'use strict';
const specHelper = require('../../support/specHelper'),
Branch = specHelper.models.Branch,
Group = specHelper.models.Group;
let request = require('supertest-as-promised');
const instanceUrl = process.env.INSTANCE_URL;
let app;
function seed() {
let branchWithGroups;
return Branch.create(... | Add route test for branch groups and set to use spec helper | Add route test for branch groups and set to use spec helper
| JavaScript | agpl-3.0 | rabblerouser/core,rabblerouser/core,rabblerouser/core |
857d37d8682fc94af2fc9bdd35f35fbb77376f63 | js/fileUtils.js | js/fileUtils.js | export async function genArrayBufferFromFileReference(fileReference) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.onload = function(e) {
resolve(e.target.result);
};
reader.onerror = function(e) {
reject(e);
};
reader.readAsArrayBuffer(fileRe... | export async function genArrayBufferFromFileReference(fileReference) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.onload = function(e) {
resolve(e.target.result);
};
reader.onerror = function(e) {
reject(e);
};
reader.readAsArrayBuffer(fileRe... | Allow multiple files to be loaded via eject | Allow multiple files to be loaded via eject
| JavaScript | mit | captbaritone/winamp2-js,captbaritone/winamp2-js,captbaritone/winamp2-js |
6ed9ff28b456d033fafd5c9defa31486a2e84c09 | scripts/buildexamples.js | scripts/buildexamples.js | var childProcess = require('child_process');
var fs = require('fs');
process.chdir('examples');
childProcess.execSync('npm install', { stdio: 'inherit' });
childProcess.execSync('npm run update', { stdio: 'inherit' });
process.chdir('..');
// Build all of the example folders.
dirs = fs.readdirSync('examples');
var c... | var childProcess = require('child_process');
var fs = require('fs');
process.chdir('examples');
childProcess.execSync('npm install', { stdio: 'inherit' });
childProcess.execSync('npm run update', { stdio: 'inherit' });
process.chdir('..');
// Build all of the example folders.
dirs = fs.readdirSync('examples');
var c... | Make examples build more verbose | Make examples build more verbose
| JavaScript | bsd-3-clause | jupyter/jupyterlab,charnpreetsingh185/jupyterlab,jupyter/jupyterlab,charnpreetsingh185/jupyterlab,jupyter/jupyterlab,eskirk/jupyterlab,jupyter/jupyterlab,eskirk/jupyterlab,TypeFox/jupyterlab,TypeFox/jupyterlab,eskirk/jupyterlab,TypeFox/jupyterlab,TypeFox/jupyterlab,eskirk/jupyterlab,TypeFox/jupyterlab,eskirk/jupyterlab... |
baf3f40889a2d00ce0dec7fa98e0d9b2b170ed68 | src/tizen/AccelerometerProxy.js | src/tizen/AccelerometerProxy.js | (function(win) {
var cordova = require('cordova'),
Acceleration = require('org.apache.cordova.device-motion.Acceleration'),
accelerometerCallback = null;
module.exports = {
start: function (successCallback, errorCallback) {
if (accelerometerCallback) {
win.re... | /*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); y... | Add license headers to Tizen code | CB-6465: Add license headers to Tizen code
| JavaScript | apache-2.0 | purplecabbage/cordova-plugin-device-motion,corimf/cordova-plugin-device-motion,jomo0825/cordova-plugin-device-motion,jomo0825/cordova-plugin-device-motion,purplecabbage/cordova-plugin-device-motion,blackberry-webworks/cordova-plugin-device-motion,apache/cordova-plugin-device-motion,jomo0825/cordova-plugin-device-motion... |
62aac5749c19a11f797d38ee99cbfba2f6714d46 | test/spec/pointcloud/pointcloud.service.spec.js | test/spec/pointcloud/pointcloud.service.spec.js | 'use strict';
describe('pointcloud.service', function() {
// load the module
beforeEach(module('pattyApp.pointcloud'));
var PointcloudService;
var Potree;
beforeEach(function() {
inject(function(_PointcloudService_, _Potree_) {
PointcloudService = _PointcloudService_;
Potree = _Potree_;
... | 'use strict';
describe('pointcloud.service', function() {
// load the module
beforeEach(module('pattyApp.pointcloud'));
var PointcloudService;
var Potree;
beforeEach(function() {
inject(function(_PointcloudService_, _Potree_) {
PointcloudService = _PointcloudService_;
Potree = _Potree_;
... | Fix test, showStats was not added to test yet. | Fix test, showStats was not added to test yet.
| JavaScript | apache-2.0 | NLeSC/PattyVis,NLeSC/PattyVis |
ab46c8e8ac688107a1a7c52a836ac774a10ebb90 | examples/add-to-basket/index.js | examples/add-to-basket/index.js | const basketItemViews = {
remove: function remove(el) {
el.addEventListener("click", function() {
el.parentNode.remove();
});
},
addToBasket: function addToBasket(el, props) {
el.addEventListener("click", function() {
fetch(props.file)
.then(res => res.text())
.then(data =... | const basketItemViews = {
remove: function remove(el) {
el.addEventListener("click", function() {
el.parentNode.remove();
});
},
addToBasket: function addToBasket(el, props) {
const container = document.querySelector(`.${props.target}`);
el.addEventListener("click", function() {
fetc... | Change selector to outside onclik event | Change selector to outside onclik event
| JavaScript | mit | icelab/viewloader |
af3d1a81abc124affe3e4f5eabefe6946c635b42 | addon/initializers/add-modals-container.js | addon/initializers/add-modals-container.js | /*globals document */
let hasDOM = typeof document !== 'undefined';
function appendContainerElement(rootElementId, id) {
if (!hasDOM) {
return;
}
if (document.getElementById(id)) {
return;
}
let rootEl = document.querySelector(rootElementId);
let modalContainerEl = document.createElement('div');
... | /*globals document */
let hasDOM = typeof document !== 'undefined';
function appendContainerElement(rootElementOrId, id) {
if (!hasDOM) {
return;
}
if (document.getElementById(id)) {
return;
}
let rootEl = rootElementOrId.appendChild ? rootElementOrId : document.querySelector(rootElementOrId);
le... | Handle when App.rootElement can be a node, rather than an id | Handle when App.rootElement can be a node, rather than an id
| JavaScript | mit | yapplabs/ember-modal-dialog,yapplabs/ember-modal-dialog |
d9ca32775708b9d3ede66e4fad902e4b2a7a3966 | example/konami_code/main.js | example/konami_code/main.js | (function () {
var codes = [
38, // up
38, // up
40, // down
40, // down
37, // left
39, // right
37, // left
39, // right
66, // b
65 // a
];
kamo.Stream.fromEventHandlerSetter(window, 'onkeyup').map(function (message) {
return message.keyCode;
}).windowWithCount(c... | (function () {
var codes = [
38, // up
38, // up
40, // down
40, // down
37, // left
39, // right
37, // left
39, // right
66, // b
65 // a
];
kamo.Stream.fromEventHandlerSetter(window, 'onkeyup').map(function (message) {
return message.keyCode;
}).windowWithCount(c... | Remove debug code left by mistake | Remove debug code left by mistake
| JavaScript | mit | r7kamura/kamo.js |
aca431a35442633f68c052764ae132a7184ca118 | app/assets/javascripts/bootstrapper.es6.js | app/assets/javascripts/bootstrapper.es6.js | /*
Bootstrap components and api on DOM Load
*/
import Relay from 'react-relay';
import {
mountComponents,
unmountComponents,
} from './utils/componentMounter';
/* global Turbolinks document */
// Get auth and csrf tokens
import Authentication from './helpers/authentication.es6';
const auth = new Authenticatio... | /*
Bootstrap components and api on DOM Load
*/
import Relay from 'react-relay';
import {
mountComponents,
unmountComponents,
} from './utils/componentMounter';
/* global Turbolinks document */
// Get auth and csrf tokens
import Authentication from './helpers/authentication.es6';
const auth = new Authenticatio... | Remove authrisation token from requests | Remove authrisation token from requests
| JavaScript | artistic-2.0 | Hireables/hireables,Hireables/hireables,gauravtiwari/hireables,Hireables/hireables,gauravtiwari/techhire,gauravtiwari/hireables,gauravtiwari/techhire,gauravtiwari/techhire,gauravtiwari/hireables |
b3ecee926842a8ffc129e9baf01e82be3b326f71 | angular-katex.js | angular-katex.js | /*!
* angular-katex v0.2.1
* https://github.com/tfoxy/angular-katex
*
* Copyright 2015 Tomás Fox
* Released under the MIT license
*/
(function() {
'use strict';
angular.module('katex', [])
.provider('katexConfig', function() {
var self = this;
self.errorTemplate = function(err) {
... | /*!
* angular-katex v0.2.1
* https://github.com/tfoxy/angular-katex
*
* Copyright 2015 Tomás Fox
* Released under the MIT license
*/
(function() {
'use strict';
angular.module('katex', [])
.constant('katex', katex)
.provider('katexConfig', ['katex', function(katex) {
var self = this;
... | Add katex as an angular constant | Add katex as an angular constant
| JavaScript | mit | tfoxy/angular-katex |
7c4f727f9f3f52ab2a6491740e5e8ddbc3b67aa4 | public/app/scripts/app.js | public/app/scripts/app.js | 'use strict';
angular.module('publicApp', [
'ngCookies',
'ngResource',
'ngSanitize',
'ngRoute'
])
.config(function ($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'views/main.html',
controller: 'MainCtrl'
})
.when('/users', {
templateUrl: 'views/users.html',... | 'use strict';
angular.module('publicApp', [
'ngCookies',
'ngResource',
'ngSanitize',
'ngRoute'
])
.config(function ($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'views/main.html',
controller: 'MainCtrl'
})
.when('/users/:id', {
templateUrl: 'views/user.htm... | Add routes for login, registration and user admin | [FEATURE] Add routes for login, registration and user admin
| JavaScript | isc | Parkjeahwan/awegeeks,xdv/gatewayd,zealord/gatewayd,zealord/gatewayd,crazyquark/gatewayd,crazyquark/gatewayd,whotooktwarden/gatewayd,xdv/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd |
c77f36aa39fa95208dd25f9db39abee804aa2c90 | config/index.js | config/index.js | 'use strict';
let config = {};
config.port = 3000;
config.apiKey = process.env.LFM_API_KEY;
config.apiSecret = process.env.LFM_SECRET;
module.exports = config;
| 'use strict';
let config = {};
config.port = 3000;
config.api_key = process.env.LFM_API_KEY;
config.apiSecret = process.env.LFM_SECRET;
config.sk = process.env.LFM_SESSION_KEY;
module.exports = config;
| Add session key to config and update api key | Add session key to config and update api key
| JavaScript | mit | FTLam11/Audio-Station-Scrobbler,FTLam11/Audio-Station-Scrobbler |
9aadb6e0383e7615b66da3fc1cce659c5a475c86 | vendor/assets/javascripts/vendor_application.js | vendor/assets/javascripts/vendor_application.js | //= require jquery
//= require jquery_ujs
//= require turbolinks
//= require foundation
//= require ace/ace
//= require ace/mode-ruby
//= require ace/mode-golang
//= require ace/mode-python
//= require ace/mode-c_cpp
//= require ace/mode-csharp
//= require ace/mode-php
//= require ace/theme-tomorrow_night
//= require... | //= require jquery
//= require jquery_ujs
//= require turbolinks
//= require foundation
//= require ace/ace
//= require ace/mode-ruby
//= require ace/mode-golang
//= require ace/mode-python
//= require ace/mode-c_cpp
//= require ace/mode-csharp
//= require ace/mode-php
//= require ace/worker-php
//= require ace/them... | Revert "Revert "add missing worker-php for ace editor"" | Revert "Revert "add missing worker-php for ace editor""
| JavaScript | mit | tamzi/grounds.io,foliea/grounds.io,grounds/grounds.io,tamzi/grounds.io,grounds/grounds.io,foliea/grounds.io,tamzi/grounds.io,grounds/grounds.io,grounds/grounds.io,foliea/grounds.io,tamzi/grounds.io,foliea/grounds.io |
a6f2abe06879273c426ff7c1cf1f4a4e3365e6ed | app/js/app/services.js | app/js/app/services.js | 'use strict';
define(["angular", "app/services/LoginChecker", "app/services/FileLoader", "app/services/FigureUploader", "app/services/SnippetLoader", "app/services/TagLoader", "app/services/IdLoader"], function() {
/* Services */
angular.module('scooter.services', [])
.constant('Repo', {
owner: "ucam-cl-dtg",
... | 'use strict';
define(["angular", "app/services/LoginChecker", "app/services/FileLoader", "app/services/FigureUploader", "app/services/SnippetLoader", "app/services/TagLoader", "app/services/IdLoader"], function() {
/* Services */
angular.module('scooter.services', [])
.constant('Repo', {
owner: "isaacphysics",... | Migrate content repo to @isaacphysics | Migrate content repo to @isaacphysics
| JavaScript | mit | ucam-cl-dtg/scooter,ucam-cl-dtg/scooter |
10dce7b80924d70fde48129873be5e63808e30f4 | js/backends/graphics/graphics.js | js/backends/graphics/graphics.js | document.write("<canvas>")
var Graphics = new Processing(document.querySelector('canvas')); | document.write("<canvas>")
var Graphics = new Processing(document.querySelector('canvas'));
Graphics.keyPressed = function() {
World.query("keyboard").forEach(function(e) {
e.key = Graphics.keyCode;
});
}
Graphics.keyReleased = function() {
World.query("keyboard").forEach(function(e) {
delete e.key;
}... | Add key* functions to Graphics backend | Add key* functions to Graphics backend
| JavaScript | mit | sangohan/twelve,nasser/twelve,nasser/twelve,sangohan/twelve |
9bec7b6e05e2b0cdc856959d3358f5cfd3703a7d | public/js/worker.js | public/js/worker.js | importScripts('/js/sha256.js');
onmessage = function(e) {
console.log('received work!');
var date = (new Date()).yyyymmdd();
var bits = 0;
var rand = Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5);
var name = e.data[0];
var difficulty = e.data[1];
for (var counter = 0; bits < difficul... | importScripts('/js/sha256.js');
onmessage = function(e) {
console.log('received work!');
var date = (new Date()).yyyymmdd();
var bits = 0;
var rand = Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5);
var name = e.data[0];
var difficulty = e.data[1];
for (var counter = 0; bits < difficul... | Add comments for cash input. | Add comments for cash input.
| JavaScript | mit | martindale/converse,martindale/converse,willricketts/converse,willricketts/converse |
4862fbed37854b9be0fe9271a04d786786c9eca7 | collections.js | collections.js | // CHANGE the current collection
var changeCollection=function(new_index){
dbIndex = new_index;
imageDB = DATABASE[dbIndex];
$("#collectionFooter").text(collections[dbIndex]);
localStorage.setItem("last_visited_index",dbIndex); // saves the state AKA the last collection you had open
if(imageDB==null){
ima... | // CHANGE the current collection
var changeCollection=function(new_index){
dbIndex = new_index;
imageDB = DATABASE[dbIndex];
$("#collectionFooter").text(collections[dbIndex]);
document.title = collections[dbIndex];
localStorage.setItem("last_visited_index",dbIndex); // saves the state AKA the last collection... | Change window title based on current collection | Change window title based on current collection
| JavaScript | cc0-1.0 | johnprattchristian/imagecollection,johnprattchristian/imagecollection |
598b062784f68a1fe3c07dfdfeeba89abdc3e148 | src/components/Markup.js | src/components/Markup.js | import React, { Component } from 'react';
import Registry from '../utils/Registry';
export default class Markup extends Component {
render() {
return (
<div dangerouslySetInnerHTML={ {__html: this.props.data}}></div>
)
}
}
Registry.set('Markup', Markup);
| import React, { Component } from 'react';
import Registry from '../utils/Registry';
import { isArray } from 'lodash';
export default class Markup extends Component {
getContent() {
if (this.props.data && isArray(this.props.data) && this.props.data.length > 0) {
return this.props.data[0];
};
if (th... | Add getContent method to markup component | Add getContent method to markup component
| JavaScript | mit | NuCivic/react-dash,NuCivic/react-dashboard,NuCivic/react-dash,NuCivic/react-dash,NuCivic/react-dashboard,NuCivic/react-dashboard |
fdcd6a46e85cee80cda021b8dad199101b3d888d | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
copy: {
jquery: {
expand: true,
flatten: true,
src: 'bower_components/jquery/dist/jquery.min.js',
dest: 'dist/share/git-webui/w... | module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
copy: {
jquery: {
expand: true,
flatten: true,
src: 'bower_components/jquery/dist/jquery.min.js',
dest: 'dist/share/git-webui/w... | Copy file permissions for all files | Copy file permissions for all files
| JavaScript | apache-2.0 | PeterDaveHello/git-webui,peter-genesys/git-webui,alberthier/git-webui,desyncr/git-webui,epicagency/git-webui,desyncr/git-webui,epicagency/git-webui,Big-Shark/git-webui,Big-Shark/git-webui,PeterDaveHello/git-webui,PeterDaveHello/git-webui,desyncr/git-webui,alberthier/git-webui,peter-genesys/git-webui,peter-genesys/git-w... |
7ca0d5b081b5eefafbca80965d5140f9cc8cef0e | Gruntfile.js | Gruntfile.js | /**
* grunt-dco
*
* Copyright (c) 2014 Rafael Xavier de Souza
* Licensed under the MIT license.
*/
"use strict";
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
all: [
"Gruntfile.js",
"tasks/**/*.js"
],
options: {
jshint... | /**
* grunt-dco
*
* Copyright (c) 2014 Rafael Xavier de Souza
* Licensed under the MIT license.
*/
"use strict";
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
all: [
"Gruntfile.js",
"tasks/**/*.js"
],
options: {
jshint... | Set target on dco grunt task configuration | Set target on dco grunt task configuration
| JavaScript | mit | rxaviers/grunt-dco |
5aa65c9489168b55c1b936582609ebd3e80f9e32 | Gruntfile.js | Gruntfile.js | module.exports = function (grunt) {
var paths = require('./paths');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.initConfig({
paths: paths,
watch: {
src: {
files: ['... | module.exports = function (grunt) {
var paths = require('./paths');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.initConfig({
paths: paths,
watch: {
src: {
files: ['... | Build before every test as a way to keep builds up to date (thanks @hodgestar) | Build before every test as a way to keep builds up to date (thanks @hodgestar)
| JavaScript | bsd-3-clause | praekelt/vumi-ureport,praekelt/vumi-ureport |
8aac3f2f829792220578c31ba1df5a308327c1b0 | Gruntfile.js | Gruntfile.js | module.exports = function( grunt ) {
'use strict';
// Project configuration.
grunt.initConfig( {
pkg: grunt.file.readJSON( 'package.json' ),
copy: {
main: {
src: [
'includes/**',
'languages/**',
'composer.json',
'CHANGELOG.md',
'LICENSE.txt',
'readme.txt',
'sticky-tax... | module.exports = function( grunt ) {
'use strict';
// Project configuration.
grunt.initConfig( {
pkg: grunt.file.readJSON( 'package.json' ),
copy: {
main: {
src: [
'includes/**',
'lib/**',
'languages/**',
'composer.json',
'CHANGELOG.md',
'LICENSE.txt',
'readme.txt',
... | Include lib/* in the build command | Include lib/* in the build command
| JavaScript | mit | liquidweb/sticky-tax,liquidweb/sticky-tax,liquidweb/sticky-tax |
9454a3e4032193b29c498e477a165f04a082afbb | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
'use strict';
require('grunt-horde')
.create(grunt)
.demand('projName', 'sinon-doublist')
.demand('instanceName', 'sinonDoublist')
.demand('klassName', 'sinonDoublist')
.loot('node-component-grunt')
.loot('node-lib-grunt')
.loot('./config/grunt')
.... | module.exports = function(grunt) {
'use strict';
require('grunt-horde')
.create(grunt)
.demand('projName', 'sinon-doublist')
.demand('instanceName', 'sinonDoublist')
.demand('klassName', 'sinonDoublist')
.loot('node-component-grunt')
.loot('node-lib-grunt')
.loot('./config/grunt')
.... | Set home dir for TravisCI | fix(grunt-horde): Set home dir for TravisCI
| JavaScript | mit | codeactual/sinon-doublist |
63bde0dab0d5cb013e8165ed897af201e0eeb5e1 | src/client/controller/meta_controller.js | src/client/controller/meta_controller.js | export default class MetaController {
constructor(PageMetadata) {
this.meta = PageMetadata;
}
}
MetaController.$inject = ['PageMetadata']; | class MetaController {
constructor(PageMetadata) {
this.meta = PageMetadata;
}
}
MetaController.$inject = ['PageMetadata'];
export default MetaController; | Upgrade MetaController to ES6 syntax | Upgrade MetaController to ES6 syntax
| JavaScript | mit | demerzel3/desmond,demerzel3/desmond,demerzel3/desmond,demerzel3/desmond |
35de520dffd5a7e592b44295ae79e5abd117a630 | app/scripts/models/online-player.js | app/scripts/models/online-player.js | import AsyncPlayer from './async-player.js';
// An online player whose moves are determined by a remote human user
class OnlinePlayer extends AsyncPlayer {
constructor({ game }) {
game.session.on('receive-next-move', ({ column }) => {
game.emit('online-player:receive-next-move', { column });
});
}
... | import AsyncPlayer from './async-player.js';
// An online player whose moves are determined by a remote human user
class OnlinePlayer extends AsyncPlayer {
constructor({ game }) {
// Add a global listener here for all moves we will receive from the
// opponent (online) player during the course of the game; ... | Comment OnlinePlayer code more thoroughly | Comment OnlinePlayer code more thoroughly
| JavaScript | mit | caleb531/connect-four |
ea2d72768aa3eb8f15400ed343662918755df702 | src/document/nodes/image/ImagePackage.js | src/document/nodes/image/ImagePackage.js | import Image from 'substance/packages/image/Image'
import ImageComponent from 'substance/packages/image/ImageComponent'
import ImageMarkdownComponent from './ImageMarkdownComponent'
import ImageHTMLConverter from 'substance/packages/image/ImageHTMLConverter'
import ImageXMLConverter from 'substance/packages/image/Image... | import ImageNode from 'substance/packages/image/ImageNode'
import ImageComponent from 'substance/packages/image/ImageComponent'
import ImageMarkdownComponent from './ImageMarkdownComponent'
import ImageHTMLConverter from 'substance/packages/image/ImageHTMLConverter'
import ImageXMLConverter from 'substance/packages/ima... | Deal with Substance Image -> ImageNode | Deal with Substance Image -> ImageNode
| JavaScript | apache-2.0 | stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila |
aad192238064aa6546555b3391546ebcbc04c0df | src/discord.js | src/discord.js | const Discord = require('discord.js'),
client = new Discord.Client;
client.run = ctx => {
client.on('ready', () => {
if (client.user.bot) {
client.destroy();
} else {
ctx.gui.put(`{bold}Logged in as ${client.user.tag}{/bold}`);
ctx.gui.put('Use the join command to join a guild, dm, or cha... | const Discord = require('discord.js'),
client = new Discord.Client;
client.run = ctx => {
client.on('ready', () => {
if (client.user.bot) {
client.destroy();
} else {
ctx.gui.put(`{bold}Logged in as ${client.user.tag}{/bold}`);
ctx.gui.put('Use the join command to join a guild, dm, or cha... | Write dynamically created messages to GUI | Write dynamically created messages to GUI
| JavaScript | mit | wwwg/retrocord-light,wwwg/retrocord-light |
c9482b9e34a1b2243370d66864f38d9f35d56b79 | tests/snapshot-helpers.js | tests/snapshot-helpers.js | import React from 'react';
import ReactDOMServer from 'react-dom/server';
import jsBeautify from 'js-beautify';
import * as Settings from './settings';
/*
* Render React components to markup in order to compare to a Jest Snapshot. Enzyme render with an actual DOM is needed for components that use <Dialog /> and porta... | import React from 'react';
import ReactDOMServer from 'react-dom/server';
import jsBeautify from 'js-beautify';
import * as Settings from './settings';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
/*
* Render React components to DOM state as a String
*
* Please note, Component is the non-... | Add renderDOM to Jest snapshot helpers | Add renderDOM to Jest snapshot helpers
| JavaScript | bsd-3-clause | salesforce/design-system-react,salesforce/design-system-react,salesforce/design-system-react |
c5ba74bea4488be4a66ab8a32aa2a314fcfcf03b | src/app/utils/preload.js | src/app/utils/preload.js | define( [ "Ember" ], function( Ember ) {
var concat = [].concat;
var makeArray = Ember.makeArray;
return function preload( withError, list ) {
if ( list === undefined ) {
list = withError;
withError = false;
}
function promiseImage( src ) {
if ( !src ) {
return Promise.resolve();
}
var d... | define( [ "Ember" ], function( Ember ) {
var concat = [].concat;
var makeArray = Ember.makeArray;
return function preload( withError, list ) {
if ( list === undefined ) {
list = withError;
withError = false;
}
function promiseImage( src ) {
if ( !src ) {
return Promise.resolve();
}
var d... | Set image to null once it has finished loading | Set image to null once it has finished loading
| JavaScript | mit | streamlink/streamlink-twitch-gui,chhe/livestreamer-twitch-gui,streamlink/streamlink-twitch-gui,bastimeyer/livestreamer-twitch-gui,bastimeyer/livestreamer-twitch-gui,streamlink/streamlink-twitch-gui,bastimeyer/livestreamer-twitch-gui,chhe/livestreamer-twitch-gui,chhe/livestreamer-twitch-gui |
538a1fca657d35875ce2a679f39e6b5868627e3e | src/js/main.js | src/js/main.js | /* PSEUDO CODE FOR LOGIN MENU
1. COLLECT DATA ENTERED INTO THE <INPUT>
2. WHEN .LOGIN-SUBMIT IS 'CLICKED' `GET/users/id` TO DATABASE TO BE VERIFIED?
*/
;(function(){
angular.module('Front-Rails', [ ])
.run(function($http, $rootScope) {
$http.get('https://stackundertow.herokuapp.com/questions')
.then(functi... | /* PSEUDO CODE FOR LOGIN MENU
1. COLLECT DATA ENTERED INTO THE <INPUT>
2. WHEN .LOGIN-SUBMIT IS 'CLICKED' `GET/users/id` TO DATABASE TO BE VERIFIED?
*/
;(function(){
angular.module('Front-Rails', [ ])
.run(function($http, $rootScope) {
$http.get('https://stackundertow.herokuapp.com/questions')
.then(functi... | Remove active class when .list or aside is clicked. | Remove active class when .list or aside is clicked.
| JavaScript | mit | front-rails/GUI,front-rails/GUI |
2d7acc374a01b4342e35dd86aeabf9eee5a5b72d | lib/parse/value_parser.js | lib/parse/value_parser.js | /**
* @fileOverview
*/
define(['parse/parse',
'ecma/ast/value',
'khepri/parse/token_parser'],
function(parse,
astValue,
token){
"use strict";
// Literal
////////////////////////////////////////
var nullLiteral = parse.Parser('Null Literal',
parse.bind(token.nullLiteral, functio... | /**
* @fileOverview
*/
define(['ecma/parse/value_parser'],
function(ecma_value){
"use strict";
return ecma_value;
}); | Use value parser from parse-ecma | Use value parser from parse-ecma
| JavaScript | mit | mattbierner/khepri |
72773fb2aa29ab226a5bcb2a8ce7bf468ede0c69 | src/repositorys/interactionrepository.js | src/repositorys/interactionrepository.js | const winston = require('winston')
const authorisedRequest = require('../lib/authorisedrequest')
const config = require('../config')
function getInteraction (token, interactionId) {
return authorisedRequest(token, `${config.apiRoot}/interaction/${interactionId}/`)
}
function saveInteraction (token, interaction) {
... | const winston = require('winston')
const authorisedRequest = require('../lib/authorisedrequest')
const config = require('../config')
function getInteraction (token, interactionId) {
return authorisedRequest(token, `${config.apiRoot}/interaction/${interactionId}/`)
}
function saveInteraction (token, interaction) {
... | Fix issue causing contacts to list ALL interactions | Fix issue causing contacts to list ALL interactions
| JavaScript | mit | uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2 |
761819fa974fc7b9d1c5f7ae436b54e08546b2cf | lib/settings.js | lib/settings.js | "use strict";
var cacheManager = require("cache-manager");
module.exports = {
// cache system (see https://github.com/BryanDonovan/node-cache-manager)
Cache: cacheManager.caching({
store: "memory",
max: 5000,
ttl: 60 * 60
}),
// default request timeout values
DefaultOpenTim... | "use strict";
var cacheManager = require("cache-manager");
module.exports = {
// cache system (see https://github.com/BryanDonovan/node-cache-manager)
Cache: cacheManager.caching({
store: "memory",
max: 5000,
ttl: 60 * 60
}),
// default request timeout values
DefaultOpenTim... | Use exact default values from needle docs for clarity | Use exact default values from needle docs for clarity
| JavaScript | mit | cubehouse/themeparks |
347755aa2c6c280a118005dd06b13a43f5496460 | chattify.js | chattify.js | function filterF(i, el) {
var pattern = /(From|To|Subject|Cc|Date):/i;
return el.textContent.match(pattern);
}
$($("blockquote").get().reverse()).each(function(i, el) {
var contents = $(el).contents();
var matches = contents.find("*").filter(filterF).get().reverse();
while (matches.length > 0) {
matches... | function filterF(i, el) {
var pattern = /(From|To|Sent|Subject|Cc|Date):/i;
return el.textContent.match(pattern);
}
// convert From...To... blocks into one-liners
var matches = $(document).find("*").filter(filterF).get().reverse();
while (matches.length > 0) {
matches[0].remove();
matches = $(document).find("... | Move pattern matching to the top | Move pattern matching to the top
| JavaScript | mit | kubkon/email-chattifier,kubkon/email-chattifier |
17ea0550201dea34b44397eec927e00f575bac5d | blueprints/app/files/tests/helpers/module-for-acceptance.js | blueprints/app/files/tests/helpers/module-for-acceptance.js | import { module } from 'qunit';
import startApp from '../helpers/start-app';
import destroyApp from '../helpers/destroy-app';
export default function(name, options = {}) {
module(name, {
beforeEach() {
this.application = startApp();
if (options.beforeEach) {
options.beforeEach.apply(this, ar... | import { module } from 'qunit';
import startApp from '../helpers/start-app';
import destroyApp from '../helpers/destroy-app';
export default function(name, options = {}) {
module(name, {
beforeEach() {
this.application = startApp();
if (options.beforeEach) {
options.beforeEach.apply(this, ar... | Call destroyApp after afterEach options | Call destroyApp after afterEach options
As discussed in #5348, destroyApp() should be
called after options.afterEach.apply(...).
| JavaScript | mit | martypenner/ember-cli,seawatts/ember-cli,eccegordo/ember-cli,acorncom/ember-cli,kanongil/ember-cli,patocallaghan/ember-cli,nathanhammond/ember-cli,thoov/ember-cli,calderas/ember-cli,johnotander/ember-cli,scalus/ember-cli,jrjohnson/ember-cli,patocallaghan/ember-cli,rtablada/ember-cli,ef4/ember-cli,johnotander/ember-cli,... |
a815c7e9d888053d37d6d98a56c84b3836265331 | ui/commands/select_all.js | ui/commands/select_all.js | 'use strict';
var Command = require('./command');
var SelectAll = Command.extend({
static: {
name: 'selectAll'
},
execute: function() {
var ctrl = this.getController();
var surface = ctrl.getSurface();
if (surface) {
var editor = ctrl.getSurface().getEditor();
var newSelection = edi... | 'use strict';
var SurfaceCommand = require('./surface_command');
var SelectAll = SurfaceCommand.extend({
static: {
name: 'selectAll'
},
execute: function() {
var surface = this.getSurface();
if (surface) {
var newSelection = surface.selectAll(surface.getDocument(), surface.getSelection());
... | Fix broken select all command. | Fix broken select all command.
| JavaScript | mit | TypesetIO/substance,jacwright/substance,andene/substance,substance/substance,abhaga/substance,stencila/substance,substance/substance,michael/substance-1,andene/substance,michael/substance-1,TypesetIO/substance,podviaznikov/substance,abhaga/substance,podviaznikov/substance,jacwright/substance |
6fea7c2846d3977e2b6549aa3243d582b4c39c78 | Libraries/react-native/react-native-interface.js | Libraries/react-native/react-native-interface.js | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @flow
*/... | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @flow
*/... | Remove all the flow errors | [ReactNative] Remove all the flow errors
| JavaScript | mit | Applied-Duality/react-native,judastree/react-native,javache/react-native,corbt/react-native,charlesvinette/react-native,sghiassy/react-native,Poplava/react-native,soxunyi/react-native,cez213/react-native,hengcj/react-native,cdlewis/react-native,tarkus/react-native-appletv,peterp/react-native,BretJohnson/react-native,ed... |
792dc7a8405a900c8120739498fc1aaeb5113cf4 | scripts/iltalehti.user.js | scripts/iltalehti.user.js | $(function() {
// Body headings
$('h1.juttuotsikko span.otsikko:last-of-type').satanify();
// Left
$('#container_vasen p a:not(.palstakuva)').satanify(' ');
// Right
$('#container_oikea [class$=link-list] p a:not(.palstakuva)').satanify(' ');
$('#container_oikea .widget a .list-title').satanify();
//... | $(function() {
// Body headings
$('h1.juttuotsikko span.otsikko:last-of-type').each(function() {
// Some of the center title spans on Iltalehti have manual <br /> elements
// inside of them, which our satanify plugin isn't smart enough to handle
// yet. Hack around it with this for now.
var contents... | Add a quick hack for broken Iltalehti titles | Add a quick hack for broken Iltalehti titles
Needs more testing.
| JavaScript | mit | veeti/iltasaatana,veeti/iltasaatana |
316fa2ac078fdad20deeca235580387821f3b29f | src/js/FlexGrid.react.js | src/js/FlexGrid.react.js | /* @flow */
var React = require('react');
var FlexCell: any = require('./FlexCell.react');
var FlexDetail = require('./FlexDetail.react');
class FlexGrid extends React.Component{
state: {detail: string};
render: Function;
constructor(): void {
super();
this.state = {detail:''};
this... | /* @flow */
var React = require('react');
var FlexCell: any = require('./FlexCell.react');
var FlexDetail = require('./FlexDetail.react');
class FlexGrid extends React.Component{
state: {detail: string};
render: Function;
constructor(): void {
super();
this.state = {detail:''};
this... | Make it cleaner to read | Make it cleaner to read
| JavaScript | mit | thewazir/pokemon-react,thewazir/pokemon-react |
f2360e8ac9e7d0ef3c2174df60936c1451daa8d6 | lib/dice-bag.js | lib/dice-bag.js | /*
* Copyright (c) 2015 Steven Soloff
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publi... | /*
* Copyright (c) 2015 Steven Soloff
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publi... | Create closure around enclosing object instead of local variables referencing enclosing object properties. | Create closure around enclosing object instead of local variables referencing enclosing object properties.
| JavaScript | mit | ssoloff/dice-server-js,ssoloff/dice-server-js,ssoloff/dice-server-js,ssoloff/dice-server-js |
96322552efa957b565247b7121a6dcfcd3a037ab | lib/resolver.js | lib/resolver.js | var Module = require('module')
var path = require('path')
var fs = require('fs')
function exists (target, extensions) {
if (fs.existsSync(target)) {
return target
}
if (path.extname(target) === '') {
for (var i = 0; i < extensions.length; i++) {
var resolvedPath = target + extensions[i]
if (... | var Module = require('module')
var path = require('path')
var fs = require('fs')
function exists (target, extensions) {
if (fs.existsSync(target)) {
return target
}
if (path.extname(target) === '') {
for (var i = 0; i < extensions.length; i++) {
var resolvedPath = target + extensions[i]
if (... | Check if request is a built-in module | Check if request is a built-in module
| JavaScript | mit | chrisyip/requere |
be619af686fc09d843e90a246fed60fb26524197 | lib/validate.js | lib/validate.js | 'use strict';
var validate = require('validate.js');
var validateFxoObject = function(type, value, key, options) {
if(options.required) {
if(!value) {
return ' is required';
}
}
if(value && !value.valid) {
return 'is not a valid ' + type + ' input';
}
};
validate.validators.fxoDatetime = f... | 'use strict';
var validate = require('validate.js');
var validateFxoObject = function(type, value, key, options) {
if(options.required) {
if(!value) {
return ' is required';
}
}
if(value && !value.valid) {
return 'is not a valid ' + type + ' input';
}
};
validate.validators.fxoDatetime = f... | Swap key and options params to correct order in fxo validators functions. | Swap key and options params to correct order in fxo validators functions.
| JavaScript | mit | marian2js/flowxo-sdk,equus71/flowxo-sdk,flowxo/flowxo-sdk |
48ff97b172c1c186cbcdacb817f3866a10a1fd58 | angular-uploadcare.js | angular-uploadcare.js | 'use strict';
/**
* @ngdoc directive
* @name angular-uploadcare.directive:UploadCare
* @description Provides a directive for the Uploadcare widget.
* # UploadCare
*/
angular.module('ng-uploadcare', [])
.directive('uploadcareWidget', function () {
return {
restrict: 'E',
replace: true,
requ... | 'use strict';
/**
* @ngdoc directive
* @name angular-uploadcare.directive:UploadCare
* @description Provides a directive for the Uploadcare widget.
* # UploadCare
*/
angular.module('ng-uploadcare', [])
.directive('uploadcareWidget', function () {
return {
restrict: 'E',
replace: true,
requ... | Use current element for widget instead | Use current element for widget instead | JavaScript | mit | uploadcare/angular-uploadcare |
5139a033cc4083fd86416a330e3220babe377341 | cypress/integration/query_report.js | cypress/integration/query_report.js | context('Form', () => {
before(() => {
cy.login('Administrator', 'qwe');
cy.visit('/desk');
});
it('add custom column in report', () => {
cy.visit('/desk#query-report/Permitted Documents For User');
cy.get('#page-query-report input[data-fieldname="user"]').as('input');
cy.get('@input').focus().type('test... | context('Form', () => {
before(() => {
cy.login('Administrator', 'qwe');
cy.visit('/desk');
});
it('add custom column in report', () => {
cy.visit('/desk#query-report/Permitted Documents For User');
cy.get('#page-query-report input[data-fieldname="user"]').as('input');
cy.get('@input').focus().type('test... | Use force true for clicking menu | fix(test): Use force true for clicking menu
| JavaScript | mit | yashodhank/frappe,yashodhank/frappe,mhbu50/frappe,StrellaGroup/frappe,frappe/frappe,StrellaGroup/frappe,frappe/frappe,mhbu50/frappe,vjFaLk/frappe,frappe/frappe,almeidapaulopt/frappe,adityahase/frappe,adityahase/frappe,adityahase/frappe,yashodhank/frappe,mhbu50/frappe,saurabh6790/frappe,saurabh6790/frappe,almeidapaulopt... |
66c0d320a73c792dfeca3a7f783c9f8c180bb1b0 | app/assets/javascripts/modules/enable-aria-controls.js | app/assets/javascripts/modules/enable-aria-controls.js | window.GOVUK = window.GOVUK || {}
window.GOVUK.Modules = window.GOVUK.Modules || {};
(function (GOVUK) {
'use strict'
GOVUK.Modules.EnableAriaControls = function EnableAriaControls () {
this.start = function (element) {
element.find('[data-aria-controls]').each(enableAriaControls)
function enable... | window.GOVUK = window.GOVUK || {}
window.GOVUK.Modules = window.GOVUK.Modules || {};
(function (GOVUK) {
'use strict'
GOVUK.Modules.EnableAriaControls = function EnableAriaControls () {
this.start = function (element) {
var $controls = element[0].querySelectorAll('[data-aria-controls]')
for (var i... | Remove JQuery from EnableAriaControls module | Remove JQuery from EnableAriaControls module
We're using an old and unsupported version of jQuery for browser support
reasons. Rather than upgrade, it's far better to remove our dependence.
jQuery makes writing JavaScript easier, but it doesn't do anything that
you can't do with vanilla JavaScript, because it's all w... | JavaScript | mit | alphagov/finder-frontend,alphagov/finder-frontend,alphagov/finder-frontend,alphagov/finder-frontend |
557c5a62d82c86efed996e468183a4e0688ff987 | meteor/client/helpers/router.js | meteor/client/helpers/router.js | /* ---------------------------------------------------- +/
## Client Router ##
Client-side Router.
/+ ---------------------------------------------------- */
// Config
Router.configure({
layoutTemplate: 'layout',
loadingTemplate: 'loading',
notFoundTemplate: 'notFound',
});
// Filters
var filters = {
my... | /* ---------------------------------------------------- +/
## Client Router ##
Client-side Router.
/+ ---------------------------------------------------- */
// Config
Router.configure({
layoutTemplate: 'layout',
loadingTemplate: 'loading',
notFoundTemplate: 'notFound',
});
// Filters
var filters = {
my... | Make the locations view the homepage | Make the locations view the homepage
This is our main base.
| JavaScript | mit | scimusmn/sd-scrapbook,scimusmn/sd-scrapbook,scimusmn/sd-scrapbook |
51c5761d4d0d7ed74fef80ca9277d529912b862d | packages/babel-plugin-relay/getSchemaIntrospection.js | packages/babel-plugin-relay/getSchemaIntrospection.js | /**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/
'use strict';
const fs = require('fs');
const path = require('path');
const {SCHEMA_EXTENSION} = require('./Gra... | /**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/
'use strict';
const fs = require('fs');
const path = require('path');
const {SCHEMA_EXTENSION} = require('./Gra... | Remove support for parsing legacy interfaces | Remove support for parsing legacy interfaces
Reviewed By: kassens
Differential Revision: D6972027
fbshipit-source-id: 6af12e0fad969b8f0a8348c17347cec07f2047b2
| JavaScript | mit | xuorig/relay,facebook/relay,cpojer/relay,xuorig/relay,freiksenet/relay,xuorig/relay,wincent/relay,iamchenxin/relay,cpojer/relay,facebook/relay,kassens/relay,dbslone/relay,voideanvalue/relay,josephsavona/relay,zpao/relay,dbslone/relay,facebook/relay,wincent/relay,atxwebs/relay,yungsters/relay,voideanvalue/relay,atxwebs/... |
129b28981a813f8965c98f619cc220ca71468343 | lib/deferredchain.js | lib/deferredchain.js | function DeferredChain() {
var self = this;
this.chain = new Promise(function(accept, reject) {
self._accept = accept;
self._reject = reject;
});
this.await = new Promise(function() {
self._done = arguments[0];
});
this.started = false;
};
DeferredChain.prototype.then = function(fn) {
var se... | function DeferredChain() {
var self = this;
this.chain = new Promise(function(accept, reject) {
self._accept = accept;
self._reject = reject;
});
this.await = new Promise(function() {
self._done = arguments[0];
self._error = arguments[1];
});
this.started = false;
};
DeferredChain.prototyp... | Fix issue where errors aren't being propagated. | Fix issue where errors aren't being propagated.
| JavaScript | mit | prashantpawar/truffle,DigixGlobal/truffle |
eea12ffb865c76519476e8c339e2bbd56423ab4d | source/renderer/app/containers/static/AboutDialog.js | source/renderer/app/containers/static/AboutDialog.js | // @flow
import React, { Component } from 'react';
import { inject, observer } from 'mobx-react';
import ReactModal from 'react-modal';
import About from '../../components/static/About';
import styles from './AboutDialog.scss';
import type { InjectedDialogContainerProps } from '../../types/injectedPropsType';
type Pro... | // @flow
import React, { Component } from 'react';
import { inject, observer } from 'mobx-react';
import ReactModal from 'react-modal';
import About from '../../components/static/About';
import styles from './AboutDialog.scss';
import type { InjectedDialogContainerProps } from '../../types/injectedPropsType';
type Pro... | Implement new About dialog design | [DDW-608] Implement new About dialog design
| JavaScript | apache-2.0 | input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus |
9118e1d29e4d3e9d0c6cfb12a02700c39ac8513b | etc/notebook/custom/custom.js | etc/notebook/custom/custom.js | /* JupyROOT JS */
// Terminal button
$(document).ready(function() {
var terminalURL = "/terminals/1";
var re = new RegExp(".+\/user\/([a-z0-9]+)\/.+", "g");
if (re.test(document.URL)) {
// We have been spawned by JupyterHub, add the user name to the URL
var user = document.URL.replace(re, "... | /* JupyROOT JS */
// Terminal button
$(document).ready(function() {
var terminalURL = "/terminals/1";
var re = new RegExp(".+\/user\/([a-z0-9]+)\/.+", "g");
if (re.test(document.URL)) {
// We have been spawned by JupyterHub, add the user name to the URL
var user = document.URL.replace(re, "... | Set %%cpp highlighting for root --notebook | Set %%cpp highlighting for root --notebook
| JavaScript | lgpl-2.1 | mhuwiler/rootauto,root-mirror/root,mhuwiler/rootauto,karies/root,simonpf/root,karies/root,olifre/root,karies/root,simonpf/root,root-mirror/root,zzxuanyuan/root,simonpf/root,mhuwiler/rootauto,olifre/root,zzxuanyuan/root,olifre/root,olifre/root,olifre/root,zzxuanyuan/root,olifre/root,karies/root,simonpf/root,simonpf/root... |
fa0c582c42f81d4f94a4e2fdc16ac7df9bf1d1c1 | packages/vega-parser/schema/spec.js | packages/vega-parser/schema/spec.js | export default {
"defs": {
"spec": {
"title": "Vega visualization specification",
"type": "object",
"allOf": [
{"$ref": "#/defs/scope"},
{
"properties": {
"$schema": {"type": "string", "format": "uri"},
"description": {"type": "string"},
... | export default {
"defs": {
"spec": {
"title": "Vega visualization specification",
"type": "object",
"allOf": [
{"$ref": "#/defs/scope"},
{
"properties": {
"$schema": {"type": "string", "format": "uri"},
"config": {"type": "object"},
"... | Add config object to JSON schema. | Add config object to JSON schema.
| JavaScript | bsd-3-clause | vega/vega,vega/vega,vega/vega,vega/vega,lgrammel/vega |
435ca8ef211b92be8222a2aeee44bef7bdd74890 | rcmet/src/main/ui/test/unit/controllers/SettingsCtrlTest.js | rcmet/src/main/ui/test/unit/controllers/SettingsCtrlTest.js | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | Update SettingsCtrl test after EvaluationSettings changes | Update SettingsCtrl test after EvaluationSettings changes
git-svn-id: https://svn.apache.org/repos/asf/incubator/climate/trunk@1504017 13f79535-47bb-0310-9956-ffa450edef68
Former-commit-id: 92957b0f0e6bba13073b75fe9692f1b1b425f626 | JavaScript | apache-2.0 | pwcberry/climate,riverma/climate,lewismc/climate,MBoustani/climate,pwcberry/climate,apache/climate,huikyole/climate,Omkar20895/climate,jarifibrahim/climate,jarifibrahim/climate,Omkar20895/climate,pwcberry/climate,riverma/climate,apache/climate,pwcberry/climate,MJJoyce/climate,huikyole/climate,MBoustani/climate,lewismc/... |
2b4785dca28b3863353de148a78e4aeed595a98c | addon/adapters/ember-loopback.js | addon/adapters/ember-loopback.js | import DS from 'ember-data';
import Ember from 'ember';
export default DS.RESTAdapter.extend({
defaultSerializer: 'ember-loopback/serializers/ember-loopback',
/**
* Serializes the query params as a json because loopback has some funky crazy syntax
* @see http://docs.strongloop.com/display/public/LB/Querying... | import DS from 'ember-data';
import Ember from 'ember';
export default DS.RESTAdapter.extend({
defaultSerializer: 'ember-loopback/serializers/ember-loopback',
/**
* Serializes the query params as a json because loopback has some funky crazy syntax
* @see http://docs.strongloop.com/display/public/LB/Querying... | Update REST adapter to work with loopback errors | Update REST adapter to work with loopback errors
| JavaScript | mit | mediasuitenz/ember-loopback,mediasuitenz/ember-loopback |
c3627324afb753e7b4393e8f2ddd1269768ac8e1 | src/Data/Foreign.js | src/Data/Foreign.js | /* global exports */
"use strict";
// module Data.Foreign
// jshint maxparams: 3
exports.parseJSONImpl = function (left, right, str) {
try {
return right(JSON.parse(str));
} catch (e) {
return left(e.toString());
}
};
// jshint maxparams: 1
exports.toForeign = function (value) {
return value;
};
exp... | /* global exports */
"use strict";
// module Data.Foreign
// jshint maxparams: 3
exports.parseJSONImpl = function (left, right, str) {
try {
return right(JSON.parse(str));
} catch (e) {
return left(e.toString());
}
};
// jshint maxparams: 1
exports.toForeign = function (value) {
return value;
};
exp... | Use length instead of property iteration | Use length instead of property iteration
| JavaScript | bsd-3-clause | purescript/purescript-foreign |
1cffb363b4456ffc9064479c02c72b96b2deba33 | covervid.js | covervid.js | jQuery.fn.extend({
coverVid: function(width, height) {
var $this = this;
$(window).on('resize load', function(){
// Get parent element height and width
var parentHeight = $this.parent().height();
var parentWidth = $this.parent().width();
// Get native video width and height
v... | jQuery.fn.extend({
coverVid: function(width, height) {
$(document).ready(sizeVideo);
$(window).resize(sizeVideo);
var $this = this;
function sizeVideo() {
// Get parent element height and width
var parentHeight = $this.parent().height();
var parentWidth = $this.parent().width... | Clean up spacing + use document ready | Clean up spacing + use document ready
| JavaScript | mit | zonayedpca/covervid,tianskyluj/covervid,A11oW/ngCovervid,jfeigel/ngCovervid,gdseller/covervid,space150/covervid,AlptugYaman/covervid,AlptugYaman/covervid,gdseller/covervid,tatygrassini/covervid,kitestudio/covervid,PabloValor/covervid,stefanerickson/covervid,stefanerickson/covervid,kitestudio/covervid,PabloValor/covervi... |
76f678705e608d086b8dc549f180229b787398b4 | web-client/app/scripts/directives/scrollSpy.js | web-client/app/scripts/directives/scrollSpy.js | 'use strict';
angular.module('webClientApp')
.directive('scrollSpy', ['$window', '$interval',
function ($window, $interval) {
var didScroll;
var lastScroll = 0;
return function(scope) {
angular.element($window).bind('scroll', function() {
didScroll = true;
});
$interval(... | 'use strict';
angular.module('webClientApp')
.directive('scrollSpy', ['$window', '$interval',
function ($window, $interval) {
var didScroll;
var lastScroll = 0;
return function(scope) {
angular.element($window).bind('scroll', function() {
didScroll = true;
});
$interval(... | Fix infinite scrolling in firefox | Fix infinite scrolling in firefox
| JavaScript | bsd-2-clause | ahmgeek/manshar,manshar/manshar,manshar/manshar,manshar/manshar,ahmgeek/manshar,ahmgeek/manshar,ahmgeek/manshar,manshar/manshar |
12fc327a90f7ff6dcb372728270a6275215bb52a | gulpfile.js | gulpfile.js | var gulp = require('gulp'),
istanbul = require('gulp-istanbul'),
jasmine = require('gulp-jasmine'),
jshint = require('gulp-jshint'),
plumber = require('gulp-plumber');
var paths = {
src: ['index.js'],
test: ['spec/**/*.spec.js'],
coverage: './coverage'
};
gulp.task('lint', function() {
return ... | var gulp = require('gulp'),
istanbul = require('gulp-istanbul'),
jasmine = require('gulp-jasmine'),
jshint = require('gulp-jshint'),
plumber = require('gulp-plumber');
var paths = {
src: ['index.js'],
test: ['spec/**/*.spec.js'],
coverage: './coverage'
};
gulp.task('lint', function() {
return ... | Remove task completion callback from the `coverage` task | Remove task completion callback from the `coverage` task
| JavaScript | mit | yuanqing/mitch |
d73be27d2bcb8481c1bc86702b82e38445c7e33e | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var sass = require('gulp-sass');
// Common paths.
var paths = {
BootstrapSCSS: 'priv/assets/bootstrap-custom/bootstrap-custom.scss',
BootstrapInclude: 'priv/components/bootstrap-sass/assets/stylesheets',
}
// Build admin CSS from SASS/CSS
gulp.task('bootstrap-sass', function() {
... | var gulp = require('gulp');
var sass = require('gulp-sass');
// Common paths.
var paths = {
BootstrapSCSS: 'priv/assets/bootstrap-custom/bootstrap-custom.scss',
BootstrapInclude: 'priv/components/bootstrap-sass/assets/stylesheets',
}
// Build admin CSS from SASS/CSS
gulp.task('sass', function() {
return g... | Rename bootstrap-sass Gulp task to 'sass' | Rename bootstrap-sass Gulp task to 'sass'
| JavaScript | mit | OxySocks/micro,OxySocks/micro |
be4dd0a0f52aae22e349b9b711ae28d26747add1 | app/routes/index.js | app/routes/index.js | import Ember from 'ember';
export default Ember.Route.extend({
beforeModel: function() {
this.transitionTo('dashboard');
}
});
| import Ember from 'ember';
export default Ember.Route.extend({
beforeModel: function() {
this.replaceWith('dashboard');
}
});
| Use replaceWith to redirect to dashboard on login | Use replaceWith to redirect to dashboard on login
| JavaScript | mit | thecoolestguy/frontend,thecoolestguy/frontend,stopfstedt/frontend,gabycampagna/frontend,ilios/frontend,gboushey/frontend,djvoa12/frontend,stopfstedt/frontend,ilios/frontend,jrjohnson/frontend,gboushey/frontend,gabycampagna/frontend,dartajax/frontend,jrjohnson/frontend,djvoa12/frontend,dartajax/frontend |
8e44961e67fa00f9b97252843423451150f7d215 | src/application/applicationContainer.js | src/application/applicationContainer.js | let { isArray } = require('../mindash');
let findApp = require('../core/findApp');
module.exports = function (React) {
let ApplicationContainer = React.createClass({
childContextTypes: {
app: React.PropTypes.object
},
getChildContext() {
return { app: findApp(this) };
},
render() {
... | let findApp = require('../core/findApp');
let { isArray, extend } = require('../mindash');
module.exports = function (React) {
let ApplicationContainer = React.createClass({
childContextTypes: {
app: React.PropTypes.object
},
getChildContext() {
return { app: findApp(this) };
},
rende... | Clone the element without using addons | Clone the element without using addons
| JavaScript | mit | goldensunliu/marty-lib,KeKs0r/marty-lib,thredup/marty-lib,gmccrackin/marty-lib,CumpsD/marty-lib,martyjs/marty-lib |
d8b936eabb69ac5fd0cd4cd38cbd54a0ed7d6540 | app/js/on_config.js | app/js/on_config.js | function OnConfig($stateProvider, $locationProvider, $urlRouterProvider) {
'ngInject';
$locationProvider.html5Mode(true);
$stateProvider
.state('Home', {
url: '/',
controller: 'ExampleCtrl as home',
templateUrl: 'home.html',
title: 'Home'
});
$urlRouterProvider.otherwise('/');
}
export ... | function OnConfig($stateProvider, $locationProvider, $urlRouterProvider) {
'ngInject';
$locationProvider.html5Mode(true);
$stateProvider
.state('Home', {
url: '/',
controller: 'ExampleCtrl as home',
templateUrl: 'home.html',
title: 'Home'
})
.state('Page1', {
url: '/page1',
control... | Add basic page1 2 with routing | Add basic page1 2 with routing
| JavaScript | mit | 8bithappy/happyhack,8bithappy/happyhack |
8742d2bffb4c2f02b2372c9a4be0385c0422411d | common/errors.js | common/errors.js | (function() {
'use strict';
angular.module('chaise.errors', [])
// Factory for each error type
.factory('ErrorService', [function ErrorService() {
function error409(error) {
// retry logic
// passthrough to app for now
}
// Special behavior for handlin... | (function() {
'use strict';
angular.module('chaise.errors', [])
// Factory for each error type
.factory('ErrorService', ['$log', function ErrorService($log) {
function error409(error) {
// retry logic
// passthrough to app for now
}
// Special behavior... | Use $log in error service | Use $log in error service
| JavaScript | apache-2.0 | informatics-isi-edu/chaise,informatics-isi-edu/chaise,informatics-isi-edu/chaise,informatics-isi-edu/chaise |
884e849c8fa169320355c1544ab9e236f56f868e | modules/recipes/server/routes/recipes.server.routes.js | modules/recipes/server/routes/recipes.server.routes.js | 'use strict';
/**
* Module dependencies.
*/
var recipesPolicy = require('../policies/recipes.server.policy'),
recipes = require('../controllers/recipes.server.controller');
module.exports = function (app) {
// Recipes collection routes
app.route('/api/recipes').all(recipesPolicy.isAllowed)
.get(recipes.li... | 'use strict';
/**
* Module dependencies.
*/
var recipesPolicy = require('../policies/recipes.server.policy'),
recipes = require('../controllers/recipes.server.controller');
module.exports = function (app) {
// Recipes collection routes
app.route('/api/recipes').all(recipesPolicy.isAllowed)
.get(recipes.li... | Revert "finished backend for healthify" | Revert "finished backend for healthify"
This reverts commit 6903c2baf7a2716f81add8fcc3b3dd42b1dfb65e.
Trying to fix nodemon crash
| JavaScript | mit | SEGroup9b/whatUEatin,SEGroup9b/whatUEatin,SEGroup9b/whatUEatin |
528a764e786787535ab6d763072cb0550435075b | test/lib/prepare-spec.js | test/lib/prepare-spec.js | var prepare = require('../../lib/prepare');
var expect = require('expect');
var samples = {
'copy': {
'assets': require('../samples/copy/assets'),
'report': require('../samples/copy/report')
},
'compress': {
'assets': require('../samples/compress/assets'),
'report': require('../samples/compress/r... | var prepare = require('../../lib/prepare');
var expect = require('expect');
var samples = {
'copy': {
'assets': require('../samples/copy/assets'),
'report': require('../samples/copy/report')
},
'compress': {
'assets': require('../samples/compress/assets'),
'report': require('../samples/compress/r... | Update test: sort arraies before expecting | Update test: sort arraies before expecting
| JavaScript | mit | arrowrowe/tam |
b78aee002c1f991ea02ef734dea40c872a979dc3 | public/javascripts/lib/model_with_language_mixin.js | public/javascripts/lib/model_with_language_mixin.js | window.ModelWithLanguageMixin = {
LANGUAGE_CHOICES: {
en: 'English',
es: 'Spanish',
hi: 'Hindi',
pt: 'Portuguese',
ru: 'Russian',
ja: 'Japanese',
de: 'German',
id: 'Malay/Indonesian',
vi: 'Vietnamese',
ko: 'Korean',
fr: 'French',
fa: 'Persian',
... | window.ModelWithLanguageMixin = {
LANGUAGE_CHOICES: {
en: 'English',
es: 'Spanish',
hi: 'Hindi',
pt: 'Portuguese',
ru: 'Russian',
ja: 'Japanese',
de: 'German',
id: 'Malay/Indonesian',
vi: 'Vietnamese',
ko: 'Korean',
fr: 'French',
fa: 'Persian',
... | Add getLanguage method to languages mixin. | Add getLanguage method to languages mixin.
This is more suitable for passing to JST template
| JavaScript | mit | ivarvong/documentcloud,dannguyen/documentcloud,roberttdev/dactyl4,gunjanmodi/documentcloud,roberttdev/dactyl,roberttdev/dactyl4,monofox/documentcloud,monofox/documentcloud,dannguyen/documentcloud,Teino1978-Corp/Teino1978-Corp-documentcloud,dannguyen/documentcloud,moodpo/documentcloud,monofox/documentcloud,Teino1978-Cor... |
6c376933137540938bd869be1dd27ac039108704 | app/routes/movie.js | app/routes/movie.js | import Ember from 'ember';
export default Ember.Route.extend({
model(params) {
return Ember.RSVP.hash({
movie: Ember.$.getJSON("https://api.themoviedb.org/3/movie/" + params.movie_id+ "?api_key=0910db5745f86638474ffefa5d3ba687"),
userRating: this.get('firebaseUtil').findRecord(param... | import Ember from 'ember';
export default Ember.Route.extend({
model(params) {
return Ember.RSVP.hash({
movie: Ember.$.getJSON("https://api.themoviedb.org/3/movie/" + params.movie_id+ "?api_key=0910db5745f86638474ffefa5d3ba687"),
userRating: this.get('firebaseUtil').findRecord(param... | Fix initial user rating display | Fix initial user rating display
| JavaScript | mit | JaxonWright/CineR8,JaxonWright/CineR8 |
20ba3c4e8995318e1ef937cd57fd9c6304412998 | index.js | index.js | var express = require('express');
var app = express();
var redis = require('redis').createClient(process.env.REDIS_URL);
app.get('/', function(req, res){
res.send('hello world');
});
app.get('/sayhello', function (req, res){
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Content-Type', 'appli... | var express = require('express');
var app = express();
var redis = require('redis');
var redis_client = redis.createClient(process.env.REDIS_URL || "redis://h:pe991302eec381b357d57f8089f915c35ac970d0bb4f2c89dba4bc52cbd7bcbb7@ec2-79-125-23-12.eu-west-1.compute.amazonaws.com:15599");
app.get('/', function(req, res){
r... | Add /keys endpoint for setting & getting from Redis | Add /keys endpoint for setting & getting from Redis
| JavaScript | mit | codehackdays/HelloWorld |
06347c6e939899854a98f0655df67e5d83ba378a | index.js | index.js | 'use strict';
module.exports = function (arr) {
var arch = process.arch === 'x64' ? 'x64' : process.arch === 'arm' ? 'arm' : 'x86';
var platform = process.platform;
if (!arr.length) {
return null;
}
return arr.filter(function (obj) {
if (obj.os === platform && obj.arch === arch) {
delete obj.os;
delet... | 'use strict';
module.exports = function (arr) {
var arch = process.arch === 'x64' ? 'x64' : process.arch === 'arm' ? 'arm' : 'x86';
var platform = process.platform;
console.log(arr);
if (!arr || !arr.length) {
return [];
}
return arr.filter(function (obj) {
if (obj.os === platform && obj.arch === arch) {
... | Return an empty array instead of `null` | Return an empty array instead of `null`
| JavaScript | mit | kevva/os-filter-obj |
3f1019a71b7dc636390bffe96bf6a93354739b10 | index.js | index.js | const jsonMask = require('json-mask')
module.exports = function (opt) {
opt = opt || {}
function partialResponse(obj, fields) {
if (!fields) return obj
return jsonMask(obj, fields)
}
function wrap(orig) {
return function (obj) {
const param = this.req.query[opt.query || 'fields']
if (... | const jsonMask = require('json-mask')
module.exports = function (opt) {
opt = opt || {}
function partialResponse(obj, fields) {
if (!fields) return obj
return jsonMask(obj, fields)
}
function wrap(orig) {
return function (obj) {
const param = this.req.query[opt.query || 'fields']
if (... | Add comment about binary res.json() | Add comment about binary res.json()
| JavaScript | mit | nemtsov/express-partial-response |
6b7f738fd598b50d3fd021597f3f78e6282a79ce | index.js | index.js | var express = require('express');
var Connection = require('./lib/backend/connection').Connection;
var restAdaptor = require('./lib/frontend/rest-adaptor');
var socketIoAdaptor = require('./lib/frontend/socket.io-adaptor');
var dashboardHandler = require('./lib/frontend/dashboard-handler');
express.application.kotoumi... | var express = require('express');
var Connection = require('./lib/backend/connection').Connection;
var restAdaptor = require('./lib/frontend/rest-adaptor');
var socketIoAdaptor = require('./lib/frontend/socket.io-adaptor');
var dashboardHandler = require('./lib/frontend/dashboard-handler');
express.application.kotoumi... | Make it easy to use mocked/stubbed connections for testing | Make it easy to use mocked/stubbed connections for testing
| JavaScript | mit | droonga/express-droonga,KitaitiMakoto/express-droonga,droonga/express-droonga,KitaitiMakoto/express-droonga |
da7718cb9914f268e62200ab21c8f4a62e9d5899 | index.js | index.js | "use strict";
// stdlib
var Fs = require('fs');
// nodeca
var NLib = require('nlib');
// 3rd-party
var StaticLulz = require('static-lulz');
var FsTools = NLib.Vendor.FsTools;
var Async = NLib.Vendor.Async;
module.exports = NLib.Application.create({
root: __dirname,
name: 'nodeca.core',
bootstrap: function... | "use strict";
// stdlib
var Fs = require('fs');
// nodeca
var NLib = require('nlib');
// 3rd-party
var StaticLulz = require('static-lulz');
var FsTools = NLib.Vendor.FsTools;
var Async = NLib.Vendor.Async;
module.exports = NLib.Application.create({
root: __dirname,
name: 'nodeca.core',
bootstrap: function... | Remove http_server from nodeca context. | Remove http_server from nodeca context.
| JavaScript | mit | nodeca/nodeca.core,nodeca/nodeca.core |
92f8cb2850d9e5148aa309c76b4c87cf1fc18652 | index.js | index.js | var gulp = require('gulp'),
gutil = require('gulp-util');
function loadTasks(config) {
var tasks = Object.keys(config);
tasks.forEach(function (name) {
var taskConfig = config[name],
task = require('./tasks/' + name)(taskConfig);
gulp.task(name, task);
});
return gulp;... | var gulp = require('gulp'),
gutil = require('gulp-util');
function loadTasks(config) {
var tasks = Object.keys(config);
tasks.forEach(function (name) {
var taskConfig = config[name],
task = require(taskConfig.def)(taskConfig);
gulp.task(name, task);
});
return gulp;
}
... | Use task property for require func | Use task property for require func
| JavaScript | mit | gulp-boilerplate/gulp-boilerplate |
818624b20d08020c5f0ac8f2f8059d2ec7fd1ee0 | index.js | index.js | function neymar(type, props, ...children) {
props = props || {}
return {
type,
props,
children: Array.prototype.concat.apply([], children)
}
}
function createElement(node) {
if (typeof node === 'string') {
return document.createTextNode(node)
}
const el = docume... | function neymar(type, props, ...children) {
props = props || {}
return {
type,
props,
children: Array.prototype.concat.apply([], children)
}
}
function setProperties(node, props) {
Object.keys(props).map(prop => {
const propName = prop === 'className' ? 'class' : prop
... | Add property assignments to the DOM node being created | Add property assignments to the DOM node being created
| JavaScript | mit | lucasfcosta/vdom-example,lucasfcosta/vdom-example |
462cae04fb596a3cd8c05f8a6c472796adbc710b | index.js | index.js | var window = require('global/window');
var nodeCrypto = require('crypto');
function getRandomValues(buf) {
if (window.crypto && window.crypto.getRandomValues) {
window.crypto.getRandomValues(buf);
}
else if (typeof window.msCrypto === 'object' && typeof window.msCrypto.getRandomValues === 'function') {
w... | var window = require('global/window');
var nodeCrypto = require('crypto');
function getRandomValues(buf) {
if (window.crypto && window.crypto.getRandomValues) {
window.crypto.getRandomValues(buf);
}
else if (typeof window.msCrypto === 'object' && typeof window.msCrypto.getRandomValues === 'function') {
w... | Check for `randomBytes` before trying to use Node.js crypto | Check for `randomBytes` before trying to use Node.js crypto
Browserify's `require()` will return an empty Object here, which evaluates to
`true`, so check for the function we need before trying to use it.
| JavaScript | mit | KenanY/get-random-values |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.