conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Make the star (player) move and be steerable\n"
},
{
"from": "human",
"value": "var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update });\nvar player;\n\n\nfunction preload() {\n\tgame.load.image('star', 'assets/sta... | javascript | chosen |
[
{
"from": "system",
"value": "Update to use autopilot instead of understand"
},
{
"from": "human",
"value": "// Download the helper library https://www.twilio.com/docs/libraries/node#install\n\n// Your Account Sid and Auth Token from twilio.com/console\nconst accountSid = 'ACXXXXXXXXXXXXXXXXXXXX... | javascript | chosen |
[
{
"from": "system",
"value": "Add css rule debugging, cause Chrome's being a weirdo\n"
},
{
"from": "human",
"value": "/**\n * Searches the first loaded style sheet for an @keyframes animation by name.\n * FYI: If you use \"to\" or \"from\" they'll get converted to percentage values, so use them... | javascript | chosen |
[
{
"from": "system",
"value": "Add empty message when no upcoming events\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport {\n Text\n} from \"react-native\";\nimport {connect} from \"react-redux\";\n\nimport PageFrame from \"../components/PageFrame\";\nimport EventListView ... | javascript | chosen |
[
{
"from": "system",
"value": "Handle exception in nearestPackageRoot test\n"
},
{
"from": "human",
"value": "var nearestPackageRoot = require('../../lib/resolver/nearest-package-root');\nvar assert = require('assert');\nvar path = require('path');\n\nvar fixturesPath = path.resolve.bind(null,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add management of the popup hide callback.\n"
},
{
"from": "human",
"value": "\n\"use strict\";\n\nfunction $(id) {\n return document.getElementById(id);\n}\n\n// This is here because setTimeout() doesn't seem to call member functions correctly\nfunction Hide(popup... | javascript | chosen |
[
{
"from": "system",
"value": "Update Service Worker precache config\n"
},
{
"from": "human",
"value": "/**\n * @license\n * Copyright (c) 2016 The GDG Spain Authors. All rights reserved.\n * This code may only be used under the MIT style license found at http://gdg.es/LICENSE.txt\n */\n\nmodule.... | javascript | chosen |
[
{
"from": "system",
"value": "test: Add test to allow null/undefined\n\nAs is like to happen with bindings\n"
},
{
"from": "human",
"value": "\ndescribe('Filter: ivhPluckAndJoin', function() {\n 'use strict';\n\n beforeEach(module('ivh.pluckAndJoin'));\n\n var ivhPluckAndJoinFilter, items;\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Make the clean task continue on if the output folder does not exist.\n\nThis should sort out build issues on AWS Amplify, where we are using an older\nNodeJS version with an expeimental fs.promises API.\n"
},
{
"from": "human",
"value": "const fs = require('fs');\nc... | javascript | chosen |
[
{
"from": "system",
"value": "Fix JSON string formatting to allow mongoimport\n"
},
{
"from": "human",
"value": "import stream from 'stream';\nimport csvWriter from 'csv-write-stream';\n\nclass json extends stream.Transform {\n constructor() {\n super({ objectMode: true });\n }\n\n _transf... | javascript | chosen |
[
{
"from": "system",
"value": "Add empty error handler in watch mode so the pipe doesn't break.\n:\n"
},
{
"from": "human",
"value": "var galv = require('galvatron');\nvar assign = require('lodash/object/assign');\nvar test = require('./test');\n\nmodule.exports = function () {\n galv.watch('tes... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused verifyLogin view code\n"
},
{
"from": "human",
"value": "/**\n * App() object\n * \n */\nvar App = {\n\tViews: {}\n};\n\nApp.Router = Backbone.Router.extend({\n\n\troutes:{\n\t\t\"\":\"main\",\n\t\t\"checkinout\":\"check_in_out\",\n\t\t\"events\":\"ev... | javascript | chosen |
[
{
"from": "system",
"value": "Format indent to 2 space."
},
{
"from": "human",
"value": "var requestUrl = window.location.href;\nvar autoRefresh = requestUrl.indexOf(\"autoRefresh=\") != -1;\n\nfunction doAutoRefresh() {\n var refreshUrl = window.location.href;\n refreshUrl = refreshUrl.replac... | javascript | chosen |
[
{
"from": "system",
"value": "Update min required chai and munit versions\n"
},
{
"from": "human",
"value": "Package.describe({\n name: \"practicalmeteor:loglevel\",\n summary: \"Simple logger with app and per-package log levels and line number preserving output.\",\n version: \"1.1.0_2\",\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use `null` as label documents initial state value\n\nThe initial redux state was `[]` which does not work with Virtool's loading convention where `null` means the resource hasn't been retrieved from the API yet."
},
{
"from": "human",
"value": "import { CREATE_LABEL... | javascript | chosen |
[
{
"from": "system",
"value": "Fix initialization of proof of worker index\n"
},
{
"from": "human",
"value": "angular.module('GLBrowserCrypto', [])\n.factory('glbcProofOfWork', ['$q', function($q) {\n // proofOfWork return the answer to the proof of work\n // { [challenge string] -> [ answer in... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust dummy data to better fit new template.\n"
},
{
"from": "human",
"value": "$(function() {\n\tyourCollection = new Models.ItemListings();\n\tfriendCollection = new Models.ItemListings();\n\tfeaturedCollection = new Models.ItemListings();\n\tpublicCollection = n... | javascript | chosen |
[
{
"from": "system",
"value": "Convert callbacks to arrow functions\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* eslint-env node */\n\nlet TEST_SELECTOR_PREFIX = /data-test-.*/;\n\nfunction isTestSelector(attribute) {\n return TEST_SELECTOR_PREFIX.test(attribute);\n}\n\nfunction stripT... | javascript | chosen |
[
{
"from": "system",
"value": "Convert class based template compilation plugin to functional style\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* eslint-env node */\n\nlet TEST_SELECTOR_PREFIX = /data-test-.*/;\n\nfunction isTestSelector(attribute) {\n return TEST_SELECTOR_PREFIX.test(at... | javascript | chosen |
[
{
"from": "system",
"value": "Fix local storage problems with private mode Safari\n"
},
{
"from": "human",
"value": "import { getters as authGetters } from '../auth';\nimport { getters as streamGetters } from '../stream';\nimport { getters as navigationGetters } from '../navigation';\n\nconst st... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for adding default and installed level packs\n"
},
{
"from": "human",
"value": "\ndescribe('Game Manager', function() {\n\n it('is an object', function() {\n expect(Flown.GameManager).toBeDefined();\n expect(typeof Flown.GameManager).toBe(... | javascript | chosen |
[
{
"from": "system",
"value": "Add .git to git url\n"
},
{
"from": "human",
"value": "Package.describe({\n git: 'https://github.com/zimme/meteor-collection-softremovable',\n name: 'zimme:collection-softremovable',\n summary: 'Add soft remove to collections',\n version: '1.0.3-rc.1'\n});\n\nPa... | javascript | chosen |
[
{
"from": "system",
"value": "Fix add device meta test.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar PerfTestFramework = require('../../../TestServer/PerfTestFramework.js');\nvar TestDevice = require('../../../TestServer/TestDevice.js');\nvar tape = require('../lib/thali-tape');\n\nva... | javascript | chosen |
[
{
"from": "system",
"value": "Add additional polyfills required to make this work on original iPad\n"
},
{
"from": "human",
"value": "import 'core-js/es6/promise';\nimport 'core-js/es6/symbol';\nimport 'moment-timezone/moment-timezone';\nimport 'moment/locale/ru';\n\nimport moment from 'moment';... | javascript | chosen |
[
{
"from": "system",
"value": "Update script header, implementing auto updater support.\n"
},
{
"from": "human",
"value": "// ==UserScript==\n// @name\tpmd-rp-beta\n// @namespace\tcoaster3000@pmd-roleplay.forumotion.com\n// @description\tProvides the necessary userscripts to test out features for... | javascript | chosen |
[
{
"from": "system",
"value": "Fix demo being loaded regardless of ESP_PROD\n"
},
{
"from": "human",
"value": "const webpack = require('webpack')\nconst { execSync } = require('child_process')\nconst path = require('path')\n\nlet hash = execSync('git rev-parse --short HEAD').toString().trim()\nle... | javascript | chosen |
[
{
"from": "system",
"value": "Build css to file, apply postcss autoprefixer\n"
},
{
"from": "human",
"value": "var HtmlWebpackPlugin = require('html-webpack-plugin')\n\nmodule.exports = {\n\n\tdevServer: {\n\t\tinline: true,\n\t\tcontext: 'build',\n\t\tport: 9999,\n\t\tproxy: {\n\t\t\t'/api': {\... | javascript | chosen |
[
{
"from": "system",
"value": "Update campus API endpoint mock to serve all\n"
},
{
"from": "human",
"value": "(function (undefined) {\n'use strict';\n\nvar mock = function ($httpBackend, fxCampuses) {\n $httpBackend.when('GET', '/api/campuses').respond(fxCampuses);\n $httpBackend.when('GET', '... | javascript | chosen |
[
{
"from": "system",
"value": "Fix usage to allow creating as an object with an options argument\n"
},
{
"from": "human",
"value": "var getCleanCSSProcessor = require(\"./clean-css-processor\"),\n usage = require(\"./usage\"),\n parseOptions = require(\"./parse-options\");\n\nmodule.exports... | javascript | chosen |
[
{
"from": "system",
"value": "Implement basic cron tasks loading\n"
},
{
"from": "human",
"value": "module.exports = function (sails) {\n return {};\n};\n"
},
{
"from": "gpt",
"value": "var createJob = require('./createJob');\n\nmodule.exports = function (sails) {\n return {\n d... | javascript | chosen |
[
{
"from": "system",
"value": "Return Chalk instance from set() call\n"
},
{
"from": "human",
"value": "'use strict';\nconst Chalk = require('chalk').constructor;\n\nlet ctx = null;\nexports.get = () => {\n\tif (!ctx) {\n\t\tthrow new Error('Chalk has not yet been configured');\n\t}\n\treturn ctx... | javascript | chosen |
[
{
"from": "system",
"value": "Reset rqs index to 0\n"
},
{
"from": "human",
"value": "'use strict';\nmodule.exports =\n\n/*@ngInject*/\nfunction index ($scope, RuleQuestionService) {\n RuleQuestionService._getAllRuleQuestionsWithInstructions().then(function(questions) {\n var i = 39;\n $s... | javascript | chosen |
[
{
"from": "system",
"value": "Remove js extension from log labels\n"
},
{
"from": "human",
"value": "var winston = require('winston'),\n path = require('path');\n\nvar logLevel = 'warn';\n\nvar sharedLogger = function(filename) {\n return new winston.Logger({\n transports: [\n new... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for json columns\n"
},
{
"from": "human",
"value": "Object.values = function(obj) {\n var vals = [];\n for( var key in obj ) {\n if ( obj.hasOwnProperty(key) ) {\n vals.push(obj[key]);\n }\n }\n return vals;\n}"
},
... | javascript | chosen |
[
{
"from": "system",
"value": "Add links to top tabs in lessons\n"
},
{
"from": "human",
"value": "// ==UserScript==\n// @name Wanikani for Vimperator\n// @namespace rr-@sakuya.pl\n// @description Improves Wanikani navigation on Vimperator\n// @include https://www.wanikani.com/review... | javascript | chosen |
[
{
"from": "system",
"value": "Fix smooth scroll, thanks @frmendes\n"
},
{
"from": "human",
"value": "$(function() {\n $('a[href*=#]:not([href=#])').click(function() {\n if (location.pathname.replace(/^\\//,'') == this.pathname.replace(/^\\//,'') && location.hostname == this.hostname) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Build proper dnslink, pass recordName as parameter\n"
},
{
"from": "human",
"value": "var DigitalOcean = require('do-wrapper')\nvar Promise = require('bluebird')\n\nmodule.exports = function initializeModule (options) {\n var api = Promise.promisifyAll(new DigitalO... | javascript | chosen |
[
{
"from": "system",
"value": "Add option to set PORT via env variable\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nprocess.title = 'timeline_serve';\n\nvar _ = require('underscore')._;\nvar express = require('express');\nvar socket = require('socket.io');\nvar fs = require('fs');\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove gameday root url util method\n"
},
{
"from": "human",
"value": "var sprintf = require('sprintf-js').sprintf;\n\nmodule.exports = {\n gamedayUrlRoot: gamedayUrlRoot,\n ordinal: ordinal,\n ensureArray: ensureArray,\n};\n\nfunction gamedayUrlRoot() {\n var t... | javascript | chosen |
[
{
"from": "system",
"value": "Fix pre/post plugins for generateSVGOConfig helper not being overwritten properly\n"
},
{
"from": "human",
"value": "const svgo = require('svgo');\nconst { omit, concat, uniqBy } = require('lodash');\nconst { merge } = require('webpack-merge');\n\nmodule.exports = (... | javascript | chosen |
[
{
"from": "system",
"value": "Change email address for sending email notifications\n"
},
{
"from": "human",
"value": "import nodemailer from 'nodemailer';\nimport smtpTransport from 'nodemailer-smtp-transport';\n\nfunction sendEmail(emailParams) {\n const mailOptions = {\n from: emailParams.... | javascript | chosen |
[
{
"from": "system",
"value": "Remove extra view from safeImage component\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { ImageBackground, ActivityIndicator, View } from 'react-native'\nimport css from '../../styles/css'\n\nclass SafeImage extends React.Component {\n\tconst... | javascript | chosen |
[
{
"from": "system",
"value": "Update the javascript for the editor\n"
},
{
"from": "human",
"value": "//= require jquery.ui.nestedSortable\n//= require codemirror\n//= require codemirror/modes/xml\n//= require codemirror/modes/javascript\n//= require codemirror/modes/css\n//= require codemirror/... | javascript | chosen |
[
{
"from": "system",
"value": "Remove deleted & child reservation types\n"
},
{
"from": "human",
"value": "define(['app', 'text!./schedule.html', 'lodash'], function(app, template, _) {\n\n app.directive(\"cctvFrameSchedule\", ['$http', function($http) {\n return {\n restrict... | javascript | chosen |
[
{
"from": "system",
"value": "Disable back button for thank-you frame\n\nDo not allow participants to click the back\nbutton after completing the study.\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n setupController(controller, session) {\... | javascript | chosen |
[
{
"from": "system",
"value": "Add /q- as an alias for /q remove\n"
},
{
"from": "human",
"value": "var name = ['/q remove '];\nvar description = 'Removes a song from your playlist.';\nvar usage = '`/q remove [song name or YouTube ID]`:';\n\nvar messageHandler = require(global.paths.lib + 'messag... | javascript | chosen |
[
{
"from": "system",
"value": "Test send back token in predict/suggestions.\n"
},
{
"from": "human",
"value": "var assert = require('chai').assert;\nvar sinon = require('sinon');\n\nlet LMLayerWorker = require('../../build/intermediate');\n\n\ndescribe('LMLayerWorker', function () {\n describe('... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with startsWith not existing(?)\n"
},
{
"from": "human",
"value": "/* global angular */\n\nangular.module('app')\n.factory('Storage', function ($window) {\n\t'use strict';\n\n\tfunction getItem(key) {\n\t\tvar value = $window.localStorage.getItem(key);\n\t... | javascript | chosen |
[
{
"from": "system",
"value": "Use the app's real name instead of 'App'"
},
{
"from": "human",
"value": "import config from '../config/environment';\nimport Ember from 'ember';\n\nexport default {\n name: 'App Version',\n initialize: function() {\n Ember.libraries.register('App', config.APP.... | javascript | chosen |
[
{
"from": "system",
"value": "Update frontend code to work on ES5 only.\n"
},
{
"from": "human",
"value": "(function() {\n const backKey = 37;\n const backSpaceKey = 8;\n const forwardKey = 39;\n const spaceKey = 32;\n\n const content = [\n '<h1>async @ async</h1>',\n '<h1>Test 1</h1>... | javascript | chosen |
[
{
"from": "system",
"value": "Fix registering to the teleinfo service event.\n"
},
{
"from": "human",
"value": "var util = require('util');\nvar teleinfo = require('./teleinfo.js');\nvar request = require('request');\n\nvar trameEvents = teleinfo.teleinfo('/dev/ttyAMA0');\n\n// Handle elec infor... | javascript | chosen |
[
{
"from": "system",
"value": "Make tag classes functions non-anonymous\n"
},
{
"from": "human",
"value": "iD.svg.TagClasses = function() {\n var keys = iD.util.trueObj([\n 'highway', 'railway', 'motorway', 'amenity', 'natural',\n 'landuse', 'building', 'oneway', 'bridge'\n ])... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust the other pains on sidebar toggle\n"
},
{
"from": "human",
"value": "/* global document */\nimport { Map } from 'immutable';\nimport { handleActions } from 'redux-actions';\nimport { SIDEBAR_TOGGLE, PANE_TOGGLE, PANE_RESIZE, SIDEBAR_RESIZE } from '../actions/... | javascript | chosen |
[
{
"from": "system",
"value": "docs: Add helper comments in generators koans\n"
},
{
"from": "human",
"value": "describe(\"About Generators\", function () {\n\n describe(\"Basic usage\", function () {\n\n it(\"should understand concept\", function () {\n function* createGenerator() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor grabbing all feature flags to implement a promise\n"
},
{
"from": "human",
"value": "import launchDarklyBrowser from \"ldclient-js\";\n\nexport function ldBrowserInit (key, user) {\n return launchDarklyBrowser.initialize(key, user);\n}\n\nexport function g... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the rest of the auth brouhaha\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar m = require(\"mithril\"),\n\n db = require(\"./firebase\");\n\nmodule.exports = function(component) {\n return {\n controller : function() {\n var au... | javascript | chosen |
[
{
"from": "system",
"value": "Attach image_input_click function to window object\n\nSo other parts of the page can access it\n"
},
{
"from": "human",
"value": "/////////////////////////////////////////////////////////////////////////////\n//\n// Simple image input \n//\n////////////////////////... | javascript | chosen |
[
{
"from": "system",
"value": "Use .some instead of ES6 .find\n"
},
{
"from": "human",
"value": "import Ui from \"./Ui\";\nimport Generator from \"./Generator\";\n\nUi.initializeDefaults();\n\n$.getJSON(\"/features.json\").done(displayFeatures);\n$.getJSON(\"/formats.json\").done(displayFormats)... | javascript | chosen |
[
{
"from": "system",
"value": "Index con todas las rutinas\n\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst express = require ('express')\nconst api = express.Router()\n\nconst UserController = require ('../Controllers/UserController')\nconst MatchController = require ('../Controllers/M... | javascript | chosen |
[
{
"from": "system",
"value": "Add proper lookup for new name to shims\n"
},
{
"from": "human",
"value": "/* globals define */\n\nfunction createDeprecatedModule(moduleId) {\n define(moduleId, ['exports', 'ember-resolver/resolver', 'ember'], function(exports, Resolver, Ember) {\n Ember['defau... | javascript | chosen |
[
{
"from": "system",
"value": "Set start time after socket client connect event fires\n"
},
{
"from": "human",
"value": "/**\n * @module src/websocket-client\n */\n'use strict'\n\nconst Base = require('./base')\n\nconst payload = 'a'.repeat(process.env.PB_PAYLOAD_BYTES) // ~1kb payload\n\nvar cou... | javascript | chosen |
[
{
"from": "system",
"value": "Use Dexie.Promise not the global Promise\n"
},
{
"from": "human",
"value": "import { CREATE, DELETE, UPDATE } from './change_types';\nimport bulkUpdate from './bulk-update';\n\nexport default function initApplyChanges(db) {\n return function applyChanges(changes, o... | javascript | chosen |
[
{
"from": "system",
"value": "Add logo and fix styling\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { Link } from 'react-router-dom'\nimport injectSheet from 'react-jss'\n\nimport Spacer from '../../components/spacer'\n\nconst MiniAppFooter = ({ classes }) => {\n\treturn ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow setting invisible for styled features\n"
},
{
"from": "human",
"value": "(function () {\n \"use strict\";\n\n\n $(document).ready(function () {\n OpenLayers.Feature.prototype.equals = function (feature) {\n return this.fid === feature.f... | javascript | chosen |
[
{
"from": "system",
"value": "Remove import - test commit\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport logo from './logo.svg';\nimport './App.css';\n\nclass App extends Component {\n render() {\n return (\n <div className=\"App\">\n <div cl... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug occuring if fasiliteter is empty or does not exist\n"
},
{
"from": "human",
"value": "import DS from 'ember-data';\nimport ApplicationSerializer from '../serializers/application';\n\nexport default ApplicationSerializer.extend({\n\n normalize: function (mod... | javascript | chosen |
[
{
"from": "system",
"value": "Allow JSX files to be included\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar webpack = require('webpack');\n\nmodule.exports = {\n devtool: 'cheap-module-eval-source-map',\n entry: [\n 'eventsource-polyfill', // necessary for hot reloading... | javascript | chosen |
[
{
"from": "system",
"value": "Check if type is undefined first\n\n"
},
{
"from": "human",
"value": "const squanch = (...patterns) => {\n\treturn v => {\n\t\tconst primitives = ['Number', 'String', 'Boolean', 'Symbol'];\n\n\t\tconst isIdentical = (p, v) => p === v;\n\t\tconst isNull = (p, v) => i... | javascript | chosen |
[
{
"from": "system",
"value": "Integrate recent changes in jquery demo\n\n* Make use of the new append syntax which allows appending of multiple\nwidgets.\n* Change obsolete \"createPage\" method invokation to \"create\".\n* Format the code.\n\nChange-Id: I67f617ae6a7cfd7896ac899719da3021d6b84744\n"
},
{... | javascript | chosen |
[
{
"from": "system",
"value": "Add a note about semantic versioning to |PEG.VERSION| comment\n"
},
{
"from": "human",
"value": "/*\n * PEG.js @VERSION\n *\n * http://pegjs.majda.cz/\n *\n * Copyright (c) 2010-2012 David Majda\n * Licensend under the MIT license.\n */\nvar PEG = (function(undefine... | javascript | chosen |
[
{
"from": "system",
"value": "Make a POST request to create a user.\n"
},
{
"from": "human",
"value": "{\n class UsersService {\n create(user) {\n console.log('CREATED!');\n console.log(user);\n }\n }\n\n angular.module('meganote.users')\n .service('UsersService', UsersServ... | javascript | chosen |
[
{
"from": "system",
"value": "Check for useable Notification Api"
},
{
"from": "human",
"value": "/*!\n{\n \"name\": \"Notifications\",\n \"property\": \"notification\",\n \"caniuse\": \"notifications\",\n \"authors\": [\"Theodoor van Donge\"],\n \"notes\": [{\n \"name\": \"HTML5 Rocks t... | javascript | chosen |
[
{
"from": "system",
"value": "Check - don't insert script tags twice.\n"
},
{
"from": "human",
"value": "import _ from 'lodash';\n\nclass Page {\n loadScript(url) {\n return new Promise(resolve => {\n const s = document.createElement('script');\n s.type = 'text/ja... | javascript | chosen |
[
{
"from": "system",
"value": "Use more updated api methods\n"
},
{
"from": "human",
"value": "/* Collapse remember\n * Use a cookie to \"remember\" the state of bootstrap collapse divs\n * use the 'collapse-remember' class to get this functionality\n */\n$(document).ready(function () {\n cons... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce code duplication in emit and broadcast\n"
},
{
"from": "human",
"value": "const mergePermanentAndMetadata = (perm, meta) => Object.assign(perm, meta);\n\nconst broadcast = (socket, channel, payload, metadata) => {\n const obj = mergePermanentAndMetadata({\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary branching and pass reject handler as second args to then()\n"
},
{
"from": "human",
"value": "\"use strict\";\n\n/**\n * Fix operator that continuously resolves next promise returned from the function that consumes\n * resolved previous value.\n *... | javascript | chosen |
[
{
"from": "system",
"value": "Add console.log to test to find out travis problem\n"
},
{
"from": "human",
"value": "var _ = require('lodash');\nvar assert = require(\"assert\");\nvar exec = require('child_process').exec;\n\ndescribe('githours', function() {\n\n describe('cli', function() {\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Add a few comments and make whitespace more consistent.\n\nI realise 2 spaces is common in JS-land but I started using 4 so I win\nfor now ;).\n"
},
{
"from": "human",
"value": "angular.module(\"routeUrls\", [])\n\n.factory(\"urls\", function($route) {\n\n var pa... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug with chalk undefined\n"
},
{
"from": "human",
"value": "/**\n * Step 7\n * Where installation are run (npm, bower)\n */\n\nmodule.exports = {\n /**\n * Install npm dependencies\n */\n installNpmDependencies: function () {\n if (!(this.op... | javascript | chosen |
[
{
"from": "system",
"value": "bracket-push: Add test for proper nesting\n\nThis rules out solutions that simply count the number of open/close\nbrackets without regard for whether they are properly nested.\n\nI submitted a solution (in another language track) that would have\nfailed this test and did not re... | javascript | chosen |
[
{
"from": "system",
"value": "Improve output when there are no lint problems\n"
},
{
"from": "human",
"value": "'use strict';\nvar chalk = require('chalk');\nvar table = require('text-table');\n\nmodule.exports = {\n\treporter: function (result, config, options) {\n\t\tvar total = result.length;... | javascript | chosen |
[
{
"from": "system",
"value": "Add support to decimal number\n"
},
{
"from": "human",
"value": "/** \n* Name: Randomize \n* Author: Matheus Lucca do Carmo (matheuslc)\n* @version: 0.1\n* @module randomize\n*/\n\n\n'use strict'\n\n/**\n* Select a random item in a range.\n*\n* @param\t{Number}\tfir... | javascript | chosen |
[
{
"from": "system",
"value": "REFACTOR knobs field to use field component\n"
},
{
"from": "human",
"value": "import PropTypes from 'prop-types';\nimport React from 'react';\nimport styled from 'react-emotion';\n\nimport TypeMap from './types';\n\nconst InvalidType = () => <span>Invalid Type</spa... | javascript | chosen |
[
{
"from": "system",
"value": "Add enter keymap to OrgRegistration\n"
},
{
"from": "human",
"value": "Space.flux.BlazeComponent.extend(Donations, 'OrgRegistrationForm', {\n\n dependencies: {\n store: 'Donations.OrgRegistrationsStore'\n },\n\n state() {\n return this.store;\n },\n\n isC... | javascript | chosen |
[
{
"from": "system",
"value": "Enable semantic merging for clean css\n"
},
{
"from": "human",
"value": "const CleanCss = require(`clean-css`);\nconst Handlebars = require(`handlebars`);\nconst htmlclean = require(`htmlclean`);\nconst path = require(`path`);\nconst uncss = require(`uncss`);\n\ncon... | javascript | chosen |
[
{
"from": "system",
"value": "fix(flow): Fix flow error in test store setup.\n"
},
{
"from": "human",
"value": "// @flow\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport { routerReducer, routerMiddleware } from 'react-router-redux'\nimport { createMemoryHistory } fr... | javascript | chosen |
[
{
"from": "system",
"value": "Add api endpoint to delete portion\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst passport = require('passport');\nconst main = require('../app/controllers/main');\nconst api = require('../app/controllers/api');\nconst auth = require('../app/controllers/a... | javascript | chosen |
[
{
"from": "system",
"value": "Correct reporter decleration in test runner\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\ntry {\n const reporter = require('nodeunit').reporters.default;\n}\ncatch(e) {\n console.log(\"Cannot find nodeunit module.\");\n console.log(\"Make sure to ... | javascript | chosen |
[
{
"from": "system",
"value": "Insert 'hello' into the amazon voucher code box.\n"
},
{
"from": "human",
"value": "helloTest();\n\nfunction helloTest() {\n\tvar elems = document.getElementsByTagName('input');\n\tfor(var i=0; i< elems.length; i++) {\n\t console.log(elems[i].id);\n\t}\n\t\n\tvar am... | javascript | chosen |
[
{
"from": "system",
"value": "Make a serverCall and set returned values to the datapath\n"
},
{
"from": "human",
"value": "function generate_board_page(that, board_id){\n var bp_node = that.nodeById('board_page');\n \n}\n"
},
{
"from": "gpt",
"value": "function generate_board_p... | javascript | chosen |
[
{
"from": "system",
"value": "Fix lookup for username to try to use the db value\n"
},
{
"from": "human",
"value": "exports.names = ['reload'];\nexports.hidden = true;\nexports.enabled = true;\nexports.cdAll = 60;\nexports.cdUser = 60;\nexports.cdStaff = 60;\nexports.minRole = PERMISSIONS.MANAGE... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure components receive all children properly\n"
},
{
"from": "human",
"value": "import Component from '../Component';\n\nexport default function patchMithril(global) {\n const mo = global.m;\n\n const m = function(comp, ...args) {\n if (comp.prototype && ... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to esprima and parse in tolerant mode to allow global return\n"
},
{
"from": "human",
"value": "module.exports = {\n root: false,\n plugins: ['markdown'],\n globals: {\n expect: false\n },\n rules: {\n 'no-unused-vars': 0,\n 'no-undef': 0\n }\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix password input showing in trezor\n"
},
{
"from": "human",
"value": "import nem from \"nem-sdk\";\n\nfunction PasswordInput() {\n 'ngInject';\n\n return {\n restrict:'E',\n scope: {\n \tcommon: '='\n },\n template: '<ng-in... | javascript | chosen |
[
{
"from": "system",
"value": "Return faked wishlist as object array.\n"
},
{
"from": "human",
"value": "const _generate_wishlist = (max) => {\n let wishlist = [];\n for (let i=0; i<max; i++) {\n wishlist.push(faker.lorem.sentence());\n }\n return wishlist;\n};\n\nModules.server.generateWi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a tab/space issue coming up on github\n"
},
{
"from": "human",
"value": "/**\n * Has Vowels\n * \n * hasVowel tests if the String calling the function has a vowels\n * \n * @param {void}\n * @return {Boolean} returns true or false indicating if the string\n * ha... | javascript | chosen |
[
{
"from": "system",
"value": "Integrate with backend for status checking\n"
},
{
"from": "human",
"value": "pjax_config_page_require_auth(\"account/knowledgetest\", function(){\n return {\n onLoad: function() {\n KnowledgeTest.init();\n }\n };\n});\n\n"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Add ObjectId to api for more concise code\n"
},
{
"from": "human",
"value": "exports._project = function(api, next){\n\n var mongoose = require('mongoose');\n\n var uri = process.env.MONGOLAB_URI\n || 'mongodb://localhost/forest';\n\n\n var orgSchema = {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Delete feature when clicking its `.remove-button` in Rule Browser.\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n\n $('.rule-item').on('mouseenter', function() {\n $(this).addClass('highlighted');\n var controls = $('<span>').addClass('pu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix an error causing the css not being generated\n"
},
{
"from": "human",
"value": "module.exports = function () {\n var outputPath = \"./<%= outFolder %>/\";\n var src = \"./<%= srcFolder %>/\";\n\n var config = {\n vendor: {\n destPath: ... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.