conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Change server port to accept heroku value.\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar path = require('path');\nvar app = express();\nvar router = require('./router.js');\nvar comms = require('./communication');\n\napp.use(express.stati... | javascript | chosen |
[
{
"from": "system",
"value": "Add Bootstrap to About's awesomeThings\n\nSigned-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com>\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * @ngdoc function\n * @name libedMeApp.controller:AboutCtrl\n * @description\n * # ... | javascript | chosen |
[
{
"from": "system",
"value": "Add initial working implementation of runnable logs\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n/**\n * @module bin/cli\n */\n'use strict'\n\nvar fs = require('fs')\nvar program = require('commander')\n\nclass CLI {\n constructor () {\n var package... | javascript | chosen |
[
{
"from": "system",
"value": "Hide the toastr close button on xs screen sizes\n"
},
{
"from": "human",
"value": "angular.module('orderCloud')\n\t.config(function(toastrConfig) {\n\t\tangular.extend(toastrConfig, {\n\t\t\tcontainerId: 'toast-container',\n\t\t\tmaxOpened: 5,\n\t\t\tnewestOnTop: tr... | javascript | chosen |
[
{
"from": "system",
"value": "[schema] Add .has(typeName) on schema instances\n"
},
{
"from": "human",
"value": "import * as types from './types'\n\nfunction compileRegistry(schemaDef) {\n const registry = Object.assign(Object.create(null), types)\n\n const defsByName = schemaDef.types.reduce(... | javascript | chosen |
[
{
"from": "system",
"value": "fix(global-options): Allow --sort to be configured from file\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nmodule.exports = globalOptions;\n\nfunction globalOptions(yargs, { ci = false, loglevel = \"info\", progress = true }) {\n // the global options appli... | javascript | chosen |
[
{
"from": "system",
"value": "Revert watch if not production\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst webpack = require('webpack');\n\nconst production = process.env.NODE_ENV === 'production';\n\nconst plugins = [\n new webpack.ProvidePlugin({\n $ ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove image with link & media icons\n"
},
{
"from": "human",
"value": "// ==UserScript==\n// @name SFcomic Viewer\n// @namespace \n// @version 0.2.1\n// @description Auto load comic picture.\n// @author AntonioTsai\n// @match http://co... | javascript | chosen |
[
{
"from": "system",
"value": "Include dot when matching files so css doesn't match scss, for example\n"
},
{
"from": "human",
"value": "var through = require('through'),\n str2js = require('string-to-js'),\n types = ['html', 'css'];\n\nfunction isValidFile (file, opts) {\n var validTypes = ty... | javascript | chosen |
[
{
"from": "system",
"value": "Add gulp tasks to build docs assets\n"
},
{
"from": "human",
"value": "var gulp = require(\"gulp\");\nvar sass = require(\"gulp-sass\");\nvar nano = require('gulp-cssnano');\n\ngulp.task(\"sass\", function () {\n gulp.src(\"./sass/**/*.scss\")\n .pipe(sass... | javascript | chosen |
[
{
"from": "system",
"value": "Update Elixir in gulp file.\n"
},
{
"from": "human",
"value": "var elixir = require('laravel-elixir');\n\n/*\n |--------------------------------------------------------------------------\n | Elixir Asset Management\n |------------------------------------------------... | javascript | chosen |
[
{
"from": "system",
"value": "Include copyright comment in gulp file.\n"
},
{
"from": "human",
"value": "var gulp = require('gulp'),\n qunit = require('gulp-qunit');\n\ngulp.task('test', function() {\n return gulp.src('./test/index.html')\n .pipe(qunit());\n});\n"
},
{
"from... | javascript | chosen |
[
{
"from": "system",
"value": "Copy .htaccess files to dist\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\n\nvar clean = require('gulp-clean');\nvar zip = require('gulp-zip');\n\nvar bases = {\n root: 'dist/'\n};\n\nvar paths = [\n 'core/actions/*',\n 'core/common/**',\n... | javascript | chosen |
[
{
"from": "system",
"value": "Update the gulp config, test only the main module"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar jshint = require('gulp-jshint');\nvar mocha = require('gulp-mocha');\nvar docco = require('gulp-docco');\nvar del = require('del');\n\ngulp.task('docs... | javascript | chosen |
[
{
"from": "system",
"value": "Fix travis testing on node < 8\n"
},
{
"from": "human",
"value": "const gulp = require('gulp');\nconst util = require('gulp-util');\nconst babel = require('gulp-babel');\nconst mocha = require('gulp-mocha');\nconst eslint = require('gulp-eslint');\n\nconst src = 'sr... | javascript | chosen |
[
{
"from": "system",
"value": "Split tasks and build files\n"
},
{
"from": "human",
"value": "const gulp = require(\"gulp\");\nconst replace = require(\"gulp-replace\");\nconst del = require(\"del\");\n\nconst distillerCore = \"src/external/chromium/components/dom-distiller/core\";\nconst allChil... | javascript | chosen |
[
{
"from": "system",
"value": "Add linting before build task in gulp\n"
},
{
"from": "human",
"value": "const gulp = require('gulp');\nconst babel = require('gulp-babel');\nconst eslint = require('gulp-eslint');\n\ngulp.task('lint', () =>\n gulp.src('index.js')\n .pipe(eslint())\n .pipe(eslint... | javascript | chosen |
[
{
"from": "system",
"value": "Check to see if browserify has modified process to check for browser environment.\n"
},
{
"from": "human",
"value": "var write = require('./write'),\n geojson = require('./geojson'),\n prj = require('./prj'),\n JSZip = require('jszip');\n\nmodule.exports = ... | javascript | chosen |
[
{
"from": "system",
"value": "Add query to find all and add findOrCreate\n"
},
{
"from": "human",
"value": "var Comment = require('../models/index.js').Comment;\n\nvar create = function(props, callback) {\n Comment.build(props)\n .save()\n .then(function(comment) {\n callback(comment);\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use correct field for sorting\n"
},
{
"from": "human",
"value": "Meteor.publish('topics', function (categoryId) {\n return Topics.find({categoryId: categoryId});\n});\n\nMeteor.publish('topic', function (topicSlug) {\n return Topics.find({slug: topicSlug});\n});\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove completed since undefined in editTodo action.\n"
},
{
"from": "human",
"value": "import firedux from '../store/firedux'\n\nexport function addTodo(text) {\n return () => {\n firedux.push('todos', {\n completed: false,\n text\n })\n }\n}\n\ne... | javascript | chosen |
[
{
"from": "system",
"value": "Use test-peer-range for logs, not target peer\n"
},
{
"from": "human",
"value": "'use strict'\n\nimport {Runner} from '../'\nimport yargs from 'yargs'\nimport prop from 'dot-prop'\nimport {resolve} from 'path'\nimport {createLogger} from 'clout'\n\nconst {cwd} = pro... | javascript | chosen |
[
{
"from": "system",
"value": "Integrate splash screen with login and news feeed\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar conf = require(\"./config\")\n , Box = require(\"cli-box\")\n ;\n\n// Set config\nglobal.CONFIG = {\n root: __dirname\n , cli: {\n w: process... | javascript | chosen |
[
{
"from": "system",
"value": "Make tests run by default when running gulp or gulp watch\n"
},
{
"from": "human",
"value": "require('dotenv').config();\n\nconst gulp = require('gulp');\n\nrequire('./tasks/browser-sync.task');\nrequire('./tasks/typescript.task');\nrequire('./tasks/vendor.task');\n... | javascript | chosen |
[
{
"from": "system",
"value": "Include all files in lib, examples and bin.\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar del = require('del');\nvar seq = require('gulp-sequence');\nvar zip = require('gulp-zip');\nvar pkg = require('./package.json');\n\ngulp.task('clean', fun... | javascript | chosen |
[
{
"from": "system",
"value": "Add correct dependencies to gulp tasks\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar less = require('gulp-less');\nvar exec = require('child_process').exec;\nvar sourcemaps = require('gulp-sourcemaps');\nvar csso = require('gulp-csso');\nvar re... | javascript | chosen |
[
{
"from": "system",
"value": "Remove malihu custom scrollbar plugin usage from watchlist\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport App from \"./App\";\n\nimport \"malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar\";\nimport ... | javascript | chosen |
[
{
"from": "system",
"value": "Add test to check intializedRecord value\n"
},
{
"from": "human",
"value": "require(\"./spec_helper.js\");\n\ndescribe('Initializer', function() {\n var initializer;\n var recordType = 'salesorder';\n var blankRecord = { 'recordtype': recordType };\n global.nla... | javascript | chosen |
[
{
"from": "system",
"value": "Disable query form submissions when invalid\n"
},
{
"from": "human",
"value": "(function() {\n\t'use strict';\n\tangular.module('pagespeedApp').controller('pagespeedQueryFormController', pagespeedQueryForm);\n\n\tpagespeedQueryForm.$inject = ['pagespeedApi'];\n\n\tf... | javascript | chosen |
[
{
"from": "system",
"value": "Add an aria-label attr to our input control for better accessibility.\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport Input from 'react-toolbox/lib/input/Input';\n\nconst sectionStyle = {\n marginLeft: \"2.... | javascript | chosen |
[
{
"from": "system",
"value": "Handle events' odd button click:\n- pass values to parent using props function;\n"
},
{
"from": "human",
"value": "import React from 'react'\n\nimport styles from './event-bets.module.styl'\n\nexport default ({ betTypes }) => (\n <table className={styles.betsTable}... | javascript | chosen |
[
{
"from": "system",
"value": "Use instanstanceof Array when checking for array\n"
},
{
"from": "human",
"value": "import { MicroState } from 'ember-microstates';\n\nexport default MicroState.extend({\n\n initialValueFor([array]) {\n if (array === undefined) {\n return [];\n } else if... | javascript | chosen |
[
{
"from": "system",
"value": "Use location.key for storing scroll position when available\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport assign from 'object-assign';\nimport History from './History';\nimport Location from './Location';\nimport { getWindowScrollPosition } f... | javascript | chosen |
[
{
"from": "system",
"value": "Add pseduocode for key value pair algo\n"
},
{
"from": "human",
"value": "// find longest phrase\n// input is array of strings\n// create variable longest, set it equal to empty strings\n// for each string in the array, check to see if its length is longer than long... | javascript | chosen |
[
{
"from": "system",
"value": "Improve my JS debugging statement\n"
},
{
"from": "human",
"value": "CRM.$(function ($) {\n// Code goes here!\n $('.fast-action-link').click(function () {\n // Suppress the link-following behavior\n alert('hello');\n return false;\n });\n});\n"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Add renderware to generated apps\n"
},
{
"from": "human",
"value": "module.exports = (function() {\n\n \"use strict\";\n\n const Nodal = require('nodal');\n const zlib = require('zlib');\n\n class GzipMiddleware extends Nodal.Middleware {\n\n exec(controller,... | javascript | chosen |
[
{
"from": "system",
"value": "Add .js extension for require\n"
},
{
"from": "human",
"value": "/**\n * Run test specs in node environment\n * Usage:\n * $ cd seajs\n * $ node tests/runner-node.js\n */\n\nrequire('../lib/sea')\n\ndefine('./tests/node-runner', function(require) {\n var test =... | javascript | chosen |
[
{
"from": "system",
"value": "Set the right header for rails\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('ngGcHttpProviderConfig', [\n 'gc.ngHttpGetParamInterceptor'\n]).config([\n '$httpProvider',\n function($httpProvider) {\n\n var clientVersion = window.AppConfig ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with component manager role and side menu.\n"
},
{
"from": "human",
"value": "define(function (require) {\n 'use strict';\n\n var modules = require('modules');\n var _ = require('lodash');\n\n var alien4cloud = modules.get('alien4cloud');\n\n // defin... | javascript | chosen |
[
{
"from": "system",
"value": "Add unit test for entity directive\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* jasmine specs for directives go here */\n\ndescribe('directives', function() {\n beforeEach(module('myApp.directives'));\n\n describe('app-version', function() {\n it('sho... | javascript | chosen |
[
{
"from": "system",
"value": "Fix jscs -- apparently `this` can be unquoted in an object literal?"
},
{
"from": "human",
"value": "/* eslint-env node */\n\n'use strict';\n\nvar fs = require('fs');\nvar path = require('path');\n\n// Semantic actions for the `mentionsThis` attribute, which returns... | javascript | chosen |
[
{
"from": "system",
"value": "Make all modals buttons default to dismiss the modal\n"
},
{
"from": "human",
"value": "/**\n * Adds a marionette region to a bootstrap modal\n *\n * Copyright 2015 Ethan Smith\n */\n\nvar Backbone = require('backbone'),\n Marionette = require('backbone.marionett... | javascript | chosen |
[
{
"from": "system",
"value": "Add createdAt field for Initiative creation.\n"
},
{
"from": "human",
"value": "if(Meteor.isServer) {\n Meteor.startup(function() {\n Meteor.methods({\n addComment: function(userId, initiativeId, input) {\n Meteor.users.update(userId, { $addToSet: { ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor apps loader to use map instead of forEach\n"
},
{
"from": "human",
"value": "const router = require('express').Router()\nconst fs = require('fs')\n\nconst { setHomeBreadcrumb } = require('./middleware')\n\nconst appsRouters = []\nconst subApps = fs.readdirS... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug with valid component detection\n"
},
{
"from": "human",
"value": "\nvar NGComponentType = require('./NGComponentType');\nmodule.exports = NGComponent;\n\n/**\n * Container for angular module object\n *\n * @param {String} module\n * @param {NGComponentType} ... | javascript | chosen |
[
{
"from": "system",
"value": "Test preSetup and preTeardown callbacks\n"
},
{
"from": "human",
"value": "import { TestModule } from 'ember-test-helpers';\nimport test from 'tests/test-support/qunit-test';\nimport qunitModuleFor from 'tests/test-support/qunit-module-for';\nimport { setResolverReg... | javascript | chosen |
[
{
"from": "system",
"value": "Use Blacklight.onLoad to support turbolinks.\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n Blacklight.do_hierarchical_facet_expand_contract_behavior();\n});\n\n(function($) {\n Blacklight.do_hierarchical_facet_expand_contract_behavior = funct... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for disabling ghostMode\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar module = require('../../lib/index');\nvar setup = module.setup;\nvar dConfig = require('../fixtures/si-default-config');\nvar _ = require('lodash');\n\nvar defaultConfig;\n\nde... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue when rejecting a promise for a single reducer\n"
},
{
"from": "human",
"value": "import { isError } from 'flux-standard-action';\n\nfunction isFunction(val) {\n return typeof val === 'function';\n}\n\nexport default function handleAction(type, reducers) {... | javascript | chosen |
[
{
"from": "system",
"value": "Fix XHR proxy with non-standard ports\n\nIf a non-standard port is used, then the port will double-up at the moment, leading to a failure to contact `example.com:8080:8080`. Specifying `hostname` rather than `host` fixes this issue."
},
{
"from": "human",
"value": "... | javascript | chosen |
[
{
"from": "system",
"value": "Index all scrolled models by perma id in entry state\n"
},
{
"from": "human",
"value": "import {watchCollection} from '../collections';\n\nexport function watchCollections({chapters, sections, contentElements, files}, {dispatch}) {\n watchCollection(chapters, {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix broken function reference in Chai helper\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst Chai = require(\"chai\");\nconst {util} = Chai;\n\n\nlet overwritten, unindentPattern;\n\n/**\n * Strip leading tabulation from string blocks when running \"equa... | javascript | chosen |
[
{
"from": "system",
"value": "Add read only plugin events constants file"
},
{
"from": "human",
"value": "import {EventEmitter} from \"events\";\n\nimport ExamplePluginEvents from \"../events/ExamplePluginEvents\";\n\nvar PluginDispatcher = global.MarathonUIPluginAPI.PluginDispatcher;\n\nvar Exa... | javascript | chosen |
[
{
"from": "system",
"value": "Fix name of function after renaming\n"
},
{
"from": "human",
"value": "var landmarkRoles = kslib.aria.getRolesByType('landmark'),\n\tfirstLink = node.querySelector('a[href]');\n\nfunction isSkipLink(n) {\n\treturn firstLink &&\n\t\tkslib.dom.isFocusable(kslib.dom.ge... | javascript | chosen |
[
{
"from": "system",
"value": "Clarify what the happens in argument analysis\n"
},
{
"from": "human",
"value": "module.exports = class Call {\n constructor(callee, args) {\n this.callee = callee;\n this.args = args;\n }\n\n analyze(context) {\n this.callee.analyze(context);\n conte... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment to explain string concatenation\n"
},
{
"from": "human",
"value": "var warning = require('./lib/warning');\nwarning(\n false,\n 'require' + \"('react/addons') is deprecated. \" +\n 'Access using require' + \"('react-addons-{addon}') instead.\"\n);\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add service to get reports\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('mean.comscore-api').factory('ComscoreApi', [\n function() {\n return {\n name: 'comscore-api'\n };\n }\n]);\n"
},
{
"from": "gpt",
"value": "'use ... | javascript | chosen |
[
{
"from": "system",
"value": "Enable event handling before keyring is loaded\n"
},
{
"from": "human",
"value": "/**\n * Mailvelope - secure email with OpenPGP encryption for Webmail\n * Copyright (C) 2012-2017 Mailvelope GmbH\n *\n * This program is free software: you can redistribute it and/or ... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for sum.coffee within jest test\n"
},
{
"from": "human",
"value": "// __tests__/sum-test.js\njest.dontMock('../sum');\n\ndescribe('sum', function() {\n it('adds 1 + 2 to equal 3', function() {\n var sum = require('../sum');\n expect(sum(1, 2)).toBe(3);\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with offset in navigation menu\n"
},
{
"from": "human",
"value": "(function () {\n $(document).foundation();\n\n smoothScroll.init({\n speed: 500,\n offset: 50\n });\n\n $('section.place .embed').on('click', function () {\n $(this).find('ifram... | javascript | chosen |
[
{
"from": "system",
"value": "Add a little helper text to sortable fieldsets to tell user they can drag to re-order lists.\n"
},
{
"from": "human",
"value": "jQuery(document).ready(function($) {\n $(\".flash.notice, .flash.alert\").flashNotice();\n\n // This is useful for toggling CSS helpers\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove users when they disconnect\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar socketio = require('socket.io');\nvar fs = require('fs');\n\nvar app = express.createServer();\napp.listen(8000);\n\napp.configure(function() {\n app.use(e... | javascript | chosen |
[
{
"from": "system",
"value": "Update MaterialSwitch unit test with chai-jquery\n"
},
{
"from": "human",
"value": "\n describe('switch tests', function () {\n\n it('Should have MaterialSwitch globally available', function () {\n expect(MaterialSwitch).to.be.a('function');\n });\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add environment variable for (dev) postgresql host\n\nThis falls back to localhost so it won't break any existing\nconfiguration.\n"
},
{
"from": "human",
"value": "module.exports = {\n \"development\": {\n \"username\": process.env.PSQL_USERNAME,\n \"passwor... | javascript | chosen |
[
{
"from": "system",
"value": "Undo changes - webhook 404ing will try and get to work again using a test project\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar path = require('path');\nvar bodyParser = require('body-parser');\n\nvar port = 3000;\n\nvar app = express();\... | javascript | chosen |
[
{
"from": "system",
"value": "Replace double quotes with single\n"
},
{
"from": "human",
"value": "/**\n * @license\n * Copyright 2017 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\n foam.CLASS({\n package: 'foam.nanos.auth',\n name: 'Language',... | javascript | chosen |
[
{
"from": "system",
"value": ":bug: Print invalid state ID if there's a valid state ID\n"
},
{
"from": "human",
"value": "/**\n * Factory method to properly load a state from json\n */\n\nimport Idle, { ID as idleID } from './idle'\nimport Sleep, { ID as sleepID } from './sleep'\nimport Pet, { I... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor overhaul to satisfy XO errors\n"
},
{
"from": "human",
"value": "/* eslint-env jest */\nimport { formatUptime } from './time'\n\ndescribe('time', () => {\n describe('formatUptime', () => {\n it('is a function', () => expect(formatUptime).toMatchSnapshot... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the undefined message spam\n"
},
{
"from": "human",
"value": "// FIXME internal doc\n// {prefix = '', suffix = '', handler = null}\nconst logDecorator = (log, options) => {\n options = options || {};\n const prefix = options.prefix;\n const suffix = options.s... | javascript | chosen |
[
{
"from": "system",
"value": "Correct the initial log message.\n"
},
{
"from": "human",
"value": "/*\n * app.js: Entry point for the content-service\n *\n * (C) 2015 Rackspace, Inc.\n *\n */\n\nvar config = require('./src/config');\n\nconfig.configure(process.env);\n\nvar\n async = require('asy... | javascript | chosen |
[
{
"from": "system",
"value": "Modify mocha test to use carf token\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst chai = require('chai');\nconst chaiHttp = require('chai-http');\nchai.use(chaiHttp);\n\nconst login = (app) => {\n let agent = chai.request.agent(app); // create agent f... | javascript | chosen |
[
{
"from": "system",
"value": "Add object method instead of the property\n"
},
{
"from": "human",
"value": "const Reporter = require('./src/Reporter');\nconst PostReporter = require('./src/PostReport');\nconst Verification = require('./src/Verification');\nconst Joi = require('joi');\n\nmodule.ex... | javascript | chosen |
[
{
"from": "system",
"value": "Add prepare sounds method to prepare sound effects\n"
},
{
"from": "human",
"value": "class AudioService {\n constructor(Howl, Howler, $localStorage, audioOn) {\n 'ngInject';\n\n this.Howl = Howl;\n this.Howler = Howler;\n this.local = $localStorage;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update permalink when generating new planet\n"
},
{
"from": "human",
"value": "seed = getRandomSeed();\nvar canvas = document.getElementById(\"myCanvas\");\n\nvar btnDiscoverNew = document.getElementById('discovernew');\n\nfunction discoverNew() {\n\tbtnDiscoverNew.... | javascript | chosen |
[
{
"from": "system",
"value": "Implement $.zepto.isZ in IE support module\n"
},
{
"from": "human",
"value": "// Zepto.js\n// (c) 2010-2013 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\n;(function(){\n // __proto__ doesn't exist on IE<11, so redefine\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove uneccesary console.log and storage.\n"
},
{
"from": "human",
"value": "var app = require('./server/server-config.js');\nvar models = require('./server/db/orm-model.js');\n\nvar models = models();\nvar User = models.User;\nvar bodyParser = require('body-parser... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the `cache` prefix from the url\n"
},
{
"from": "human",
"value": "var express = require('express'),\n app = express(),\n compress = require('compression'),\n bodyParser = require('body-parser'),\n redisHelper = require('./helpers/redis'),\n re... | javascript | chosen |
[
{
"from": "system",
"value": "Remove auto branch name in commit\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar exec = require('child_process').exec;\nvar throwErr = require('../utils/throw-err');\n\nfunction fastPush(commitMessage) {\n exec('git --version', function(error) {\n if(er... | javascript | chosen |
[
{
"from": "system",
"value": "Use receive api to deliver event\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n// Usage: bin/simulate issues path/to/payload plugin.js\n\nrequire('dotenv').config({silent: true});\n\nconst process = require('process');\nconst path = require('path');\n\ncon... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unneeded trim in float parsing\n"
},
{
"from": "human",
"value": "var sizeUnits = ['', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'];\n\nfunction formatSize(value) {\n if (value === 0) {\n return '0';\n }\n\n var index = parseInt(Math.log(Math.abs(v... | javascript | chosen |
[
{
"from": "system",
"value": "Comment out some stub components\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { connect } from 'react-redux';\nimport request from 'superagent';\n\nimport Header from '../components/header';\nimport Footer from '../components/footer';\nimpor... | javascript | chosen |
[
{
"from": "system",
"value": "Update current user helper methods\n"
},
{
"from": "human",
"value": "/* global document */\n\nexport default class CurrentUser {\n constructor() {\n const currentUserNode = document.getElementsByName('current_user')[0];\n this.id = currentUserNode ? currentU... | javascript | chosen |
[
{
"from": "system",
"value": "Add Foreground property to Tile class\n\nMakes the foreground color of tiles not hard-coded.\n"
},
{
"from": "human",
"value": "import Enum from './enum';\nimport Game from './game';\n\nexport let TileTypes = new Enum('EMPTY','FLOOR','WALL');\n\nexport class Tile {\... | javascript | chosen |
[
{
"from": "system",
"value": "Change element ordering in layout component\n"
},
{
"from": "human",
"value": "// @flow\nimport React from 'react'\nimport Helmet from 'react-helmet'\nimport PropTypes from 'prop-types'\nimport 'typeface-ibm-plex-sans'\nimport 'typeface-ibm-plex-serif'\n\nimport Nav... | javascript | chosen |
[
{
"from": "system",
"value": "Remove leading and trailing whitespace from input\n"
},
{
"from": "human",
"value": "var TrieNode = require('trie-node');\n\nvar Trie = (function() {\n function Trie() {\n this.root = new TrieNode();\n }\n\n Trie.prototype.add = function(string) {\n this.ro... | javascript | chosen |
[
{
"from": "system",
"value": "Remove only current image preview in pageparts\n"
},
{
"from": "human",
"value": "var kunstmaanbundles = kunstmaanbundles || {};\n\nkunstmaanbundles.mediaChooser = (function(window, undefined) {\n\n var init, initDelBtn;\n\n var $body = $('body');\n\n init ... | javascript | chosen |
[
{
"from": "system",
"value": "Support CommonJS module loaders, e.g. Browserify and Webpack\n\npartially addresses #21\n"
},
{
"from": "human",
"value": "/**\n * @license Knockout.Punches\n * Enhanced binding syntaxes for Knockout 3+\n * (c) Michael Best\n * License: MIT (http://www.opensource.or... | javascript | chosen |
[
{
"from": "system",
"value": "Undo search input being auto-updated from Session 'name'\n\nIt causes the app to remove characters in mid writing\n"
},
{
"from": "human",
"value": "\nTemplate['layout_header'].onRendered(function() {\n\n Tracker.autorun(function(){\n const name = Session.get('n... | javascript | chosen |
[
{
"from": "system",
"value": "Use App container instead of Main component\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { render } from 'react-dom';\nimport { Provider } from 'react-redux';\nimport store from '../stores';\nimport App from './Main';\n\nrender(\n <Provider... | javascript | chosen |
[
{
"from": "system",
"value": "[Common] Fix stack capturing of 'printError' in `utils/messsages`\n"
},
{
"from": "human",
"value": "export function printError (err, filename) {\n /* eslint-disable no-console */\n if (err._babel) {\n console.error(`\\n${err.message}\\n${err.codeFrame}\\n`)\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Change spectra-data to HEAD version for testing\"\n\nThis reverts commit d7e7a53122717d69059e17cceb65457c1dff28ef.\n"
},
{
"from": "human",
"value": "'use strict';\n\nexport {default as OCLE} from 'https://www.lactame.com/lib/openchemlib-extended/1.13.0/ope... | javascript | chosen |
[
{
"from": "system",
"value": "Set default url to the demo notebook\n"
},
{
"from": "human",
"value": "var config = {};\n\ndefine(\n\t['jquery'],\n\tfunction($) {\n\t\tconfig.lightThreshold = 3000;\n\t\tconfig.sparqlEndpoint = \"http://localhost:8080/openrdf-sesame/repositories/sensors\";\n\n\t\t... | javascript | chosen |
[
{
"from": "system",
"value": "Increase service worker cache version\n"
},
{
"from": "human",
"value": "var CACHE_NAME = 'buddhabrot-2017-10-12-1';\nvar urlsToCache = [\n '.',\n '/',\n '/main.js',\n '/material-components-web.min.css',\n '/material-components-web.min.js',\n '/rust-logo-blk.s... | javascript | chosen |
[
{
"from": "system",
"value": "Add job task detail routes\n"
},
{
"from": "human",
"value": "import {Route} from 'react-router';\n\nimport JobDetailPage from '../pages/jobs/JobDetailPage';\nimport JobsPage from '../pages/JobsPage';\nimport JobsTab from '../pages/jobs/JobsTab';\n\nlet jobsRoutes =... | javascript | chosen |
[
{
"from": "system",
"value": "Handle TPC disabled check again\n"
},
{
"from": "human",
"value": "// buffer-tpc-check.js\n// (c) 2013 Sunil Sadasivan\n// Check if third party cookies are disabled\n//\n\n;(function () {\n\n\t;(function check() {\n\t\t//if the 3rd party cookies check is done, re... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor the save js to be smarter about how it tries to save drafts and export..etc.\n"
},
{
"from": "human",
"value": "\nfunction saveLocal(str, fileType){\n var date = new Date();\n var form_action = location.protocol + '//' + location.host + \"/tagger/save... | javascript | chosen |
[
{
"from": "system",
"value": "Fix return value for bundle method\n"
},
{
"from": "human",
"value": "var styledeps = require('style-deps')\nvar resolve = require('style-resolve')\nvar xtend = require('xtend')\n\nmodule.exports = Sheetify\n\n// for now, stylify has no \"core\"\n// modules.\nvar co... | javascript | chosen |
[
{
"from": "system",
"value": "Add node_modules, public to nodemon ignore\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulp = require('gulp');\nvar nodemon = require('gulp-nodemon');\n\ngulp.task('start', function() {\n nodemon({\n script: 'app.js',\n env: {\n 'NODE_ENV': '... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude node_modules from deploy step\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulp = require('gulp');\nvar watch = require('gulp-watch');\nvar deploy = require('gulp-gh-pages');\nvar jshint = require('gulp-jshint');\n\nvar options = {\n branch: 'g... | javascript | chosen |
[
{
"from": "system",
"value": "Fix index link always active\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\nimport { Link } from 'react-router'\n\nclass Nav extends React.Component {\n\n render () {\n return (\n \t<nav>\n \t<h1>Welcome to {this.props.title... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.