conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add test for character constructor\n" }, { "from": "human", "value": "var TrieNode = require('../app/trie-node');\n\ndescribe('TrieNode', function() {\n var trienode;\n\n beforeEach(function() {\n trienode = new TrieNode();\n });\n\n it('should be an object',...
javascript
chosen
[ { "from": "system", "value": "Apply YouTube filter for dubtrack\n" }, { "from": "human", "value": "'use strict';\n\nConnector.playerSelector = '#player-controller';\n\nConnector.trackArtSelector = '.imgEl > img';\n\nConnector.artistTrackSelector = '.currentSong';\n\nConnector.isPlaying = () => $...
javascript
chosen
[ { "from": "system", "value": "refactor(smButton): Use to manage css classes\n" }, { "from": "human", "value": "(function() {\n'use strict';\n\nangular\n .module('semantic.ui.elements.button', [])\n\n .directive('smButton', smButton);\n\n function smButton() {\n return {\n restrict:'E...
javascript
chosen
[ { "from": "system", "value": "Fix `propType` check for `option.title`\n" }, { "from": "human", "value": "import PropTypes from 'prop-types';\n\nimport optionShape from './optionShape';\n\nexport default PropTypes.arrayOf(\n PropTypes.oneOfType([\n optionShape,\n PropTypes.shape(...
javascript
chosen
[ { "from": "system", "value": "Add initialization callback for file picker.\n" }, { "from": "human", "value": "function MaterialsFilePicker(callback) {\n this.doneCallback = callback;\n this.selectedMaterials = {};\n this.treeElement = $('#file-picker-tree');\n \n var courseId = gon.course;\...
javascript
chosen
[ { "from": "system", "value": "Make `grunt test` not invoke jenkins tests as well\n\nThis makes running tests directly on the commandline more responsive\nsince it isn't running the sets twice with less useful reporters the\nsecond time.\n" }, { "from": "human", "value": "module.exports = functio...
javascript
chosen
[ { "from": "system", "value": "Remove unused webpack loaders and use latest webpack Rules syntax\n" }, { "from": "human", "value": "const Dotenv = require('dotenv-webpack');\nconst WebpackShellPlugin = require('webpack-shell-plugin');\n\nmodule.exports = {\n plugins: [\n new Dotenv(),\n...
javascript
chosen
[ { "from": "system", "value": "Remove nesting for init module\n" }, { "from": "human", "value": "'use strict';\n\ndefine('<%= main_module_name %>',\n [\n // Add your dependencies here\n 'jquery',\n 'jquery-ujs'\n ],\n\n function($){\n\n function initialize(){\n // Add your ini...
javascript
chosen
[ { "from": "system", "value": "Make the entire module be in strict mode\n" }, { "from": "human", "value": "var Promise = require('promise');\n\nvar Deferred = function Deferred() {\n\t\"use strict\";\n\n\tif (!(this instanceof Deferred)) { return new Deferred(); }\n\n\tvar self = this;\n\tself.pr...
javascript
chosen
[ { "from": "system", "value": "Put ClickPath as first tab\n" }, { "from": "human", "value": "import React from 'react'\nimport Tabs from 'react-toolbox/lib/tabs/Tabs'\nimport Tab from 'react-toolbox/lib/tabs/Tab'\nimport ClickPath from './ClickPath'\nimport JSONTree from 'react-json-tree'\n\nclas...
javascript
chosen
[ { "from": "system", "value": "Handle data into individual states.\n" }, { "from": "human", "value": "import React, {Component} from 'react';\nimport $ from 'jquery';\nimport CurrentWeatherCard from './CurrentWeatherCard';\n\nexport default class App extends Component {\n constructor(){\n sup...
javascript
chosen
[ { "from": "system", "value": "Add support for output format\n" }, { "from": "human", "value": "#! /usr/bin/env node\n\"use strict\";\n\nrequire('babel-polyfill');\n\nfunction showHelpAndExit() {\n console.log(\"Usage: extract-messages [-m EXISTING] [-o OUTPUT] ...FILES/DIRECTORIES\");\n co...
javascript
chosen
[ { "from": "system", "value": "Add advisors to included people data\n" }, { "from": "human", "value": "/*jslint browser: true, undef: true *//*global Ext*/\nExt.define('SlateAdmin.store.people.People', {\n extend: 'Ext.data.Store',\n\n model: 'SlateAdmin.model.person.Person',\n proxy: {\...
javascript
chosen
[ { "from": "system", "value": "Add message to random channel\n" }, { "from": "human", "value": "var Botkit = require('botkit');\n\nvar controller = Botkit.slackbot({\n debug: false\n});\n\ncontroller.spawn({\n token: process.env.token || ''\n}).startRTM(function(err) {\n if (err) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add padding to color swatch headline.\n" }, { "from": "human", "value": "/* @flow */\nimport React from 'react';\nimport Box from 'grommet/components/Box';\nimport Heading from 'grommet/components/Heading';\nimport { BlockParagraph } from '../BlockParagraph';\nimpor...
javascript
chosen
[ { "from": "system", "value": "Return new post on save\n\n" }, { "from": "human", "value": "import * as Builder from 'src/server/modules/build';\nimport * as Queries from 'src/server/modules/queries';\n\nexport const publish = async (req, res, next) => {\n const post = await Queries.post(req.par...
javascript
chosen
[ { "from": "system", "value": "Allow browserify plugins to be specified via the --plugin flag\n\nCloses #3\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n'use strict'\n\nvar meow = require('meow')\nvar extend = require('xtend')\nvar degree = require('./')\n\nvar cli = meow({\n help: [...
javascript
chosen
[ { "from": "system", "value": "Allow dragging files/folders onto the app\n\nDoesn't work on the dock icon yet\n" }, { "from": "human", "value": "import React from 'react';\nimport { render } from 'react-dom';\nimport { Provider } from 'react-redux';\nimport configureStore from './store/configureS...
javascript
chosen
[ { "from": "system", "value": "fix(not-found-component): Make menu available in not-found routes\n\nMove NotFound component back into App children\n" }, { "from": "human", "value": "import React from 'react';\nimport {render} from 'react-dom';\n\nimport { Router, Route, applyRouterMiddleware} fro...
javascript
chosen
[ { "from": "system", "value": "Add missing index of Numpad number\n" }, { "from": "human", "value": "const kspecial = {\n 32 : 'Spacebar',\n 97 : 'Numpad 1',\n 98 : 'Numpad 2',\n 99 : 'Numpad 3',\n 100 : 'Numpad 4',\n 101 : 'Numpad 5',\n 102 : 'Numpad 6',\n 103 : 'Numpad 7',\n 104 : ...
javascript
chosen
[ { "from": "system", "value": "Remove indirect injected dependancy on handlebars in consuming config.js\n" }, { "from": "human", "value": "export function translate(load) {\n console.log('compiling template:', load.name);\n load.source = 'module.exports = require(\\'handlebars\\').compile(\\'' ...
javascript
chosen
[ { "from": "system", "value": "Fix parallax scroll speed and add vertical offsetting\n" }, { "from": "human", "value": "/*\n * Logo\n * ====\n *\n * A sample prefab (extended game object class), for displaying the Phaser\n * logo.\n */\n\n\nexport default class BgLayer extends Phaser.TileSprite {...
javascript
chosen
[ { "from": "system", "value": "Create uncategorized folder if it does not exist.\n" }, { "from": "human", "value": "chrome.extension.onMessage.addListener(\n function(request, sender, sendResponse) {\n console.log(request);\n console.log(sender);\n getOtherBookmarksChildren(f...
javascript
chosen
[ { "from": "system", "value": "Fix about dialog image reference\n\nAuditors: da39a3ee5e6b4b0d3255bfef95601890afd80709@bridiver\n" }, { "from": "human", "value": "const electron = require('electron')\nconst app = require('electron').app\nconst dialog = electron.dialog\nconst Channel = require('./c...
javascript
chosen
[ { "from": "system", "value": "Allow query functions to return null when no query needed\n" }, { "from": "human", "value": "/**\n * Utilities for interacting with the Router and getting location data\n * @module routeUtils\n */\nimport Rx from 'rxjs';\nimport match from 'react-router/lib/match';\...
javascript
chosen
[ { "from": "system", "value": "Fix inherit stdio option for Node 0.10\n" }, { "from": "human", "value": "'use strict';\n\nvar concat = require('concat-stream');\n\nvar spawn = require('child_process').spawn;\n\n\nmodule.exports = function (filename, argv, cb) {\n var app = spawn('node', [filenam...
javascript
chosen
[ { "from": "system", "value": "Add `change prop of piece that is moved` test\n\n* fail this test now.\n" }, { "from": "human", "value": "import Piece from '../../frontend/src/shogi/board';\n" }, { "from": "gpt", "value": "import Board from '../../frontend/src/shogi/board';\nimport Pie...
javascript
chosen
[ { "from": "system", "value": "Add update to PRescriptionPage using new reducer\n" }, { "from": "human", "value": "/* eslint-disable react/forbid-prop-types */\n/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\...
javascript
chosen
[ { "from": "system", "value": "Refactor the code to use the object initializer shorthand\n" }, { "from": "human", "value": "\"use strict\";\n\nfunction buildTopicElement(topic){\n let title = \"<h2>\" + topic.title + \"</h2>\";\n let author = \"<small>\" + topic.author + \"</small>\";\n let bo...
javascript
chosen
[ { "from": "system", "value": "Split tests out into commit and acceptance tests\n" }, { "from": "human", "value": "/* global module */\nmodule.exports = function(grunt) {\n grunt.initConfig({\n jshint: {\n all: ['app.js', 'blanket.js', 'gruntfile.js', 'src/**/*.js'],\n ...
javascript
chosen
[ { "from": "system", "value": "Make sure our URLs are usable\n" }, { "from": "human", "value": "\nmodule.exports.submitUrl = function (req, res) {\n // since the form should be handled with client-side Javascript,\n // if they POST to this route, we can assume Javascript is off...\n\n if...
javascript
chosen
[ { "from": "system", "value": "Remove the silly name count incrementer\n" }, { "from": "human", "value": "var std = require('std'),\n\tcompiler = require('../../lib/compiler'),\n\ta = require('../astMocks')\n \ntest('compiles something', a.static(1), function(output, assert) {\n\tassert.ok(!!std....
javascript
chosen
[ { "from": "system", "value": "Make the React example prettier\n" }, { "from": "human", "value": "var ssr = require(\"../../../lib\");\n\nvar render = ssr({\n\tconfig: __dirname + \"/package.json!npm\"\n});\n\nrender(\"/\").then(function(result){\n\tconsole.log(result.html);\n});\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "Update control-flow test to check for repeat count\n" }, { "from": "human", "value": "'use strict';\n\nvar test = require('tape');\nvar BEST = require('../lib/index');\n\ntest('Control Flow', function(t) {\n t.plan(1);\n BEST.deploy('famous-demos:if-repeat', '...
javascript
chosen
[ { "from": "system", "value": "Testing: Fix the selector of editor preferences\n" }, { "from": "human", "value": "export const approveStorage = () => {\n return cy.get('#dialog_buttons > input[type=button][data-ok]')\n .click();\n};\n\nexport const visitAndApproveStorage = () => {\n cy.visit...
javascript
chosen
[ { "from": "system", "value": "Return something in the response.\n" }, { "from": "human", "value": "// 在 Cloud code 里初始化 Express 框架\nvar express = require('express');\nvar app = express();\n\n// App 全局配置\napp.set('views','cloud/views'); // 设置模板目录\napp.set('view engine', 'ejs'); // 设置 templat...
javascript
chosen
[ { "from": "system", "value": "Put code-style checks after unit tests\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function(grunt) {\n\n\tvar config = {\n\n\t\tjscs: {\n\t\t\tsrc: [\n\t\t\t\t'lib/*.js',\n\t\t\t\t'test/**/*.js',\n\t\t\t\t'gruntFile.js',\n\t\t\t\t'index.js'\...
javascript
chosen
[ { "from": "system", "value": "chore: Fix grunt-bump config to include the changelog.\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n grunt.initConfig({\n pkgFile: 'package.json',\n simplemocha: {\n options: {\n ui: 'bdd',\n reporter: 'dot'\n ...
javascript
chosen
[ { "from": "system", "value": "Include the gotchas module in app-module.\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('jslab', [\n 'jslab.router',\n 'jslab.templates',\n 'jslab.components',\n 'jslab.home',\n 'jslab.objects',\n 'jslab.functions',\n 'jslab.angular'\n]);...
javascript
chosen
[ { "from": "system", "value": "Fix error after importing survey" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { Button, Col, Container, Row } from 'reactstrap';\nimport { connect } from 'react-redux';\nimport L from 'utils/Labels'\nimport RouterUtils from 'uti...
javascript
chosen
[ { "from": "system", "value": "Check for jQuery before init ribbon\n" }, { "from": "human", "value": "$(document).ready(function(){\n var $ribbon = $('.ribbon');\n if ($ribbon) {\n var faded = sessionStorage.getItem('fade-test-banner', true);\n if (! faded) {\n $('....
javascript
chosen
[ { "from": "system", "value": "Rename hide to disable in navbar and use ngIf\n\nWe don't want to draw the element at all, if the navbar is disabled.\n" }, { "from": "human", "value": "\"use strict\";\n\nangular.module('arethusa.core').directive('arethusaNavbar', function(configurator) {\n return...
javascript
chosen
[ { "from": "system", "value": "Add message when starting server directly\n" }, { "from": "human", "value": "var express = require('express');\n\nvar app = module.exports = express.createServer(function(req, res) {\n res.send({ip: req.header('x-forwarded-for') || req.connection.remoteAddress});\n...
javascript
chosen
[ { "from": "system", "value": "Fix issue with old express usage\n" }, { "from": "human", "value": "//var http = require('http');\nvar express = require('express');\n\nvar app = module.exports = express.createServer();\n\n/*http.createServer(function (req, res) {\n res.writeHead(200, {'Content-...
javascript
chosen
[ { "from": "system", "value": "Move variables to their relevant scope\n" }, { "from": "human", "value": "'use strict';\n\nvar nouns = [\n 'cat',\n 'dog',\n 'mouse',\n 'house'\n];\nvar firstNoun = '';\nvar secondNoun = '';\nvar metaphor = '';\n\nvar numberOfNouns = nouns.length;\nvar nounIndex...
javascript
chosen
[ { "from": "system", "value": "Fix database name and user\n" }, { "from": "human", "value": "var express = require('express');\nvar pg = require('pg');\n\nvar dbuser = \"nodeapp\";\nvar dbpass = \"password\";\nvar dbhost = \"localhost\";\nvar dbport = \"5432\";\nvar dbname = \"nodeapp\";\nvar con...
javascript
chosen
[ { "from": "system", "value": "Add commented out Storyshots test\n\nThis allows interactive interaction with what Storyshots sees.\n" }, { "from": "human", "value": "/* eslint-disable consistent-return */\n/* eslint-disable no-console */\n/* eslint-disable import/no-extraneous-dependencies */\nco...
javascript
chosen
[ { "from": "system", "value": "Return a piece of data from database\n" }, { "from": "human", "value": "var http = require(\"http\");\nvar url = require(\"url\");\nvar MongoClient = require(\"mongodb\").MongoClient;\nvar url = \"mongodb://admin:segfault@ds145355.mlab.com:45355/gcmt_dev\";\n\nMongo...
javascript
chosen
[ { "from": "system", "value": "Fix deeplink from p-s to nps\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n\nconst config = require.resolve('react-component-template/package-scripts');\nconst ps = require.resolve('p-s/dist/bin/p-s');\n\n\nrequire('child_process')\n .spawn('node', [ps,...
javascript
chosen
[ { "from": "system", "value": "Add the CLI functionality, and help text\n\nSigned-off-by: Siddharth Kannan <805f056820c7a1cecc4ab591b8a0a604b501a0b7@gmail.com>" }, { "from": "human", "value": "#!/usr/bin/env node\n'use strict';\nvar meow = require('meow');\nvar ghGistOwner = require('./');\n\nvar...
javascript
chosen
[ { "from": "system", "value": "Fix minute count in logs\n" }, { "from": "human", "value": "var sessionStart = new Date().getTime();\n\nfunction zeroPad(num, places) {\n places = places || 2;\n var str = num+'';\n while (str.length < 2) {\n str = '0'+str;\n }\n return str;\n}\n\nfunction l...
javascript
chosen
[ { "from": "system", "value": "Disable AWS tests in CI environment (as they require credentials)\n" }, { "from": "human", "value": "// This test assumes there's a default profile\ndescribe('AWS SDK', function() {\n beforeEach(function() {\n QT.stubConfig('quadro.aws.region', 'us-west-2')\n }...
javascript
chosen
[ { "from": "system", "value": "Remove unused model data in route from dummy app\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport {\n REQUEST_TO_PUBLISH_LIVE,\n READY_FOR_COPYEDITING,\n COURSE_INFORMATION_SYNCED\n} from '@cardstack/workflow/services/cardstack-workflow';\n\n...
javascript
chosen
[ { "from": "system", "value": "Fix stop immediate propagation handling.\n" }, { "from": "human", "value": "(function() {\n const events = new Map();\n const stopped = new WeakMap();\n\n function before(subject, verb, fn) {\n const source = subject[verb];\n subject[verb] = function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Add alpha pump behind paywall\n" }, { "from": "human", "value": "cryptotracky.run(function ($transitions, cognitoService, $rootScope) {\n var vipRestriction = true;\n $rootScope.vip = false;\n var restrictedStates = [\"overview-long-binance\", \"realtime-multi\"]...
javascript
chosen
[ { "from": "system", "value": "Add expire date to cookie\n" }, { "from": "human", "value": "'use strict'\n\nimport cookie from 'react-cookies'\n\nexport const getToken = () => {\n return cookie.load('ritoplzToken')\n}\n\nexport const setToken = token => {\n return cookie.save('ritoplzToken', to...
javascript
chosen
[ { "from": "system", "value": "Add webpack dev server overrides\n" }, { "from": "human", "value": "var webpack = require('webpack');\nvar webpackConfig = require('./webpack').options;\n\n\nwebpackConfig.plugins.push(new webpack.DefinePlugin({\n 'process.env': {\n 'NODE_ENV': '\"developm...
javascript
chosen
[ { "from": "system", "value": "Remove toolkit reference from JS\n" }, { "from": "human", "value": "// This is a manifest file used by the runner for JavaScript unit tests.\n// It is not used in the main application.\n//\n//= require govuk_toolkit\n//\n//= require_tree ./\n//= require_tree ./views...
javascript
chosen
[ { "from": "system", "value": "Add utility functions for formatting dates and the recall class.\n" }, { "from": "human", "value": "var app = angular.module('openFDA', [\n 'templates', 'ngRoute', 'ngResource', 'directives', 'angular-flash.service',\n 'angular-flash.flash-alert-directive', 'u...
javascript
chosen
[ { "from": "system", "value": "Mark this step complete as soon as we load it" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n keptSecurely: function (){\n //have they filled in the secure method?\n return !! (this.model.get('statement...
javascript
chosen
[ { "from": "system", "value": "Change notification event handlers to arrow functions\n\nTo retain `this` as the current instance of the object\n" }, { "from": "human", "value": "export default class Notifier {\n constructor() {\n window.notification = window.Notification || window.mozNotifica...
javascript
chosen
[ { "from": "system", "value": "Move bookkeeping of page_model to start().\n" }, { "from": "human", "value": "/***\n\tIntro Screen Controller\n\tResponsible for handling the intro screen controls\n***/\ndefine(['require', 'jsclass/min/core', 'client/base/controller', 'client/models/model_top_image...
javascript
chosen
[ { "from": "system", "value": "Add link to CW project in dropdown" }, { "from": "human", "value": "import React from 'react';\n\nconst Projects = ({ projects, toggle, update }) => {\n return (\n <ul\n className=\"list-unstyled\"\n style={{ marginBottom: '0' }}\n >\n {project...
javascript
chosen
[ { "from": "system", "value": "Improve names on geolocation callback functions\n" }, { "from": "human", "value": " var errorCallback, getPosition, hideAddressAndZip, hideGeoLoc, successCallback;\n\n successCallback = function(position) {\n $('input#latitude').val(position.coords.latitude);...
javascript
chosen
[ { "from": "system", "value": "Add language and title as category page variables\n\nThis data will be available in the layouts.\n\nBuilt from 9faf1c52d3216302ed78f39f27a9e4e361b9a9dc.\n" }, { "from": "human", "value": "var pagination = require('hexo-pagination');\nvar _ = require('lodash');\n\nhe...
javascript
chosen
[ { "from": "system", "value": "Add methods to subscribe to office changes.\n" }, { "from": "human", "value": "const Parse = require('parse/react-native')\nconst Person = require('./person-model')\n\nParse.initialize('hackathon')\nParse.serverURL = 'http://192.168.1.137:8080/parse'\n\nfunction upd...
javascript
chosen
[ { "from": "system", "value": "Delete unused parallax scrolling js code\n" }, { "from": "human", "value": "'use strict';\n\nfunction parallax() {\n var scrolled = $(window).scrollTop();\n if (scrolled < 500) {\n $('.blog-header').css('background-position', '0px ' + (0.2 * scrolled) + 'px');\...
javascript
chosen
[ { "from": "system", "value": "Fix for missing parenthesis causing syntax error.\n\nReviewed by me.\n" }, { "from": "human", "value": "/*\n * bootstrap.js\n * Objective-J\n *\n * Created by Francisco Tolmasky.\n * Copyright 2008, 280 North, Inc.\n *\n * This library is free software; you can redi...
javascript
chosen
[ { "from": "system", "value": "fix(frontend): Fix bug with missed calls.\n\nAdd replacing listener with the new one with same name.\n" }, { "from": "human", "value": "/**\n * Created by stas on 24.01.16.\n */\n'use strict';\n\nplayzoneServices.factory('WebsocketService', function($websocket) {\n ...
javascript
chosen
[ { "from": "system", "value": "Move $state setup to run block\n" }, { "from": "human", "value": "angular.module('resourceSolver', [])\n.provider('resourceSolver', function ResourceSolver() {\n var baseUrl = '';\n\n this.setBaseUrl = function(url) {\n baseUrl = url;\n };\n\n this.$get = fun...
javascript
chosen
[ { "from": "system", "value": "Fix URL/player.ui.mode sync issues on page load.\n" }, { "from": "human", "value": "angular.module(\"sim/Simulation.js\", [\n \"sim/model/Player.js\",\n \"sim/ui/ActionBar.js\",\n \"sim/ui/Explore.js\",\n \"sim/ui/Rest.js\",\n \"sim/ui/Statu...
javascript
chosen
[ { "from": "system", "value": "Connect is required for selenium tests\n" }, { "from": "human", "value": "\"use strict\";\n\nmodule.exports = function (grunt) {\n configuration.selenium.forEach(function (browser) {\n grunt.registerTask(browser, \"exec:test\" + browser.charAt(0).toUpperCa...
javascript
chosen
[ { "from": "system", "value": "Fix: Align text in code editor with component (remove padding)\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport Styled from 'rsg-components/Styled';\n\nconst styles = ({ fontFamily, color, space, fontSize }) ...
javascript
chosen
[ { "from": "system", "value": "feat: Disable replication for old pouch\n" }, { "from": "human", "value": "import { setOffline } from 'drive/mobile/modules/settings/duck'\nimport { startReplication } from 'drive/mobile/modules/replication/sagas'\nimport { setClient, setToken } from './duck'\n\nexp...
javascript
chosen
[ { "from": "system", "value": "Support different platforms and architectures.\n" }, { "from": "human", "value": "var gulp = require('gulp'),\n babel = require('gulp-babel'),\n runSequence = require('run-sequence'),\n rename = require('gulp-rename'),\n electron = require('gulp-atom-electron')...
javascript
chosen
[ { "from": "system", "value": "Declare HMRClient module to fix Flow issues in OSS\n\nSummary: Closes https://github.com/facebook/react-native/pull/17881\n\nDifferential Revision: D6918186\n\nPulled By: hramos\n\nfbshipit-source-id: ebcdbde1623eab497062fb50bccb393734b3578f\n" }, { "from": "human", ...
javascript
chosen
[ { "from": "system", "value": "Add yapi option for tests\n" }, { "from": "human", "value": "module.exports = {\n dbname: 'yamb-test',\n storage: require('./storage')\n};" }, { "from": "gpt", "value": "var options = {\n dbname: 'yamb-test',\n storage: require('./storage')\n};\n\nif...
javascript
chosen
[ { "from": "system", "value": "Set a timer to detect when the mouse stops moving\n" }, { "from": "human", "value": "buttonCodeToChar = {1: \"Left\", 2: \"Middle\", 3: \"Right\"};\nbuttonCharToCode = {\"Left\": 1, \"Middle\": 2, \"Right\": 3};\n\nfunction Mouse() {\n // It'd be good to get this...
javascript
chosen
[ { "from": "system", "value": "Add some more ABILTYPEs to MyCharacter.getAbilityValue\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * @constructor\n */\nfunction MyCharacter(world) {\n CharObject.call(this, world);\n this.type = 'local';\n this.useMoveCollision = true;\n\n this.mp...
javascript
chosen
[ { "from": "system", "value": "Allow config of the server port via env variable." }, { "from": "human", "value": "var connect = require(\"./lib/connect/lib/connect\"),\n express = require(\"express\"),\n http = require(\"http\"),\n url = require(\"url\");\n\nvar app = express.createServe...
javascript
chosen
[ { "from": "system", "value": "Add an EntryDetailCtrl for retreiving the Entry details\n" }, { "from": "human", "value": "var trexControllers = angular.module('trexControllers', []);\n\ntrexControllers.controller('ProjectListCtrl', ['$scope', 'Project',\n function($scope, Project) {\n $...
javascript
chosen
[ { "from": "system", "value": "Add an attribute to know if the user is currently online\n" }, { "from": "human", "value": "/**\n * User.js\n *\n * @description :: TODO: You might write a short summary of how this model works and what it represents here.\n * @docs :: http://sailsjs.org/docu...
javascript
chosen
[ { "from": "system", "value": "Put primary unit-tests back in.\n" }, { "from": "human", "value": "Package.describe({\r\n summary: \"Meteor unit testing framework for packages\"\r\n});\r\n\r\nPackage.on_use(function (api, where) {\r\n api.use([\"coffeescript\",\"tinytest\",\"test-helpers\",\...
javascript
chosen
[ { "from": "system", "value": "Fix for object clone (defaultConfig was being overwritten from the settings)\n" }, { "from": "human", "value": "'use strict';\n\nvar copay = require('copay');\nvar _ = require('underscore');\nvar config = defaultConfig;\nvar localConfig = JSON.parse(localStorage.get...
javascript
chosen
[ { "from": "system", "value": "Fix nested model should be a value object.\n" }, { "from": "human", "value": "/**\n * Created by dungvn3000 on 3/14/14.\n * The model automatic update mapping field when set associations table.\n */\n\nExt.define('sunerp.model.BaseModel', {\n extend: 'Ext.data.Mo...
javascript
chosen
[ { "from": "system", "value": "Remove describe only test switch\n" }, { "from": "human", "value": "/* jshint mocha: true */\n'use strict';\n\nconst assert = require('assert');\nconst sendgrid = require('../lib/sendgrid');\n\nlet nodes;\nlet send = sendgrid.sendgrid.send;\n\nbeforeEach(function() ...
javascript
chosen
[ { "from": "system", "value": "Remove the \"only\" of the test file :(\n" }, { "from": "human", "value": "'use strict';\n\nvar Converter = require('..');\nvar fs = require('fs');\n\n\n\ndescribe.only('Test JCAMP converter of GCMS', function () {\n\n var result = Converter.convert(fs.readFileSy...
javascript
chosen
[ { "from": "system", "value": "Fix checks in session test\n" }, { "from": "human", "value": "const graphqlTester = require('graphql-tester')\nconst expressGraphql = require('express-graphql')\nconst {expect} = require('chai')\nconst cookieSession = require('cookie-session')\nconst express...
javascript
chosen
[ { "from": "system", "value": "Save current movie being search on model and make totalPages array\n" }, { "from": "human", "value": "angular.module('zeus.results', [])\n.controller('ResultsController', function($scope, Results, $routeParams) {\n $scope.results = [];\n $scope.loaded = false;\n ...
javascript
chosen
[ { "from": "system", "value": "Add method for file renaming\n" }, { "from": "human", "value": "const fs = require('fs')\nconst util = require('util')\nconst path = require('path')\n\nclass FsUtils {\n static get chmod() {\n return util.promisify(fs.chmod)\n }\n\n static get readFile() {\n ...
javascript
chosen
[ { "from": "system", "value": "Add // so socket is ws://host:port/websocket. Makes Edge happy\n" }, { "from": "human", "value": "export default class Socket {\n constructor(on_message) {\n this.on_message = on_message;\n this.init();\n }\n\n init() {\n let loc = loc...
javascript
chosen
[ { "from": "system", "value": "Add socket timeout in socket options\n" }, { "from": "human", "value": "import mongoose from 'mongoose';\n\nexport default function(url) {\n return new Promise((resolve, reject) => {\n mongoose.connect(url, {\n server: {\n auto_reconnect: true,\n ...
javascript
chosen
[ { "from": "system", "value": "Send fqid on stage config creation\n" }, { "from": "human", "value": "export default ['$scope', '$http', '$uibModalInstance', function($scope, $http, $uibModalInstance) {\n\n // get stages in parent controller\n console.log('create-stage scope', $scope.$parent.$st...
javascript
chosen
[ { "from": "system", "value": "feat: Add mdl-lite snackbar to notify user of required reload.\n\nReload required when user changes a settings" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n init () {\n Ember.run.schedule('afterRender',...
javascript
chosen
[ { "from": "system", "value": "Add JS to make checkboxes work\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/javascripts,...
javascript
chosen
[ { "from": "system", "value": "Add link to release notes (to motivate myself write them)\n" }, { "from": "human", "value": "import * as utils from 'base/utils';\nimport Dialog from '../_dialog';\nimport Vzb from 'vizabi';\n\n/*\n * Size dialog\n */\n\nvar About = Dialog.extend({\n\n/**\n * Initia...
javascript
chosen
[ { "from": "system", "value": "Add 7.6 challenge to github\n" }, { "from": "human", "value": " // JavaScript Olympics\n\n// I paired [by myself, with:] on this challenge.\n\n// This challenge took me [#] hours.\n\n\n// Warm Up\n\n\n\n\n// Bulk Up\n\n\n\n\n// Jumble your words\n\n\n\n\n// 2,4,6,8\...
javascript
chosen
[ { "from": "system", "value": "Update to call skills animations from skillsAnimation.js\n" }, { "from": "human", "value": "var close = document.querySelectorAll('.close');\nvar modal = document.querySelector('.modal');\nvar modalAbout = document.getElementById('modal-about');\n\ncontact.addEventL...
javascript
chosen
[ { "from": "system", "value": "Add readfile and create fileArray with text dividedn in 200 words parts\n" }, { "from": "human", "value": "var argv = require('yargs')\n .option('c', {\n alias: 'client',\n type: 'array'\n })\n .option('s', {\n alias: 'search',\n type: 'string'\n })\...
javascript
chosen
[ { "from": "system", "value": "Create towns and subjects on server start.\n" }, { "from": "human", "value": "module.exports = {\n 'url': process.env.DATABASE_URL || 'mongodb://localhost/edu_events'\n};\n" }, { "from": "gpt", "value": "module.exports = {\n 'url': process.env.DATA...
javascript
chosen