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
92d8cf6dbaa7145f225366a874f1b69a6382b1c3
server/helpers/subscriptionManager.js
server/helpers/subscriptionManager.js
// import { RedisPubSub } from 'graphql-redis-subscriptions'; import { PubSub } from 'graphql-subscriptions'; const pubsub = new PubSub(); /* const pubsub = new RedisPubSub({ connection: { host: 'redis.ralexanderson.com', port: 6379, }, });*/ export { pubsub };
// import { RedisPubSub } from 'graphql-redis-subscriptions'; import { PubSub } from "graphql-subscriptions"; const pubsub = new PubSub(); /* const pubsub = new RedisPubSub({ connection: { host: 'redis.ralexanderson.com', port: 6379, }, });*/ pubsub.ee.setMaxListeners(150); export { pubsub };
Increase the max event listener count
Increase the max event listener count
JavaScript
apache-2.0
Thorium-Sim/thorium,Thorium-Sim/thorium,Thorium-Sim/thorium,Thorium-Sim/thorium
a20e046f7b866fe23a6cb6547653ab97107deac9
frontend/src/store.js
frontend/src/store.js
import { createStore, applyMiddleware, compose } from 'redux' import { browserHistory} from 'react-router' import { syncHistoryWithStore, routerMiddleware } from 'react-router-redux' import createReducer from './reducers' import createSagaMiddleware from 'redux-saga' import rootSaga from './sagas' export default function configureStore(initialState = {}) { const sagaMiddleware = createSagaMiddleware() const history = browserHistory const middlewares = [ sagaMiddleware, routerMiddleware(history) ] const enhancers = [ applyMiddleware(...middlewares) ] const composeEnhancers = process.env.NODE_ENV !== 'production' && typeof window === 'object' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : compose; const store = createStore( createReducer(), initialState, composeEnhancers(...enhancers) ) const syncedHistory = syncHistoryWithStore(history, store) sagaMiddleware.run(rootSaga, syncedHistory) return { store, history: syncedHistory } }
import { createStore, applyMiddleware, compose } from 'redux' import { browserHistory } from 'react-router' import { syncHistoryWithStore, routerMiddleware } from 'react-router-redux' import createReducer from './reducers' import createSagaMiddleware from 'redux-saga' import rootSaga from './sagas' export default function configureStore(initialState = {}) { const sagaMiddleware = createSagaMiddleware() const middlewares = [ sagaMiddleware, routerMiddleware(browserHistory) ] const enhancers = [ applyMiddleware(...middlewares) ] const composeEnhancers = process.env.NODE_ENV !== 'production' && typeof window === 'object' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : compose; const store = createStore( createReducer(), initialState, composeEnhancers(...enhancers) ) sagaMiddleware.run(rootSaga, browserHistory) return { store, history: syncHistoryWithStore(browserHistory, store) } }
Fix duplicated calls of sagas based on history
Fix duplicated calls of sagas based on history
JavaScript
mit
luxons/seven-wonders,luxons/seven-wonders,luxons/seven-wonders
bea0e08a0f75d9ce5cd5f661db0aca50e678534c
lib/tooltip/fix-button.js
lib/tooltip/fix-button.js
/* @flow */ import React from 'react' class FixButton extends React.Component { handleClick(): void { this.props.cb() } render() { return <button className="fix-btn" onClick={() => this.handleClick()}>Fix</button> } } module.exports = FixButton
/* @flow */ import React from 'react' class FixButton extends React.Component { props: { cb: () => void, }; handleClick(): void { this.props.cb() } render() { return <button className="fix-btn" onClick={() => this.handleClick()}>Fix</button> } } module.exports = FixButton
Add props declaration of FixButton
Add props declaration of FixButton To fix CI error
JavaScript
mit
steelbrain/linter-ui-default,steelbrain/linter-ui-default,AtomLinter/linter-ui-default
98df85a394c3d3b64f017cfcf8481dead53bd858
components/CopyButton.js
components/CopyButton.js
import React from 'react'; import ClipboardJS from 'clipboard'; import 'balloon-css/balloon.css'; import levelNames from "../constants/levelNames"; export default class CopyButton extends React.PureComponent { constructor(props) { super(props); this.copyBtnRef = React.createRef(); this.clipboardRef = React.createRef(); } static defaultProps = { content: '', }; componentDidMount() { this.clipboardRef.current = new ClipboardJS(this.copyBtnRef.current, { text: () => this.props.content, }); this.clipboardRef.current.on('success', () => { // this.setState({ isSuccessMsgShow: true }); const copyBtnRef = this.copyBtnRef.current; copyBtnRef.setAttribute('data-balloon', '複製成功!'); copyBtnRef.setAttribute('data-balloon-visible', ''); copyBtnRef.setAttribute('data-balloon-pos', 'up'); setTimeout(function() { copyBtnRef.removeAttribute('data-balloon'); copyBtnRef.removeAttribute('data-balloon-visible'); copyBtnRef.removeAttribute('data-balloon-pos'); }, 3000); }); } render() { return ( <button ref={this.copyBtnRef} key="copy" onClick={() => {}} className="btn-copy" > 複製到剪貼簿 <style jsx>{` .btn-copy { margin-left: 10px; } `}</style> </button> ); } }
import React from 'react'; import ClipboardJS from 'clipboard'; import 'balloon-css/balloon.css'; export default class CopyButton extends React.PureComponent { constructor(props) { super(props); this.copyBtnRef = React.createRef(); this.clipboardRef = React.createRef(); } static defaultProps = { content: '', }; state = { btnAttributes: {}, }; componentDidMount() { this.clipboardRef.current = new ClipboardJS(this.copyBtnRef.current, { text: () => this.props.content, }); this.clipboardRef.current.on('success', () => { const self = this; this.setState({ btnAttributes: { 'data-balloon': '複製成功!', 'data-balloon-visible': '', 'data-balloon-pos': 'up', }}); setTimeout(function() { self.setState({ btnAttributes: {} }); }, 1000); }); } render() { return ( <button ref={this.copyBtnRef} key="copy" onClick={() => {}} className="btn-copy" { ...this.state.btnAttributes } > 複製到剪貼簿 <style jsx>{` .btn-copy { margin-left: 10px; } `}</style> </button> ); } }
Use attribute object from state
Use attribute object from state
JavaScript
mit
cofacts/rumors-site,cofacts/rumors-site
5ce70bfc71c927a7abce4de2a1ac5840003ceebd
src/js/Helpers/VectorHelpers.js
src/js/Helpers/VectorHelpers.js
const massToRadius = mass => Math.log2(mass)/10; const translate = (object3D, velocity) => { object3D.translateX(velocity.x); object3D.translateY(velocity.y); object3D.translateZ(velocity.z); } const rand = (min, max) => min + Math.random()*(max - min); const vLog = (v, msg) => console.log(msg, JSON.stringify(v.toArray())); const filterClose = (dancers, position, radius) => ( dancers.filter(dancer => dancer.position.distanceTo(position) > radius) ); const vectorToString = vector => { return vector.toArray().map(component => +component.toString().slice(0,15)).join(' ') }; const objToArr = obj => { const result = []; for (var i = 0; i < obj.length; i++) { result.push(obj[i]); } return result; }; export { massToRadius, translate, rand, vLog, filterClose, vectorToString, objToArr, }
const massToRadius = mass => Math.log2(mass)/10; const translate = (object3D, velocity) => { object3D.translateX(velocity.x); object3D.translateY(velocity.y); object3D.translateZ(velocity.z); } const getR = (body1, body2) => body2.position.sub(body1.position); const rand = (min, max) => min + Math.random()*(max - min); const vLog = (v, msg) => console.log(msg, JSON.stringify(v.toArray())); const filterClose = (dancers, position, radius) => ( dancers.filter(dancer => dancer.position.distanceTo(position) > radius) ); const vectorToString = vector => { return vector.toArray().map(component => +component.toString().slice(0,15)).join(' ') }; const objToArr = obj => { const result = []; for (var i = 0; i < obj.length; i++) { result.push(obj[i]); } return result; }; export { massToRadius, getR, translate, rand, vLog, filterClose, vectorToString, objToArr, }
Add function to get displacement (vR) vector
Add function to get displacement (vR) vector
JavaScript
mit
elliotaplant/celestial-dance,elliotaplant/celestial-dance
f163eac1c635e9573cc2c11083312acd0cce9c21
src/land_registry_elements/email-repeat/EmailRepeat.js
src/land_registry_elements/email-repeat/EmailRepeat.js
/* global $ */ 'use strict' /** * Email repeat */ function EmailRepeat (element, config) { var options = {} $.extend(options, config) // Private variables var hintWrapper var hint /** * Set everything up */ function create () { // Bail out if we don't have the proper element to act upon if (!element) { return } hintWrapper = $('<div class="panel panel-border-narrow email-hint spacing-top-single"><p>Please ensure your email address is displayed correctly below. We will need this if you need to reset your password in future.</p><p class="bold email-hint-value"></p></div>') hint = $(hintWrapper).find('.email-hint-value') $(element).on('change', updateHint) $(element).on('input', updateHint) } /** * */ function updateHint () { $(element).after(hintWrapper) // If the input field gets emptied out again, remove the hint if (element.value.length === 0) { hintWrapper.remove() return } // Update the hint to match the input value hint.text(element.value) } /** * Tear everything down again */ function destroy () { hintWrapper.remove() $(element).off('change', updateHint) $(element).off('input', updateHint) } var self = { create: create, destroy: destroy } return self } export { EmailRepeat }
/* global $ */ 'use strict' /** * Email repeat */ function EmailRepeat (element, config) { var options = {} $.extend(options, config) // Private variables var hintWrapper var hint /** * Set everything up */ function create () { // Bail out if we don't have the proper element to act upon if (!element) { return } hintWrapper = $('<div class="panel panel-border-narrow email-hint spacing-top-single"><p>Please ensure your email address is displayed correctly below. We will need this if you need to reset your password in future.</p></div>') hint = $('<p class="bold email-hint-value"></p>') $(hintWrapper).append(hint) $(element).on('change', updateHint) $(element).on('input', updateHint) } /** * */ function updateHint () { $(element).after(hintWrapper) // If the input field gets emptied out again, remove the hint if (element.value.length === 0) { hintWrapper.remove() return } // Update the hint to match the input value hint.text(element.value) } /** * Tear everything down again */ function destroy () { hintWrapper.remove() $(element).off('change', updateHint) $(element).off('input', updateHint) } var self = { create: create, destroy: destroy } return self } export { EmailRepeat }
Fix IE8 bug with email repeat
Fix IE8 bug with email repeat
JavaScript
mit
LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements
67a3aee413c05e895ed200b6cb1912bcebd538dd
eloquent_js_exercises/chapter05/chapter05_ex04.js
eloquent_js_exercises/chapter05/chapter05_ex04.js
function every(array, test) { for (var i = 0; i < array.length; ++i) { if (!test(array[i])) return false; } return true; } function some(array, test) { for (var i = 0; i < array.length; ++i) { if (test(array[i])) return true; } return false; }
function dominantDirection(text) { let scripts = countBy(text, char => { let script = characterScript(char.codePointAt(0)); return script ? script.direction : "none"; }).filter(({name}) => name != "none"); return scripts.reduce((a, b) => a.count > b.count ? a : b).name; }
Add Chapter 05, exercise 4
Add Chapter 05, exercise 4
JavaScript
mit
bewuethr/ctci
4f6299f4e88e89c0cd0971f318eef6823ae0cfc2
src/js/utils/Announcer.js
src/js/utils/Announcer.js
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP import CSSClassnames from './CSSClassnames'; const CLASS_ROOT = CSSClassnames.APP; function clearAnnouncer() { const announcer = document.querySelector(`.${CLASS_ROOT}__announcer`); announcer.innerHTML = ''; }; export function announcePageLoaded (title) { announce(`${title} page was loaded`); } export function announce (message, mode = 'assertive') { const announcer = document.querySelector(`.${CLASS_ROOT}__announcer`); announcer.setAttribute('aria-live', 'off'); announcer.innerHTML = message; setTimeout(clearAnnouncer, 500); announcer.setAttribute('aria-live', mode); } export default { announce, announcePageLoaded };
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP import CSSClassnames from './CSSClassnames'; const CLASS_ROOT = CSSClassnames.APP; function clearAnnouncer() { const announcer = document.querySelector(`.${CLASS_ROOT}__announcer`); if(announcer) { announcer.innerHTML = ''; } }; export function announcePageLoaded (title) { announce(`${title} page was loaded`); } export function announce (message, mode = 'assertive') { const announcer = document.querySelector(`.${CLASS_ROOT}__announcer`); if(announcer) { announcer.setAttribute('aria-live', 'off'); announcer.innerHTML = message; setTimeout(clearAnnouncer, 500); announcer.setAttribute('aria-live', mode); } } export default { announce, announcePageLoaded };
Fix exceptions when using Toast without having App
Fix exceptions when using Toast without having App See issue #995
JavaScript
apache-2.0
nickjvm/grommet,nickjvm/grommet,HewlettPackard/grommet,linde12/grommet,HewlettPackard/grommet,kylebyerly-hp/grommet,HewlettPackard/grommet,grommet/grommet,grommet/grommet,grommet/grommet
2afc346f0fa3492cdbadff72dd47abec9b53fe76
source/assets/js/components/sass-syntax-switcher.js
source/assets/js/components/sass-syntax-switcher.js
$(function() { $( "#topic-2" ).tabs(); $( "#topic-3" ).tabs(); $( "#topic-5" ).tabs(); $( "#topic-6" ).tabs(); $( "#topic-7" ).tabs(); $( "#topic-8" ).tabs(); // Hover states on the static widgets $( "#dialog-link, #icons li" ).hover( function() { $( this ).addClass( "ui-state-hover" ); }, function() { $( this ).removeClass( "ui-state-hover" ); } ); });
$(function() { $( "#topic-2" ).tabs(); $( "#topic-3" ).tabs(); $( "#topic-5" ).tabs(); $( "#topic-6" ).tabs(); $( "#topic-7" ).tabs(); $( "#topic-8" ).tabs(); // Hover states on the static widgets $( "#dialog-link, #icons li" ).hover( function() { $( this ).addClass( "ui-state-hover" ); }, function() { $( this ).removeClass( "ui-state-hover" ); } ); // Switch ALL the tabs (Sass/SCSS) together var noRecursion = false, jqA = $( "a.ui-tabs-anchor" ), jqASass = jqA.filter( ":contains('Sass')" ).click(function() { if ( !noRecursion ) { noRecursion = true; jqASass.not( this ).click(); noRecursion = false; } }), jqASCSS = jqA.filter( ":contains('SCSS')" ).click(function() { if ( !noRecursion ) { noRecursion = true; jqASCSS.not( this ).click(); noRecursion = false; } }) ; });
Switch all the Sass/SCSS tabs together
Switch all the Sass/SCSS tabs together
JavaScript
mit
lostapathy/sass-site,Mr21/sass-site,mikaspell/sass-site-rus,lostapathy/sass-site,sass/sass-site,mikaspell/sass-site-rus,Mr21/sass-site,mikaspell/sass-site-rus,arhoads/sass-site,una/sass-site,lostapathy/sass-site,sass/sass-site,una/sass-site,arhoads/sass-site,Mr21/sass-site,sass/sass-site,una/sass-site,arhoads/sass-site
8e5dfec02570e58741c6a92b694d854efbcc23f2
lib/controllers/api/v1/users.js
lib/controllers/api/v1/users.js
'use strict'; var mongoose = require('mongoose'), utils = require('../utils'), User = mongoose.model('User'), Application = mongoose.model('Application'), SimpleApiKey = mongoose.model('SimpleApiKey'), OauthConsumer = mongoose.model('OauthConsumer'), Event = mongoose.model('Event'), User = mongoose.model('User'), Chapter = mongoose.model('Chapter'), middleware = require('../../../middleware'), devsite = require('../../../clients/devsite'); module.exports = function(app, cacher) { app.route("get", "/organizer/:gplusId", { summary: "Returns if the specified Google+ user is an Organizer of one or more Chapters" }, cacher.cache('hours', 24), function(req, res) { Chapter.find({organizers: req.params.gplusId}, function(err, chapters) { if (err) { console.log(err); return res.send(500, "Internal Error"); } var response = { msg: "ok", user: req.params.gplusId, chapters: [] }; for(var i = 0; i < chapters.length; i++) { response.chapters.push({ id: chapters[i]._id, name: chapters[i].name }); } return res.send(200, response); } ); }); }
'use strict'; var mongoose = require('mongoose'), utils = require('../utils'), User = mongoose.model('User'), Application = mongoose.model('Application'), SimpleApiKey = mongoose.model('SimpleApiKey'), OauthConsumer = mongoose.model('OauthConsumer'), Event = mongoose.model('Event'), User = mongoose.model('User'), Chapter = mongoose.model('Chapter'), middleware = require('../../../middleware'), devsite = require('../../../clients/devsite'); module.exports = function(app, cacher) { app.route("get", "/organizer/:gplusId", { summary: "Returns if the specified Google+ user is an Organizer of one or more Chapters" }, cacher.cache('hours', 24), function(req, res) { Chapter.find({organizers: req.params.gplusId}, function(err, chapters) { if (err) { console.log(err); return res.send(500, "Internal Error"); } var response = { user: req.params.gplusId, chapters: [] }; for(var i = 0; i < chapters.length; i++) { response.chapters.push({ id: chapters[i]._id, name: chapters[i].name }); } return res.jsonp(response); } ); }); }
Fix missin JSONP support on /organizer/:gplusId
Fix missin JSONP support on /organizer/:gplusId
JavaScript
apache-2.0
Splaktar/hub,fchuks/hub,gdg-x/hub,Splaktar/hub,nassor/hub,gdg-x/hub,nassor/hub,fchuks/hub
385fa00d3219f84eec099ebf2551e8941f5e7262
sashimi-webapp/src/database/stringManipulation.js
sashimi-webapp/src/database/stringManipulation.js
export default function stringManipulation() { this.stringConcat = function stringConcat(...stringToConcat) { return stringToConcat.join(''); }; this.stringDateTime00Format = function stringDateTime00Format(dateTimeNumber) { if (typeof dateTimeNumber == 'number') { if (dateTimeNumber < 10) { return this.stringConcat('0', dateTimeNumber); } } return dateTimeNumber; }; this.resolveSQLInjections = function resolveSQLInjections(stringToReplace) { return stringToReplace.replace(/["'\\]/g, (char) => { switch (char) { case '"': case '\\': return `\\${char}`; // prepends a backslash to backslash, percent, // and double/single quotes default: return char; } }); }; this.revertSQLInjections = function revertSQLInjections(stringToReplace) { return stringToReplace.replace(/[\\\\"\\\\\\\\]/g, (char) => { switch (char) { case '\\\\"': return '"'; case '\\\\\\\\': return '\\'; // prepends a backslash to backslash, percent, // and double/single quotes default: return char; } }); }; this.getPreviousPath = function getPreviousPath(fullPath, lastFolderName) { const lengthOfExtraCurrentFolder = lastFolderName.length + 1; // extra slash return fullPath.substring(0, fullPath.length - lengthOfExtraCurrentFolder); }; }
export default function stringManipulation() { this.stringConcat = function stringConcat(...stringToConcat) { return stringToConcat.join(''); }; this.stringDateTime00Format = function stringDateTime00Format(dateTimeNumber) { if (typeof dateTimeNumber == 'number') { if (dateTimeNumber < 10) { return this.stringConcat('0', dateTimeNumber); } } return dateTimeNumber; }; this.replaceAll = function replaceAll(string, stringToReplace, replacement) { return string.replace(new RegExp(stringToReplace, 'g'), replacement); }; this.resolveSQLInjections = function resolveSQLInjections(stringToReplace) { return stringToReplace.replace(/["\\]/g, (char) => { switch (char) { case '"': case '\\': return `\\${char}`; // prepends a backslash to backslash, percent, // and double/single quotes default: return char; } }); }; this.revertSQLInjections = function revertSQLInjections(stringToReplace) { stringToReplace = this.replaceAll(stringToReplace, '\\\\"', '"'); stringToReplace = this.replaceAll(stringToReplace, '\\\\\\\\', '\\'); return stringToReplace; }; this.getPreviousPath = function getPreviousPath(fullPath, lastFolderName) { const lengthOfExtraCurrentFolder = lastFolderName.length + 1; // extra slash return fullPath.substring(0, fullPath.length - lengthOfExtraCurrentFolder); }; }
Fix unable to revert resolving of SQLinjection
Fix unable to revert resolving of SQLinjection [1] Revert back code for replaceAll [2] Revert 2 resolve strings one by one
JavaScript
mit
nus-mtp/sashimi-note,nus-mtp/sashimi-note,nus-mtp/sashimi-note
e8797027f38494db861d946f74e07e3a2b805a8a
src/md_document_block.js
src/md_document_block.js
"use strict"; var getItemURL = require('./get_item_url') , regex = /^document (\d+)$/ module.exports = function (md, opts) { opts = opts || {}; md.use(require('markdown-it-container'), 'document', { validate: function (params) { return params.trim().match(regex) }, render: function (tokens, idx) { var match = tokens[idx].info.trim().match(regex) if (tokens[idx].nesting === 1) { let documentURL = getItemURL(opts.projectBaseURL, 'document', match[1]) , documentText = opts.makeCitationText(documentURL) tokens[idx].meta = { enItemType: 'document', enItemID: match[1] } return '<div class="doc-block"><div class="doc">' + documentText + '</div>'; } else { return '</div>'; } } }); }
"use strict"; var getItemURL = require('./get_item_url') , regex = /^document (\d+)$/ function createRule(md, projectBaseURL, makeCitationText) { return function enDocumentBlockMetaRule(state) { var blockTokens = state.tokens blockTokens.forEach(function (token) { if (token.type === 'container_document_open') { let match = token.info.trim().match(regex) , documentURL = getItemURL(projectBaseURL, 'document', match[1]) , documentText = makeCitationText(documentURL) token.meta = { enCitationText: documentText, enItemType: 'document', enItemID: match[1] } } }) } } module.exports = function (md, opts) { opts = opts || {}; md.use(require('markdown-it-container'), 'document', { validate: function (params) { return params.trim().match(regex) }, render: function (tokens, idx) { if (tokens[idx].nesting === 1) { return '<div class="doc-block"><div class="doc">' + tokens[idx].meta.enCitationText + '</div>'; } else { return '</div>'; } } }); md.core.ruler.push( 'en_document_block_meta', createRule(md, opts.projectBaseURL, opts.makeCitationText) ) }
Store document meta properties in document block extension
Store document meta properties in document block extension
JavaScript
agpl-3.0
editorsnotes/editorsnotes-markup-parser
22aadec7318bbf4c79bb14d2615cef9480c7469f
library/CM/FormField/Integer.js
library/CM/FormField/Integer.js
/** * @class CM_FormField_Integer * @extends CM_FormField_Abstract */ var CM_FormField_Integer = CM_FormField_Abstract.extend({ _class: 'CM_FormField_Integer', ready: function() { var field = this; var $slider = this.$(".slider"); var $input = this.$("input"); $slider.slider({ value: $input.val(), min: field.getOption("min"), max: field.getOption("max"), step: field.getOption("step"), slide: function(event, ui) { var value = ui.value + 0; $input.val(value); $(this).children(".ui-slider-handle").text(value); }, change: function(event, ui) { var value = ui.value + 0; $input.val(value); $(this).children(".ui-slider-handle").text(value); } }); $slider.children(".ui-slider-handle").text($input.val()); $input.watch("disabled", function (propName, oldVal, newVal) { $slider.slider("option", "disabled", newVal); $slider.toggleClass("disabled", newVal); }); $input.changetext(function() { $slider.slider("option", "value", $(this).val()); field.trigger('change'); }); } });
/** * @class CM_FormField_Integer * @extends CM_FormField_Abstract */ var CM_FormField_Integer = CM_FormField_Abstract.extend({ _class: 'CM_FormField_Integer', ready: function() { var field = this; var $slider = this.$(".slider"); var $input = this.$("input"); $slider.slider({ value: $input.val(), min: field.getOption("min"), max: field.getOption("max"), step: field.getOption("step"), slide: function(event, ui) { var value = ui.value + 0; $input.val(value); $(this).children(".ui-slider-handle").text(value); }, change: function(event, ui) { var value = ui.value + 0; $input.val(value); $(this).children(".ui-slider-handle").text(value); } }); $slider.children(".ui-slider-handle").text($input.val()); $input.watch("disabled", function (propName, oldVal, newVal) { $slider.slider("option", "disabled", newVal); }); $input.changetext(function() { $slider.slider("option", "value", $(this).val()); field.trigger('change'); }); } });
Remove unneeded disabled class for slider
Remove unneeded disabled class for slider
JavaScript
mit
njam/CM,fauvel/CM,cargomedia/CM,tomaszdurka/CM,alexispeter/CM,tomaszdurka/CM,fvovan/CM,alexispeter/CM,fauvel/CM,vogdb/cm,alexispeter/CM,fvovan/CM,zazabe/cm,zazabe/cm,vogdb/cm,njam/CM,alexispeter/CM,mariansollmann/CM,vogdb/cm,cargomedia/CM,vogdb/cm,tomaszdurka/CM,zazabe/cm,cargomedia/CM,mariansollmann/CM,vogdb/cm,fauvel/CM,njam/CM,fvovan/CM,christopheschwyzer/CM,christopheschwyzer/CM,mariansollmann/CM,fvovan/CM,christopheschwyzer/CM,tomaszdurka/CM,christopheschwyzer/CM,tomaszdurka/CM,fauvel/CM,njam/CM,fauvel/CM,njam/CM,zazabe/cm,mariansollmann/CM,cargomedia/CM
fa62c68db63dd7e8ca0543947191d2586aed76e4
app/components/Footer/__tests__/Footer-test.js
app/components/Footer/__tests__/Footer-test.js
'use strict'; jest.unmock('./../Footer'); import React from 'react'; import ReactDOM from 'react-dom'; import TestUtils from 'react-addons-test-utils'; import Footer from './../Footer'; describe('Footer', () => { it('verify the text content and link are correctly', () => { const footer = TestUtils.renderIntoDocument( <Footer /> ); const footerNode = ReactDOM.findDOMNode(footer); expect(footerNode.textContent).toEqual('Made with by @afonsopacifer'); }); });
'use strict'; jest.unmock('./../Footer'); import React from 'react'; import ReactDOM from 'react-dom'; import TestUtils from 'react-addons-test-utils'; import Footer from './../Footer'; describe('Footer', () => { it('verify the text content are correctly', () => { const footer = TestUtils.renderIntoDocument( <Footer /> ); const footerNode = ReactDOM.findDOMNode(footer); expect(footerNode.textContent).toEqual('Made with by @afonsopacifer'); }); it('link of github author should be https://github.com/afonsopacifer', () => { const footer = TestUtils.renderIntoDocument( <Footer /> ); const linkElement = TestUtils.scryRenderedDOMComponentsWithTag(footer, 'a'); expect(linkElement.length).toEqual(1); expect(linkElement[0].getAttribute('href')).toEqual('https://github.com/afonsopacifer'); }); });
Make more tests at Footer component
Make more tests at Footer component
JavaScript
mit
afonsopacifer/react-pomodoro,afonsopacifer/react-pomodoro
bb910f984edd8080e5fe1d1b34a7dfec7ac9d785
lib/api/encodeSummary.js
lib/api/encodeSummary.js
var encodeSummaryArticle = require('../json/encodeSummaryArticle'); /** Encode summary to provide an API to plugin @param {Output} output @param {Config} config @return {Object} */ function encodeSummary(output, summary) { var result = { /** Iterate over the summary @param {Function} iter */ walk: function (iter) { summary.getArticle(function(article) { var jsonArticle = encodeSummaryArticle(article, false); return iter(jsonArticle); }); }, /** Get an article by its level @param {String} level @return {Object} */ getArticleByLevel: function(level) { var article = summary.getByLevel(level); return (article? encodeSummaryArticle(article) : undefined); }, /** Get an article by its path @param {String} level @return {Object} */ getArticleByPath: function(level) { var article = summary.getByPath(level); return (article? encodeSummaryArticle(article) : undefined); } }; return result; } module.exports = encodeSummary;
var encodeSummaryArticle = require('../json/encodeSummaryArticle'); /** Encode summary to provide an API to plugin @param {Output} output @param {Config} config @return {Object} */ function encodeSummary(output, summary) { var result = { /** Iterate over the summary, it stops when the "iter" returns false @param {Function} iter */ walk: function (iter) { summary.getArticle(function(article) { var jsonArticle = encodeSummaryArticle(article, false); return iter(jsonArticle); }); }, /** Get an article by its level @param {String} level @return {Object} */ getArticleByLevel: function(level) { var article = summary.getByLevel(level); return (article? encodeSummaryArticle(article) : undefined); }, /** Get an article by its path @param {String} level @return {Object} */ getArticleByPath: function(level) { var article = summary.getByPath(level); return (article? encodeSummaryArticle(article) : undefined); } }; return result; } module.exports = encodeSummary;
Improve comment for API summary.walk
Improve comment for API summary.walk
JavaScript
apache-2.0
gencer/gitbook,ryanswanson/gitbook,tshoper/gitbook,tshoper/gitbook,strawluffy/gitbook,GitbookIO/gitbook,gencer/gitbook
3d0c696f418fa672231c32737d706a62e5c5d9af
src/react/inputs/input.js
src/react/inputs/input.js
import React from 'react'; import {Icon} from '../iconography'; import classnames from 'classnames'; import PropTypes from 'prop-types'; export class Input extends React.Component { static propTypes = { size: PropTypes.string, icon: PropTypes.string }; componentDidMount() { require('../../css/inputs'); } render() { const {size, icon, ...props} = this.props; const input = (<input {...{ ...props, className: classnames(props.className, { 'input-sm': ['sm', 'small'].indexOf(size) !== -1, 'input-lg': ['lg', 'large'].indexOf(size) !== -1 }) }} />); if (!icon) return input; return ( <div className="input-icon-container"> {input} <Icon {...{src: icon}}/> </div> ); } }
import React from 'react'; import {Icon} from '../iconography'; import classnames from 'classnames'; import PropTypes from 'prop-types'; export class Input extends React.Component { static propTypes = { size: PropTypes.string, icon: PropTypes.string, innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]) }; componentDidMount() { require('../../css/inputs'); } render() { const {size, icon, innerRef, ...props} = this.props; const input = (<input {...{ ...props, ref: innerRef, className: classnames(props.className, { 'input-sm': ['sm', 'small'].indexOf(size) !== -1, 'input-lg': ['lg', 'large'].indexOf(size) !== -1 }) }} />); if (!icon) return input; return ( <div className="input-icon-container"> {input} <Icon {...{src: icon}}/> </div> ); } }
Add innerRef prop to Input component
Add innerRef prop to Input component
JavaScript
mit
pivotal-cf/pivotal-ui,pivotal-cf/pivotal-ui,pivotal-cf/pivotal-ui
ed9a606f20b97646d23bd23f693f2fe630394422
src/scripts/data_table.js
src/scripts/data_table.js
/*eslint-env node */ var m = require("mithril"); var tabs = require("./polythene_tabs"); tabs.onClick(function(newIndex, oldIndex) { var h = require("./headers")[newIndex]; grid.setRef(require("./firebase_ref").child(h.field), h.columns); }); var t = document.createElement("div"); m.mount(t, tabs.view); var grid = require("./w2ui_grid"); grid.view.style.height = "calc(100% - 48px)"; var wrapper = document.createElement("div"); wrapper.appendChild(t); wrapper.appendChild(grid.view); module.exports = wrapper;
/*eslint-env node */ var m = require("mithril"); var grid = require("./w2ui_grid"); grid.view.style.height = "calc(100% - 48px)"; var tabs = require("./polythene_tabs"); tabs.onClick(function(newIndex, oldIndex) { var h = require("./headers")[newIndex]; grid.setRef(require("./firebase_ref").child(h.field), h.columns); }); var t = document.createElement("div"); m.mount(t, tabs.view); var wrapper = document.createElement("div"); wrapper.appendChild(t); wrapper.appendChild(grid.view); module.exports = wrapper;
Define "grid" variable before it's used.
Define "grid" variable before it's used.
JavaScript
mit
1stop-st/frame
64d42211a279c8cfd56f4fad8c255b4e28c53721
src/ui/app.js
src/ui/app.js
angular.module('proxtop', ['ngMaterial', 'ui.router', 'angular-progress-arc', 'pascalprecht.translate']) .config(['$stateProvider', '$urlRouterProvider', '$translateProvider', function($stateProvider, $urlRouterProvider, $translateProvider) { $urlRouterProvider.otherwise('/'); $translateProvider.useStaticFilesLoader({ prefix: 'ui/locale/locale-', suffix: '.json' }); $translateProvider.preferredLanguage('de'); $translateProvider.useSanitizeValueStrategy('sanitizeParameters'); }]);
angular.module('proxtop', ['ngMaterial', 'ui.router', 'angular-progress-arc', 'pascalprecht.translate']) .config(['$stateProvider', '$urlRouterProvider', '$translateProvider', function($stateProvider, $urlRouterProvider, $translateProvider) { $urlRouterProvider.otherwise('/'); $translateProvider.useStaticFilesLoader({ prefix: 'ui/locale/locale-', suffix: '.json' }); $translateProvider.preferredLanguage('de'); $translateProvider.useSanitizeValueStrategy('escape'); }]);
Use sanitization method that doesn't require more dependencies.
Use sanitization method that doesn't require more dependencies.
JavaScript
mit
kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop
411c9404e0dedc5cd79a5b09d3afb6bfb7d69e0a
confirm.js
confirm.js
/** * Show confirm popup, when user close tab with non-synchronized actions. * * @param {Syncable|Client} client Observed Client instance * or object with `sync` property. * @param {String} [warning] The text of the warning. * * @return {Function} Unbind confirm listener. * * @example * import confirm from 'logux-status/confirm' * confirm(client, 'Post does not saved to server. Are you sure to leave?') */ function confirm (client, warning) { var sync = client.sync warning = warning || 'Some data was not saved to server. ' + 'Are you sure to leave?' function listen (e) { if (typeof e === 'undefined') e = window.event if (e) e.returnValue = warning return warning } return sync.on('state', function () { if (sync.state === 'wait' || sync.state === 'sending') { window.addEventListener('beforeunload', listen, false) } else { window.removeEventListener('beforeunload', listen, false) } }) } module.exports = confirm
/** * Show confirm popup, when user close tab with non-synchronized actions. * * @param {Syncable|Client} client Observed Client instance * or object with `sync` property. * @param {String} [warning] The text of the warning. * * @return {Function} Unbind confirm listener. * * @example * import confirm from 'logux-status/confirm' * confirm(client, 'Post does not saved to server. Are you sure to leave?') */ function confirm (client, warning) { var sync = client.sync warning = warning || 'Some data was not saved to server. ' + 'Are you sure to leave?' function listen (e) { if (typeof e === 'undefined') e = window.event if (e) e.returnValue = warning return warning } return sync.on('state', function () { if (sync.state === 'wait' || sync.state === 'sending') { window.addEventListener('beforeunload', listen) } else { window.removeEventListener('beforeunload', listen) } }) } module.exports = confirm
Remove default value for addEventListener
Remove default value for addEventListener
JavaScript
mit
logux/logux-client,logux/logux-client
0ec9d4ed2037fb68143bb9d816cf679ee099b2bd
tutorials/build-website.js
tutorials/build-website.js
var path = require('path'); var fs = require('fs-extra'); var pug = require('pug'); var buildUtils = require('../examples/build-utils'); // generate the tutorials fs.ensureDirSync('website/source/tutorials'); var tutorials = buildUtils.getList('tutorials', 'tutorial', path.resolve('website', 'source')); tutorials.map(function (json) { var pugTemplate = fs.readFileSync(path.relative('.', path.resolve(json.dir, 'index.pug')), 'utf8'); pugTemplate = pugTemplate.replace('extends ../common/index.pug', 'extends ../common/index-website.pug'); var fn = pug.compile(pugTemplate, { pretty: false, filename: path.relative('.', path.resolve(json.dir, 'index.pug')) }); var html = fn(json); html = `--- layout: tutorial title: ${json.title} about: ${json.about.text} tutorialCss: ${JSON.stringify(json.tutorialCss)} tutorialJs: ${JSON.stringify(json.tutorialJs)} --- ` + html; fs.writeFileSync(path.resolve(json.output, 'index.html'), html); }); // copy common files fs.copySync('tutorials/common', 'website/source/tutorials/common'); buildUtils.writeYamlList(path.resolve('website', 'source', '_data'), 'tutorials.yml', tutorials);
var path = require('path'); var fs = require('fs-extra'); var pug = require('pug'); var buildUtils = require('../examples/build-utils'); // generate the tutorials fs.ensureDirSync('website/source/tutorials'); var tutorials = buildUtils.getList('tutorials', 'tutorial', path.resolve('website', 'source')); tutorials.map(function (json) { var pugTemplate = fs.readFileSync(path.relative('.', path.resolve(json.dir, 'index.pug')), 'utf8'); pugTemplate = pugTemplate.replace('extends ../common/index.pug', 'extends ../common/index-website.pug'); var fn = pug.compile(pugTemplate, { pretty: false, filename: path.relative('.', path.resolve(json.dir, 'index.pug')) }); var html = fn(json); html = html.replace(/<=/g, '&lt;=').replace(/>=/g, '&gt;='); html = `--- layout: tutorial title: ${json.title} about: ${json.about.text} tutorialCss: ${JSON.stringify(json.tutorialCss)} tutorialJs: ${JSON.stringify(json.tutorialJs)} --- ` + html; fs.writeFileSync(path.resolve(json.output, 'index.html'), html); }); // copy common files fs.copySync('tutorials/common', 'website/source/tutorials/common'); buildUtils.writeYamlList(path.resolve('website', 'source', '_data'), 'tutorials.yml', tutorials);
Fix the website tutorial build to escape <=.
Fix the website tutorial build to escape <=.
JavaScript
apache-2.0
Kitware/geojs,OpenGeoscience/geojs,OpenGeoscience/geojs,Kitware/geojs,Kitware/geojs,OpenGeoscience/geojs
54181a9a43eddee7a19e8fd7ffb29a37ee8fd4d9
src/popup/js/config/svgIcons.js
src/popup/js/config/svgIcons.js
angular.module('Shazam2Spotify') .config(function() { // Load SVG icons (dirty, should not use jQuery...) $.ajax({ url: 'img/icons.svg', method: 'GET', dataType: 'html', success: function(data) { $("body").prepend(data); } }); });
angular.module('Shazam2Spotify') .run(function($http) { // Load SVG icons (dirty, should not use jQuery...) $http.get('img/icons.svg', {responseType: 'html'}). success(function(data) { angular.element('body').prepend(data); }); });
Load SVG icons with $http instead of jQuery
Load SVG icons with $http instead of jQuery
JavaScript
mit
leeroybrun/chrome-shazify,leeroybrun/chrome-shazify
69e7c35ed30ebeda6a5d701dad3abc10542d4088
app/assets/javascripts/behaviors/toggle_disable_list_command.js
app/assets/javascripts/behaviors/toggle_disable_list_command.js
$(function() { $(document).on("change", "[data-behavior~=toggle-disable-list-command]", function(e) { var commandButtonsSelector = $(e.target).data("commands"); var commandButtons = $(e.target).closest(commandButtonsSelector); console.log(commandButtons.length); }); });
$(function() { $(document).on("change", "[data-behavior~=toggle-disable-list-command]", function(e) { var commandButtonsSelector = $(e.target).data("commands"); var commandButtons = $(document).find(commandButtonsSelector); var list = $(document).find("[name='" + $(e.target).attr("name") + "']:checked"); if (list.length > 0) { commandButtons.removeClass("disabled").attr("disabled", false); } else { commandButtons.addClass("disabled").attr("disabled", true); } }); });
Implement toggle behavior from checkbox change
Implement toggle behavior from checkbox change
JavaScript
agpl-3.0
UM-USElab/gradecraft-development,UM-USElab/gradecraft-development,mkoon/gradecraft-development,UM-USElab/gradecraft-development,mkoon/gradecraft-development,UM-USElab/gradecraft-development,mkoon/gradecraft-development
3c34ff5ce1b1dc7d609a458b7483762a88c87179
build/serve.js
build/serve.js
var path = require('path'); var url = require('url'); var closure = require('closure-util'); var nomnom = require('nomnom'); var log = closure.log; var options = nomnom.options({ port: { abbr: 'p', 'default': 3000, help: 'Port for incoming connections', metavar: 'PORT' }, loglevel: { abbr: 'l', choices: ['silly', 'verbose', 'info', 'warn', 'error'], 'default': 'info', help: 'Log level', metavar: 'LEVEL' } }).parse(); /** @type {string} */ log.level = options.loglevel; log.info('ol3-cesium', 'Parsing dependencies ...'); var manager = new closure.Manager({ closure: true, // use the bundled Closure Library lib: [ 'src/**/*.js' ] }); manager.on('error', function(e) { log.error('ol3-cesium', e.message); }); manager.on('ready', function() { var server = new closure.Server({ manager: manager, loader: '/@loader' }); server.listen(options.port, function() { log.info('ol3-cesium', 'Listening on http://localhost:' + options.port + '/ (Ctrl+C to stop)'); }); server.on('error', function(err) { log.error('ol3-cesium', 'Server failed to start: ' + err.message); process.exit(1); }); });
var path = require('path'); var url = require('url'); var closure = require('closure-util'); var nomnom = require('nomnom'); var log = closure.log; var options = nomnom.options({ port: { abbr: 'p', 'default': 3000, help: 'Port for incoming connections', metavar: 'PORT' }, loglevel: { abbr: 'l', choices: ['silly', 'verbose', 'info', 'warn', 'error'], 'default': 'info', help: 'Log level', metavar: 'LEVEL' } }).parse(); /** @type {string} */ log.level = options.loglevel; log.info('ol3-cesium', 'Parsing dependencies ...'); var manager = new closure.Manager({ closure: true, // use the bundled Closure Library lib: [ 'src/**/*.js' ], ignoreRequires: '^ol\\.' }); manager.on('error', function(e) { log.error('ol3-cesium', e.message); }); manager.on('ready', function() { var server = new closure.Server({ manager: manager, loader: '/@loader' }); server.listen(options.port, function() { log.info('ol3-cesium', 'Listening on http://localhost:' + options.port + '/ (Ctrl+C to stop)'); }); server.on('error', function(err) { log.error('ol3-cesium', 'Server failed to start: ' + err.message); process.exit(1); }); });
Use closure-util's ignoreRequires for the examples
Use closure-util's ignoreRequires for the examples
JavaScript
bsd-2-clause
openlayers/ol3-cesium,gejgalis/ol3-cesium,phuree/ol-cesium,fredj/ol3-cesium,openlayers/ol-cesium,fredj/ol3-cesium,phuree/ol-cesium,ahocevar/ol3-cesium,gberaudo/ol3-cesium,oterral/ol3-cesium,thhomas/ol3-cesium,gberaudo/ol3-cesium,bartvde/ol3-cesium,camptocamp/ol3-cesium,openlayers/ol-cesium,thhomas/ol3-cesium,fredj/ol3-cesium,thhomas/ol3-cesium,epointal/ol3-cesium,camptocamp/ol3-cesium,GistdaDev/ol3-cesium,epointal/ol3-cesium,klokantech/ol3-cesium,gejgalis/ol3-cesium,GistdaDev/ol3-cesium,openlayers/ol3-cesium,bartvde/ol3-cesium,gejgalis/ol3-cesium,oterral/ol3-cesium
1077451e514b05a4bf12d8032f55e403fa96c877
js/src/index.js
js/src/index.js
// Load css require('leaflet/dist/leaflet.css'); require('leaflet-draw/dist/leaflet.draw.css'); require('leaflet.markercluster/dist/MarkerCluster.css'); require('leaflet.markercluster/dist/MarkerCluster.Default.css'); require('leaflet-measure/dist/leaflet-measure.css'); require('leaflet-fullscreen/dist/leaflet.fullscreen.css'); require('./jupyter-leaflet.css'); // Forcibly load the marker icon images to be in the bundle. require('leaflet/dist/images/marker-shadow.png'); require('leaflet/dist/images/marker-icon.png'); require('leaflet/dist/images/marker-icon-2x.png'); // Export everything from jupyter-leaflet and the npm package version number. hasL = (typeof(window.L) != 'undefined'); module.exports = require('./jupyter-leaflet.js'); module.exports['version'] = require('../package.json').version; if (hasL) { console.log("Existing `L` detected, running ipyleaflet's Leaflet in no-conflict mode as `ipyL`"); ipyL = L.noConflict(); }
// Load css require('leaflet/dist/leaflet.css'); require('leaflet-draw/dist/leaflet.draw.css'); require('leaflet.markercluster/dist/MarkerCluster.css'); require('leaflet.markercluster/dist/MarkerCluster.Default.css'); require('leaflet-measure/dist/leaflet-measure.css'); require('leaflet-fullscreen/dist/leaflet.fullscreen.css'); require('./jupyter-leaflet.css'); // Forcibly load the marker icon images to be in the bundle. require('leaflet/dist/images/marker-shadow.png'); require('leaflet/dist/images/marker-icon.png'); require('leaflet/dist/images/marker-icon-2x.png'); // Export everything from jupyter-leaflet and the npm package version number. var _oldL = window.L; module.exports = require('./jupyter-leaflet.js'); module.exports['version'] = require('../package.json').version; // if previous L existed and it got changed while loading this module if (_oldL !== undefined && _oldL !== window.L) { console.log("Existing `L` detected, running ipyleaflet's Leaflet in no-conflict mode as `ipyL`"); ipyL = L.noConflict(); }
Use more robust check before using noConflict() mode
Use more robust check before using noConflict() mode Basically detect the case when L is already the same Leaflet library instance that was loaded by some other extension, in which case there is no need to use noConflict. This does not address the problem of plugins assuming single global L when there are several different Leaflet libs, but it does address #337, since other extension share the same Leaflet instance.
JavaScript
mit
ellisonbg/leafletwidget,ellisonbg/leafletwidget
1ae13b69aba04aefcdfc6ac5022db03945e96f96
tests/web/casperjs/homepage.js
tests/web/casperjs/homepage.js
/** * homepage.js - Homepage tests. */ var x = require('casper').selectXPath; casper.options.viewportSize = {width: 1920, height: 961}; casper.on('page.error', function(msg, trace) { this.echo('Error: ' + msg, 'ERROR'); for(var i=0; i<trace.length; i++) { var step = trace[i]; this.echo(' ' + step.file + ' (line ' + step.line + ')', 'ERROR'); } }); casper.on('remote.message', function(message) { this.echo('Message: ' + message); }); casper.test.begin('Tests homepage structure', function suite(test) { casper.start('http://web', function() { test.assertTitle("TestProject", "Title is correct"); casper.wait(2000); test.assertVisible('h2'); }); casper.run(function() { test.done(); }); });
/** * homepage.js - Homepage tests. */ var x = require('casper').selectXPath; casper.options.viewportSize = {width: 1920, height: 961}; casper.on('page.error', function(msg, trace) { this.echo('Error: ' + msg, 'ERROR'); for(var i=0; i<trace.length; i++) { var step = trace[i]; this.echo(' ' + step.file + ' (line ' + step.line + ')', 'ERROR'); } }); casper.on('remote.message', function(message) { this.echo('Message: ' + message); }); casper.test.begin('Tests homepage structure', function suite(test) { casper.start('http://web', function() { // This works because the title is set in the "parent" template. test.assertTitle("TestProject", "Title is correct"); casper.wait(2000); // This fails, I'm guessing because the h2 is only in the "child" template, // it seems that CasperJS doesn't render the angular2 app correctly // and the child route templates are not injected into the page correctly. test.assertVisible('h2'); }); casper.run(function() { test.done(); }); });
Add more comments to the CasperJS test
Add more comments to the CasperJS test
JavaScript
mit
emmetog/demo-docker-microservice-app,emmetog/demo-docker-microservice-app,emmetog/demo-docker-microservice-app,emmetog/demo-docker-microservice-app,emmetog/demo-docker-microservice-app,emmetog/demo-docker-microservice-app
e4748c49a296ceae8a2ecf2b91d8dd9bcb81abbd
app/assets/javascripts/helpers/languagesHelper.js
app/assets/javascripts/helpers/languagesHelper.js
define([], function() { /** * List of the key languages of the platform */ var languageList = { en: 'English', zh: '中文', fr: 'Français', id: 'Bahasa Indonesia', pt_BR: 'Português (Brasil)', es_MX: 'Español (Mexico)' }; var languagesHelper = { /** * Returns the list of key languages * @returns {Object} key languages list */ getList: function() { return languageList; }, /** * Returns a list of the key languages * with the selected option passed by param * @param {string} selected language * @returns {Array} list of languages with selection */ getListSelected: function(selectedLanguage) { var langList = []; for (var lang in languageList) { langList.push({ key: lang, name: languageList[lang], selected: lang === selectedLanguage ? 'selected' : '' }); } return langList; } } return languagesHelper; });
define([], function() { /** * List of the key languages of the platform */ var languageList = { en: 'English', zh: '中文', fr: 'Français', id: 'Bahasa Indonesia', pt_BR: 'Português', es_MX: 'Español' }; var languagesHelper = { /** * Returns the list of key languages * @returns {Object} key languages list */ getList: function() { return languageList; }, /** * Returns a list of the key languages * with the selected option passed by param * @param {string} selected language * @returns {Array} list of languages with selection */ getListSelected: function(selectedLanguage) { var langList = []; for (var lang in languageList) { langList.push({ key: lang, name: languageList[lang], selected: lang === selectedLanguage ? 'selected' : '' }); } return langList; } } return languagesHelper; });
Update languages literals in subscription selector
Update languages literals in subscription selector
JavaScript
mit
Vizzuality/gfw,Vizzuality/gfw
5e0f5b68b4e085968544f9ff52eb3f7bc7558b81
src/article/converter/r2t/DispQuoteConverter.js
src/article/converter/r2t/DispQuoteConverter.js
import { findChild, findAllChildren } from '../util/domHelpers' /** * A converter for JATS `<disp-quote>`. * Our internal model deviates from the original one in that the the attribution is separated from * the quote content by using a dedicated text property 'attrib' */ export default class DispQuoteConverter { get type () { return 'disp-quote' } get tagName () { return 'disp-quote' } import (el, node, importer) { let pEls = findAllChildren(el, 'p') let attrib = findChild(el, 'attrib') if (attrib) { node.attrib = importer.annotatedText(attrib, [node.id, 'attrib']) } node._childNodes = pEls.map(p => { return importer.convertElement(p).id }) } export (node, el, exporter) { let $$ = exporter.$$ let children = node.getChildren() el.append( children.map(child => { return exporter.convertNode(child) }) ) if (node.attrib) { el.append( $$('attrib').append( exporter.annotatedText([node.id, 'attrib']) ) ) } } }
import { findChild, findAllChildren } from '../util/domHelpers' /** * A converter for JATS `<disp-quote>`. * Our internal model deviates from the original one in that the the attribution is separated from * the quote content by using a dedicated text property 'attrib' */ export default class DispQuoteConverter { get type () { return 'disp-quote' } get tagName () { return 'disp-quote' } import (el, node, importer) { let $$ = el.createElement.bind(el.getOwnerDocument()) let pEls = findAllChildren(el, 'p') if (pEls.length === 0) { pEls.push($$('p')) } let attrib = findChild(el, 'attrib') if (attrib) { node.attrib = importer.annotatedText(attrib, [node.id, 'attrib']) } node._childNodes = pEls.map(p => { return importer.convertElement(p).id }) } export (node, el, exporter) { let $$ = exporter.$$ let children = node.getChildren() el.append( children.map(child => { return exporter.convertNode(child) }) ) if (node.attrib) { el.append( $$('attrib').append( exporter.annotatedText([node.id, 'attrib']) ) ) } } }
Make a converter robust against missing paragraph.
Make a converter robust against missing paragraph.
JavaScript
mit
substance/texture,substance/texture
3a8a1f0d1f9fc7d5a38aba6e5bd042086c488adb
src/scripts/content/youtrack.js
src/scripts/content/youtrack.js
/*jslint indent: 2 */ /*global $: false, document: false, togglbutton: false*/ 'use strict'; /* the first selector is required for youtrack-5 and the second for youtrack-6 */ togglbutton.render('.fsi-toolbar-content:not(.toggl), .toolbar_fsi:not(.toggl)', {observe: true}, function (elem) { var link, description, numElem = $('a.issueId'), titleElem = $(".issue-summary"), projectElem = $('.fsi-properties .disabled.bold'); description = titleElem.textContent; description = numElem.firstChild.textContent.trim() + " " + description.trim(); link = togglbutton.createTimerLink({ className: 'youtrack', description: description, projectName: projectElem ? projectElem.textContent : '' }); elem.insertBefore(link, titleElem); }); // Agile board togglbutton.render('#board .sb-task:not(.toggl)', {observe: true}, function (elem) { var link, container = $('.sb-task-title', elem), description = $('.sb-task-summary', elem).textContent, projectName = $('#selectAgile').value.split("(")[1].replace(")", "").trim(); link = togglbutton.createTimerLink({ className: 'youtrack', description: description, projectName: projectName }); container.appendChild(link); });
/*jslint indent: 2 */ /*global $: false, document: false, togglbutton: false*/ 'use strict'; /* the first selector is required for youtrack-5 and the second for youtrack-6 */ togglbutton.render('.fsi-toolbar-content:not(.toggl), .toolbar_fsi:not(.toggl)', {observe: true}, function (elem) { var link, description, numElem = $('a.issueId'), titleElem = $(".issue-summary"), projectElem = $('.fsi-properties a[title^="Project"], .fsi-properties .disabled.bold'); description = titleElem.textContent; description = numElem.firstChild.textContent.trim() + " " + description.trim(); link = togglbutton.createTimerLink({ className: 'youtrack', description: description, projectName: projectElem ? projectElem.textContent : '' }); elem.insertBefore(link, titleElem); }); // Agile board togglbutton.render('#board .sb-task:not(.toggl)', {observe: true}, function (elem) { var link, container = $('.sb-task-title', elem), description = $('.sb-task-summary', elem).textContent, projectName = $('#selectAgile').value.split("(")[1].replace(")", "").trim(); link = togglbutton.createTimerLink({ className: 'youtrack', description: description, projectName: projectName }); container.appendChild(link); });
Fix project name fetch regression
[YouTrack] Fix project name fetch regression
JavaScript
bsd-3-clause
glensc/toggl-button,andreimoldo/toggl-button,eatskolnikov/toggl-button,eatskolnikov/toggl-button,andreimoldo/toggl-button,glensc/toggl-button,bitbull-team/toggl-button,glensc/toggl-button,bitbull-team/toggl-button
d2d8ef7e882dcf28ae306780bb463e800b0ad15c
js/validation/validate.js
js/validation/validate.js
var _ = require('lodash'); var async = require('async'); var joy = require('./joy/joy.js'); var schemas = { 'basal-rate-segment': require('./basal'), bolus: require('./bolus'), cbg: require('./bg'), common: require('./common'), deviceMeta: joy(), message: require('./message'), settings: require('./settings'), smbg: require('./bg'), wizard: require('./wizard') }; module.exports = { validateOne: function(datum, cb) { var handler = schemas[datum.type]; if (handler == null) { datum.errorMessage = util.format('Unknown data.type[%s]', datum.type); cb(new Error(datum.errorMessage), datum); } else { try { handler(datum); } catch (e) { console.log('Oh noes! This is wrong:\n', datum); console.log(util.format('Error Message: %s%s', datum.type, e.message)); datum.errorMessage = e.message; result.invalid.push(datum); return cb(e, datum); } cb(null, datum); } }, validateAll: function(data, cb) { console.time('Pure'); async.map(data, this.validateOne.bind(this), function(err, results) { console.timeEnd('Pure'); cb(err, results); }); } };
var _ = require('lodash'); var async = require('async'); var util = require('util'); var joy = require('./joy/joy.js'); var schemas = { 'basal-rate-segment': require('./basal'), bolus: require('./bolus'), cbg: require('./bg'), common: require('./common'), deviceMeta: joy(), message: require('./message'), settings: require('./settings'), smbg: require('./bg'), wizard: require('./wizard') }; module.exports = { validateOne: function(datum, cb) { var handler = schemas[datum.type]; if (handler == null) { datum.errorMessage = util.format('Unknown data.type[%s]', datum.type); cb(new Error(datum.errorMessage), datum); } else { try { handler(datum); } catch (e) { console.log('Oh noes! This is wrong:\n', datum); console.log(util.format('Error Message: %s%s', datum.type, e.message)); datum.errorMessage = e.message; result.invalid.push(datum); return cb(e, datum); } cb(null, datum); } }, validateAll: function(data, cb) { console.time('Pure'); async.map(data, this.validateOne.bind(this), function(err, results) { console.timeEnd('Pure'); cb(err, results); }); } };
Fix "util not defined" error from merge conflict
Fix "util not defined" error from merge conflict
JavaScript
bsd-2-clause
tidepool-org/tideline,tidepool-org/tideline
f3ceda6f44b63bbef13e11345722805054b537e5
test/TestPermuteReduce.js
test/TestPermuteReduce.js
var expect = require('chai').expect; var permuterFactory = require('../index').permuterFactory; describe('permuter', function () { it('should work stand-alone', function () { var permuter = permuterFactory(['a','b']); expect(permuter(['x'])).to.eql([ ['x', 'a'], ['x', 'b'] ]); }); it('should work with reduce', function () { var permuter = permuterFactory(['a', 'b']); expect([['x']].reduce(permuter, [])).to.eql([ ['x', 'a'], ['x', 'b'] ]); }); });
var expect = require('chai').expect; var permuterFactory = require('../index').permuterFactory; describe('permuter', function () { it('should work stand-alone', function () { var permuter = permuterFactory(['a','b']); expect(permuter(['x'])).to.eql([ ['x', 'a'], ['x', 'b'] ]); }); it('should work with reduce', function () { var permuter = permuterFactory(['a', 'b']); expect([['x']].reduce(permuter, [])).to.eql([ ['x', 'a'], ['x', 'b'] ]); }); it('can be used to compute swedish ancestor names', function () { var parents = ['mor', 'far']; var permuter = permuterFactory(parents); expect([['']] .reduce(permuter, []) .reduce(permuter, []) .map(function (cur) {return cur.join('');})).to.eql([ 'mormor', 'morfar', 'farmor', 'farfar' ]); }); });
Add example for swedish grandparent names
Add example for swedish grandparent names
JavaScript
mit
tylerpeterson/node-swiss-army-knife
e7fae9c368829013857e03316af06ed511bbfbe8
extendStorage.js
extendStorage.js
/* Wonder how this works? Storage is the Prototype of both localStorage and sessionStorage. Got it? */ (function() { 'use strict'; Storage.prototype.set = function(key, obj) { var t = typeof obj; if (t==='undefined' || obj===null ) this.removeItem(key); this.setItem(key, (t==='object')?JSON.stringify(obj):obj); }; Storage.prototype.get = function(key) { var obj = this.getItem(key); try { var j = JSON.parse(obj); if (j && typeof j === "object") return j; } catch (e) { } return obj; }; Storage.prototype.has = window.hasOwnProperty; Storage.prototype.remove = window.removeItem; Storage.prototype.keys = function(){ return Object.keys(this.valueOf()); }; })();
/* Wonder how this works? Storage is the Prototype of both localStorage and sessionStorage. Got it? */ (function() { 'use strict'; function extend(){ for(var i=1; i<arguments.length; i++) for(var key in arguments[i]) if(arguments[i].hasOwnProperty(key)) { if (typeof arguments[0][key] === 'object' && typeof arguments[i][key] === 'object') extend(arguments[0][key], arguments[i][key]); else arguments[0][key] = arguments[i][key]; } return arguments[0]; } Storage.prototype.set = function(key, obj) { var t = typeof obj; if (t==='undefined' || obj===null ) this.removeItem(key); this.setItem(key, (t==='object')?JSON.stringify(obj):obj); }; Storage.prototype.get = function(key) { var obj = this.getItem(key); try { var j = JSON.parse(obj); if (j && typeof j === "object") return j; } catch (e) { } return obj; }; Storage.prototype.extend = function(key, obj_merge) { this.set(key,extend(this.get(key),obj_merge); }; Storage.prototype.has = window.hasOwnProperty; Storage.prototype.remove = window.removeItem; Storage.prototype.keys = function(){ return Object.keys(this.valueOf()); }; })();
Add localStorage.extend with recursive support (but no typechecking)
Add localStorage.extend with recursive support (but no typechecking)
JavaScript
mit
zevero/simpleWebstorage
4e1b941dac03bca3acb0143ad91daa1f9a3e2936
packages/react-server-cli/src/commands/compile.js
packages/react-server-cli/src/commands/compile.js
import compileClient from "../compileClient" import handleCompilationErrors from "../handleCompilationErrors"; import setupLogging from "../setupLogging"; import logProductionWarnings from "../logProductionWarnings"; const logger = require("react-server").logging.getLogger(__LOGGER__); export default function compile(options){ setupLogging(options); logProductionWarnings(options); const {compiler} = compileClient(options); logger.notice("Starting compilation of client JavaScript..."); compiler.run((err, stats) => { const error = handleCompilationErrors(err, stats); if (!error) { logger.notice("Successfully compiled client JavaScript."); } else { logger.error(error); } }); }
import compileClient from "../compileClient" import handleCompilationErrors from "../handleCompilationErrors"; import setupLogging from "../setupLogging"; import logProductionWarnings from "../logProductionWarnings"; import {logging} from "../react-server"; const logger = logging.getLogger(__LOGGER__); export default function compile(options){ setupLogging(options); logProductionWarnings(options); const {compiler} = compileClient(options); logger.notice("Starting compilation of client JavaScript..."); compiler.run((err, stats) => { const error = handleCompilationErrors(err, stats); if (!error) { logger.notice("Successfully compiled client JavaScript."); } else { logger.error(error); } }); }
Fix a weird logger instantiation
Fix a weird logger instantiation
JavaScript
apache-2.0
emecell/react-server,davidalber/react-server,redfin/react-server,lidawang/react-server,doug-wade/react-server,szhou8813/react-server,doug-wade/react-server,redfin/react-server,szhou8813/react-server,lidawang/react-server,davidalber/react-server,emecell/react-server
4d0ee58f3adb7f9862c0000664989c40335f7abd
test/index.js
test/index.js
var chai = require('chai'); var chaiAsPromised = require('chai-as-promised'); chai.use(chaiAsPromised); var expect = chai.expect; var rollupBabelLibBundler = require('../lib'); describe('rollup-babel-lib-bundler', function() { it('is a function', function() { expect(rollupBabelLibBundler).to.be.a('function'); }); it('returns a promise', function(done) { var promise = rollupBabelLibBundler(); expect(promise).to.be.a('Promise'); expect(promise).to.eventually.be.rejected.and.notify(done); }); it('creates new files', function(done) { var promise = rollupBabelLibBundler({ entry: 'test/sample.js', }); expect(promise).to.eventually.be.a('array').and.notify(done); }); });
var chai = require('chai'); var chaiAsPromised = require('chai-as-promised'); chai.use(chaiAsPromised); var expect = chai.expect; var rollupBabelLibBundler = require('../lib'); describe('rollup-babel-lib-bundler', function() { it('is a function', function() { expect(rollupBabelLibBundler).to.be.a('function'); }); it('returns a promise', function(done) { var promise = rollupBabelLibBundler(); // On Node 0.10, promise is shimmed if (typeof promise !== 'object') { expect(promise).to.be.a('Promise'); } expect(promise).to.eventually.be.rejected.and.notify(done); }); it('creates new files', function(done) { var promise = rollupBabelLibBundler({ entry: 'test/sample.js', }); expect(promise).to.eventually.be.a('array').and.notify(done); }); });
Update test for Node 0.10
Update test for Node 0.10
JavaScript
mit
frostney/rollup-babel-lib-bundler
1c6cfedaca2be22f1720b4f6cd64764199be173e
test/stores/Store.spec.js
test/stores/Store.spec.js
import store from "src/stores/Store.js"; describe("store", () => { it("should exist", () => { store.should.exist; }); it("should have all API methods", () => { store.dispatch.should.be.a.function; store.getState.should.be.a.function; store.replaceReducer.should.be.a.function; store.subscribe.should.be.a.function; }); });
import store from "src/stores/Store.js"; import app from "src/reducers/App.js"; describe("store", () => { it("should exist", () => { store.should.exist; }); it("should have all API methods", () => { store.dispatch.should.be.a.function; store.getState.should.be.a.function; store.replaceReducer.should.be.a.function; store.subscribe.should.be.a.function; }); it("should use app reducer", () => { var storeState = store.dispath({type: "bla-bla-bla"}); var defaultState = app(undefined, {type: "bla-bla-bla"}); storeState.should.be.eql(defaultState); }) });
Add test if store use app reducer
Refactor: Add test if store use app reducer
JavaScript
mit
Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React
18a90886ef4ea64a75ff0182af60dff5a308052e
app/components/vm-hover.js
app/components/vm-hover.js
import Ember from 'ember'; export default Ember.Component.extend({ isShowingHover: false, commitTitle: function() { if (this.get('vm.commit.title').match(/^Merge/)) { return this.get('vm.commit.title').replace(/ of.*/g,'').replace(/ into.*/g,''); } return this.get('vm.commit.title'); }.property('vm.commit.title'), setShowingHover: function() { var access_level = this.get('session').get('data.authenticated.access_level'); if (access_level >= 20) { this.set('isShowingHover', this.get('isShowingHovers') === this.get('vm').id); } else { this.set('isShowingHover', false); } }.observes('isShowingHovers'), // Return true if is running state isRunning: function() { if (parseInt(this.get('vm.status'), 10) > 0) { return true; } return false; }.property('vm.status'), // Return true if user is a Dev or more isDev: function() { var access_level = this.get('session').get('data.authenticated.access_level'); if (access_level >= 30) { return true; } return false; }.property('session.data.authenticated.access_level'), actions: { // close the modal, reset showing variable closeHover: function() { this.set('isShowingHovers', -1); } } });
import Ember from 'ember'; export default Ember.Component.extend({ isShowingHover: false, commitTitle: function() { if (this.get('vm.commit.title') && this.get('vm.commit.title').match(/^Merge/)) { return this.get('vm.commit.title').replace(/ of.*/g,'').replace(/ into.*/g,''); } return this.get('vm.commit.title'); }.property('vm.commit.title'), setShowingHover: function() { var access_level = this.get('session').get('data.authenticated.access_level'); if (access_level >= 20) { this.set('isShowingHover', this.get('isShowingHovers') === this.get('vm').id); } else { this.set('isShowingHover', false); } }.observes('isShowingHovers'), // Return true if is running state isRunning: function() { if (parseInt(this.get('vm.status'), 10) > 0) { return true; } return false; }.property('vm.status'), // Return true if user is a Dev or more isDev: function() { var access_level = this.get('session').get('data.authenticated.access_level'); if (access_level >= 30) { return true; } return false; }.property('session.data.authenticated.access_level'), actions: { // close the modal, reset showing variable closeHover: function() { this.set('isShowingHovers', -1); } } });
Fix issue on match vm title
Fix issue on match vm title
JavaScript
mit
ricofehr/nextdeploy-webui,ricofehr/nextdeploy-webui
399a94ec926e48935a9a2d7139c1ef477125bd25
test/modules/version/program.js
test/modules/version/program.js
define(function (require) { var a = require('./a.js?v=1.0'); var a2 = require('./a.js?v=2.0'); var test = require('../../test'); test.assert(a.foo === 1, 'module version.'); test.assert(a.foo === a2.foo, 'module version.'); test.done(); });
define(function (require) { var a = require('./a.js?v=1.0'); var a2 = require('./a.js?v=2.0'); var test = require('../../test'); test.assert(a.foo === 1, a.foo); test.assert(a.foo === a2.foo, a2.foo); test.done(); });
Update the version test case
Update the version test case
JavaScript
mit
zaoli/seajs,angelLYK/seajs,zwh6611/seajs,yuhualingfeng/seajs,zwh6611/seajs,imcys/seajs,tonny-zhang/seajs,lee-my/seajs,ysxlinux/seajs,lianggaolin/seajs,mosoft521/seajs,FrankElean/SeaJS,judastree/seajs,angelLYK/seajs,tonny-zhang/seajs,chinakids/seajs,lee-my/seajs,yuhualingfeng/seajs,tonny-zhang/seajs,jishichang/seajs,longze/seajs,PUSEN/seajs,baiduoduo/seajs,kuier/seajs,AlvinWei1024/seajs,angelLYK/seajs,coolyhx/seajs,liupeng110112/seajs,lovelykobe/seajs,kaijiemo/seajs,PUSEN/seajs,Lyfme/seajs,121595113/seajs,yern/seajs,JeffLi1993/seajs,mosoft521/seajs,eleanors/SeaJS,seajs/seajs,LzhElite/seajs,miusuncle/seajs,yuhualingfeng/seajs,treejames/seajs,LzhElite/seajs,seajs/seajs,zaoli/seajs,hbdrawn/seajs,lianggaolin/seajs,evilemon/seajs,yern/seajs,baiduoduo/seajs,PUSEN/seajs,kuier/seajs,sheldonzf/seajs,coolyhx/seajs,Lyfme/seajs,hbdrawn/seajs,JeffLi1993/seajs,twoubt/seajs,yern/seajs,lee-my/seajs,MrZhengliang/seajs,coolyhx/seajs,121595113/seajs,jishichang/seajs,imcys/seajs,uestcNaldo/seajs,sheldonzf/seajs,treejames/seajs,kuier/seajs,moccen/seajs,miusuncle/seajs,AlvinWei1024/seajs,FrankElean/SeaJS,ysxlinux/seajs,zaoli/seajs,eleanors/SeaJS,chinakids/seajs,twoubt/seajs,jishichang/seajs,seajs/seajs,uestcNaldo/seajs,judastree/seajs,LzhElite/seajs,sheldonzf/seajs,liupeng110112/seajs,ysxlinux/seajs,imcys/seajs,liupeng110112/seajs,evilemon/seajs,evilemon/seajs,longze/seajs,MrZhengliang/seajs,treejames/seajs,uestcNaldo/seajs,wenber/seajs,lovelykobe/seajs,lovelykobe/seajs,wenber/seajs,lianggaolin/seajs,Gatsbyy/seajs,judastree/seajs,kaijiemo/seajs,mosoft521/seajs,longze/seajs,FrankElean/SeaJS,zwh6611/seajs,AlvinWei1024/seajs,MrZhengliang/seajs,13693100472/seajs,Gatsbyy/seajs,kaijiemo/seajs,JeffLi1993/seajs,Gatsbyy/seajs,eleanors/SeaJS,baiduoduo/seajs,moccen/seajs,13693100472/seajs,miusuncle/seajs,wenber/seajs,Lyfme/seajs,twoubt/seajs,moccen/seajs
c2179a52ea6c1a422061a25a83ee27428a5494fb
server.js
server.js
'use strict'; var config = require('./server/config'); var express = require('express'); var handlebars = require('express-handlebars'); var app = express(); // Middlewares configuration var oneWeek = 604800000; app.use(express.static('build', { maxAge: oneWeek })); app.use(express.static('data', { maxAge: oneWeek, extensions: ['png'] })); // Handlebars configuration app.set('views', 'client/views'); app.engine('.hbs', handlebars({ extname: '.hbs', partialsDir: ['client/views/components/', 'client/views/partials/'] })); app.set('view engine', '.hbs'); // Starts application listening app.listen(config.port, (err) => { console.log('running on ' + config.port); }); // Regsiters routes var indexRoutes = require('./server/routes/indexRoutes'); app.use('/', indexRoutes);
'use strict'; var config = require('./server/config'); var express = require('express'); var handlebars = require('express-handlebars'); var app = express(); // Middlewares configuration var oneWeek = 604800000; app.use(express.static('build')); app.use(express.static('data', { maxAge: oneWeek, extensions: ['png'] })); // Handlebars configuration app.set('views', 'client/views'); app.engine('.hbs', handlebars({ extname: '.hbs', partialsDir: ['client/views/components/', 'client/views/partials/'] })); app.set('view engine', '.hbs'); // Starts application listening app.listen(config.port, (err) => { console.log('running on ' + config.port); }); // Regsiters routes var indexRoutes = require('./server/routes/indexRoutes'); app.use('/', indexRoutes);
Remove cache on build folder
Remove cache on build folder
JavaScript
apache-2.0
Softcadbury/FootballDashboard,Softcadbury/football-peek,Softcadbury/FootballDashboard,Softcadbury/DashboardFootball,Softcadbury/DashboardFootball
5697e7eab5f1402a2e4ab7922e2f044429c8ac64
lib/helpers/helpers.js
lib/helpers/helpers.js
'use strict'; module.exports = { getClassesFromSelector: function (selector) { if (!selector) { return []; } var classRegEx = /[_a-zA-Z][_a-zA-Z0-9-]*/g; return selector.match(classRegEx); }, getSelectorLength: function (selector) { var classes = this.getClassesFromSelector(selector); return classes ? classes.length : 0; } };
'use strict'; module.exports = { getClassesFromSelector: function (selector) { if (!selector) { return []; } var classRegEx = /[_a-zA-Z][_a-zA-Z0-9-]*/g; return selector.match(classRegEx) || []; }, getSelectorLength: function (selector) { var classes = this.getClassesFromSelector(selector); return classes.length; } };
Return empty list on non match
Return empty list on non match
JavaScript
mit
timeinfeldt/grunt-csschecker,timeinfeldt/grunt-csschecker
36829b9b66474d38de527f2d1457c32b86500402
karma.conf.js
karma.conf.js
var webpack = require('webpack'); module.exports = function (config) { config.set({ browsers: [ process.env.CONTINUOUS_INTEGRATION ? 'Firefox' : 'Chrome' ], singleRun: process.env.CONTINUOUS_INTEGRATION === 'true', frameworks: [ 'mocha' ], files: [ 'tests.webpack.js' ], preprocessors: { 'tests.webpack.js': [ 'webpack', 'sourcemap' ] }, webpack: { devtool: 'inline-source-map', module: { loaders: [ { test: /\.js$/, loader: 'jsx-loader?harmony' } ] }, plugins: [ new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('test') }) ] }, webpackServer: { noInfo: true } }); };
var webpack = require('webpack'); module.exports = function (config) { config.set({ browsers: [ process.env.CONTINUOUS_INTEGRATION ? 'Firefox' : 'Chrome' ], singleRun: process.env.CONTINUOUS_INTEGRATION === 'true', frameworks: [ 'mocha' ], files: [ 'tests.webpack.js' ], preprocessors: { 'tests.webpack.js': [ 'webpack', 'sourcemap' ] }, reporters: [ 'dots' ], webpack: { devtool: 'inline-source-map', module: { loaders: [ { test: /\.js$/, loader: 'jsx-loader?harmony' } ] }, plugins: [ new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('test') }) ] }, webpackServer: { noInfo: true } }); };
Use "dots" karma reporter (for Travis CI web UI)
Use "dots" karma reporter (for Travis CI web UI)
JavaScript
mit
careerlounge/react-router,yanivefraim/react-router,kelsadita/react-router,rkit/react-router,qimingweng/react-router,Nedomas/react-router,calebmichaelsanchez/react-router,Gazler/react-router,vic/react-router,amplii/react-router,Semora/react-router,mozillo/react-router,FredKSchott/react-router,dozoisch/react-router,tmbtech/react-router,knowbody/react-router,dyzhu12/react-router,johnochs/react-router,wushuyi/react-router,steffenmllr/react-router,dalexand/react-router,meraki/react-router,brenoc/react-router,leeric92/react-router,jamiehill/react-router,gdi2290/react-router,leeric92/react-router,chrisirhc/react-router,gilesbradshaw/react-router,moudy/react-router,iest/react-router,zeke/react-router,rafrex/react-router,dandean/react-router,asaf/react-router,robertniimi/react-router,gaearon/react-router,clloyd/react-router,alexlande/react-router,chf2/react-router,lingard/react-router,pjuke/react-router,gabrielalmeida/react-router,BowlingX/react-router,kirill-konshin/react-router,Duc-Ngo-CSSE/react-router,lrs/react-router,wesbos/react-router,thewillhuang/react-router,Jastrzebowski/react-router,chrisirhc/react-router,iNikNik/react-router,devmeyster/react-router,flocks/react-router,fanhc019/react-router,yanivefraim/react-router,tmbtech/react-router,mjw56/react-router,goblortikus/react-router,robertniimi/react-router,micahlmartin/react-router,ricca509/react-router,yongxu/react-router,elpete/react-router,laskos/react-router,omerts/react-router,rackt/react-router,santiagoaguiar/react-router,jflam/react-router,okcoker/react-router,nickaugust/react-router,birkmann/react-router,fiture/react-router,calebmichaelsanchez/react-router,darul75/react-router,SpainTrain/react-router,skevy/react-router,jeffreywescott/react-router,pjuke/react-router,opichals/react-router,ricca509/react-router,rkaneriya/react-router,fractal5/react-router,idolize/react-router,egobrightan/react-router,muffinresearch/react-router,edpaget/react-router,mattcreager/react-router,reapp/react-router,etiennetremel/react-router,iamdustan/react-router,jobcrackerbah/react-router,pherris/react-router,runlevelsix/react-router,adityapunjani/react-router,goblortikus/react-router,stonegithubs/react-router,taion/rrtr,egobrightan/react-router,prathamesh-sonpatki/react-router,gbaladi/react-router,singggum3b/react-router,freeyiyi1993/react-router,pheadra/react-router,yongxu/react-router,mikekidder/react-router,dalexand/react-router,iamdustan/react-router,justinwoo/react-router,gabrielalmeida/react-router,stevewillard/react-router,aastey/react-router,bmathews/react-router,fractal5/react-router,justinanastos/react-router,masterfung/react-router,migolo/react-router,gabrielalmeida/react-router,lyle/react-router,mulesoft/react-router,tsing/react-router,KamilSzot/react-router,ustccjw/react-router,jepezi/react-router,clloyd/react-router,upraised/react-router,mattkrick/react-router,robertniimi/react-router,navyxie/react-router,oliverwoodings/react-router,iNikNik/react-router,juampynr/react-router,camsong/react-router,chunwei/react-router,kittens/react-router,devmeyster/react-router,contra/react-router,careerlounge/react-router,eriknyk/react-router,nosnickid/react-router,arbas/react-router,acdlite/react-router,sugarshin/react-router,mhils/react-router,Takeno/react-router,darul75/react-router,wesbos/react-router,andreftavares/react-router,cgrossde/react-router,osnr/react-router,ReactTraining/react-router,Duc-Ngo-CSSE/react-router,arthurflachs/react-router,apoco/react-router,TylerLH/react-router,jwaltonmedia/react-router,amsardesai/react-router,sebmck/react-router,zhijiansha123/react-router,nauzethc/react-router,emmenko/react-router,omerts/react-router,taurose/react-router,chloeandisabel/react-router,FbF/react-router,phoenixbox/react-router,ArmendGashi/react-router,angus-c/react-router,Gazler/react-router,Nedomas/react-router,mhuggins7278/react-router,goblortikus/react-router,brenoc/react-router,benjie/react-router,juampynr/react-router,nkatsaros/react-router,steffenmllr/react-router,alexlande/react-router,carlosmontes/react-router,asaf/react-router,ryardley/react-router,RobertKielty/react-router,jflam/react-router,pekkis/react-router,xiaoking/react-router,FredKSchott/react-router,dyzhu12/react-router,ksivam/react-router,tkirda/react-router,careerlounge/react-router,Jastrzebowski/react-router,cold-brew-coding/react-router,barretts/react-router,birkmann/react-router,TylerLH/react-router,cgrossde/react-router,knowbody/react-router,ndreckshage/react-router,edpaget/react-router,artnez/react-router,santiagoaguiar/react-router,javawizard/react-router,pekkis/react-router,baillyje/react-router,jbbr/react-router,frostney/react-router,Takeno/react-router,arbas/react-router,opichals/react-router,gaearon/react-router,dandean/react-router,geminiyellow/react-router,acdlite/react-router,subpopular/react-router,nickaugust/react-router,nosnickid/react-router,laskos/react-router,lrs/react-router,darul75/react-router,flocks/react-router,dmitrigrabov/react-router,JohnyDays/react-router,buildo/react-router,phoenixbox/react-router,kurayama/react-router,herojobs/react-router,buildo/react-router,birendra-ideas2it/react-router,vic/react-router,stanleycyang/react-router,javawizard/react-router,FredKSchott/react-router,zipongo/react-router,eriknyk/react-router,andreftavares/react-router,CivBase/react-router,runlevelsix/react-router,AnSavvides/react-router,jobcrackerbah/react-router,OrganicSabra/react-router,steffenmllr/react-router,littlefoot32/react-router,dmitrigrabov/react-router,arthurflachs/react-router,BowlingX/react-router,daannijkamp/react-router,1000hz/react-router,benjie/react-router,grgur/react-router,rackt/react-router,jerrysu/react-router,MattSPalmer/react-router,Semora/react-router,dtschust/react-router,gdi2290/react-router,wmyers/react-router,subpopular/react-router,BerkeleyTrue/react-router,stshort/react-router,zenlambda/react-router,keathley/react-router,bs1180/react-router,OpenGov/react-router,RickyDan/react-router,kenwheeler/react-router,besarthoxhaj/react-router,acdlite/react-router,zhijiansha123/react-router,mhuggins7278/react-router,nottombrown/react-router,prathamesh-sonpatki/react-router,gbaladi/react-router,okcoker/react-router,stonegithubs/react-router,nauzethc/react-router,ReactTraining/react-router,AsaAyers/react-router,stevewillard/react-router,mozillo/react-router,buildo/react-router,ndreckshage/react-router,edpaget/react-router,sprjr/react-router,justinanastos/react-router,dontcallmedom/react-router,jayphelps/react-router,Sirlon/react-router,arasmussen/react-router,yanivefraim/react-router,malte-wessel/react-router,daannijkamp/react-router,qimingweng/react-router,albertolacework/react-router,davertron/react-router,jbbr/react-router,d-oliveros/react-router,besarthoxhaj/react-router,sugarshin/react-router,sebmck/react-router,chentsulin/react-router,elpete/react-router,masterfung/react-router,vic/react-router,RickyDan/react-router,jhta/react-router,9618211/react-router,justinwoo/react-router,OrganicSabra/react-router,wmyers/react-router,andrefarzat/react-router,rkit/react-router,juampynr/react-router,aastey/react-router,juliocanares/react-router,Reggino/react-router,reapp/react-router,mattydoincode/react-router,cpojer/react-router,baillyje/react-router,mattcreager/react-router,skevy/react-router,pherris/react-router,iest/react-router,justinwoo/react-router,9618211/react-router,amplii/react-router,kevinsimper/react-router,fiture/react-router,neebz/react-router,johnochs/react-router,ThibWeb/react-router,sebmck/react-router,reactjs/react-router,gilesbradshaw/react-router,whouses/react-router,sugarshin/react-router,collardeau/react-router,mikekidder/react-router,mjw56/react-router,1000hz/react-router,Jonekee/react-router,birkmann/react-router,mulesoft/react-router,MrBackKom/react-router,arusakov/react-router,malte-wessel/react-router,packetloop/react-router,natorojr/react-router,timuric/react-router,aldendaniels/react-router,jmeas/react-router,masterfung/react-router,ThibWeb/react-router,appspector/react-router,jmeas/react-router,albertolacework/react-router,oliverwoodings/react-router,trotzig/react-router,nhunzaker/react-router,RickyDan/react-router,jwaltonmedia/react-router,laskos/react-router,lvgunst/react-router,1000hz/react-router,johnochs/react-router,adityapunjani/react-router,claudiopro/react-router,grgur/react-router,wesbos/react-router,geminiyellow/react-router,juliocanares/react-router,upraised/react-router,jerrysu/react-router,fractal5/react-router,mulesoft/react-router,opichals/react-router,RobertKielty/react-router,cpojer/react-router,jepezi/react-router,OpenGov/react-router,JohnyDays/react-router,zeke/react-router,lazywei/react-router,packetloop/react-router,camsong/react-router,nottombrown/react-router,elpete/react-router,nvartolomei/react-router,moudy/react-router,birendra-ideas2it/react-router,goblortikus/react-router,lmtdit/react-router,sprjr/react-router,ksivam/react-router,Sirlon/react-router,stanleycyang/react-router,muffinresearch/react-router,angus-c/react-router,brigand/react-router,rdjpalmer/react-router,samidarko/react-router,tikotzky/react-router,kevinsimper/react-router,leeric92/react-router,9618211/react-router,mikepb/react-router,brownbathrobe/react-router,martypenner/react-router,rubengrill/react-router,timuric/react-router,KamilSzot/react-router,jeffreywescott/react-router,etiennetremel/react-router,jflam/react-router,lyle/react-router,dashed/react-router,singggum3b/react-router,nimi/react-router,mattkrick/react-router,chloeandisabel/react-router,juliocanares/react-router,JohnyDays/react-router,naoufal/react-router,devmeyster/react-router,collardeau/react-router,dozoisch/react-router,kelsadita/react-router,shunitoh/react-router,Dodelkin/react-router,grgur/react-router,aaron-goshine/react-router,brandonlilly/react-router,santiagoaguiar/react-router,tylermcginnis/react-router,kurayama/react-router,mattcreager/react-router,benjie/react-router,lvgunst/react-router,jerrysu/react-router,chunwei/react-router,chloeandisabel/react-router,kittens/react-router,cold-brew-coding/react-router,tmbtech/react-router,dozoisch/react-router,asaf/react-router,javawizard/react-router,matthewlehner/react-router,iNikNik/react-router,kittens/react-router,nimi/react-router,flocks/react-router,frostney/react-router,lyle/react-router,jdelight/react-router,mikekidder/react-router,zeke/react-router,batmanimal/react-router,apoco/react-router,chf2/react-router,brigand/react-router,natorojr/react-router,whouses/react-router,martypenner/react-router,navyxie/react-router,dtschust/react-router,osnr/react-router,Jastrzebowski/react-router,lingard/react-router,arusakov/react-router,ustccjw/react-router,thefringeninja/react-router,stanleycyang/react-router,SpainTrain/react-router,krawaller/react-router,zipongo/react-router,hgezim/react-router,DelvarWorld/react-router,chentsulin/react-router,navy235/react-router,Gazler/react-router,iamdustan/react-router,xiaoking/react-router,freeyiyi1993/react-router,OrganicSabra/react-router,stevewillard/react-router,FreedomBen/react-router,MrBackKom/react-router,tsing/react-router,OpenGov/react-router,kevinsimper/react-router,amsardesai/react-router,jbbr/react-router,jmeas/react-router,axross/react-router,batmanimal/react-router,taurose/react-router,nkatsaros/react-router,emmenko/react-router,jdelight/react-router,tylermcginnis/react-router,aldendaniels/react-router,appspector/react-router,d-oliveros/react-router,collardeau/react-router,stonegithubs/react-router,contra/react-router,mikepb/react-router,omerts/react-router,MrBackKom/react-router,tikotzky/react-router,schnerd/react-router,emmenko/react-router,martypenner/react-router,mikepb/react-router,hgezim/react-router,naoufal/react-router,mhuggins7278/react-router,nosnickid/react-router,eriknyk/react-router,zhijiansha123/react-router,prathamesh-sonpatki/react-router,maksad/react-router,amplii/react-router,wushuyi/react-router,gaearon/react-router,lrs/react-router,camsong/react-router,FbF/react-router,shunitoh/react-router,keathley/react-router,cojennin/react-router,Sirlon/react-router,andrefarzat/react-router,backendeveloper/react-router,reactjs/react-router,Dodelkin/react-router,sleexyz/react-router,BerkeleyTrue/react-router,DelvarWorld/react-router,claudiopro/react-router,rkit/react-router,CivBase/react-router,jobcrackerbah/react-router,micahlmartin/react-router,kirill-konshin/react-router,singggum3b/react-router,dashed/react-router,osnr/react-router,sleexyz/react-router,naoufal/react-router,joeyates/react-router,oliverwoodings/react-router,jamiehill/react-router,knowbody/react-router,chentsulin/react-router,apoco/react-router,mhils/react-router,joeyates/react-router,stshort/react-router,nhunzaker/react-router,jayphelps/react-router,thewillhuang/react-router,Jonekee/react-router,frankleng/react-router,ReactTraining/react-router,ReactTraining/react-router,lmtdit/react-router,trotzig/react-router,dandean/react-router,brandonlilly/react-router,dtschust/react-router,cpojer/react-router,buddhike/react-router,micahlmartin/react-router,dontcallmedom/react-router,navy235/react-router,sleexyz/react-router,jhta/react-router,littlefoot32/react-router,keathley/react-router,lingard/react-router,nimi/react-router,contra/react-router,herojobs/react-router,Reggino/react-router,phoenixbox/react-router,rafrex/react-router,backendeveloper/react-router,barretts/react-router,artnez/react-router,rdjpalmer/react-router,ryardley/react-router,ArmendGashi/react-router,bs1180/react-router,limarc/react-router,timuric/react-router,bmathews/react-router,dyzhu12/react-router,tikotzky/react-router,MattSPalmer/react-router,claudiopro/react-router,aaron-goshine/react-router,arthurflachs/react-router,Takeno/react-router,idolize/react-router,packetloop/react-router,Reggino/react-router,samidarko/react-router,RobertKielty/react-router,djkirby/react-router,jhnns/react-router,gbaladi/react-router,AnSavvides/react-router,nvartolomei/react-router,zenlambda/react-router,frostney/react-router,idolize/react-router,nkatsaros/react-router,qimingweng/react-router,krawaller/react-router,matthewlehner/react-router,FreedomBen/react-router,brownbathrobe/react-router,mattydoincode/react-router,andrefarzat/react-router,frankleng/react-router,tsing/react-router,backendeveloper/react-router,Semora/react-router,migolo/react-router,Duc-Ngo-CSSE/react-router,jeffreywescott/react-router,AsaAyers/react-router,thefringeninja/react-router,djkirby/react-router,artnez/react-router,davertron/react-router,kenwheeler/react-router,FbF/react-router,rubengrill/react-router,herojobs/react-router,levjj/react-router,jhnns/react-router,muffinresearch/react-router,geminiyellow/react-router,adityapunjani/react-router,gdi2290/react-router,BowlingX/react-router,wushuyi/react-router,FreedomBen/react-router,maksad/react-router,limarc/react-router,thefringeninja/react-router,carlosmontes/react-router,dontcallmedom/react-router,mhils/react-router,cojennin/react-router,meraki/react-router,lazywei/react-router,angus-c/react-router,dashed/react-router,subpopular/react-router,brigand/react-router,neebz/react-router,ricca509/react-router,AsaAyers/react-router,justinanastos/react-router,gilesbradshaw/react-router,schnerd/react-router,fanhc019/react-router,levjj/react-router,pherris/react-router,appspector/react-router,jayphelps/react-router,navy235/react-router,besarthoxhaj/react-router,arasmussen/react-router,baillyje/react-router,pheadra/react-router,jepezi/react-router,kirill-konshin/react-router,daannijkamp/react-router,OpenGov/react-router,kenwheeler/react-router,alexlande/react-router,wmyers/react-router,freeyiyi1993/react-router,bmathews/react-router,buddhike/react-router,amsardesai/react-router,rkaneriya/react-router,axross/react-router,pekkis/react-router,xiaoking/react-router,tkirda/react-router
abfe24acc0c7d37bd59f91b66c8479730b8dad27
grammar.js
grammar.js
module.exports = grammar({ name: 'ruby', rules: { program: $ => $._compound_statement, _compound_statement: $ => seq($._statement, rep(seq($._terminator, $._expression)), optional($._terminator)), _statement: $ => choice($._expression), _expression: $ => choice($._argument), _argument: $ => choice($._primary), _primary: $ => choice($._variable), _variable: $ => choice($.identifier , 'nil', 'self'), identifier: $ => seq(rep(choice('@', '$')), /[a-zA-Z_][a-zA-Z0-9_]*/), _line_break: $ => '\n', _terminator: $ => choice($._line_break, ';'), } });
module.exports = grammar({ name: 'ruby', rules: { program: $ => $._compound_statement, _compound_statement: $ => seq($._statement, rep(seq($._terminator, $._expression)), optional($._terminator)), _statement: $ => choice($._expression), _expression: $ => choice($._argument), _argument: $ => choice($._primary), _primary: $ => choice($._variable), _variable: $ => choice($.identifier , 'nil', 'self'), identifier: $ => seq(rep(choice('@', '$')), /[a-zA-Z_][a-zA-Z0-9_]*/), comment: $ => seq('#', /.*/), _line_break: $ => '\n', _terminator: $ => choice($._line_break, ';'), } });
Define a dubious comment rule.
Define a dubious comment rule.
JavaScript
mit
tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby
a6a74ccf7f7b42844bf8f50dc5db18c914b7f61e
src/main/webapp/js/controller/ProtocolListController.js
src/main/webapp/js/controller/ProtocolListController.js
'use strict'; indexApp.controller('ProtocolListController', function ProtocolListController($scope, indexData, $location){ $scope.protocolList = indexData.getProtocolList(); $scope.deleteProtocol = function(protocol){ indexData.deleteProtocol(protocol); $location.path('/'); } } );
'use strict'; indexApp.controller('ProtocolListController', function ProtocolListController($scope, indexData, $location){ $scope.protocolList = indexData.getProtocolList(); $scope.deleteProtocol = function(protocol){ indexData.deleteProtocol(protocol); $scope.protocolList = indexData.getProtocolList(); $location.path('/'); } } );
Refresh protocol list after protocol removal
Refresh protocol list after protocol removal
JavaScript
mit
GreyTeardrop/typeground,GreyTeardrop/typeground,GreyTeardrop/typeground
63bfd706d40c35b14fd852ff1efa8e0eb6237f08
RNTester/js/examples/XHR/XHRExampleAbortController.js
RNTester/js/examples/XHR/XHRExampleAbortController.js
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format * @flow */ 'use strict'; const React = require('react'); const {Alert, Button, View} = require('react-native'); class XHRExampleAbortController extends React.Component<{...}, {...}> { _timeout: any; _submit(abortDelay) { clearTimeout(this._timeout); // eslint-disable-next-line no-undef const abortController = new AbortController(); fetch('https://facebook.github.io/react-native/', { signal: abortController.signal, }) .then(res => res.text()) .then(res => Alert.alert(res)) .catch(err => Alert.alert(err.message)); this._timeout = setTimeout(() => { abortController.abort(); }, abortDelay); } componentWillUnmount() { clearTimeout(this._timeout); } render(): React.Node { return ( <View> <Button title="Abort before response" onPress={() => { this._submit(0); }} /> <Button title="Abort after response" onPress={() => { this._submit(5000); }} /> </View> ); } } module.exports = XHRExampleAbortController;
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format * @flow */ 'use strict'; const React = require('react'); const {Alert, Button, View} = require('react-native'); class XHRExampleAbortController extends React.Component<{...}, {...}> { _timeout: any; _submit(abortDelay) { clearTimeout(this._timeout); const abortController = new global.AbortController(); fetch('https://facebook.github.io/react-native/', { signal: abortController.signal, }) .then(res => res.text()) .then(res => Alert.alert(res)) .catch(err => Alert.alert(err.message)); this._timeout = setTimeout(() => { abortController.abort(); }, abortDelay); } componentWillUnmount() { clearTimeout(this._timeout); } render(): React.Node { return ( <View> <Button title="Abort before response" onPress={() => { this._submit(0); }} /> <Button title="Abort after response" onPress={() => { this._submit(5000); }} /> </View> ); } } module.exports = XHRExampleAbortController;
Move eslint-disable no-undef to a global comment
Move eslint-disable no-undef to a global comment Summary: Switch the only `// eslint-disable no-undef` to defined the global instead so that the new babel-eslint-no-undef compile time check doesn't need to understand inline eslint comments. Changelog: [Internal] Reviewed By: cpojer Differential Revision: D18644590 fbshipit-source-id: ac9c6da3a5e63b285b5e1dde210613b5d893641b
JavaScript
mit
facebook/react-native,facebook/react-native,hammerandchisel/react-native,arthuralee/react-native,janicduplessis/react-native,facebook/react-native,javache/react-native,exponent/react-native,myntra/react-native,javache/react-native,exponentjs/react-native,facebook/react-native,janicduplessis/react-native,janicduplessis/react-native,myntra/react-native,hammerandchisel/react-native,arthuralee/react-native,exponent/react-native,hoangpham95/react-native,janicduplessis/react-native,hoangpham95/react-native,pandiaraj44/react-native,facebook/react-native,exponent/react-native,exponent/react-native,facebook/react-native,hammerandchisel/react-native,hoangpham95/react-native,exponent/react-native,arthuralee/react-native,hammerandchisel/react-native,exponentjs/react-native,myntra/react-native,hoangpham95/react-native,janicduplessis/react-native,hoangpham95/react-native,exponentjs/react-native,exponentjs/react-native,exponentjs/react-native,myntra/react-native,exponent/react-native,pandiaraj44/react-native,facebook/react-native,arthuralee/react-native,hoangpham95/react-native,hammerandchisel/react-native,javache/react-native,hammerandchisel/react-native,pandiaraj44/react-native,hoangpham95/react-native,myntra/react-native,pandiaraj44/react-native,janicduplessis/react-native,facebook/react-native,javache/react-native,myntra/react-native,pandiaraj44/react-native,myntra/react-native,pandiaraj44/react-native,janicduplessis/react-native,javache/react-native,exponent/react-native,javache/react-native,myntra/react-native,pandiaraj44/react-native,exponentjs/react-native,javache/react-native,hammerandchisel/react-native,javache/react-native,facebook/react-native,myntra/react-native,exponentjs/react-native,exponent/react-native,hoangpham95/react-native,exponentjs/react-native,hammerandchisel/react-native,janicduplessis/react-native,pandiaraj44/react-native,javache/react-native,arthuralee/react-native
d38e1808a476d6783bf9ea0989e8dfb61ad6b731
lib/name-formatter.js
lib/name-formatter.js
var _ = require('underscore'); module.exports = function(name) { var nameConversions = [ firstInitialAndLastName = /^(\w).*\s(\w+)$/, firstAndLastName = /^(\w+)\s(\w+)$/, firstNameAndLastInitial = /^(\w+)\s(\w).+$/ ]; var emailDelimiters = [ contiguous = "$1$2", dot = "$1.$2", dash = "$1-$2", underscore = "$1_$2", reversed = "$2$1", reversedDot = "$2.$1", reversedDash = "$2-$1", reversedUnderscore = "$2_$1", justLastName = "$2", justFirstName = "$1", ]; return name.toLowerCase().replace( _.shuffle(nameConversions)[0], _.shuffle(emailDelimiters)[0] ) + randomSuffix(); }; // Generate the random chance that a random number will be affixed to the end function randomSuffix() { var randomChance = Math.round(Math.random()); if ( randomChance ) { return Math.floor(Math.random()*1001); } else { return ""; } }
var _ = require('underscore'); module.exports = function(name) { var nameConversions = [ initials = /^(\w).*\s(\w).*$/ firstInitialAndLastName = /^(\w).*\s(\w+)$/, firstAndLastName = /^(\w+)\s(\w+)$/, firstNameAndLastInitial = /^(\w+)\s(\w).+$/ ]; var emailDelimiters = [ contiguous = "$1$2", dot = "$1.$2", dash = "$1-$2", underscore = "$1_$2", reversed = "$2$1", reversedDot = "$2.$1", reversedDash = "$2-$1", reversedUnderscore = "$2_$1", justLastName = "$2", justFirstName = "$1", ]; return name.toLowerCase().replace( _.shuffle(nameConversions)[0], _.shuffle(emailDelimiters)[0] ) + randomSuffix(); }; // Generate the random chance that a random number will be affixed to the end function randomSuffix() { var randomChance = Math.round(Math.random()); if ( randomChance ) { return Math.floor(Math.random()*101); } else { return ""; } }
Add initials and lower random number
Add initials and lower random number
JavaScript
mit
stevekinney/node-fake-email
cd4c98d937e07c4d7c7d0750509cac40e1f1ffc3
src/components/videos/VideoView.js
src/components/videos/VideoView.js
import React from 'react' import { connect } from 'react-redux' import { compose } from 'recompose' import { updateVideo } from '../../actions/videos' import { withDatabaseSubscribe } from '../hocs' import CommentList from '../CommentList' import PerformanceFrame from '../PerformanceFrame' const mapStateToProps = ({videos}) => ({ videos }) const enhance = compose( connect(mapStateToProps), withDatabaseSubscribe( 'value', (props) => (`videos/${props.params.videoId}`), (props) => (snapshot) => ( props.dispatch(updateVideo({ videoId: props.params.videoId, videoSnapshot: snapshot.val() })) ) ), ) const styles = { videoContainer: { height: 'calc(100vh - 56px)', display: 'flex', flexWrap: 'wrap', } } const VideoView = ({videos, params}) => ( <div style={styles.videoContainer}> {(params.videoId in videos && videos[params.videoId] !== null) ? <PerformanceFrame size={{width: 854, height: 480}} layout={{ videoStreams: [{videoId: params.videoId, z_index: 0, scale: 1.0}]}} /> : <p>{"404 not found"}</p> } {videos[params.videoId] !== null ? <CommentList videoId={params.videoId}/> : <p>{"duh"}</p> } </div> ) export default enhance(VideoView)
import * as _ from 'lodash' import React from 'react' import {connect} from 'react-redux' import {compose, withProps} from 'recompose' import {updateVideo} from '../../actions/videos' import CommentList from '../CommentList' import {withDatabaseSubscribe} from '../hocs' const mapStateToProps = ({videos}) => ({ videos }) const enhance = compose( connect(mapStateToProps), withProps(({match}) => ({ videoId: match.params.videoId, })), withDatabaseSubscribe( 'value', (props) => (`videos/${props.videoId}`), (props) => (snapshot) => ( props.dispatch(updateVideo( { videoId: props.videoId, videoSnapshot: snapshot.val() })) ) ), ) const styles = { videoContainer: { height: 'calc(100vh - 56px)', display: 'flex', flexWrap: 'wrap', } } const VideoView = ({videos, videoId}) => ( <div style={styles.videoContainer}> {JSON.stringify(_.get(videos, videoId, {}))} <CommentList videoId={videoId}/> </div> ) export default enhance(VideoView)
Fix video view and remove some sub components
Fix video view and remove some sub components - Fixes #28
JavaScript
mit
mg4tv/mg4tv-web,mg4tv/mg4tv-web
a4443b203db029fe5ee7df682ca372259b3e4f1c
models/index.js
models/index.js
'use strict'; var mongoose = require('mongoose'); mongoose.model('User', require('./User')); mongoose.connect("mongodb://localhost/passport-lesson"); module.exports = mongoose;
'use strict'; var mongoose = require('mongoose'); mongoose.Promise = Promise; mongoose.model('User', require('./User')); mongoose.connect("mongodb://localhost/passport-lesson"); module.exports = mongoose;
Set mongoose to use native promises
Set mongoose to use native promises
JavaScript
mit
dhuddell/teachers-lounge-back-end
1887b3c7024779ebb8873277b2472dbe9141d0f5
server/controllers/signup.js
server/controllers/signup.js
// SignupController // ================ // Handles routing for signing up for the pp 'use strict'; let express = require('express'), SignupController = express.Router(), bcrypt = require('bcrypt'), User = require(__dirname + '/../models/user'); SignupController.route('/?') // GET /signup/ // ----------- // Render login page .get(function(req, res, next) { res.render('authentication/signup', { csrf: req.csrfToken(), scripts: ['/js/signup.min.js'] }); }) // POST /signup/ // ------------ // Registers a new user .post(function(req, res, next) { // Check if user exists in database User .where({ email: req.body.email }) .fetch() .then(function(user) { if (user) { bcrypt.hash(req.body.password, 10, function(err, hash) { if (err) return next(new Error('Could not hash password')); // Create a new user new User({ email: req.body.email, password: hash }) .save() .then(function(user) { res.send('User created'); }) .catch(function(err) { res.send('username or email already taken'); }); }); } else { res.send('could not create new user'); } }) .catch(function(err) { console.log(err, 'FETCH ERROR'); res.send('Could not run fetch query'); }); }); module.exports = SignupController;
// SignupController // ================ // Handles routing for signing up for the pp 'use strict'; let express = require('express'), SignupController = express.Router(), bcrypt = require('bcrypt'), User = require(__dirname + '/../models/user'); SignupController.route('/?') // GET /signup/ // ----------- // Render login page .get(function(req, res, next) { res.render('authentication/signup', { csrf: req.csrfToken(), scripts: ['/js/signup.min.js'] }); }) // POST /signup/ // ------------ // Registers a new user .post(function(req, res, next) { // Check if user exists in database User.where({ email: req.body.email }) .fetchAll() .then(function(user) { if (user) { bcrypt.hash(req.body.password, 10, function(err, hash) { if (err) return next(new Error('Could not hash password')); // Create a new user new User({ email: req.body.email, password: hash }) .save() .then(function(user) { res.send('User created'); }) .catch(function(err) { res.send('username or email already taken'); }); }); } else { res.send('could not create new user'); } }) .catch(function(err) { console.log(err, 'FETCH ERROR'); res.send('Could not run fetch query'); }); }); module.exports = SignupController;
Fix issue where users were not saving to the database.
Fix issue where users were not saving to the database. We use .fetchAll() rather than .fetch() to find all instances of a user. Added auto-timestamp functionality so all create and update times are automatically marked with no manual intervention needed.
JavaScript
mit
billpatrianakos/coverage-web,billpatrianakos/coverage-web,billpatrianakos/coverage-web
c9ee70bdc817e010bd00468bac99daf236035e2e
src/frontend/pages/Logout/index.js
src/frontend/pages/Logout/index.js
// @flow import * as React from 'react' import { Redirect } from 'react-router-dom' import performLogout from 'frontend/firebase/logout' class Logout extends React.Component<*> { componentDidMount() { performLogout() } render() { return <Redirect to="/" /> } } export default Logout
// @flow import * as React from 'react' import { connect } from 'react-redux' import { Redirect } from 'react-router-dom' import { USER_LOGGED_OUT } from 'frontend/actions/types' import performLogout from 'frontend/firebase/logout' type Props = { logout: Function } class Logout extends React.Component<Props> { componentDidMount() { performLogout() this.props.logout() } render() { return <Redirect to="/" /> } } const mapDispatchToProps = (dispatch: Function) => ({ logout: () => dispatch({ type: USER_LOGGED_OUT }) }) export default connect(null, mapDispatchToProps)(Logout)
Clear user login state in Redux on logout.
Clear user login state in Redux on logout.
JavaScript
mit
jsonnull/aleamancer,jsonnull/aleamancer
682c1bc6ec836f3a16543845444aafabafa788f9
lib/unexpectedExif.js
lib/unexpectedExif.js
/*global Uint8Array*/ var exifParser = require('exif-parser'), fs = require('fs'); module.exports = { name: 'unexpected-exif', version: require('../package.json').version, installInto: function (expect) { expect.installPlugin(require('magicpen-media')); expect.addAssertion(['string', 'Buffer'], 'to have (exif|EXIF) data satisfying', function (expect, subject, value) { var title, subjectUrl; if (typeof subject === 'string') { var matchDataUrl = subject.match(/^data:[^;]*;base64,(.*)$/); if (matchDataUrl) { subject = new Buffer(matchDataUrl[1], 'base64'); } else { title = subject; subjectUrl = subject; subject = fs.readFileSync(subject); } } else if (subject instanceof Uint8Array) { subject = new Buffer(subject); } this.subjectOutput = function () { this.image(subjectUrl || subject, { width: 10, height: 5, link: true, title: title }); }; var exifData = exifParser.create(subject).parse(); if (exifData && exifData.startMarker) { delete exifData.startMarker; } return expect(exifData, 'to satisfy', value); }); } };
/*global Uint8Array*/ var exifParser = require('exif-parser'), fs = require('fs'); module.exports = { name: 'unexpected-exif', version: require('../package.json').version, installInto: function (expect) { expect.installPlugin(require('magicpen-media')); expect.addAssertion('<string|Buffer> to have (exif|EXIF) data satisfying <any>', function (expect, subject, value) { var title, subjectUrl; if (typeof subject === 'string') { var matchDataUrl = subject.match(/^data:[^;]*;base64,(.*)$/); if (matchDataUrl) { subject = new Buffer(matchDataUrl[1], 'base64'); } else { title = subject; subjectUrl = subject; subject = fs.readFileSync(subject); } } else if (subject instanceof Uint8Array) { subject = new Buffer(subject); } this.subjectOutput = function () { this.image(subjectUrl || subject, { width: 10, height: 5, link: true, title: title }); }; var exifData = exifParser.create(subject).parse(); if (exifData && exifData.startMarker) { delete exifData.startMarker; } return expect(exifData, 'to satisfy', value); }); } };
Update to unexpected v10's addAssertion syntax .
Update to unexpected v10's addAssertion syntax [ci skip].
JavaScript
bsd-3-clause
unexpectedjs/unexpected-exif
5fc74d690fcf059940d7449bce11ec6b56b73eb2
lib/process-manager.js
lib/process-manager.js
/** @babel */ import childProcess from 'child_process' import kill from 'tree-kill' import { Disposable } from 'atom' export default class ProcessManager extends Disposable { processes = new Set() constructor () { super(() => this.killChildProcesses()) } executeChildProcess (command, options = {}) { const { allowKill, showError, ...execOptions } = options return new Promise(resolve => { // Windows does not like \$ appearing in command lines so only escape // if we need to. if (process.platform !== 'win32') command = command.replace('$', '\\$') const { pid } = childProcess.exec(command, execOptions, (error, stdout, stderr) => { if (allowKill) { this.processes.delete(pid) } if (error && showError) { latex.log.error(`An error occurred while trying to run "${command}" (${error.code}).`) } resolve({ statusCode: error ? error.code : 0, stdout, stderr }) }) if (allowKill) { this.processes.add(pid) } }) } killChildProcesses () { for (const pid of this.processes.values()) { kill(pid) } this.processes.clear() } }
/** @babel */ import childProcess from 'child_process' import kill from 'tree-kill' import { Disposable } from 'atom' export default class ProcessManager extends Disposable { processes = new Set() constructor () { super(() => this.killChildProcesses()) } executeChildProcess (command, options = {}) { const { allowKill, showError, ...execOptions } = options return new Promise(resolve => { // Windows does not like \$ appearing in command lines so only escape // if we need to. if (process.platform !== 'win32') command = command.replace('$', '\\$') const { pid } = childProcess.exec(command, execOptions, (error, stdout, stderr) => { if (allowKill) { this.processes.delete(pid) } if (error && showError && latex && latex.log) { latex.log.error(`An error occurred while trying to run "${command}" (${error.code}).`) } resolve({ statusCode: error ? error.code : 0, stdout, stderr }) }) if (allowKill) { this.processes.add(pid) } }) } killChildProcesses () { for (const pid of this.processes.values()) { kill(pid) } this.processes.clear() } }
Add guard to process error log
Add guard to process error log In case process is still running when package is disabled.
JavaScript
mit
thomasjo/atom-latex,thomasjo/atom-latex,thomasjo/atom-latex
754eafc1736174f00d9d7b1ceb8df1b20af66417
app/soc/content/js/templates/modules/gsoc/_survey.js
app/soc/content/js/templates/modules/gsoc/_survey.js
/* Copyright 2011 the Melange authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @author <a href="mailto:fadinlight@gmail.com">Mario Ferraro</a> */ (function() { var template_name = "survey"; melange.template[template_name] = function(_self, context) { }; melange.template[template_name].prototype = new melange.templates._baseTemplate(); melange.template[template_name].prototype.constructor = melange.template[template_name]; melange.template[template_name].apply( melange.template[template_name], [melange.template[template_name], melange.template[template_name].prototype.context] ); }());
/* Copyright 2011 the Melange authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @author <a href="mailto:fadinlight@gmail.com">Mario Ferraro</a> */ melange.templates.inherit( function (_self, context) { } );
Make the skeleton survey JS compatible with the new JS templates.
Make the skeleton survey JS compatible with the new JS templates.
JavaScript
apache-2.0
rhyolight/nupic.son,rhyolight/nupic.son,rhyolight/nupic.son
1e7ce40caa9255e40bfabfc8c9238cae159d562a
migrations/1_add_paths.js
migrations/1_add_paths.js
'use strict'; exports.up = function(knex, Promise) { return knex.schema. createTable('paths', function (t) { t.increments('id'); t.text('curator').notNullable(); t.text('curator_org'); t.specificType('collaborators', 'text[]'); t.text('name').notNullable(); t.text('description'); t.text('version').notNullable(); t.text('license'); t.text('image_url'); t.text('asset_urls'); t.text('keywords'); t.timestamp('created').notNullable().defaultTo(knex.raw('CURRENT_TIMESTAMP')); }); }; exports.down = function(knex, Promise) { return knex.schema.dropTableIfExists('paths'); };
'use strict'; exports.up = function(knex, Promise) { return knex.schema. createTable('paths', function (t) { t.increments('id'); t.text('curator').notNullable(); t.text('curator_org'); t.specificType('collaborators', 'text[]'); t.text('name').notNullable(); t.text('description'); t.text('version').notNullable(); t.text('license'); t.text('image_url'); t.specificType('asset_urls', 'text[]'); t.specificType('keywords', 'text[]'); t.timestamp('created').notNullable().defaultTo(knex.raw('CURRENT_TIMESTAMP')); }); }; exports.down = function(knex, Promise) { return knex.schema.dropTableIfExists('paths'); };
Update keyword and asset_url fields to accept arrays.
Update keyword and asset_url fields to accept arrays. Resolves #16
JavaScript
mit
coding-the-humanities/unacademic_backend,coding-the-humanities/unacademic_backend
2be619f254bf2794346c2482f16666b3670182ca
src/index.js
src/index.js
define([ "less!src/stylesheets/main.less" ], function() { var manager = new codebox.tabs.Manager(); // Add tabs to grid codebox.app.grid.addView(manager, { width: 20 }); // Render the tabs manager manager.render(); // Make the tab manager global codebox.panels = manager; });
define([ "less!src/stylesheets/main.less" ], function() { var manager = new codebox.tabs.Manager(); // Add tabs to grid codebox.app.grid.addView(manager, { width: 20, at: 0 }); // Render the tabs manager manager.render(); // Make the tab manager global codebox.panels = manager; });
Add at first position in grid
Add at first position in grid
JavaScript
apache-2.0
CodeboxIDE/package-panels,etopian/codebox-package-panels
2af8c1d2919d0cbe9dd92c28058d0bd199d08836
src/index.js
src/index.js
#!/usr/bin/env node var argv = process.argv.splice(2) var log = require('./helpers/log.js') var whitelist = ['build', 'run', 'test', 'lint', 'setup'] if (argv.length === 0 || argv[0] === 'help') { console.log('abc [command]\n\nCommands:') console.log(' build Compiles the source files from src/ into a build/ directory. ') console.log(' run src/file.js Runs a specified file.') console.log(' test Runs the test files in the tests/ directory.') console.log(' lint Checks if your code is consistent and follows best practices. ') console.log(' setup Creates the directories and files for the whole project to run.') console.log(' help This help page you are looking at!') process.exit(0) } if (whitelist.indexOf(argv[0]) === -1) { log.error('Command `' + argv[0] + '` does not exist') process.exit(1) } var callback = require('./' + argv[0] + '.js') callback.apply(null, argv.splice(1))
#!/usr/bin/env node var argv = process.argv.splice(2) var log = require('./helpers/log.js') var whitelist = ['build', 'run', 'test', 'lint', 'setup'] if (argv.length === 0 || argv[0] === 'help') { console.log('abc [command]') console.log('') console.log('Commands:') console.log(' setup Creates the directories and files for the whole project to run.') console.log(' build Compiles the source files from src/ into a build/ directory.') console.log(' test Runs the test files in the tests/ directory.') console.log(' lint Checks if your code is consistent and follows best practices.') console.log(' run src/file.js Runs a specified file.') console.log(' help This help page you are looking at!') process.exit(0) } if (whitelist.indexOf(argv[0]) === -1) { log.error('Command `' + argv[0] + '` does not exist') process.exit(1) } var callback = require('./' + argv[0] + '.js') callback.apply(null, argv.splice(1))
Remove whitespace & use same order as in readme
Remove whitespace & use same order as in readme
JavaScript
mit
queicherius/abc-environment,queicherius/abc-environment
b390a49f0ff94cb6944623e467383af4d0f436b7
src/index.js
src/index.js
module.exports = function mutableProxyFactory(defaultTarget) { let mutableHandler; let mutableTarget; function setTarget(target) { if (!(target instanceof Object)) { throw new Error(`Target "${target}" is not an object`); } mutableTarget = target; } function setHandler(handler) { Object.keys(handler).forEach(key => { const value = handler[key]; if (typeof value !== 'function') { throw new Error(`Trap "${key}: ${value}" is not a function`); } if (!Reflect[key]) { throw new Error(`Trap "${key}: ${value}" is not a valid trap`); } }); mutableHandler = handler; } if (defaultTarget) { setTarget(defaultTarget); } setHandler(Reflect); // Dynamically forward all the traps to the associated methods on the mutable handler const handler = new Proxy({}, { get(target, property) { return (...args) => { const patched = [mutableTarget].concat(...args.slice(1)); return mutableHandler[property].apply(null, patched); }; } }); return { setTarget, setHandler, getTarget() { return mutableTarget; }, getHandler() { return mutableHandler; }, proxy: new Proxy(() => {}, handler) }; };
module.exports = function mutableProxyFactory(defaultTarget) { let mutableHandler; let mutableTarget; function setTarget(target) { if (!(target instanceof Object)) { throw new Error(`Target "${target}" is not an object`); } mutableTarget = target; } function setHandler(handler) { Object.keys(handler).forEach(key => { const value = handler[key]; if (typeof value !== 'function') { throw new Error(`Trap "${key}: ${value}" is not a function`); } if (!Reflect[key]) { throw new Error(`Trap "${key}: ${value}" is not a valid trap`); } }); mutableHandler = handler; } if (defaultTarget) { setTarget(defaultTarget); } setHandler(Reflect); // Dynamically forward all the traps to the associated methods on the mutable handler const handler = new Proxy({}, { get(target, property) { return (...args) => mutableHandler[property].apply(null, [mutableTarget, ...args.slice(1)]); } }); return { setTarget, setHandler, getTarget() { return mutableTarget; }, getHandler() { return mutableHandler; }, proxy: new Proxy(() => {}, handler) }; };
Revert proxy handler change for coverage
Revert proxy handler change for coverage
JavaScript
mit
Griffingj/mutable-proxy
f215aeb4e0ff59d2028088349e965e6207f08228
mysite/ct/static/js/ct.js
mysite/ct/static/js/ct.js
function setInterest(targeturl, state, csrftoken) { $.post(targeturl, { csrfmiddlewaretoken:csrftoken, state:state }); } function toggleInterest(o, targeturl, csrftoken) { if (o.value == "1") { o.value="0"; } else { o.value="1"; } setInterest(targeturl, o.value, csrftoken); } $(document).ready(function(){ var GRADEABLE_SUB_KINDS = ['numbers', 'equation']; var elements = $("#div_id_number_max_value,#div_id_number_min_value,#div_id_number_precision,#div_id_enable_auto_grading"); var sub_kind_field = $('#id_sub_kind'); if ($.inArray($(sub_kind_field).val(), GRADEABLE_SUB_KINDS) == -1 ) { elements.hide(); } sub_kind_field.on('change', function(e){ // show and hide numbers related fields if ($.inArray($(this).val(), GRADEABLE_SUB_KINDS) != -1 ) { elements.show(); } else { elements.hide(); $("#id_enable_auto_grading").prop('checked', false); } }) });
function setInterest(targeturl, state, csrftoken) { $.post(targeturl, { csrfmiddlewaretoken:csrftoken, state:state }); } function toggleInterest(o, targeturl, csrftoken) { if (o.value == "1") { o.value="0"; } else { o.value="1"; } setInterest(targeturl, o.value, csrftoken); } $(document).ready(function(){ var GRADEABLE_SUB_KINDS = ['numbers', 'equation']; var number_elements = $("#div_id_number_max_value,#div_id_number_min_value,#div_id_number_value"); var grading_elements = $("#div_id_enable_auto_grading"); var sub_kind_field = $('#id_sub_kind'); if (sub_kind_field.val() !== 'numbers') { number_elements.hide(); } if ($.inArray(sub_kind_field.val(), GRADEABLE_SUB_KINDS) == -1 ) { grading_elements.hide(); } sub_kind_field.on('change', function(e){ // show and hide numbers related fields if ($.inArray($(this).val(), GRADEABLE_SUB_KINDS) != -1 ) { grading_elements.show(); } else { grading_elements.hide(); $("#id_enable_auto_grading").prop('checked', false); } }) });
Fix for nnumbers to show\hide fields
Fix for nnumbers to show\hide fields
JavaScript
apache-2.0
raccoongang/socraticqs2,raccoongang/socraticqs2,cjlee112/socraticqs2,raccoongang/socraticqs2,raccoongang/socraticqs2,cjlee112/socraticqs2,cjlee112/socraticqs2,cjlee112/socraticqs2
9002c6ea6bf1137afb67d2449e67d63c9cf83c3e
js/models/tag.js
js/models/tag.js
ds.models.tag = function(data) { "use strict"; var storage = {} , self = {} limivorous.observable(self, storage) .property(self, 'id', storage) .property(self, 'href', storage) .property(self, 'name', storage) .property(self, 'description', storage) .property(self, 'color', storage) .property(self, 'count', storage) Object.defineProperty(self, 'is_tag', {value: true}); if (data) { if (data.is_tag) { return data } else if (typeof data === 'string') { self.name = data } else { self.id = data.id self.href = data.href self.name = data.name self.description = data.description self.color = data.color self.count = data.count } } self.toJSON = function() { return { id: self.id, href: self.href, name: self.name, description: self.description, color: self.color, count: self.count } } return self }
ds.models.tag = function(data) { "use strict"; var storage = {} , self = {} limivorous.observable(self, storage) .property(self, 'id', storage) .property(self, 'href', storage) .property(self, 'name', storage) .property(self, 'description', storage) .property(self, 'color', storage) .property(self, 'count', storage) Object.defineProperty(self, 'is_tag', {value: true}); if (data) { if (data.is_tag) { return data } else if (typeof data === 'string') { self.name = data } else { self.id = data.id self.href = data.href self.name = data.name self.description = data.description self.color = data.color self.count = data.count } } self.toJSON = function() { var json = {} if (self.id) json.id = self.id if (self.href) json.href = self.href if (self.name) json.name = self.name if (self.description) json.description = self.description if (self.color) json.color = self.color if (self.count) json.count = self.count return json } return self }
Rewrite toJSON to eliminate null values
Rewrite toJSON to eliminate null values
JavaScript
apache-2.0
urbanairship/tessera,section-io/tessera,jmptrader/tessera,tessera-metrics/tessera,jmptrader/tessera,jmptrader/tessera,filippog/tessera,urbanairship/tessera,urbanairship/tessera,urbanairship/tessera,aalpern/tessera,filippog/tessera,tessera-metrics/tessera,filippog/tessera,section-io/tessera,jmptrader/tessera,section-io/tessera,Slach/tessera,aalpern/tessera,Slach/tessera,tessera-metrics/tessera,aalpern/tessera,aalpern/tessera,aalpern/tessera,urbanairship/tessera,Slach/tessera,Slach/tessera,tessera-metrics/tessera,tessera-metrics/tessera,section-io/tessera,jmptrader/tessera
2567834bb6ae44d6b2834a7d36709d97e166b790
lib/commands/lint.js
lib/commands/lint.js
'use strict' module.exports = function (dep) { let cmd = {} cmd.command = 'lint' cmd.desc = 'Run linters and fix possible code' cmd.handler = function (argv) { let { join, log, process, __rootdirname, gherkinLinter } = dep // Linters const configPath = join(__rootdirname, '/lib/sdk/cucumber/gherkin-lint-rules.json') const featureDirs = [join(process.cwd(), '/features/**/*.')] log.log('Checking files:', featureDirs.toString()) if (gherkinLinter.run(configPath, featureDirs) !== 0) { log.exit('There are errors to fix on the feature files') } else { log.log('All feature files look correct!') } } return cmd }
'use strict' module.exports = function (dep) { function validate () { let {validation, help} = dep if (!validation.isPatataRootDir()) { help.errorDueRootPath() } } let cmd = {} cmd.command = 'lint' cmd.desc = 'Run linters and fix possible code' cmd.handler = function (argv) { let { join, log, process, __rootdirname, gherkinLinter } = dep validate() // Linters const configPath = join(__rootdirname, '/lib/sdk/cucumber/gherkin-lint-rules.json') const featureDirs = [join(process.cwd(), '/features/**/*.')] log.log('Checking files:', featureDirs.toString()) if (gherkinLinter.run(configPath, featureDirs) !== 0) { log.exit('There are errors to fix on the feature files') } else { log.log('All feature files look correct!') } } return cmd }
Fix bug checking root of project.
Linter: Fix bug checking root of project.
JavaScript
mit
eridem/patata,appersonlabs/patata
6578d26b06121f1e1e87fea267d1e6696b1ddb34
js/scrollback.js
js/scrollback.js
document.addEventListener("wheel", function(e) { if (e.shiftKey && e.deltaX != 0) { window.history.go(-Math.sign(e.deltaX)); return e.preventDefault(); } });
document.addEventListener("wheel", function(e) { if (e.shiftKey && (e.deltaX != 0 || e.deltaY != 0)) { window.history.go(-Math.sign(e.deltaX ? e.deltaX : e.deltaY)); return e.preventDefault(); } });
Fix a problem of deltaX and deltaY
Fix a problem of deltaX and deltaY Signed-off-by: Dongyun Jin <25d657a5cae33e06b1c3348113f358ba8b6c833f@gmail.com>
JavaScript
mit
jezcope/chrome-scroll-back
70785353a9526b56a11f71df0f6f8d40591aeaa4
api/controllers/requests.js
api/controllers/requests.js
var OwerRequestModel = require('../models/requests/owerRequest.js') , error = require('../utils/error.js'); var allOwerRequests = function(req, res) { var facebookId = req.user.facebookId , type = req.query.type; if (type) { if (type === 'received') { conditions.to = facebookId; } else if (type === 'sent') { conditions.from = facebookId; } else { return error.badRequest(res, 'Invalid parameter: type must be either "received" or "sent"'); } } OwerRequestModel.findAsync(conditions) .then(function(owerRequests) { res.json(owerRequests); }) .catch(error.serverHandler(res)); }; exports.owers = { all: allOwerRequests };
var OwerRequestModel = require('../models/requests/owerRequest.js') , error = require('../utils/error.js'); var allOwerRequests = function(req, res) { var type = req.query.type; var facebookId; if (req.user && req.user.facebookId) { facebookId = req.user.facebookId; } if (type && facebookId) { if (type === 'received') { conditions.to = facebookId; } else if (type === 'sent') { conditions.from = facebookId; } else { return error.badRequest(res, 'Invalid parameter: type must be either "received" or "sent"'); } } OwerRequestModel.findAsync(conditions) .then(function(owerRequests) { res.json(owerRequests); }) .catch(error.serverHandler(res)); }; exports.owers = { all: allOwerRequests };
Fix admin not being able to access reqs
Fix admin not being able to access reqs
JavaScript
mit
justinsacbibit/omi,justinsacbibit/omi,justinsacbibit/omi
347ec3d58a8d30303575d8ac7e5d6bf2ba47dfc6
test/unit.js
test/unit.js
describe('skatejs-web-components', () => { });
import '../src/index'; describe('skatejs-web-components', () => { it('should create a custom element with a shadow root', () => { const Elem = class extends HTMLElement { constructor() { super(); this.attachShadow({ mode: 'open' }); } }; window.customElements.define('x-test', Elem); const elem = new Elem(); expect(!!elem.shadowRoot).to.equal(true); }); });
Add test that ensures all V1 APIs exist when the library is imported.
test: Add test that ensures all V1 APIs exist when the library is imported.
JavaScript
mit
skatejs/web-components
86c36fd831a8cacd988ce1b56288200960dd84c1
src/OData.js
src/OData.js
import React, { Component } from 'react'; import Fetch, { renderChildren } from 'react-fetch-component'; import buildQuery from 'odata-query'; function buildUrl(baseUrl, query) { return query !== false && baseUrl + buildQuery(query); } class OData extends Component { render() { const { baseUrl, query, children, ...rest } = this.props; const url = buildUrl(baseUrl, query); return ( <Fetch url={url} {...rest}> {({ fetch, ...props }) => { return renderChildren(children, { ...props, fetch: (query, options, updateOptions) => fetch( buildUrl(baseUrl, query || this.props.query), options || this.props.options, updateOptions ) }); }} </Fetch> ); } } export { buildQuery, renderChildren }; export default OData;
import React, { Component } from 'react'; import Fetch, { renderChildren } from 'react-fetch-component'; import buildQuery from 'odata-query'; function buildUrl(baseUrl, query) { return query !== false && baseUrl + buildQuery(query); } class OData extends Component { render() { const { baseUrl, query = {}, ...rest } = this.props; return ( <Fetch url={query} fetchFunction={(query, options, updateOptions) => { const url = buildUrl(baseUrl, query); return fetch(url, options, updateOptions); }} {...rest} /> ); } } export { buildQuery, renderChildren }; export default OData;
Use fetchFunction instead of currying functions
Use fetchFunction instead of currying functions
JavaScript
mit
techniq/react-odata
29c1630e2c6597bd5ab9e923ffb0e091f0934bb8
test/bitgo.js
test/bitgo.js
// // Tests for BitGo Object // // Copyright 2014, BitGo, Inc. All Rights Reserved. // var assert = require('assert'); var should = require('should'); var BitGoJS = require('../src/index'); describe('BitGo', function() { describe('methods', function() { it('includes version', function() { var bitgo = new BitGoJS.BitGo(); bitgo.should.have.property('version'); var version = bitgo.version(); assert.equal(typeof(version), 'string'); }); it('includes market', function(done) { var bitgo = new BitGoJS.BitGo(); bitgo.should.have.property('market'); bitgo.market(function(marketData) { marketData.should.have.property('last'); marketData.should.have.property('bid'); marketData.should.have.property('ask'); marketData.should.have.property('volume'); marketData.should.have.property('high'); marketData.should.have.property('low'); done(); }); }); }); });
// // Tests for BitGo Object // // Copyright 2014, BitGo, Inc. All Rights Reserved. // var assert = require('assert'); var should = require('should'); var BitGoJS = require('../src/index'); describe('BitGo', function() { describe('methods', function() { it('includes version', function() { var bitgo = new BitGoJS.BitGo(); bitgo.should.have.property('version'); var version = bitgo.version(); assert.equal(typeof(version), 'string'); }); it('includes market', function(done) { var bitgo = new BitGoJS.BitGo(); bitgo.should.have.property('market'); bitgo.market(function(marketData) { marketData.should.have.property('last'); marketData.should.have.property('bid'); marketData.should.have.property('ask'); marketData.should.have.property('volume'); marketData.should.have.property('high'); marketData.should.have.property('low'); marketData.should.have.property('updateTime'); done(); }); }); }); });
Add updateTime check to test.
Add updateTime check to test.
JavaScript
apache-2.0
BitGo/BitGoJS,BitGo/BitGoJS,BitGo/BitGoJS,BitGo/BitGoJS
1eaf541f9c88d135ddb5bf6828937a4e6505f688
test/index.js
test/index.js
'use strict'; /* global describe it */ var assert = require('assert'); var flattenObjectStrict = require('../lib'); describe('flatten-object-strict', function() { it('an empty object produces an empty object', function() { assert.deepEqual(flattenObjectStrict({}), {}); }); });
'use strict'; /* global describe it */ var assert = require('assert'); var flattenObjectStrict = require('../lib'); describe('flatten-object-strict', function() { it('an empty object produces an empty object', function() { assert.deepEqual(flattenObjectStrict({}), {}); }); it('a object that\'s already flat doesn\'t change', function() { [ { a: 'a', b: [1, 2, 3], c: function() {} }, { foo: 'bar', baz: 'boom' }, { one: 'one', two: 'two', three: 'three', four: 'four', five: 'five' } ].forEach(function(flatObject) { assert.deepEqual(flattenObjectStrict(flatObject), flatObject); }); }); });
Add test for flat objects
Add test for flat objects
JavaScript
mit
voltrevo/flatten-object-strict
df8210287256f88244996a4a905c3be2197829bf
aura-impl/src/main/resources/aura/model/Model.js
aura-impl/src/main/resources/aura/model/Model.js
/* * Copyright (C) 2012 salesforce.com, inc. * * 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 applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /*jslint sub: true */ /** * @namespace Creates a Model instance. * @constructor * @param {Object} def * @param {Object} data * @param {Component} component * @returns {Function} */ function Model(def, data, component){ /** BEGIN HACK--MUST BE REMOVED **/ if (def.getDescriptor().getQualifiedName() === "java://ui.aura.components.forceProto.FilterListModel") { for (var i in data["rowTemplate"]) { data["rowTemplate"][i] = new SimpleValue(data["rowTemplate"][i], def, component); } } if (def.getDescriptor().getQualifiedName() === "java://org.auraframework.component.ui.DataTableModel") { for (var j in data["itemTemplate"]) { data["itemTemplate"][j] = new SimpleValue(data["itemTemplate"][j], def, component); } } /** END HACK**/ return new MapValue(data, def, component); }
/* * Copyright (C) 2012 salesforce.com, inc. * * 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 applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /*jslint sub: true */ /** * @namespace Creates a Model instance. * @constructor * @param {Object} def * @param {Object} data * @param {Component} component * @returns {Function} */ function Model(def, data, component){ return new MapValue(data, def, component); }
Remove model hack--no longer needed for lists
Remove model hack--no longer needed for lists
JavaScript
apache-2.0
lhong375/aura,badlogicmanpreet/aura,DebalinaDey/AuraDevelopDeb,navyliu/aura,madmax983/aura,forcedotcom/aura,lhong375/aura,forcedotcom/aura,TribeMedia/aura,DebalinaDey/AuraDevelopDeb,badlogicmanpreet/aura,TribeMedia/aura,igor-sfdc/aura,DebalinaDey/AuraDevelopDeb,TribeMedia/aura,lcnbala/aura,SalesforceSFDC/aura,madmax983/aura,SalesforceSFDC/aura,badlogicmanpreet/aura,madmax983/aura,DebalinaDey/AuraDevelopDeb,madmax983/aura,SalesforceSFDC/aura,igor-sfdc/aura,SalesforceSFDC/aura,badlogicmanpreet/aura,igor-sfdc/aura,TribeMedia/aura,forcedotcom/aura,badlogicmanpreet/aura,navyliu/aura,madmax983/aura,navyliu/aura,lhong375/aura,navyliu/aura,lcnbala/aura,DebalinaDey/AuraDevelopDeb,igor-sfdc/aura,lcnbala/aura,SalesforceSFDC/aura,forcedotcom/aura,badlogicmanpreet/aura,navyliu/aura,DebalinaDey/AuraDevelopDeb,SalesforceSFDC/aura,madmax983/aura,lcnbala/aura,TribeMedia/aura,lcnbala/aura,navyliu/aura,TribeMedia/aura,lcnbala/aura,igor-sfdc/aura,lhong375/aura,forcedotcom/aura
a864bc226ec204bc2083e2abd98a4493afa2da04
karma.component.config.js
karma.component.config.js
module.exports = function(config) { config.set({ basePath: process.env['INIT_CWD'], frameworks: ['mocha', 'chai', 'karma-typescript', 'sinon'], browsers: ['ChromeHeadless', 'FirefoxHeadless'], files: [ './node_modules/@webcomponents/webcomponentsjs/webcomponents-sd-ce.js', { pattern: 'dist/*.bundled.js' }, { pattern: 'test/*.test.ts' }, { pattern: 'test/**/*.json', watched: true, served: true, included: false }, ], reporters: ['progress', 'karma-typescript'], singleRun: true, port: 9876, colors: true, logLevel: config.LOG_INFO, autoWatch: false, concurrency: Infinity, preprocessors: { '**/*.ts': ['karma-typescript'], }, karmaTypescriptConfig: { compilerOptions: { target: 'es2015', }, bundlerOptions: { transforms: [require('karma-typescript-es6-transform')({ presets: 'env' })], }, }, }); }
module.exports = function(config) { config.set({ basePath: process.env['INIT_CWD'], frameworks: ['mocha', 'chai', 'karma-typescript', 'sinon'], browsers: ['ChromeHeadless'], files: [ './node_modules/@webcomponents/webcomponentsjs/webcomponents-sd-ce.js', { pattern: 'dist/*.bundled.js' }, { pattern: 'test/*.test.ts' }, { pattern: 'test/**/*.json', watched: true, served: true, included: false }, ], reporters: ['progress', 'karma-typescript'], singleRun: true, port: 9876, colors: true, logLevel: config.LOG_INFO, autoWatch: false, concurrency: Infinity, preprocessors: { '**/*.ts': ['karma-typescript'], }, karmaTypescriptConfig: { compilerOptions: { target: 'es2015', }, bundlerOptions: { transforms: [require('karma-typescript-es6-transform')({ presets: 'env' })], }, }, }); }
Disable Firefox until their ShadowDOM is in place
Disable Firefox until their ShadowDOM is in place
JavaScript
mit
abraham/nutmeg-cli,abraham/nutmeg-cli,abraham/nutmeg-cli
d48b188b3ebe03ccbe9dfd57bb267261de962178
samples/VanillaJSTestApp2.0/app/b2c/authConfig.js
samples/VanillaJSTestApp2.0/app/b2c/authConfig.js
// Config object to be passed to Msal on creation const msalConfig = { auth: { clientId: "e3b9ad76-9763-4827-b088-80c7a7888f79", authority: "https://login.microsoftonline.com/tfp/msidlabb2c.onmicrosoft.com/B2C_1_SISOPolicy/", knownAuthorities: ["login.microsoftonline.com"] }, cache: { cacheLocation: "localStorage", // This configures where your cache will be stored storeAuthStateInCookie: false, // Set this to "true" if you are having issues on IE11 or Edge }, system: { telemetry: { applicationName: 'msalVanillaTestApp', applicationVersion: 'test1.0', telemetryEmitter: (events) => { console.log("Telemetry Events", events); } } } }; // Add here scopes for id token to be used at MS Identity Platform endpoints. const loginRequest = { scopes: ["https://msidlabb2c.onmicrosoft.com/msidlabb2capi/read"], forceRefresh: false // Set this to "true" to skip a cached token and go to the server to get a new token };
// Config object to be passed to Msal on creation const msalConfig = { auth: { clientId: "e3b9ad76-9763-4827-b088-80c7a7888f79", authority: "https://login.microsoftonline.com/tfp/msidlabb2c.onmicrosoft.com/B2C_1_SISOPolicy/", knownAuthorities: ["login.microsoftonline.com"] }, cache: { cacheLocation: "localStorage", // This configures where your cache will be stored storeAuthStateInCookie: false, // Set this to "true" if you are having issues on IE11 or Edge } }; // Add here scopes for id token to be used at MS Identity Platform endpoints. const loginRequest = { scopes: ["https://msidlabb2c.onmicrosoft.com/msidlabb2capi/read"], forceRefresh: false // Set this to "true" to skip a cached token and go to the server to get a new token };
Remove telemetry config from 2.0 sample
Remove telemetry config from 2.0 sample
JavaScript
mit
AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js
5ea58b636d98ef0bb9294c241ee588d2a065c551
scripts/postinstall.js
scripts/postinstall.js
require("es6-shim"); var exec = require("child_process").exec; var os = require("os"); var useMraa = (function() { var release = os.release(); return release.includes("yocto") || release.includes("edison"); })(); if (useMraa) { exec("npm install mraa@0.6.1-36-gbe4312e"); }
require("es6-shim"); var exec = require("child_process").exec; var os = require("os"); var useMraa = (function() { var release = os.release(); return release.includes("yocto") || release.includes("edison"); })(); var safeBuild = "0.6.1+git0+805d22f0b1-r0"; var safeVersion = "0.6.1-36-gbe4312e"; if (useMraa) { console.log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); console.log(" Do not quit the program until npm completes the installation process. "); console.log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); exec("opkg info libmraa0", function(error, stdout, stderr) { if (!stdout.includes(safeBuild)) { console.log(""); console.log(" Galileo-IO needs to install a trusted version of libmraa0."); console.log(" This process takes approximately one minute."); console.log(" Thanks for your patience."); exec("npm install mraa@" + safeVersion, function() { console.log(" Completed!"); console.log(""); }); } }); }
Check for safe version of libmraa0 before installing own copy.
Check for safe version of libmraa0 before installing own copy. - Displays information during postinstall to help user understand the process
JavaScript
mit
ashishdatta/galileo-io,kimathijs/galileo-io,julianduque/galileo-io,vj-ug/galileo-io,rwaldron/galileo-io
2042a3e49ee1e3ab461f79acd488d34b2d5ec219
editor/js/Menubar.Status.js
editor/js/Menubar.Status.js
/** * @author mrdoob / http://mrdoob.com/ */ Menubar.Status = function ( editor ) { var container = new UI.Panel(); container.setClass( 'menu right' ); var checkbox = new UI.Checkbox( editor.config.getKey( 'autosave' ) ); checkbox.onChange( function () { editor.config.setKey( 'autosave', this.getValue() ); } ); container.add( checkbox ); var title = new UI.Panel(); title.setClass( 'title' ); title.setTextContent( 'Autosave' ); container.add( title ); editor.signals.savingStarted.add( function () { title.setTextDecoration( 'underline' ); } ); editor.signals.savingFinished.add( function () { title.setTextDecoration( 'none' ); } ); return container; };
/** * @author mrdoob / http://mrdoob.com/ */ Menubar.Status = function ( editor ) { var container = new UI.Panel(); container.setClass( 'menu right' ); var checkbox = new UI.Checkbox( editor.config.getKey( 'autosave' ) ); checkbox.onChange( function () { var value = this.getValue(); editor.config.setKey( 'autosave', value ); if ( value === true ) { editor.signals.sceneGraphChanged.dispatch(); } } ); container.add( checkbox ); var title = new UI.Panel(); title.setClass( 'title' ); title.setTextContent( 'Autosave' ); container.add( title ); editor.signals.savingStarted.add( function () { title.setTextDecoration( 'underline' ); } ); editor.signals.savingFinished.add( function () { title.setTextDecoration( 'none' ); } ); return container; };
Save scene when enabling autosave.
Editor: Save scene when enabling autosave.
JavaScript
mit
srifqi/three.js,NicolasRannou/three.js,colombod/three.js,dhritzkiv/three.js,Zerschmetterling91/three.js,matgr1/three.js,njam/three.js,aardgoose/three.js,tamarintech/three.js,dushmis/three.js,stevenliujw/three.js,WoodMath/three.js,hacksalot/three.js,davidvmckay/three.js,ZhenxingWu/three.js,fta2012/three.js,AntTech/three.js,tdmsinc/three.js,takahirox/three.js,satori99/three.js,rlugojr/three.js,tamarintech/three.js,amakaroff82/three.js,Jonham/three.js,Seagat2011/three.js,elisee/three.js,rgaino/three.js,threejsworker/three.js,TristanVALCKE/three.js,sasha240100/three.js,elephantatwork/ZAAK.IO-EditorInternal,elisee/three.js,toxicFork/three.js,NicolasRannou/three.js,Samsy/three.js,elephantatwork/three.js,ondys/three.js,liusashmily/three.js,gsssrao/three.js,Aldrien-/three.js,robmyers/three.js,controlzee/three.js,toxicFork/three.js,godlzr/Three.js,eq0rip/three.js,stanford-gfx/three.js,matgr1/three.js,brianchirls/three.js,tdmsinc/three.js,byhj/three.js,pailhead/three.js,amazg/three.js,mese79/three.js,0merta/three.js,dhritzkiv/three.js,meizhoubao/three.js,mrdoob/three.js,Nitrillo/three.js,coderrick/three.js,vizorvr/three.js,DeanLym/three.js,unconed/three.js,MasterJames/three.js,JingYongWang/three.js,dimensia/three.js,p5150j/three.js,fomenyesu/three.js,rbarraud/three.js,jango2015/three.js,ZAAK-ZURICHBERLIN/ZAAK.IO-Editor,eq0rip/three.js,mese79/three.js,datalink747/three.js,huobaowangxi/three.js,pletzer/three.js,SatoshiKawabata/three.js,rbarraud/three.js,gdebojyoti/three.js,coffeine-009/three.js,lovewitty/three.js,mattholl/three.js,SET001/three.js,beni55/three.js,Joeldk/three.js,cc272309126/three.js,Liuer/three.js,carlosanunes/three.js,benaadams/three.js,coderrick/three.js,VimVincent/three.js,redheli/three.js,JeckoHeroOrg/three.js,Astrak/three.js,ducminhn/three.js,ngokevin/three.js,podgorskiy/three.js,lchl7890987/WebGL,swieder227/three.js,flimshaw/three.js,vizorvr/three.js,sasha240100/three.js,Stinkdigital/three.js,srifqi/three.js,easz/three.js,Astrak/three.js,missingdays/three.js-amd,lovewitty/three.js,surround-io/three.js,GammaGammaRay/three.js,blokhin/three.js,alexbelyeu/three.js,satori99/three.js,toxicFork/three.js,jpweeks/three.js,holmberd/three.js,Black-Alpha/three.js,mattholl/three.js,dubejf/three.js,sreith1/three.js,brickify/three.js,jayschwa/three.js,eq0rip/three.js,Samsung-Blue/three.js,Gheehnest/three.js,MasterJames/three.js,jzitelli/three.js,Gheehnest/three.js,benaadams/three.js,SatoshiKawabata/three.js,Gheehnest/three.js,jeromeetienne/three.js,snovak/three.js,rfm1201/rfm.three.js,dubejf/three.js,YajunQiu/three.js,humbletim/three.js,Fox32/three.js,spite/three.js,arodic/three.js,AlexanderMazaletskiy/three.js,takahirox/three.js,wuxinwei240/three.js,sttz/three.js,sufeiou/three.js,kkjeer/three.js,gigakiller/three.js,opensim-org/three.js,arodic/three.js,arodic/three.js,Delejnr/three.js,MetaStackers/three.js,liammagee/three.js,donmccurdy/three.js,blokhin/three.js,redheli/three.js,JeckoHeroOrg/three.js,quinonez/three.js,lag945/three.js,anvaka/three.js,AdactiveSAS/three.js,fernandojsg/three.js,Ludobaka/three.js,camellhf/three.js,VimVincent/three.js,quinonez/three.js,Nitrillo/three.js,AltspaceVR/three.js,camellhf/three.js,Hectate/three.js,DelvarWorld/three.js,jeromeetienne/three.js,hedgerh/three.js,agnivade/three.js,thomasxu1991/three.js,ngokevin/three.js,ngokevin/three.js,xundaokeji/three.js,BenediktS/three.js,Kakakakakku/three.js,yxxme/three.js,BrianSipple/three.js,jayschwa/three.js,bdysvik/three.js,ma-tech/three.js,timcastelijn/three.js,mese79/three.js,coloringchaos/three.js,MarcusLongmuir/three.js,erich666/three.js,tschw/three.js,JuudeDemos/three.js,Leeft/three.js,Samsung-Blue/three.js,IceCreamYou/three.js,gpranay4/three.js,erich666/three.js,matgr1/three.js,shanmugamss/three.js-modified,fkammer/three.js,wuxinwei240/three.js,archilogic-ch/three.js,mainelander/three.js,matthartman/oculus-matt,borismus/three.js,AltspaceVR/three.js,Fox32/three.js,jllodra/three.js,Aldrien-/three.js,BenediktS/three.js,Ymaril/three.js,ZhenxingWu/three.js,gigakiller/three.js,dubejf/three.js,dhritzkiv/three.js,camellhf/three.js,alexconlin/three.js,redheli/three.js,nhalloran/three.js,DelvarWorld/three.js,leitzler/three.js,rgaino/three.js,unphased/three.js,Amritesh/three.js,JeckoHeroOrg/three.js,brianchirls/three.js,lchl7890987/WebGL,Kasual666/WebGl,pailhead/three.js,mainelander/three.js,HongJunLi/three.js,sweetmandm/three.js,StefanHuzz/three.js,g-rocket/three.js,vizorvr/three.js,tdmsinc/three.js,kkjeer/three.js,RAtechntukan/three.js,surround-io/three.js,daoshengmu/three.js,mabo77/three.js,nraynaud/three.js,programulya/three.js,111t8e/three.js,mabo77/three.js,elisee/three.js,lchl7890987/WebGL,richtr/three.js,coderrick/three.js,supergometan/three.js,wuxinwei240/three.js,prika/three.js,elephantatwork/three.js,mess110/three.js,dushmis/three.js,digital360/three.js,QingchaoHu/three.js,mainelander/three.js,luxigo/three.js,wanby/three.js,JeckoHeroOrg/three.js,sunbc0120/three.js,NicolasRannou/three.js,sherousee/three.js,chuckfairy/three.js,anvaka/three.js,aleen42/three.js,fkammer/three.js,godlzr/Three.js,plepers/three.js,mhoangvslev/data-visualizer,rayantony/three.js,StefanHuzz/three.js,dglogik/three.js,wizztjh/three.js,carlosanunes/three.js,acrsteiner/three.js,gero3/three.js,edge/three.js,ZAAK-ZURICHBERLIN/ZAAK.IO-Editor,leitzler/three.js,anvaka/three.js,nraynaud/three.js,ValtoLibraries/ThreeJS,mindofmatthew/three.js,gpranay4/three.js,mhoangvslev/data-visualizer,gpranay4/three.js,ngokevin/three-dev,unphased/three.js,yrns/three.js,Jozain/three.js,mataron/three.js,nopjia/three.js,liusashmily/three.js,rlugojr/three.js,elephantatwork/three.js,DeanLym/three.js,HongJunLi/three.js,TristanVALCKE/three.js,rlugojr/three.js,GammaGammaRay/three.js,brickify/three.js,leeric92/three.js,q437634645/three.js,pletzer/three.js,Seagat2011/three.js,rougier/three.js,ZAAK-ZURICHBERLIN/ZAAK.IO-Editor,ThiagoGarciaAlves/three.js,rlugojr/three.js,swieder227/three.js,VimVincent/three.js,RAtechntukan/three.js,Wilt/three.js,rougier/three.js,mataron/three.js,jayhetee/three.js,RemusMar/three.js,StefanHuzz/three.js,Delejnr/three.js,huobaowangxi/three.js,richtr/three.js,Nitrillo/three.js,beni55/three.js,archcomet/three.js,GammaGammaRay/three.js,holmberd/three.js,jayschwa/three.js,Black-Alpha/three.js,mese79/three.js,stevenliujw/three.js,agnivade/three.js,SatoshiKawabata/three.js,takahirox/three.js,rfm1201/rfm.three.js,Joeldk/three.js,Zerschmetterling91/three.js,Itee/three.js,erich666/three.js,stevenliujw/three.js,coffeine-009/three.js,ZAAK-ZURICHBERLIN/ZAAK.IO-Editor,elephantatwork/ZAAK.IO-EditorInternal,prabhu-k/three.js,LaughingSun/three.js,unconed/three.js,rougier/three.js,gigakiller/three.js,Seagat2011/three.js,RAtechntukan/three.js,wuxinwei240/three.js,0merta/three.js,AdactiveSAS/three.js,hacksalot/three.js,Jericho25/three.js,lollerbus/three.js,Stinkdigital/three.js,programulya/three.js,WoodMath/three.js,Astrak/three.js,ValtoLibraries/ThreeJS,Jonham/three.js,julapy/three.js,sitexa/three.js,carlosanunes/three.js,ZhenxingWu/three.js,wavesoft/three.js,wanby/three.js,Wilt/three.js,liammagee/three.js,takahirox/three.js,Zerschmetterling91/three.js,JuudeDemos/three.js,masterex1000/three.js,dhritzkiv/three.js,lchl7890987/WebGL,podgorskiy/three.js,AltspaceVR/three.js,GGAlanSmithee/three.js,sufeiou/three.js,AVGP/three.js,gwindes/three.js,YajunQiu/three.js,archilogic-com/three.js,simonThiele/three.js,podgorskiy/three.js,mrkev/three.js,YajunQiu/three.js,jeromeetienne/three.js,applexiaohao/three.js,matthiascy/three.js,sreith1/three.js,jostschmithals/three.js,coffeine-009/three.js,TristanVALCKE/three.js,Delejnr/three.js,Jonham/three.js,jayschwa/three.js,AltspaceVR/three.js,fta2012/three.js,zhanglingkang/three.js,jzitelli/three.js,Jerdak/three.js,VimVincent/three.js,sebasbaumh/three.js,Meshu/three.js,datalink747/three.js,mattdesl/three.js,UnboundVR/three.js,NicolasRannou/three.js,mudithkr/three.js,alexbelyeu/three.js,SpookW/three.js,fraguada/three.js,Jerdak/three.js,brason/three.js,richtr/three.js,mattdesl/three.js,JingYongWang/three.js,fta2012/three.js,julapy/three.js,dyx/three.js,stanford-gfx/three.js,timcastelijn/three.js,thomasxu1991/three.js,dimensia/three.js,dyx/three.js,robmyers/three.js,DeanLym/three.js,lag945/three.js,robsix/3ditor,haozi23333/three.js,borismus/three.js,Amritesh/three.js,AntTech/three.js,rayantony/three.js,prabhu-k/three.js,fernandojsg/three.js,chaoallsome/three.js,Leeft/three.js,JamesHagerman/three.js,haozi23333/three.js,RAtechntukan/three.js,nopjia/three.js,SpinVR/three.js,AscensionFoundation/three.js,matthartman/oculus-matt,freekh/three.js,jostschmithals/three.js,supergometan/three.js,zhangwenyan/three.js,ndebeiss/three.js,AlexanderMazaletskiy/three.js,wizztjh/three.js,jayhetee/three.js,prika/three.js,amakaroff82/three.js,Jericho25/three.js,yifanhunyc/three.js,erich666/three.js,stevenliujw/three.js,brickify/three.js,jllodra/three.js,coloringchaos/three.js,SET001/three.js,Peekmo/three.js,SatoshiKawabata/three.js,lollerbus/three.js,jeffgoku/three.js,pharos3d/three.js,applexiaohao/three.js,dayo7116/three.js,Black-Alpha/three.js,crazyyaoyao/yaoyao,Zerschmetterling91/three.js,coffeine-009/three.js,leeric92/three.js,WoodMath/three.js,gwindes/three.js,matthiascy/three.js,Delejnr/three.js,JingYongWang/three.js,AlexanderMazaletskiy/three.js,sweetmandm/three.js,freekh/three.js,Coburn37/three.js,arodic/three.js,StefanHuzz/three.js,srifqi/three.js,jee7/three.js,unphased/three.js,MasterJames/three.js,ngokevin/three.js,byhj/three.js,edge/three.js,Joeldk/three.js,Wilt/three.js,GammaGammaRay/three.js,zbm2001/three.js,gwindes/three.js,Kasual666/WebGl,yifanhunyc/three.js,kaisalmen/three.js,NicolasRannou/three.js,holmberd/three.js,tamarintech/three.js,AntTech/three.js,amazg/three.js,spite/three.js,unconed/three.js,DelvarWorld/three.js,BrianSipple/three.js,dushmis/three.js,SET001/three.js,Samsung-Blue/three.js,Peekmo/three.js,MarcusLongmuir/three.js,UnboundVR/three.js,masterex1000/three.js,ondys/three.js,GastonBeaucage/three.js,vizorvr/three.js,TristanVALCKE/three.js,JamesHagerman/three.js,wanby/three.js,mess110/three.js,chaoallsome/three.js,AlexanderMazaletskiy/three.js,xundaokeji/three.js,shanmugamss/three.js-modified,YajunQiu/three.js,ilovezy/three.js,ValtoLibraries/ThreeJS,dforrer/three.js,arodic/three.js,AscensionFoundation/three.js,mkkellogg/three.js,spite/three.js,Jozain/three.js,Mohammed-Ashour/three.js,RemusMar/three.js,threejsworker/three.js,jllodra/three.js,sebasbaumh/three.js,GGAlanSmithee/three.js,ilovezy/three.js,fanzhanggoogle/three.js,rbarraud/three.js,zhanglingkang/three.js,applexiaohao/three.js,timcastelijn/three.js,humbletim/three.js,Wilt/three.js,Pro/three.js,alexconlin/three.js,stopyransky/three.js,colombod/three.js,zbm2001/three.js,snipermiller/three.js,erich666/three.js,pharos3d/three.js,simonThiele/three.js,Coburn37/three.js,GammaGammaRay/three.js,gsssrao/three.js,toguri/three.js,prika/three.js,lovewitty/three.js,Ludobaka/three.js,Leeft/three.js,RemusMar/three.js,gdebojyoti/three.js,ndebeiss/three.js,byhj/three.js,ZAAK-ZURICHBERLIN/ZAAK.IO-Editor,pletzer/three.js,Ludobaka/three.js,jango2015/three.js,Astrak/three.js,Black-Alpha/three.js,googlecreativelab/three.js,zodsoft/three.js,mkkellogg/three.js,sheafferusa/three.js,Kasual666/WebGl,Mohammed-Ashour/three.js,GGAlanSmithee/three.js,meizhoubao/three.js,rougier/three.js,SpookW/three.js,GGAlanSmithee/three.js,zhangwenyan/three.js,SpookW/three.js,WestLangley/three.js,Hectate/three.js,xundaokeji/three.js,wanby/three.js,liammagee/three.js,JeckoHeroOrg/three.js,jeffgoku/three.js,alienity/three.js,nadirhamid/three.js,sitexa/three.js,gveltri/three.js,nopjia/three.js,Itee/three.js,thomasxu1991/three.js,MetaStackers/three.js,matgr1/three.js,yrns/three.js,q437634645/three.js,nraynaud/three.js,makc/three.js.fork,GastonBeaucage/three.js,sufeiou/three.js,dyx/three.js,YajunQiu/three.js,surround-io/three.js,snipermiller/three.js,redheli/three.js,JamesHagerman/three.js,Wilt/three.js,unphased/three.js,anvaka/three.js,srifqi/three.js,jayschwa/three.js,brason/three.js,coffeine-009/three.js,mess110/three.js,amakaroff82/three.js,archilogic-com/three.js,fkammer/three.js,sufeiou/three.js,cadenasgmbh/three.js,mess110/three.js,Joeldk/three.js,hedgerh/three.js,bhouston/three.js,julapy/three.js,dushmis/three.js,missingdays/three.js-amd,ngokevin/three.js,Seagat2011/three.js,datalink747/three.js,tschw/three.js,framelab/three.js,r8o8s1e0/three.js,Samsy/three.js,gveltri/three.js,gdebojyoti/three.js,plepers/three.js,godlzr/Three.js,podgorskiy/three.js,beni55/three.js,WoodMath/three.js,zodsoft/three.js,gwindes/three.js,aleen42/three.js,Leeft/three.js,imshibaji/three.js,ondys/three.js,zhoushijie163/three.js,programulya/three.js,dubejf/three.js,googlecreativelab/three.js,hsimpson/three.js,elephantatwork/ZAAK.IO-EditorInternal,liusashmily/three.js,fraguada/three.js,mainelander/three.js,dforrer/three.js,carlosanunes/three.js,hsimpson/three.js,zeropaper/three.js,Ymaril/three.js,zodsoft/three.js,flimshaw/three.js,3DGEOM/three.js,gigakiller/three.js,Amritesh/three.js,Peekmo/three.js,gigakiller/three.js,applexiaohao/three.js,daoshengmu/three.js,haozi23333/three.js,BrianSipple/three.js,Aldrien-/three.js,Zerschmetterling91/three.js,Jericho25/three.js,nhalloran/three.js,Ymaril/three.js,IceCreamYou/three.js,missingdays/three.js-amd,eq0rip/three.js,Pro/three.js,alexconlin/three.js,fraguada/three.js,acrsteiner/three.js,yifanhunyc/three.js,SET001/three.js,datalink747/three.js,amakaroff82/three.js,matthartman/oculus-matt,StefanHuzz/three.js,mataron/three.js,stevenliujw/three.js,missingdays/three.js-amd,njam/three.js,ngokevin/three-dev,3DGEOM/three.js,archilogic-ch/three.js,GGAlanSmithee/three.js,liusashmily/three.js,matthiascy/three.js,Fox32/three.js,holmberd/three.js,pharos3d/three.js,masterex1000/three.js,zhangwenyan/three.js,davidvmckay/three.js,sasha240100/three.js,r8o8s1e0/three.js,jee7/three.js,fomenyesu/three.js,sebasbaumh/three.js,satori99/three.js,njam/three.js,JuudeDemos/three.js,edivancamargo/three.js,shinate/three.js,simonThiele/three.js,ilovezy/three.js,coloringchaos/three.js,acrsteiner/three.js,programulya/three.js,easz/three.js,mabo77/three.js,Hectate/three.js,masterex1000/three.js,fluxio/three.js,AntTech/three.js,mattdesl/three.js,UnboundVR/three.js,mudithkr/three.js,IceCreamYou/three.js,zodsoft/three.js,jeromeetienne/three.js,dimensia/three.js,sreith1/three.js,alexbelyeu/three.js,q437634645/three.js,arose/three.js,yuhualingfeng/three.js,LeoEatle/three.js,p5150j/three.js,LaughingSun/three.js,ondys/three.js,ikerr/three.js,cc272309126/three.js,ikerr/three.js,nadirhamid/three.js,meizhoubao/three.js,zatchgordon/webGL,ThiagoGarciaAlves/three.js,YajunQiu/three.js,zatchgordon/webGL,Nitrillo/three.js,Aldrien-/three.js,bdysvik/three.js,mindofmatthew/three.js,matgr1/three.js,hsimpson/three.js,camellhf/three.js,fluxio/three.js,toxicFork/three.js,jzitelli/three.js,kaisalmen/three.js,rgaino/three.js,dayo7116/three.js,HongJunLi/three.js,Samsy/three.js,leitzler/three.js,ilovezy/three.js,Ymaril/three.js,DelvarWorld/three.js,nopjia/three.js,crazyyaoyao/yaoyao,anvaka/three.js,haozi23333/three.js,BenediktS/three.js,Meshu/three.js,jostschmithals/three.js,davidvmckay/three.js,humbletim/three.js,BrianSipple/three.js,chuckfairy/three.js,Coburn37/three.js,fluxio/three.js,zhangwenyan/three.js,sunbc0120/three.js,billfeller/three.js,zbm2001/three.js,TristanVALCKE/three.js,jeromeetienne/three.js,threejsworker/three.js,imshibaji/three.js,MarcusLongmuir/three.js,3DGEOM/three.js,snipermiller/three.js,alexbelyeu/three.js,bdysvik/three.js,podgorskiy/three.js,LeoEatle/three.js,sasha240100/three.js,ducminhn/three.js,Fox32/three.js,MasterJames/three.js,flimshaw/three.js,pharos3d/three.js,meizhoubao/three.js,googlecreativelab/three.js,06wj/three.js,elephantatwork/ZAAK.IO-EditorInternal,Pro/three.js,surround-io/three.js,nraynaud/three.js,crazyyaoyao/yaoyao,AlexanderMazaletskiy/three.js,Pro/three.js,Pro/three.js,agnivade/three.js,fraguada/three.js,podgorskiy/three.js,fanzhanggoogle/three.js,Seagat2011/three.js,cc272309126/three.js,njam/three.js,AdactiveSAS/three.js,fomenyesu/three.js,0merta/three.js,spite/three.js,cc272309126/three.js,fkammer/three.js,zbm2001/three.js,fluxio/three.js,rayantony/three.js,shinate/three.js,coderrick/three.js,jayhetee/three.js,GammaGammaRay/three.js,jbaicoianu/three.js,Ymaril/three.js,mrdoob/three.js,edivancamargo/three.js,mattdesl/three.js,SatoshiKawabata/three.js,archilogic-com/three.js,nopjia/three.js,archcomet/three.js,byhj/three.js,jbaicoianu/three.js,Mohammed-Ashour/three.js,Meshu/three.js,hedgerh/three.js,sitexa/three.js,gsssrao/three.js,DelvarWorld/three.js,alienity/three.js,alexbelyeu/three.js,luxigo/three.js,kkjeer/three.js,pletzer/three.js,dglogik/three.js,dimensia/three.js,wavesoft/three.js,GastonBeaucage/three.js,JingYongWang/three.js,godlzr/Three.js,MetaStackers/three.js,nadirhamid/three.js,Leeft/three.js,jbaicoianu/three.js,HongJunLi/three.js,shanmugamss/three.js-modified,ilovezy/three.js,dushmis/three.js,Black-Alpha/three.js,AVGP/three.js,ondys/three.js,enche/three.js,fkammer/three.js,tdmsinc/three.js,QingchaoHu/three.js,r8o8s1e0/three.js,mrkev/three.js,ducminhn/three.js,amazg/three.js,zhanglingkang/three.js,Kasual666/WebGl,mudithkr/three.js,mrkev/three.js,SET001/three.js,gveltri/three.js,mhoangvslev/data-visualizer,rfm1201/rfm.three.js,jayhetee/three.js,Kakakakakku/three.js,StefanHuzz/three.js,yxxme/three.js,mrkev/three.js,ZAAK-ZURICHBERLIN/ZAAK.IO-Editor,srifqi/three.js,thomasxu1991/three.js,alexconlin/three.js,satori99/three.js,dushmis/three.js,Meshu/three.js,LeoEatle/three.js,chuckfairy/three.js,AscensionFoundation/three.js,tdmsinc/three.js,freekh/three.js,robsix/3ditor,ma-tech/three.js,carlosanunes/three.js,archcomet/three.js,gsssrao/three.js,3DGEOM/three.js,sebasbaumh/three.js,unconed/three.js,LeoEatle/three.js,archilogic-ch/three.js,gpranay4/three.js,pailhead/three.js,JamesHagerman/three.js,jayhetee/three.js,GastonBeaucage/three.js,JamesHagerman/three.js,meizhoubao/three.js,digital360/three.js,Peekmo/three.js,humbletim/three.js,Zerschmetterling91/three.js,technohippy/three.js,googlecreativelab/three.js,dforrer/three.js,blokhin/three.js,sheafferusa/three.js,beni55/three.js,coloringchaos/three.js,AdactiveSAS/three.js,BrianSipple/three.js,Meshu/three.js,chaoallsome/three.js,zhangwenyan/three.js,alienity/three.js,elisee/three.js,surround-io/three.js,gigakiller/three.js,3DGEOM/three.js,ZhenxingWu/three.js,leeric92/three.js,ikerr/three.js,aleen42/three.js,shinate/three.js,freekh/three.js,UnboundVR/three.js,sasha240100/three.js,timcastelijn/three.js,jayschwa/three.js,prika/three.js,gdebojyoti/three.js,blokhin/three.js,yrns/three.js,JamesHagerman/three.js,leeric92/three.js,daoshengmu/three.js,missingdays/three.js-amd,Mohammed-Ashour/three.js,supergometan/three.js,jango2015/three.js,Meshu/three.js,borismus/three.js,Seagat2011/three.js,dyx/three.js,digital360/three.js,AscensionFoundation/three.js,ndebeiss/three.js,squarefeet/three.js,threejsworker/three.js,coloringchaos/three.js,matthartman/oculus-matt,sweetmandm/three.js,sunbc0120/three.js,blokhin/three.js,r8o8s1e0/three.js,toguri/three.js,06wj/three.js,satori99/three.js,byhj/three.js,ilovezy/three.js,g-rocket/three.js,MarcusLongmuir/three.js,Mugen87/three.js,archilogic-ch/three.js,g-rocket/three.js,Benjamin-Dobell/three.js,fta2012/three.js,wavesoft/three.js,ThiagoGarciaAlves/three.js,benaadams/three.js,elephantatwork/three.js,beni55/three.js,billfeller/three.js,Jericho25/three.js,Joeldk/three.js,wavesoft/three.js,Jerdak/three.js,archcomet/three.js,yrns/three.js,edivancamargo/three.js,squarefeet/three.js,0merta/three.js,mindofmatthew/three.js,Coburn37/three.js,ducminhn/three.js,AntTech/three.js,Joeldk/three.js,mattdesl/three.js,SpookW/three.js,chuckfairy/three.js,wizztjh/three.js,rgaino/three.js,robmyers/three.js,Mohammed-Ashour/three.js,controlzee/three.js,yifanhunyc/three.js,holmberd/three.js,snipermiller/three.js,sitexa/three.js,byhj/three.js,jeromeetienne/three.js,DeanLym/three.js,takahirox/three.js,jeffgoku/three.js,IceCreamYou/three.js,sasha240100/three.js,yuhualingfeng/three.js,digital360/three.js,Kasual666/WebGl,zhoushijie163/three.js,JeckoHeroOrg/three.js,ZhenxingWu/three.js,prika/three.js,enche/three.js,WoodMath/three.js,fomenyesu/three.js,fraguada/three.js,fyoudine/three.js,nhalloran/three.js,dayo7116/three.js,0merta/three.js,gveltri/three.js,controlzee/three.js,jbaicoianu/three.js,applexiaohao/three.js,mkkellogg/three.js,jango2015/three.js,shanmugamss/three.js-modified,luxigo/three.js,ThiagoGarciaAlves/three.js,arose/three.js,imshibaji/three.js,p5150j/three.js,robmyers/three.js,coderrick/three.js,zhanglingkang/three.js,elephantatwork/three.js,fluxio/three.js,redheli/three.js,Mugen87/three.js,Cakin-Kwong/three.js,r8o8s1e0/three.js,jee7/three.js,amakaroff82/three.js,swieder227/three.js,mkkellogg/three.js,gpranay4/three.js,mhoangvslev/data-visualizer,MarcusLongmuir/three.js,unphased/three.js,jzitelli/three.js,technohippy/three.js,cadenasgmbh/three.js,controlzee/three.js,sitexa/three.js,srifqi/three.js,alexconlin/three.js,aleen42/three.js,gwindes/three.js,fanzhanggoogle/three.js,Aldrien-/three.js,Stinkdigital/three.js,Kakakakakku/three.js,amazg/three.js,edivancamargo/three.js,matthartman/oculus-matt,Kakakakakku/three.js,mindofmatthew/three.js,111t8e/three.js,luxigo/three.js,jayhetee/three.js,humbletim/three.js,sheafferusa/three.js,carlosanunes/three.js,lag945/three.js,ondys/three.js,Gheehnest/three.js,jbaicoianu/three.js,zeropaper/three.js,googlecreativelab/three.js,bdysvik/three.js,mataron/three.js,zatchgordon/webGL,UnboundVR/three.js,sheafferusa/three.js,NicolasRannou/three.js,mataron/three.js,Jonham/three.js,yuhualingfeng/three.js,BenediktS/three.js,MetaStackers/three.js,TristanVALCKE/three.js,crazyyaoyao/yaoyao,elisee/three.js,lollerbus/three.js,shanmugamss/three.js-modified,richtr/three.js,matgr1/three.js,nadirhamid/three.js,tschw/three.js,sole/three.js,zatchgordon/webGL,snipermiller/three.js,mabo77/three.js,plepers/three.js,mabo77/three.js,greggman/three.js,easz/three.js,shinate/three.js,dforrer/three.js,AscensionFoundation/three.js,daoshengmu/three.js,MasterJames/three.js,WoodMath/three.js,agnivade/three.js,liammagee/three.js,satori99/three.js,mese79/three.js,nhalloran/three.js,sunbc0120/three.js,q437634645/three.js,borismus/three.js,LeoEatle/three.js,arodic/three.js,matthiascy/three.js,acrsteiner/three.js,Jonham/three.js,Samsy/three.js,stopyransky/three.js,rgaino/three.js,Kakakakakku/three.js,njam/three.js,applexiaohao/three.js,imshibaji/three.js,tschw/three.js,sreith1/three.js,cc272309126/three.js,Jericho25/three.js,donmccurdy/three.js,huobaowangxi/three.js,mese79/three.js,DeanLym/three.js,simonThiele/three.js,edge/three.js,Jonham/three.js,MasterJames/three.js,holmberd/three.js,alienity/three.js,liusashmily/three.js,robmyers/three.js,njam/three.js,Jericho25/three.js,mattholl/three.js,ThiagoGarciaAlves/three.js,erich666/three.js,Benjamin-Dobell/three.js,shinate/three.js,dhritzkiv/three.js,enche/three.js,leeric92/three.js,toguri/three.js,zodsoft/three.js,edivancamargo/three.js,dubejf/three.js,googlecreativelab/three.js,ndebeiss/three.js,gero3/three.js,davidvmckay/three.js,jango2015/three.js,luxigo/three.js,nopjia/three.js,enche/three.js,wizztjh/three.js,yxxme/three.js,masterex1000/three.js,VimVincent/three.js,sweetmandm/three.js,MarcusLongmuir/three.js,snovak/three.js,aleen42/three.js,mess110/three.js,RemusMar/three.js,mrkev/three.js,richtr/three.js,Mugen87/three.js,bdysvik/three.js,dyx/three.js,jllodra/three.js,quinonez/three.js,easz/three.js,hedgerh/three.js,Delejnr/three.js,ngokevin/three-dev,hacksalot/three.js,wizztjh/three.js,leitzler/three.js,enche/three.js,LaughingSun/three.js,yifanhunyc/three.js,IceCreamYou/three.js,fluxio/three.js,p5150j/three.js,benaadams/three.js,dforrer/three.js,Nitrillo/three.js,sole/three.js,billfeller/three.js,sufeiou/three.js,fanzhanggoogle/three.js,Cakin-Kwong/three.js,sweetmandm/three.js,wavesoft/three.js,swieder227/three.js,robsix/3ditor,jllodra/three.js,LaughingSun/three.js,pharos3d/three.js,Stinkdigital/three.js,stopyransky/three.js,wuxinwei240/three.js,Hectate/three.js,yrns/three.js,sole/three.js,liammagee/three.js,gwindes/three.js,colombod/three.js,yrns/three.js,haozi23333/three.js,mess110/three.js,alexconlin/three.js,JingYongWang/three.js,wizztjh/three.js,Benjamin-Dobell/three.js,archilogic-com/three.js,edge/three.js,arose/three.js,ma-tech/three.js,arose/three.js,prabhu-k/three.js,edge/three.js,robmyers/three.js,Benjamin-Dobell/three.js,Astrak/three.js,lovewitty/three.js,mainelander/three.js,stevenliujw/three.js,amazg/three.js,flimshaw/three.js,gsssrao/three.js,rayantony/three.js,AltspaceVR/three.js,Jerdak/three.js,LeoEatle/three.js,dhritzkiv/three.js,rgaino/three.js,rbarraud/three.js,coloringchaos/three.js,huobaowangxi/three.js,sunbc0120/three.js,mudithkr/three.js,dubejf/three.js,wanby/three.js,crazyyaoyao/yaoyao,sttz/three.js,Samsung-Blue/three.js,Cakin-Kwong/three.js,eq0rip/three.js,jostschmithals/three.js,camellhf/three.js,quinonez/three.js,elephantatwork/ZAAK.IO-EditorInternal,rougier/three.js,archcomet/three.js,acrsteiner/three.js,snovak/three.js,dayo7116/three.js,unconed/three.js,eq0rip/three.js,Cakin-Kwong/three.js,Ludobaka/three.js,gsssrao/three.js,Mohammed-Ashour/three.js,nadirhamid/three.js,dforrer/three.js,toguri/three.js,ikerr/three.js,arose/three.js,toxicFork/three.js,yxxme/three.js,shinate/three.js,sebasbaumh/three.js,Kakakakakku/three.js,kkjeer/three.js,Pro/three.js,sreith1/three.js,Fox32/three.js,amazg/three.js,fyoudine/three.js,yuhualingfeng/three.js,RAtechntukan/three.js,technohippy/three.js,SpookW/three.js,technohippy/three.js,mattholl/three.js,imshibaji/three.js,supergometan/three.js,fraguada/three.js,Jozain/three.js,coffeine-009/three.js,humbletim/three.js,brason/three.js,jeffgoku/three.js,tdmsinc/three.js,edivancamargo/three.js,colombod/three.js,ma-tech/three.js,IceCreamYou/three.js,Black-Alpha/three.js,111t8e/three.js,RemusMar/three.js,rayantony/three.js,aleen42/three.js,Stinkdigital/three.js,archilogic-ch/three.js,ducminhn/three.js,amakaroff82/three.js,mkkellogg/three.js,lovewitty/three.js,JuudeDemos/three.js,anvaka/three.js,Peekmo/three.js,dayo7116/three.js,Leeft/three.js,prabhu-k/three.js,ndebeiss/three.js,Delejnr/three.js,brason/three.js,unphased/three.js,xundaokeji/three.js,yxxme/three.js,programulya/three.js,GastonBeaucage/three.js,ma-tech/three.js,beni55/three.js,wavesoft/three.js,enche/three.js,mabo77/three.js,leitzler/three.js,ValtoLibraries/ThreeJS,vizorvr/three.js,vizorvr/three.js,opensim-org/three.js,fernandojsg/three.js,AntTech/three.js,rayantony/three.js,yuhualingfeng/three.js,sole/three.js,Cakin-Kwong/three.js,snovak/three.js,brianchirls/three.js,leeric92/three.js,JuudeDemos/three.js,acrsteiner/three.js,zeropaper/three.js,lag945/three.js,rlugojr/three.js,hedgerh/three.js,toguri/three.js,stopyransky/three.js,gdebojyoti/three.js,yuhualingfeng/three.js,lag945/three.js,mkkellogg/three.js,Astrak/three.js,sheafferusa/three.js,stopyransky/three.js,tschw/three.js,sitexa/three.js,squarefeet/three.js,supergometan/three.js,Benjamin-Dobell/three.js,zatchgordon/webGL,wuxinwei240/three.js,GGAlanSmithee/three.js,gveltri/three.js,ma-tech/three.js,sherousee/three.js,Gheehnest/three.js,ducminhn/three.js,looeee/three.js,jbaicoianu/three.js,kkjeer/three.js,mhoangvslev/data-visualizer,Aldrien-/three.js,pharos3d/three.js,leitzler/three.js,freekh/three.js,jostschmithals/three.js,AVGP/three.js,lchl7890987/WebGL,spite/three.js,squarefeet/three.js,bdysvik/three.js,fomenyesu/three.js,timcastelijn/three.js,hedgerh/three.js,g-rocket/three.js,edge/three.js,AltspaceVR/three.js,snipermiller/three.js,Gheehnest/three.js,toguri/three.js,nadirhamid/three.js,dayo7116/three.js,agnivade/three.js,borismus/three.js,mhoangvslev/data-visualizer,flimshaw/three.js,chaoallsome/three.js,Fox32/three.js,SET001/three.js,zbm2001/three.js,redheli/three.js,mindofmatthew/three.js,fanzhanggoogle/three.js,LaughingSun/three.js,camellhf/three.js,hacksalot/three.js,matthiascy/three.js,prabhu-k/three.js,jeffgoku/three.js,thomasxu1991/three.js,xundaokeji/three.js,surround-io/three.js,111t8e/three.js,Ludobaka/three.js,gveltri/three.js,rougier/three.js,ValtoLibraries/ThreeJS,JingYongWang/three.js,masterex1000/three.js,nhalloran/three.js,tschw/three.js,snovak/three.js,BenediktS/three.js,Wilt/three.js,easz/three.js,looeee/three.js,tamarintech/three.js,RemusMar/three.js,Samsung-Blue/three.js,ngokevin/three-dev,aardgoose/three.js,SpinVR/three.js,brason/three.js,dyx/three.js,chuckfairy/three.js,lollerbus/three.js,technohippy/three.js,BrianSipple/three.js,AVGP/three.js,brickify/three.js,ThiagoGarciaAlves/three.js,prika/three.js,3DGEOM/three.js,benaadams/three.js,SpookW/three.js,brianchirls/three.js,tamarintech/three.js,rbarraud/three.js,brickify/three.js,r8o8s1e0/three.js,Hectate/three.js,ZhenxingWu/three.js,greggman/three.js,alexbelyeu/three.js,bhouston/three.js,UnboundVR/three.js,brianchirls/three.js,sole/three.js,sebasbaumh/three.js,squarefeet/three.js,archcomet/three.js,plepers/three.js,archilogic-ch/three.js,nraynaud/three.js,MetaStackers/three.js,zbm2001/three.js,mainelander/three.js,jzitelli/three.js,simonThiele/three.js,lovewitty/three.js,zeropaper/three.js,ngokevin/three-dev,colombod/three.js,snovak/three.js,111t8e/three.js,AdactiveSAS/three.js,jllodra/three.js,HongJunLi/three.js,VimVincent/three.js,datalink747/three.js,jango2015/three.js,tamarintech/three.js,spite/three.js,blokhin/three.js,godlzr/Three.js,borismus/three.js,technohippy/three.js,pletzer/three.js,xundaokeji/three.js,q437634645/three.js,haozi23333/three.js,missingdays/three.js-amd,mataron/three.js,sunbc0120/three.js,prabhu-k/three.js,ngokevin/three-dev,colombod/three.js,dimensia/three.js,Jozain/three.js,0merta/three.js,Benjamin-Dobell/three.js,simonThiele/three.js,lollerbus/three.js,mudithkr/three.js,ngokevin/three.js,jzitelli/three.js,brason/three.js,coderrick/three.js,lag945/three.js,benaadams/three.js,threejsworker/three.js,swieder227/three.js,Samsung-Blue/three.js,g-rocket/three.js,billfeller/three.js,AscensionFoundation/three.js,cc272309126/three.js,Nitrillo/three.js,datalink747/three.js,quinonez/three.js,111t8e/three.js,bhouston/three.js,controlzee/three.js,mattholl/three.js,supergometan/three.js,archilogic-com/three.js,Jerdak/three.js,kkjeer/three.js,nhalloran/three.js,swieder227/three.js,stopyransky/three.js,pletzer/three.js,liammagee/three.js,elephantatwork/three.js,easz/three.js,jpweeks/three.js,thomasxu1991/three.js,billfeller/three.js,bhouston/three.js,sreith1/three.js,Cakin-Kwong/three.js,mindofmatthew/three.js,sufeiou/three.js,sweetmandm/three.js,Kasual666/WebGl,p5150j/three.js,elisee/three.js,lollerbus/three.js,p5150j/three.js,framelab/three.js,brianchirls/three.js,elephantatwork/ZAAK.IO-EditorInternal,HongJunLi/three.js,huobaowangxi/three.js,Liuer/three.js,gpranay4/three.js,MetaStackers/three.js,chuckfairy/three.js,unconed/three.js,jeffgoku/three.js,Ymaril/three.js,sole/three.js,mattholl/three.js,alienity/three.js,Peekmo/three.js,digital360/three.js,davidvmckay/three.js,lchl7890987/WebGL,AlexanderMazaletskiy/three.js,controlzee/three.js,Coburn37/three.js,chaoallsome/three.js,framelab/three.js,ValtoLibraries/ThreeJS,daoshengmu/three.js,WestLangley/three.js,richtr/three.js,toxicFork/three.js,timcastelijn/three.js,flimshaw/three.js,liusashmily/three.js,BenediktS/three.js,Jerdak/three.js,davidvmckay/three.js,mattdesl/three.js,AdactiveSAS/three.js,yifanhunyc/three.js,meizhoubao/three.js,huobaowangxi/three.js,wanby/three.js,yxxme/three.js,agnivade/three.js,q437634645/three.js,zeropaper/three.js,Jozain/three.js,DeanLym/three.js,chaoallsome/three.js,Stinkdigital/three.js,mudithkr/three.js,SatoshiKawabata/three.js,GastonBeaucage/three.js,sheafferusa/three.js,RAtechntukan/three.js,zodsoft/three.js,imshibaji/three.js,sherousee/three.js,Samsy/three.js,brickify/three.js,g-rocket/three.js,fanzhanggoogle/three.js,bhouston/three.js,matthiascy/three.js,fkammer/three.js,mrkev/three.js,programulya/three.js,Ludobaka/three.js,zatchgordon/webGL,fomenyesu/three.js,rbarraud/three.js,luxigo/three.js,takahirox/three.js,shanmugamss/three.js-modified,makc/three.js.fork,archilogic-com/three.js,Hectate/three.js,nraynaud/three.js,freekh/three.js,billfeller/three.js,fta2012/three.js,squarefeet/three.js,Samsy/three.js,dimensia/three.js,ndebeiss/three.js,ikerr/three.js,LaughingSun/three.js,godlzr/Three.js,hacksalot/three.js,rlugojr/three.js,zhangwenyan/three.js,AVGP/three.js,zhanglingkang/three.js,plepers/three.js,Coburn37/three.js,Jozain/three.js,jostschmithals/three.js,daoshengmu/three.js,alienity/three.js,zhanglingkang/three.js,zeropaper/three.js,hacksalot/three.js,bhouston/three.js,quinonez/three.js,threejsworker/three.js,gdebojyoti/three.js,JuudeDemos/three.js
678a5f6f558c833bc05de1f68120efed8cbcdb18
frameworks/datastore/tests/models/record/core_methods.js
frameworks/datastore/tests/models/record/core_methods.js
// ========================================================================== // Project: SproutCore - JavaScript Application Framework // Copyright: ©2006-2009 Apple, Inc. and contributors. // License: Licened under MIT license (see license.js) // ========================================================================== /*globals module ok equals same test MyApp */ var MyApp; module("SC.Record core methods", { setup: function() { MyApp = SC.Object.create({ store: SC.Store.create() }) ; MyApp.Foo = SC.Record.extend({}); MyApp.json = { foo: "bar", number: 123, bool: YES, array: [1,2,3] }; MyApp.foo = MyApp.store.createRecord(MyApp.Foo, MyApp.json); } }); test("statusToString", function() { var status = MyApp.store.readStatus(MyApp.foo); equals(SC.Record.statusToString(status), 'EMPTY', 'status string should be EMPTY'); });
// ========================================================================== // Project: SproutCore - JavaScript Application Framework // Copyright: ©2006-2009 Apple, Inc. and contributors. // License: Licened under MIT license (see license.js) // ========================================================================== /*globals module ok equals same test MyApp */ var MyApp; module("SC.Record core methods", { setup: function() { MyApp = SC.Object.create({ store: SC.Store.create() }) ; MyApp.Foo = SC.Record.extend({}); MyApp.json = { foo: "bar", number: 123, bool: YES, array: [1,2,3] }; MyApp.foo = MyApp.store.createRecord(MyApp.Foo, MyApp.json); } }); test("statusString", function() { equals(MyApp.foo.statusString(), 'READY_NEW', 'status string should be READY_NEW'); });
Fix SC.Record statusString unit test
Fix SC.Record statusString unit test
JavaScript
mit
Eloqua/sproutcore,Eloqua/sproutcore,Eloqua/sproutcore
9686768f335f876d674183fd899125a5fb09e101
lib/node_modules/@stdlib/buffer/from-string/lib/index.js
lib/node_modules/@stdlib/buffer/from-string/lib/index.js
'use strict'; /** * Allocate a buffer containing a provided string. * * @module @stdlib/buffer/from-string * * @example * var string2buffer = require( '@stdlib/buffer/from-string' ); * * var buf = string2buffer( 'beep boop' ); * // returns <Buffer> */ // MODULES // var hasFrom = require( './has_from.js' ); // MAIN // var string2buffer; if ( hasFrom ) { string2buffer = require( './main.js' ); } else { string2buffer = require( './polyfill.js' ); } // EXPORTS // module.exports = string2buffer;
'use strict'; /** * Allocate a buffer containing a provided string. * * @module @stdlib/buffer/from-string * * @example * var string2buffer = require( '@stdlib/buffer/from-string' ); * * var buf = string2buffer( 'beep boop' ); * // returns <Buffer> */ // MODULES // var hasFrom = require( './has_from.js' ); var main = require( './main.js' ); var polyfill = require( './polyfill.js' ); // MAIN // var string2buffer; if ( hasFrom ) { string2buffer = main; } else { string2buffer = polyfill; } // EXPORTS // module.exports = string2buffer;
Refactor to avoid dynamic module resolution
Refactor to avoid dynamic module resolution
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
ea020e5e5759189d2576aea6a58114ddb24dd001
src/index.js
src/index.js
import React from 'react' import ReactDOM from 'react-dom' import { createGlobalStyle } from 'styled-components' import { App } from './App' import woff2 from './fonts/source-sans-pro-v11-latin-regular.woff2' import woff from './fonts/source-sans-pro-v11-latin-regular.woff' import registerServiceWorker from './registerServiceWorker' const GlobalStyle = createGlobalStyle` body { margin: 0; padding: 0; font-family: 'Source Sans Pro', sans-serif; overscroll-behavior-y: none; } /* source-sans-pro-regular - latin */ @font-face { font-family: 'Source Sans Pro'; font-style: normal; font-weight: 400; font-display: optional; src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(${woff2}) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ url(${woff}) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ } ` ReactDOM.render( <> <GlobalStyle /> <App /> </>, document.getElementById('root') ) registerServiceWorker()
import React from 'react' import ReactDOM from 'react-dom' import { createGlobalStyle } from 'styled-components' import { App } from './App' import woff2 from './fonts/source-sans-pro-v11-latin-regular.woff2' import woff from './fonts/source-sans-pro-v11-latin-regular.woff' import registerServiceWorker from './registerServiceWorker' const GlobalStyle = createGlobalStyle` html { box-sizing: border-box; } *, *:before, *:after { box-sizing: inherit; } body { margin: 0; padding: 0; font-family: 'Source Sans Pro', sans-serif; overscroll-behavior-y: none; } /* source-sans-pro-regular - latin */ @font-face { font-family: 'Source Sans Pro'; font-style: normal; font-weight: 400; font-display: optional; src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(${woff2}) format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ url(${woff}) format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ } ` ReactDOM.render( <> <GlobalStyle /> <App /> </>, document.getElementById('root') ) registerServiceWorker()
Use border-box style for all elements
Use border-box style for all elements
JavaScript
mit
joelgeorgev/file-hash-verifier,joelgeorgev/file-hash-verifier
12ee708accce42f2bdeb557888590851df1ff12c
src/index.js
src/index.js
var Transmitter = function (config) { var router = require('./router.js'); router(config); var io = require('socket.io')(router.server); // Socket.io connection handling io.on('connection', function(socket){ console.log('PULSAR: client connected'); socket.on('disconnect', function() { console.log('PULSAR: client disconnected'); }); }); var Processor = require('@dermah/pulsar-input-keyboard'); var processor = new Processor(config); processor.on('pulse', pulse => { io.emit('pulse', pulse) }); processor.on('pulsar control', pulse => { io.emit('pulsar control', pulse) }); processor.on('pulse update', pulse => { io.emit('pulse update', pulse); }); } module.exports = Transmitter;
class Detector { constructor(config) { let router = require('./router.js'); router(config); this.io = require('socket.io')(router.server); // Socket.io connection handling this.io.on('connection', function(socket){ console.log('PULSAR: client connected'); socket.on('disconnect', function() { console.log('PULSAR: client disconnected'); }); }); } detect (pulseType, pulse) { this.io.emit(pulseType, pulse); } } module.exports = Detector;
Convert export to a class with a pulse detector function
Convert export to a class with a pulse detector function
JavaScript
mit
Dermah/pulsar-transmitter
78d557fc3c8bda380271c29f02b9a2b3cceb6b9a
src/index.js
src/index.js
/** * * ___| | | | | * | | | | | * | ___ |___ __| * \____|_| _| _| * * @author Shinichirow KAMITO * @license MIT */ import { createStore, destroyStore, getAllStores, destroyAllStores, trigger, regist } from './core'; import dispatcher from './dispatcher'; let ch4 = { createStore: createStore, getAllStores: getAllStores, destroyStore: destroyStore, destroyAllStores: destroyAllStores, trigger: trigger, regist: regist, dispatcher: dispatcher }; export { createStore, destroyStore, getAllStores, destroyAllStores, trigger, regist, dispatcher } export default ch4;
/** * * ___| | | | | * | | | | | * | ___ |___ __| * \____|_| _| _| * * @author Shinichirow KAMITO * @license MIT */ import { createStore, destroyStore, getAllStores, destroyAllStores, trigger, regist } from './core'; import dispatcher from './dispatcher'; import logger from './logger'; let ch4 = { createStore: createStore, getAllStores: getAllStores, destroyStore: destroyStore, destroyAllStores: destroyAllStores, trigger: trigger, regist: regist, dispatcher: dispatcher, logger: logger }; export { createStore, destroyStore, getAllStores, destroyAllStores, trigger, regist, dispatcher, logger } export default ch4;
Add logger to export modules.
Add logger to export modules.
JavaScript
mit
kamito/ch4
c1bf4d635ecfb5f471f4d4230401ae3c0ded3468
app/controllers/PhotoRow.js
app/controllers/PhotoRow.js
var FileLoader = require("file_loader"); var args = arguments[0] || {}; var url = "http://photos.tritarget.org/photos/washington2012/" + args.photo; FileLoader.download(url) .then(function(file) { // Ti.API.info("Displaying image: " + file.getPath()); $.photo.image = file.getFile(); $.info.color = file.downloaded ? "#CF0000" : "#07D100"; $.info.text = (file.downloaded ? "Downloaded" : "Cached") + "\n(" + file.id.substr(0, 12) + ")"; }) .fail(function(error) { var message = error.message || error.error || error; Ti.API.error("" + message + " loading cache with url: " + url); // We don't want to throw an error here. That would be a mess. }) .done(); $.title.text = args.photo; /* vim:set ts=2 sw=2 et fdm=marker: */
var FileLoader = require("file_loader"); var args = arguments[0] || {}; var url = "http://photos.tritarget.org/photos/washington2012/" + args.photo; function updateRow(file) { $.photo.image = file.getFile(); $.info.color = file.downloaded ? "#CF0000" : "#07D100"; $.info.text = (file.downloaded ? "Downloaded" : "Cached") + "\n(" + file.id.substr(0, 12) + ")"; } function onError(error) { var message = error.message || error.error || error; Ti.API.error("" + message + " loading cache with url: " + url); // We don't want to throw an error here. That would be a mess. } if (args.use_promises) { FileLoader.download(url).then(updateRow).fail(onError).done(); } else { FileLoader.download(url, { onload: updateRow, onerror: onError, }); } $.title.text = args.photo; /* vim:set ts=2 sw=2 et fdm=marker: */
Add support for choosing promises or callbacks
Add support for choosing promises or callbacks For testing and demo
JavaScript
mit
sukima/TiCachedImages,0x00evil/TiCachedImages,0x00evil/TiCachedImages,sukima/TiCachedImages
cd93d090958b3b4c058cabe384668725d23622b1
app/components/layer-file/component.js
app/components/layer-file/component.js
import Ember from 'ember'; export default Ember.Component.extend({ showSelect: false, noFileFound: true, didRender() { if(!this.get('layer.settings.values.downloadLink')){ this.get('node.files').then((result)=>{ result.objectAt(0).get('files').then((files)=>{ if(files.length === 0){ this.set('noFileFound', true); return false; }else{ this.set('noFileFound', false); } let fileDatesLinks = {} let fileModifiedDates = [] for(let i = 0; i < files.length; i++){ fileModifiedDates.push(files.objectAt(i).get('dateModified')); fileDatesLinks[files.objectAt(i).get('dateModified')] = files.objectAt(i).get('links').download; } let mostRecentDate = new Date(Math.max.apply(null,fileModifiedDates)); this.set('layer.settings.values.downloadLink' , fileDatesLinks[mostRecentDate]); }); }); } }, actions: { fileDetail(file) { this.set('showSelect', false); this.set('layer.settings.values.downloadLink' , file.data.links.download) }, showSelect(){ this.set('showSelect', true); }, hideSelect(){ this.set('showSelect', false); } } });
import Ember from 'ember'; export default Ember.Component.extend({ showSelect: false, noFileFound: true, //make computed property that observers the layers.[] and if change see if there is a file didRender() { console.log(this.get('layer.settings.values.downloadLink') , this.get('noFileFound')) if(!this.get('layer.settings.values.downloadLink')){ this.get('node.files').then((result)=>{ result.objectAt(0).get('files').then((files)=>{ console.log("files.length" , files.length); if(files.length === 0){ this.set('noFileFound', true); return false; }else{ this.set('noFileFound', false); } let fileDatesLinks = {} let fileModifiedDates = [] for(let i = 0; i < files.length; i++){ fileModifiedDates.push(files.objectAt(i).get('dateModified')); fileDatesLinks[files.objectAt(i).get('dateModified')] = files.objectAt(i).get('links').download; } let mostRecentDate = new Date(Math.max.apply(null,fileModifiedDates)); this.set('layer.settings.values.downloadLink' , fileDatesLinks[mostRecentDate]); }); }); }else{ this.set('noFileFound', false); } }, actions: { fileDetail(file) { this.set('showSelect', false); this.set('layer.settings.values.downloadLink' , file.data.links.download) }, showSelect(){ this.set('showSelect', true); }, hideSelect(){ this.set('showSelect', false); } } });
Fix 'No Files Found" showing when files are found
Fix 'No Files Found" showing when files are found
JavaScript
apache-2.0
caneruguz/osfpages,caneruguz/osfpages,Rytiggy/osfpages,Rytiggy/osfpages
52213504d4c43fe43f572dc8bf84113a9af07797
routes/index.js
routes/index.js
var express = require('express'); var request = require('request'); var http = require('http'); var router = express.Router(); var fixtures = require('./fixtures'); /* GET home page. */ router.get('/', function(req, res, next) { res.render('index', { title: 'FootScores' }); }); /* GET any leagues matches */ router.get('/fixtures/:id', function(req, res, next) { var matches = fixtures.getMatches(req.params.id, function(data) { res.render('matches', {matches: data}); }); }); module.exports = router;
var express = require('express'); var request = require('request'); var http = require('http'); var router = express.Router(); var fixtures = require('./fixtures'); var database = require('../database/mongo'); /* GET home page. */ router.get('/', function(req, res, next) { res.render('index', { title: 'FootScores' }); }); /* GET any leagues matches */ router.get('/fixtures/:id', function(req, res, next) { var matches = fixtures.getMatchesByCompetition(req.params.id, function(data) { res.render('matches', {matches: data}); }); }); router.get('/matches', function(req, res, next) { database.getConnection(function(db) { fixtures.serveMatches(db.collection('partidos')); }); res.render('matches', {matches: {}}); }); module.exports = router;
Change names to be more self-explanatory
Change names to be more self-explanatory
JavaScript
mit
ngomez22/FootScores,ngomez22/FootScores
368c10724ead9b725bbd75f31a7922fcbe6fc0aa
app/javascript/helpers/string.js
app/javascript/helpers/string.js
/* FILE string.js */ (function () { this.sparks.string = {}; var str = sparks.string; str.strip = function (s) { s = s.replace(/\s*([^\s]*)\s*/, '$1'); return s; }; // Remove a dot in the string, and then remove 0's on both sides // e.g. '20100' => '201', '0.0020440' => '2044' str.stripZerosAndDots = function (s) { s = s.replace('.', ''); s = s.replace(/0*([^0].*)/, '$1'); s = s.replace(/(.*[^0])0*/, '$1'); return s; }; str.stripZeros = function (s) { s = s.replace(/0*([^0].*)/, '$1'); s = s.replace(/(.*[^0])0*/, '$1'); return s; }; })();
/* FILE string.js */ (function () { this.sparks.string = {}; var str = sparks.string; str.strip = function (s) { s = s.replace(/\s*([^\s]*)\s*/, '$1'); return s; }; // Remove a dot in the string, and then remove 0's on both sides // e.g. '20100' => '201', '0.0020440' => '2044' str.stripZerosAndDots = function (s) { s = s.replace('.', ''); s = s.replace(/0*([^0].*)/, '$1'); s = s.replace(/(.*[^0])0*/, '$1'); return s; }; str.stripZeros = function (s) { s = s.replace(/0*([^0].*)/, '$1'); s = s.replace(/(.*[^0])0*/, '$1'); return s; }; String.prototype.capFirst = function() { return this.charAt(0).toUpperCase() + this.slice(1); } })();
Add capitalize-first function to String
Add capitalize-first function to String
JavaScript
apache-2.0
concord-consortium/sparks,concord-consortium/sparks,concord-consortium/sparks,concord-consortium/sparks,concord-consortium/sparks
84854a6494b5c9f1a56be857ba2fc8762883f1c9
app/mixins/pagination-support.js
app/mixins/pagination-support.js
import Ember from 'ember'; export default Ember.Mixin.create({ hasPaginationSupport: true, total: 0, page: 0, pageSize: 10, didRequestPage: Ember.K, first: function () { return this.get('page') * this.get('pageSize') + 1; }.property('page', 'pageSize').cacheable(), last: function () { return Math.min((this.get('page') + 1) * this.get('pageSize'), this.get('total')); }.property('page', 'pageSize', 'total').cacheable(), hasPrevious: function () { return this.get('page') > 0; }.property('page').cacheable(), hasNext: function () { return this.get('last') < this.get('total'); }.property('last', 'total').cacheable(), nextPage: function () { if (this.get('hasNext')) { this.incrementProperty('page'); } }, previousPage: function () { if (this.get('hasPrevious')) { this.decrementProperty('page'); } }, totalPages: function () { return Math.ceil(this.get('total') / this.get('pageSize')); }.property('total', 'pageSize').cacheable(), pageDidChange: function () { this.didRequestPage(this.get('page')); }.observes('page') });
import Ember from 'ember'; export default Ember.Mixin.create({ hasPaginationSupport: true, total: 0, page: 0, pageSize: 10, didRequestPage: Ember.K, first: function () { return this.get('page') * this.get('pageSize') + 1; }.property('page', 'pageSize'), last: function () { return Math.min((this.get('page') + 1) * this.get('pageSize'), this.get('total')); }.property('page', 'pageSize', 'total'), hasPrevious: function () { return this.get('page') > 0; }.property('page'), hasNext: function () { return this.get('last') < this.get('total'); }.property('last', 'total'), nextPage: function () { if (this.get('hasNext')) { this.incrementProperty('page'); } }, previousPage: function () { if (this.get('hasPrevious')) { this.decrementProperty('page'); } }, totalPages: function () { return Math.ceil(this.get('total') / this.get('pageSize')); }.property('total', 'pageSize'), pageDidChange: function () { this.didRequestPage(this.get('page')); }.observes('page') });
Fix deprecation warnings for Ember 1.10.0.
Fix deprecation warnings for Ember 1.10.0.
JavaScript
apache-2.0
davidvmckay/Klondike,Stift/Klondike,davidvmckay/Klondike,jochenvangasse/Klondike,jochenvangasse/Klondike,themotleyfool/Klondike,Stift/Klondike,fhchina/Klondike,jochenvangasse/Klondike,fhchina/Klondike,themotleyfool/Klondike,fhchina/Klondike,themotleyfool/Klondike,Stift/Klondike,davidvmckay/Klondike
6cce0db72acfc12bf7fae13346be29928976b641
public/modules/core/controllers/sound-test.client.controller.js
public/modules/core/controllers/sound-test.client.controller.js
'use strict'; angular.module('core').controller('SoundTestController', ['$scope', 'TrialData', function($scope, TrialData) { /* global io */ var socket = io(); socket.on('oscMessageSent', function(data) { console.log('socket "oscMessageSent" event received with data: ' + data); }); socket.emit('sendOSCMessage', { oscType: 'message', address: '/eim/control/startSoundTest', args: { type: 'string', value: TrialData.data.metadata.session_number } }); $scope.stopSoundTest = function() { socket.emit('sendOSCMessage', { oscType: 'message', address: '/eim/control/stopSoundTest', args: { type: 'string', value: TrialData.data.metadata.session_number } }); }; $scope.trialDataJson = function() { return TrialData.toJson(); }; } ]);
'use strict'; angular.module('core').controller('SoundTestController', ['$scope', 'TrialData', function($scope, TrialData) { /* global io */ var socket = io(); socket.on('oscMessageSent', function(data) { console.log('socket "oscMessageSent" event received with data: ' + data); }); socket.emit('sendOSCMessage', { oscType: 'message', address: '/eim/control/soundTest', args: [ { type: 'integer', value: 1 }, { type: 'string', value: TrialData.data.metadata.session_number } ] }); $scope.stopSoundTest = function() { socket.emit('sendOSCMessage', { oscType: 'message', address: '/eim/control/soundTest', args: [ { type: 'integer', value: 0 }, { type: 'string', value: TrialData.data.metadata.session_number } ] }); }; // Send stop sound test message when controller is destroyed $scope.$on('$destroy', $scope.stopSoundTest); $scope.trialDataJson = function() { return TrialData.toJson(); }; } ]);
Reformat SoundTest OSC; stop sound test on SoundTest destroy
Reformat SoundTest OSC; stop sound test on SoundTest destroy
JavaScript
mit
brennon/eim,brennon/eim,brennon/eim,brennon/eim
4f93585a82adcc93b713cfd983d5343a23e262b3
app/renderer/reducers/player.js
app/renderer/reducers/player.js
import { SEEK, SET_DURATION, SET_CURRENT_SONG, CHANGE_VOLUME, CHANGE_CURRENT_SECONDS, PLAY, PAUSE } from './../actions/actionTypes' const initialState = { isPlaying: false, playFromSeconds: 0, totalSeconds: 0, currentSeconds: 0, currentSong: { title: '', artist: '', album: '', albumArt: '', src: '' }, volume: 1 } const player = (state = initialState, action) => { switch (action.type) { case PLAY: return { ...state, isPlaying: true } case PAUSE: return { ...state, isPlaying: false } case SEEK: return { ...state, playFromSeconds: action.playFromSeconds } case SET_CURRENT_SONG: return { ...state, currentSong: { id: action.id, title: action.title, artist: action.artist, album: action.album, albumArt: action.albumArt, src: action.src } } case SET_DURATION: return { ...state, totalSeconds: action.totalSeconds } case CHANGE_VOLUME: return { ...state, volume: action.volume } case CHANGE_CURRENT_SECONDS: return { ...state, currentSeconds: action.currentSeconds } default: return state } } export default player
import { SEEK, SET_DURATION, SET_CURRENT_SONG, CHANGE_VOLUME, CHANGE_CURRENT_SECONDS, PLAY, PAUSE } from './../actions/actionTypes' const initialState = { isPlaying: false, playFromSeconds: 0, totalSeconds: 0, currentSeconds: 0, currentSong: { id: '', title: '', artist: '', album: '', albumArt: '', src: '' }, volume: 1 } const player = (state = initialState, action) => { switch (action.type) { case PLAY: return { ...state, isPlaying: true } case PAUSE: return { ...state, isPlaying: false } case SEEK: return { ...state, playFromSeconds: action.playFromSeconds } case SET_CURRENT_SONG: return { ...state, currentSong: { id: action.id, title: action.title, artist: action.artist, album: action.album, albumArt: action.albumArt, src: action.src } } case SET_DURATION: return { ...state, totalSeconds: action.totalSeconds } case CHANGE_VOLUME: return { ...state, volume: action.volume } case CHANGE_CURRENT_SECONDS: return { ...state, currentSeconds: action.currentSeconds } default: return state } } export default player
Add missing id in initial state
Add missing id in initial state
JavaScript
mit
AbsoluteZero273/Deezic
e844bc03546c0189ba47bf1ff7915079abf2ca31
app/service/containers/route.js
app/service/containers/route.js
import Ember from 'ember'; import MultiStatsSocket from 'ui/utils/multi-stats'; export default Ember.Route.extend({ statsSocket: null, model() { return this.modelFor('service').get('service'); }, activate() { var stats = MultiStatsSocket.create({ resource: this.modelFor('service').get('service'), linkName: 'containerStats', }); this.set('statsSocket',stats); stats.on('dataPoint', (data) => { var controller = this.get('controller'); if ( controller ) { controller.onDataPoint(data); } }); }, deactivate() { this.get('statsSocket').close(); } });
import Ember from 'ember'; import MultiStatsSocket from 'ui/utils/multi-stats'; export default Ember.Route.extend({ statsSocket: null, model() { var promises = []; // Load the hosts for the instances if they're not already there var service = this.modelFor('service').get('service'); service.get('instances').forEach((instance) => { if ( !instance.get('primaryHost') ) { promises.push(instance.importLink('hosts')); } }); return Ember.RSVP.all(promises).then(() => { return service; }); }, activate() { var stats = MultiStatsSocket.create({ resource: this.modelFor('service').get('service'), linkName: 'containerStats', }); this.set('statsSocket',stats); stats.on('dataPoint', (data) => { var controller = this.get('controller'); if ( controller ) { controller.onDataPoint(data); } }); }, deactivate() { this.get('statsSocket').close(); } });
Fix unknown host on services
Fix unknown host on services
JavaScript
apache-2.0
vincent99/ui,westlywright/ui,lvuch/ui,rancherio/ui,pengjiang80/ui,vincent99/ui,rancherio/ui,nrvale0/ui,rancher/ui,nrvale0/ui,pengjiang80/ui,ubiquityhosting/rancher_ui,westlywright/ui,pengjiang80/ui,westlywright/ui,nrvale0/ui,rancher/ui,vincent99/ui,rancherio/ui,lvuch/ui,rancher/ui,ubiquityhosting/rancher_ui,lvuch/ui,ubiquityhosting/rancher_ui
2402f07c8ce1114389bac47c49b318d931134cdb
web_app/public/js/app.js
web_app/public/js/app.js
'use strict'; // Declare app level module which depends on filters, and services var app = angular.module( 'myApp', [ 'ngRoute', 'myApp.controllers', 'myApp.filters', 'myApp.services', 'myApp.directives', // 3rd party dependencies 'btford.socket-io' ] ); app.config( function ( $routeProvider, $locationProvider ) { $routeProvider. when( '/home', { templateUrl: 'partials/home', controller: 'HomeCtrl' } ). when( '/artist/:artistURI', { templateUrl: 'partials/artist', controller: 'ArtistCtrl' } ). when( '/album/:albumURI', { templateUrl: 'partials/album', controller: 'AlbumCtrl' } ). otherwise( { redirectTo: '/home' } ); $locationProvider.html5Mode( true ); });
'use strict'; // Declare app level module which depends on filters, and services var app = angular.module( 'myApp', [ 'ngRoute', 'myApp.controllers', 'myApp.filters', 'myApp.services', 'myApp.directives', // 3rd party dependencies 'btford.socket-io', 'fully-loaded' ] ); app.config( function ( $routeProvider, $locationProvider ) { $routeProvider. when( '/home', { templateUrl: 'partials/home', controller: 'HomeCtrl' } ). when( '/artist/:artistURI', { templateUrl: 'partials/artist', controller: 'ArtistCtrl' } ). when( '/album/:albumURI', { templateUrl: 'partials/album', controller: 'AlbumCtrl' } ). otherwise( { redirectTo: '/home' } ); $locationProvider.html5Mode( true ); });
Install this the right way
Install this the right way
JavaScript
mit
projectweekend/Pi-Jukebox,projectweekend/Pi-Jukebox,projectweekend/Pi-Jukebox
5de143e2e7268f50b55fedc392f7408e78355c28
src/client/assets/javascripts/app/App.js
src/client/assets/javascripts/app/App.js
import React, { PropTypes } from 'react'; const App = ({ children }) => ( <div className="page-container"> {children} </div> ); App.propTypes = { children: PropTypes.element.isRequired }; export default App;
import React, { PropTypes } from 'react'; const App = (props) => ( <div className="page-container"> {React.cloneElement({...props}.children, {...props})} </div> ); App.propTypes = { children: PropTypes.element.isRequired }; export default App;
Fix warning messages regarding refs and key
Fix warning messages regarding refs and key
JavaScript
mit
dead-in-the-water/ditw,nicksp/redux-webpack-es6-boilerplate,cloady/battleship,cloady/battleship,nicksp/redux-webpack-es6-boilerplate,richbai90/CS2810,dead-in-the-water/ditw,richbai90/CS2810,richbai90/CS2810,richbai90/CS2810
c14e89ab83e035103c58ed57c3681b64278c4a75
lib/utils/cmd.js
lib/utils/cmd.js
const fs = require('fs'); const path = require('path'); /** * Finds package.json file from either the directory the script was called from or a supplied path. * * console.log(findPackageFileInPath()); * console.log(findPackageFileInPath('./package.json')); * console.log(findPackageFileInPath('~/git/github/doxdox/')); * * @param {String} [input] Directory or file. * @return {String} Path to package.json file. * @public */ module.exports.findPackageFileInPath = input => { if (!input) { input = process.cwd(); } if (fs.existsSync(input)) { const stat = fs.statSync(input); if (stat.isDirectory()) { return path.resolve(path.join(input, '/package.json')); } else if (stat.isFile()) { return path.resolve(path.join(path.dirname(input), '/package.json')); } } return null; };
const fs = require('fs'); const path = require('path'); /** * Finds package.json file from either the directory the script was called from or a supplied path. * * console.log(findPackageFileInPath()); * console.log(findPackageFileInPath('./package.json')); * console.log(findPackageFileInPath('~/git/github/doxdox/')); * * @param {String} [input] Directory or file. * @return {String} Path to package.json file. * @public */ const findPackageFileInPath = input => { if (!input) { input = process.cwd(); } if (fs.existsSync(input)) { const stat = fs.statSync(input); if (stat.isDirectory()) { return path.resolve(path.join(input, '/package.json')); } else if (stat.isFile()) { return path.resolve(path.join(path.dirname(input), '/package.json')); } } return null; }; module.exports = { findPackageFileInPath };
Change how method is exported.
Change how method is exported.
JavaScript
mit
neogeek/doxdox
f1ab62de1b6c7bbe13e67361311f8cb14a38813e
src/helpers/find-root.js
src/helpers/find-root.js
'use babel' /* @flow */ import Path from 'path' import {findCached} from './common' import {CONFIG_FILE_NAME} from '../defaults' export function findRoot(directory: string): string { const configFile = findCached(directory, CONFIG_FILE_NAME) if (configFile !== null) { return Path.dirname(String(configFile)) } else return directory }
'use babel' /* @flow */ import Path from 'path' import {findCached} from './common' import {CONFIG_FILE_NAME} from '../defaults' export async function findRoot(directory: string): Promise<string> { const configFile = await findCached(directory, CONFIG_FILE_NAME) if (configFile) { return Path.dirname(configFile) } else return directory }
Upgrade findRoot to be async
:new: Upgrade findRoot to be async
JavaScript
mit
steelbrain/UCompiler
2ee0ebe084b73502b15a4a2f885a37a42abe7586
app/templates/Gruntfile.js
app/templates/Gruntfile.js
/*! * Generator-Gnar Gruntfile * http://gnarmedia.com * @author Adam Murphy */ // Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= pkg.name %> <%= pkg.version %> 'use strict'; /** * Grunt module */ module.exports = function (grunt) { /** * Generator-Gnar Grunt config */ grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), /** * Set project info */ project: { src: 'src', dist: 'dist', assets: '<%= project.dist %>/assets', css: [ '<%= project.src %>/scss/style.scss' ], js: [ '<%= project.src %>/js/*.js' ] } }); /** * Default task * Run `grunt` on the command line */ grunt.registerTask('default', [ ]); };
/*! * Generator-Gnar Gruntfile * http://gnarmedia.com * @author Adam Murphy */ // Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= pkg.name %> <%= pkg.version %> 'use strict'; /** * Grunt module */ module.exports = function (grunt) { /** * Generator-Gnar Grunt config */ grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), /** * Set project info */ project: { src: 'src', dist: 'dist', assets: '<%= project.dist %>/assets', css: [ '<%= project.src %>/scss/style.scss' ], js: [ '<%= project.src %>/js/*.js' ], html: [ '<%= project.src %>/html/*.html' ] } }); /** * Default task * Run `grunt` on the command line */ grunt.registerTask('default', [ ]); };
Add html property to project object
Add html property to project object
JavaScript
mit
gnarmedia/gnenerator-gnar
f0d015f6b45f599518e247c24c152fa5f17ba017
esm-samples/jsapi-custom-workers/webpack.config.js
esm-samples/jsapi-custom-workers/webpack.config.js
const path = require('path'); const HtmlWebPackPlugin = require('html-webpack-plugin'); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); module.exports = { entry: { index: ['./src/index.css', './src/index.js'] }, node: false, output: { path: path.join(__dirname, 'dist'), chunkFilename: 'chunks/[id].js', clean: true }, devServer: { static: './dist', compress: true, port: 3001, }, module: { rules: [ { test: /\.js$/, enforce: "pre", use: ["source-map-loader"], }, { test: /\.css$/, use: [ MiniCssExtractPlugin.loader, 'css-loader' ] }, ] }, plugins: [ new HtmlWebPackPlugin({ title: 'ArcGIS API for JavaScript', template: './public/index.html', filename: './index.html', chunksSortMode: 'none', inlineSource: '.(css)$' }), new MiniCssExtractPlugin({ filename: "[name].[chunkhash].css", chunkFilename: "[id].css" }) ] };
const path = require('path'); const HtmlWebPackPlugin = require('html-webpack-plugin'); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); module.exports = { entry: { index: ['./src/index.css', './src/index.js'] }, node: false, output: { path: path.join(__dirname, 'dist'), chunkFilename: 'chunks/[id].js' }, devServer: { static: path.join(__dirname, 'dist'), compress: true, port: 3001, }, module: { rules: [ { test: /\.js$/, enforce: "pre", use: ["source-map-loader"], }, { test: /\.css$/, use: [ MiniCssExtractPlugin.loader, 'css-loader' ] }, ] }, plugins: [ new HtmlWebPackPlugin({ title: 'ArcGIS API for JavaScript', template: './public/index.html', filename: './index.html', chunksSortMode: 'none', inlineSource: '.(css)$' }), new MiniCssExtractPlugin({ filename: "[name].[chunkhash].css", chunkFilename: "[id].css" }) ] };
Update webpack static, remove webpack clean so dist builds work again.
Update webpack static, remove webpack clean so dist builds work again.
JavaScript
apache-2.0
Esri/jsapi-resources,Esri/jsapi-resources,Esri/jsapi-resources
485e7c6a5c29f5e9f89048ef819ed2338cd54830
src/schema/infoSchema.js
src/schema/infoSchema.js
"use strict"; const Joi = require('joi'); const contactSchema = require('./contactSchema'); const licenseSchema = require('./licenseSchema'); const pathsSchema = require('./pathsSchema'); module.exports = Joi.object({ 'title': Joi.string() .required(), 'description': Joi.string(), 'termsOfService': Joi.string(), 'contact': contactSchema.required(), 'license': licenseSchema, 'paths': pathsSchema });
"use strict"; const Joi = require('joi'); const contactSchema = require('./contactSchema'); const licenseSchema = require('./licenseSchema'); const pathsSchema = require('./pathsSchema'); module.exports = Joi.object({ 'title': Joi.string() .required(), 'description': Joi.string(), 'termsOfService': Joi.string(), 'contact': contactSchema.required(), 'license': licenseSchema, 'paths': pathsSchema, 'permissionProvider': Joi.func() });
Add permission provider to the info schema
Add permission provider to the info schema
JavaScript
mit
Teagan42/Deepthought-Routing
3f594741d55735c20ae1b7f083222e9d10e35fb5
js/Main.js
js/Main.js
// Main JavaScript Document var cards = []; var mainContent = document.getElementId('main-content'); var mainContentRegion = new ZingTouch.Region(mainContent); //Create the card object template function contentCard(title, img, desc, link) { "use strict"; this.title = title; this.img = img; this.desc = desc; this.link = link; } var cardPicker = function() { };
// Main JavaScript Document var cards = []; var mainContent = document.getElementId('main-content'); var mainContentRegion = new ZingTouch.Region(mainContent); //Create the card object template function contentCard(title, img, desc, link) { "use strict"; this.title = title; this.img = img; this.desc = desc; this.link = link; } var cardPicker = (function() { "use strict"; var cards = []; var index = 0; function next() { index = index++ < cards.length ? index : 0; return cards(index); } function current() { return cards(index); } return { next: next, current: current }; })();
Create Card Object template and Card Picker
Create Card Object template and Card Picker
JavaScript
mit
AnthonyGordon1/sneaker-app,AnthonyGordon1/sneaker-app
796488305ab4f2231a58bd18474268bd8c7b5952
components/EditableEntry.js
components/EditableEntry.js
/** * @flow */ import React from 'react'; import { StyleSheet, TextInput } from 'react-native'; import PropTypes from 'prop-types'; import Box from './Box'; class EditableEntry extends React.Component { render() { return ( <Box numberOfLines={1}> <TextInput style={styles.textInput} onChangeText={(text) => this.props.onChangeText(text)} onSubmitEditing={(event) => this.props.onSubmit(event.nativeEvent.text)} autoFocus={true} value={this.props.text} /> </Box> ); } } EditableEntry.propTypes = { text: PropTypes.string.isRequired, onChangeText: PropTypes.func.isRequired, onSubmit: PropTypes.func.isRequired }; const styles = StyleSheet.create({ textInput: { paddingTop: 6, paddingLeft: 6, height: 28, color: '#27ae60', alignItems: 'center', justifyContent: 'center', fontSize: 14, fontFamily: 'Helvetica', fontStyle: 'italic', fontWeight: 'bold', }, }); export default EditableEntry;
/** * @flow */ import React from 'react'; import { StyleSheet, TextInput } from 'react-native'; import PropTypes from 'prop-types'; import Box from './Box'; class EditableEntry extends React.Component { render() { return ( <Box numberOfLines={1}> <TextInput style={styles.textInput} onChangeText={(text) => this.props.onChangeText(text)} onSubmitEditing={(event) => this.props.onSubmit(event.nativeEvent.text)} autoFocus={true} value={this.props.text} returnKeyType="done" /> </Box> ); } } EditableEntry.propTypes = { text: PropTypes.string.isRequired, onChangeText: PropTypes.func.isRequired, onSubmit: PropTypes.func.isRequired }; const styles = StyleSheet.create({ textInput: { paddingTop: 6, paddingLeft: 6, height: 28, color: '#27ae60', alignItems: 'center', justifyContent: 'center', fontSize: 14, fontFamily: 'Helvetica', fontStyle: 'italic', fontWeight: 'bold', }, }); export default EditableEntry;
Add a returnKeyType to the input keyboard
Add a returnKeyType to the input keyboard
JavaScript
mit
nikhilsaraf/react-native-todo-app
65bbd24974974672c60eea3f250564be6a4bfead
webroot/rsrc/js/application/differential/behavior-user-select.js
webroot/rsrc/js/application/differential/behavior-user-select.js
/** * @provides javelin-behavior-differential-user-select * @requires javelin-behavior * javelin-dom * javelin-stratcom */ JX.behavior('differential-user-select', function() { var unselectable; function isOnRight(node) { return node.parentNode.firstChild != node.previousSibling; } JX.Stratcom.listen( 'mousedown', null, function(e) { var key = 'differential-unselectable'; if (unselectable) { JX.DOM.alterClass(unselectable, key, false); } var diff = e.getNode('differential-diff'); var td = e.getNode('tag:td'); if (diff && td && isOnRight(td)) { unselectable = diff; JX.DOM.alterClass(diff, key, true); } }); });
/** * @provides javelin-behavior-differential-user-select * @requires javelin-behavior * javelin-dom * javelin-stratcom */ JX.behavior('differential-user-select', function() { var unselectable; function isOnRight(node) { return node.previousSibling && node.parentNode.firstChild != node.previousSibling; } JX.Stratcom.listen( 'mousedown', null, function(e) { var key = 'differential-unselectable'; if (unselectable) { JX.DOM.alterClass(unselectable, key, false); } var diff = e.getNode('differential-diff'); var td = e.getNode('tag:td'); if (diff && td && isOnRight(td)) { unselectable = diff; JX.DOM.alterClass(diff, key, true); } }); });
Enable selecting text in Differential shield and gap
Enable selecting text in Differential shield and gap Test Plan: Selected text in shield. Selected text in right side. Reviewers: epriestley, btrahan Reviewed By: btrahan CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3522
JavaScript
apache-2.0
vuamitom/phabricator,r4nt/phabricator,denisdeejay/phabricator,Automattic/phabricator,Automattic/phabricator,hshackathons/phabricator-deprecated,wangjun/phabricator,telerik/phabricator,zhihu/phabricator,devurandom/phabricator,christopher-johnson/phabricator,huaban/phabricator,matthewrez/phabricator,aswanderley/phabricator,sharpwhisper/phabricator,huaban/phabricator,Khan/phabricator,dannysu/phabricator,aswanderley/phabricator,Automattic/phabricator,leolujuyi/phabricator,kanarip/phabricator,memsql/phabricator,akkakks/phabricator,parksangkil/phabricator,vuamitom/phabricator,kwoun1982/phabricator,hach-que/unearth-phabricator,huangjimmy/phabricator-1,wikimedia/phabricator-phabricator,phacility/phabricator,coursera/phabricator,tanglu-org/tracker-phabricator,akkakks/phabricator,jwdeitch/phabricator,wikimedia/phabricator,Khan/phabricator,christopher-johnson/phabricator,folsom-labs/phabricator,r4nt/phabricator,Soluis/phabricator,wusuoyongxin/phabricator,a20012251/phabricator,apexstudios/phabricator,tanglu-org/tracker-phabricator,folsom-labs/phabricator,Symplicity/phabricator,WuJiahu/phabricator,aik099/phabricator,devurandom/phabricator,MicroWorldwide/phabricator,aswanderley/phabricator,wikimedia/phabricator-phabricator,kalbasit/phabricator,devurandom/phabricator,kalbasit/phabricator,benchling/phabricator,NigelGreenway/phabricator,akkakks/phabricator,folsom-labs/phabricator,UNCC-OpenProjects/Phabricator,tanglu-org/tracker-phabricator,Soluis/phabricator,WuJiahu/phabricator,shl3807/phabricator,cjxgm/p.cjprods.org,librewiki/phabricator,huangjimmy/phabricator-1,MicroWorldwide/phabricator,akkakks/phabricator,Automatic/phabricator,freebsd/phabricator,wikimedia/phabricator,benchling/phabricator,wikimedia/phabricator,wangjun/phabricator,NigelGreenway/phabricator,optimizely/phabricator,codevlabs/phabricator,wusuoyongxin/phabricator,a20012251/phabricator,gsinkovskiy/phabricator,kanarip/phabricator,NigelGreenway/phabricator,ide/phabricator,Automatic/phabricator,Khan/phabricator,sharpwhisper/phabricator,shrimpma/phabricator,phacility/phabricator,christopher-johnson/phabricator,matthewrez/phabricator,eSpark/phabricator,jwdeitch/phabricator,MicroWorldwide/phabricator,librewiki/phabricator,zhihu/phabricator,aswanderley/phabricator,schlaile/phabricator,NigelGreenway/phabricator,aik099/phabricator,christopher-johnson/phabricator,r4nt/phabricator,uhd-urz/phabricator,vinzent/phabricator,shrimpma/phabricator,eSpark/phabricator,ryancford/phabricator,vuamitom/phabricator,hach-que/unearth-phabricator,ryancford/phabricator,vuamitom/phabricator,librewiki/phabricator,codevlabs/phabricator,gsinkovskiy/phabricator,kwoun1982/phabricator,huaban/phabricator,leolujuyi/phabricator,kwoun1982/phabricator,telerik/phabricator,wxstars/phabricator,r4nt/phabricator,parksangkil/phabricator,uhd-urz/phabricator,coursera/phabricator,dannysu/phabricator,codevlabs/phabricator,hach-que/unearth-phabricator,Soluis/phabricator,leolujuyi/phabricator,Drooids/phabricator,wxstars/phabricator,aik099/phabricator,ide/phabricator,wusuoyongxin/phabricator,denisdeejay/phabricator,sharpwhisper/phabricator,Khan/phabricator,cjxgm/p.cjprods.org,kanarip/phabricator,ide/phabricator,eSpark/phabricator,librewiki/phabricator,optimizely/phabricator,UNCC-OpenProjects/Phabricator,shl3807/phabricator,aswanderley/phabricator,shrimpma/phabricator,optimizely/phabricator,freebsd/phabricator,ide/phabricator,devurandom/phabricator,huangjimmy/phabricator-1,coursera/phabricator,hshackathons/phabricator-deprecated,christopher-johnson/phabricator,telerik/phabricator,phacility/phabricator,uhd-urz/phabricator,Automatic/phabricator,cjxgm/p.cjprods.org,denisdeejay/phabricator,leolujuyi/phabricator,matthewrez/phabricator,apexstudios/phabricator,wikimedia/phabricator,optimizely/phabricator,UNCC-OpenProjects/Phabricator,wxstars/phabricator,zhihu/phabricator,vinzent/phabricator,memsql/phabricator,zhihu/phabricator,devurandom/phabricator,schlaile/phabricator,vinzent/phabricator,huaban/phabricator,wxstars/phabricator,codevlabs/phabricator,huangjimmy/phabricator-1,eSpark/phabricator,denisdeejay/phabricator,jwdeitch/phabricator,Symplicity/phabricator,memsql/phabricator,gsinkovskiy/phabricator,eSpark/phabricator,UNCC-OpenProjects/Phabricator,memsql/phabricator,parksangkil/phabricator,memsql/phabricator,Drooids/phabricator,schlaile/phabricator,optimizely/phabricator,Symplicity/phabricator,kanarip/phabricator,hach-que/phabricator,hach-que/unearth-phabricator,freebsd/phabricator,WuJiahu/phabricator,r4nt/phabricator,hach-que/phabricator,ryancford/phabricator,hach-que/phabricator,shl3807/phabricator,benchling/phabricator,matthewrez/phabricator,folsom-labs/phabricator,MicroWorldwide/phabricator,codevlabs/phabricator,devurandom/phabricator,ryancford/phabricator,zhihu/phabricator,sharpwhisper/phabricator,Soluis/phabricator,dannysu/phabricator,WuJiahu/phabricator,kwoun1982/phabricator,coursera/phabricator,benchling/phabricator,phacility/phabricator,freebsd/phabricator,wangjun/phabricator,tanglu-org/tracker-phabricator,hach-que/phabricator,a20012251/phabricator,kanarip/phabricator,hshackathons/phabricator-deprecated,hshackathons/phabricator-deprecated,a20012251/phabricator,uhd-urz/phabricator,shl3807/phabricator,kwoun1982/phabricator,wikimedia/phabricator-phabricator,akkakks/phabricator,librewiki/phabricator,hshackathons/phabricator-deprecated,kalbasit/phabricator,NigelGreenway/phabricator,zhihu/phabricator,hach-que/unearth-phabricator,sharpwhisper/phabricator,vinzent/phabricator,wikimedia/phabricator-phabricator,wangjun/phabricator,hach-que/phabricator,wusuoyongxin/phabricator,aik099/phabricator,Soluis/phabricator,shrimpma/phabricator,Symplicity/phabricator,wikimedia/phabricator-phabricator,gsinkovskiy/phabricator,vinzent/phabricator,tanglu-org/tracker-phabricator,a20012251/phabricator,dannysu/phabricator,vuamitom/phabricator,Automatic/phabricator,Drooids/phabricator,apexstudios/phabricator,parksangkil/phabricator,kalbasit/phabricator,huangjimmy/phabricator-1,uhd-urz/phabricator,Drooids/phabricator,cjxgm/p.cjprods.org,schlaile/phabricator,cjxgm/p.cjprods.org,gsinkovskiy/phabricator,dannysu/phabricator,folsom-labs/phabricator,jwdeitch/phabricator
9d7031b6dcf8c8ce6a36cdfc73c9d467a44517b5
js/game.js
js/game.js
var Game = function(boardString){ var board = ''; this.board = ''; if (arguments.length === 1) { this.board = this.toArray(boardString); } else { function random() { return Math.floor(Math.random() * 10 + 6); }; var firstTwo = random(), secondTwo = random(); for ( var i = 0; i < 16; i++ ) { if (i === firstTwo || i === secondTwo) { board += '2'; } else { board += '0'; }; }; this.board = this.toArray(board); } }; Game.prototype = { toString: function() { for( var i = 0; i < 16; i += 4){ this.array = this.board.slice(0 + i, 4 + i) console.log(this.array) } }, toArray: function(chars) { var boardArray = []; for( var i = 0; i < 16; i += 4) { var subarray = chars.slice(0 + i, 4 + i); boardArray.push(subarray.split('')); } return boardArray; } };
var Game = function(boardString){ var board = ''; this.board = ''; if (arguments.length === 1) { this.board = this.toArray(boardString); } else { function random() { return Math.floor(Math.random() * 10 + 6); }; var firstTwo = random(), secondTwo = random(); for ( var i = 0; i < 16; i++ ) { if (i === firstTwo || i === secondTwo) { board += '2'; } else { board += '0'; }; }; this.board = this.toArray(board); } }; Game.prototype = { toString: function() { this.board.forEach(function(row) { console.log(row.join('')); }); }, toArray: function(chars) { var boardArray = []; for( var i = 0; i < 16; i += 4) { var subarray = chars.slice(0 + i, 4 + i); boardArray.push(subarray.split('')); } return boardArray; } };
Modify toString method for board array format
Modify toString method for board array format
JavaScript
mit
suprfrye/galaxy-256,suprfrye/galaxy-256
b795f71c87be22da3892c6cc9eca607b229c66bf
packages/ember-data/lib/instance-initializers/initialize-store-service.js
packages/ember-data/lib/instance-initializers/initialize-store-service.js
/** Configures a registry for use with an Ember-Data store. @method initializeStore @param {Ember.ApplicationInstance} applicationOrRegistry */ export default function initializeStoreService(applicationOrRegistry) { var registry, container; if (applicationOrRegistry.registry && applicationOrRegistry.container) { // initializeStoreService was registered with an // instanceInitializer. The first argument is the application // instance. registry = applicationOrRegistry.registry; container = applicationOrRegistry.container; } else { // initializeStoreService was called by an initializer instead of // an instanceInitializer. The first argument is a registy. This // case allows ED to support Ember pre 1.12 registry = applicationOrRegistry; container = registry.container(); } // Eagerly generate the store so defaultStore is populated. var store = container.lookup('store:application'); registry.register('service:store', store, { instantiate: false }); }
/** Configures a registry for use with an Ember-Data store. @method initializeStore @param {Ember.ApplicationInstance} applicationOrRegistry */ export default function initializeStoreService(applicationOrRegistry) { var registry, container; if (applicationOrRegistry.registry && applicationOrRegistry.container) { // initializeStoreService was registered with an // instanceInitializer. The first argument is the application // instance. registry = applicationOrRegistry.registry; container = applicationOrRegistry.container; } else { // initializeStoreService was called by an initializer instead of // an instanceInitializer. The first argument is a registy. This // case allows ED to support Ember pre 1.12 registry = applicationOrRegistry; if (registry.container) { // Support Ember 1.10 - 1.11 container = registry.container(); } else { // Support Ember 1.9 container = registry; } } // Eagerly generate the store so defaultStore is populated. var store = container.lookup('store:application'); registry.register('service:store', store, { instantiate: false }); }
Support for Ember 1.9's container API after `store:application` refactor.
Support for Ember 1.9's container API after `store:application` refactor.
JavaScript
mit
andrejunges/data,Turbo87/ember-data,fpauser/data,Turbo87/ember-data,gniquil/data,flowjzh/data,Kuzirashi/data,tstirrat/ember-data,webPapaya/data,gkaran/data,eriktrom/data,minasmart/data,dustinfarris/data,danmcclain/data,workmanw/data,ryanpatrickcook/data,jgwhite/data,minasmart/data,HeroicEric/data,ryanpatrickcook/data,offirgolan/data,usecanvas/data,minasmart/data,XrXr/data,bcardarella/data,seanpdoyle/data,faizaanshamsi/data,hibariya/data,stefanpenner/data,jgwhite/data,flowjzh/data,Robdel12/data,zoeesilcock/data,splattne/data,rtablada/data,fpauser/data,davidpett/data,hibariya/data,Eric-Guo/data,jgwhite/data,workmanw/data,heathharrelson/data,eriktrom/data,zoeesilcock/data,pdud/data,PrecisionNutrition/data,Kuzirashi/data,gabriel-letarte/data,sammcgrail/data,usecanvas/data,davidpett/data,acburdine/data,nickiaconis/data,dustinfarris/data,tarzan/data,hibariya/data,Robdel12/data,yaymukund/data,gabriel-letarte/data,gniquil/data,danmcclain/data,davidpett/data,tarzan/data,wecc/data,bf4/data,EmberSherpa/data,greyhwndz/data,acburdine/data,pdud/data,andrejunges/data,zoeesilcock/data,ryanpatrickcook/data,arenoir/data,bcardarella/data,lostinpatterns/data,seanpdoyle/data,davidpett/data,fsmanuel/data,heathharrelson/data,fsmanuel/data,swarmbox/data,duggiefresh/data,whatthewhat/data,topaxi/data,acburdine/data,PrecisionNutrition/data,Eric-Guo/data,Eric-Guo/data,bf4/data,tstirrat/ember-data,Robdel12/data,pdud/data,Kuzirashi/data,courajs/data,simaob/data,sebweaver/data,duggiefresh/data,PrecisionNutrition/data,arenoir/data,workmanw/data,hibariya/data,vikram7/data,whatthewhat/data,thaume/data,fpauser/data,lostinpatterns/data,InboxHealth/data,whatthewhat/data,sebweaver/data,sammcgrail/data,wecc/data,gkaran/data,vikram7/data,sammcgrail/data,sebweaver/data,vikram7/data,dustinfarris/data,gniquil/data,EmberSherpa/data,XrXr/data,minasmart/data,bcardarella/data,eriktrom/data,heathharrelson/data,gabriel-letarte/data,H1D/data,H1D/data,mphasize/data,Turbo87/ember-data,jgwhite/data,lostinpatterns/data,andrejunges/data,eriktrom/data,EmberSherpa/data,seanpdoyle/data,InboxHealth/data,Kuzirashi/data,XrXr/data,sammcgrail/data,dustinfarris/data,courajs/data,offirgolan/data,swarmbox/data,lostinpatterns/data,splattne/data,andrejunges/data,tarzan/data,mphasize/data,rtablada/data,nickiaconis/data,faizaanshamsi/data,thaume/data,thaume/data,duggiefresh/data,vikram7/data,pdud/data,tarzan/data,splattne/data,heathharrelson/data,arenoir/data,usecanvas/data,danmcclain/data,bf4/data,tstirrat/ember-data,flowjzh/data,topaxi/data,webPapaya/data,thaume/data,wecc/data,rtablada/data,offirgolan/data,bf4/data,simaob/data,sebastianseilund/data,swarmbox/data,ryanpatrickcook/data,mphasize/data,H1D/data,splattne/data,topaxi/data,yaymukund/data,duggiefresh/data,simaob/data,yaymukund/data,seanpdoyle/data,workmanw/data,webPapaya/data,fsmanuel/data,sebastianseilund/data,XrXr/data,H1D/data,stefanpenner/data,simaob/data,nickiaconis/data,nickiaconis/data,mphasize/data,Turbo87/ember-data,flowjzh/data,greyhwndz/data,faizaanshamsi/data,webPapaya/data,stefanpenner/data,InboxHealth/data,swarmbox/data,bcardarella/data,sebweaver/data,courajs/data,tstirrat/ember-data,greyhwndz/data,rtablada/data,Robdel12/data,arenoir/data,sebastianseilund/data,whatthewhat/data,greyhwndz/data,gabriel-letarte/data,gniquil/data,fsmanuel/data,danmcclain/data,acburdine/data,faizaanshamsi/data,fpauser/data,InboxHealth/data,PrecisionNutrition/data,yaymukund/data,zoeesilcock/data,usecanvas/data,topaxi/data,gkaran/data,sebastianseilund/data,EmberSherpa/data,gkaran/data,offirgolan/data,courajs/data,HeroicEric/data,stefanpenner/data,wecc/data,Eric-Guo/data,HeroicEric/data,HeroicEric/data
81248f3d84a40336e9d9d0e9a4f5c43441d0e381
main.js
main.js
var app = require('http').createServer(handler); var io = require('socket.io').listen(app); var fs = require('fs'); var util = require('util'); var Tail = require('tail').Tail; var static = require('node-static'); var file = new static.Server('./web', {cache: 6}); //cache en secondes function handler (req, res) { if( req.url == '/') { file.serveFile('/index.html', 200, {}, req, res); } req.addListener('end', function() { file.serve(req, res); }).resume(); } app.listen(1337, '0.0.0.0'); function followFile(socket, file) { try { tail = new Tail(file); } catch (err) { socket.emit('cant follow', {reason: err.code, file: file}); return; } tail.on("line", function(data) { socket.emit('line', {file:file, data:data}); }); socket.emit('followed', {file: file}); } io.sockets.on('connection', function (socket) { socket.on('follow', function(data) { followFile(socket, data.file); }); });
var app = require('http').createServer(handler); var io = require('socket.io').listen(app); var fs = require('fs'); var util = require('util'); var Tail = require('tail').Tail; var static = require('node-static'); var file = new static.Server('./web', {cache: 6}); //cache en secondes var loadNbLines = 10; function handler (req, res) { if( req.url == '/') { file.serveFile('/index.html', 200, {}, req, res); } req.addListener('end', function() { file.serve(req, res); }).resume(); } app.listen(1337, '0.0.0.0'); function followFile(socket, file) { try { tail = new Tail(file); } catch (err) { socket.emit('cant follow', {reason: err.code, file: file}); return; } fs.readFile(file, {encoding: "utf-8"}, function(err, data) { parts = data.split("\n"); len = parts.length; if (len <= loadNbLines) start = 0; else start = len - loadNbLines - 1; for (i = start; i < len; i++) { socket.emit('line', {file:file, data:parts[i]}); } }); tail.on("line", function(data) { socket.emit('line', {file:file, data:data}); }); socket.emit('followed', {file: file}); } io.sockets.on('connection', function (socket) { socket.on('follow', function(data) { followFile(socket, data.file); }); });
Read 10 lines from the file when starting to follow
Read 10 lines from the file when starting to follow
JavaScript
mit
feuloren/logreader
2e5ed8a3bbf39be10cc528047345b43c9595eecf
client/app/components/printerList/index.js
client/app/components/printerList/index.js
import React, { PropTypes } from 'react'; import style from './style.css'; import Printer from '../printer'; class PrinterListComponent extends React.Component { getPrinterComponent(key) { return (<Printer {...this.props.printers[key]} key={key} toggleSelected={() => { this.props.toggleSelected(key); }} />); } generatePrinterList() { let keys = Object.keys(this.props.printers); let printerRows = []; if (keys.length > 0) { let howManyTimes = Math.floor(keys.length / 2); for (let i = 0; i < howManyTimes; i+=1) { console.log(Math.floor(keys.length/2)); printerRows.push( <div key={i}> {this.getPrinterComponent(keys[i * 2])} { keys[(i * 2) + 1] && this.getPrinterComponent(keys[(i * 2) + 1])} </div>); } return printerRows; } return (<div></div>); } render() { return ( <div className={style.printerList}> {this.generatePrinterList()} </div>); } } PrinterListComponent.propTypes = { printers: PropTypes.object.isRequired, toggleSelected: PropTypes.func.isRequired, }; export default PrinterListComponent;
import React, { PropTypes } from 'react'; import style from './style.css'; import Printer from '../printer'; class PrinterListComponent extends React.Component { getPrinterComponent(key) { return (<Printer {...this.props.printers[key]} key={key} toggleSelected={() => { this.props.toggleSelected(key); }} />); } generatePrinterList() { let keys = Object.keys(this.props.printers); let printerRows = []; if (keys.length > 0) { let howManyTimes = Math.ceil(keys.length / 2); for (let i = 0; i < howManyTimes; i+=1) { printerRows.push( <div key={i}> {this.getPrinterComponent(keys[i * 2])} { keys[(i * 2) + 1] && this.getPrinterComponent(keys[(i * 2) + 1])} </div>); } return printerRows; } return (<div></div>); } render() { return ( <div className={style.printerList}> {this.generatePrinterList()} </div>); } } PrinterListComponent.propTypes = { printers: PropTypes.object.isRequired, toggleSelected: PropTypes.func.isRequired, }; export default PrinterListComponent;
Fix last printer not showing when there was odd number of printers
Fix last printer not showing when there was odd number of printers
JavaScript
agpl-3.0
MakersLab/farm-client,MakersLab/farm-client
bc548adb239f564fa0815fa050a9c0e9d6f59ed7
main.js
main.js
import Bot from 'telegram-api/build'; import Message from 'telegram-api/types/Message'; import subscribe from './commands/subscribe'; import doc from './commands/doc'; let bot = new Bot({ token: '121143906:AAFJz_-Bjwq_8KQqTmyY2MtlcPb-bX_1O7M' }); bot.start(); const welcome = new Message().text(`Hello! I give you services to search across various sources such as MDN, GitHub, etc. Commands: /subscribe - Subscribe to /r/javascript and get a message for each new message /unsubscribe - Unsubscribe /doc [subject] - Search MDN for the given subject`); bot.command('start', message => { bot.send(welcome.to(message.chat.id)); }); subscribe(bot); doc(bot);
import Bot from 'telegram-api/build'; import Message from 'telegram-api/types/Message'; import subscribe from './commands/subscribe'; import doc from './commands/doc'; let bot = new Bot({ token: '121143906:AAFJz_-Bjwq_8KQqTmyY2MtlcPb-bX_1O7M' }); bot.start(); const COMMANDS = `Commands: /subscribe - Subscribe to /r/javascript and get a message for each new message /unsubscribe - Unsubscribe /doc [subject] - Search MDN for the given subject /github [subject] - Search GitHub for a repository /npm [subject] - Search NPM for a package`; const start = new Message().text(`Hello! I give you services to search across various sources such as MDN, GitHub, etc. ${COMMANDS}`); bot.command('start', message => { bot.send(start.to(message.chat.id)); }); const help = new Message().text(COMMANDS); bot.command('help', message => { bot.send(help.to(message.chat.id)); }); subscribe(bot); doc(bot);
Add help command Add github and npm to commands
Add help command Add github and npm to commands
JavaScript
artistic-2.0
mdibaiee/webdevrobot
d23a9060c4174db9b99a2e54924223e79ac5a828
packages/custom/voteeHome/public/tests/voteeHome.spec.js
packages/custom/voteeHome/public/tests/voteeHome.spec.js
'use strict'; (function() { describe("voteeHome", function() { beforeEach(function() { module('mean'); module('mean.voteeHome'); }); var $controller; var $scope; beforeEach(inject(function(_$controller_){ // The injector unwraps the underscores (_) from around the parameter names when matching $controller = _$controller_; })); describe("voteeHome controller", function() { beforeEach(function() { $scope = {}; var controller = $controller('VoteeHomeController', { $scope: $scope }); }); it("stub", function() { expect(true).toBe(true); }); }); describe("header controller", function() { beforeEach(function() { $scope = {}; var controller = $controller('VoteeHeaderController', { $scope: $scope }); }); it("Has a menu", function() { expect($scope.menus).toBeDefined(); expect($scope.menus).not.toBeNull(); expect($scope.menus.length).not.toBe(0); }); }); }); }());
'use strict'; (function() { describe("voteeHome", function() { beforeEach(function() { module('mean'); module('mean.voteeHome'); }); var $controller; var $scope; beforeEach(inject(function(_$controller_){ // The injector unwraps the underscores (_) from around the parameter names when matching $controller = _$controller_; })); describe("voteeHome controller", function() { beforeEach(function() { $scope = {}; var controller = $controller('VoteeHomeController', { $scope: $scope }); }); it('should expose some global scope', function() { expect(true).toBeTruthy(); }); }); describe("header controller", function() { beforeEach(function() { $scope = {}; var controller = $controller('VoteeHeaderController', { $scope: $scope }); }); it("Has a menu", function() { expect($scope.menus).toBeDefined(); expect($scope.menus).not.toBeNull(); expect($scope.menus.length).not.toBe(0); }); }); }); }());
Use the 'should expose some global scope' test
Use the 'should expose some global scope' test As seen in examples when there doesn't seem to be anything else to test.
JavaScript
mit
lewkoo/Votee,lewkoo/Votee,lewkoo/Votee
ce9abc43dbc217d800f833cff36ee3e51e85a2e9
assignFAST/assignFASTExample.js
assignFAST/assignFASTExample.js
/* javascript in this file controls the html page demonstrating the autosubject functionality */ /**************************************************************************************/ /* Set up and initialization */ /**************************************************************************************/ /* initial setup - called from onLoad attaches the autocomplete function to the search box */ var currentSuggestIndexDefault = "suggestall"; //initial default value function setUpPage(number) { // connect the autoSubject to the input areas $('#keyword' + number).autocomplete( { source: autoSubjectExample, minLength: 1, select: function(event, ui) { $('#fastID' + number).val(ui.item.idroot); $('#fastType' + number).val(ui.item.tag); $('#fastInd' + number).val(ui.item.indicator); } //end select } ).data( "autocomplete" )._renderItem = function( ul, item ) { formatSuggest(ul, item);}; } //end setUpPage() /* example style - simple reformatting */ function autoSubjectExample(request, response) { currentSuggestIndex = currentSuggestIndexDefault; autoSubject(request, response, exampleStyle); } /* For this example, replace the common subfield break of -- with / */ function exampleStyle(res) { return res["auth"].replace("--","/") + ' (' + getTypeFromTag(res['tag']) + ')'; }
/* javascript in this file controls the html page demonstrating the autosubject functionality */ /**************************************************************************************/ /* Set up and initialization */ /**************************************************************************************/ /* initial setup - called from onLoad attaches the autocomplete function to the search box */ var currentSuggestIndexDefault = "suggest50"; //initial default value function setUpPage(number) { // connect the autoSubject to the input areas $('#keyword' + number).autocomplete( { source: autoSubjectExample, minLength: 1, select: function(event, ui) { $('#fastID' + number).val(ui.item.idroot); $('#fastType' + number).val(ui.item.tag); $('#fastInd' + number).val(ui.item.indicator); } //end select } ).data( "autocomplete" )._renderItem = function( ul, item ) { formatSuggest(ul, item);}; } //end setUpPage() /* example style - simple reformatting */ function autoSubjectExample(request, response) { currentSuggestIndex = currentSuggestIndexDefault; autoSubject(request, response, exampleStyle); } /* For this example, replace the common subfield break of -- with / */ function exampleStyle(res) { return res["auth"].replace("--","/"); }
Revert "Display the tag/facet of the selected term in the input"
Revert "Display the tag/facet of the selected term in the input" This reverts commit f85613a9af711a4aeb27b3bbe6efe8592e8318ce.
JavaScript
mit
dkudeki/metadata-maker,dkudeki/metadata-maker
81b1d18eff0f5734aa64b780897bd8f7bb1bdb31
models/user.js
models/user.js
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var UserSchema = new Schema( { lastName : String, firstName : String, username : String, passwordHash : String, privateKey : String, picture : String, level : String, description : String, created : Date, birthday : Date, universityGroup : String, website : String, }); module.exports = mongoose.model('User', UserSchema);
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var UserSchema = new Schema( { lastName : String, firstName : String, username : String, email : String, passwordHash : String, privateKey : String, picture : String, level : String, description : String, created : Date, birthday : Date, universityGroup : String, website : String, }); module.exports = mongoose.model('User', UserSchema);
Add Email field to User
Add Email field to User
JavaScript
mit
asso-labeli/labeli-api,asso-labeli/labeli-api,asso-labeli/labeli-api
be01e76023213f35d99f69ffc440906022e218ee
src/js/select2/i18n/hu.js
src/js/select2/i18n/hu.js
define(function () { // Hungarian return { errorLoading: function () { return 'Az eredmények betöltése nem sikerült.'; }, inputTooLong: function (args) { var overChars = args.input.length - args.maximum; return 'Túl hosszú. ' + overChars + ' karakterrel több, mint kellene.'; }, inputTooShort: function (args) { var remainingChars = args.minimum - args.input.length; return 'Túl rövid. Még ' + remainingChars + ' karakter hiányzik.'; }, loadingMore: function () { return 'Töltés…'; }, maximumSelected: function (args) { return 'Csak ' + args.maximum + ' elemet lehet kiválasztani.'; }, noResults: function () { return 'Nincs találat.'; }, searching: function () { return 'Keresés…'; }, removeAllItems: function () { return 'Távolítson el minden elemet'; } }; });
define(function () { // Hungarian return { errorLoading: function () { return 'Az eredmények betöltése nem sikerült.'; }, inputTooLong: function (args) { var overChars = args.input.length - args.maximum; return 'Túl hosszú. ' + overChars + ' karakterrel több, mint kellene.'; }, inputTooShort: function (args) { var remainingChars = args.minimum - args.input.length; return 'Túl rövid. Még ' + remainingChars + ' karakter hiányzik.'; }, loadingMore: function () { return 'Töltés…'; }, maximumSelected: function (args) { return 'Csak ' + args.maximum + ' elemet lehet kiválasztani.'; }, noResults: function () { return 'Nincs találat.'; }, searching: function () { return 'Keresés…'; }, removeAllItems: function () { return 'Távolítson el minden elemet'; }, removeItem: function () { return 'Elem eltávolítása'; }, search: function() { return 'Keresés'; } }; });
Update Hungarian translation for new strings
Update Hungarian translation for new strings Updated Hungarian translation.
JavaScript
mit
select2/select2,select2/select2