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 |
|---|---|---|---|---|---|---|---|---|---|
429317e11c1c9f4394b3fc27de0b5da23bdbb0d5 | app/js/arethusa.relation/directives/nested_menu_collection.js | app/js/arethusa.relation/directives/nested_menu_collection.js | "use strict";
angular.module('arethusa.relation').directive('nestedMenuCollection', function() {
return {
restrict: 'A',
replace: 'true',
scope: {
current: '=',
all: '=',
property: '=',
ancestors: '=',
emptyVal: '@',
labelAs: "=",
change: "&"
},
link: fun... | "use strict";
angular.module('arethusa.relation').directive('nestedMenuCollection', function() {
return {
restrict: 'A',
replace: 'true',
scope: {
current: '=',
all: '=',
property: '=',
ancestors: '=',
emptyVal: '@',
labelAs: "=",
},
link: function(scope, eleme... | Remove change fn from nestedMenuCollection | Remove change fn from nestedMenuCollection
| JavaScript | mit | Masoumeh/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa |
b740bdf7394e7325e174d7d4ccab1e1c185240f7 | app/scripts/components/issues/comments/issue-comments-form.js | app/scripts/components/issues/comments/issue-comments-form.js | import template from './issue-comments-form.html';
class IssueCommentsFormController {
// @ngInject
constructor($rootScope, issueCommentsService) {
this.$rootScope = $rootScope;
this.issueCommentsService = issueCommentsService;
}
submit() {
var form = this.issueCommentsService.$create(this.issue.u... | import template from './issue-comments-form.html';
class IssueCommentsFormController {
// @ngInject
constructor($rootScope, issueCommentsService, ncUtilsFlash) {
this.$rootScope = $rootScope;
this.issueCommentsService = issueCommentsService;
this.ncUtilsFlash = ncUtilsFlash;
}
submit() {
var f... | Add notifications for comment create processing [WAL-1036]. | Add notifications for comment create processing [WAL-1036].
| JavaScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport |
8b321a6c8a960f222477682e447e405971c4548e | website/addons/figshare/static/figshareFangornConfig.js | website/addons/figshare/static/figshareFangornConfig.js | var m = require('mithril');
var Fangorn = require('fangorn');
// Although this is empty it should stay here. Fangorn is going to look for figshare in it's config file.
Fangorn.config.figshare = {
};
| var m = require('mithril');
var Fangorn = require('fangorn');
// Define Fangorn Button Actions
function _fangornActionColumn (item, col) {
var self = this;
var buttons = [];
if (item.kind === 'folder') {
buttons.push(
{
'name' : '',
'tooltip' : 'Upload... | Repair removed figshare checks for action buttons | Repair removed figshare checks for action buttons
| JavaScript | apache-2.0 | hmoco/osf.io,cldershem/osf.io,barbour-em/osf.io,binoculars/osf.io,bdyetton/prettychart,sbt9uc/osf.io,SSJohns/osf.io,brandonPurvis/osf.io,samchrisinger/osf.io,bdyetton/prettychart,mfraezz/osf.io,baylee-d/osf.io,asanfilippo7/osf.io,felliott/osf.io,binoculars/osf.io,brandonPurvis/osf.io,wearpants/osf.io,monikagrabowska/os... |
05eb13e445bd7adb0a7ca0d0fbb44968093a3f9f | lib/query/query.server.js | lib/query/query.server.js | import createGraph from './lib/createGraph.js';
import prepareForProcess from './lib/prepareForProcess.js';
import hypernova from './hypernova/hypernova.js';
import Base from './query.base';
export default class Query extends Base {
/**
* Retrieves the data.
* @param context
* @returns {*}
*/
... | import createGraph from './lib/createGraph.js';
import prepareForProcess from './lib/prepareForProcess.js';
import hypernova from './hypernova/hypernova.js';
import Base from './query.base';
export default class Query extends Base {
/**
* Retrieves the data.
* @param context
* @returns {*}
*/
... | Improve fetchOne to only return 1 result | Improve fetchOne to only return 1 result
Inspired by meteor's findOne | JavaScript | mit | cult-of-coders/grapher |
6215189a16e91c771ed0d4a2f1a83493625480ee | api/server/boot/install.js | api/server/boot/install.js | 'use strict';
var installed=true;
module.exports = function (app) {
if (!installed) {
var User = app.models.User;
var Role = app.models.Role;
var RoleMapping = app.models.RoleMapping;
var cb = function (m) {
console.log(m)
};
User.create([
{us... | 'use strict';
var installed=true;
module.exports = function (app) {
if (!installed) {
var Account = app.models.Account;
var Role = app.models.Role;
var RoleMapping = app.models.RoleMapping;
var cb = function (m) {
console.log(m)
};
Account.create([
... | Use new Account model to create admin user | Use new Account model to create admin user
| JavaScript | mpl-2.0 | enimiste/ng4-loopback-blog-tutorial,enimiste/ng4-loopback-blog-tutorial,enimiste/ng4-loopback-blog-tutorial |
deff306984bfb46dec7d5ac494a7f2bcb18cfc53 | app/resonant-reference-app/views/widgets/MappingView/index.js | app/resonant-reference-app/views/widgets/MappingView/index.js | import Backbone from 'backbone';
import myTemplate from './index.jade';
let MappingView = Backbone.View.extend({
initialize: function () {
},
render: function () {
this.$el.html(myTemplate());
}
});
export default MappingView;
| import Backbone from 'backbone';
import myTemplate from './index.jade';
import candela from '../../../../../src';
let MappingView = Backbone.View.extend({
initialize: function () {
},
render: function () {
const spec = candela.components.Scatter.options;
const fields = spec.filter((opt) => opt.selector &... | Gather some information about field selectors | Gather some information about field selectors
| JavaScript | apache-2.0 | Kitware/candela,Kitware/candela,Kitware/candela,Kitware/candela,Kitware/candela |
7e9b2abdd8fb3fbd799f8300a4b22269643831f0 | client/components/Location/Entriex/Creation/index.js | client/components/Location/Entriex/Creation/index.js | var ui = require('tresdb-ui');
var emitter = require('component-emitter');
var template = require('./template.ejs');
var FormView = require('../../../Entry/Form');
// Remember contents of unsubmitted forms during the session.
// Cases where necessary:
// - user fills the form but then exits to the map to search releva... | var ui = require('tresdb-ui');
var emitter = require('component-emitter');
var template = require('./template.ejs');
var FormView = require('../../../Entry/Form');
module.exports = function (location) {
// Parameters:
// location
// location object
// NOTE only location id is needed but the view ge... | Remove duplicate draft saving features at Location Entries Creation | Remove duplicate draft saving features at Location Entries Creation
| JavaScript | mit | axelpale/tresdb,axelpale/tresdb |
358406f12becb20701ad28ec28da3fd974fd4e95 | test/reject-spec.js | test/reject-spec.js | import { expect } from 'chai';
import u from '../lib';
describe('u.reject', () => {
it('freezes the result', () => {
expect(Object.isFrozen(u.reject('a', []))).to.be.true;
});
});
| import { expect } from 'chai';
import u from '../lib';
describe('u.reject', () => {
it('can reject by index', () => {
const result = u.reject((_, index) => index === 1, [3, 4, 5]);
expect(result).to.eql([3, 5]);
});
it('freezes the result', () => {
expect(Object.isFrozen(u.reject('a', []))).to.be.t... | Add spec for reject by index | Add spec for reject by index
| JavaScript | mit | substantial/updeep,substantial/updeep |
b0966f22c8ff90a61d87215f3f1e588f4171895c | jest.config.js | jest.config.js | // For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
module.exports = {
roots: ["<rootDir>/src/main/javascript"],
collectCoverage: false,
collectCoverageFrom: ["**/*.js", "!**/*.{test,spec}.js", "!**/__tests__/**", "!**/WEB-INF/**"],
covera... | // For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
module.exports = {
roots: ["<rootDir>/src/main/javascript"],
collectCoverage: false,
collectCoverageFrom: ["**/*.js", "!**/*.{test,spec}.js", "!**/__tests__/**", "!**/WEB-INF/**"],
covera... | Migrate deprecated jest testUrl to testEnvironmentOptions.url | Migrate deprecated jest testUrl to testEnvironmentOptions.url
| JavaScript | apache-2.0 | synyx/urlaubsverwaltung,synyx/urlaubsverwaltung,synyx/urlaubsverwaltung,synyx/urlaubsverwaltung |
1c99a4bcf99b3af5563bed97beedca61727ae3b7 | js/src/util.js | js/src/util.js | const path = (props, obj) => {
let nested = obj;
const properties = typeof props === 'string' ? props.split('.') : props;
for (let i = 0; i < properties.length; i++) {
nested = nested[properties[i]];
if (nested === undefined) {
return nested;
}
}
return nested;
};
module.exports = {
pat... | /** Wrap DOM selector methods:
* document.querySelector,
* document.getElementById,
* document.getElementsByClassName]
*/
const dom = {
query(...args) {
return document.querySelector(args);
},
id(...args) {
return document.getElementById(args);
},
class(...args) {
return document.getElementsBy... | Update dom methods to avoid illegal invocation error. | Update dom methods to avoid illegal invocation error.
| JavaScript | mit | adrice727/accelerator-core-js,opentok/accelerator-core-js,opentok/accelerator-core-js,adrice727/accelerator-core-js |
b26979135e1d39a8294abd664b8bb23c8b135748 | Gulpfile.js | Gulpfile.js | var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var template = require('gulp-template');
var bower = require('./bower.json');
var dist_dir = './'
var dist_file = 'launchpad.js';
gulp.task('version', function(){
return gulp... | var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var template = require('gulp-template');
var KarmaServer = require('karma').Server;
var bower = require('./bower.json');
var dist_dir = './'
var dist_file = 'launchpad.js';
gulp.... | Create a gulp test target | Create a gulp test target
| JavaScript | mit | dvberkel/LaunchpadJS |
2e79e9b49dd49fb72923a45f44ced0608394c409 | qml/js/logic/channelPageLogic.js | qml/js/logic/channelPageLogic.js | .import "../applicationShared.js" as Globals
function workerOnMessage(messageObject) {
if(messageObject.apiMethod === 'channels.history') {
addMessagesToModel(messageObject.data);
} else if(messageObject.apiMethod === 'channels.info') {
addChannelInfoToPage(messageObject.data);
} else {
... | .import "../applicationShared.js" as Globals
function workerOnMessage(messageObject) {
if(messageObject.apiMethod === 'channels.history') {
addMessagesToModel(messageObject.data);
} else if(messageObject.apiMethod === 'channels.info') {
addChannelInfoToPage(messageObject.data);
} else {
... | Remove invalid argument of channel.info method | Remove invalid argument of channel.info method
| JavaScript | mit | neversun/Slackfish,neversun/Slackfish |
1452ae94cec46f13e888a3e80e2ce54ee552bf3f | dist/babelify-config.js | dist/babelify-config.js | const babelifyConfig = {
presets: [
['@babel/preset-env', {
'useBuiltIns': 'entry',
}],
],
extensions: '.ts',
}
module.exports = babelifyConfig;
| const babelifyConfig = {
presets: [
['@babel/preset-env', {
'useBuiltIns': 'entry',
'targets': {
'firefox': 50,
'chrome': 45,
'opera': 32,
'safari': 11,
},
}],
],
extensions: '.ts',
}
module.... | Use explicit targets for babel-preset-env | Use explicit targets for babel-preset-env
This reduces bundle size by 5 KiB.
| JavaScript | agpl-3.0 | threema-ch/threema-web,threema-ch/threema-web,threema-ch/threema-web,threema-ch/threema-web,threema-ch/threema-web |
3a270f06122001df0204cce8dbd7697748659183 | app/assets/javascripts/student_profile_v2/academic_summary.js | app/assets/javascripts/student_profile_v2/academic_summary.js | (function() {
window.shared || (window.shared = {});
var dom = window.shared.ReactHelpers.dom;
var createEl = window.shared.ReactHelpers.createEl;
var merge = window.shared.ReactHelpers.merge;
var PropTypes = window.shared.PropTypes;
var styles = {
caption: {
marginRight: 5
},
value: {
... | (function() {
window.shared || (window.shared = {});
var dom = window.shared.ReactHelpers.dom;
var createEl = window.shared.ReactHelpers.createEl;
var merge = window.shared.ReactHelpers.merge;
var PropTypes = window.shared.PropTypes;
var styles = {
caption: {
marginRight: 5
},
value: {
... | Tweak padding on summary text | Tweak padding on summary text
| JavaScript | mit | studentinsights/studentinsights,studentinsights/studentinsights,jhilde/studentinsights,erose/studentinsights,erose/studentinsights,jhilde/studentinsights,erose/studentinsights,studentinsights/studentinsights,erose/studentinsights,jhilde/studentinsights,jhilde/studentinsights,studentinsights/studentinsights |
725c60ab2f75a085cde14843ad2f6a73eab8cb76 | src/Oro/Bundle/FilterBundle/Resources/public/js/map-filter-module-name.js | src/Oro/Bundle/FilterBundle/Resources/public/js/map-filter-module-name.js | define(function() {
'use strict';
var moduleNameTemplate = 'oro/filter/{{type}}-filter';
var types = {
string: 'choice',
choice: 'select',
single_choice: 'select',
selectrow: 'select-row',
multichoice: 'multiselect',
boolea... | define(function() {
'use strict';
var moduleNameTemplate = 'oro/filter/{{type}}-filter';
var types = {
string: 'choice',
choice: 'select',
single_choice: 'select',
selectrow: 'select-row',
multichoice: 'multiselect',
boolea... | Modify frontend component to load proper filters for both enum and dictionary types | BAP-8615: Modify frontend component to load proper filters for both enum and dictionary types
| JavaScript | mit | geoffroycochard/platform,orocrm/platform,hugeval/platform,Djamy/platform,hugeval/platform,northdakota/platform,ramunasd/platform,trustify/oroplatform,trustify/oroplatform,2ndkauboy/platform,northdakota/platform,ramunasd/platform,orocrm/platform,trustify/oroplatform,Djamy/platform,geoffroycochard/platform,2ndkauboy/plat... |
f0b4e3cc48e61b221fe2db7aa8be38d506dfd69e | lib/disproperty.js | lib/disproperty.js | /**
* Disproperty: Disposable properties.
* Copyright (c) 2015 Vladislav Zarakovsky
* MIT license https://github.com/vlazar/disproperty/blob/master/LICENSE
*/
(function(root) {
function disproperty(obj, prop, value) {
return Object.defineProperty(obj, prop, {
configurable: true,
get: function() ... | /**
* Disproperty: Disposable properties.
* Copyright (c) 2015 Vladislav Zarakovsky
* MIT license https://github.com/vlazar/disproperty/blob/master/LICENSE
*/
(function(root) {
function disproperty(obj, prop, value) {
return Object.defineProperty(obj, prop, {
configurable: true,
get: function() ... | Fix AMD and CommonJS were mixed up | Fix AMD and CommonJS were mixed up
| JavaScript | mit | vlazar/disproperty |
adc14a177ba3c37618b2f63f8f4ca272cdc94586 | lib/updateModel.js | lib/updateModel.js | var
_ = require('underscore'),
async = require('async'),
curry = require('curry'),
Dependency = require('../models').Dependency,
compHelper = require('./componentHelper'),
compInstall = compHelper.install,
compBuild = compHelper.build;
module.exports = function updateModel (mode... | var
_ = require('underscore'),
async = require('async'),
curry = require('curry'),
Dependency = require('../models').Dependency,
compHelper = require('./componentHelper'),
compInstall = compHelper.install,
compBuild = compHelper.build;
module.exports = function updateModel (mode... | Return model when finishing updating model | Return model when finishing updating model
| JavaScript | mit | web-audio-components/web-audio-components-service |
347d62cc1eac9d5b58729000df03dc43313708cd | api/script-rules-rule.vm.js | api/script-rules-rule.vm.js | (function() {
var rule = data.rules[parseInt(request.param.num, 10)] || null;
if (rule === null) return response.error(404);
switch (request.method) {
case 'GET':
response.head(200);
response.end(JSON.stringify(rule, null, ' '));
return;
case 'PUT':
if (request.headers['content-type'].match... | (function() {
var num = parseInt(request.param.num, 10).toString(10);
var rule = data.rules[num] || null;
if (rule === null) return response.error(404);
switch (request.method) {
case 'GET':
response.head(200);
response.end(JSON.stringify(rule, null, ' '));
return;
case 'PUT':
if (request.... | Fix rule number parameter check | Fix rule number parameter check
A parameter validation of rule number must be effective in preventing
OS command execution.
| JavaScript | mit | polamjag/Chinachu,kanreisa/Chinachu,kounoike/Chinachu,wangjun/Chinachu,tdenc/Chinachu,wangjun/Chinachu,valda/Chinachu,upsilon/Chinachu,xtne6f/Chinachu,xtne6f/Chinachu,miyukki/Chinachu,kounoike/Chinachu,upsilon/Chinachu,wangjun/Chinachu,xtne6f/Chinachu,polamjag/Chinachu,tdenc/Chinachu,miyukki/Chinachu,valda/Chinachu,ups... |
8ccebea0f071952a40efe56b55853df7b5e21246 | app/models/sequence-item.js | app/models/sequence-item.js | import DS from "ember-data";
export default DS.Model.extend({
page: DS.belongsTo('page'),
section: DS.belongsTo('section'),
sequence: DS.belongsTo('sequence'),
title: DS.attr('string'),
commentary: DS.hasOneFragment('markdown')
});
| import DS from "ember-data";
export default DS.Model.extend({
page: DS.belongsTo('page'),
section: DS.belongsTo('section', {async: true}),
sequence: DS.belongsTo('sequence'),
title: DS.attr('string'),
commentary: DS.hasOneFragment('markdown')
});
| Allow async loading of sections | Allow async loading of sections
| JavaScript | mit | artzte/fightbook-app |
0c410708be0bd112391b0f6f34d0a1cfca39ea85 | addon/engine.js | addon/engine.js | import Engine from 'ember-engines/engine';
import Resolver from 'ember-resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';
const { modulePrefix } = config;
const Eng = Engine.extend({
modulePrefix,
Resolver,
dependencies: {
services: [
'store',... | import Engine from 'ember-engines/engine';
import Resolver from 'ember-resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';
const { modulePrefix } = config;
const Eng = Engine.extend({
modulePrefix,
Resolver
});
loadInitializers(Eng, modulePrefix);
export ... | Revert "recieving store and sessions services" | Revert "recieving store and sessions services"
This reverts commit 185961492fca2d78bc8d8372c7d08aae08d2a166.
| JavaScript | mit | scottharris86/external-admin,scottharris86/external-admin |
fe04cf7da47cb7cec0f127d54dcaa3ad17a960bb | dev/app/components/main/reports/reports.controller.js | dev/app/components/main/reports/reports.controller.js | ReportsController.$inject = [ '$rootScope', 'TbUtils', 'reports' ];
function ReportsController ($rootScope, TbUtils, reports) {
var vm = this;
vm.reports = [
{ title: 'Reporte de Costos', url: 'http://fiasps.unitec.edu:8085/api/Reports/CostsReport/2015' },
{ title: 'Reporte de Horas de Estudiantes', url: 'http:... | ReportsController.$inject = [ '$rootScope', 'TbUtils', 'reports', '$state' ];
function ReportsController ($rootScope, TbUtils, reports, $state) {
if ($rootScope.Role !== 'Admin') $state.go('main.projects');
var vm = this;
vm.reports = [
{ title: 'Reporte de Costos', url: 'http://fiasps.unitec.edu:8085/api/Repor... | Fix who can access reports state | Fix who can access reports state
| JavaScript | mit | Tribu-Anal/Vinculacion-Front-End,Tribu-Anal/Vinculacion-Front-End,Tribu-Anal/Manejo-Horas-de-Vinculacion-UNITEC,Tribu-Anal/Manejo-Horas-de-Vinculacion-UNITEC |
e78f92680c92e0dcde41875741ea707ad1031172 | addon/initializers/syncer.js | addon/initializers/syncer.js | import Syncer from '../syncer';
export function initialize(application) {
application.register('syncer:main', Syncer);
}
export default {
name: 'syncer',
before: 'store',
initialize
};
| import Syncer from '../syncer';
export function initialize(application) {
//Register factory for Syncer.
application.register('syncer:main', Syncer);
}
export default {
name: 'syncer',
before: 'ember-data',
initialize
};
| Fix using of `store` initializer | Fix using of `store` initializer
`store` initializer was added to keep backwards compatibility since
ember-data 2.5.0
| JavaScript | mit | Flexberry/ember-flexberry-offline,Flexberry/ember-flexberry-offline |
b1c0ed1868d8d1aabeb8d76f4fe8d6db10403516 | logic/setting/campaign/writeCampaignSettingModelLogic.js | logic/setting/campaign/writeCampaignSettingModelLogic.js | var configuration = require('../../../config/configuration.json')
var utility = require('../../../public/method/utility')
module.exports = {
setCampaignSettingModel: function (redisClient, campaignHashID, payload, callback) {
}
} | var configuration = require('../../../config/configuration.json')
var utility = require('../../../public/method/utility')
module.exports = {
setCampaignSettingModel: function (redisClient, accountHashID, campaignHashID, payload, callback) {
var table
var score = utility.getUnixTimeStamp()
var multi = red... | Implement Create a Campaign Model Setting Dynamically | Implement Create a Campaign Model Setting Dynamically
| JavaScript | mit | Flieral/Announcer-Service,Flieral/Announcer-Service |
3b3d8b40a5b4dda16440a0262246aa6ff8da4332 | gulp/watch.js | gulp/watch.js | import gulp from 'gulp';
import {build} from './build';
import {test} from './test';
import {makeParser, fixParser} from './parse';
const allSrcGlob = [
'src/**/*.js',
'!src/static/antlr4/parsers/**/*.js',
'test/**/*.js',
];
const allBuildGlob = [
'build/src/*.js',
'build/test/**/*.js',
];
const grammarGlob ... | import gulp from 'gulp';
import {build} from './build';
import {test} from './test';
import {makeParser, fixParser} from './parse';
const allSrcGlob = [
'src/**/*.js',
'!src/static/antlr4/parsers/**/*.js',
'test/**/*.js',
];
const allBuildGlob = [
'build/src/*.js',
'build/test/**/*.js',
];
const grammarGlob ... | Test again when TestudocParser is recreated | Test again when TestudocParser is recreated
| JavaScript | mit | jlenoble/ecmascript-parser |
cac5bc79f106a67c56c00448a8b4408c0f31f6f3 | lib/request.js | lib/request.js | var api = require('../config/api.json');
var appId = process.env.APPLICATION_ID;
var https = require('https');
var querystring = require('querystring');
module.exports = function requestExports(config) {
return request.bind(null, api[config]);
};
function request(config, endpoint, body, callback) {
body.applicati... | var api = require('../config/api.json');
var appId = process.env.APPLICATION_ID;
var https = require('https');
var querystring = require('querystring');
var util = require('util');
module.exports = function requestExports(config) {
return request.bind(null, api[config]);
};
function request(config, endpoint, body, ... | Include all the fields of a wargaming error. | Include all the fields of a wargaming error.
| JavaScript | isc | CodeMan99/wotblitz.js |
37dc947297bb6b630e3442cd93451ab2a88a791b | app/instance-initializers/ember-href-to.js | app/instance-initializers/ember-href-to.js | import Em from 'ember';
function _getNormalisedRootUrl(router) {
let rootURL = router.rootURL;
if(rootURL.charAt(rootURL.length - 1) !== '/') {
rootURL = rootURL + '/';
}
return rootURL;
}
export default {
name: 'ember-href-to',
initialize: function(applicationInstance) {
let router = applicationI... | import Em from 'ember';
function _getNormalisedRootUrl(router) {
let rootURL = router.rootURL;
if(rootURL.charAt(rootURL.length - 1) !== '/') {
rootURL = rootURL + '/';
}
return rootURL;
}
function _lookupRouter(applicationInstance) {
const container = 'lookup' in applicationInstance ? applicationInstan... | Fix router lookup to avoid deprecations in ember >= 2 | Fix router lookup to avoid deprecations in ember >= 2
| JavaScript | apache-2.0 | intercom/ember-href-to,intercom/ember-href-to |
8a199d43edacae40ea7c1f6395dc861f196a59ba | app/GUI/Filter/activeTags.js | app/GUI/Filter/activeTags.js | import React, { Component, PropTypes } from 'react';
import { Button, ButtonGroup } from 'react-bootstrap';
export default class ActiveTags extends Component {
removeTag(tag) {
const { filterObject, position, setFilter } = this.props;
const temp = filterObject[position];
temp.delete(tag);
const newFi... | import React, { Component, PropTypes } from 'react';
import { Button, ButtonGroup } from 'react-bootstrap';
export default class ActiveTags extends Component {
removeTag(tag) {
const { filterObject, position, setFilter } = this.props;
const temp = filterObject[position];
temp.delete(tag);
const newFi... | Change active tags button layout. | Change active tags button layout.
| JavaScript | mit | bgrsquared/places,bgrsquared/places,bgrsquared/places |
b3ee9cd866a0669bfe3776b66a2e2edc7f64931d | app/components/Views/Home.js | app/components/Views/Home.js | /**
* Poster v0.1.0
* A React webapp to list upcoming movies and maintain a watchlist, powered by TMDb
*
* Author: Kushal Pandya <kushalspandya@gmail.com> (https://doublslash.com)
* Date: 01 June, 2016
* License: MIT
*
* React App Main Layout Component
*/
import React from "react";
import Header from "./Head... | /**
* Poster v0.1.0
* A React webapp to list upcoming movies and maintain a watchlist, powered by TMDb
*
* Author: Kushal Pandya <kushalspandya@gmail.com> (https://doublslash.com)
* Date: 01 June, 2016
* License: MIT
*
* React App Main Layout Component
*/
import React from "react";
import Header from "./Head... | Hide Jumbotron on movie details page. | Hide Jumbotron on movie details page.
| JavaScript | mit | kushalpandya/poster,kushalpandya/poster |
d9504ba850c26c779bceae62ea5c903c8f505126 | library/Denkmal/library/Denkmal/Component/MessageList/All.js | library/Denkmal/library/Denkmal/Component/MessageList/All.js | /**
* @class Denkmal_Component_MessageList_All
* @extends Denkmal_Component_MessageList_Abstract
*/
var Denkmal_Component_MessageList_All = Denkmal_Component_MessageList_Abstract.extend({
/** @type String */
_class: 'Denkmal_Component_MessageList_All',
ready: function() {
this.bindStream('global-internal... | /**
* @class Denkmal_Component_MessageList_All
* @extends Denkmal_Component_MessageList_Abstract
*/
var Denkmal_Component_MessageList_All = Denkmal_Component_MessageList_Abstract.extend({
/** @type String */
_class: 'Denkmal_Component_MessageList_All',
ready: function() {
this.bindStream('global-internal... | Add check to not add messages twice | Add check to not add messages twice
| JavaScript | mit | njam/denkmal.org,njam/denkmal.org,denkmal/denkmal.org,njam/denkmal.org,fvovan/denkmal.org,fvovan/denkmal.org,denkmal/denkmal.org,njam/denkmal.org,fvovan/denkmal.org,fvovan/denkmal.org,denkmal/denkmal.org,denkmal/denkmal.org,fvovan/denkmal.org,njam/denkmal.org,denkmal/denkmal.org |
979fc3418b738838ee7187a11cf28ac65371cfb6 | app/components/validations-errors.js | app/components/validations-errors.js | import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['error-messages'],
didInsertElement: function () {
this._super();
Ember.run.next(function(){
var errors = this.get('validationErrors')
, errorsKeys = Ember.keys(errors);
errorsKeys.forEach(function(property... | import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['error-messages'],
didInsertElement: function () {
this._super();
Ember.run.next(function(){
var errors = this.get('validationErrors')
, errorsKeys = Ember.keys(errors);
errorsKeys.forEach(function(property... | Fix problem if it takes long to valdiate | Fix problem if it takes long to valdiate
| JavaScript | mit | alexferreira/ember-cli-validations-errors |
26cd6df2d95a4d81968d01b06144d6aeddcf5863 | index.js | index.js | module.exports = compressible
compressible.specs =
compressible.specifications = require('./specifications.json')
compressible.regex =
compressible.regexp = /json|text|javascript|dart|ecmascript|xml/
compressible.get = get
function compressible(type) {
if (!type || typeof type !== "string") return false
var i =... | module.exports = compressible
compressible.specs =
compressible.specifications = require('./specifications.json')
compressible.regex =
compressible.regexp = /json|text|javascript|dart|ecmascript|xml/
compressible.get = get
function compressible(type) {
if (!type || typeof type !== "string") return false
var i =... | Use ~ operator to check for -1 | [minor] Use ~ operator to check for -1
This is mainly a style change as other expressjs modules use this.
Performance is mostly indifferent.
However, this tests specifically for -1.
| JavaScript | mit | jshttp/compressible |
67aaa90ac0564920d8a65db7129a0e32804bdaea | index.js | index.js | import express from 'express';
import http from 'http';
import {renderFile} from 'ejs';
import request from 'superagent';
var app = express();
var FRIGG_API = process.env.FRIGG_API || 'https://ci.frigg.io';
app.engine('html', renderFile);
app.set('view engine', 'html');
app.set('views', '' + __dirname);
app.use('/st... | import express from 'express';
import http from 'http';
import {renderFile} from 'ejs';
import request from 'superagent';
var app = express();
var FRIGG_API = process.env.FRIGG_API || 'https://ci.frigg.io';
app.engine('html', renderFile);
app.set('view engine', 'html');
app.set('views', '' + __dirname);
app.use('/st... | Add caching of proxy requests in dev server | Add caching of proxy requests in dev server
| JavaScript | mit | frigg/frigg-hq-frontend,frigg/frigg-hq-frontend |
c39d828243e5e00b997c703e6ed41912ea7da6c5 | packages/@sanity/base/src/preview/PreviewMaterializer.js | packages/@sanity/base/src/preview/PreviewMaterializer.js | import React, {PropTypes} from 'react'
import observeForPreview from './observeForPreview'
import shallowEquals from 'shallow-equals'
export default class PreviewMaterializer extends React.PureComponent {
static propTypes = {
value: PropTypes.any.isRequired,
type: PropTypes.shape({
preview: PropTypes.s... | import React, {PropTypes} from 'react'
import observeForPreview from './observeForPreview'
import shallowEquals from 'shallow-equals'
export default class PreviewMaterializer extends React.PureComponent {
static propTypes = {
value: PropTypes.any.isRequired,
type: PropTypes.shape({
preview: PropTypes.s... | Set subscription to null after unsubscribe | [preview] Set subscription to null after unsubscribe
| JavaScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity |
8e7bfe3b0c136794de0be1802fdf9e8a90f7645d | embeds/buffer-tpc-check.js | embeds/buffer-tpc-check.js | /* globals self, bufferpm, chrome */
// buffer-tpc-check.js
// (c) 2013 Sunil Sadasivan
// Check if third party cookies are disabled
//
;(function () {
if (window !== window.top) return;
;(function check() {
if((self.port) || (xt && xt.options)) {
//if the 3rd party cookies check is disabled, store ... | /* globals self, bufferpm, chrome */
// buffer-tpc-check.js
// (c) 2013 Sunil Sadasivan
// Check if third party cookies are disabled
//
;(function () {
if (window !== window.top) return;
;(function check() {
if((self.port) || (xt && xt.options)) {
//if the 3rd party cookies check is disabled, store ... | Add info inside TPC check iframe attribute for curious eyes | Add info inside TPC check iframe attribute for curious eyes
| JavaScript | mit | bufferapp/buffer-extension-shared,bufferapp/buffer-extension-shared |
683ba6fcaf2072bfe7f7884b81bf04a3899c6d60 | Response.js | Response.js | 'use strict'
class Response {
constructor(messenger, msg) {
this.messenger = messenger
this.queue = msg.properties.replyTo
this.corr = msg.properties.correlationId
}
send (msg) {
if(this.queue){
this.messenger.publish(this.queue, msg)
}
}
ok (payload) {
this.send({
stat... | 'use strict'
class Response {
constructor(messenger, msg) {
this.messenger = messenger
this.queue = msg.properties.replyTo
this.corr = msg.properties.correlationId
}
send (msg) {
if(this.queue){
this.messenger.publish(this.queue, msg)
}
}
ok (payload) {
this.send({
stat... | Add notify to actor service | Add notify to actor service
| JavaScript | mit | domino-logic/domino-actor-service |
d01d51c6e3d8d7dcc7a72384277bee95db813474 | client/app/components/dnt-hytteadmin-editor-section-kontakt.js | client/app/components/dnt-hytteadmin-editor-section-kontakt.js | import Ember from 'ember';
export default Ember.Component.extend({
});
| import Ember from 'ember';
export default Ember.Component.extend({
actions: {
setKontaktinfoGruppeById: function (id) {
var model = this.get('model');
if (typeof model.setKontaktinfoGruppeById) {
model.setKontaktinfoGruppeById(id);
}
}
}
});
| Add action for setting kontaktinfo by group id | Add action for setting kontaktinfo by group id
| JavaScript | mit | Turistforeningen/Hytteadmin,Turistforeningen/Hytteadmin |
9d576f6f805f5a6a72319fc1f690d9520abd215a | packages/redux-resource/src/action-types/action-types.js | packages/redux-resource/src/action-types/action-types.js | export default {
REQUEST_IDLE: 'REQUEST_IDLE',
REQUEST_PENDING: 'REQUEST_PENDING',
REQUEST_FAILED: 'REQUEST_FAILED',
REQUEST_SUCCEEDED: 'REQUEST_SUCCEEDED',
UPDATE_RESOURCES: 'UPDATE_RESOURCES',
};
| export default {
REQUEST_IDLE: 'REQUEST_IDLE',
// These will be used in Redux Resource v3.1.0. For now,
// they are reserved action types.
// REQUEST_PENDING: 'REQUEST_PENDING',
// REQUEST_FAILED: 'REQUEST_FAILED',
// REQUEST_SUCCEEDED: 'REQUEST_SUCCEEDED',
// UPDATE_RESOURCES: 'UPDATE_RESOURCES',
};
| Comment out reserved action types | Comment out reserved action types
| JavaScript | mit | jmeas/resourceful-redux,jmeas/resourceful-redux |
223b0dd3ba63184336d615150c945bb52941c17a | packages/create-universal-package/lib/config/build-shared.js | packages/create-universal-package/lib/config/build-shared.js | const template = ({env, format, esEdition}) => `${env}.${format}.${esEdition}.js`;
const formats = ['es', 'cjs'];
module.exports = {
template,
formats,
};
| const template = ({env, format, esEdition}) => `${env}.${format}${esEdition ? `.${esEdition}` : ''}.js`;
const formats = ['es', 'cjs'];
module.exports = {
template,
formats,
};
| Fix output filepath in non-ES2015 bundles | Fix output filepath in non-ES2015 bundles
| JavaScript | mit | rtsao/create-universal-package,rtsao/create-universal-package |
a392baf961f197b8268ec0666b898f82d33b35fa | app/assets/javascripts/les/profile_matrix_editor/template_updater/battery_template_updater.js | app/assets/javascripts/les/profile_matrix_editor/template_updater/battery_template_updater.js | var BatteryTemplateUpdater = (function () {
'use strict';
var defaultPercentage = 20.0,
batteryToggles = ".editable.profile",
batteries = [
"congestion_battery",
"households_flexibility_p2p_electricity"
],
sliderSettings = {
tooltip: 'hide',
... | var BatteryTemplateUpdater = (function () {
'use strict';
var defaultPercentage = 20.0,
batteryToggles = ".editable.profile",
batteries = [
"congestion_battery",
"households_flexibility_p2p_electricity"
],
sliderSettings = {
tooltip: 'hide',
... | Set slider value when adding a new congestion battery | Set slider value when adding a new congestion battery
This would work when editing an existing battery, but without triggering
the event manually it would default to 0% when adding a new battery.
| JavaScript | mit | quintel/etmoses,quintel/etmoses,quintel/etmoses,quintel/etmoses,quintel/etmoses |
cbb2235784307d250b6320ab8bb262da3c2fb686 | client/app/scripts/services/application.js | client/app/scripts/services/application.js | angular.module('app').factory('applicationService', ['$http', 'MARLINAPI_CONFIG',
function($http, MARLINAPI_CONFIG) {
var url = MARLINAPI_CONFIG.base_url;
// create and expose service methods
var exports = {};
// get all items
exports.getAll = function() {
retu... | angular.module('app').factory('applicationService', ['$http', 'MARLINAPI_CONFIG',
function($http, MARLINAPI_CONFIG) {
var url = MARLINAPI_CONFIG.base_url;
// create and expose service methods
var exports = {};
// Generic find functionality
exports.find = function(query) {
... | Add flexible find Application service | Add flexible find Application service | JavaScript | mit | brettshollenberger/mrl001,brettshollenberger/mrl001 |
4758be5962095ad86055cd0083fa9f8961f11fb7 | app/components/RecipeList.js | app/components/RecipeList.js | var React = require('react');
var Parse = require('parse');
var ParseReact = require('parse-react');
var RecipeList = new React.createClass({
mixins: [ParseReact.Mixin],
observe: function() {
return {
recipes: (new Parse.Query('Recipe')).equalTo("createdBy", Parse.User.current().id)
};
},
render: functi... | var React = require('react');
var Parse = require('parse');
var RecipeStore = require('../stores/RecipeStore');
var RecipeItem = require('./RecipeItem');
var RecipeList = new React.createClass({
getInitialState: function() {
return {
ownedRecipes: null
};
},
componentDidMount: function() {
RecipeStore.g... | Add recipe list to overview view | Add recipe list to overview view
| JavaScript | mit | bspride/ModernCookbook,bspride/ModernCookbook,bspride/ModernCookbook |
157db3722cc41586c41c115227be619ea62a0788 | desktop/app/main-window.js | desktop/app/main-window.js | import Window from './window'
import {ipcMain} from 'electron'
import resolveRoot from '../resolve-root'
import hotPath from '../hot-path'
import flags from '../shared/util/feature-flags'
import {globalResizing} from '../shared/styles/style-guide'
export default function () {
const mainWindow = new Window(
resol... | import Window from './window'
import {ipcMain} from 'electron'
import resolveRoot from '../resolve-root'
import hotPath from '../hot-path'
import flags from '../shared/util/feature-flags'
import {globalResizing} from '../shared/styles/style-guide'
export default function () {
const mainWindow = new Window(
resol... | Use content size when creating the main window | Use content size when creating the main window
| JavaScript | bsd-3-clause | keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client |
4709f623b41dffe1ad227908e3f92782987bbfa9 | server/models/card/card.js | server/models/card/card.js | 'use strict';
var mongoose = require('mongoose');
const WAITING_FOR_PRINT = 'WAITING_FOR_PRINT';
const PRINTED_WAITING_FOR_SEND = 'PRINTED_WAITING_FOR_SEND';
const SENT = 'SENT';
var statusKeys = [
WAITING_FOR_PRINT,
PRINTED_WAITING_FOR_SEND,
SENT
];
var cardSchema = mongoose.Schema({
message: Stri... | 'use strict';
var mongoose = require('mongoose');
const WAITING_FOR_PRINT = 'WAITING_FOR_PRINT';
const PRINTED_WAITING_FOR_SEND = 'PRINTED_WAITING_FOR_SEND';
const SENT = 'SENT';
var statusKeys = [
WAITING_FOR_PRINT,
PRINTED_WAITING_FOR_SEND,
SENT
];
var cardSchema = mongoose.Schema({
message: { typ... | Make message field as required | Make message field as required
| JavaScript | mit | denisnarush/postcard,denisnarush/postcard |
dfb7fd375cc6e073df2add406c9ca3e81fe211d0 | js/scripts.js | js/scripts.js | // DOM Ready
$(function() {
// SVG fallback
// toddmotto.com/mastering-svg-use-for-a-retina-web-fallbacks-with-png-script#update
if (!Modernizr.svg) {
var imgs = document.getElementsByTagName('img');
for (var i = 0; i < imgs.length; i++) {
if (/.*\.svg$/.test(imgs[i].src)) {
imgs[i].src = imgs[i].src.sli... | // DOM Ready
jQuery(document).ready(function($) {
// SVG fallback
// toddmotto.com/mastering-svg-use-for-a-retina-web-fallbacks-with-png-script#update
if (!Modernizr.svg) {
var imgs = document.getElementsByTagName('img');
for (var i = 0; i < imgs.length; i++) {
if (/.*\.svg$/.test(imgs[i].src)) {
imgs[i]... | Handle jQuery in noConflict mode. | Handle jQuery in noConflict mode.
See: http://api.jquery.com/ready/
| JavaScript | mit | martinleopold/prcs-website,martinleopold/prcs-website |
a774ca427a200270c770dd278d55119cb31de65c | src/containers/Console.js | src/containers/Console.js | import {connect} from 'react-redux';
import Console from '../components/Console';
import {
getCurrentCompiledProjectKey,
getConsoleHistory,
getCurrentProjectKey,
getHiddenUIComponents,
getRequestedFocusedLine,
isCurrentProjectSyntacticallyValid,
isExperimental,
isTextSizeLarge,
} from '../selectors';
im... | import {connect} from 'react-redux';
import Console from '../components/Console';
import {
getCurrentCompiledProjectKey,
getConsoleHistory,
getCurrentProjectKey,
getHiddenUIComponents,
getRequestedFocusedLine,
isCurrentProjectSyntacticallyValid,
isExperimental,
isTextSizeLarge,
} from '../selectors';
im... | Fix console input focus on clearing. | Fix console input focus on clearing.
| JavaScript | mit | outoftime/learnpad,outoftime/learnpad,jwang1919/popcode,jwang1919/popcode,popcodeorg/popcode,jwang1919/popcode,popcodeorg/popcode,jwang1919/popcode,popcodeorg/popcode,popcodeorg/popcode |
98216fdd8b2cbd8d62b2c04884939923e5719437 | examples/src/controller.js | examples/src/controller.js | import inputData from './data.js';
import infiniteDivs from '../../lib/infinitedivs.js';
let rootElement = document.body;
function divGenerator(item) {
let div = document.createElement('div'),
img = document.createElement('img'),
span = document.createElement('span');
img.setAttribute('src', item.img);
... | import inputData from './data.js';
import infiniteDivs from '../../lib/infinitedivs.js';
let rootElement = document.body;
function divGenerator(item) {
let div = document.createElement('div'),
img = document.createElement('img'),
span = document.createElement('span');
img.setAttribute('src', item.img);
... | Add border bottom to divs. | Add border bottom to divs.
| JavaScript | mit | supreetpal/infinite-divs,supreetpal/infinite-divs |
68fd319b09b021742ad309255d6a444a655a6fee | babel.config.js | babel.config.js | module.exports = {
presets: ["es2015-node4", "stage-0", "react"],
plugins: [
"add-module-exports",
["transform-async-to-module-method", {
module: "bluebird",
method: "coroutine"
}]
],
ignore: false,
only: /.es$/
}
| module.exports = {
presets: ["es2015-node4", "react"],
plugins: [
"add-module-exports",
["transform-async-to-module-method", {
module: "bluebird",
method: "coroutine"
}]
],
ignore: false,
only: /.es$/
}
| Remove babel-stage-0 preset to prevent crash in Electron 1.x | Remove babel-stage-0 preset to prevent crash in Electron 1.x
| JavaScript | mit | PHELiOX/poi,poooi/poi,syncsyncsynchalt/poi,yudachi/poi,syncsyncsynchalt/poi,KagamiChan/poi,poooi/poi,poooi/poi,poooi/poi,gnattu/poi,syncsyncsynchalt/poi,syncsyncsynchalt/poi,yudachi/poi,yudachi/poi,gnattu/poi,PHELiOX/poi,KagamiChan/poi,nagatoyk/poi,nagatoyk/poi |
86b3ad30b978d227bd3b596d176c8d11b2a1995d | forum-web-app/src/ui.js | forum-web-app/src/ui.js | "use strict";
// src/ui.js
let ui = {
renderPosts(posts) {
console.log(posts);
}
};
export { ui };
| "use strict";
// src/ui.js
let ui = {
renderPosts(posts) {
let elements = posts.map( (post) => {
let { title, lastReply } = post;
return articleTemplate(title, lastReply);
});
let target = document.querySelector(".container");
target.innerHTML = elements.join("");
}
};
function arti... | Add articleTemplate method. Edit renderPosts | Add articleTemplate method. Edit renderPosts
| JavaScript | mit | var-bin/reactjs-training,var-bin/reactjs-training,var-bin/reactjs-training |
cf0cb38ea897541e667193ca2699ecf5e3caaacc | app/src/js/modules/events.js | app/src/js/modules/events.js | /**
* Events.
*
* @mixin
* @namespace Bolt.events
*
* @param {Object} bolt - The Bolt module.
*/
(function (bolt) {
'use strict';
/*
* Bolt.events mixin container.
*
* @private
* @type {Object}
*/
var events = {};
/*
* Event broker object.
*
* @private
... | /**
* Events.
*
* @mixin
* @namespace Bolt.events
*
* @param {Object} bolt - The Bolt module.
*/
(function (bolt) {
'use strict';
/*
* Bolt.events mixin container.
*
* @private
* @type {Object}
*/
var events = {};
/*
* Event broker object.
*
* @private
... | Use jQuery nomenclature (event => eventType) | Use jQuery nomenclature (event => eventType) | JavaScript | mit | GawainLynch/bolt,nikgo/bolt,rarila/bolt,CarsonF/bolt,lenvanessen/bolt,romulo1984/bolt,electrolinux/bolt,Intendit/bolt,bolt/bolt,rarila/bolt,lenvanessen/bolt,electrolinux/bolt,Raistlfiren/bolt,GawainLynch/bolt,romulo1984/bolt,Raistlfiren/bolt,GawainLynch/bolt,lenvanessen/bolt,Raistlfiren/bolt,HonzaMikula/masivnipostele,... |
7d84aa5b1d0c2af75abf70e556470cb67b79b19a | spec/filesize-view-spec.js | spec/filesize-view-spec.js | 'use babel';
import filesizeView from '../lib/filesize-view';
describe('View', () => {
// Disable tooltip for these tests
atom.config.set('filesize.EnablePopupAppearance', false);
const workspaceView = atom.views.getView(atom.workspace);
const view = filesizeView(workspaceView);
describe('when refreshing t... | 'use babel';
import filesizeView from '../lib/filesize-view';
describe('View', () => {
const workspaceView = atom.views.getView(atom.workspace);
const view = filesizeView(workspaceView);
describe('when refreshing the view', () => {
it('should display the human readable size', () => {
workspaceView.ap... | Add config change test to the View spec | Add config change test to the View spec
| JavaScript | mit | mkautzmann/atom-filesize |
05b14b3f817f0cffb06ade8f1ff82bfff177c6bd | starting-angular/starting-angular/cards/cards_usesStaticJSON_cleanestVersion/js/directives.js | starting-angular/starting-angular/cards/cards_usesStaticJSON_cleanestVersion/js/directives.js | /*global cardApp*/
/*jslint unparam: true */
(function () {
'use strict';
// Implements custom validation for card number.
var INTEGER_REGEXP = /^([aAkKjJQq23456789]{1}|(10){1})$/;
cardApp.directive('integer', function () {
return {
require: 'ngModel',
link: function (s... | /*global cardApp*/
/*jslint unparam: true */
cardApp.directive('integer', function () {
'use strict';
// Implements custom validation for card number.
var INTEGER_REGEXP = /^([aAkKjJQq23456789]{1}|(10){1})$/;
return {
require: 'ngModel',
link: function (scope, elm, attrs, ctrl) {
... | Use the angular module pattern instead of using a closure. | Use the angular module pattern instead of using a closure.
| JavaScript | unlicense | bigfont/DevTeach2013,bigfont/DevTeach2013 |
749b9d4b89c9e34808b4d4e8ce5600703ce16464 | clientapp/views/pathway.js | clientapp/views/pathway.js | var HumanView = require('human-view');
var templates = require('../templates');
module.exports = HumanView.extend({
template: templates.pathway,
events: {
'dragstart .columns': 'drag',
'dragover .columns': 'over',
'dragenter .columns': 'enter',
'dragleave .columns': 'leave',
'drop .columns': 'd... | var HumanView = require('human-view');
var templates = require('../templates');
module.exports = HumanView.extend({
template: templates.pathway,
events: {
'dragstart .columns': 'drag',
'dragover .columns': 'over',
'dragenter .columns': 'enter',
'dragleave .columns': 'leave',
'drop .columns': 'd... | Make it work in IE10 | Make it work in IE10
| JavaScript | mpl-2.0 | mozilla/openbadges-discovery |
85168befaaab2563b91345867087d51789a88dff | client/app/common/global-events/global-events.factory.js | client/app/common/global-events/global-events.factory.js | let GlobalEvents = () => {
let events = {};
return {
off: (eventHandle) => {
let index = events[eventHandle.eventName].findIndex((singleEventHandler) => {
return singleEventHandler.id !== eventHandle.handlerId;
});
events[eventHandle.eventName].splic... | let GlobalEvents = () => {
let events = {};
return {
off: (eventHandle) => {
let index = events[eventHandle.eventName].findIndex((singleEventHandler) => {
return singleEventHandler.id !== eventHandle.handlerId;
});
events[eventHandle.eventName].splic... | Fix trigger exception when no listeners specified | Fix trigger exception when no listeners specified
| JavaScript | apache-2.0 | zbicin/word-game,zbicin/word-game |
2eeb2979a6d7dc1ce5f5559f7437b90b2246c72f | src/DynamicCodeRegistry.js | src/DynamicCodeRegistry.js | /*
Keep track of
*/
import Backbone from "backbone"
import _ from "underscore"
export default class DynamicCodeRegistry {
constructor(){
_.extend(this, Backbone.Events)
this._content = {};
this._origins = {}
}
register(filename, content, origin){
this._content[filename]... | /*
Keep track of
*/
import Backbone from "backbone"
import _ from "underscore"
export default class DynamicCodeRegistry {
constructor(){
_.extend(this, Backbone.Events)
this._content = {};
this._origins = {}
}
register(filename, content, origin){
this._content[filename]... | Fix detecting if it's a dynamic files... script tags from the original html were previously incorrectly identified as dynamic files. | Fix detecting if it's a dynamic files... script tags from the original html were previously incorrectly identified as dynamic files.
| JavaScript | mit | mattzeunert/FromJS,mattzeunert/FromJS,mattzeunert/FromJS,mattzeunert/FromJS |
447241fc88b42a03b9091da7066e7e58a414e3a2 | src/geojson.js | src/geojson.js | module.exports.point = justType('Point', 'POINT');
module.exports.line = justType('LineString', 'POLYLINE');
module.exports.polygon = justType('Polygon', 'POLYGON');
function justType(type, TYPE) {
return function(gj) {
var oftype = gj.features.filter(isType(type));
return {
geometries:... | module.exports.point = justType('Point', 'POINT');
module.exports.line = justType('LineString', 'POLYLINE');
module.exports.polygon = justType('Polygon', 'POLYGON');
function justType(type, TYPE) {
return function(gj) {
var oftype = gj.features.filter(isType(type));
return {
geometries:... | Add type check for polygon and polyline arrays | fix(output): Add type check for polygon and polyline arrays
Added a type check to properly wrap polygon and polyline arrays | JavaScript | bsd-3-clause | mapbox/shp-write,mapbox/shp-write |
0b7ec05717cf6c89e9cbe307bec611326c19ae43 | js/metronome.js | js/metronome.js | function Metronome(tempo, beatsPerMeasure){
this.tempo = Number(tempo);
this.beatsPerMeasure = Number(beatsPerMeasure);
this.interval = null;
}
Metronome.prototype.start = function(){
var millisecondsToWait = this.tempoToMilliseconds(this.tempo);
this.interval = window.setInterval(soundAndCounter, millisecon... | function Metronome(tempo, beatsPerMeasure){
this.tempo = Number(tempo);
this.beatsPerMeasure = Number(beatsPerMeasure);
this.interval = null;
}
Metronome.prototype.start = function(){
var millisecondsToWait = this.tempoToMilliseconds(this.tempo);
this.interval = window.setInterval(soundAndCounter, millisecon... | Add reference to counter in stop method | Add reference to counter in stop method
| JavaScript | mit | dmilburn/beatrice,dmilburn/beatrice |
ab53bc3e982b21a24fa7a0b36d43d98213ffbb7c | lib/winston-syslog-ain2.js | lib/winston-syslog-ain2.js | /*
* MIT LICENCE
*/
var util = require('util'),
winston = require('winston'),
SysLogger = require("ain2");
var ain;
var SyslogAin2 = exports.SyslogAin2 = function (options) {
winston.Transport.call(this, options);
options = options || {};
ain = new SysLogger(options);
};
util.inherits(SyslogAin2, wi... | /*
* MIT LICENCE
*/
var util = require('util'),
winston = require('winston'),
SysLogger = require("ain2");
var SyslogAin2 = exports.SyslogAin2 = function (options) {
winston.Transport.call(this, options);
options = options || {};
this.ain = new SysLogger(options);
};
util.inherits(SyslogAin2, winston... | Fix bug that the old settings of the ain2 is got replaced | Fix bug that the old settings of the ain2 is got replaced
| JavaScript | mit | lamtha/winston-syslog-ain2 |
ec7c6848b01a3e6288b3d5326ca9df677052f7da | lib/action.js | lib/action.js | var _ = require('lodash-node');
var Action = function(name, two, three, four) {
var options, run, helpers;
// Syntax .extend('action#method', function() { ... }, {})
if ( typeof two == 'function' ) {
options = {};
run = two;
helpers = three;
}
// Syntax .extend('action#method', {}, function() {... | var _ = require('lodash-node');
var Action = function(name, two, three, four) {
var options, run, helpers;
// Syntax .extend('action#method', function() { ... }, {})
if ( typeof two == 'function' ) {
options = {};
run = two;
helpers = three;
}
// Syntax .extend('action#method', {}, function() {... | Add connection parameter and change req to request | Add connection parameter and change req to request
| JavaScript | mit | alexparker/actionpack |
cd0341613c11d07d2c9990adb12635f4e7809dfc | list/source/package.js | list/source/package.js | enyo.depends(
"Selection.js",
"FlyweightRepeater.js",
"List.css",
"List.js",
"PulldownList.css",
"PulldownList.js"
); | enyo.depends(
"FlyweightRepeater.js",
"List.css",
"List.js",
"PulldownList.css",
"PulldownList.js"
); | Remove enyo.Selection from layout library, moved into enyo base-UI | Remove enyo.Selection from layout library, moved into enyo base-UI
| JavaScript | apache-2.0 | enyojs/layout |
465e33e170a10ad39c3948cb9bcb852bd5705f91 | src/ol/style/fillstyle.js | src/ol/style/fillstyle.js | goog.provide('ol.style.Fill');
goog.require('ol.color');
/**
* @constructor
* @param {olx.style.FillOptions} options Options.
*/
ol.style.Fill = function(options) {
/**
* @type {ol.Color|string}
*/
this.color = goog.isDef(options.color) ? options.color : null;
};
| goog.provide('ol.style.Fill');
goog.require('ol.color');
/**
* @constructor
* @param {olx.style.FillOptions=} opt_options Options.
*/
ol.style.Fill = function(opt_options) {
var options = goog.isDef(opt_options) ? opt_options : {};
/**
* @type {ol.Color|string}
*/
this.color = goog.isDef(options.co... | Make options argument to ol.style.Fill optional | Make options argument to ol.style.Fill optional
| JavaScript | bsd-2-clause | das-peter/ol3,adube/ol3,mzur/ol3,xiaoqqchen/ol3,Distem/ol3,gingerik/ol3,antonio83moura/ol3,gingerik/ol3,itayod/ol3,bjornharrtell/ol3,tsauerwein/ol3,Antreasgr/ol3,klokantech/ol3raster,pmlrsg/ol3,das-peter/ol3,landonb/ol3,t27/ol3,kkuunnddaannkk/ol3,freylis/ol3,fredj/ol3,Andrey-Pavlov/ol3,kjelderg/ol3,geonux/ol3,elemoine/... |
4f2ecb38e7eed9706dd4709915a532bdb5a943f2 | rcmet/src/main/ui/test/unit/services/RegionSelectParamsTest.js | rcmet/src/main/ui/test/unit/services/RegionSelectParamsTest.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 ... | Resolve CLIMATE-147 - Add tests for regionSelectParams service | Resolve CLIMATE-147 - Add tests for regionSelectParams service
- Add getParameters test.
git-svn-id: https://svn.apache.org/repos/asf/incubator/climate/trunk@1496037 13f79535-47bb-0310-9956-ffa450edef68
Former-commit-id: 3d2be98562f344323a5532ca5757850d175ba25c | JavaScript | apache-2.0 | jarifibrahim/climate,apache/climate,Omkar20895/climate,huikyole/climate,MJJoyce/climate,lewismc/climate,MJJoyce/climate,jarifibrahim/climate,kwhitehall/climate,pwcberry/climate,riverma/climate,MJJoyce/climate,agoodm/climate,riverma/climate,agoodm/climate,MBoustani/climate,MBoustani/climate,riverma/climate,lewismc/clima... |
9750b5683e1a545a66251e78e07ef6b362a8b6d8 | browser/main.js | browser/main.js | const electron = require('electron');
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
const Menu = electron.Menu;
var menu = require('./menu');
var argv = require('optimist').argv;
let mainWindow;
app.on('ready', function() {
mainWindow = new BrowserWindow({
center: true,
... | const electron = require('electron');
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
const Menu = electron.Menu;
var menu = require('./menu');
var argv = require('optimist').argv;
let mainWindow;
app.on('ready', function() {
mainWindow = new BrowserWindow({
center: true,
... | Add icon that works for linux apps also | Add icon that works for linux apps also
| JavaScript | lgpl-2.1 | GMOD/jbrowse,GMOD/jbrowse,GMOD/jbrowse,nathandunn/jbrowse,nathandunn/jbrowse,nathandunn/jbrowse,GMOD/jbrowse,GMOD/jbrowse,nathandunn/jbrowse,nathandunn/jbrowse |
f5d144abff50c9044cbfeeec16c8169a361aec1c | packages/@sanity/server/src/configs/postcssPlugins.js | packages/@sanity/server/src/configs/postcssPlugins.js | import lost from 'lost'
import postcssUrl from 'postcss-url'
import postcssImport from 'postcss-import'
import postcssCssnext from 'postcss-cssnext'
import resolveStyleImport from '../util/resolveStyleImport'
export default options => {
const styleResolver = resolveStyleImport({from: options.basePath})
const impor... | import path from 'path'
import lost from 'lost'
import postcssUrl from 'postcss-url'
import postcssImport from 'postcss-import'
import postcssCssnext from 'postcss-cssnext'
import resolveStyleImport from '../util/resolveStyleImport'
const absolute = /^(\/|\w+:\/\/)/
const isAbsolute = url => absolute.test(url)
export... | Use custom way to resolve URLs for file assets that are relative | [server] Use custom way to resolve URLs for file assets that are relative
| JavaScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity |
f0d73e072691c7ae4ee848c7ef0868aebd6c8ce4 | components/prism-docker.js | components/prism-docker.js | Prism.languages.docker = {
'keyword': {
pattern: /(^\s*)(?:ONBUILD|FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|COPY|VOLUME|USER|WORKDIR|CMD|LABEL|ENTRYPOINT)(?=\s)/mi,
lookbehind: true
},
'string': /("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*?\1/,
'comment': /#.*/,
'punctuation': /---|\.\.\.|[:[\]{}\-,|>?]/
};
Prism.l... | Prism.languages.docker = {
'keyword': {
pattern: /(^\s*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)/mi,
lookbehind: true
},
'string': /("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*?\1/,
'comment': /#.*/,
'punctuation': /---|\... | Update the list of keywords for dockerfiles | Update the list of keywords for dockerfiles
| JavaScript | mit | PrismJS/prism,mAAdhaTTah/prism,PrismJS/prism,CupOfTea696/prism,mAAdhaTTah/prism,PrismJS/prism,byverdu/prism,PrismJS/prism,byverdu/prism,CupOfTea696/prism,mAAdhaTTah/prism,mAAdhaTTah/prism,mAAdhaTTah/prism,PrismJS/prism,CupOfTea696/prism,byverdu/prism,byverdu/prism,CupOfTea696/prism,CupOfTea696/prism,byverdu/prism |
030b97c50a57e1487b8459f91ee4a220810a8a63 | babel.config.js | babel.config.js | require("@babel/register")({
only: [
"src",
/node_modules\/alekhine/
]
})
module.exports = {
presets: [
"@babel/preset-env"
],
plugins: [
"@babel/plugin-transform-runtime",
"@babel/plugin-proposal-object-rest-spread",
"add-filehash", [
"transform-imports",
{
vueti... | module.exports = {
presets: [
"@babel/preset-env"
],
plugins: [
"@babel/plugin-transform-runtime",
"@babel/plugin-proposal-object-rest-spread",
"add-filehash", [
"transform-imports",
{
vuetify: {
transform: "vuetify/src/components/${member}",
preventFullImp... | Revert "compile alekhine as needed in development" | Revert "compile alekhine as needed in development"
This reverts commit 917d5d50fd6ef0bbf845efa0bf13a2adba2fe58a.
| JavaScript | mit | sonnym/bughouse,sonnym/bughouse |
27982b6392b8dcd2adc22fb0db7eb0aecab0f62a | test/algorithms/sorting/testHeapSort.js | test/algorithms/sorting/testHeapSort.js | /* eslint-env mocha */
const HeapSort = require('../../../src').algorithms.Sorting.HeapSort;
const assert = require('assert');
describe('HeapSort', () => {
it('should have no data when empty initialization', () => {
const inst = new HeapSort();
assert.equal(inst.size, 0);
assert.deepEqual(inst.unsortedLi... | /* eslint-env mocha */
const HeapSort = require('../../../src').algorithms.Sorting.HeapSort;
const assert = require('assert');
describe('HeapSort', () => {
it('should have no data when empty initialization', () => {
const inst = new HeapSort();
assert.equal(inst.size, 0);
assert.deepEqual(inst.unsortedLi... | Test Heap Sort: Sort array with equal vals | Test Heap Sort: Sort array with equal vals
| JavaScript | mit | ManrajGrover/algorithms-js |
6a408d16822f596bedeb524912471845ced74048 | ckanext/ckanext-apicatalog_ui/ckanext/apicatalog_ui/fanstatic/cookieconsent/ckan-cookieconsent.js | ckanext/ckanext-apicatalog_ui/ckanext/apicatalog_ui/fanstatic/cookieconsent/ckan-cookieconsent.js | window.cookieconsent.initialise({
container: document.getElementById("cookie_consent"),
position: "top",
type: "opt-in",
static: false,
theme: "suomifi",
onInitialise: function (status){
let type = this.options.type;
let didConsent = this.hasConsented();
if (type === 'opt... | ckan.module('cookie_consent', function (jQuery){
return {
initialize: function() {
window.cookieconsent.initialise({
container: document.getElementById("cookie_consent"),
position: "top",
type: "opt-in",
static: false,
... | Add translations to cookie popup | LIKA-244: Add translations to cookie popup
| JavaScript | mit | vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog |
771e7c0d485a6a0e45d550d555beb500e256ebde | react/react-practice/src/actions/lifeCycleActions.js | react/react-practice/src/actions/lifeCycleActions.js | import {firebaseApp,firebaseAuth,firebaseDb, firebaseStorage, firebaseAuthInstance } from '../components/Firebase.js'
import { browserHistory } from 'react-router';
export function goToNextState() {
return function(dispatch) {
dispatch({type: "GET_SCHEDULE"})
}
}
export function testPromise() {
let response = ne... | import {firebaseApp,firebaseAuth,firebaseDb, firebaseStorage, firebaseAuthInstance } from '../components/Firebase.js'
import { browserHistory } from 'react-router';
export function goToNextState() {
return function(dispatch) {
dispatch({type: "GET_SCHEDULE"})
}
}
export function testPromise() {
let response = ne... | Test promise in the actions | Test promise in the actions | JavaScript | mit | jeremykid/FunAlgorithm,jeremykid/FunAlgorithm,jeremykid/FunAlgorithm,jeremykid/FunAlgorithm |
b9ed588780e616228d133b91117b80930d658140 | src/components/PlaybackCtrl/PlaybackCtrlContainer.js | src/components/PlaybackCtrl/PlaybackCtrlContainer.js | import { connect } from 'react-redux'
import PlaybackCtrl from './PlaybackCtrl'
import { requestPlay, requestPause, requestVolume, requestPlayNext } from 'store/modules/status'
// Object of action creators (can also be function that returns object).
const mapActionCreators = {
requestPlay,
requestPlayNext,
requ... | import { connect } from 'react-redux'
import PlaybackCtrl from './PlaybackCtrl'
import { requestPlay, requestPause, requestVolume, requestPlayNext } from 'store/modules/status'
// Object of action creators (can also be function that returns object).
const mapActionCreators = {
requestPlay,
requestPlayNext,
requ... | Add missing status prop for PlaybackCtrl | Add missing status prop for PlaybackCtrl
| JavaScript | isc | bhj/karaoke-forever,bhj/karaoke-forever |
66b91190f513893efbe7eef9beba1925e32a44d5 | lib/build-navigation/index.js | lib/build-navigation/index.js | 'use strict';
const path = require('path');
const buildNavigation = function(styleguideArray) {
let options = this;
options.navigation = {};
styleguideArray.forEach((obj) => {
let fileName = (obj.writeName || obj.title).replace(/ /g, '_').toLowerCase() + '.html';
options.navigation[obj.title] = fileN... | 'use strict';
const buildNavigation = function(styleguideArray) {
let options = this,
_nav = {};
options.navigation = {};
styleguideArray.forEach((obj) => {
let fileName = (obj.writeName || obj.title).replace(/ /g, '_').toLowerCase() + '.html';
_nav[obj.title] = fileName;
});
Object.keys(_nav... | Update navigation to be in alphabetical order | Update navigation to be in alphabetical order
| JavaScript | mit | tbremer/live-guide,tbremer/live-guide |
ac0c31a94428c1180ef7b309c79410bfc28ccdf0 | config.js | config.js | var env = process.env.NODE_ENV || 'development';
var defaults = {
"static": {
port: 3003
},
"socket": {
options: {
origins: '*:*',
log: true,
heartbeats: false,
authorization: false,
transports: [
'websocket',
'flashsocket',
'htmlfile',
'xhr-p... | var env = process.env.NODE_ENV || 'development';
var defaults = {
"static": {
port: 3003
},
"socket": {
options: {
origins: '*:*',
log: true,
heartbeats: false,
authorization: false,
transports: [
'websocket',
'flashsocket',
'htmlfile',
'xhr-p... | Remove prod/staging ports so people don't get the idea to run this on these environments | Remove prod/staging ports so people don't get the idea to run this on these environments
| JavaScript | mit | maritz/nohm-admin,maritz/nohm-admin |
fb0993fb10b597884fb37f819743bce9d63accb0 | src/main/webapp/resources/js/apis/galaxy/galaxy.js | src/main/webapp/resources/js/apis/galaxy/galaxy.js | import axios from "axios";
export const getGalaxyClientAuthentication = clientId =>
axios
.get(
`${window.TL.BASE_URL}ajax/galaxy-export/authorized?clientId=${clientId}`
)
.then(({ data }) => data);
export const getGalaxySamples = () =>
axios
.get(`${window.TL.BASE_URL}ajax/galaxy-export/sam... | import axios from "axios";
export const getGalaxyClientAuthentication = clientId =>
axios
.get(
`${window.TL.BASE_URL}ajax/galaxy-export/authorized?clientId=${clientId}`
)
.then(({ data }) => data);
export const getGalaxySamples = () =>
axios
.get(`${window.TL.BASE_URL}ajax/galaxy-export/sam... | Update library name to be a timestamp | Update library name to be a timestamp
Signed-off-by: Josh Adam <8493dc4643ddc08e2ef6b4cf76c12d4ffb7203d1@canada.ca>
| JavaScript | apache-2.0 | phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida |
6c8ce552cf95452c35a9e5d4a322960bfdf94572 | src/helpers/replacePath.js | src/helpers/replacePath.js | import resolveNode from "../helpers/resolveNode";
import match from "../helpers/matchRedirect";
import {relative, dirname} from "path";
export default function (t, originalPath, {opts: {root, extensions}, file: {opts: {filename}}}, regexps) {
const requiredFilename = resolveNode(dirname(filename), originalPath.node.v... | import resolveNode from "../helpers/resolveNode";
import match from "../helpers/matchRedirect";
import {relative, dirname, extname} from "path";
export default function (t, originalPath, {opts: {root, extensions}, file: {opts: {filename}}}, regexps) {
const requiredFilename = resolveNode(dirname(filename), originalPa... | Fix file extension added when redirect didn't have one | fix(replacement): Fix file extension added when redirect didn't have one
| JavaScript | mit | Velenir/babel-plugin-import-redirect |
3ba06c96a3181c46b2c52a1849bfc284f05e9596 | experiments/GitHubGistUserCreator.js | experiments/GitHubGistUserCreator.js | const bcrypt = require('bcrypt');
const GitHub = require('github-api');
const crypto = require('crypto');
const { User } = require('../models');
const { email } = require('../utils');
const GITHUB_API_TOKEN = process.env.GITHUB_TOKEN;
const GITHUB_GIST_ID = process.env.GITHUB_GIST_ID;
// Authenticate using a GitHub ... | const bcrypt = require('bcrypt');
const GitHub = require('github-api');
const crypto = require('crypto');
const { Spot, User } = require('../models');
const { email } = require('../utils');
const GITHUB_API_TOKEN = process.env.GITHUB_TOKEN;
const GITHUB_GIST_ID = process.env.GITHUB_GIST_ID;
// Authenticate using a G... | Create spot along with user | Create spot along with user
| JavaScript | mit | osumb/challenges,osumb/challenges,osumb/challenges,osumb/challenges |
b4801f092fde031842c4858dda1794863ecaf2d9 | app/assets/javascripts/replies.js | app/assets/javascripts/replies.js | jQuery(function() {
jQuery('a[href=#preview]').click(function(e) {
var form = jQuery('#new_reply');
jQuery.ajax({
url: form.attr('action'),
type: 'post',
data: {
reply: {
content: form.find('#reply_content').val()
}
},
success: function(data) {
... | jQuery(function() {
jQuery('a[href=#preview]').click(function(e) {
var form = jQuery(this).parents('form');
jQuery.ajax({
url: '/previews/new',
type: 'get',
data: {
content: form.find('textarea').val(),
},
success: function(data) {
jQuery('#preview').html(data);
... | Switch to preview rendering in seperate controller | Switch to preview rendering in seperate controller
| JavaScript | agpl-3.0 | paradime/brimir,Gitlab11/brimir,johnsmithpoten/brimir,mbchandar/brimir,himeshp/brimir,viddypiddy/brimir,git-jls/brimir,hadifarnoud/brimir,ask4prasath/brimir_clone,Gitlab11/brimir,fiedl/brimir,johnsmithpoten/brimir,viddypiddy/brimir,fiedl/brimir,Gitlab11/brimir,ask4prasath/madGeeksAimWeb,paradime/brimir,mbchandar/brimir... |
3c84d34e41b14f43b8229fadbce86312ac19f964 | ast/call.js | ast/call.js | module.exports = class Call {
constructor(callee, args) {
this.callee = callee;
this.args = args;
}
analyze(context) {
this.callee.analyze(context);
context.assertIsFunction(this.callee.referent);
this.checkNumberOfArguments(this.callee.referent);
this.checkArgumentNamesAndPositionalRules... | module.exports = class Call {
constructor(callee, args) {
this.callee = callee;
this.args = args;
}
analyze(context) {
this.callee.analyze(context);
context.assertIsFunction(this.callee.referent);
this.checkArgumentMatching(this.callee.referent);
}
checkArgumentMatching(callee) {
let... | Implement proper parameter matching rules | Implement proper parameter matching rules
| JavaScript | mit | rtoal/plainscript |
1d59470c25001556346e252ca344fa7f4d26c453 | jquery.observe_field.js | jquery.observe_field.js | // jquery.observe_field.js
(function( $ ){
jQuery.fn.observe_field = function(frequency, callback) {
frequency = frequency * 1000; // translate to milliseconds
return this.each(function(){
var $this = $(this);
var prev = $this.val();
var check = function() {
var val = $this.val... | // jquery.observe_field.js
(function( $ ){
jQuery.fn.observe_field = function(frequency, callback) {
frequency = frequency * 1000; // translate to milliseconds
return this.each(function(){
var $this = $(this);
var prev = $this.val();
var check = function() {
if(removed()){ // i... | Fix bug in IE9 when observed elements are removed from the DOM | Fix bug in IE9 when observed elements are removed from the DOM
| JavaScript | mit | splendeo/jquery.observe_field,splendeo/jquery.observe_field |
30a3ce599413db184f2ccc19ec362ea8d88f60e6 | js/component-graphic.js | js/component-graphic.js | define([], function () {
'use strict';
var ComponentGraphic = function (options) {
this.color = options.color || "#dc322f";
};
ComponentGraphic.prototype.paint = function paint(gc) {
gc.fillStyle = this.color;
gc.fillRect(0, 0, 15, 15);
};
return ComponentGraphic;
});
| define([], function () {
'use strict';
var ComponentGraphic = function (options) {
options = options || {};
this.color = options.color || "#dc322f";
};
ComponentGraphic.prototype.paint = function paint(gc) {
gc.fillStyle = this.color;
gc.fillRect(0, 0, 15, 15);
};
return ComponentGraphic;... | Set default options for graphic component | Set default options for graphic component
| JavaScript | mit | floriico/onyx,floriico/onyx |
1e928e64d6ea914870e2240a12bf33b8b2cf09b0 | src/openfisca-proptypes.js | src/openfisca-proptypes.js | import PropTypes from 'prop-types'
const valuesShape = PropTypes.objectOf(PropTypes.oneOfType([
PropTypes.bool,
PropTypes.number,
PropTypes.string,
]))
export const parameterShape = PropTypes.shape({
id: PropTypes.string,
description: PropTypes.string,
normalizedDescription: PropTypes.string,
values: v... | import PropTypes from 'prop-types'
const valuesShape = PropTypes.objectOf(PropTypes.oneOfType([
PropTypes.bool,
PropTypes.number,
PropTypes.string,
]))
export const parameterShape = PropTypes.shape({
id: PropTypes.string,
description: PropTypes.string,
documentation: PropTypes.string,
normalizedDescrip... | Update parameters and variables shapes | Update parameters and variables shapes
| JavaScript | agpl-3.0 | openfisca/legislation-explorer |
d0d13e5feea4aa2c3d7f35be31dcbd0299f9a4d3 | client/components/App/App.js | client/components/App/App.js | // @flow
import React from 'react'
import 'normalize.css/normalize.css'
import Footer from 'components/Footer/Footer'
import Nav from '../Nav/Nav'
import MobileFooterToolbar from '../Nav/MobileFooterToolbar/MobileFooterToolbar'
import styles from './App.scss'
import '../../styles/global.scss'
import Content from 'react... | // @flow
import React from 'react'
import 'normalize.css/normalize.css'
import Footer from 'components/Footer/Footer'
import Nav from '../Nav/Nav'
import MobileFooterToolbar from '../Nav/MobileFooterNav/MobileFooterNav'
import styles from './App.scss'
import '../../styles/global.scss'
import Content from 'react-mdc-web... | Fix mobile footer toolbar import rename | Fix mobile footer toolbar import rename
| JavaScript | mit | ncrmro/reango,ncrmro/ango,ncrmro/reango,ncrmro/ango,ncrmro/ango,ncrmro/reango |
edd29b9bcb894ed1fd6511f2e748a87a14d792f3 | assets/site.js | assets/site.js | (function(){
"use strict";
var d = document, inits = [];
window.initializers = inits;
// initializer to manipulate all hyperlinks
inits.push(function(){
var x, h = location.host;
for (var xs = d.links, i = xs.length; i--; ){
var x = xs[i], m = x.getAttribute('data-m');
if (m) {
... | (function(){
"use strict";
var d = document, inits = [];
window.initializers = inits;
// initializer to manipulate all hyperlinks
inits.push(function(){
var x, h = location.host;
for (var xs = d.links, i = xs.length; i--; ){
var x = xs[i], m = x.getAttribute('data-m');
if (m) {
... | Add initializer to set active tab in page header | Add initializer to set active tab in page header | JavaScript | mit | tommy-carlier/www.tcx.be,tommy-carlier/www.tcx.be,tommy-carlier/www.tcx.be |
110e1871555cece764e2dcbfdf3ab7c14c7c164e | bin/gut-cli.js | bin/gut-cli.js | var gut = require('../');
if (process.argv.length > 2 && process.argv[2] === 'status') {
console.log("\n\tGut status: %s", gut.getStatus());
}
console.log('\nI think you meant "git"');
| #!/usr/bin/env node
var gut = require('../');
if (process.argv.length > 2 && process.argv[2] === 'status') {
console.log("\n\tGut status: %s", gut.getStatus());
}
console.log('\nI think you meant "git"');
| Add shabang to bin file | Add shabang to bin file
| JavaScript | mit | itsananderson/gut-status |
c025d9457aa000d0f23252e07ce6f2e2c3c5d971 | releaf-core/app/assets/config/releaf_core_manifest.js | releaf-core/app/assets/config/releaf_core_manifest.js | //= link_tree ../images
//= link releaf/application.css
//= link releaf/application.js
| //= link_tree ../images
//= link_tree ../javascripts/ckeditor
//= link releaf/application.css
//= link releaf/application.js
| Fix releaf ckeditor assets copying | Fix releaf ckeditor assets copying
| JavaScript | mit | cubesystems/releaf,cubesystems/releaf,cubesystems/releaf |
7a3062a02c2e676704ecad75def38d322c45a5d0 | lib/resources/console/scripts/content-editor/plaintext.js | lib/resources/console/scripts/content-editor/plaintext.js | pw.component.register('content-editor-plaintext', function (view, config) {
var self = this;
var mock = document.createElement('DIV');
mock.classList.add('console-content-plaintext-mock')
mock.style.position = 'absolute';
mock.style.top = '-100px';
mock.style.opacity = '0';
mock.style.width = view.node.c... | pw.component.register('content-editor-plaintext', function (view, config) {
var self = this;
var mock = document.createElement('DIV');
mock.classList.add('console-content-plaintext-mock')
mock.style.position = 'absolute';
mock.style.top = '-100px';
mock.style.opacity = '0';
mock.style.width = view.node.c... | Fix text editor wrapping when floating | Fix text editor wrapping when floating
| JavaScript | mit | metabahn/console,metabahn/console,metabahn/console |
a6d0373ea7ca897721d691089567af8e13bab61b | mac/filetypes/open_STAK.js | mac/filetypes/open_STAK.js | define(['itemObjectModel', 'mac/roman'], function(itemOM, macRoman) {
'use strict';
function open(item) {
function onBlock(item, byteSource) {
return byteSource.slice(0, 12).getBytes().then(function(headerBytes) {
var dv = new DataView(headerBytes.buffer, headerBytes.byteOffset, 4);
va... | define(['itemObjectModel', 'mac/roman'], function(itemOM, macRoman) {
'use strict';
function open(item) {
function onBlock(item, byteSource) {
return byteSource.slice(0, 12).getBytes().then(function(headerBytes) {
var dv = new DataView(
headerBytes.buffer, headerBytes.byteOffset, hea... | Use right length of header | Use right length of header | JavaScript | mit | radishengine/drowsy,radishengine/drowsy |
93bc928f2f19bba92ce178325f396c863f34c566 | packages/client/.spinrc.js | packages/client/.spinrc.js | const url = require('url');
const config = {
builders: {
web: {
entry: './src/index.tsx',
stack: ['web'],
openBrowser: true,
dllExcludes: ['bootstrap'],
defines: {
__CLIENT__: true
},
// Wait for backend to start prior to letting webpack load frontend page
... | const url = require('url');
const config = {
builders: {
web: {
entry: './src/index.tsx',
stack: ['web'],
openBrowser: true,
dllExcludes: ['bootstrap'],
defines: {
__CLIENT__: true
},
// Wait for backend to start prior to letting webpack load frontend page
... | Remove unused option for client-side bundle | Remove unused option for client-side bundle
| JavaScript | mit | sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-fullstack-starter-kit,sysgears/apollo-universal-starter-kit |
4f2ba69c7a4c2e5906d949fae1d0fc902c6f12df | data/wp/wp-content/plugins/epfl/menus/epfl-menus-admin.js | data/wp/wp-content/plugins/epfl/menus/epfl-menus-admin.js | // It seems that not much documentation exists for the JQuery
// mini-Web-app that is the Wordpress admin menu editor. However,
// insofar as Polylang's business in that mini-Web-app is similar
// to ours, studying the js/nav-menu.js therefrom is helpful.
function initNavMenus ($) {
var $metabox = $('div.add-externa... | function initExternalMenuList ($) {
$('a.page-title-action').remove();
$('h1.wp-heading-inline').after('<button class="page-title-action">' + wp.translations.refresh_button + '</button>');
var $button = $('h1.wp-heading-inline').next();
var spinning = false;
$button.click(function() {
if (sp... | Remove dead code in the JS app | Remove dead code in the JS app
| JavaScript | mit | epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp |
87eebeaee3d2930e29f8b9aa7e3784f7f519f444 | jquery.activeNavigation.js | jquery.activeNavigation.js | (function( $ ) {
$.fn.activeNavigation = function(selector) {
var pathname = window.location.pathname
var hrefs = []
$(selector).find("a").each(function(){
if (pathname.indexOf($(this).attr("href")) > -1)
hrefs.push($(this))
})
if (hrefs.length) {... | (function( $ ) {
$.fn.activeNavigation = function(selector) {
var pathname = window.location.pathname
var extension_position;
var href;
var hrefs = []
$(selector).find("a").each(function(){
// Remove href file extension
extension_position = $(this).att... | Remove file extension from href's | Remove file extension from href's
| JavaScript | mit | Vitaa/ActiveNavigation,Vitaa/ActiveNavigation |
26d0c3815f5bdcc23b25709167c1bcf96a8d14c2 | examples/worker-semaphore.js | examples/worker-semaphore.js | var {Worker} = require("ringo/worker")
var {Semaphore} = require("ringo/concurrent")
var {setInterval, clearInterval} = require("ringo/scheduler");
function main() {
// Create a new workers from this same module. Note that this will
// create a new instance of this module as workers are isolated.
var w = n... | var {Worker} = require("ringo/worker")
var {Semaphore} = require("ringo/concurrent")
var {setInterval, clearInterval} = require("ringo/scheduler");
function main() {
// Create a new workers from this same module. Note that this will
// create a new instance of this module as workers are isolated.
var w = n... | Make single worker semaphore example slightly more interesting | Make single worker semaphore example slightly more interesting
| JavaScript | apache-2.0 | Transcordia/ringojs,ringo/ringojs,ringo/ringojs,oberhamsi/ringojs,Transcordia/ringojs,ringo/ringojs,oberhamsi/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs,Transcordia/ringojs,oberhamsi/ringojs,ashwinrayaprolu1984/ringojs,ringo/ringojs,ashwinrayaprolu1984/ringojs,ashwinrayaprolu1984/ringojs |
9bc7cfc00b0a0b96245af835995b39e8493f0a01 | test_frontend/app/views/teacher/modules/assistance_request_list_module_spec.js | test_frontend/app/views/teacher/modules/assistance_request_list_module_spec.js | define((require) => {
describe('requester_module', () => {
beforeEach(() => {
require('app/views/teacher/modules/assistance_request_list_module');
});
define('>RetrieveAssistanceRequests', () => {
it('should be defined', () => {
expect(RetrieveAssist... | define((require) => {
describe('requester_module', () => {
beforeEach(() => {
require('app/views/teacher/modules/assistance_request_list_module');
});
describe('>RetrieveAssistanceRequests', () => {
it('should be defined', () => {
expect(RetrieveAssi... | Fix AR list module test | Fix AR list module test
| JavaScript | mit | samg2014/VirtualHand,samg2014/VirtualHand |
1b77aa7ecddf446637e1bfd14bd92d8d588dcb6d | app/gui/task_view.js | app/gui/task_view.js | define([
'underscore',
'backbone'
], function(_, Backbone) {
var TaskView = Backbone.View.extend({
tagName: 'li',
className: 'task',
events: {
"dragstart" : "on_dragstart",
"dragover" : "on_dragover",
"drop" : "on_drop"
},
initialize: function() {
this.id = 'id-'... | define([
'underscore',
'backbone'
], function(_, Backbone) {
var TaskView = Backbone.View.extend({
tagName: 'li',
className: 'task',
events: {
"dragstart" : "on_dragstart",
"dragover" : "on_dragover",
"drop" : "on_drop",
"click .delete" : "delete"
},
... | Add ability to delete a task | Add ability to delete a task
| JavaScript | mit | lorenzoplanas/tasks,lorenzoplanas/tasks |
edede8b53d19f628c566edf52d426b81d69af306 | client/src/Requests/PanelIssue.js | client/src/Requests/PanelIssue.js | import React from 'react'
import { Panel } from 'react-bootstrap'
import MarkdownBlock from '../shared/MarkdownBlock'
import { getCreator, getContent } from '../shared/requestUtils'
const Issue = props => {
return (
<Panel
header={`${props.issue.title} by ${getCreator(props.issue).name || getCreator(props.... | import React from 'react'
import { Panel } from 'react-bootstrap'
import MarkdownBlock from '../shared/MarkdownBlock'
import { getCreator, getContent } from '../shared/requestUtils'
const Issue = props => {
if (!props.issue)
return null
return (
<Panel
header={`${props.issue.title} by ${getCreator(p... | Work around react router bug | Work around react router bug
<Miss /> sometimes renders even when it should not
| JavaScript | mit | clembou/github-requests,clembou/github-requests,clembou/github-requests |
d2d1d18134787a398511c60dccec4ee89f636edc | examples/cherry-pick/app/screens/application/index.js | examples/cherry-pick/app/screens/application/index.js | import './base.css';
import './application.css';
import 'suitcss-base';
import 'suitcss-utils-text';
import 'suitcss-components-arrange';
import React from 'react';
module.exports = React.createClass({
contextTypes: {
router: React.PropTypes.object.isRequired
},
link: function () {
var router = this.con... | import './base.css';
import './application.css';
import 'suitcss-base';
import 'suitcss-utils-text';
import 'suitcss-components-arrange';
import React from 'react';
module.exports = React.createClass({
contextTypes: {
router: React.PropTypes.object.isRequired
},
link: function () {
var router = this.con... | Fix links in the cherry-pick demo | Fix links in the cherry-pick demo
| JavaScript | mit | nathanboktae/cherrytree,QubitProducts/cherrytree,QubitProducts/cherrytree,nathanboktae/cherrytree |
4a68f3869ab9af0c3b51bff223c36d49b58e5df3 | app/views/wrapper.js | app/views/wrapper.js | module.exports = function (body) {
return `
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Minor WOT</title>
<link rel="stylesheet" href="/style.css" />
<script src="/app.js" defer></script>
${body}
`;
}
| module.exports = function (body) {
return `
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Minor WOT</title>
<link rel="stylesheet" href="/style.css" />
<script src="/app.js" defer></script>
<div data-root>
${body}
</div>
`;
}
| Add data-root div around main body for later use | Add data-root div around main body for later use
| JavaScript | mit | rijkvanzanten/luaus |
1f34969f216a7333a27fbd48b97293f3a22d0ec1 | lib/Object/map-to-array.js | lib/Object/map-to-array.js | 'use strict';
var callable = require('./valid-callable')
, forEach = require('./for-each')
, defaultCb = function (value, key) { return [key, value]; };
module.exports = function (obj, cb/*, thisArg*/) {
var a = [], thisArg = arguments[2];
cb = (cb == null) ? defaultCb : callable(cb);
forEach(obj, function ... | 'use strict';
var callable = require('./valid-callable')
, forEach = require('./for-each')
, call = Function.prototype.call
, defaultCb = function (value, key) { return [key, value]; };
module.exports = function (obj, cb/*, thisArg*/) {
var a = [], thisArg = arguments[2];
cb = (cb == null) ? defaultCb : ca... | Support any callable object as callback | Support any callable object as callback
| JavaScript | isc | medikoo/es5-ext |
f28118fe786bf4fea5b899ff27e185df532e884d | StringManipulation/ConsecutiveString/consecutivestring.js | StringManipulation/ConsecutiveString/consecutivestring.js | var ConsecutiveString = function(){};
/*validate k and length of the array. If the array length is 0 of less than k of k is less thatn or equal to 0
return an empty string.
if k is 1, then return the longest string.
else, loop through the string, */
ConsecutiveString.prototype.longestConsec = function(starr, k){
var... | var ConsecutiveString = function(){};
/*validate k and length of the array. If the array length is 0 of less than k of k is less thatn or equal to 0
return an empty string.
if k is 1, then return the longest string.
else, loop through the string, */
ConsecutiveString.prototype.longestConsec = function(starr, k){
var... | Add Consectutive String Description solution | Add Consectutive String Description solution
| JavaScript | mit | BrianLusina/JS-Snippets |
a4d85bb42cf25879f154fba5b647778f503984a4 | docs/client/lib/navigate.js | docs/client/lib/navigate.js | navigate = function (hash) {
window.location.replace(Meteor.absoluteUrl(null, { secure: true }) + hash);
};
| navigate = function (hash) {
window.location.replace(Meteor.absoluteUrl() + hash);
};
| Remove extra option to absoluteUrl | Remove extra option to absoluteUrl
force-ssl already sets this option by default
| JavaScript | mit | msavin/meteor,daslicht/meteor,dboyliao/meteor,colinligertwood/meteor,chinasb/meteor,yonglehou/meteor,sclausen/meteor,jdivy/meteor,ashwathgovind/meteor,cog-64/meteor,elkingtonmcb/meteor,l0rd0fwar/meteor,meteor-velocity/meteor,brettle/meteor,dfischer/meteor,HugoRLopes/meteor,kencheung/meteor,jdivy/meteor,chiefninew/meteo... |
fe0d1ba2d55121a69791896e0f9fec3aa70f7c3c | public/javascript/fonts.js | public/javascript/fonts.js | WebFontConfig = {
custom: { families: ['Alternate Gothic No.3', 'Clarendon FS Medium', 'Proxima Nova Light', 'Proxima Nova Semibold', 'Stub Serif FS', 'Stub Serif FS'],
urls: [ 'http://f.fontdeck.com/s/css/tEGvGvL6JlBfPjTgf2p9URd+sJ0/' + window.location.hostname + '/5502.css' ] }
};
(function() {
var wf = docume... | WebFontConfig = {
custom: { families: ['Alternate Gothic No.3', 'Clarendon FS Medium', 'Proxima Nova Light', 'Proxima Nova Semibold', 'Stub Serif FS', 'Stub Serif FS', 'Reminder Pro Bold'],
urls: [ 'http://f.fontdeck.com/s/css/tEGvGvL6JlBfPjTgf2p9URd+sJ0/' + window.location.hostname + '/5502.css' ] }
};
(function(... | Add new font to JS | Add new font to JS
| JavaScript | mit | robinwhittleton/static,kalleth/static,tadast/static,robinwhittleton/static,robinwhittleton/static,kalleth/static,robinwhittleton/static,alphagov/static,tadast/static,alphagov/static,alphagov/static,kalleth/static,kalleth/static,tadast/static,tadast/static |
040681cfa5be9a0b095fab6f8f3c84c833245c94 | addon/components/one-way-input.js | addon/components/one-way-input.js | import Ember from 'ember';
const {
Component,
get
} = Ember;
export default Component.extend({
tagName: 'input',
type: 'text',
attributeBindings: [
'accept',
'autocomplete',
'autosave',
'dir',
'formaction',
'formenctype',
'formmethod',
'formnovalidate',
'formtarget',
... | import Ember from 'ember';
const {
Component,
get
} = Ember;
export default Component.extend({
tagName: 'input',
type: 'text',
attributeBindings: [
'accept',
'autocomplete',
'autosave',
'dir',
'formaction',
'formenctype',
'formmethod',
'formnovalidate',
'formtarget',
... | Add placeholder to attribute bindings | Add placeholder to attribute bindings
| JavaScript | mit | AdStage/ember-one-way-controls,dockyard/ember-one-way-input,dockyard/ember-one-way-controls,dockyard/ember-one-way-input,AdStage/ember-one-way-controls,dockyard/ember-one-way-controls |
ff86c57864c82a30f9af6bea2b29b8b2ae68defd | server/routes/heroku.js | server/routes/heroku.js | var express = require('express');
var router = express.Router();
var request = require('request');
router.get('/', function(req, res) {
request({
url: 'https://status.heroku.com/api/v3/current-status',
method: 'GET'
}, function(err, res, body) {
console.log(body);
res.sendStatus(200).end();
});
}... | var express = require('express');
var router = express.Router();
var request = require('request');
router.get('/', function(req, res) {
request({
url: 'https://status.heroku.com/api/v3/current-status',
method: 'GET'
}, function(error, response, body) {
console.log(body); // {"status":{"Production":"gre... | Rename res to not overwrite express res. | Rename res to not overwrite express res.
| JavaScript | mit | jontewks/bc-slack-alerts |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.