conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add logger middleware for console-logging dispatching\n"
},
{
"from": "human",
"value": "import {compose, createStore, applyMiddleware} from 'redux'\nimport {devTools, persistState} from 'redux-devtools'\nimport thunkMiddleware from 'redux-thunk'\nimport rootReducer... | javascript | chosen |
[
{
"from": "system",
"value": "Fix up the duplication check (wasn't working when trying to compare objects, as all objects were being treated as unique by Set)\n"
},
{
"from": "human",
"value": "import { expect } from 'chai';\nimport { Deck } from '../model/Deck.js';\n\ndescribe('Card Deck', () =... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for getInitial function\n"
},
{
"from": "human",
"value": "import { capitalize, getRandomString } from '../../lib/helpers/string';\n\ndescribe('string', () => {\n describe('getRandomString', () => {\n // We mock the random generator so the test it... | javascript | chosen |
[
{
"from": "system",
"value": "Bring google syncs back online\n"
},
{
"from": "human",
"value": "module.exports = {\n port: 8001,\n //cdns: ['bootstrap', 'cdnjs', 'google', 'jsdelivr', 'jquery'],\n //cdns: ['bootstrap-cdn', 'jsdelivr', 'cdnjs', 'google'],\n cdns: ['bootstrap-cdn', 'jsdelivr',... | javascript | chosen |
[
{
"from": "system",
"value": "Watch rollup bundles seperate dirs\n"
},
{
"from": "human",
"value": "'use strict';\n\n// modules > 3rd party\nconst _ = require('lodash');\nconst p = require('path');\n\n// modules > gulp:utilities\nconst gulp = require('gulp');\n\nconst TASK_NAME = 'watch';\nconst... | javascript | chosen |
[
{
"from": "system",
"value": "Order posts by submitted as we render them.\n\nWe still want them ordered by score when we publish (so we only see the highest scored). But we want to order them with a fixed order when we render so that when the score changes we can animate them around without DOM nodes being ... | javascript | chosen |
[
{
"from": "system",
"value": "Add some more encryption helpers\n"
},
{
"from": "human",
"value": "import forge from 'node-forge';\n\nconst forgePki = forge.pki;\nconst forgeRsa = forge.pki.rsa;\n\n\nfunction generateRsa(cb) {\n return forgeRsa.generateKeyPair({ bits: 2048, workers: -1 }, (err, ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Fix url for default user image\"\n"
},
{
"from": "human",
"value": "define('app/views/user_menu', ['app/views/templated', 'md5'],\n /**\n * User Menu View\n *\n * @returns Class\n */\n function (TemplatedView) {\n\n 'user stri... | javascript | chosen |
[
{
"from": "system",
"value": "Add semicolon and rewrite line to be more readable\n"
},
{
"from": "human",
"value": "var command = {\n command: \"help\",\n description: \"Display information about a given command\",\n userHelp: {\n usage: \"truffle help <command>\",\n parameters: [],\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove incompatible mount service test\n"
},
{
"from": "human",
"value": "jest.dontMock('../MountPoint');\njest.dontMock('../MountService');\n/* eslint-disable no-unused-vars */\nconst React = require('react');\n/* eslint-enable no-unused-vars */\nconst MountService... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for list display\n"
},
{
"from": "human",
"value": "var List = require(\"../\");\n\ndescribe('List', function() {\n\n describe('count', function() {\n\n it('should return correct count (without filter)', function() {\n var l = new List(... | javascript | chosen |
[
{
"from": "system",
"value": "Add a hack to make clicking the header take you home\n"
},
{
"from": "human",
"value": "// $Id$\n\n(function ($)\n {\n Drupal.behaviors.navigation = {\n attach: function (context)\n {\n var time = 0;\n var timeout;\n\n $('#... | javascript | chosen |
[
{
"from": "system",
"value": "Fix assult api caching in sw\n\n- caused by cors headers\n- add exposed headers to assult api\n"
},
{
"from": "human",
"value": "const functions = require('firebase-functions');\nconst cors = require('cors')({ origin: true });\n\nconst BASE = functions.config().legi... | javascript | chosen |
[
{
"from": "system",
"value": "Disable ReactTableFixedColumns til prefixed uniqid\n\nStuck with this until\n\nhttps://github.com/GuillaumeJasmin/react-table-hoc-fixed-columns/pull/12\n\nbecause sometimes uniqid will generate an invalid selector (leading digit). This ends up\nbeing deterministic per machine b... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unneeded JS from public site\n"
},
{
"from": "human",
"value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascr... | javascript | chosen |
[
{
"from": "system",
"value": "Fix path to enable the app to start\n"
},
{
"from": "human",
"value": "/**\n\nPotential server side rendering strategy\n\n1. ask flux dispatcher to start tracking new store requests\n2. start the render - this is syncronis so any store request that happen during ren... | javascript | chosen |
[
{
"from": "system",
"value": "Move search header to the top part of the screen\n"
},
{
"from": "human",
"value": "// @flow\n\nimport * as React from 'react';\nimport { Animated, StyleSheet, KeyboardAvoidingView } from 'react-native';\n\nimport SearchForm from './SearchForm';\n\ntype Props = {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add button to activate spooky countdown\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport {compose, withState} from 'recompose';\n\nimport logo from './logo.svg';\nimport './App.css';\n\n\nconst App = ({\n time,\n updateTime,\n date,\n update... | javascript | chosen |
[
{
"from": "system",
"value": "code: Replace deprecated Buffer() with Buffer.from().\n"
},
{
"from": "human",
"value": "require('es6-promise').polyfill();\nconst helper = require('./helper');\n\nfunction api(baseUrl, config, method, params) {\n let url = baseUrl;\n const auth = new Buffer(`${co... | javascript | chosen |
[
{
"from": "system",
"value": "Add safer function call for CLI\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nimport yargs from 'yargs';\nimport path from 'path';\nimport fs from 'fs';\nimport * as pose from '.';\n\nconst opts = yargs\n.usage('$ pose <action> [options]')\n.help('help')... | javascript | chosen |
[
{
"from": "system",
"value": "Add specs for more image path cases\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst assert = require('assert');\nconst nativeImage = require('electron').nativeImage;\nconst path = require('path');\n\ndescribe('nativeImage module', () => {\n describe('crea... | javascript | chosen |
[
{
"from": "system",
"value": "Add some error handling in Express\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar expressWs = require('./models/utils/express-ws');\n\nvar gameRoute = require('./routes/game_route');\nvar TicTacToe = require('./models/games/tictactoe');\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove to send to watson\n"
},
{
"from": "human",
"value": "const tjbot = require('./tjbotlib');\nconst config = require('./config/configs');\n\nconst credentials = config.credentials;\nconst WORKSPACEID = config.conversationWorkspaceId;\n\nconst hardware = ['microp... | javascript | chosen |
[
{
"from": "system",
"value": "Add 'Content-Length' to the Get method to pimprove perfomance.\n"
},
{
"from": "human",
"value": "var http = require( 'http' ),\n url = require( 'url' ),\n todos = [];\n\nvar server = http.createServer( function( req, res ) {\n \n switch( req.method ) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix broken variable name. Whoops\n"
},
{
"from": "human",
"value": "const port = process.env.PORT || 3000;\nrequire(\"./dist/server/app\").start(PORT);\n"
},
{
"from": "gpt",
"value": "const PORT = process.env.PORT || 3000;\nrequire(\"./dist/server/app\"... | javascript | chosen |
[
{
"from": "system",
"value": "Move blanket into bower's devDependencies.\n"
},
{
"from": "human",
"value": "/* globals module */\n\nvar EOL = require('os').EOL;\n\nmodule.exports = {\n normalizeEntityName: function() {},\n\n afterInstall: function() {\n return this.addBowerPackageToProject(... | javascript | chosen |
[
{
"from": "system",
"value": "Update references to SSL (more)\n"
},
{
"from": "human",
"value": "self.MonacoEnvironment = {\n\tbaseUrl: 'http://robmhoward.github.io/excel/script/'\n};\nimportScripts('http://robmhoward.github.io/excel/script/vs/base/worker/workerMain.js');"
},
{
"from": "... | javascript | chosen |
[
{
"from": "system",
"value": "Complete algorightm challenge with nested loop\n"
},
{
"from": "human",
"value": "//Bubble Sort\n\n/*RULES\n Takes one parameter\n An array\n Sort it using bubble sort\n Return sorted array\n*/\n\n/*PSEUDOCODE\n 1) Get the array.length, because you'll need th... | javascript | chosen |
[
{
"from": "system",
"value": "Update mozjpeg URL to v3.2\n\nFixes #25\n"
},
{
"from": "human",
"value": "'use strict';\nconst os = require('os');\nconst BinBuild = require('bin-build');\nconst log = require('logalot');\nconst bin = require('.');\n\nconst cpuNum = os.cpus().length;\n\nbin.run(['-... | javascript | chosen |
[
{
"from": "system",
"value": "Use global form of 'use strict' in gruntfile template file\n"
},
{
"from": "human",
"value": "const {join} = require('path');\nconst config = require('config').grunt;\n\nmodule.exports = function(grunt) {\n 'use strict';\n\n grunt.initConfig({\n package... | javascript | chosen |
[
{
"from": "system",
"value": "Fix mix ng1-ng2 example with $ctrl.\n\nThe name of the default controller of the component is $ctrl.\n"
},
{
"from": "human",
"value": "\"use strict\";\r\n\r\n(function () {\r\n angular\r\n .module(\"dummy\", []);\r\n\r\n var upgradeAdapter = new ng.upg... | javascript | chosen |
[
{
"from": "system",
"value": "Use minZoom on Map instead of zoom\n\nThis prevents the component from rendering a thousand times.\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport PropTypes from 'prop-types'\nimport { Map, TileLayer, GeoJSON } from 'react-leaflet'\n\nclass Cent... | javascript | chosen |
[
{
"from": "system",
"value": "Use locales in service context\n\nfbshipit-source-id: 63c227e\n"
},
{
"from": "human",
"value": "/**\n * @flow\n */\n\nimport fs from 'fs-extra';\nimport path from 'path';\nimport mkdirp from 'mkdirp';\nimport { getResolvedLocalesAsync } from './ExponentTools';\n\ne... | javascript | chosen |
[
{
"from": "system",
"value": "Fix npm build with missing .git\n"
},
{
"from": "human",
"value": "const commit = require('git-rev-sync').short();\nconst pkg = require('../package.json');\n\nconst version = JSON.stringify({\n commit,\n source: pkg.homepage,\n version: process.env.CIRCLE_TAG || ... | javascript | chosen |
[
{
"from": "system",
"value": "Add loglevel verbose to e2e tests\n"
},
{
"from": "human",
"value": "const _ = require('lodash');\nconst exec = require('shell-utils').exec;\n\nconst android = _.includes(process.argv, '--android');\nconst release = _.includes(process.argv, '--release');\nconst skip... | javascript | chosen |
[
{
"from": "system",
"value": "Add level to User model.\n"
},
{
"from": "human",
"value": "module.exports = function(sequelize, DataTypes) {\n var User = sequelize.define('User', {\n username: {\n type: DataTypes.STRING,\n allowNull: false,\n unique: tru... | javascript | chosen |
[
{
"from": "human",
"value": "Implement an ajax helper method for login/out/register.\n"
},
{
"from": "gpt",
"value": "$(document).ready(function() {\n\n $('header').on('submit', '#login', logInOutAjaxCall);\n $('header').on('click', '#logout', logInOutAjaxCall);\n $('header').on('click', '#re... | javascript | chosen |
[
{
"from": "system",
"value": "Add low committal property to model\n"
},
{
"from": "human",
"value": "const Sequelize = require('sequelize');\nconst db = require('./db');\n\nmodule.exports = db.define('admin', {\n name: {\n type: Sequelize.TEXT,\n allowNull: false,\n },\n email: {\n t... | javascript | chosen |
[
{
"from": "system",
"value": "Use x y instead of dx dy\n"
},
{
"from": "human",
"value": "module.exports = function (tr, vec) {\n // Modify transformation so that its image\n // is translated by the given vector.\n // In other words it transforms points\n // further by the given vector.\n /... | javascript | chosen |
[
{
"from": "system",
"value": "Use the Unexpected v10 addAssertion syntax.\n"
},
{
"from": "human",
"value": "var BufferedStream = require('bufferedstream');\nvar createMockCouchAdapter = require('./createMockCouchAdapter');\nvar http = require('http');\nvar mockCouch = require('mock-couch-alexje... | javascript | chosen |
[
{
"from": "system",
"value": "Test: Add debug info to diagnose failing tests on Travis CI\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst fs = require('fs');\nconst path = require('path');\nconst glob = require('glob');\nconst isCreateReactApp = require('./isCreateReactApp');\n\nconst ... | javascript | chosen |
[
{
"from": "system",
"value": "Format `Delete` as โโฆโ on macOS\n\nโDeleteโ is the wrong label to show humans for keyboard shortcuts using\nthe `Delete` key on macOS, because Apple label their `Backspace` key\nโDeleteโ, and they donโt tend to have a dedicated `Delete` key. On most\nor all keyboards they sell ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow opening and closing sides of individual nodes.\n"
},
{
"from": "human",
"value": "function HexNode() {\n\tthis.node = $(\"<div><div class='hexagon'></div></div>\");\n};\n\nfunction HexRow(n) {\n\tthis.nodes = [];\n\tfor(var i=0; i<n; i++) {\n\t\tthis.nodes.pus... | javascript | chosen |
[
{
"from": "system",
"value": "Load secret keys from env variables\n"
},
{
"from": "human",
"value": "module.exports = {\n\n 'facebookAuth' : {\n 'clientID' : '551603578325099', // your App ID\n 'clientSecret' : 'fa17e3faab4b345d88856a7aafde947b', // your App Secret\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add domain & mongodb configuration\n"
},
{
"from": "human",
"value": "var config = module.exports = {};\n\nconfig.webserver = {\n port: process.env.PORT\n};\n\nconfig.webServer = {\n port: process.env.PORT,\n host: 'domain.com',\n protocol: 'http',\n api: 'api'... | javascript | chosen |
[
{
"from": "system",
"value": "Allow `order` as prop of child of `display: grid`\n"
},
{
"from": "human",
"value": "module.exports = {\n flexChildProps: [\n 'flex', 'flex-grow', 'flex-shrink', 'flex-basis', 'order',\n ],\n gridChildProps: [\n 'grid', 'grid-area', 'grid-column', 'grid-row... | javascript | chosen |
[
{
"from": "system",
"value": "Add hover style to button\n"
},
{
"from": "human",
"value": "/**\n*\n* Button\n*\n*/\n\nimport styled from 'styled-components';\n\nconst Button = styled.button`\n color: #fff;\n background-color: #0275d8;\n border-color: #0275d8;\n border: 1px solid transparent;... | javascript | chosen |
[
{
"from": "system",
"value": "Support hidden details table rows.\n"
},
{
"from": "human",
"value": "const Qh = require('qhell');\n\nconst { table, tr, th, td } = require('keys/dist/hh');\n\nmodule.exports = async (\n req,\n record = req.record,\n fieldSet = req.action.views.fieldSet(req, reco... | javascript | chosen |
[
{
"from": "system",
"value": "Return the map as an object with a descriptive key.\n"
},
{
"from": "human",
"value": "const util = require('util');\nconst express = require('express');\nconst app = express();\nconst router = express.Router();\n\nconst Config = require('./Config');\n\n\ncl... | javascript | chosen |
[
{
"from": "system",
"value": "Fix direct gulp - since node_modules are in path only when run with npm - direct gulp command was failing because of nodemon not in path\n"
},
{
"from": "human",
"value": "import bg from 'gulp-bg';\nimport eslint from 'gulp-eslint';\nimport gulp from 'gulp';\nimport... | javascript | chosen |
[
{
"from": "system",
"value": "db: Use stdout and stderr, not console\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar Neo4j = require(\"node-neo4j\");\nvar utils = require(\"./utils\");\n\nvar stdin = process.openStdin();\n\nutils.validateEnvironment(\"node db-admin.js\");\nconsole.... | javascript | chosen |
[
{
"from": "system",
"value": "Allow saving a list of resources.\n\n"
},
{
"from": "human",
"value": "let mongoose = require('mongoose');\nlet Schema = mongoose.Schema;\n\nlet jobSchema = new Schema({\n jobPosition: String,\n companyName: String,\n resources: String,\n dateApplied: Date,\n c... | javascript | chosen |
[
{
"from": "system",
"value": "Fix encoding in constructor Buffer \n\nUse 'utf8' when encoding is null"
},
{
"from": "human",
"value": "'use strict';\n\nvar _dataUriRegex = require('data-uri-regex');\n\nvar _dataUriRegex2 = _interopRequireDefault(_dataUriRegex);\n\nvar _mime = require('mime');\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Allow controllers to be registered via options.\n"
},
{
"from": "human",
"value": "function Plugin(app, chat, options)\n{\n if(!options) {\n throw new Error('No options specified for plugin.');\n }\n\n if(!options.name) {\n throw new Error('No... | javascript | chosen |
[
{
"from": "system",
"value": "Add Windows support using 'where'\n"
},
{
"from": "human",
"value": "var cp = require('child_process');\n\nmodule.exports = function whereis(name, cb) {\n cp.exec('which ' + name, function(error, stdout, stderr) {\n stdout = stdout.split('\\n')[0];\n if (erro... | javascript | chosen |
[
{
"from": "system",
"value": "Rename funtion reportIfMissing to reportIfAbsolute\n\nThe old name seems wrong. Probably copied from no-extraneuous-dependencies\n"
},
{
"from": "human",
"value": "import isStaticRequire from '../core/staticRequire'\n\nfunction reportIfMissing(context, node, name) {... | javascript | chosen |
[
{
"from": "system",
"value": "Remove ability to get last memoize result by passing falsy argument\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst _ = require('lodash');\n\nconst previous = [];\n\nmodule.exports = (obj) => {\n const result = obj ? previous.find((item) => _.isEqual(item... | javascript | chosen |
[
{
"from": "system",
"value": "Fix gulp watcher to include elements\n"
},
{
"from": "human",
"value": "var gulp = require('gulp')\nvar landRegistryGulpTasks = require('land-registry-gulp-tasks')\n\nvar path = require('path')\n\nvar config = {\n 'applicationPath': './demo/demo',\n 'assetsPath': ... | javascript | chosen |
[
{
"from": "system",
"value": "Change the way we create props for item\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport React, { Component, PropTypes } from 'react';\n\n// TODO: title and body componenets?\n// TODO: PropTypes\nexport default class AccordionItem extends Component {\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Clean JSON object creation code\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar router = express.Router();\n\nvar funfacts = [\n 'Ants stretch when they wake up in the morning.',\n 'The state of Florida is bigger than England.',\n 'Some ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove phantomjs fudge factor which is no longer necessary\n"
},
{
"from": "human",
"value": "var PubSub = require('pubsub-js');\n\nvar events = {\n fonts: false,\n leaflet: false\n};\n\n\n// Wait for webfonts to load\nPubSub.subscribe('webfonts.active', function(... | javascript | chosen |
[
{
"from": "system",
"value": "Change background related to search\n"
},
{
"from": "human",
"value": "import React, {Component} from 'react'\nimport {bindActionCreators} from 'redux'\nimport {connect} from 'react-redux'\nimport Card from '../components/Card'\nimport Search from '../components/Sea... | javascript | chosen |
[
{
"from": "system",
"value": "Debug On. Remove needless tasks.\n"
},
{
"from": "human",
"value": "/*\n * svg_fallback\n *\n *\n * Copyright (c) 2014 yoksel\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nmodule.exports = function(grunt) {\n\n // Project configuration.\n grunt.init... | javascript | chosen |
[
{
"from": "system",
"value": "Add _sheet to client style sheet\n"
},
{
"from": "human",
"value": "function createStyleTag(media) {\n const style = document.createElement('style');\n style.setAttribute(\"media\", media);\n\n // WebKit hack :(\n style.appendChild(document.createTextNode(''));\... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Fix wrong-month bug, in the overwiew\"\n\nThis reverts commit 0e48279bc92325502e37641dcf1446bff226722c.\n"
},
{
"from": "human",
"value": "var CustomDate = function (date) {\n if(date){\n this.date = date;\n }\n else {\n this.date = new D... | javascript | chosen |
[
{
"from": "system",
"value": "Add glyphicon with remove icon in case of failure\n"
},
{
"from": "human",
"value": "/**!\n * AngularJS Ladda directive\n * @author Chungsub Kim <subicura@subicura.com>\n */\n\n/* global Ladda */\n(function () {\n 'use strict';\n\n angular.module('angular-ladda', ... | javascript | chosen |
[
{
"from": "system",
"value": "Add timestamp to newly created elements\n"
},
{
"from": "human",
"value": "var randombytes = require('randombytes')\nvar createError = require('http-errors')\n\nvar obj2P2p = require('../transforms/obj_to_osm_p2p')\nvar hex2dec = require('../lib/hex2dec.js')\n\nmodu... | javascript | chosen |
[
{
"from": "system",
"value": "Add blog page post list and test data\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nexport default class Blog extends React.Component {\n render() {\n return (\n <p>Hello Blog page</p>\n );\n }\n}"
},
{
"from": "gpt",
"val... | javascript | chosen |
[
{
"from": "system",
"value": "Add link to manual in the footer.\n\nAdded link to a PDF manual in the footer. Remember to make corresponding\nchanges in nginx-config to make it work, similar to the logo and other\nstatic resources.\n"
},
{
"from": "human",
"value": "import React from 'react';\nim... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the backup breadcrumb label\n"
},
{
"from": "human",
"value": "import React, {PropTypes} from 'react';\n\nimport BreadcrumbSegmentLink from './BreadcrumbSegmentLink';\n\nclass BreadcrumbSegment extends React.Component {\n constructor() {\n super(...arguments... | javascript | chosen |
[
{
"from": "system",
"value": "Fix app-wrapper tests after merge from master\n\nRemove `wrapper` from `beforeEach`.\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport TestUtils from 'react-dom/test-utils';\nimport { shallow } from 'enzyme';\nimport { rootTagTest } from '../../u... | javascript | chosen |
[
{
"from": "system",
"value": "Verify mongo works with new schema and on Heroku, add db post testing path\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar bodyParser = require('body-parser');\nvar app = express();\n\napp.set('port', (process.env.PORT || 3000));\n\napp.use... | javascript | chosen |
[
{
"from": "system",
"value": "Fix es6 object spread with object.assign\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function inline(state) {\n var tokens = state.tokens, tok, i, l;\n\n // Parse inlines\n for (i = 0, l = tokens.length; i < l; i++) {\n tok = tokens[i]... | javascript | chosen |
[
{
"from": "system",
"value": "Swap out startsWith for indexOf = 0, which is supported in ie\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar iconExtensionMap = {\n\t'audio/': 'audio',\n\t'application/pdf': 'pdf'\n};\n\nfunction getIconClassName(mimeType) {\n\tfor (var pattern in iconExten... | javascript | chosen |
[
{
"from": "system",
"value": "Add page listing and filter requests\n\n"
},
{
"from": "human",
"value": "import Request from \"superagent\";\n\n\nexport const find = () => (\n Request.get(`/api/subtractions${window.location.search}`)\n);\n\nexport const listIds = () => (\n Request.get(\"/ap... | javascript | chosen |
[
{
"from": "system",
"value": "Set an appropriate title in 404 view\n"
},
{
"from": "human",
"value": "import View from '../base/view';\n\n\nexport default class NotFound extends View {\n createElement() {\n const element = document.createElement('div');\n element.setAttribute('class', 'no... | javascript | chosen |
[
{
"from": "system",
"value": "Make it so the assert can stay unchanged."
},
{
"from": "human",
"value": "// template strings - String.raw\n// To do: make all tests pass, leave the asserts unchanged!\n\ndescribe('on tagged template strings you can use String.raw', function() {\n \n it('the `raw... | javascript | chosen |
[
{
"from": "system",
"value": "Add html for mobile connection error\n"
},
{
"from": "human",
"value": "//Starts idletimer.js\n\t$(document).ready(function(){\n\n\t\t\t$.idleTimeout('#idletimeout', '#idletimeout a', {\n\t\t\t\tidleAfter: 3600, //60 minutes\n\t\t\t\tpollingInterval: 30,\n\t\t\t\tke... | javascript | chosen |
[
{
"from": "system",
"value": "Update with what we know so far\n"
},
{
"from": "human",
"value": "'use strict';\n\nfunction clone(obj) {\n return JSON.parse(JSON.stringify(obj));\n}\n\nfunction convert(swagger, options) {\n var openapi = clone(swagger);\n\n return openapi;\n}\n\nmodule.e... | javascript | chosen |
[
{
"from": "system",
"value": "Update backpack api to use `xhr` module\n"
},
{
"from": "human",
"value": "const getBackpackContents = ({\n host,\n username,\n token,\n limit,\n offset\n}) => fetch(`${host}${username}?limit=${limit}&offset=${offset}`, {\n headers: {'x-token': tok... | javascript | chosen |
[
{
"from": "system",
"value": "Add styles for back and endgame button\n"
},
{
"from": "human",
"value": "import { StyleSheet, Dimensions } from 'react-native';\n\nexport default StyleSheet.create({\n\tgeneralButton: {\n\t\theight: 60,\n\t\tborderRadius: 5,\n\t\tmarginHorizontal: 20,\n\t\tbackgrou... | javascript | chosen |
[
{
"from": "system",
"value": "Allow invert of stack scroll\n"
},
{
"from": "human",
"value": "import BaseTool from './base/BaseTool.js';\nimport scroll from '../util/scroll.js';\n\n/**\n * @public\n * @class StackScrollMouseWheelTool\n * @memberof Tools\n *\n * @classdesc Tool for scrolling thro... | javascript | chosen |
[
{
"from": "system",
"value": "Add working move method and spec\n"
},
{
"from": "human",
"value": "describe(\"Unit\", function() {\n\n beforeEach(function() {\n var position = new Position(1,1);\n // var unit = new Unit(location);\n });\n\n describe(\"move\", function() {\n it(\"moves... | javascript | chosen |
[
{
"from": "system",
"value": "fix(shape): Migrate to new basic shape and cursor\n"
},
{
"from": "human",
"value": "import Shape from 'kittik-shape-basic';\n\n/**\n * Implements rectangle shape with text support.\n *\n * @since 1.0.0\n * @version 1.0.0\n */\nexport default class Rectangle extends... | javascript | chosen |
[
{
"from": "system",
"value": "Return newest build instead of oldest\n"
},
{
"from": "human",
"value": "var _ = require('underscore'),\n Schema = require('./../Schema'),\n CONFIG = require('config');\n\nfunction BuildController(mongoose){\n\n this.get = function (req, res) {\n var... | javascript | chosen |
[
{
"from": "system",
"value": "Support strip tags in messages.\n"
},
{
"from": "human",
"value": "'use strict';\n\nclass Message {\n constructor(person, text) {\n this.person = person;\n this.text = text;\n }\n\n toString() {\n return `${this.person} ${this.text}`\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add UserId column to migration\n"
},
{
"from": "human",
"value": "'use strict';\nmodule.exports = {\n up: function(queryInterface, Sequelize) {\n return queryInterface.createTable('Tasks', {\n id: {\n allowNull: false,\n autoIncrement: true,\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add form data tests (skipped)\n"
},
{
"from": "human",
"value": "var expect = require('chai').expect;\n\nvar EditBookPageView = require(\"../../views/EditBookPageView.js\");\n\ndescribe('EditBookPageView', function() {\n\n var view;\n\n before(function() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor activate function to avoid code duplication\n"
},
{
"from": "human",
"value": "import { commands } from 'vscode'\nimport Chance from 'chance'\nimport { randomInteger } from './random'\n\nexport const activate = (context) => {\n const chance = new Chance()\... | javascript | chosen |
[
{
"from": "system",
"value": "Move syncthing config to version branch instead of master"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n SYNCTHING_BINARY: '0.11.25',\n SYNCTHING_IMAGE: '0.11.25',\n SYNCTHING_CONFIG: '0.10.0',\n SYNCTHING_DOWNLOAD_URL: {\n darwin: 'ht... | javascript | chosen |
[
{
"from": "system",
"value": "Use port 8080 as God Intended.\n"
},
{
"from": "human",
"value": "var http = require('http'),\n\tport = parseInt(process.env.PORT) || 8001;\n\nvar server = http.createServer(function (req, res) {\n res.writeHead(200, { \"Content-Type\": \"text/plain\" })\n res.end... | javascript | chosen |
[
{
"from": "system",
"value": "Check the env port before setting it to 8080\n"
},
{
"from": "human",
"value": "var express = require('express'),\n app = express.createServer(),\n http = require('http'),\n port = 8080,\n io = require('socket.io').listen(app);\n\napp.configure(function() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Create reinit, updateScore and getBestScore methods. Pass unit test.\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('Game', [])\n.service('GameManager', ['GridService', function(GridService) {\n // Create a new game\n this.newGame =... | javascript | chosen |
[
{
"from": "system",
"value": "Support both text and application mimetypes\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nexport function ScriptTransform(mimetype, value, document) {\n var el = document.createElement('script');\n el.type = mimetype;\n el.appendChild(document.creat... | javascript | chosen |
[
{
"from": "system",
"value": "Fix seller user group level security\n\nAfter refactoring Admin* components to Seller* components we forgot to update the seller\nuser group security controller to use \"sellerusergroupid\" $stateParam instead of the old\n\"adminusergroupid\".\n"
},
{
"from": "human",
... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing files to ServiceWorker cache\n"
},
{
"from": "human",
"value": "importScripts('js/sw-toolbox.js');\n\nconst version = '0.0.1';\nconst CACHE_NAME = 'inventory' + version;\nvar urlsToCache = [\n 'index.html',\n 'views/allInventories.html',\n 'view... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust get one user api\n"
},
{
"from": "human",
"value": "\nimport * as types from '../constants/ActionTypes';\nimport fetch from 'isomorphic-fetch';\nimport Config from '../config';\n\nexport function receiveAccountSuccess(data) {\n return {\n type: type... | javascript | chosen |
[
{
"from": "system",
"value": "Remove commented test code from sign up saga\n"
},
{
"from": "human",
"value": "import { take, takeEvery, call, put } from 'redux-saga/effects';\nimport * as actions from '../actions/auth';\nimport * as auth from '../fetch/auth';\nimport { browserHistory } from 'rea... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for close always current modal"
},
{
"from": "human",
"value": "Extension = window.Extension || {};\n\nExtension.LayoutView = Marionette.LayoutView.extend({\n /**\n * Removed default action on hash links\n * in order not to trigger router methods\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix producer count on publication admin\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport PropTypes from 'prop-types'\n\nimport withFetch from '../../hoc/with-fetch'\n\nimport Link from '../../link'\n\nconst SourceProducers = ({organization}) => (... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.