conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Include signInStrategy for future updates\n" }, { "from": "human", "value": "'use strict';\n\nvar express = require('express');\nvar kraken = require('kraken-js');\nvar db = require('./lib/db');\nvar crypto = require('./lib/crypto');\n\nvar passport = require('passp...
javascript
chosen
[ { "from": "system", "value": "Handle the shift key being released outside of the document by simulating\nthe keyup event when the mouse returns.\n" }, { "from": "human", "value": "define(function (require) {\n\tvar $ = require(\"jquery\");\n\n\tvar documentKeyboardHandler = function (handler) {\...
javascript
chosen
[ { "from": "system", "value": "Fix error when theres no number at the cursor\n" }, { "from": "human", "value": "define([\r\n],\r\nfunction (\r\n) {\r\n var File = function (name, contents) {\r\n this.name = name || 'Example';\r\n this.contents = contents;\r\n this.selected = true;\r\n ...
javascript
chosen
[ { "from": "system", "value": "Handle the case when result is undefined\n" }, { "from": "human", "value": "export default class RocExportPlugin {\n constructor(resolveRequest) {\n this.resolveRequest = resolveRequest;\n }\n\n apply(compiler) {\n // We assume that loaders wi...
javascript
chosen
[ { "from": "system", "value": "Remove the randomization of mentors -- they are alphabetical by surname\n" }, { "from": "human", "value": "$(document).ready(function (){\n // smooth scrolling\n $(\".smoothie\").on('click', function(event) {\n var target = $(this.hash)\n , navOffset = $('...
javascript
chosen
[ { "from": "system", "value": "Fix code highlighting in note previews\n" }, { "from": "human", "value": "var updatePreviewTarget = function(data, status) {\n $('.spinner').hide();\n $('#preview-target').html(data);\n renderLatexExpressions();\n}\n\nvar renderLatexExpressions = function() {\n ...
javascript
chosen
[ { "from": "system", "value": "canvas-animation: Add incomplete handler implementation to PathEditView.\n" }, { "from": "human", "value": "/*globals define*/\ndefine([\n 'geometry/views/object2d-view'\n], function( Object2DView ) {\n 'use strict';\n\n var PathView = Object2DView.extend({\n })...
javascript
chosen
[ { "from": "system", "value": "Adjust epsilon, setting it to 1e-9 for smoother animations\n\nWas getting flickering at higher values.\n" }, { "from": "human", "value": "/**\n * @flow\n */\n'use strict';\n\nlet { Easing } = require('react-native');\n\n// See Apple's \"CAMediaTimingFunction Class R...
javascript
chosen
[ { "from": "system", "value": "[Android] Destroy containes when they are not visible\n\nWhatever I've tried so far ends up failing in really weird ways, so let's admit\ndefeat, for now. Destroy containers only on Android.\n\nThis shall be revisited when we update RN to version >= 0.43 and we have\n\"display:...
javascript
chosen
[ { "from": "system", "value": "Switch the blog handler over to POST\n\nMakes the Discourse webhook actually work right." }, { "from": "human", "value": "// Copyright © 2017 Michael Howell. All rights reserved.\n// The following code is covered by the AGPL-3.0 license.\n\nconst selfapi = require('...
javascript
chosen
[ { "from": "system", "value": "Fix param in sendMessage function\n" }, { "from": "human", "value": "import template from './chat-page.html';\nimport { addMessage, selectThread } from '../../shared/threads/threads.actions';\nimport { getChannels, getDirectMessages, getCurrentThread } from '../../s...
javascript
chosen
[ { "from": "system", "value": "Build script: Replace `exec` with `spawn`\n" }, { "from": "human", "value": "var exec = require('child_process').exec;\nfunction puts(error, stdout, stderr) { console.log(stdout) }\n\nvar os = require('os');\n//control OS\n//then run command depengin on the OS\n\nif...
javascript
chosen
[ { "from": "system", "value": "Use relative imports for container.\n" }, { "from": "human", "value": "/*\nPublic API for the container is still in flux.\nThe public API, specified on the application namespace should be considered the stable API.\n// @module container\n @private\n*/\n\nimport Reg...
javascript
chosen
[ { "from": "system", "value": "Change date to unix timestamp\n" }, { "from": "human", "value": "export class Notification {\n /**\n * @typedef NotificationData\n * @property {boolean} [read]\n * @property {string} title\n * @property {string} message\n * @property {('basic'|'sms')} [ty...
javascript
chosen
[ { "from": "system", "value": "Fix js style on RailsRouteBuilder\n" }, { "from": "human", "value": "import Axios from 'axios'\nimport PathBuilder from './path-builder'\n\nclass RailsRouteBuilder {\n constructor (configs = {}) {\n // TODO\n // Make an option for switching to GET for destroy...
javascript
chosen
[ { "from": "system", "value": "Fix Fetch util reject case\n" }, { "from": "human", "value": "var Promise = require('es6-promise').Promise;\n\nfunction fetch(options) {\n\n return new Promise(function(resolve, reject) {\n var xhr = new XMLHttpRequest();\n\n xhr.onload = function() {\n\n ...
javascript
chosen
[ { "from": "system", "value": "Add dirty class to text answer to trigger save afterwards\n" }, { "from": "human", "value": "$(document).ready(function() {\n $(document).on('click', '.accept-btn', function(e) {\n e.preventDefault();\n answer = $(this).closest('.delegate-text-answer').find('...
javascript
chosen
[ { "from": "system", "value": "Remove unneeded instance of ajax:after event\n" }, { "from": "human", "value": "Taskar.Sections.Feedback = function(element){\n var appear = Taskar.UI.WindowForm(\"feedback_form\");\n\n $(\"feedback_form\").observe('ajax:after', function(e) {\n this.fade();\n ...
javascript
chosen
[ { "from": "system", "value": "FIX Delete require of non-existing file\n" }, { "from": "human", "value": "var http = require('http');\nvar util = require('./util');\nvar file = require('.file_system.file');\nvar counter=0;\n\nhttp.createServer(function (req, res) {\n var answer = util.helloWo...
javascript
chosen
[ { "from": "system", "value": "Fix reading of admin status for users\n" }, { "from": "human", "value": "import { usingConnect, sql } from './pg-helpers'\nimport Promise from 'bluebird';\nimport crypto from 'crypto';\nimport scmp from 'scmp'\n\nconst pbkdf2 = Promise.promisify(crypto.pbkdf2, crypt...
javascript
chosen
[ { "from": "system", "value": "Use html from polymer-element.js instead\n" }, { "from": "human", "value": "// Shared styles of highcharts-chart for polymer 3.0\nimport { html } from '@polymer/lit-element';\n\nexport const SharedStyles = html`\n<style>\n :host {width: 100%;display: inline-block...
javascript
chosen
[ { "from": "system", "value": "Add backbone.hal to js module config.\n" }, { "from": "human", "value": "requirejs.config({\n baseUrl: '/static',\n\n paths: {\n antibodies: 'modules/antibodies',\n app: 'modules/app',\n assert: 'modules/assert',\n base: 'modules/ba...
javascript
chosen
[ { "from": "system", "value": "Rename property for upgrade of read-pkg-up\n" }, { "from": "human", "value": "import { version as nodeVersion } from 'process'\n\nimport readPkgUp from 'read-pkg-up'\n\n// Caches it.\n// TODO: use async instead\nconst {\n pkg: { version: autoserverVersion },\n} = r...
javascript
chosen
[ { "from": "system", "value": "Use js `equal value and equal type` when comparing meetingId\n" }, { "from": "human", "value": "// @flow\n\nimport { Meeting } from '../actions/ActionTypes';\nimport { createSelector } from 'reselect';\nimport createEntityReducer from 'app/utils/createEntityReducer'...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary locationId field from Locations table\n" }, { "from": "human", "value": "// locations.js\n// caches location information from foursquare \n\n// TO-DO: Foursquare ToS says data can be stored for 30 days before it must be updated. \n// Any data that...
javascript
chosen
[ { "from": "system", "value": "Hide next section buttons if there is only one section\n" }, { "from": "human", "value": "ckan.module('orgportals_goto_next_section', function ($, _) {\n 'use strict';\n\n return {\n initialize: function() {\n var nextSectionBtn = this.el;\n\n nextSec...
javascript
chosen
[ { "from": "system", "value": "Add guard clause to beginning of update method\n" }, { "from": "human", "value": "myApp.service('breadCrumbService', function($location) {\n\n this.crumbs = [\n ];\n\n this.current = {\n path: './',\n display:'Inventories'\n };\n\n this....
javascript
chosen
[ { "from": "system", "value": "Add 'app' to name of main view in search module\n" }, { "from": "human", "value": "import * as Backbone from 'backbone';\nimport SearchView from '../search/views/search-view';\nimport Messages from './messenger';\n\nclass AppRouter extends Backbone.Router {\n\n get...
javascript
chosen
[ { "from": "system", "value": "Fix saving of HTML translation messages\n\nThe messages were not saved after pressing the button. We now update\nthe textarea manually after each tinymce change event.\n" }, { "from": "human", "value": "$(document).ready(function() {\n function initTinyMceTextare...
javascript
chosen
[ { "from": "system", "value": "RESCOI-876: Check for characters in file path\n" }, { "from": "human", "value": "/*\n The Conflict of Interest (COI) module of Kuali Research\n Copyright © 2005-2016 Kuali, Inc.\n\n This program is free software: you can redistribute it and/or modify\n i...
javascript
chosen
[ { "from": "system", "value": "Use weight terminology instead of karma\n\nSigned-off-by: Paul de Wouters <a027184a55211cd23e3f3094f1fdc728df5e0500@hmn.md>\n" }, { "from": "human", "value": "(function ( $ ) {\n\t\"use strict\";\n\n\t$(function () {\n\n\t\t// catch the upvote/downvote action\n\t\t$...
javascript
chosen
[ { "from": "system", "value": "Disable troublesome imports for now\n" }, { "from": "human", "value": "import { Controller } from 'stimulus'\nimport '@ap-spectrum-web-components/slider'\nimport '@spectrum-web-components/theme/lib/theme-lightest'\nimport '@spectrum-web-components/theme/lib/scale-la...
javascript
chosen
[ { "from": "system", "value": "Make page scroll to top when switching between articles\n" }, { "from": "human", "value": "Kpcc.ArticleView = Ember.View.extend({\n didInsertElement: function() {\n $('body').scrollTop(0).addClass('article');\n }\n});\n" }, { "from": "gpt", ...
javascript
chosen
[ { "from": "system", "value": "Support hash params for origin and app guid\n" }, { "from": "human", "value": "var Client = require('client'),\n Utils = require('utils'),\n ZAFClient = {};\n\n/// ### ZAFClient API\n///\n/// When you include the ZAF SDK on your website, you get access ...
javascript
chosen
[ { "from": "system", "value": "Fix for STORE-1330: Remove direct binding of `click` API to `on`\n" }, { "from": "human", "value": "$(function () {\n $('#btn-add-gadget').click(function () {\n var elem = $(this);\n asset.process(elem.data('type'), elem.data('aid'), location.href, ...
javascript
chosen
[ { "from": "system", "value": "Change serializer so that attachments are passed to and from relational-couch correctly\n" }, { "from": "human", "value": "import DS from 'ember-data';\n\nexport default DS.RESTSerializer.extend({\n _shouldSerializeHasMany: function() {\n return true;\n },\n\n ...
javascript
chosen
[ { "from": "system", "value": "Implement require.resolve(), log and return module name given\n\nhttps://github.com/deathcap/webnpm/issues/5 Implement require.resolve\n" }, { "from": "human", "value": "(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&requi...
javascript
chosen
[ { "from": "system", "value": "Remove extra hour in upcoming review formatter\n" }, { "from": "human", "value": "/* eslint-disable no-return-assign */\nimport { format, addHours, addDays } from 'date-fns';\n\nconst formatUpcomingReviews = (data = []) => {\n let extraDays = 0;\n const getFutureD...
javascript
chosen
[ { "from": "system", "value": "Use fixed-width font to display urls\n" }, { "from": "human", "value": "import React from 'react';\nimport './SearchUrl.css';\n\nfunction SearchUrl(props) {\n const searchUrl = decodeURI(props.searchUrl.substring(59));\n return (\n <div className=\"SearchUrl\">...
javascript
chosen
[ { "from": "system", "value": "Add bundle name in dev mode\n" }, { "from": "human", "value": "const merge = require('webpack-merge')\nconst webpack = require('webpack')\nconst WebpackAssetsManifest = require('webpack-assets-manifest')\n\nconst WEBPACK_DEV_SERVER = 'http://localhost:8080'\n\nmodul...
javascript
chosen
[ { "from": "system", "value": "Add back support for safari10\n" }, { "from": "human", "value": "const os = require('os');\nconst TerserPlugin = require('terser-webpack-plugin');\n\n/**\n * parallel doesn't work yet for WSL (GNU/Linux on Windows)\n * cf https://github.com/webpack-contrib/terser-we...
javascript
chosen
[ { "from": "system", "value": "ADD CONSOLE LOG / BROWSER SYNC\n" }, { "from": "human", "value": "'use strict';\n\nimport config from '../config';\nimport gulp from 'gulp';\nimport browserSync from 'browser-sync';\n\nvar reload_delay = 1000;\n\ngulp.task('server', function() {\n conso...
javascript
chosen
[ { "from": "system", "value": "Add copyId to card schema\n" }, { "from": "human", "value": "const mongoose = require('mongoose');\nconst Schema = mongoose.Schema;\n\nconst CardSchema = new Schema({\n\n name: {\n type: String,\n unique: true,\n require: true,\n },\n\n idName: {\n ty...
javascript
chosen
[ { "from": "system", "value": "Add ens settings to the contract objects\n" }, { "from": "human", "value": "var provision = function(abstraction, options) {\n var self = this; // eslint-disable-line no-unused-vars\n\n if (options.provider) {\n abstraction.setProvider(options.provider);\n }\n...
javascript
chosen
[ { "from": "system", "value": "Remove varNameRegExp since it's never used;" }, { "from": "human", "value": "/*\n * Copyright 2011 eBay Software Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License....
javascript
chosen
[ { "from": "system", "value": "Stop retrieving contact with offset > 2000\n" }, { "from": "human", "value": "'use strict';\n\nfunction retrieveContact(conn, date, limit, offset, cb) {\n conn.sobject(\"Contact\")\n .select('Id, IsDeleted, FirstName, LastName, Name, Phone, Fax, MobilePhone, Mai...
javascript
chosen
[ { "from": "system", "value": "Add failure message when MPD path is not found\n" }, { "from": "human", "value": "var Q = require('Q'),\n childProcess = require('child_process');\n\nfunction processPath(exec) {\n var exec = exec || Q.denodeify(childProcess.exec);\n var deferred = Q.defer();\...
javascript
chosen
[ { "from": "system", "value": "Build tests before initializing BrowserSync\n" }, { "from": "human", "value": "module.exports = function(gulp, settings) {\n // Create the browserSync server.\n settings.dynamic.browserSync = require('browser-sync').create();\n\n /**\n * Initialize the ...
javascript
chosen
[ { "from": "system", "value": "Revert \"Add additional filter to sustaining pledges for is-payment\"\n\nThis reverts commit db48115a39601ab912390634aa711822a3bd6798.\n" }, { "from": "human", "value": "import Component from '@ember/component';\nimport layout from '../../../templates/components/nyp...
javascript
chosen
[ { "from": "system", "value": "Add a new row when the last visible row is deleted\n\nsince the table should always have at least one row available at\nany given time\n" }, { "from": "human", "value": "ManageIQ.angular.app.component('genericObjectTableComponent', {\n bindings: {\n keys: '=',\n...
javascript
chosen
[ { "from": "system", "value": "Allow 0.x.y versions of react-runtime.\n" }, { "from": "human", "value": "Package.describe({\n summary: \"A flux implementation, packaged for meteor\",\n version: \"0.17.3\",\n git: \"https://github.com/froatsnook/meteor-alt.git\",\n name: \"froatsnook:a...
javascript
chosen
[ { "from": "system", "value": "Fix urlparam for node id\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n queryParams: ['viewType', 'nodeId'],\n query: Ember.inject.service(),\n viewType: 'live',\n\n modelArrived: Ember.observer('model...
javascript
chosen
[ { "from": "system", "value": "Add support for ssh-keygen on windows\n" }, { "from": "human", "value": "var log = require('npmlog')\n , gcr = require('./gcr')\n , exec = require('child_process').exec\n , utils = exports\n\nutils.genSSHKey = function(cb) {\n var cmd = 'ssh-keygen -t rsa -f ~/....
javascript
chosen
[ { "from": "system", "value": "Remove 'rounds' from Contest model\n" }, { "from": "human", "value": "import DS from 'ember-data';\n\nexport default DS.Model.extend({\n name: DS.attr('string'),\n status: DS.attr('contest-status'),\n goal: DS.attr('contest-goal'),\n qual_score: DS.attr('number'...
javascript
chosen
[ { "from": "system", "value": "Remove unused flow suppression comment\n" }, { "from": "human", "value": "// @flow\n/* global fetch */\n\nimport merge from 'lodash/merge'\n\ntype ResponseBody = Object | null | string\n\nconst fetchJSON = (url: string | Request | URL, options: Object = {}) => {\n ...
javascript
chosen
[ { "from": "system", "value": "Rename route function to getActions, now also pass the decodedPath\n" }, { "from": "human", "value": "/* global Promise */\n\nexport default (routesFetchersMap, path, query, options, store) => {\n const { ignoredPathsRegex, log } = options\n const decodedPath = de...
javascript
chosen
[ { "from": "system", "value": "Use index so testj will error if pathway is incorrect.\n" }, { "from": "human", "value": "/*global js_beautify: true */\n/*jshint node:true */\n\nvar SanityTest = require('./sanitytest'),\n Urlencoded = require('../lib/unpackers/urlencode_unpacker'),\n js_beau...
javascript
chosen
[ { "from": "system", "value": "Handle the tap-assert action in the reducer\n" }, { "from": "human", "value": "const initialState = {}\n\nexport default (state = initialState, action) => {\n return state\n}\n" }, { "from": "gpt", "value": "import { TAP_ASSERT_DONE } from '../actions'\...
javascript
chosen
[ { "from": "system", "value": "test: Add storybook for Label that references a form field\n" }, { "from": "human", "value": "import React from \"react\";\nimport { withInfo } from \"@storybook/addon-info\";\nimport { storiesOf } from \"@storybook/react\";\n\nimport getKnobs from \"./getKnobs\";\n...
javascript
chosen
[ { "from": "system", "value": "Move terminal status bar to the bottom\n\nIt's better this way.\n" }, { "from": "human", "value": "\nimport {terminal as term} from \"terminal-kit\";\n\nexport default function terminalRender(store) {\n // term.fullscreen();\n term.alternateScreenBuffer();\n\n st...
javascript
chosen
[ { "from": "system", "value": "Store deactivation callback on button-data\n" }, { "from": "human", "value": "/*\n * Author: CM\n */\n(function($) {\n\t$.event.special.clickConfirmed = {\n\t\tbindType: \"click\",\n\t\tdelegateType: \"click\",\n\n\t\tsettings: {\n\t\t\tmessage: 'Please Confirm'\n\t...
javascript
chosen
[ { "from": "system", "value": "Remove externs that aren't used internally.\n" }, { "from": "human", "value": "/**\n * @externs\n * @fileoverview Symbols needed to compile webcomponents\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be ...
javascript
chosen
[ { "from": "system", "value": "Update tests: replace fs with util\n" }, { "from": "human", "value": "var utilPath = require('../../../lib/file/path');\nvar getRealPkgSrc = require('../../../lib/file/get-real-pkg-src');\nvar expect = require('expect');\n\nvar fs = require('fs');\n\ndescribe('Get r...
javascript
chosen
[ { "from": "system", "value": "Fix feature flag infra code for node\n" }, { "from": "human", "value": "import require, { has } from 'require';\n\n/**\n ⚠️ This file exists ONLY for DEV ergonomics to ensure\n JS import autocompletion works and flags can be toggled.\n\n In production, The actual...
javascript
chosen
[ { "from": "system", "value": "Print full pretty GraphQL errors\n" }, { "from": "human", "value": "// @flow\n\nimport { red } from 'chalk';\nimport R from 'ramda';\n\ntype Clog = typeof console.log;\ntype GraphQLError = { message: string };\n\n// FIXME: Improve naming\nexport function exitError(c...
javascript
chosen
[ { "from": "system", "value": "Allow Sqlite driver to call out to sqlite\n" }, { "from": "human", "value": "async function sqlite_sql(args) {\n/*\ndescription(\"`sqlite db driver\")\nbase_component_id(\"sqlite_server\")\nload_once_from_file(true)\nonly_run_on_server(true)\n*/\n let tables = [{...
javascript
chosen
[ { "from": "system", "value": "Correct the expected number of tests\n" }, { "from": "human", "value": "const test = require('tape')\nconst BorrowState = require('borrow-state')\n\nconst sleep50ms = (something) => new Promise(function (resolve, reject) {\n setTimeout(function () {\n resolve(so...
javascript
chosen
[ { "from": "system", "value": "Edit user initial commit for userService\n" }, { "from": "human", "value": "angular.module('services')\n .service('userService',['$q','config','storageService','$http',userService]);\n\n\n\nfunction userService($q,config,storageService,$http) {\n\n var servic...
javascript
chosen
[ { "from": "system", "value": "TfEzFC4W: Implement cross domain Google Analytics tracking for Verify\n\nUse jQuery rather than native DOM to get SAML response form, to stay\nconsistent with rest of frontend.\n" }, { "from": "human", "value": "(function(global) {\n 'use strict';\n var GOVUK = gl...
javascript
chosen
[ { "from": "system", "value": "Fix head id in treebank retriever\n\nThey also need to prefixed with leading zeros to be compliant with our\ninternal ids.\n" }, { "from": "human", "value": "\"use strict\";\n\nangular.module('arethusa').service('treebankRetriever', function($http) {\n // tokens sh...
javascript
chosen
[ { "from": "system", "value": "Create two minions initially, to save some cores in trial package\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar azure = require('./lib/azure_wrapper.js');\nvar kube = require('./lib/deployment_logic/kubernetes.js');\n\nazure.create_config('kubernetes...
javascript
chosen
[ { "from": "system", "value": "Enable toolbar buttons only within certain tags\n" }, { "from": "human", "value": "define('scribe-plugin-image-inserter', [\n 'eventsWithPromises',\n 'rangy-core',\n 'rangy-selectionsaverestore',\n 'filter-event'\n],\nfunction (eventsWithPromises, rangy, rangySe...
javascript
chosen
[ { "from": "system", "value": "Add out-of-box support for QA, Dev, and Review sites.\n" }, { "from": "human", "value": "'use strict';\n\nvar _ = require('lodash');\n\nvar prompts = [\n {\n type: 'input',\n name: 'projectName',\n message: 'Machine-name of your project?',\n // Name of ...
javascript
chosen
[ { "from": "system", "value": "Fix js error on touite input when not authenticated\n" }, { "from": "human", "value": "jQuery(document).ready(function($) {\n function update_chars_left() {\n var max_len = 140;\n var textarea = $('#new_tweet')[0];\n var tweet_len = textarea....
javascript
chosen
[ { "from": "system", "value": "Insert dynamic data of the actual month\n" }, { "from": "human", "value": "function randomValue () {\n const value = [];\n const lengthOfTheArray = 30*24*12;\n for (var i=0; i <= lengthOfTheArray ; i++) {\n value.push((Math.random() * 10).toFixed(1))...
javascript
chosen
[ { "from": "system", "value": "Change StackOverflow url so that it is URI encoded\n" }, { "from": "human", "value": "\"use strict\";\n\n/**\n * This class will hold API keys etc. when it gets smarter\n */\nclass StackOverflowSearcher {\n getUrlForRelevantAnswer(errorMessage) {\n return `http:...
javascript
chosen
[ { "from": "system", "value": "Fix grammar in <Glitch /> component\n" }, { "from": "human", "value": "import React from 'react';\n\nconst Glitch = () => (\n <div>\n <p><strong>Uh oh, there was a problem.</strong></p>\n <p>There might be something not-quite-right with the content\n you'r...
javascript
chosen
[ { "from": "system", "value": "Send a request when clicking the save button.\n" }, { "from": "human", "value": "(function($) {\n $('.call-to-action .btn').click(function() {\n $('#geotagging-map').slideToggle('slow');\n });\n\n $('.save-coordinates .btn').click(function() {\n if(map.getS...
javascript
chosen
[ { "from": "system", "value": "Set alquimia \"a\" directive to be executed only on localhost\n" }, { "from": "human", "value": "/**\n * @ngdoc overview\n * @name alquimia\n * @author Mauro Constantinescu <mauro.constantinescu@gmail.com>\n * @copyright © 2015 White, Red & Green Digital...
javascript
chosen
[ { "from": "system", "value": "Hide iOS toolbar when on PhotoGrid\n" }, { "from": "human", "value": "// @flow\n\nimport React from 'react';\nimport {\n StyleSheet,\n Platform,\n View,\n Button,\n} from 'react-native';\n\nimport Icon from 'react-native-vector-icons/MaterialIcons';\ncon...
javascript
chosen
[ { "from": "system", "value": "Set timeout to infinity for init-widgets tag\n" }, { "from": "human", "value": "var raptorWidgets = require('../');\n\nmodule.exports = function render(input, context) {\n var widgetsContext = raptorWidgets.getWidgetsContext(context);\n\n if (context.featureLa...
javascript
chosen
[ { "from": "system", "value": "Use module system for secret keys\n" }, { "from": "human", "value": "/**\n * Created by gwennael.buchet on 01/01/17.\n */\n\"use strict\";\n\n/**\n * HOW-TO :\n * - rename this file into \"secretKeys.js\"\n * - replace values with your own\n */\n\n//ThingSpeak API k...
javascript
chosen
[ { "from": "system", "value": "Fix a bug where `watch` task was not working.\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar browserify = require('browserify');\nvar vinyl = require('vinyl-source-stream');\nvar tsify = require('tsify');\nvar watchify = require('watchify');\n\n...
javascript
chosen
[ { "from": "system", "value": "Fix $.wrap for null\nThis also fixes $ for when no element is found\n" }, { "from": "human", "value": "const flatten = require('flatten')\nconst Set = require('es6-set')\n\nfunction normalizeRoot(root) {\n\tif(!root) return document\n\tif(typeof(root) == 'string...
javascript
chosen
[ { "from": "system", "value": "Load should convert fields to camel case\n" }, { "from": "human", "value": "import { resolve } from 'path';\nimport { load as grpcLoad } from 'grpc';\n\n// The proto files are copied as part of the build script (see package.json) to a '/protos' \n// folder under the...
javascript
chosen
[ { "from": "system", "value": "Add Ember 1.12 and 1.13 to tests" }, { "from": "human", "value": "/*jshint node:true*/\nmodule.exports = {\n scenarios: [\n {\n name: 'default',\n dependencies: { }\n },\n {\n name: 'ember-release',\n dependencies: {\n 'ember': '...
javascript
chosen
[ { "from": "system", "value": "Implement boolean option flags and change TypeDoc path strategy" }, { "from": "human", "value": "module.exports = function (grunt) {\n\t'use strict';\n\n\tgrunt.registerMultiTask('typedoc', 'Generate TypeScript docs', function () {\n\t\tvar options = this.options({}...
javascript
chosen
[ { "from": "system", "value": "Disable reactivity of item sets publications.\n" }, { "from": "human", "value": "Meteor.publish('ItemSets.id', function (id) {\n check(id, String);\n this.unblock();\n return ItemSets.find(new Meteor.Collection.ObjectID(id));\n});\nMeteor.publish('ItemSets.last',...
javascript
chosen
[ { "from": "system", "value": "Fix works only for v0.10.x\n" }, { "from": "human", "value": "var Promise = require('../')\n , Domain = require('domain')\n , assert = require('assert');\n\nvar next = 'function' == typeof setImmediate\n ? setImmediate\n : process.nextTick;\n\ndescribe(\"domains...
javascript
chosen
[ { "from": "system", "value": "Update tests to reflect new files.\n" }, { "from": "human", "value": "'use strict';\n\nvar path = require('path');\nvar assert = require('yeoman-generator').assert;\nvar helpers = require('yeoman-generator').test;\nvar os = require('os');\n\ndescribe('ironhide-webap...
javascript
chosen
[ { "from": "system", "value": "Add link to source to footer of every example\n" }, { "from": "human", "value": "(function () {\n\t'use strict';\n\n\tif (location.hostname === 'todomvc.com') {\n\t\tvar _gaq=[['_setAccount','UA-31081062-1'],['_trackPageview']];(function(d,t){var g=d.createElement(t...
javascript
chosen
[ { "from": "system", "value": "Refactor to more functional style\n" }, { "from": "human", "value": "import createDebug from 'debug';\n\nimport { onLoad } from './util';\n\nconst debug = createDebug('ms:api');\nconst partitionArray = (array, size) => array.map((e, i) => (i % size === 0) ?\n array...
javascript
chosen
[ { "from": "system", "value": "Add karma-jasmine to the plugins\n" }, { "from": "human", "value": "const gulp = require('gulp');\nconst tsc = require('gulp-typescript');\nconst Server = require('karma').Server;\nconst tsProject = tsc.createProject('src/tsconfig.json');\nconst tsProjectSpec = tsc....
javascript
chosen
[ { "from": "system", "value": "Remove GitHub from the help scripts\n" }, { "from": "human", "value": "// PiscoBot Script\n\nvar commandDescription = {\n name: 'GitHub Mention',\n author: 'Daniel Gallegos [@that_taco_guy]',\n trigger: '[none]',\n version: 1.0,\n description: 'Have the bot rep...
javascript
chosen
[ { "from": "system", "value": "Allow custom mapping function when reading graph.\n" }, { "from": "human", "value": "const fs = require('fs')\nconst file = require('file')\nconst path = require('path')\nconst toml = require('toml')\n\nconst parsers = {\n '.toml': toml.parse,\n '.json': JSON....
javascript
chosen
[ { "from": "system", "value": "Simplify message emitting and incorporate RxJS\n" }, { "from": "human", "value": "const twitchIO = require('socket.io');\nconst twitchClient = require('./tmiClient');\n// const Rx = require('rx');\nconst eventEmitter = require('./eventEmitter');\nconst messageContro...
javascript
chosen
[ { "from": "system", "value": "Update configurator mock in deselector spec\n" }, { "from": "human", "value": "\"use strict\";\n\ndescribe(\"deselector\", function() {\n var element;\n var state;\n var configurator = { provideResource: function() {} };\n\n beforeEach(module(\"arethusa.core\", ...
javascript
chosen
[ { "from": "system", "value": "Use JSON3 with no conflict" }, { "from": "human", "value": "'use strict';\n\nangular.module('polestar')\n .directive('jsonInput', function() {\n return {\n restrict: 'A',\n require: 'ngModel',\n scope: {},\n link: function(scope, element, att...
javascript
chosen
[ { "from": "system", "value": "Add more iterator methods to query results.\n" }, { "from": "human", "value": "define([\n\t'../../Promise'\n], function (Promise) {\n\t'use strict';\n\t\n\tvar resolve = Promise.resolve.bind(Promise),\n\t\tarrayProto = Array.prototype,\n\t\tslice = arrayProto.slice,...
javascript
chosen
[ { "from": "system", "value": "Undo change made for debugging\n" }, { "from": "human", "value": "import { remote } from 'electron';\nimport fs from 'fs';\nimport path from 'path';\n\nwindow.addEventListener('load', () => {\n if (window.$ && Settings.get('welcomed') === remote.app.getVersion() &&...
javascript
chosen