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
54ef4397dd7b6b7a32cd81795281e96056c380f6
src/services/rest/routes/jobs.js
src/services/rest/routes/jobs.js
var express = require('express'); var router = express.Router(); var mongoose = require('../models/mongoose'); const config = require('../config'); // Redis const Redis = require('ioredis'); var redis_client = new Redis(config.redis_connection); // routes that end with jobs // ------------------------------------...
var express = require('express'); var router = express.Router(); var mongoose = require('../models/mongoose'); const config = require('../config'); // Redis const Redis = require('ioredis'); var redis_client = new Redis(config.redis_connection); // routes that end with jobs // ------------------------------------...
Adjust route to add result_id, not _id...
Adjust route to add result_id, not _id...
JavaScript
agpl-3.0
RAPD/RAPD,RAPD/RAPD,RAPD/RAPD,RAPD/RAPD,RAPD/RAPD
17a4cd3d6af56850068565bed2e497e31aff9b5f
server/utils/peerDependencies.js
server/utils/peerDependencies.js
import { checkNpmVersions } from 'meteor/tmeasday:check-npm-versions'; checkNpmVersions({ 'es6-enum': '1.x', express: '4.x', helmet: '3.x', i18next: '6.0.x', 'i18next-node-remote-backend': '0.0.x', 'i18next-xhr-backend': '1.3.x', lodash: '4.x', logatim: '0.x', moment: '2.x', 'react-dom': '15.x', ...
import { checkNpmVersions } from 'meteor/tmeasday:check-npm-versions'; checkNpmVersions({ express: '4.x', helmet: '3.x', i18next: '6.0.x', 'i18next-node-remote-backend': '0.0.x', 'i18next-xhr-backend': '1.3.x', lodash: '4.x', logatim: '0.x', moment: '2.x', 'react-dom': '15.x', 'react-helmet': '4.x'...
Remove es6-enum as peer dependency
Remove es6-enum as peer dependency
JavaScript
mit
ssrwpo/ssr,ssr-server/ssr,ssrwpo/ssr,ssr-server/ssr
49a0fa603a43d301aa1edff0ba1ba0b8fe7d5123
uni_form/media/uni_form/uni-form.jquery.js
uni_form/media/uni_form/uni-form.jquery.js
jQuery.fn.uniform = function(settings) { settings = jQuery.extend({ valid_class : 'valid', invalid_class : 'invalid', focused_class : 'focused', holder_class : 'ctrlHolder', field_selector : 'input, select, textarea' }, settings); return this.each(function() { var form = jQuery(t...
jQuery.fn.uniform = function(settings) { settings = jQuery.extend({ valid_class : 'valid', invalid_class : 'invalid', focused_class : 'focused', holder_class : 'ctrlHolder', field_selector : 'input, select, textarea' }, settings); return this.each(function() { var form = jQuery(t...
Set the focus highlight correctly if an element has focus while the page is being loaded.
Set the focus highlight correctly if an element has focus while the page is being loaded. Signed-off-by: Daniel Greenfeld <8363115a959be51f40dc0f39f5da6050bb507aa3@gmail.com>
JavaScript
mit
dessibelle/django-crispy-forms,ngenovictor/django-crispy-forms,VishvajitP/django-crispy-forms,Stranger6667/django-crispy-forms,HungryCloud/django-crispy-forms,impulse-cloud/django-crispy-forms,pydanny/django-uni-form,alanwj/django-crispy-forms,tarunlnmiit/django-crispy-forms,schrd/django-crispy-forms,scuml/django-crisp...
0ae9a166553e7247913efb44649437cc5abe7987
website/src/app/project/experiments/experiment/components/tasks/current-task.service.js
website/src/app/project/experiments/experiment/components/tasks/current-task.service.js
class CurrentTask { constructor() { this.currentTask = null; } get() { return this.currentTask; } set(task) { this.currentTask = task; } } angular.module('materialscommons').service('currentTask', CurrentTask);
class CurrentTask { constructor() { this.currentTask = null; this.onChangeFN = null; } setOnChange(fn) { this.onChangeFN = fn; } get() { return this.currentTask; } set(task) { this.currentTask = task; if (this.onChangeFN) { this....
Add setOnChange that allows a controller to set a function to call when the currentTask changes.
Add setOnChange that allows a controller to set a function to call when the currentTask changes.
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
ee2761025d20babbf94a171beec7ce68dd08a573
web/resources/scripts/section.js
web/resources/scripts/section.js
$(document).ready(function() { // Init action when user select sildeshow to see $('.slideshow-item').on('click', function(event) { // Cancel event global.cancelEvent(event); // Select new slideshow item $('.slideshow-item').removeClass('activ'); $(this).addClass('acti...
$(document).ready(function() { // Init action when user select sildeshow to see $('.slideshow-item').on('click', function(event) { // Cancel event global.cancelEvent(event); // Select new slideshow item $('.slideshow-item').removeClass('activ'); $(this).addClass('acti...
Fix JS bug on thumbnail
Fix JS bug on thumbnail
JavaScript
mit
jenasnic/bodu,jenasnic/bodu,jenasnic/bodu
43c74270346f503d4a1bfdcd07daed92984a4805
src/handlers/collection-browse.js
src/handlers/collection-browse.js
'use strict'; const collectionValidator = require('../validators/collection'), repo = require('../repositories/collection'), restify = require('restify'); module.exports = { post: (req, res, next) => { let collection = req.body; let username = req.user.username; let errors = collectionValidator(coll...
'use strict'; const collectionValidator = require('../validators/collection'), repo = require('../repositories/collection'), restify = require('restify'); module.exports = { post: (req, res, next) => { let collection = req.body; let username = req.user.username; let errors = collectionValidator(coll...
Remove redundant created on value
Remove redundant created on value
JavaScript
mit
rune-catalog/Rune.API,neiliux/Rune.API
f3d7924ec329dedc83442d9295326aea7dd1a617
lib/util/object-reduce.js
lib/util/object-reduce.js
'use strict'; /** * Utility method to permit Array#reduce-like operations over objects * * This is likely to be slightly more inefficient than using lodash.reduce, * but results in ~50kb less size in the resulting bundled code before * minification and ~12kb of savings with minification. * * @module object-redu...
'use strict'; /** * Utility method to permit Array#reduce-like operations over objects * * This is likely to be slightly more inefficient than using lodash.reduce, * but results in ~50kb less size in the resulting bundled code before * minification and ~12kb of savings with minification. * * Unlike lodash.reduc...
Document rationale for the discrepancy from lodash.reduce signature
Document rationale for the discrepancy from lodash.reduce signature
JavaScript
mit
kadamwhite/wordpress-rest-api,WP-API/node-wpapi,WP-API/node-wpapi,kadamwhite/wordpress-rest-api,kadamwhite/wordpress-rest-api
64a62a61f352f4398bc9b2b3019d8c5892d5582f
examples/socket.io-chat-app/index.js
examples/socket.io-chat-app/index.js
const micro = require('micro'); const fs = require('fs'); const path = require('path'); const document = path.join(__dirname, 'index.html'); const html = fs.readFileSync(document); const server = micro(async (req, res) => { console.log('Serving index.html'); res.end(html); }); const io = require('socket.io')(serve...
const micro = require('micro'); const fs = require('fs'); const path = require('path'); const document = path.join(__dirname, 'index.html'); const html = fs.readFileSync(document); const server = micro(async (req, res) => { console.log('Serving index.html'); res.end(html); }); const io = require('socket.io')(serve...
Move the hint message to the callback
Move the hint message to the callback
JavaScript
mit
zeit/micro
4b69c2c9d1d3d3cf1a0baf5f045b294331ca3b0a
web/js/model/Playlist.js
web/js/model/Playlist.js
import url from 'url'; import { formatOpenURL, parse, } from 'spotify-uri'; export const getCountryParam = (urlString) => { const parsed = url.parse(urlString); if (parsed.query && parsed.query.country) { return parsed.query.country; } return 'us'; }; export const getUrl = (playlist) => { if (!playl...
import url from 'url'; import { formatOpenURL, parse, } from 'spotify-uri'; export const getCountryParam = (urlString) => { const parsed = url.parse(urlString); if (parsed.query && parsed.query.country) { return parsed.query.country; } return 'us'; }; export const getOwnerName = playlist => playlist.o...
Use owner_id if owner_name of playlist doesn't exist
Use owner_id if owner_name of playlist doesn't exist
JavaScript
mit
kumabook/pink-spider,kumabook/pink-spider,kumabook/pink-spider,kumabook/pink-spider
e0645c788d7fdc98e5286e7023e739f8b39d8737
src/model/SummaryModel.js
src/model/SummaryModel.js
/** * Copyright 2015 Ethan Smith */ var Backbone = require('backbone'), AmountEntryCollection = require('./AmountEntryCollection'); var SummaryModel = Backbone.Model.extend({ defaults: { headingLevel: 'h1', nestDepth: 'depth0', header: 'SummaryModel Header', classes: '' } }); Summ...
/** * Copyright 2015 Ethan Smith */ var Backbone = require('backbone'), AmountEntryCollection = require('./AmountEntryCollection'); var SummaryModel = Backbone.Model.extend({ defaults: { headingLevel: 'h1', nestDepth: 'depth0', header: 'SummaryModel Header', classes: '' }, init...
Add auto sanitize for nesting depth
Add auto sanitize for nesting depth
JavaScript
mit
onebytegone/banknote-client,onebytegone/banknote-client
dc0ea6c5168b5ce466caf80d01266afebdaefa20
js/src/main/java/fiftyfive/wicket/js/datetime/JQueryDatePicker.js
js/src/main/java/fiftyfive/wicket/js/datetime/JQueryDatePicker.js
/* * Copyright 2010 55 Minutes (http://www.55minutes.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright 2010 55 Minutes (http://www.55minutes.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
Fix date picker template syntax to match the latest style.
Fix date picker template syntax to match the latest style. git-svn-id: a346edc3f722475ad04b72d65977aa35d4befd55@542 3a26569e-5468-0410-bb2f-b495330926e5
JavaScript
apache-2.0
55minutes/fiftyfive-wicket,55minutes/fiftyfive-wicket,55minutes/fiftyfive-wicket,55minutes/fiftyfive-wicket
a1277577f1e2572725ef338501814bbac4a8ab9a
src/create-module.js
src/create-module.js
import isEmpty from 'lodash/lang/isEmpty'; export default function createModule({ stores, actions, getters }) { return (name, target, reactor) => { if (!isEmpty(stores)) { reactor.registerStores(stores); } target.actions[name] = actions; target.getters[name] = getters; }; }
import pick from 'lodash/object/pick'; import isEmpty from 'lodash/lang/isEmpty'; import isArray from 'lodash/lang/isArray'; import isFunction from 'lodash/lang/isFunction'; export default function createModule({ stores, actions, getters }) { return (name, target, reactor) => { if (!isEmpty(stores)) { ...
Create module should not expose babel properties
Create module should not expose babel properties
JavaScript
apache-2.0
raulmatei/frux
4c82b74c8bf77a8b61135718e9a0d8c739b08b92
src/widgets/modals/BottomModal.js
src/widgets/modals/BottomModal.js
/** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2016 */ import React from 'react'; import PropTypes from 'prop-types'; import { Keyboard, StyleSheet, View } from 'react-native'; import Modal from 'react-native-modalbox'; import { DARKER_GREY } from '../../globalStyles/index'; export class BottomModal extend...
/** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2016 */ import React from 'react'; import PropTypes from 'prop-types'; import { Keyboard, StyleSheet, View } from 'react-native'; import Modal from 'react-native-modalbox'; import { DARKER_GREY } from '../../globalStyles/index'; export class BottomModal extend...
Fix bottom modal taking whole screen
Fix bottom modal taking whole screen
JavaScript
mit
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
fc035bbf827667f8368b28897d37a003a0961a24
lib/node_modules/@stdlib/math/base/tools/evalrational/lib/index.js
lib/node_modules/@stdlib/math/base/tools/evalrational/lib/index.js
'use strict'; // EXPORTS // module.exports = require( './evalrational.js' ); module.exports.factory = require( './factory.js' );
'use strict'; // MODULES // var setReadOnly = require( '@stdlib/utils/define-read-only-property' ); // EXPORTS // module.exports = require( './evalrational.js' ); setReadOnly( module.exports, 'factory', require( './factory.js' ) );
Make factory export read only
Make factory export read only
JavaScript
apache-2.0
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
901d824de65dd5b657cfee031ac8e0bfac28ef81
src/decorator.js
src/decorator.js
import { applyMiddleware } from "./middleware"; import connectedCallback from "./connectedCallback"; import attributeChangedCallback from "./attributeChangedCallback"; import proxy from "./proxy"; export function WebComponent(name, options = {}) { return function(target) { target = applyMiddleware( connect...
import { applyMiddleware } from "./middleware"; import connectedCallback from "./connectedCallback"; import attributeChangedCallback from "./attributeChangedCallback"; import proxy from "./proxy"; export function WebComponent(name, options = {}) { return function(target) { target = applyMiddleware( connect...
Return defined custom element constructor
Return defined custom element constructor
JavaScript
mit
vardius/web-component
6086e088a839b8f11dd47dd29b1bc7677a6a5dcd
test/snapshots/reports.js
test/snapshots/reports.js
var createServer = require('http').createServer var BaseServer = require('../../base-server') var app = new BaseServer({ env: 'development', uniqName: 'server', subprotocol: [2, 5], supports: [2, 1] }) app.listenOptions = { host: '127.0.0.1', port: 1337 } var wss = new BaseServer({ env: 'production', uniq...
var createServer = require('http').createServer var BaseServer = require('../../base-server') var app = new BaseServer({ env: 'development', uniqName: 'server', subprotocol: [2, 5], supports: [2, 1] }) app.listenOptions = { host: '127.0.0.1', port: 1337 } var wss = new BaseServer({ env: 'production', uniq...
Fix custom HTTP server test
Fix custom HTTP server test
JavaScript
mit
frsv/logux-server,logux/logux-server
2da8c42efb28666ed08856a465cdbc1f7d8c6cb2
public/javascripts/app/views/homeView.js
public/javascripts/app/views/homeView.js
define([ 'Backbone', //Views 'app/views/projectsView', //Templates 'text!templates/home/boxesTemplate.html' ], function( Backbone, projectsView, //Template boxesTemplate ){ var HomeView = Backbone.View.extend({ template: _.template(boxesTemplate), initialize: function(){ this...
define([ 'Backbone', //Views 'app/views/projectsView' ], function( Backbone, //Views projectsView ){ var HomeView = Backbone.View.extend({ initialize: function(){ this.projects = new projectsView({ el: '.js-projects', account: this.options.account, router: this.opt...
Remove boxes template from home view
Remove boxes template from home view
JavaScript
mit
tangosource/pokerestimate,tangosource/pokerestimate
1174b14bba3aaf2a93a6e8838b10c0ead872dd75
lib/BaseHash.js
lib/BaseHash.js
/** * BaseHash class * @constructor */ function BaseHash(options) { if (!(options.data)) { throw new Error('You need provide data'); } this.setData(options.data); } BaseHash.prototype = Object.create({ constructor: BaseHash, /** * Get data from current hashing instance * @ret...
/** * Message for errors when some method is not implemented * @type {String} * @private */ var NEED_IMPLEMENT_MESSAGE = "This method need to implement"; /** * BaseHash class * @constructor */ function BaseHash(options) { if (typeof options === 'string') { this.setData(options); } else if (optio...
Add throwing new error in base hash method
Add throwing new error in base hash method
JavaScript
mit
ghaiklor/data-2-hash
8893ba6c2d7bda956e04a176b21fc89e0f7e1ee4
jujugui/static/gui/src/app/components/entity-details/content/revisions/revisions.js
jujugui/static/gui/src/app/components/entity-details/content/revisions/revisions.js
/* This file is part of the Juju GUI, which lets users view and manage Juju environments within a graphical interface (https://launchpad.net/juju-gui). Copyright (C) 2015 Canonical Ltd. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License vers...
/* This file is part of the Juju GUI, which lets users view and manage Juju environments within a graphical interface (https://launchpad.net/juju-gui). Copyright (C) 2015 Canonical Ltd. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License vers...
Update EntityContentRevisions to use es6 class.
Update EntityContentRevisions to use es6 class.
JavaScript
agpl-3.0
mitechie/juju-gui,mitechie/juju-gui,mitechie/juju-gui,mitechie/juju-gui
c2570489eb47db56ff496ea1ea923a9710937828
rollup.config.js
rollup.config.js
import resolve from 'rollup-plugin-node-resolve'; import commonjs from 'rollup-plugin-commonjs'; import babel from 'rollup-plugin-babel'; import pkg from './package.json'; export default [ // browser-friendly UMD build { input: 'src/index.js', output: { file: pkg.browser, format: 'umd', n...
import resolve from 'rollup-plugin-node-resolve'; import commonjs from 'rollup-plugin-commonjs'; import babel from 'rollup-plugin-babel'; import pkg from './package.json'; export default [ // browser-friendly UMD build { input: 'src/index.js', output: { file: pkg.browser, format: 'umd', n...
Mark invariant as an external module
Mark invariant as an external module
JavaScript
mit
bondz/react-static-google-map
6c1ee5a531b21380766bd6a77f202d29daa52d24
sample/server.js
sample/server.js
var argv = require('minimist')(process.argv.slice(2)); var SocketCluster = require('socketcluster').SocketCluster; var options = { workers: Number(argv.w) || Number(process.env.SOCKETCLUSTER_WORKERS) || 1, brokers: Number(argv.b) || Number(process.env.SOCKETCLUSTER_BROKERS) || 1, port: Number(argv.p) || 8000, ...
var argv = require('minimist')(process.argv.slice(2)); var SocketCluster = require('socketcluster').SocketCluster; var options = { workers: Number(argv.w) || Number(process.env.SOCKETCLUSTER_WORKERS) || 1, brokers: Number(argv.b) || Number(process.env.SOCKETCLUSTER_BROKERS) || 1, port: Number(argv.p) || 8000, ...
Update Added Command Line options for worker and broker controller
Update Added Command Line options for worker and broker controller Update Added Command Line options for worker and broker controller
JavaScript
mit
SocketCluster/socketcluster,SocketCluster/socketcluster
859847a96c2960dd0c775684f85c18b4d2e4fcf0
scripts/basic.js
scripts/basic.js
/** * Convert string array to int array and returns it sorted. */ function sortIntArray(arr) { var intArr = arr.map(Number); return intArr.sort(function(a, b) { return a - b; }); } /** * Decide if hex color needs black or white text color to match. * Modified, Credit to @(http://stackoverflow.com/a/1204...
/** * Convert string array to int array and returns it sorted. */ function sortIntArray(arr) { var intArr = arr.map(Number); return intArr.sort(function(a, b) { return a - b; }); } /** * Decide if hex color needs black or white text color to match. * Modified, Credit to @(http://stackoverflow.com/a/1204...
Fix 3 char hex support
Fix 3 char hex support
JavaScript
mit
MGApcDev/Trello-Enhanced-Date,MGApcDev/Trello-Enhanced-Date
d023e2bd5f88016866f34fd25738c65c822ae45d
lib/techs/v2/css-preprocessor.js
lib/techs/v2/css-preprocessor.js
'use strict'; var BORSCHIK_CSS_TECH = require('borschik/lib/techs/css'), Q = require('q'); exports.API_VER = 2; exports.techMixin = { getBuildResultChunk : function(relPath) { return '@import url(' + relPath + ');\n'; }, getBuildSuffixesMap: function() { return { css: ['...
'use strict'; var BORSCHIK_CSS_TECH = require('borschik/lib/techs/css'), Q = require('q'); exports.API_VER = 2; exports.techMixin = { getBuildResultChunk : function(relPath) { return '@import url(' + relPath + ');\n'; }, getBuildSuffixesMap: function() { return { css: ['...
Add comment about borschik usage
Add comment about borschik usage
JavaScript
mit
bem-archive/bem-tools,bem-archive/bem-tools,bem/bem-tools,bem/bem-tools
2d0a1ad3f9bce43e2a411ee5933cd0ae7fca959a
app/assets/javascripts/battles.js
app/assets/javascripts/battles.js
// Place all the behaviors and hooks related to the matching controller here. // All this logic will automatically be available in application.js. // You can use CoffeeScript in this file: http://coffeescript.org/ $(document).ready(function() { $(".add-tag").click(function(clickEvent) { var id = $(clickEve...
// Place all the behaviors and hooks related to the matching controller here. // All this logic will automatically be available in application.js. // You can use CoffeeScript in this file: http://coffeescript.org/ var addNewTagHandler = function() { $(".add-tag").click(function(clickEvent) { var id = $(cli...
Fix for new tag button with Turbolinks
Fix for new tag button with Turbolinks
JavaScript
mit
trouta23/gifwar,trouta23/gifwar,trouta23/gifwar
62aef7e6a14198ce1a33c95d0428620744725efe
server/server.js
server/server.js
var net = require("net"); var express = require("express"); var bodyParser = require("body-parser"); var config = require('./config'); var app = express(); app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.json()); // Create a simple server var server = net.createServer(function (conn) { //...
var net = require("net"); var express = require("express"); var bodyParser = require("body-parser"); var config = require('./config'); var app = express(); app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.json()); // Create a simple server var server = net.createServer(function (conn) { co...
Handle multiple connections and connection reset
Handle multiple connections and connection reset
JavaScript
mit
scarescrow/Automate,scarescrow/Automate,scarescrow/Automate
66041743b22589aa6ec414a6a211443f8a13d826
resources/frontend_client/app/query_builder/popover_content.react.js
resources/frontend_client/app/query_builder/popover_content.react.js
'use strict'; import OnClickOutside from 'react-onclickoutside'; // this feels a little silly, but we have this component ONLY so that we can add the OnClickOutside functionality on an // arbitrary set of html content. I wish we could do that more easily export default React.createClass({ displayName: 'PopoverC...
'use strict'; import OnClickOutside from 'react-onclickoutside'; // this feels a little silly, but we have this component ONLY so that we can add the OnClickOutside functionality on an // arbitrary set of html content. I wish we could do that more easily // keep track of the order popovers were opened so we only cl...
Support nested popovers by keeping track of which is the top one
Support nested popovers by keeping track of which is the top one
JavaScript
agpl-3.0
lukaswelte/metabase,jonasdiel/metabase-ptBR,Endika/metabase,zoowii/metabase,dashkb/metabase,jonasdiel/metabase-ptBR,lukaswelte/metabase,blueoceanideas/metabase,zoowii/metabase,jonasdiel/metabase-ptBR,zoowii/metabase,zoowii/metabase,zoowii/metabase,Endika/metabase,blueoceanideas/metabase,lukaswelte/metabase,Endika/metab...
d87b175051270db4ecdbd0218e40935350215946
api/controllers/ChatController.js
api/controllers/ChatController.js
/** * ChatController * * @description :: Server-side logic for managing chats * @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers */ module.exports = { };
/** * ChatController * * @description :: Server-side logic for managing chats * @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers */ module.exports = { addConversation: function (req,res) { var data_from_client = req.params.all(); if (req.isSocket && req.method ===...
Create controller method to handle web sockets subscriptions.
Create controller method to handle web sockets subscriptions.
JavaScript
apache-2.0
victorv977/simple-chat-app,victorv977/simple-chat-app,victorv977/simple-chat-app
387fbf0a7d9a6f222bc7130db3100d3d042c52f5
src/javascripts/ng-admin/Crud/list/maDatagridInfinitePagination.js
src/javascripts/ng-admin/Crud/list/maDatagridInfinitePagination.js
import angular from 'angular'; export default function maDatagridInfinitePagination($window, $document) { var windowElement = angular.element($window); var offset = 100, body = $document[0].body; return { restrict: 'E', scope: { perPage: '@', totalItems: '@...
import angular from 'angular'; export default function maDatagridInfinitePagination($window, $document) { var windowElement = angular.element($window); var offset = 100, body = $document[0].body; return { restrict: 'E', scope: { perPage: '@', totalItems: '@...
Fix reload page when scrolling upwards
Fix reload page when scrolling upwards
JavaScript
mit
ulrobix/ng-admin,LuckeyHomes/ng-admin,LuckeyHomes/ng-admin,marmelab/ng-admin,marmelab/ng-admin,eBoutik/ng-admin,ulrobix/ng-admin,eBoutik/ng-admin,LuckeyHomes/ng-admin,eBoutik/ng-admin,ulrobix/ng-admin,marmelab/ng-admin
239f2aeed4a26211945f0795765708054cc9753c
app/assets/javascripts/autosave.js
app/assets/javascripts/autosave.js
function autosave () { var $url = $('.edit_snippet')[0].action; var $data = $('.edit_snippet').serialize(); $.ajax({ type: "PATCH", url: $url, data: $data, dataType: "text" }).done(function(response){ console.log(response); $(".autosave").html(response); }); } $(document).ready(funct...
function autosave () { var $url = $('.edit_snippet')[0].action; var $data = $('.edit_snippet').serialize(); $.ajax({ type: "PATCH", url: $url, data: $data, dataType: "text" }).done(function(response){ console.log(response); $(".autosave").html(response); }); } $(document).ready(funct...
Change from setTimeout to setInterval
Change from setTimeout to setInterval
JavaScript
mit
mxngyn/StoryVine,pearlshin/StoryVine,pearlshin/StoryVine,mxngyn/StoryVine,pearlshin/StoryVine,SputterPuttRedux/storyvine_clone,SputterPuttRedux/storyvine_clone,mxngyn/StoryVine,SputterPuttRedux/storyvine_clone
270d1958a6d4449b607419d50c4ff699d33a1c20
test/test-disinct.js
test/test-disinct.js
var test = require('./tape'); var insert = require('./insert'); insert('distinct', [{ goodbye:'world', hello:'space' }], function(db, t, done) { db.a.distinct('goodbye',{hello:'space'},function(err, docs) { t.ok(!err); t.equal(docs.length, 1); t.equal(docs[0], 'world'); done(); }); });
var test = require('./tape'); var insert = require('./insert'); insert('distinct', [{ goodbye:'world', hello:'space' }, { goodbye:'world', hello:'space' }, { goodbye:'earth', hello:'space' }, { goodbye:'world', hello:'space' }], function(db, t, done) { db.a.distinct('goodbye',{hello:'space'},function...
Add some more docs to the distinct test.
Add some more docs to the distinct test.
JavaScript
mit
kapetan/mongojs,lionvs/mongojs,octoblu/mongojs,mafintosh/mongojs,Dcardcc/mongojs,AMKohn/mongojs,saintedlama/mongojs,PaulinePro/mongojs,beni55/mongojs,Dcard/mongojs
1813963d6bac75bba3d4b903a499f59f8819e895
app/assets/javascripts/denuncia.js
app/assets/javascripts/denuncia.js
// Muestra la pregunta con el data attribute 'numero' y esconde las demas. function mostrarPregunta(numero){ $('fieldset.pregunta').show() $('fieldset.pregunta:not([data-numero=' + numero + '])').hide() } $(document).ready(function(){ // Mostrar la primera pregunta mostrarPregunta(1) // Los botones con clas...
// Muestra la pregunta con el data attribute 'numero' y esconde las demas. function mostrarPregunta(numero){ $('fieldset.pregunta:not([data-numero=' + numero + '])').hide() $('fieldset.pregunta[data-numero=' + numero + ']').fadeIn(600) location.hash = '#Denuncia' } $(document).ready(function(){ // Mostrar la p...
Enable next button when option is picked.
Enable next button when option is picked.
JavaScript
mit
antico5/odila,antico5/odila,antico5/odila
cecfcff0977bb7d1ee7748e73ddfe2345c8f5736
src/Layer.js
src/Layer.js
class Layer { constructor(name, colorNumber, lineTypeName) { this.name = name; this.colorNumber = colorNumber; this.lineTypeName = lineTypeName; this.shapes = []; } toDxfString() { let s = '0\nLAYER\n'; s += '70\n64\n'; s += `2\n${this.name}\n...
class Layer { constructor(name, colorNumber, lineTypeName) { this.name = name; this.colorNumber = colorNumber; this.lineTypeName = lineTypeName; this.shapes = []; this.trueColor = -1; } toDxfString() { let s = '0\nLAYER\n'; s += '70\n64\n'; ...
Add possibility to set true color for layer
Add possibility to set true color for layer
JavaScript
mit
ognjen-petrovic/js-dxf
6370e5069099b9659317788463f36a5834bdbf3e
examples/console/test-array.js
examples/console/test-array.js
var assert = require('assert'); describe('Array', function() { describe('#indexOf()', function() { it('should return -1 when the value is not present', function() { assert.equal(-1, [1,2,3].indexOf(4)); }); it('should store data in the parent process', function () { S...
var assert = require('assert'); describe('Array', function() { describe('#indexOf()', function() { it('should return -1 when the value is not present', function() { assert.equal(-1, [1,2,3].indexOf(4)); }); }); });
Remove unneeded test from example
Remove unneeded test from example
JavaScript
mpl-2.0
thejsninja/syrup
e8e2a2ec7a15572a2981eedda4190d26ef6fe28a
both/collections/activityTypes.js
both/collections/activityTypes.js
ActivityTypes = new Mongo.Collection('activityTypes'); var ActivityTypesSchema = new SimpleSchema({ name: { type: String } }); ActivityTypes.allow({ insert () { // Get current user ID const currentUserId = Meteor.userId(); // Chack if user is administrator const userIsAdmin = Roles.userIsIn...
ActivityTypes = new Mongo.Collection('activityTypes'); var ActivityTypesSchema = new SimpleSchema({ name: { type: String } }); ActivityTypes.allow({ insert () { // Get current user ID const currentUserId = Meteor.userId(); // Chack if user is administrator const userIsAdmin = Roles.userIsIn...
Fix allow rules (admin check)
Fix allow rules (admin check)
JavaScript
agpl-3.0
brylie/juhani-wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing
dd58854eb5566b1a393a10fa467f9bb2b231fcc2
config/userlist.js
config/userlist.js
module.exports = { users: [ // ADD YOUR USERNAME AT THE TOP 'gwillen', 'isaaczafuta', 'bluetidepro', 'julbaxter', 'eik3', 'crandles', 'bobnisco', 'jeromegn', 'mattclaw', 'crankeye', 'cgroner', 'tejohnso', 'sp1d3r...
module.exports = { users: [ // ADD YOUR USERNAME AT THE TOP 'gwillen', 'isaaczafuta', 'bluetidepro', 'julbaxter', 'eik3', 'crandles', 'bobnisco', 'jeromegn', 'mattclaw', 'crankeye', 'cgroner', 'tejohnso', 'sp1d3r...
Add rtfeldman to user list.
Add rtfeldman to user list.
JavaScript
mit
rickhanlonii/pullup,larvalabs/pullup,treygriffith/pullup,gitterHQ/pullup,larvalabs/pullup,rickhanlonii/pullup,josegonzalez/pullup,josegonzalez/pullup,larvalabs/pullup,treygriffith/pullup,rickhanlonii/pullup,gitterHQ/pullup,josegonzalez/pullup,gitterHQ/pullup,treygriffith/pullup
8fd29be52ce6cbc962e04e78256ce481658bc854
app/models/product.server.model.js
app/models/product.server.model.js
'use strict'; /** * Module dependencies. */ var mongoose = require('mongoose'), Schema = mongoose.Schema; /** * Product Schema */ var ProductSchema = new Schema({ // Product model fields // ... }); mongoose.model('Product', ProductSchema);
'use strict'; /** * Module dependencies. */ var mongoose = require('mongoose'), Schema = mongoose.Schema; /** * Validation */ function validateLength (v) { // a custom validation function for checking string length to be used by the model return v.length <= 40; } /** * Product Schema */ var ProductSchema ...
Create schema for Product Model.
Create schema for Product Model.
JavaScript
mit
michalzagrodzki/MEAN-exercise-second,michalzagrodzki/MEAN-exercise-second,michalzagrodzki/MEAN-exercise-second
e8e6cc96b2592234b07accd09d5e1c3b98d6702c
extensions/kiosk/contentjs/runwayCardsDrag.js
extensions/kiosk/contentjs/runwayCardsDrag.js
console.log("Initializing the runway handlers."); var runway = document.querySelector('.widget-runway-tray-wrapper'); var initialMousePosition = null; var initialScrollLeft = null; runway.addEventListener('touchstart', function(e){ console.log('touchstart'); // this should be enabled only in chrome // in chrom...
console.log("Initializing the runway handlers."); var runway = document.querySelector('.widget-runway-tray-wrapper'); var initialMousePosition = null; var initialScrollLeft = null; runway.addEventListener('touchstart', function(e){ console.log('touchstart'); // this should be enabled only in chrome // in chrom...
Change the direction of the scrolling
Change the direction of the scrolling
JavaScript
apache-2.0
EndPointCorp/appctl,EndPointCorp/appctl
3d4ec873076125f9c433f91c6557e7e4cce475c4
src/client/webform/assets/components/eeabuildinfo.js
src/client/webform/assets/components/eeabuildinfo.js
'use strict'; app.component("eeaFormBuild", { template: '<div style="line-height: 10px;color: #f0f0f0;">Build date: {{$ctrl.date}}<br>{{$ctrl.diff}} ago<br>by {{$ctrl.user}}</div>', bindings: { date: '@', user: '@' }, controller: function() { this.$onInit = function() { var delta = Math.abs(new Date().ge...
'use strict'; app.component("eeaFormBuild", { template: '<div style="line-height: 10px;color: #f0f0f0;">Build date: {{$ctrl.date}}<br>{{$ctrl.diff}} ago<br>by {{$ctrl.user}}</div>', bindings: { date: '@', user: '@' }, controller: function() { this.$onInit = function() { // https://stackoverflow.com/quest...
Update EEA Form Build Info Comments/Source
Update EEA Form Build Info Comments/Source
JavaScript
mpl-2.0
g-bo/eea.webforms.generator
96574e0d1c0a402dc251d6208316e24bf5a631bc
local_modules/tresdb-models/index.js
local_modules/tresdb-models/index.js
/* eslint-disable no-var */ exports.attachment = require('./attachment') exports.attachments = require('./attachments') exports.comment = require('./comment') exports.comments = require('./comments') exports.entries = require('./entries') exports.entry = require('./entry') exports.exports = require('./exports') export...
/* eslint-disable no-var */ exports.attachment = require('./attachment') exports.attachments = require('./attachments') exports.comment = require('./comment') exports.comments = require('./comments') exports.entries = require('./entries') exports.entry = require('./entry') exports.exports = require('./exports') export...
Create models.bus for bus scoping
Create models.bus for bus scoping
JavaScript
mit
axelpale/tresdb,axelpale/tresdb
e02c1b34877b67cdc4896fed35ffe2fa5b7ed5b1
noisytweets/static/js/keyword.js
noisytweets/static/js/keyword.js
function processTweet(tweet) { console.log(tweet); } function startNoisyClient(keyword) { NoisyClient.setup(keyword); NoisyClient.addOnTweetFunction(function (tweet) { processTweet(tweet); }); }
function processTweet(tweet) { // Add tweet to the tweets table $('<tr><td>' + tweet['tweet'] + '</td><td>' + tweet['sentiment'] + '</td></tr>').prependTo('#tweets-table tbody'); $('#tweets-table').find('tbody').find('tr').slice(20, 21).remove(); } function startNoisyClient(keyword) { NoisyClient.setup...
Add tweets to the tweets table.
Add tweets to the tweets table.
JavaScript
agpl-3.0
musalbas/listentotwitter,musalbas/listentotwitter,musalbas/listentotwitter
618516a18e925e63e4a6f7dd5b3535b80e247d84
applications/drive/jest.config.js
applications/drive/jest.config.js
module.exports = { setupFilesAfterEnv: ['./rtl.setup.js'], verbose: true, moduleDirectories: ['node_modules'], transform: { '^.+\\.(js|tsx?)$': '<rootDir>/jest.transform.js' }, collectCoverage: true, collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}'], transformIgnorePatterns: ['no...
module.exports = { setupFilesAfterEnv: ['./rtl.setup.js'], verbose: true, moduleDirectories: ['node_modules'], transform: { '^.+\\.(js|tsx?)$': '<rootDir>/jest.transform.js', }, collectCoverage: true, collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}'], transformIgnorePatterns: ['n...
Add dependency to jest transform
Add dependency to jest transform
JavaScript
mit
ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient
65e143e14e0cd419af6de6f529516525da1335f0
VotingApplication/VotingApplication.Web/Scripts/Controllers/AccountLoginController.js
VotingApplication/VotingApplication.Web/Scripts/Controllers/AccountLoginController.js
/// <reference path="../Services/AccountService.js" /> (function () { 'use strict'; angular .module('GVA.Common') .controller('AccountLoginController', AccountLoginController); AccountLoginController.$inject = ['$scope', '$rootScope', 'AccountService']; function AccountLoginControlle...
/// <reference path="../Services/AccountService.js" /> (function () { 'use strict'; angular .module('GVA.Common') .controller('AccountLoginController', AccountLoginController); AccountLoginController.$inject = ['$scope', '$rootScope', '$route', 'AccountService']; function AccountLogi...
Refresh angular controllers after login
Refresh angular controllers after login
JavaScript
apache-2.0
Generic-Voting-Application/voting-application,tpkelly/voting-application,JDawes-ScottLogic/voting-application,Generic-Voting-Application/voting-application,tpkelly/voting-application,stevenhillcox/voting-application,stevenhillcox/voting-application,JDawes-ScottLogic/voting-application,Generic-Voting-Application/voting-...
f292c62fc0afd2a2f3eda3a87b63b601d6a184f0
public/js/backend/home.js
public/js/backend/home.js
$(document).ready(function() { setTimeout(function() { var updateChecker = $('#update-checker'); var updateCheckerBody = updateChecker.find('.panel-body'); $.get('/version', function(data) { if (data.newer) { var content = '<p>There is a new version of LBlog available (<strong>' + data.latestVersion + '<...
$(document).ready(function() { checkForUpdates(); }); function checkForUpdates() { var updateChecker = $('#update-checker'); var updateCheckerBody = updateChecker.find('.panel-body'); $.get('/version', function(data) { if (data.newer) { var content = '<p>There is a new version of LBlog available (<strong>' +...
Remove setTimeout on version checker
Remove setTimeout on version checker That was just for testing.
JavaScript
mit
mrterryh/LBlog,mrterryh/LBlog
067e63845a69e3fc129aab1d443ae91e9f825254
src/main/web/florence/js/functions/_updateContent.js
src/main/web/florence/js/functions/_updateContent.js
function updateContent(collectionId, path, content, redirectToPath) { postContent(collectionId, path, content, success = function (response) { //console.log("Updating completed " + response); Florence.Editor.isDirty = false; if (redirectToPath) { createWorkspace(redirectToPath, collectio...
function updateContent(collectionId, path, content, redirectToPath) { var redirect = redirectToPath; postContent(collectionId, path, content, success = function (response) { Florence.Editor.isDirty = false; if (redirect) { createWorkspace(redirect, collectionId, 'edit'); return; ...
Save back to compendium bug
Save back to compendium bug
JavaScript
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
6e2ec6442fd0747bf586497e37419868f5b340f5
gulpfile.js
gulpfile.js
'use strict'; var gulp = require('gulp'); var gutil = require('gulp-util'); var mocha = require('gulp-mocha'); gulp.task('test', function() { return gulp.src( ['./test/**/*.js'] ) .pipe(mocha({ 'reporter': 'spec', 'globals': { 'should': require('should') } }).on('error', gutil.log)); }); gulp.task...
'use strict'; var gulp = require('gulp'); var gutil = require('gulp-util'); var mocha = require('gulp-mocha'); gulp.task('test', function() { return gulp.src( ['./test/**/*.js'] ) .pipe(mocha({ 'reporter': 'spec', 'globals': { 'should': require('should') } }).on('error', gutil.log)); }); gulp.task...
Fix issue with 'gulp.watch' tracking too many files. Damn you 'node_modules'...
Fix issue with 'gulp.watch' tracking too many files. Damn you 'node_modules'...
JavaScript
mit
santtusulander/teamboard-api,tanelih/teamboard-api,JanKuukkanen/Oauth-api,nikolauska/teamboard-api,N4SJAMK/teamboard-api,santtusulander/teamboard-api,spherelot/teamboard-api,JanKuukkanen/teamboard-api
eadd954115d52e546b6ff4647264989e5600b08d
packages/modules/install-packages.js
packages/modules/install-packages.js
function install(name, mainModule) { var meteorDir = {}; // Given a package name <name>, install a stub module in the // /node_modules/meteor directory called <name>.js, so that // require.resolve("meteor/<name>") will always return // /node_modules/meteor/<name>.js instead of something like // /node_modul...
function install(name, mainModule) { var meteorDir = {}; // Given a package name <name>, install a stub module in the // /node_modules/meteor directory called <name>.js, so that // require.resolve("meteor/<name>") will always return // /node_modules/meteor/<name>.js instead of something like // /node_modul...
Use alias instead of stub module for meteor/package imports.
Use alias instead of stub module for meteor/package imports. Aliases are lighter weight than stub module functions, and easier for the dynamic import(...) dependency traversal logic to understand.
JavaScript
mit
Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor
2d287b74a8fcd70ff2dee49c81ebee8129e3c950
events/guildCreate.js
events/guildCreate.js
const MIN_MEMBERS = 3; // Minimum amount of MEMBERS that must be in a guild. const BOT_RATIO = 70; // The percentage of Members that are Bots in a guild must be less than this. exports.run = (client, guild) => { if (guild.members.filter(u => u.user.bot).size * 100 / guild.memberCount >= BOT_RATIO || guild.memberCoun...
const MIN_MEMBERS = 3; // Minimum amount of MEMBERS that must be in a guild. const BOT_RATIO = 70; // The percentage of Members that are Bots in a guild must be less than this. exports.run = async (client, guild) => { if (guild.memberCount < MIN_MEMBERS || guild.members.filter(u => u.user.bot).size * 100 / guild.mem...
Change order of checks, include catch for DM
Change order of checks, include catch for DM
JavaScript
mit
dirigeants/komada-pieces
62061b8886edb9cc686bd1ab7a493bccbe8650ea
app/pods/chat/room/controller.js
app/pods/chat/room/controller.js
import Ember from 'ember'; export default Ember.Controller.extend({ loggedIn: Ember.computed.alias('session.isConnected'), currentRoom: null, actions: { sendMessage: function () { var room = this.get('model'); var message = this.store.createRecord('message'); message.set('body', this.get('newMessa...
import Ember from 'ember'; export default Ember.Controller.extend({ loggedIn: Ember.computed.alias('session.isConnected'), currentRoom: null, actions: { sendMessage: function () { var room = this.get('model'); var message = this.store.createRecord('message'); message.set('body', this.get('newMessa...
Save room when adding message
Save room when adding message
JavaScript
mit
brendanoh/moai,brendanoh/moai
b8881dcfbd1bd73c6914257babefbd0d07683162
src/constants.js
src/constants.js
export const palette = { primary: { white: '#ffffff', lightCyan: '#55ffff', lightMagenta: '#ff55ff', black: '#000000', }, secondary: { yellow: '#ffff55', lightGreen: '#55ff55', lightRed: '#ff5555', black: '#000000', }, };
export const palette = { primary: { black: '#000000', white: '#ffffff', lightCyan: '#55ffff', lightMagenta: '#ff55ff', }, secondary: { yellow: '#ffff55', lightGreen: '#55ff55', lightRed: '#ff5555', black: '#000000', }, };
Change ordering of palette for nicer display
Change ordering of palette for nicer display
JavaScript
mit
oliverbenns/cga-jam,oliverbenns/cga-jam,oliverbenns/cga-jam
e9a50990b9670ae3fce89307da8f2edf2060039f
routes/index.js
routes/index.js
var express = require('express'); var router = express.Router(); var moment = require('moment'); var models = require('../models'); /* GET home page. */ router.get('/', function(req, res) { models.Event.groupByDays({ include: [ models.Location ], where: [ { state: "approved" }, ["(startdt >= date('now', 'st...
var express = require('express'); var router = express.Router(); var moment = require('moment'); var models = require('../models'); /* GET home page. */ router.get('/', function(req, res, next) { models.Event.groupByDays({ include: [ models.Location ], where: [ { state: "approved" }, ["(startdt >= date('now...
Improve error handling on front page
Improve error handling on front page
JavaScript
agpl-3.0
takkaria/echojs,takkaria/echojs,takkaria/echojs
4a149e6c0ed226acb88d969b1b63161337b7f82a
src/transform.js
src/transform.js
import _ from 'lodash' let protoMutators = {} let defsKeys = {} export const filterByKeys = (defsKeys, candidate) => { const keys = _.intersection(defsKeys, _.keys(candidate)) return _.pick(candidate, keys) } export const createTransform = (definitions) => { transform.keys = _.keys(definitions) return transf...
import _ from 'lodash' let protoMutators = {} let defsKeys = {} export const filterByKeys = (defsKeys, candidate) => { const keys = _.intersection(defsKeys, _.keys(candidate)) return _.pick(candidate, keys) } export const createTransform = (definitions) => { transform.keys = _.keys(definitions) return transf...
Add defKeys as second argument for mutators
feat: Add defKeys as second argument for mutators
JavaScript
mit
sospedra/schemative
0a5746c96a7e24f1882e5504b82354cbac46e65c
client/src/containers/Newsfeed.js
client/src/containers/Newsfeed.js
import React, {Component} from 'react' import {connect} from 'react-redux'; import {Switch, Route} from 'react-router-dom'; import ChannelShow from './ChannelShow' import ChannelIndexView from './ChannelIndexView' class Newsfeed extends Component { channels() { return this.props.sources.filter((source) => !!s...
import React, {Component} from 'react' import {connect} from 'react-redux'; import {bindActionCreators} from 'redux' import {Switch, Route} from 'react-router-dom'; import ChannelShow from './ChannelShow' import ChannelIndexView from './ChannelIndexView' import * as channelsActions from '../actions/channelsActions' ...
Move article retrieval from Channel views
Move article retrieval from Channel views
JavaScript
mit
kevinladkins/newsfeed,kevinladkins/newsfeed,kevinladkins/newsfeed
3411f36bd96dbfc2bcc5212d802ecfd3005cb5ca
eloquent_js/chapter09/ch09_ex02.js
eloquent_js/chapter09/ch09_ex02.js
let text = "'I'm the cook,' he said, 'it's my job.'"; // Change this call. console.log(text.replace(/(\W|^)'|'(\W|$)/g, '$1"$2')); // → "I'm the cook," he said, "it's my job."
console.log(text.replace(/(\W|^)'|'(\W|$)/g, `$1"$2`));
Add chapter 9, exercise 2
Add chapter 9, exercise 2
JavaScript
mit
bewuethr/ctci
2bdb6e01a8d9fdf828466c7f8da9c547b295e0df
website/src/app/project/experiments/services/experiments-service.service.js
website/src/app/project/experiments/services/experiments-service.service.js
class ExperimentsService { /*@ngInject*/ constructor(projectsAPI) { this.projectsAPI = projectsAPI; } getAllForProject(projectID) { return this.projectsAPI(projectID).one('experiments').getList(); } createForProject(projectID, experiment) { return this.projectsAPI(proje...
class ExperimentsService { /*@ngInject*/ constructor(projectsAPI) { this.projectsAPI = projectsAPI; } getAllForProject(projectID) { return this.projectsAPI(projectID).one('experiments').getList(); } createForProject(projectID, experiment) { return this.projectsAPI(proje...
Add call to get a single experiment for a project.
Add call to get a single experiment for a project.
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
d5033d012240ba9e3617a73b6efcefd0f42259d1
assets/js/components/root/index.js
assets/js/components/root/index.js
/** * Root component. * * Site Kit by Google, Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unle...
/** * Root component. * * Site Kit by Google, Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unle...
Update Root with CollectModuleData for legacy compat.
Update Root with CollectModuleData for legacy compat.
JavaScript
apache-2.0
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
41472e9bff044e65b04011257ced5f732ce01cac
src/js/weapon.js
src/js/weapon.js
(function() { 'use strict'; function Weapon(game, x, y, coolDown, bulletSpeed, bullets, damage) { this.game = game; this.x = x; this.y = y; this.coolDown = coolDown; this.nextFire = 0; this.bullets = bullets; this.bulletSpeed = bulletSpeed; this.damage = damage; } Weapon.protot...
'use strict'; Darwinator.Weapon = function (game, x, y, coolDown, bulletSpeed, bullets, damage) { this.game = game; this.x = x; this.y = y; this.coolDown = coolDown; this.nextFire = 0; this.bullets = bullets; this.bulletSpeed = bulletSpeed; this.damage = damage; } D...
Update namespace to currently used convention
Update namespace to currently used convention
JavaScript
mit
werme/DATX02
a9915d9b7bbadf22f569a54f9edbc5df31a4556c
app/assets/config/camaleon-cms.js
app/assets/config/camaleon-cms.js
//= link_tree ../images //= link_tree ../javascripts //= link_tree ../stylesheets //= link_tree ../../apps/plugins/visibility_post/assets/js //= link plugins/cama_contact_form/admin_editor.js //= link camaleon_cms/admin/nav_menu.js
//= link_tree ../images //= link_tree ../javascripts //= link_tree ../stylesheets //= link_tree ../../apps/plugins/visibility_post/assets/js //= link plugins/cama_contact_form/admin_editor.js //= link camaleon_cms/admin/nav_menu.js //= link_tree ../../apps/themes/camaleon_first/assets //= link_tree ../../apps/themes/de...
Make sure built-in theme assets get compiled
Make sure built-in theme assets get compiled
JavaScript
mit
owen2345/camaleon-cms,owen2345/camaleon-cms,owen2345/camaleon-cms,brian-kephart/camaleon-cms,brian-kephart/camaleon-cms,brian-kephart/camaleon-cms
5d26e41c2c8d98abf1cbc1a2d58d33bcdf87997d
app/assets/javascripts/app.js
app/assets/javascripts/app.js
angular .module('fitnessTracker', ['ui.router', 'templates', 'Devise']) .config(function($stateProvider, $urlRouterProvider) { $stateProvider .state('signup', { url: '/signup', templateUrl: 'auth/_signup.html', controller: 'AuthenticationController as AuthCtrl' ...
angular .module('fitnessTracker', ['ui.router', 'templates', 'Devise']) .config(function($stateProvider, $urlRouterProvider) { $stateProvider .state('signup', { url: '/signup', templateUrl: 'auth/_signup.html', controller: 'AuthenticationController as AuthCtrl', ...
Add onEnter redirect for 'signin' and 'signup' if current user
Add onEnter redirect for 'signin' and 'signup' if current user
JavaScript
mit
viparthasarathy/fitness-tracker,viparthasarathy/fitness-tracker,viparthasarathy/fitness-tracker
05d65d646ee1fba5f07e1b203c421810da2908aa
app/assets/view/searchView.js
app/assets/view/searchView.js
'use strict'; module.controller('searchView', [ '$scope', 'volumes', 'pageService', function ($scope, volumes, page) { page.display.title = page.constants.message('page.title.search'); // var updateData = function (data) { angular.forEach(data, function (volume) { volume.more = ''; ...
'use strict'; module.controller('searchView', [ '$scope', 'volumes', 'pageService', function ($scope, volumes, page) { page.display.title = page.constants.message('page.title.search'); // var updateData = function (data) { angular.forEach(data, function (volume) { volume.more = ''; ...
Include citation data in search targets
Include citation data in search targets
JavaScript
agpl-3.0
databrary/databrary,databrary/databrary,databrary/databrary,databrary/databrary
86d46d927e0682115ea91f0c2bbc64a3e9da80c8
src/builders/content-node-helpers.js
src/builders/content-node-helpers.js
import * as url from "url"; export function getBlob(node) { var buf = new Buffer(node.value.data, node.value.encoding || "utf8"); var blob = new Blob([buf], { type: node.value.type }); return blob; } export function getPromiseForRequest(node) { if (node.value.src) { var src = url.resolve(node.base || "", ...
import * as url from "url"; export function getBlob(node) { var data = node.value.data || ""; if (typeof data === "object") data = JSON.stringify(data); var buf = new Buffer(data, node.value.encoding || "utf8"); var blob = new Blob([buf], { type: node.value.type }); return blob; } export function getPromise...
Add Support for Content Data Objects
Add Support for Content Data Objects
JavaScript
mit
lynx-json/jsua-lynx
4cf5235795a2a2ffcb76cbf8ebcc2dad44f9cec8
app/sockets/StartTimelineUpdate.js
app/sockets/StartTimelineUpdate.js
/** * Serve automatic timeline updates. */ define([], function() { 'use strict'; var intervalDelay = mainevent.getConfig().timelineUpdateDelay, updateInterval = null; return function(socket) { /** * Client seeds the update stream with the last-seen ID/time. * * @param options {Objec...
/** * Serve automatic timeline updates. */ define([], function() { 'use strict'; return function(socket) { var redis = null; /** * Client seeds the update stream with the last-seen ID/time. * * @param options {Object} Last-seen attributes. * - newestEventId {String} * - newest...
Replace setInterval() w/ PubSub in timeline updates socket.
Replace setInterval() w/ PubSub in timeline updates socket.
JavaScript
mit
codeactual/mainevent
71f056c75cb35056243a660f139441ab4ab78486
examples/layer-clipping-vector.js
examples/layer-clipping-vector.js
import GeoJSON from '../src/ol/format/GeoJSON.js'; import Map from '../src/ol/Map.js'; import OSM from '../src/ol/source/OSM.js'; import VectorSource from '../src/ol/source/Vector.js'; import View from '../src/ol/View.js'; import {Fill, Style} from '../src/ol/style.js'; import {Tile as TileLayer, Vector as VectorLayer}...
import GeoJSON from '../src/ol/format/GeoJSON.js'; import Map from '../src/ol/Map.js'; import OSM from '../src/ol/source/OSM.js'; import VectorSource from '../src/ol/source/Vector.js'; import View from '../src/ol/View.js'; import {Fill, Style} from '../src/ol/style.js'; import {Tile as TileLayer, Vector as VectorLayer}...
Use prerender and postrender events on Vector Clipping Layer example for better readability
Use prerender and postrender events on Vector Clipping Layer example for better readability
JavaScript
bsd-2-clause
stweil/openlayers,adube/ol3,openlayers/openlayers,ahocevar/ol3,ahocevar/openlayers,stweil/ol3,adube/ol3,stweil/ol3,oterral/ol3,oterral/ol3,geekdenz/openlayers,geekdenz/ol3,stweil/ol3,stweil/openlayers,ahocevar/openlayers,bjornharrtell/ol3,openlayers/openlayers,stweil/ol3,adube/ol3,ahocevar/ol3,stweil/openlayers,ahoceva...
5f53a079bb116ae3283a57f7affcea5b243b10e0
src/demo/App.js
src/demo/App.js
import React, { Component } from 'react'; import { VirtualKanban } from '../'; import './App.css'; class App extends Component { constructor(props) { super(props); this.state = { lists: props.getLists(), }; this.dropRow = this.dropRow.bind(this); this.dropList = this.dropList.bind(this)...
import React, { Component } from 'react'; import { VirtualKanban } from '../'; import './App.css'; class App extends Component { constructor(props) { super(props); this.state = { lists: props.getLists(), }; } render() { return ( <div className='KanbanWrapper'> <VirtualKanb...
Remove drop callbacks from demo example
Remove drop callbacks from demo example
JavaScript
mit
edulan/react-virtual-kanban,edulan/react-virtual-kanban
26e874f99063b54b61c65cb71db3d1ab5a690fdc
src/compilation/processJavaScriptCode.spec.js
src/compilation/processJavaScriptCode.spec.js
import processJavaScriptCode from "./processJavaScriptCode" describe("processJavaScriptCode", function(){ it("Wraps string literals with an object with an origin", function(){ var code = "var a = 'Hello';a" code = processJavaScriptCode(code).code expect(eval(code).origin.action).toBe("Strin...
import processJavaScriptCode from "./processJavaScriptCode" describe("processJavaScriptCode", function(){ it("Wraps string literals with an object with an origin", function(){ var code = "var a = 'Hello';a" code = processJavaScriptCode(code).code expect(eval(code).origin.action).toBe("Strin...
Add tests for using conditional operator with tracked strings.
Add tests for using conditional operator with tracked strings.
JavaScript
mit
mattzeunert/FromJS,mattzeunert/FromJS,mattzeunert/FromJS,mattzeunert/FromJS
17d723559d8ed2fa7f452d3fc245bf4d19e9efd0
src/components/Button/__tests__/index-test.js
src/components/Button/__tests__/index-test.js
/* eslint-env jasmine, jest */ describe('components/Button', () => { test.skip('NO TEST COVERAGE', () => {}); });
/* eslint-env jasmine, jest */ import React from 'react'; import Button from '..'; import { mount, shallow } from 'enzyme'; const findNativeButton = wrapper => wrapper.getDOMNode(); describe('components/Button', () => { test('prop "color"', () => { const onPress = () => {}; const color = 'blue'; const ...
Add tests for 'Button' component
Add tests for 'Button' component Close #583
JavaScript
mit
necolas/react-native-web,necolas/react-native-web,necolas/react-native-web
41be9be6560c3040c3733229a78494b4a9e7c37a
src/database/DataTypes/Report.js
src/database/DataTypes/Report.js
/** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2019 */ import Realm from 'realm'; export class Report extends Realm.Object {}
/** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2019 */ import Realm from 'realm'; /** * A Report. * * @property {string} id * @property {string} type * @property {string} title * @property {string} _data */ export class Report extends Realm.Object { ...
Add getter and setter for data
Add getter and setter for data
JavaScript
mit
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
fa8eb370411372a89928dfa9861e8954aaabc569
core/schema/clean-title/index.js
core/schema/clean-title/index.js
'use strict' const cleanWhiteSpaces = require('condense-whitespace') const { flow } = require('lodash') const titleize = require('titleize') const REGEX_WORDS = RegExp(require('./words.json').join('|'), 'ig') const REGEX_PRICE = require('../../identify/price').regex function cleanWords (str) { return str.replace(R...
'use strict' const cleanWhiteSpaces = require('condense-whitespace') const { flow } = require('lodash') const titleize = require('titleize') const REGEX_WORDS = RegExp(require('./words.json').join('|'), 'ig') const REGEX_PRICE = RegExp(require('../../identify/price').regex, 'g') function cleanWords (str) { return ...
Clean price globally from title
Clean price globally from title
JavaScript
mit
windtoday/windtoday-core,windtoday/windtoday-core
0b2433174527ae25ae2f4fa47fca6e97b41b6547
src/hashcode.js
src/hashcode.js
/* * Hashcode.js 1.0.0 * https://github.com/stuartbannerman/hashcode * * Copyright 2013 Stuart Bannerman (me@stuartbannerman.com) * Released under the MIT license * * Date: 07-04-2013 */ (function(window) { window.Hashcode = (function() { // Hashes a string var hash = funct...
/* * Hashcode.js 1.0.0 * https://github.com/stuartbannerman/hashcode * * Copyright 2013 Stuart Bannerman (me@stuartbannerman.com) * Released under the MIT license * * Date: 07-04-2013 */ (function(window) { window.Hashcode = (function() { // Hashes a string var hash = funct...
Fix for different types with the same value giving the same hash, such as "1" and 1
Fix for different types with the same value giving the same hash, such as "1" and 1
JavaScript
mit
stuartbannerman/hashcode
ce19de86d2ec29d505dff3f4b30afb515a0b322c
packages/@sanity/schema/src/sanity/validation/utils/validateTypeName.js
packages/@sanity/schema/src/sanity/validation/utils/validateTypeName.js
import leven from 'leven' import humanize from 'humanize-list' import {error, HELP_IDS} from '../createValidationResult' const quote = str => `"${str}"` export function validateTypeName(typeName: string, visitorContext) { const possibleTypeNames = visitorContext.getTypeNames() if (!typeName) { return [ ...
import leven from 'leven' import humanize from 'humanize-list' import {error, HELP_IDS} from '../createValidationResult' const quote = str => `"${str}"` export function validateTypeName(typeName: string, visitorContext) { const possibleTypeNames = visitorContext.getTypeNames() if (!typeName) { return [ ...
Validate that type name is a string
[schema] Validate that type name is a string
JavaScript
mit
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
b0f59c6a96c3eff8e0f3963ccde14d39fbbd653d
ably.js
ably.js
(function (root, factory) { 'use strict'; if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define([], function() { var Ably = factory(); return new Ably(); }); } else if (typeof exports === 'object') { // Node....
(function (root, factory) { 'use strict'; if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define([], function() { var Ably = factory(); return new Ably(); }); } else if (typeof exports === 'object') { // Node....
Make the test for .when() method pass
Make the test for .when() method pass
JavaScript
mit
vgno/ably
fe779e35e39b2942d2788061d0d285988960d5c0
ember-cli-build.js
ember-cli-build.js
/*jshint node:true*/ /* global require, module */ var EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); module.exports = function(defaults) { var options; switch (process.env.TEST_SCENARIO) { case undefined: case '1': break; case '2': options = { loadExternal: true, ...
/*jshint node:true*/ /* global require, module */ var EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); module.exports = function(defaults) { var options; switch (process.env.TEST_SCENARIO) { case undefined: case '1': break; case '2': options = { loadExternal: true, ...
Add outputPath to test scenario 2.
Add outputPath to test scenario 2.
JavaScript
mit
sir-dunxalot/ember-new-relic,sir-dunxalot/ember-new-relic
2de18601957568389d8514f0a3447f097be7b286
test/helpers/setup.js
test/helpers/setup.js
var chai = require('chai'); var supertest = require('supertest-as-promised'); var api = require('../../server'); var request = supertest(api); var blueprint_client = require('../../modules/blueprint'); var mqtt_client = require('../../modules/mqtt'); GLOBAL.AssertionError = chai.AssertionError; GLOBAL.expect = chai.ex...
/* global GLOBAL */ var chai = require('chai'); var supertest = require('supertest-as-promised'); var api = require('../../server'); var request = supertest(api); var blueprint_client = require('../../modules/blueprint'); var mqtt_client = require('../../modules/mqtt'); GLOBAL.AssertionError = chai.AssertionError; GLO...
Add GLOBAL as global var
Add GLOBAL as global var
JavaScript
mit
Altoros/refill-them-api
dc13515ceacdd0740c2cabe43d1b894b3629cf92
share/spice/maps/maps/maps_maps.js
share/spice/maps/maps/maps_maps.js
DDG.require('maps',function(){ ddg_spice_maps_maps = function(response) { if (!response) { return Spice.failed('maps'); } // OSM sends back a bunch of places, just want the first one for now response = response.features[0]; response.address=response.place_name; ...
DDG.require('maps',function(){ ddg_spice_maps_maps = function(response) { if (!response || !response.features || !response.features.length) { return Spice.failed('maps'); } // Mapbox sends back a bunch of places, just want the first one for now response = response.features[0]; ...
Add guards for null values. Move address formatting to internal pr
Add guards for null values. Move address formatting to internal pr
JavaScript
apache-2.0
mr-karan/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,levaly/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,whalenrp/zeroclicki...
d256b09053b53173df673800546e0b7c5a3e44b2
htdocs/js/directive/directives.js
htdocs/js/directive/directives.js
/* Directives */ angular.module('myApp.directives') .directive('ngVisible', function() { return function(scope, elem, attr) { scope.$watch(attr.ngVisible, function(value) { elem.css('visibility', value ? 'visible' : 'hidden'); }); }; ...
/* Directives */ angular.module('myApp.directives') .directive('ngVisible', function() { return function(scope, elem, attr) { scope.$watch(attr.ngVisible, function(value) { elem.css('visibility', value ? 'visible' : 'hidden'); }); }; ...
Fix autofocus in user login dialog
Fix autofocus in user login dialog
JavaScript
mit
Ecodev/gims,Ecodev/gims,Ecodev/gims,Ecodev/gims,Ecodev/gims
0c15012b46af05202ae4f8f649ba00216850d715
js/app/models/want.js
js/app/models/want.js
define(['jquery', 'underscore', 'backbone'], function($, _, Backbone) { var Models = {}; Models.Want = Backbone.Model.extend({ defaults: { id: '', name: '', price: '', location: '', buyers: [], owner: '', imageUrl: '', dateStart: '', dateExpire: '' }, initialize: function() { }, ...
define(['jquery', 'underscore', 'backbone'], function($, _, Backbone) { var Models = {}; Models.Want = Backbone.Model.extend({ defaults: { id: '', name: '', price: '', location: '', buyers: [], owner: '', imageUrl: '', dateStart: '', dateExpire: '' }, initialize: function() { }, ...
Add product name to model.
Add product name to model.
JavaScript
mit
burnflare/CrowdBuy,burnflare/CrowdBuy
e7274cd40ff5283da37b00a95b44cefdfb0c0507
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { 'use strict'; // Configuration grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jshint: { options: { jshintrc: true }, bin: 'bin/**/*.js', grunt: 'Gruntfile.js', lib: ...
module.exports = function(grunt) { 'use strict'; // Configuration grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jshint: { options: { jshintrc: true }, bin: 'bin/**/*.js', grunt: 'Gruntfile.js', lib: ...
Revert "Added a `ci` task for `grunt`."
Revert "Added a `ci` task for `grunt`." This reverts commit fc2e56b49ced252632f6d018596131fe51e1b3e2.
JavaScript
mit
joshuaspence/lesscsslint
6704a9d62e7f12e6a9bd513c8c0bcada77dfb5ad
demo/App.js
demo/App.js
import {PureComponent} from 'react'; import parseDiff from 'parse-diff'; import File from './File'; import './App.css'; /* eslint-disable no-console */ export default class App extends PureComponent { state = { diff: null, viewType: 'split' }; async componentDidMount() { const re...
import {PureComponent} from 'react'; import parseDiff from 'parse-diff'; import File from './File'; import './App.css'; /* eslint-disable no-console */ export default class App extends PureComponent { state = { diff: null, viewType: 'split' }; async componentDidMount() { const re...
Add a double requestAnimationFrame to count paint performance
Add a double requestAnimationFrame to count paint performance
JavaScript
mit
otakustay/react-diff-view,otakustay/react-diff-view
9df2db53659311ed469f777fc2159a6b044de5f2
test/lib/mock.js
test/lib/mock.js
var mocks = { getFakeView: function(width, height) { return { handler: false, clientWidth: width, clientHeight: height, addEventListener: function(handler) { this.handler = handler; }, removeEventListener: function() {...
var mocks = { getFakeView: function(width, height) { return { handler: false, clientWidth: width, clientHeight: height, addEventListener: function(handler) { this.handler = handler; }, removeEventListener: function() {...
Return the appended node to match the DOM api
Return the appended node to match the DOM api
JavaScript
mit
davidcl64/litelist
33e9a265c78aec7c57a7b8ffe2974b00ae5dab97
app/scripts/misc/config.js
app/scripts/misc/config.js
// http://timkadlec.com/2013/01/windows-phone-8-and-device-width/ if (navigator.userAgent.match(/IEMobile\/10\.0/)) { var msViewportStyle = document.createElement('style'); msViewportStyle.appendChild( document.createTextNode( '@-ms-viewport{width:auto!important}' ) ); document.getElementsByTagNam...
// http://timkadlec.com/2013/01/windows-phone-8-and-device-width/ if (navigator.userAgent.match(/IEMobile\/10\.0/)) { var msViewportStyle = document.createElement('style'); msViewportStyle.appendChild( document.createTextNode( '@-ms-viewport{width:auto!important}' ) ); document.getElementsByTagNam...
Remove unused code to create a pojo from an Ember object
Remove unused code to create a pojo from an Ember object
JavaScript
mit
darvelo/wishlist,darvelo/wishlist
784712791da8c7d21afa62a3bf6a8fdac8c27a80
app/javascript/flavours/glitch/features/composer/direct_warning/index.js
app/javascript/flavours/glitch/features/composer/direct_warning/index.js
import React from 'react'; import Motion from 'flavours/glitch/util/optional_motion'; import spring from 'react-motion/lib/spring'; import { defineMessages, FormattedMessage } from 'react-intl'; // This is the spring used with our motion. const motionSpring = spring(1, { damping: 35, stiffness: 400 }); // Messages....
import React from 'react'; import Motion from 'flavours/glitch/util/optional_motion'; import spring from 'react-motion/lib/spring'; import { defineMessages, FormattedMessage } from 'react-intl'; // This is the spring used with our motion. const motionSpring = spring(1, { damping: 35, stiffness: 400 }); // Messages....
Reword the direct message warning
[Glitch] Reword the direct message warning Port 53c2164e9c8e2538de386a526a97db187ecae470 to glitch-soc
JavaScript
agpl-3.0
im-in-space/mastodon,im-in-space/mastodon,im-in-space/mastodon,Kirishima21/mastodon,Kirishima21/mastodon,glitch-soc/mastodon,Kirishima21/mastodon,im-in-space/mastodon,glitch-soc/mastodon,glitch-soc/mastodon,glitch-soc/mastodon,Kirishima21/mastodon
5e290b96fd75bbc0f983d095000896f8f0fd7dd0
lib/update-package.js
lib/update-package.js
const Fs = require('fs'); const Path = require('path'); const Hoek = require('hoek'); const FindNodeVersion = require('./find-node-version'); module.exports = function (options, done) { Hoek.assert(options !== undefined, 'options is required'); Hoek.assert(Fs.existsSync(options.directory), 'Output directory not ...
const Fs = require('fs'); const Path = require('path'); const Hoek = require('hoek'); const FindNodeVersion = require('./find-node-version'); module.exports = function (options, done) { Hoek.assert(options !== undefined, 'options is required'); Hoek.assert(Fs.existsSync(options.directory), 'Output directory not ...
Remove unneeded (and actually not even invokved) chmodSync after the file is written
Remove unneeded (and actually not even invokved) chmodSync after the file is written
JavaScript
mit
alwaysleaveanote/demeteorizer,onmodulus/demeteorizer
351167cf6940d5637229833d9f34fe9298ba1f27
main.js
main.js
var menubar = require('menubar'); var mb = menubar({ "index": 'https://usecamino.com', "preloadWindow": true, "width": 475, "height": 370, "icon": "icon.png", "show-dock-icon": true }); mb.on('ready', function ready () { console.log('app is running!'); });
var app = require("app"); var BrowserWindow = require("browser-window"); var Menu = require("menu"); var mainWindow = null; app.on("window-all-closed", function(){ app.quit(); }); app.on("ready", function () { mainWindow = new BrowserWindow({ width: 475, height: 370, "min-width": 475, "min...
Add keyboard shortcuts + browser UI
Add keyboard shortcuts + browser UI
JavaScript
mit
fjaguero/camino-app
eff6e04e2bf9bab1aee2e29666819277b6f9effc
lib/web/imageRouter/filesystem.js
lib/web/imageRouter/filesystem.js
'use strict' const URL = require('url').URL const path = require('path') const config = require('../../config') const logger = require('../../logger') exports.uploadImage = function (imagePath, callback) { if (!imagePath || typeof imagePath !== 'string') { callback(new Error('Image path is missing or wrong'), n...
'use strict' const URL = require('url').URL const path = require('path') const config = require('../../config') const logger = require('../../logger') exports.uploadImage = function (imagePath, callback) { if (!imagePath || typeof imagePath !== 'string') { callback(new Error('Image path is missing or wrong'), n...
Fix avoiding crash if URL is invalid
Fix avoiding crash if URL is invalid Signed-off-by: toshi0123 <661e25bb3f77d7010d4dcf7b0aff8b68fa2b1b9c@users.noreply.github.com>
JavaScript
unknown
hackmdio/hackmd,jackycute/HackMD,jackycute/HackMD,jackycute/HackMD,hackmdio/hackmd,hackmdio/hackmd
4cbcb1e34af1975bf78b51d6076a5c278a17649e
src/main/resources/static/app/components/ticket/ticket.controller.js
src/main/resources/static/app/components/ticket/ticket.controller.js
'use strict'; woodstock.controller('TicketListController', ['$scope', '$location', '$routeParams', 'TicketService', function ($scope, $location, $routeParams, TicketService) { TicketService.query({taskId: $routeParams.taskId}, function (data) { $scope.tickets = data; $scope.taskId =...
'use strict'; woodstock.controller('TicketListController', ['$scope', '$location', '$routeParams', 'TicketService', function ($scope, $location, $routeParams, TicketService) { TicketService.query({taskId: $routeParams.taskId}, function (data) { $scope.tickets = data; $scope.taskId =...
Add create(post) method in ticket component: - fuck yeah
Add create(post) method in ticket component: - fuck yeah
JavaScript
apache-2.0
solairerove/woodstock,solairerove/woodstock,solairerove/woodstock
4a6e32b372f5ce11a1d09548a8e41457f406033f
src/components/AccordionTab/AccordionTab.js
src/components/AccordionTab/AccordionTab.js
import React from "react"; import "./AccordionTab.css"; class AccordionTab extends React.Component { constructor(props) { super(props); this.state = {}; } render() { return ( <div className={this.state.open ? "tab-open" : "tab"}> <p className="title" onClick={() => ...
import React from "react"; import "./AccordionTab.css"; class AccordionTab extends React.Component { constructor(props) { super(props); this.state = {}; } render() { return ( <div className={this.state.open ? "tab-open" : "tab"} onClick={() => { this.setState({ open: ...
Put the onlick on the entire div, so that clicking on the chevron toggles the accordion
Put the onlick on the entire div, so that clicking on the chevron toggles the accordion
JavaScript
mit
participedia/frontend,participedia/frontend
5d2cc4fb9bb38127fd271ea72e007994ee740c16
test/example.js
test/example.js
var vows = require('vows'), assert = require('assert'), fs = require('fs'), path = require('path'); function testExample(dir) { return { 'Folder' : { topic: function() { fs.stat(dir, this.callback) }, "exists" : function(err, stat) { assert.isTrue(stat.isDirectory())...
var vows = require('vows'), assert = require('assert'), fs = require('fs'), path = require('path') exec = require('child_process').exec; function testExample(dir) { return { 'Folder Init' : { topic: function() { fs.stat(dir, this.callback) }, "exists" : function(err, sta...
Add build cli command to test
Add build cli command to test
JavaScript
mit
cpnporg/broccoli-steamer
04e3ca4fd7fa518826defbb1fe76c392d182d8ca
src/modules/listeners/client/reconnecting.js
src/modules/listeners/client/reconnecting.js
const { Listener } = require('discord-akairo'); const Logger = require('../../../util/Logger'); function exec() { Logger.info('Client reconnecting.'); } module.exports = new Listener('reconnecting', exec, { emitter: 'client', eventName: 'reconnecting', category: 'client' });
const { Listener } = require('discord-akairo'); const Logger = require('../../../util/Logger'); function exec() { Logger.info('Client reconnecting.'); if (this.client.config.exitOnDisconnect) process.exit(); } module.exports = new Listener('reconnecting', exec, { emitter: 'client', eventName: 'reconne...
Add disconnect on reconnect event
Add disconnect on reconnect event
JavaScript
mit
1Computer1/megumin-selfbot
fa5ef7a9d70c43ed47207b564136a7961c69a2b5
metrics/IdentifiersPerSelector.js
metrics/IdentifiersPerSelector.js
/*! Parker v0.0.0 - MIT license */ 'use strict'; var _ = require('underscore'); module.exports = { id: 'identifiers-per-selector', name: 'Identifiers Per Selector', type: 'selector', aggregate: 'mean', measure: function (selector) { var identifiers = selector.split(/[\s>\.]|:{1,2}|\[/g); ...
/*! Parker v0.0.0 - MIT license */ 'use strict'; var _ = require('underscore'); module.exports = { id: 'identifiers-per-selector', name: 'Identifiers Per Selector', type: 'selector', aggregate: 'mean', measure: function (selector) { var identifiers = getIdentifiers(selector); if ...
Fix for attribute selectors not being totalled correctly by Identifiers Per Selector metric
Fix for attribute selectors not being totalled correctly by Identifiers Per Selector metric
JavaScript
mit
researchgate/parker,katiefenn/parker,tpgmartin/parker,tzi/parker,caolan/parker,joshuacc/parker,seanislegend/parker
b2ca1b958f1e8b5056213896553dd8951c7ccbc8
eloquent_js/chapter04/ch04_ex01.js
eloquent_js/chapter04/ch04_ex01.js
function range(start, end, step = 1) { let arr = []; for (let n = start; Math.abs(n - start) <= Math.abs(end - start); n += step) { arr.push(n); } return arr; } function sum(arr) { let sum = 0; for (let n of arr) { sum += n; } return sum; }
function range(start, end, step = end > start ? 1 : -1) { let arr = []; for (let n = start; Math.abs(n - start) <= Math.abs(end - start); n += step) { arr.push(n); } return arr; } function sum(arr) { let sum = 0; for (let n of arr) { sum += n; } return sum; }
Set negative default step where useful
Set negative default step where useful
JavaScript
mit
bewuethr/ctci
34a476e0273ffcae759194ae684608e92273e4c5
SearchPage.js
SearchPage.js
'use strict'; import React from 'react'; import { StyleSheet, Text, TextInput, View, Image, TouchableHighlight, ActivityIndicatorIOS } from 'react-native'; const styles = StyleSheet.create({ description:{ marginBottom:20, fontSize:18, textAlign:'center', color:'#656565'}, container:{ pa...
'use strict'; import React from 'react'; import { StyleSheet, Text, TextInput, View, Image, TouchableHighlight, ActivityIndicatorIOS } from 'react-native'; const styles = StyleSheet.create({ description:{ marginBottom:20, fontSize:18, textAlign:'center', color:'#656565'}, container:{ pa...
Add search input and search button
Add search input and search button
JavaScript
mit
wxmaudio/ReactNativePropertyFinder,wxmaudio/ReactNativePropertyFinder,wxmaudio/ReactNativePropertyFinder
3dbd1357d8c78d33cad4a6629e1378dd8eaa9f8f
tools/copyif.js
tools/copyif.js
'use strict' const fs = require('fs') const path = require('path') const src = path.join(__dirname, '..', '.waiting.html') const dir = path.join(__dirname, '..', 'coverage') const dst = path.join(dir, 'index.html') fs.stat(dst, (er, st) => { if (er) { if (er.code !== 'ENOENT') { console.error(`Error on $...
'use strict' const fs = require('fs') const path = require('path') const src = path.join(__dirname, '..', '.waiting.html') const dir = path.join(__dirname, '..', 'coverage') const dst = path.join(dir, 'index.html') fs.stat(dst, (er, st) => { if (er) { if (er.code !== 'ENOENT') { console.error(`Error on $...
Fix error reporting in copy script
Fix error reporting in copy script
JavaScript
mit
hildjj/node-cbor,hildjj/node-cbor
20ff9bc244753ae2c90f4ebc867b26eebff5af56
mods/lowtierrandom/formats-data.js
mods/lowtierrandom/formats-data.js
exports.BattleFormatsData = { kangaskhanmega: { randomBattleMoves: ["fakeout","return","suckerpunch","earthquake","poweruppunch","crunch"], randomDoubleBattleMoves: ["fakeout","return","suckerpunch","earthquake","doubleedge","poweruppunch","crunch","protect"], tier: "Uber" }, altariamega: { randomBattleMoves...
exports.BattleFormatsData = { kangaskhanmega: { randomBattleMoves: ["fakeout","return","suckerpunch","earthquake","poweruppunch","crunch"], randomDoubleBattleMoves: ["fakeout","return","suckerpunch","earthquake","doubleedge","poweruppunch","crunch","protect"], tier: "Uber" } };
Undo the last commit (will update later)
Undo the last commit (will update later)
JavaScript
mit
MayukhKundu/Technogear,SkyeTheFemaleSylveon/Mudkip-Server,MayukhKundu/Pokemon-Domain,lFernanl/Mudkip-Server,yashagl/pokemon-showdown,TheManwithskills/Server,TheManwithskills/DS,MayukhKundu/Technogear,MayukhKundu/Flame-Savior,MayukhKundu/Pokemon-Domain,yashagl/pokemon,MayukhKundu/Flame-Savior,yashagl/pokemon,yashagl/pok...
2d47d3a2c16ca1a855953ac0e1c91bf8cace6c1a
test.js
test.js
var banner = require('./'); let chai = require('chai'); let expect = chai.expect; describe('banner', () => { const FILEPATH = 'test-target.js'; context('without options (using defaults)', () => { let expectation = `/*! * add-banner <https://github.com/jonschlinkert/add-banner> * * Copyright (c) 2018 Jon S...
var banner = require('./'); let chai = require('chai'); let expect = chai.expect; describe('banner', () => { let filepath = 'test-target.js'; context('without options (using defaults)', () => { let expectation = `/*! * add-banner <https://github.com/jonschlinkert/add-banner> * * Copyright (c) 2018 Jon Sch...
Add backwards compatibility for Node.js 0.10
Add backwards compatibility for Node.js 0.10
JavaScript
mit
jonschlinkert/add-banner
941cf71d2b52ca07e9315f68f9eb6d937b374678
ember-cli-build.js
ember-cli-build.js
/* eslint-env node */ 'use strict'; const EmberApp = require('ember-cli/lib/broccoli/ember-app'); module.exports = function(defaults) { let app = new EmberApp(defaults, { // Add options here }); // Use `app.import` to add additional libraries to the generated // output files. // // If you need to use...
/* eslint-env node */ 'use strict'; const EmberApp = require('ember-cli/lib/broccoli/ember-app'); module.exports = function(defaults) { let app = new EmberApp(defaults, { fingerprint: { exclude: [ 'images/layers-2x.png', 'images/layers.png', 'images/marker-icon-2x.png', 'im...
Include on necessary parts of plugins
Include on necessary parts of plugins
JavaScript
mit
NYCPlanning/labs-community-portal,NYCPlanning/labs-community-portal
c7ac96524e07fdd6d34d18d8f2ea19e2abb1537d
client-vendor/after-body/jquery.clickDecorators/decorators/30-spinner.js
client-vendor/after-body/jquery.clickDecorators/decorators/30-spinner.js
/* * Author: CM */ (function($) { $.clickDecorators.spinner = { after: function(event, returnValue) { if (returnValue && _.isFunction(returnValue.promise)) { var $inputTarget = $(event.currentTarget).closest('button'); var $spinner = $('<div class="spinner" />').appendTo($inputTarget); returnValue....
/* * Author: CM */ (function($) { $.clickDecorators.spinner = { after: function(event, returnValue) { if (returnValue && _.isFunction(returnValue.promise)) { var $inputTarget = $(event.currentTarget).closest('button'); $inputTarget.find('.spinner').remove(); var $spinner = $('<div class="spinner" /...
Remove previous spinner before adding spinner
Remove previous spinner before adding spinner
JavaScript
mit
vogdb/cm,fauvel/CM,tomaszdurka/CM,njam/CM,fauvel/CM,christopheschwyzer/CM,mariansollmann/CM,mariansollmann/CM,fvovan/CM,tomaszdurka/CM,zazabe/cm,fvovan/CM,cargomedia/CM,fvovan/CM,njam/CM,fauvel/CM,vogdb/cm,mariansollmann/CM,cargomedia/CM,vogdb/cm,vogdb/cm,alexispeter/CM,alexispeter/CM,cargomedia/CM,vogdb/cm,njam/CM,tom...
e8084b0dcd51f6c4b5022c760ab359b8178ecfe2
__tests__/test.js
__tests__/test.js
'use strict'; test( `Should do nothing if config is undefined`, () => runTest('empty-lines-preserve') );
'use strict'; test( `Should do nothing if config is undefined`, () => runTest('empty-lines-preserve') ); groupTest([ { description: 'Empty lines should be cleaned before any other empty-line-before option', options: { 'at-rule-nested-empty-line-before': true, 'clean-empty-lines': true, }, cases: [ ...
Test clean-empty-lines with other *-empty-line-before option
Test clean-empty-lines with other *-empty-line-before option
JavaScript
mit
hudochenkov/postcss-sorting,hudochenkov/postcss-sorting,hudochenkov/postcss-sorting
a8d8cd0e20c8891f63ebf8ba6c30ce244b971231
src/Elcodi/Admin/CoreBundle/Resources/public/js/modules/currency-table.js
src/Elcodi/Admin/CoreBundle/Resources/public/js/modules/currency-table.js
TinyCore.AMD.define('currency-table', ['devicePackage' ], function () { return { onStart: function () { setTimeout( function() { $('#currency-loading').fadeOut('fast', function() { $('#currency-table').fadeIn(); }); ...
TinyCore.AMD.define('currency-table', ['devicePackage' ], function () { return { onStart: function () { setTimeout( function() { $('#currency-loading').fadeOut('fast', function() { $('#currency-table').fadeIn(); }); ...
Fix save disable currency on admin
Fix save disable currency on admin
JavaScript
mit
atresmediahf/bamboo,deliberryeng/bamboo,mickaelandrieu/bamboo,mickaelandrieu/bamboo,sottosviluppo/bamboo,sottosviluppo/bamboo,corretgecom/bamboo,atresmediahf/bamboo,elcodi/bamboo,deliberryeng/bamboo,deliberryeng/bamboo,deliberryeng/bamboo,elcodi/bamboo,atresmediahf/bamboo,sottosviluppo/bamboo,corretgecom/bamboo,mickael...
d6c0d92827d6ab049487336fb388c04ee45ffdbe
webapp/src/main/webapp/themes/tenderfoot/js/propertyGroupControls-bootstrap.js
webapp/src/main/webapp/themes/tenderfoot/js/propertyGroupControls-bootstrap.js
$(document).ready(function(){ $("#viewAllTab").on("click",function(){ $('[data-toggle="tab"]').parent().removeClass("active"); $("#viewAllTab").parent().addClass("active"); $("#viewAllTab").addClass("active"); $(".tab-pane").addClass("fade active in"); }); if (location.hash)...
$(document).ready(function(){ $("#viewAllTab").on("click",function(){ showViewAll(); }); if (location.hash) { $('li[href=\'' + location.hash + '\']').tab('show'); if (location.hash == "#viewAll") { showViewAll(); } } var activeTab = localStorage.getItem(...
Improve view all handling in tenderfoot
Improve view all handling in tenderfoot
JavaScript
bsd-3-clause
vivo-project/VIVO,vivo-project/VIVO,vivo-project/VIVO,vivo-project/VIVO
f8d0fecfdbd5a753970f599c389fe4acf24611f4
test/tests/test-helper.js
test/tests/test-helper.js
var verifyLocalStorageContainsRecord = function(namespace, type, id, record, ignoreFields) { var expected = {}; expected[id] = record; var actual = JSON.parse(window.localStorage.getItem(namespace)); if (type) actual = actual[type]; if (ignoreFields) { for (var i = 0, l = ignoreFields.length, field; i <...
var verifyLocalStorageContainsRecord = function(namespace, type, id, record, ignoreFields) { var expected = {}; expected[id] = record; var actual = JSON.parse(window.localStorage.getItem(namespace)); if (type) actual = actual[type]; if (ignoreFields) { for (var i = 0, l = ignoreFields.length, field; i <...
Introduce `equalOps` test helper for comparing operations.
Introduce `equalOps` test helper for comparing operations. Provides comparisons of Operation instances based on their serialized form.
JavaScript
mit
orbitjs/orbit.js,rollokb/orbit.js,SmuliS/orbit.js,lytbulb/orbit.js,orbitjs/orbit.js,orbitjs/orbit-core,greyhwndz/orbit.js,SmuliS/orbit.js,greyhwndz/orbit.js,opsb/orbit.js,lytbulb/orbit.js,beni55/orbit.js,opsb/orbit.js,jpvanhal/orbit-core,rollokb/orbit.js,ProlificLab/orbit.js,jpvanhal/orbit.js,jpvanhal/orbit-core,Prolif...
cc3fb6802fc77fa7451dc495b57eb4d59b07081d
geocoder.js
geocoder.js
var apiKey = "<YOUR-KEY>"; var geocoder = require('node-geocoder') ("google", "https", { apiKey: apiKey }); var csv = require('csv'); process.stdin .pipe(csv.parse()) .pipe(csv.transform(function(data, callback){ setImmediate(function(){ geocoder.geocode(data[1]) .then(function(res) { data.push(res[0]...
var apiKey = "AIzaSyAj9GGrBLnNPImKnl7MKAuD737t1MHnMT8"; var geocoder = require('node-geocoder') ("google", "https", { apiKey: apiKey }); var csv = require('csv'); process.stdin .pipe(csv.parse()) .pipe(csv.transform(function(data, callback){ setImmediate(function(){ geocoder.geocode(data[1]) .then(functio...
Handle response with 0 results
Handle response with 0 results
JavaScript
mit
jpenninkhof/geocoder