conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add spec for negative input values\n"
},
{
"from": "human",
"value": "describe('validateInput', function() {\n it(\"is true if the input yields a valid integer when parsed\", function() {\n expect(validateInput('100')).to.equal(true);\n expect(validateInput('... | javascript | chosen |
[
{
"from": "system",
"value": "Include title regex in handler setup\n"
},
{
"from": "human",
"value": "const defaultConfig = require('./default-config')\nconst generateLabel = require('./generate-label')\n\n/**\n * Returns the regex, labels and config object used in every handler\n * @param {obje... | javascript | chosen |
[
{
"from": "system",
"value": "Check status before closing the modal\n"
},
{
"from": "human",
"value": "var _ = require('underscore');\nvar OnboardingView = require('../layer-onboarding-view');\nvar AnalysesService = require('../../../../editor/layers/layer-content-views/analyses/analyses-service... | javascript | chosen |
[
{
"from": "system",
"value": "Set default pageSize 50 to 100.\n"
},
{
"from": "human",
"value": "/**\n * Created by dungvn3000 on 2/11/14.\n */\n\nExt.define('sunerp.store.BaseStore', {\n extend: 'Ext.data.Store',\n requires: [\n 'sunerp.store.Restx'\n ],\n autoLoad: false,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change path of config files\n"
},
{
"from": "human",
"value": "'use strict';\n// Handles params concerning configuration files in the $routeProvider phase\nangular.module('arethusa.core').factory('confUrl', [\n '$route',\n function ($route) {\n return function ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix css and fix small typo in installer\n"
},
{
"from": "human",
"value": "define(function(require, exports, module) {\n main.consumes = [\"Plugin\", \"installer\", \"c9\"];\n main.provides = [\"installer.darwin\"];\n return main;\n \n function main(o... | javascript | chosen |
[
{
"from": "system",
"value": "Set timeout of five minutes"
},
{
"from": "human",
"value": "'use strict';\n\nconst mocha = require('mocha');\n\nconst BaseWorker = require('./BaseWorker');\nconst EventsBus = require('../libs/EventsBus');\nconst Util = require('../libs/Util');\n\nclass MochaWorker ... | javascript | chosen |
[
{
"from": "system",
"value": "Use destructuring instead of merge for childrenWithDefaults\n"
},
{
"from": "human",
"value": "import React, { Children } from \"react\";\nimport merge from \"lodash.merge\";\nimport resolveCellDefaults from \"./resolve-cell-defaults\";\nimport resolveColumnCounts f... | javascript | chosen |
[
{
"from": "system",
"value": "Add caching to static files\n"
},
{
"from": "human",
"value": "import path from 'path'\nimport express from 'express'\nimport bodyParser from 'body-parser'\nimport { graphqlExpress, graphiqlExpress } from 'graphql-server-express'\n\nimport { enableGraphiQL } from '.... | javascript | chosen |
[
{
"from": "system",
"value": "Allow the original_size property to be extracted from the tumblr api response\n"
},
{
"from": "human",
"value": "App.SubPhoto = DS.Model.extend({\n caption: DS.attr('string'),\n\n // original_size: DS.belongsTo('sub_photo_instance'),\n alt_sizes: DS.hasMany('sub_... | javascript | chosen |
[
{
"from": "system",
"value": "Fix long line linter error\n"
},
{
"from": "human",
"value": "const ValidConstraints = [\"unique\", \"like\", \"unlike\", \"cluster\", \"group_by\", \"max_per\"];\n\nexport default Object.freeze(ValidConstraints);\n"
},
{
"from": "gpt",
"value": "const V... | javascript | chosen |
[
{
"from": "system",
"value": "Handle error event chat tcp\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar net = require('net'),\n chatServer = net.createServer(),\n clientList = [];\n\nvar removeClient = function (data) {\n clientList.splice(clientList.indexOf(5), 1);\n}... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing author tag to nb locale\n"
},
{
"from": "human",
"value": "import formatDistance from './_lib/formatDistance/index.js'\nimport formatLong from './_lib/formatLong/index.js'\nimport formatRelative from './_lib/formatRelative/index.js'\nimport localize from... | javascript | chosen |
[
{
"from": "system",
"value": "Add updateComponent function that will forceUpdate the last story instead of recreate it\n"
},
{
"from": "human",
"value": "import { stripIndents } from 'common-tags';\nimport Vue from 'vue';\n\nlet app = null;\n\nfunction renderRoot(options) {\n if (app) app.$dest... | javascript | chosen |
[
{
"from": "system",
"value": "fix(writer): Fix path generation for windows\n\nCloses #28"
},
{
"from": "human",
"value": "import fs from 'fs';\nimport path from 'path';\nimport dot from 'dot';\nimport { encoding } from '../constants';\n\ndot.templateSettings.strip = false;\n\nfunction getRelativ... | javascript | chosen |
[
{
"from": "system",
"value": "Rename lodash variable to _\n"
},
{
"from": "human",
"value": "import fsp from 'fs-promise';\nimport lodash from 'lodash';\n\nexport function getCommitMsg (path) {\n return fsp.readFile(path, {encoding: 'utf8'});\n}\n\nexport function getIssueReference(msgToParse, ... | javascript | chosen |
[
{
"from": "system",
"value": "Add tokenization and part of speech to the plugin.reply args dict.\n"
},
{
"from": "human",
"value": "define(\n['jquery'], function(jquery) {\n var jQuery = jquery;\n\n return {\n responsePlugins: [],\n persistentStorage: {},\n sessionStor... | javascript | chosen |
[
{
"from": "system",
"value": "Allow modals to close themselves\n\nFor example on accept.\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nimport Top from 'app/containers/top'\nimport Login from 'app/containers/login.js'\nimport Console from 'app/containers/console.js'\nimport Fla... | javascript | chosen |
[
{
"from": "system",
"value": "Fix window load event handler installation\n"
},
{
"from": "human",
"value": "var pymChild = new pym.Child({\n id: \"contactmps-embed-parent\"\n});\n\n$(window).on('onload', function() {\n pymChild.sendHeight();\n console.info(\"contactmps child loaded\");\n});\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use standard binding with context\n"
},
{
"from": "human",
"value": "var cdb = require('cartodb.js');\n\n/**\n * Responsible for likes (♥ 123) and its toggling behaviour.\n */\nmodule.exports = cdb.core.View.extend({\n tagName: 'a',\n\n events: {\n 'click': '_t... | javascript | chosen |
[
{
"from": "system",
"value": "Fix: Resolve path to local sap-ui-core.js correctly\n"
},
{
"from": "human",
"value": "var initOpenUI5 = function (files, ui5Config) {\n\tif (ui5Config.useMockServer) {\n\t\tfiles.unshift({pattern: __dirname + '/mockserver.js', included: true, served: true, watched:... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to latest bixby changes.\n"
},
{
"from": "human",
"value": "exports = module.exports = function express(id) {\n var map = {\n 'service': './service',\n 'authenticator': './authenticator',\n 'boot/httpserver': './boot/httpserver'\n };\n \n var m... | javascript | chosen |
[
{
"from": "system",
"value": "PUBAPI-439: Make IMGAPI available as IMGAPI2 for a first test.\n"
},
{
"from": "human",
"value": "// Copyright 2012 Joyent, Inc. All rights reserved.\n\nvar Amon = require('./amon');\nvar CA = require('./ca');\nvar FWAPI = require('./fwapi');\nvar NAPI = require('.... | javascript | chosen |
[
{
"from": "system",
"value": "Update for change in the way a Segment is stored\n"
},
{
"from": "human",
"value": "var utils = exports\n\nutils.segmentIsHeader = function(segment) {\n if (segment.hasOwnProperty('SegmentType')) {\n return utils.segmentTypeIsHeader(segment.SegmentType)\n }\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Move importing of the server module inside the scope of the worker process. This change saves us unnecessary redis connections to the master process\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Load environment vars.\nrequire('dotenv').config();\n\nconst c... | javascript | chosen |
[
{
"from": "system",
"value": "Improve commentary for 2d scrolling example.\n"
},
{
"from": "human",
"value": "var scrollingExample = {\n box: {\n id: \"clip\",\n className: \"clip\",\n children: {\n id: \"image\",\n className: \"image\"\n }\n ... | javascript | chosen |
[
{
"from": "system",
"value": "fix(ie): Fix createTreeWalker() quirsk in IE.\n"
},
{
"from": "human",
"value": "import isRootNode from './is-root-node';\nimport isSlotNode from './is-slot-node';\n\nexport default function(root) {\n // IE requies the last argument, so we must provide both the 3rd... | javascript | chosen |
[
{
"from": "system",
"value": "Remove console.log call on load"
},
{
"from": "human",
"value": "/**\n * @license Copyright (c) 2012, The Dojo Foundation All Rights Reserved.\n * Available via the MIT or new BSD license.\n * see: http://github.com/volojs/grunt-volo for details\n */\n\n/*jslint nod... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for 27250 Heading\n"
},
{
"from": "human",
"value": "var chai = require(\"chai\");\nchai.Should();\nchai.use(require('chai-things'));\n\n\ndescribe('127250 Heading', function () {\n it('Magnetic sentence converts', function () {\n var tree = require(\".... | javascript | chosen |
[
{
"from": "system",
"value": "Add custom port to the redirect path\n"
},
{
"from": "human",
"value": "var conf = require('../../conf');\n\n/**\n * Check whether Transport Layer Security (TLS) is forced in the config. If\n * forceTLS option is set to true, redirect all unsecured HTTP traffic to H... | javascript | chosen |
[
{
"from": "system",
"value": "Stop opening of new tabs, the pages include links back to admin page\n"
},
{
"from": "human",
"value": "currentSearch = new Mongo.Collection(\"currentsearch\");\n\nMeteor.subscribe('movies');\nMeteor.subscribe('tv');\nMeteor.subscribe('cpapi');\n\nSession.set('searc... | javascript | chosen |
[
{
"from": "system",
"value": "Call done callback to enable auto logins after clicking on email verification link\n"
},
{
"from": "human",
"value": "Session.set('currentTopic');\nSession.setDefault('topicsLimit', 10);\n// Session.setDefault('profileCommentsLimit', 20);\nSession.setDefault('curren... | javascript | chosen |
[
{
"from": "system",
"value": "Fix translation of month of January for Ukrainian localization\n"
},
{
"from": "human",
"value": "/**\n * Ukrainian translation for bootstrap-datepicker\n * Igor Polynets\n */\n;(function($){\n\t$.fn.datepicker.dates['uk'] = {\n\t\tdays: [\"Неділя\", \"Понеділок\", ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error thrown by React testUtils - we required React before setting up `window` and `document`, which caused testUtils to throw error\n"
},
{
"from": "human",
"value": "import assert from 'assert';\nimport React from 'react/addons';\nimport jsdom from 'jsdom';\... | javascript | chosen |
[
{
"from": "system",
"value": "Add ext to eslint config.\n"
},
{
"from": "human",
"value": "var lint = require('mocha-eslint');\n\nvar paths = [\n 'bin',\n 'lib',\n 'test'\n];\n\nvar options = {};\nlint(paths, options);\n"
},
{
"from": "gpt",
"value": "var lint = require('mocha-esl... | javascript | chosen |
[
{
"from": "system",
"value": "Add event smoke test, not automated (yet)\n"
},
{
"from": "human",
"value": "var window = Ti.UI.createWindow({\n theme: \"Theme.AppCompat.Light\"\n});\n\nvar section = Ti.UI.createListSection({});\n\nvar list = require('power-templates').createListView({\n templat... | javascript | chosen |
[
{
"from": "system",
"value": "Remove features added in last version\n"
},
{
"from": "human",
"value": "module.exports = function ({target, store, component, diff, options, raf}) {\n raf = raf != null ? raf : window.requestAnimationFrame\n\n if (options != null) {\n options.dispatch = dispat... | javascript | chosen |
[
{
"from": "system",
"value": "Clean auth data from storage before each acceptance test\n\nI run into problems of tests signing in a test user when they were not\nsupposed to, which usually made the test fail as all the data was not\navailable (permissions etc).\n\nThis commit fixes the problem by always cle... | javascript | chosen |
[
{
"from": "system",
"value": "chore(examples): Add another example for removing import\n"
},
{
"from": "human",
"value": "/*eslint-disable no-undef*/\nimport \"./style.css\";\n\nrequire(\"./style.css\");\n\nimport(\"./style.css\");\n\ncustom_require_function(\"./style.css\");\n\nObject.method(\"... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for length 3\n"
},
{
"from": "human",
"value": "var expect = require('chai').expect;\nvar allPermutations = require('../index').allPermutations;\n\ndescribe('allPermutations', function () {\n it('should return empty list when called with nothing', function... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused imports, fixing coding style issues.\n\nSigned-off-by: YusukeIwaki <488a597b88cf2030e9a0979097e61c65753a1a57@i3-systems.com>\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst Router = require('express').Router\nconst passport = require('passport... | javascript | chosen |
[
{
"from": "system",
"value": "Fix polyfill inclusion for dummy site\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst EmberAddon = require('ember-cli/lib/broccoli/ember-addon');\nconst urls = require('./lib/prember-urls');\n\nmodule.exports = function(defaults) {\n var includePolyfill =... | javascript | chosen |
[
{
"from": "system",
"value": "Add polyfill.io service to template\n"
},
{
"from": "human",
"value": "import stylesheet from '@kaliber/build/lib/stylesheet'\nimport javascript from '@kaliber/build/lib/javascript'\nimport styles from '/index.css'\n\nexport default (\n <html lang='nl'>\n <head>... | javascript | chosen |
[
{
"from": "system",
"value": "Change Id zero to empty\n"
},
{
"from": "human",
"value": "function Id(a) {\n this.value = a;\n}\n\n// Semigroup (value must also be a Semigroup)\nId.prototype.concat = function(b) {\n return new Id(this.value.concat(b.value));\n};\n\n// Monoid (value must als... | javascript | chosen |
[
{
"from": "system",
"value": "Remove semicolon from javascript object definition"
},
{
"from": "human",
"value": "var format = require(\"util\").format;\nvar types = [\"ham\", \"pb&b\"];\n\nmodule.exports = function (tennu) {\n return {\n dependencies: [],\n exports: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change treeData to be explicitly declared.\n"
},
{
"from": "human",
"value": "// Auto-magically referenced. Yay.\n\n$(document).ready(function() {\n var rubyFolders = gon.folders;\n var folders = {};\n \n var currentId = gon.currentFolder.id;\n \n // Convert a... | javascript | chosen |
[
{
"from": "system",
"value": "Add check if tokenfield exists\n"
},
{
"from": "human",
"value": "function split( val ) {\n\treturn val.split( /,\\s*/ );\n}\n\nfunction extractLast( term ) {\n\treturn split( term ).pop();\n}\n\n$( document ).ready(function() {\n\tvar groups = $('.tokenfield').attr... | javascript | chosen |
[
{
"from": "system",
"value": "Use slash instead of path.sep to have identical behavior in windows.\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst sourcemaps = require('gulp-sourcemaps')\nconst concat = require('gulp-concat')\nconst footer = require('gulp-footer')\nconst uglify = requir... | javascript | chosen |
[
{
"from": "system",
"value": "Fix \"Audio is read-only\" error\n"
},
{
"from": "human",
"value": "/* eslint-env node */\n/* global console, alert */\n\nvar Chart = require('./chart');\nvar PageTitle = require('./page-title');\nvar PageIcon = require('./page-icon');\nvar Pings = require('./pings'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix time too long in small mobile device\n"
},
{
"from": "human",
"value": "export default ({minute, second, millisecond}) => (\n <div style={{ display: 'inline-block' }}>\n {minute}:{second}:{millisecond}\n </div>\n)\n"
},
{
"from": "gpt",
"value":... | javascript | chosen |
[
{
"from": "system",
"value": "Use require.resolve to resolve node-pre-gyp.\n"
},
{
"from": "human",
"value": "if (process.platform === 'darwin') {\n var spawn = require('child_process').spawn;\n var args = ['install', '--fallback-to-build'];\n var options = {stdio: 'inherit'};\n var child = ... | javascript | chosen |
[
{
"from": "human",
"value": "Move listing page header to separate component\n"
},
{
"from": "gpt",
"value": "import React from 'react'\n\nconst ListingHeader = (props) => {\n return (\n <div className=\"well well-sm\">\n <strong>Display</strong>\n <div className=\... | javascript | chosen |
[
{
"from": "system",
"value": "Update the playground to support custom services\n"
},
{
"from": "human",
"value": "/*global Playground*/\n\n(function() {\n \"use strict\";\n\n Playground.VideoService = Conductor.Oasis.Service.extend({\n initialize: function (port) {\n this.sandbox.video... | javascript | chosen |
[
{
"from": "system",
"value": "Change from /prev to /v1\n"
},
{
"from": "human",
"value": "var Chalk = require('chalk');\nvar Cli = require('structured-cli');\nvar Open = require('opn');\n\n\nmodule.exports = Cli.createCommand('edit', {\n description: 'Edit this webtask in your browser',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix checkbox id to take form prefix into account.\n"
},
{
"from": "human",
"value": "(function($) {\n 'use strict';\n\n var $parent = $('#apps-newsletter-subscribe');\n var $checkbox = $parent.find('#id_newsletter');\n var $settings = $parent.find('.news... | javascript | chosen |
[
{
"from": "system",
"value": "Add DEBUG log switch to show errored SQL queries\n\n"
},
{
"from": "human",
"value": "import knexjs from 'knex'\nimport * as logger from '../app/support/debugLogger';\nimport { load as configLoader } from './config'\n\nconst config = configLoader()\n\nconst knex = k... | javascript | chosen |
[
{
"from": "system",
"value": "Add function in PeriodicTable to show the given element\n"
},
{
"from": "human",
"value": "var PeriodicTable = function() {\n this.board = new Array;\n\n this.elements = new Object;\n for(var row = 0; row < 9; row++) {\n var tableRow = new Array;\n for(var ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix routing bug by making sure `/` always is part of route path\n"
},
{
"from": "human",
"value": "import Vue from 'vue'\nimport Router from 'vue-router'\n\nVue.use(Router)\n\nconst router = new Router({\n mode: 'history',\n path: __dirname,\n routes: [\n {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Implement returning SpaCy info when calling the root with GET\n"
},
{
"from": "human",
"value": "let express = require('express');\nlet router = express.Router();\nconst spacyNLP = require('spacy-nlp');\nconst nlp = spacyNLP.nlp;\n\nrouter.get('/', (req, res) => {\n... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Add release tag in sentry\n"
},
{
"from": "human",
"value": "const { ApolloServer } = require('apollo-server-micro')\n\nconst { schema } = require('./schema')\nconst { createErrorFormatter, sentryIgnoreErrors } = require('./errors')\n\nmodule.exports = function... | javascript | chosen |
[
{
"from": "system",
"value": "Add code cleaning for push\n"
},
{
"from": "human",
"value": "import 'babel-polyfill'\nimport React from 'react'\nimport { render } from 'react-dom'\nimport { Provider } from 'react-redux'\nimport store from './app/store'\nimport Forecast from './app/Forecast'\nimpo... | javascript | chosen |
[
{
"from": "system",
"value": "Remove get and set from public api to avoid anti-pattern usage.\n"
},
{
"from": "human",
"value": "import createStore from './store'\nimport createAction from './action'\nimport { createProvide, createSubscribe } from './injection'\n\n\nfunction createAlfa() {\n fu... | javascript | chosen |
[
{
"from": "system",
"value": "Remove an unnecessary arrow function\n"
},
{
"from": "human",
"value": "import mapValues from 'lodash.mapValues';\nimport isPlainObject from 'lodash.isPlainObject';\nimport { Iterable } from 'immutable';\n\nexport function isImmutable(obj) {\n return Iterable.isIte... | javascript | chosen |
[
{
"from": "system",
"value": "Set App as class, add its state\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport YTSearch from 'youtube-api-search'\nimport SearchBar from './components/search_bar'\nconst API_KEY = 'AIzaSyBKBu77HCUT6I3oZiFXlaI... | javascript | chosen |
[
{
"from": "system",
"value": "Add nice database close for RSS\n"
},
{
"from": "human",
"value": "var _ = require('lodash'),\n async = require('async'),\n checkForFiling = require('./check'),\n request = require('request'),\n models = require('../../models'),\n parser = require('rs... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unix dependent shebang from a js file\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n'use strict';\n\nimport * as bus from './bus';\nimport * as ble from './ble';\nimport * as serial from './serial';\nimport * as enocean from './enocean';\n\nlet url;... | javascript | chosen |
[
{
"from": "system",
"value": "Implement functionality to register if a click occured outside of the decorated component\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\n\nexport default function ClickOutsideHOC(WrappedComponent) {\n function getDisplayName() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Load markdown.js in the asset pipeline\n"
},
{
"from": "human",
"value": "/*\n *= require 'jquery'\n *= require 'jquery_ujs'\n *= require 'underscore'\n *= require 'backbone'\n *= require 'swfobject'\n *= require 'jque... | javascript | chosen |
[
{
"from": "system",
"value": "Add <em> to the supported Html tags.\n"
},
{
"from": "human",
"value": "HtmlTag = MarkupTag.extend({\n\t_tags: 'i,b,strong,s,strike',\n\n\trender: function(content) {\n\t\treturn '<' + this.definition + (content != null \n\t\t\t\t? '>' + content + '</' + this.name +... | javascript | chosen |
[
{
"from": "system",
"value": "Reset beginning view coordinates to center of sphere\n"
},
{
"from": "human",
"value": "import {Entity} from 'aframe-react';\nimport React from 'react';\n\nexport default props => (\n <Entity>\n <Entity camera=\"\" position=\"0 0 -2\" rotation=\"0 0 0\" look-con... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug with domain warning"
},
{
"from": "human",
"value": "var SearchStats = {\n timeout: null,\n\n init: function() {\n self = this;\n\n if (!SEARCH_STATS_URL) {\n return;\n }\n\n EventSystem.addEventListener('new_sear... | javascript | chosen |
[
{
"from": "system",
"value": "Use default port fo compiling skin\n"
},
{
"from": "human",
"value": "const puppeteer = require(\"puppeteer\");\n\n// const DATA_URI = /url\\([^)]+\\)/g;\n\n(async () => {\n const browser = await puppeteer.launch();\n const page = await browser.newPage();\n // TO... | javascript | chosen |
[
{
"from": "system",
"value": "Fix missing function reference in Make command\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst commands = {\n\t\n\t/* Run GNU Make from project directory */\n\t\"user:make\" (){\n\t\tconst projectPath = atom.project.getPaths();\n\t\texec(`cd '${projectPa... | javascript | chosen |
[
{
"from": "system",
"value": "Add Rasmus as stubbed admin user\n"
},
{
"from": "human",
"value": "import { setClient } from '../actions';\n\nfunction checkAuthorization(dispatch) {\n const storedUser = localStorage.getItem('user');\n\n if (storedUser) {\n const user = JSON.parse(storedUser)... | javascript | chosen |
[
{
"from": "system",
"value": "Stop event bubbling to handleClick\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport './index.css';\nimport board from '../../../../../../../../assets/board_64.svg';\nimport IconButton from 'material-ui/IconButton';\nimport RemoveCircle from 'mat... | javascript | chosen |
[
{
"from": "system",
"value": "Add txt import so file can be imported/exported from symmetrically\n"
},
{
"from": "human",
"value": "import Papa from 'papaparse';\n\nexport default () => new Promise((resolve, reject) => {\n const fileInput = document.createElement('input');\n fileInput.setA... | javascript | chosen |
[
{
"from": "system",
"value": "Add function calls and check for a night success function.\n"
},
{
"from": "human",
"value": "/* \n * For reducing boilerplate on examine listeners.\n *\n * config object:\n *\n * poi : An array or object with points of interest.\n * It can be an array of strings ... | javascript | chosen |
[
{
"from": "system",
"value": "Throw when a test fails\n"
},
{
"from": "human",
"value": "var spawn = require('child_process').spawn;\nvar path = require('path');\nvar series = require('run-series');\n\nfunction test(filename) {\n return function(cb) {\n var proc = spawn(process.argv[0], [ fi... | javascript | chosen |
[
{
"from": "system",
"value": "[FEATURE] Add user creation and listing in admin.\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('publicApp')\n .controller('UsersCtrl', ['$scope', '$http', '$location', function ($scope, $http, $location) {\n\t\t$scope.user = null;\n\t\t$scope.... | javascript | chosen |
[
{
"from": "system",
"value": "Test for using callback and domains\n"
},
{
"from": "human",
"value": "var assert = require('assert'),\n jsonip = require('../app');\n\nmodule.exports = {\n 'test GET /': function() {\n assert.response(jsonip, {\n url: '/'\n }, {\n body: '{\"ip\"... | javascript | chosen |
[
{
"from": "system",
"value": "Update test with deepEqual tape api\n"
},
{
"from": "human",
"value": "var test = require(\"tape\");\nvar _ = require( \"lodash\" );\nvar sinon = require(\"sinon\");\nvar algoliaSearch = require( \"algoliasearch\" );\n\nvar Helper = require( \"../../index\" );\n\nte... | javascript | chosen |
[
{
"from": "system",
"value": "Add polyfill for request animation from.\n"
},
{
"from": "human",
"value": "/////////////////\n// Test script //\n/////////////////\n\nearhorn$(this, 'phoria.js', function() {\n\n var canvas = document.getElementById('canvas');\n \n var scene = new Phoria.Scen... | javascript | chosen |
[
{
"from": "system",
"value": "Update library version to 0.1.0\n"
},
{
"from": "human",
"value": "Package.describe({\n name: 'toystars:elasticsearch-sync',\n version: '0.0.9',\n // Brief, one-line summary of the package.\n summary: 'ElasticSearch utility wrapper for mongoDB integration and sy... | javascript | chosen |
[
{
"from": "system",
"value": "Add a hard dep on momentjs for the test suite for now\n"
},
{
"from": "human",
"value": "Package.describe({\n name: 'remcoder:chronos',\n summary: 'Reactive time utilities. Includes reactive replacements for new Date(), Date.now() and moment()',\n version: '1.0.0... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a compiler warning by explicitly passing null.\n"
},
{
"from": "human",
"value": "// Copyright 2010 Steven Dee. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with... | javascript | chosen |
[
{
"from": "system",
"value": "Make fauxDOM reusable for updates\n"
},
{
"from": "human",
"value": "var Element = require('../Element')\nvar mapValues = require('../utils/mapValues')\n\nvar mixin = {\n componentWillMount: function () {\n this.connectedFauxDOM = {}\n this.animateFauxDOMUnti... | javascript | chosen |
[
{
"from": "system",
"value": "Add console log for clarity\n"
},
{
"from": "human",
"value": "if (Meteor.isServer) {\n Meteor.methods({\n scrapePage: function ( url ) {\n var webpage = Scrape.website(url);\n var webpageText = webpage.text;\n var hash = Meteor.call( 'hashText', ... | javascript | chosen |
[
{
"from": "system",
"value": "Change default title in view from Express to Tetris\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar router = express.Router();\n\n/* GET home page. */\nrouter.get('/', function(req, res) {\n res.render('index', { title: 'Express' });\n});\... | javascript | chosen |
[
{
"from": "system",
"value": "Use Math.ceil() to return the correct number of pages\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * @ngdoc directive\n * @name hmdaPilotApp.directive:ErrorDetail\n * @description\n * # Error Summary directive\n * Directive for displaying the details of... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Puppeteer not working in a Travis env (docker)\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst chalk = require('chalk');\nconst puppeteer = require('puppeteer');\nconst fs = require('fs');\nconst mkdirp = require('mkdirp');\nconst os = require('os');\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for 'Register' button\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport {\n renderIntoDocument,\n scryRenderedDOMComponentsWithTag\n} from 'react-addons-test-utils';\nimport configureStore from '../re... | javascript | chosen |
[
{
"from": "system",
"value": "Add env variable for mongodb server\n"
},
{
"from": "human",
"value": "module.exports = require('should');\n\nvar DataSource = require('loopback-datasource-juggler').DataSource;\n\nvar config = require('rc')('loopback', {test: {mongodb: {}}}).test.mongodb;\n\nif (pr... | javascript | chosen |
[
{
"from": "system",
"value": "Return error on missing access token\n"
},
{
"from": "human",
"value": "\nvar st = require('../lib/stocktwits');\n\nvar token = 'YOUR_ACCESS_TOKEN';\n\n\ndescribe('POST', function () {\n it('should make a POST request', function (done) {\n st.post('message... | javascript | chosen |
[
{
"from": "system",
"value": "Send notification using the auth secret, if available\n"
},
{
"from": "human",
"value": "// Use the web-push library to hide the implementation details of the communication\n// between the application server and the push service.\n// For details, see https://tools.i... | javascript | chosen |
[
{
"from": "system",
"value": "Add method for updating scores\n"
},
{
"from": "human",
"value": "function giveObjectOption(qs, ls, n){\n var option = {qs : qs, a: ls[0], b: ls[1], c: ls[2], d:[3], ans:ls[n-1]};\n return option;\n}\n\nfunction rounds(){\n var r1 = [giveObjectOption(\"Ques... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug in sentiment calculation\n\nSigned-off-by: Itai Koren <7a3f8a9ea5df78694ad87e4c8117b31e1b103a24@gmail.com>\n"
},
{
"from": "human",
"value": "// Include The 'require.async' Module\nrequire(\"require.async\")(require);\n\n/**\n * Tokenizes an input string.\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove a bunch of needless commands\n"
},
{
"from": "human",
"value": "var exec = require('child_process').exec;\n\nvar hash;\n\nmodule.exports.init = function(b) {\n\texec('git rev-parse HEAD', function(error, stdout, stderr) {\n\t\tif(error != null) {\n\t\t\thash ... | javascript | chosen |
[
{
"from": "system",
"value": "Update gallery ctrl with responsive service\n"
},
{
"from": "human",
"value": "angular.module('controllers', [])\n\n.controller('NavCtrl', function ($scope, $state) {\n\n $scope.state = $state.current.name\n\n})\n\n.controller('GalleryCtrl', function ($scope, json)... | javascript | chosen |
[
{
"from": "system",
"value": "Add email when creating customer\n"
},
{
"from": "human",
"value": "var config = require('../config.js')\nvar stripe = require('stripe')(config.stripe.secretkey)\n\nmodule.exports = payments\n\nfunction payments (req, res) {\n if (req.method === 'GET') {\n retur... | javascript | chosen |
[
{
"from": "system",
"value": "Reset Organization form when creation an Org\n\nFixes: #73\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { browserHistory } from 'react-router';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.