conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Make sure IMEOutput send event and string according to spec\n"
},
{
"from": "gpt",
"value": "'use strict';\n\nvar testUtil = require('./util');\n\nvar IMEOutput = require('ime-output').IMEOutput;\n\nexports['test IMEOutput (set|finish)Composition'] = function(assert,... | javascript | chosen |
[
{
"from": "human",
"value": "Add an example of replying to an invitation\n"
},
{
"from": "gpt",
"value": "// \n// Read an .ics file given on the command line, generate a reply, and email it\n// using nodemailer.\n//\n\nvar fs = require('fs');\n\nvar icalendar = require('../lib');\n\n\nvar invite... | javascript | chosen |
[
{
"from": "human",
"value": "Add a gulp file to perform minifications (and help manage releases)\n"
},
{
"from": "gpt",
"value": "var gulp = require('gulp');\nvar uglify = require('gulp-uglify');\nvar rename = require('gulp-rename');\n \ngulp.task('default', function() {\n gulp.src('bootstr... | javascript | chosen |
[
{
"from": "human",
"value": "Create script to automatically create the list for Child Placement Considerations.\n"
},
{
"from": "gpt",
"value": "exports.create = {\n\t'Child Placement Consideration': [{\n\t\tchildPlacementConsideration: 'Fire Setting'\n\t}, {\t\n\t\tchildPlacementConsideration: ... | javascript | chosen |
[
{
"from": "human",
"value": "Add CustomEvent polyfill for tests\n"
},
{
"from": "gpt",
"value": "// Polyfill for creating CustomEvents on IE9/10/11\n// code pulled from:\n// https://github.com/d4tocchini/customevent-polyfill\n// https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent#Polyfi... | javascript | chosen |
[
{
"from": "human",
"value": "Add test for indexing simple object element within array\n"
},
{
"from": "gpt",
"value": "// index6.js Test indexes on array subelements.\n\ndb = connect( \"test\" );\nr = db.ed.db.index5;\nr.drop();\n\nr.save( { comments : [ { name : \"eliot\", foo : 1 } ] } );\nr.e... | javascript | chosen |
[
{
"from": "human",
"value": "Add child_process.exec failure test case\n"
},
{
"from": "gpt",
"value": "/* global describe it */\n'use strict'\n\nconst chai = require('chai')\nconst chaiAsPromised = require('chai-as-promised')\nconst requireInject = require('require-inject')\nconst sinon = requir... | javascript | chosen |
[
{
"from": "human",
"value": "Add date lib unit tests\n"
},
{
"from": "gpt",
"value": "/* eslint-env mocha, jest */\n\nimport {\n parse,\n dayStart,\n dayEnd,\n addDays,\n} from '../date';\n\nconst sampleUnixDate = 1511100000000;\n\nit('should parse date correctly', () => {\n const expected ... | javascript | chosen |
[
{
"from": "human",
"value": "Add test for finding dupliates\n"
},
{
"from": "gpt",
"value": "var tessel = require('tessel');\nvar bleLib = require('../');\nconsole.log('1..2');\n\nvar ble = bleLib.use(tessel.port['A']);\n\nble.on('ready', function(){\n testOne();\n});\n\nfunction testOne () {\n... | javascript | chosen |
[
{
"from": "human",
"value": "Implement tests for the pure components used in reads\n\nThis commit will implement tests for the PlainContainer and MetaError pure components used for the read functionality.\n"
},
{
"from": "gpt",
"value": "'use strict';\n\nimport React from 'react';\nimport TestUt... | javascript | chosen |
[
{
"from": "human",
"value": "Add script that converts schema.json files to dot language for visualization with graphviz\n"
},
{
"from": "gpt",
"value": "// Convert schema.json files to dot (graphviz' markup language)\n//\n// Usage:\n//\n// `node visualize.js schema.json | dot -Tpng -oschema.png`... | javascript | chosen |
[
{
"from": "human",
"value": "Add style text to DOM head\n"
},
{
"from": "gpt",
"value": "/*\n==================================================================================================\n Lowland - JavaScript low level functions\n Copyright (C) 2012 Sebatian Fastner\n====================... | javascript | chosen |
[
{
"from": "human",
"value": "Move and adjust code from phantomic\n"
},
{
"from": "gpt",
"value": "/*\n * source-mapper.js\n *\n * Copyright (c) 2014 Maximilian Antoni <mail@maxantoni.de>\n *\n * @license MIT\n */\n'use strict';\n\nvar through = require('through');\nvar convert = require('con... | javascript | chosen |
[
{
"from": "human",
"value": "Test Tangent Between Circles: no tangents\n"
},
{
"from": "gpt",
"value": "/* eslint-env mocha */\nconst CircleTangents = require('../../../src').algorithms.geometry.CircleTangents;\n\nconst assert = require('assert');\n\ndescribe('Tangent Between Circles', () => {\n... | javascript | chosen |
[
{
"from": "human",
"value": "Add a utility for mapping and importing the artworks into Elasticsearch.\n"
},
{
"from": "gpt",
"value": "var core = require(\"../models\");\n\nvar Artwork = core.db.model(\"Artwork\");\n\ncore.init(function() {\n Artwork.createMapping(function(err, mapping) {\n ... | javascript | chosen |
[
{
"from": "human",
"value": "Add Events module for managing events\n\n#3\n"
},
{
"from": "gpt",
"value": "/**\n * Events:\n * Manages the creation and retrieval of the events.\n * Also manages sending notifications based on events.\n */\n(function () {\n 'use strict';\n \n var Db = require('d... | javascript | chosen |
[
{
"from": "human",
"value": "Add a script to parse logs into sqlite.\n"
},
{
"from": "gpt",
"value": "\"use strict\";\n\nvar sqlite3 = require('sqlite3').verbose(),\n carrier = require('carrier'),\n fs = require('fs');\nvar db;\n\nfunction go() {\n db.run(\n'CREATE TABLE IF NOT EXIST... | javascript | chosen |
[
{
"from": "human",
"value": "Add the example to upload file to ftp server.\n"
},
{
"from": "gpt",
"value": "var FTP = require('ftp');\n\nvar client = new FTP();\n \nclient.on('ready', function() {\n\n client.cwd('uploads', function(err) {\n\n if (err)\n throw err;\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use async attribute on the script tag for our single script\n\nWe are loading a single script (in the minified/compiled/built\nversion of the app). Because the JS loads the HTML fragment\nand then decorates it in the correct order, we can do\nthis asynchronously after the DOM h... | javascript | chosen |
[
{
"from": "human",
"value": "Add new modal for payment terms and conditions\n\n"
},
{
"from": "gpt",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport Modal from 'react-bootstrap/lib/Modal';\n\nimport injectT from '../../../i18n/injectT';\n\nfunction PaymentTermsM... | javascript | chosen |
[
{
"from": "human",
"value": "Add camera module for starting/stopping camera functions\n"
},
{
"from": "gpt",
"value": "var spawn = require('child_process').spawn;\n\nvar exports = module.exports = {};\n\n// Trigger the start of a preview mjpeg stream from the camera\nexports.startPreview = funct... | javascript | chosen |
[
{
"from": "system",
"value": "Change capitalization to match the filesystem exactly.\n"
},
{
"from": "human",
"value": "import './utils/polyfills'; // Import polyfills for IE11\nexport App from './app';\nexport AppBar from './app_bar';\nexport Autocomplete from './autocomplete';\nexport Avatar f... | javascript | chosen |
[
{
"from": "human",
"value": "Add a GMail specific sync that has special logic for purging sent drafts created on the client.\n"
},
{
"from": "gpt",
"value": "CLASS({\n package: 'foam.lib.gmail',\n name: 'Sync',\n extendsModel: 'foam.core.dao.Sync',\n requires: [\n 'FOAMGMailMessage'\n ],... | javascript | chosen |
[
{
"from": "human",
"value": "Add birthday chocolate challenge solution\n"
},
{
"from": "gpt",
"value": "/**\n * https://www.hackerrank.com/challenges/the-birthday-bar/problem\n * \n * Lily has a chocolate bar consisting of a row of n squares where each square \n * has an integer written on it. S... | javascript | chosen |
[
{
"from": "human",
"value": "Add operations for 2d vectors\n"
},
{
"from": "gpt",
"value": "/**\n * Performs the cross product between two vectors.\n * @param A vector object, example: {x : 0,y : 0}\n * @param A vector object, example: {x : 0,y : 0}\n * @return The result of the cross product be... | javascript | chosen |
[
{
"from": "human",
"value": "Add the example to adjust image's width/height via ninja.\n"
},
{
"from": "gpt",
"value": "๏ปฟvar Image = require('image-ninja');\n\nvar dirpath = 'images/';\nvar imgname = 'download-logo.png';\nvar tmppath = 'tmp/'\n\nvar image = new Image(dirpath + imgname); \n\nimag... | javascript | chosen |
[
{
"from": "human",
"value": "Set up ui-router, add angular-rails-templates and ngclipboard as dependencies\n"
},
{
"from": "gpt",
"value": "(function(){\n 'use strict';\n\n angular\n .module('shareMark', ['ui.router', 'templates', 'ngclipboard'])\n .config(function($stateProvider, $urlRo... | javascript | chosen |
[
{
"from": "system",
"value": "Add riot.(var) backdoor to riot's private vars (for compiler, tests, etc)\n"
},
{
"from": "human",
"value": "/* Riot WIP, @license MIT, (c) 2015 Muut Inc. + contributors */\n\n;(function() {\n\n var riot = { version: 'WIP', settings: {} }\n\n 'use strict'\n"
},
... | javascript | chosen |
[
{
"from": "human",
"value": "Revert \"remove un used file\"\n\nThis reverts commit 76a91f84cd37c936e0caa020bdfac1b15e843703.\n"
},
{
"from": "gpt",
"value": "// // import { Serializer } from 'ember-graphql-adapter';\n// // import { singularize } from \"ember-inflector\";\n// // import { camelize... | javascript | chosen |
[
{
"from": "human",
"value": "Add saved search selection window\n\nWe add a window which can be used to select a saved search from which\na link may be embedded.\n"
},
{
"from": "gpt",
"value": "/* \n * Copyright 2016 Space Dynamics Laboratory - Utah State University Research Foundation.\n *\n * ... | javascript | chosen |
[
{
"from": "human",
"value": "Create a new perf test for the new content"
},
{
"from": "gpt",
"value": "Script.include(\"../BenchmarkLib.js\");\n\nvar TRACING_RULES = \"\" +\n \"trace.*=true\\n\" +\n \"*.detail=true\\n\" +\n \"\";\n\nResources.overrideUrlPrefix(TEST_ROOT, Script.resolveP... | javascript | chosen |
[
{
"from": "human",
"value": "Add event_id column to feed_items table\n"
},
{
"from": "gpt",
"value": "\nexports.up = function(knex, Promise) {\n return knex.schema.table('feed_items', function(table) {\n table.integer('event_id').index();\n table.foreign('event_id')\n .references('id... | javascript | chosen |
[
{
"from": "human",
"value": "node_tests: Add test coverage to autofocus.\n"
},
{
"from": "gpt",
"value": "var common = require(\"js/common.js\");\n\nset_global('$', function (f) {\n if (f === '#home') {\n return [{ focus: function () {} }];\n }\n f();\n});\n\n(function test_basic... | javascript | chosen |
[
{
"from": "human",
"value": "Relay: Add Build Checker for OSS Plugin\n\nSummary: I keep forgetting to do this. Others will, too.\n\nThis adds a test that makes sure that `lib/` matches `src/`.\n\nReviewed By: @josephsavona\n\nDifferential Revision: D2520980\n\nfb-gh-sync-id: ab8881ea0d22aed9b863ce52c276e263... | javascript | chosen |
[
{
"from": "human",
"value": "Check if syntax highlighting is better with .js\n"
},
{
"from": "gpt",
"value": "{\n \"rules\": {\n // All data is readable by anyone.\n \".read\": true,\n \"people\": {\n // A list of users with their names on the site.\n \"$userid\": {\n ... | javascript | chosen |
[
{
"from": "human",
"value": "Add helper for retrieving specific DOM elements\n"
},
{
"from": "gpt",
"value": "import {styler as Styler} from \"./styler\";\n\nclass DOM {\n constructor() {\n this.cache = {};\n }\n\n get controls() {\n if (this.cache.controls) { return this.cache.controls... | javascript | chosen |
[
{
"from": "human",
"value": "Add \"get random user\" example\n"
},
{
"from": "gpt",
"value": "import Cycle from '@cycle/core';\nimport {h, makeDOMDriver} from '@cycle/web';\nimport {makeHTTPDriver} from '@cycle/http';\n\nfunction main(responses) {\n const USERS_URL = 'http://jsonplaceholder.typ... | javascript | chosen |
[
{
"from": "human",
"value": "Create a single Style instance for the entire browser\n\nSigned-off-by: Victor Porof <7d8eebacd0931807085fa6b9af29638ed74e0886@mozilla.com>\n"
},
{
"from": "gpt",
"value": "/*\nCopyright 2016 Mozilla\n\nLicensed under the Apache License, Version 2.0 (the \"License\")... | javascript | chosen |
[
{
"from": "human",
"value": "Add a constructor for a component of the module wire\n"
},
{
"from": "gpt",
"value": "(function(app) {\n 'use strict';\n\n var jCore = require('jcore');\n var helper = app.helper || require('../helper.js');\n\n var ModuleWire = helper.inherits(function() {\n M... | javascript | chosen |
[
{
"from": "human",
"value": "Change recyclingAvailable column type to integer\n"
},
{
"from": "gpt",
"value": "module.exports = {\n up: function(migration, DataTypes, done) {\n migration.changeColumn(\n 'reports',\n 'recyclingAvailable',\n {type: \"integer USING 0\"}\n ).co... | javascript | chosen |
[
{
"from": "human",
"value": "Write a session storage implementation\n"
},
{
"from": "gpt",
"value": "const DEFAULT_KEY = 'redux-simple-auth-session'\n\nexport default ({ key = DEFAULT_KEY } = {}) => ({\n persist: data => {\n sessionStorage.setItem(key, JSON.stringify(data || {}))\n },\n re... | javascript | chosen |
[
{
"from": "system",
"value": "Allow range of ember-get-config versions\n"
},
{
"from": "human",
"value": "/* eslint-env node */\n'use strict';\n\nmodule.exports = {\n allowedVersions: {\n 'ember-getowner-polyfill': '^1.0.0 || ^2.0.0',\n 'ember-inflector': '^1.0.0 || ^2.0.0',\n 'ember-h... | javascript | chosen |
[
{
"from": "human",
"value": "Set up database in mongoose\n"
},
{
"from": "gpt",
"value": "const mongoose = require('mongoose');\n\nmongoose.connect('mongodb://localhost/codr');\n\nvar db = mongoose.connection;\n\ndb.on('error', console.error.bind(console, 'connection error:'));\ndb.once('open', ... | javascript | chosen |
[
{
"from": "human",
"value": "Add tests for deleteFile (failing due to webdav-server DELETE bug)\n"
},
{
"from": "gpt",
"value": "var path = require(\"path\"),\n fileExists = require(\"exists-file\").sync,\n directoryExists = require(\"directory-exists\").sync;\n\nvar localFilePath = path.r... | javascript | chosen |
[
{
"from": "human",
"value": "Add Stock on Hand Module\n"
},
{
"from": "gpt",
"value": "/*\n * Electronic Logistics Management Information System (eLMIS) is a supply chain management system for health commodities in a developing country setting.\n *\n * Copyright (C) 2015 Clinton Health Access In... | javascript | chosen |
[
{
"from": "human",
"value": "Test if the app window is visible\n"
},
{
"from": "gpt",
"value": "/* eslint-env jasmine */\n\ndescribe('Launching the app', () => {\n it('creates a visible window', async () => {\n const Application = require('spectron').Application\n let app = new Applicatio... | javascript | chosen |
[
{
"from": "human",
"value": "Add tower of hannoi problem.\n"
},
{
"from": "gpt",
"value": "'use strict';\n\n/*\n * Hannoi\n *\n * Tower solved progress look like as below:\n *\n * | | | | | | | | | 1 | |\n * | 1 | => | | | => | | | => 2 | |\n * | 2 | | | 1 3 | 1 3 | |\n * 4... | javascript | chosen |
[
{
"from": "human",
"value": "Write simple schema for projects\n"
},
{
"from": "gpt",
"value": "var mongoose = require('mongoose');\nvar schema = require('validate');\n\nvar Project = mongoose.model('Project', {\n name: {type: String, unique: true},\n created: {type: Date, default: new Date()},... | javascript | chosen |
[
{
"from": "human",
"value": "Add sample MapReduce stats jobs\n\nTo compute the most popular locations, projects, etc.\n"
},
{
"from": "gpt",
"value": "/* Functions for extracting stats.\n * To run these, start the mongo shell w/ the processed db and this file:\n * mongo --shell processed mapre... | javascript | chosen |
[
{
"from": "human",
"value": "Add file with all test passing\n"
},
{
"from": "gpt",
"value": " // JavaScript Variables and Objects\n\n// I worked on this challenge alone\n\n// __________________________________________\n// Write your code below.\n\nvar secretNumber = 7\nvar password = \"just open... | javascript | chosen |
[
{
"from": "human",
"value": "Add utility to return a package description for a specified version\n"
},
{
"from": "gpt",
"value": "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use thi... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused classes in btc ticker.\n"
},
{
"from": "human",
"value": "import loadTemplate from '../../../utils/loadTemplate';\nimport baseVw from '../../baseVw';\nimport { getExchangeRate } from '../../../utils/currency';\nimport app from '../../../app';\n\n\ncons... | javascript | chosen |
[
{
"from": "human",
"value": "Add test for CoffeeScriptRedux support.\n"
},
{
"from": "gpt",
"value": "var empower = require('../lib/empower'),\n CoffeeScript = require('coffee-script-redux'),\n q = require('qunitjs'),\n util = require('util'),\n tap = (function (qu) {\n var qu... | javascript | chosen |
[
{
"from": "human",
"value": "Implement Account Suspension Checker Module for Add/Remove/Check Suspension\n"
},
{
"from": "gpt",
"value": "var redisClient = require('../redis_client/redisClient').getClient()\nvar configuration = require('../config/configuration.json')\nvar utility = requi... | javascript | chosen |
[
{
"from": "human",
"value": "Add a plugin that can be configured through the constructor.\n"
},
{
"from": "gpt",
"value": "\n'use strict';\n\nvar common = require('./common');\n\nfunction Parser(selector, name, fields) {\n this.name = name;\n\n this.parse = function parse(services) {\n ... | javascript | chosen |
[
{
"from": "human",
"value": "Add test to ensure the server can handle keep-alive\n"
},
{
"from": "gpt",
"value": "// This test requires the program \"ab\"\nprocess.mixin(require(\"./common\"));\nhttp = require(\"http\");\nsys = require(\"sys\");\nPORT = 8891;\n\nbody = \"hello world\\n\";\nserve... | javascript | chosen |
[
{
"from": "human",
"value": "Create job type card preview component\n"
},
{
"from": "gpt",
"value": "import React, { Component } from 'react';\nimport { Card } from 'native-base';\n\nimport CardImageHeader from '../common/cardImageHeader';\nimport SimpleCardBody from '../common/simpleCardBody';\... | javascript | chosen |
[
{
"from": "human",
"value": "Add a way to save & fetch a model's attributes to/from local storage."
},
{
"from": "gpt",
"value": "/*global lib, JSON */\nlib.saveable = function (_public, _protected, key) {\n if (!JSON) {\n throw new Error(\"JSON does not exist\");\n }\n\n _public... | javascript | chosen |
[
{
"from": "human",
"value": "Add basic tests for user widget.\n"
},
{
"from": "gpt",
"value": "\ndefine(\n[\n 'chai',\n 'sinon',\n 'fixtures',\n 'argumenta/widgets/User',\n 'argumenta/widgets/Base',\n 'argumenta/config'\n],\nfunction(chai, undefined, fixtures, User, Base, Confi... | javascript | chosen |
[
{
"from": "human",
"value": "Add deletthis command, for when images are just that bad\n"
},
{
"from": "gpt",
"value": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at ht... | javascript | chosen |
[
{
"from": "human",
"value": "Update project bootstrap-hover-dropdown to 2.0.11\n"
},
{
"from": "gpt",
"value": "/**\n * Project: Bootstrap Hover Dropdown\n * Author: Cameron Spear\n * Contributors: Mattia Larentis\n *\n * Dependencies: Bootstrap's Dropdown plugin, jQuery\n *\n * A simple plugin ... | javascript | chosen |
[
{
"from": "human",
"value": "Add script to convert data from blue/red to winner/loser\n"
},
{
"from": "gpt",
"value": "var conn = new Mongo();\nvar db = conn.getDB(\"local\");\ndb.matches.find().forEach(function(doc){\n\tvar red = 0, games = [];\n\tdoc.games.forEach(function(game){\n\t\tif (game... | javascript | chosen |
[
{
"from": "human",
"value": "Fix tests โ let's default to an empty object if exports keyword is overriden\n"
},
{
"from": "gpt",
"value": "var should = require(\"should\");\n\ndefine(\"regular\", function(require, exports, module) {\n module.exports = \"regular-module\";\n});\n\ndefine(\"overri... | javascript | chosen |
[
{
"from": "system",
"value": "Make status indicators more like current site\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport {\n StyleSheet,\n View,\n} from 'react-native';\n\nimport { UserStatus } from '../api';\n\nconst styles = StyleSheet.create({\n comm... | javascript | chosen |
[
{
"from": "human",
"value": "Add unit tests for groupExists() method call.\n"
},
{
"from": "gpt",
"value": "var assert = require('assert');\nvar ActiveDirectory = require('../index');\nvar config = require('./config');\n\ndescribe('ActiveDirectory', function() {\n describe('#groupExists()', fun... | javascript | chosen |
[
{
"from": "human",
"value": "Add signup state; inject ui-router\n"
},
{
"from": "gpt",
"value": "(function(){\n angular.module('MeanSocial', ['ui.router'])\n .config(function ($stateProvider) {\n\n $stateProvider\n .state('signUp', {\n url: ... | javascript | chosen |
[
{
"from": "human",
"value": "Add a helper class for simplyfy realtime testing\n\n"
},
{
"from": "gpt",
"value": "import SocketIO from 'socket.io-client';\n\nconst eventTimeout = 2000;\nconst silenceTimeout = 500;\n\n/**\n * Session is a helper class\n * for the realtime testing\n */\nexport defa... | javascript | chosen |
[
{
"from": "human",
"value": "Add toBeChecked custom matcher for E2E.\n"
},
{
"from": "gpt",
"value": "/**\n * Custom matcher for testing if a checkbox is checked or not.\n *\n * Site Kit by Google, Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\")... | javascript | chosen |
[
{
"from": "human",
"value": "feat(BackAndroid): Add BackAndroid JS module for Windows platform\n\nThe BackAndroid module provides a JS API for the native DeviceEventEmitter module to hook into back-button presses. This is needed, e.g., for Navigator.\n\nFixes #246\n"
},
{
"from": "gpt",
"value":... | javascript | chosen |
[
{
"from": "human",
"value": "Add modified version of a Webpack hot loading file\n\nWhich makes use of grouping calls, so you donโt get a crazy amount of\ntop-level calls when re-rendering React components."
},
{
"from": "gpt",
"value": "// Modified copy of https://github.com/webpack/webpack/blob... | javascript | chosen |
[
{
"from": "human",
"value": "ADD - Minimal code for mPayroll API\n"
},
{
"from": "gpt",
"value": "const Hapi = require(\"hapi\");\n\nlet port = 3000;\nlet ip = 'localhost';\n\nconst server = new Hapi.Server();\n\nserver.connection({\n host: ip,\n port: port\n});\n\n//Add Routes\nserver.rou... | javascript | chosen |
[
{
"from": "human",
"value": "Add collection managment for the questionsGroup\n"
},
{
"from": "gpt",
"value": "QuestionsGroups = new Mongo.Collection('questionsGroups');\n\nvar Schemas = {};\n\nSchemas.QuestionsGroups = new SimpleSchema({\n\tlevel: {\n\t\ttype: Number,\n\t\tlabel: 'Question group... | javascript | chosen |
[
{
"from": "human",
"value": "Add a simple global test\n"
},
{
"from": "gpt",
"value": "//\n// Ref) https://www.browserstack.com/automate/node#getting-started\n//\n\nvar webdriver = require('browserstack-webdriver');\n\nvar browserstackConf = require('../browserstack-conf.json');\n\n// Input capa... | javascript | chosen |
[
{
"from": "human",
"value": "Add mission outline and pseudocode\n"
},
{
"from": "gpt",
"value": "// Design Basic Game Solo Challenge\n\n// This is a solo challenge\n\n// Your mission description:\n// Overall mission:\n //You're an astronaut and you need to get back to the spaceship. There is a ... | javascript | chosen |
[
{
"from": "human",
"value": "Add migration script to rewrite files property into sources property\n"
},
{
"from": "gpt",
"value": "'use strict';\n\nvar async = require('async');\nvar openVeoAPI = require('@openveo/api');\nvar db = openVeoAPI.applicationStorage.getDatabase();\n\n\nmodule.exports.... | javascript | chosen |
[
{
"from": "human",
"value": "Create users from static data\n\nThis pulls down a given GitHub Gist that contains a JSON file.\n\nIt then parses the data, creates a new password, creates a User, and\nthen it emails the user with their new password.\n"
},
{
"from": "gpt",
"value": "const bcrypt = r... | javascript | chosen |
[
{
"from": "human",
"value": "Add javascript tests for ClusterTemplateModel\n\nThis patch adds javascript tests for the following modules.\n - horizon.dashboard.container-infra.cluster-templates.model\n\nChange-Id: I7f7b720ef8d8e69ecf8ea7994db77f74baba4cd2\n"
},
{
"from": "gpt",
"value": "/**\n *... | javascript | chosen |
[
{
"from": "human",
"value": "Implement function getting current location by using jQuery.Defferred\n"
},
{
"from": "gpt",
"value": "// ไฝฟใๆน\n// getCurrentLocation()\n// .done(function(location) {\n// \t// success\n// })\n// .fail(function() {\n// \t// faile\n// });\n\nfunction get... | javascript | chosen |
[
{
"from": "human",
"value": "Add reddit client reducer tests\n"
},
{
"from": "gpt",
"value": "import reducer from './r'\n\ndescribe('r', () => {\n it('Should return the initial state', () => {\n expect(\n reducer(undefined, {})\n )\n .toEqual(null)\n })\n\n it('Should handle LOG... | javascript | chosen |
[
{
"from": "human",
"value": "Build a main layout for home page and customize layout sizes.\n"
},
{
"from": "gpt",
"value": "(function(){\n\n angular\n .module('app')\n .controller('MainController', [\n 'navService', '$mdSidenav', '$mdBottomSheet', '$log', '$q', '$state', '$... | javascript | chosen |
[
{
"from": "system",
"value": "Use tabs rather as psi is using tabs"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar psi = require('psi');\nvar site = 'http://www.html5rocks.com';\nvar key = '';\n\n// Please feel free to use the `nokey` option to try out PageSpeed\n// Insights as... | javascript | chosen |
[
{
"from": "human",
"value": "Add dedicated specs for getFullExtension\n"
},
{
"from": "gpt",
"value": "const path = require('path')\n\nconst helpers = require('../lib/helpers')\n\ndescribe('Helpers', () => {\n describe('getFullExtension', () => {\n\tit('returns the extension for a simple file',... | javascript | chosen |
[
{
"from": "human",
"value": "Add \"spec\" to load all lib files\n\nTo get true code coverage\n"
},
{
"from": "gpt",
"value": "var FS = require(\"q-io/fs\");\nvar PATH = require(\"path\");\n\nvar RELATIVE_LIB = PATH.join(\"..\", \"lib\");\nvar ABSOLUTE_LIB = PATH.join(__dirname, RELATIVE_LIB);\n\... | javascript | chosen |
[
{
"from": "human",
"value": "Add setup hooks thanks @tchak\n\nThe original idea here came from @tchak in his branch https://github.com/tchak/ember-apollo-client/tree/drop-mixins.\n\nThe only difference is that I default to willDestroy hook, not only for ember objects. This is to add support for Glimmer Comp... | javascript | chosen |
[
{
"from": "human",
"value": "Add specs for PrimitivePipline geometry packing.\n"
},
{
"from": "gpt",
"value": "/*global defineSuite*/\ndefineSuite([\n 'Scene/PrimitivePipeline',\n 'Core/BoundingSphere',\n 'Core/BoxGeometry',\n 'Core/Cartesian3',\n 'Core/Co... | javascript | chosen |
[
{
"from": "system",
"value": "Set browserStack timeout in an attempt to fix failing CI builds\n"
},
{
"from": "human",
"value": "module.exports = function (config) {\n config.set({\n frameworks: ['mocha'],\n\n exclude: ['build/test/external.spec.js'],\n\n files: [\n 'vendor/rsvp.j... | javascript | chosen |
[
{
"from": "human",
"value": "Add config to display date in french\n"
},
{
"from": "gpt",
"value": "moment.locale('fr', {\n months : \"janvier_fรฉvrier_mars_avril_mai_juin_juillet_aoรปt_septembre_octobre_novembre_dรฉcembre\".split(\"_\"),\n monthsShort : \"janv._fรฉvr._mars_avr._mai_juin_juil._... | javascript | chosen |
[
{
"from": "human",
"value": "Add discontinuity detector - a debugging tool for my crappy dsp\n"
},
{
"from": "gpt",
"value": "/**\n * @depends ../core/AudioletNode.js\n */\n\nvar DiscontinuityDetector = new Class({\n Extends: PassThroughNode,\n initialize: function(audiolet, threshold, cal... | javascript | chosen |
[
{
"from": "human",
"value": "Add script to dump links from a particular domain\n"
},
{
"from": "gpt",
"value": "// Find urls within selected domain in posts\n//\n\n'use strict';\n\n\nconst _ = require('lodash');\nconst argparse = require('argparse');\nconst Promise = require('bluebird');... | javascript | chosen |
[
{
"from": "human",
"value": "Add a test that uses a virtual input and virtual output to make a loopback.\n"
},
{
"from": "gpt",
"value": "var midi = require(\"../build/default/midi.node\");\n\nvar output = new midi.output();\nvar input = new midi.input();\n\noutput.openVirtualPort(\"node-midi Vi... | javascript | chosen |
[
{
"from": "human",
"value": "Add a unit test for ticker\n"
},
{
"from": "gpt",
"value": "'use strict';\n\nvar assert = require('chai').assert;\nvar hock = require('hock');\nvar uuid = require('node-uuid').v4;\nvar Trader = require('../../lib/trader.js');\nvar PostgresqlInterface = require('../..... | javascript | chosen |
[
{
"from": "human",
"value": "Add a small demo file"
},
{
"from": "gpt",
"value": "/**\n * Copyright (C) 2009-2013 Akiban Technologies, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by... | javascript | chosen |
[
{
"from": "human",
"value": "Test that active model adapter passes errors to serializer\n\nThanks to @pangratz for putting this test together. Currently we only have tests\nfor the adapter and serializer correctly behaving in isolation.\n"
},
{
"from": "gpt",
"value": "var env, store, adapter, U... | javascript | chosen |
[
{
"from": "human",
"value": "Solve Average 2 in javascript\n"
},
{
"from": "gpt",
"value": "const input = require('fs').readFileSync('/dev/stdin', 'utf8')\n\nconst [a, b, c] = input\n .trim()\n .split('\\n')\n .map(x => parseFloat(x))\n\nconsole.log(`MEDIA = ${((a * 2.0 + b * 3.0 + c * 5.0) /... | javascript | chosen |
[
{
"from": "system",
"value": "Remove pc.loadPack from the docs since the function doesn't actually exist - it's commented out in the sourcebase.\n"
},
{
"from": "human",
"value": "pc.extend(pc, function () {\r\n var Pack = function (data) {\r\n this.hierarchy = data.hierarchy;\r\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix initialize running callback multiple times\n"
},
{
"from": "human",
"value": "var specification = require('./specification');\n\nvar ConnectionHandle = require('./connectionHandle');\n\nexports.initialize = function(socket, spec, callback) {\n\tsocket.on('error'... | javascript | chosen |
[
{
"from": "human",
"value": "[FEATURE] Add withdrawal payments queue event emitter.\n"
},
{
"from": "gpt",
"value": "var gateway = require('./gateway');\nvar EventEmitter = require(\"events\").EventEmitter;\nvar util = require('util');\n\nvar queue = new EventEmitter; \n\nfunction pollIncoming(f... | javascript | chosen |
[
{
"from": "human",
"value": ":new: Add a basic cli script\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env node\n'use strict'\n\nrequire('debug').enable('UCompiler:*')\nconst UCompiler = require('..')\nconst knownCommands = ['go', 'watch']\nconst parameters = process.argv.slice(2)\n\nif (!paramet... | javascript | chosen |
[
{
"from": "system",
"value": "Verify no memory leaks in test\n"
},
{
"from": "human",
"value": "\nFABRIC = wrapFabricClient(createFabricClient());\n\nnode = FABRIC.DependencyGraph.createNode(\"foo\");\nnode.addMember( \"foo\", \"Integer[5]\" );\nnode.setData( \"foo\", [6,4,7,2,1] );\nprint( node... | javascript | chosen |
[
{
"from": "human",
"value": "Add TooltipEnabled mixin for title-based tooltips\n"
},
{
"from": "gpt",
"value": "import Ember from 'ember';\n\nexport default Ember.Mixin.create({\n\n /**\n * Attribute bindings for mixin's component element\n * @property {array} attributeBindings\n ... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.