conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Update du nombre de legendaries max\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ItemLink from 'common/ItemLink';\nimport ITEM_QUALITIES from 'common/ITEM_QUALITIES';\nimport SPELLS from 'common/SPELLS';\n\nimport Analyzer from 'Parser/Core/... | javascript | chosen |
[
{
"from": "system",
"value": "Add helper functions for checking pull state\n\nThey use the Pull.status object and provide a clearer way to write\nchecks of pull states. Also added function to assemble GitHub URL for a\npull.\n"
},
{
"from": "human",
"value": "define(['underscore'], function(_) {... | javascript | chosen |
[
{
"from": "system",
"value": "Allow Number isUncertain and isExact to be already defined.\n"
},
{
"from": "human",
"value": "'use strict';\n\nfunction UncertainNumber(value, uncertainty) {\n this.value = value;\n this.uncertainty = uncertainty;\n}\n\nUncertainNumber.prototype.isExact = fun... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Remove new action plan button\"\n\nThis reverts commit 76dd907effe40f7c1d4bb323b14a06eba8beb78b.\n"
},
{
"from": "human",
"value": "import ActionPlansFilters from './action_plans_filters.component';\n\nexport default function () {\n return (\n <aside c... | javascript | chosen |
[
{
"from": "system",
"value": "Enable turning on SSL for apiHost with ?apiSSL=yes\n"
},
{
"from": "human",
"value": "/*jslint browser: true ,undef: true *//*global Ext*/\nExt.define('Slate.API', {\n extend: 'Emergence.util.AbstractAPI',\n singleton: true,\n\n // example function\n get... | javascript | chosen |
[
{
"from": "system",
"value": "Update with reference to global nav partial\n"
},
{
"from": "human",
"value": "var _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar cssstats = require('cssstats')\n\nvar module = require('tachyon... | javascript | chosen |
[
{
"from": "system",
"value": "Resolve problem with conference search by month\n"
},
{
"from": "human",
"value": "/**\n * Created by artemvlasov on 07/05/15.\n */\nvar app = angular.module('conference.filters', []);\n\napp.filter('matchDate', function($filter) {\n return function(confs, month)... | javascript | chosen |
[
{
"from": "system",
"value": "Use long hashes in Github and Bitbucket URLs\n\nThis way when you open the link in browser and then save it somewhere\nfor the future, it won't become outdated when the amount of commits in\nrepository increases to the level where the short hash that previously\nwas unique isn'... | javascript | chosen |
[
{
"from": "system",
"value": "Sort reduction reasons data services by reason short name\n"
},
{
"from": "human",
"value": "const knex = require('../../../knex').web\n\nmodule.exports = function () {\n return knex('reduction_reason')\n .join('reduction_category', 'reduction_reason.category_id... | javascript | chosen |
[
{
"from": "system",
"value": "Fix focus style for links.\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport Link from 'next/link'\nimport {A} from './styled'\nimport {css} from 'react-emotion'\n\nconst common = `\n position: relative;\n outline: none;\n color: inherit;\n te... | javascript | chosen |
[
{
"from": "system",
"value": "Move source mapping after async support.\n"
},
{
"from": "human",
"value": "Error.stackTraceLimit = 100\n\ntry { require('source-map-support-2/register') } catch (_) {}\n\n// Async stacks.\ntry { require('trace') } catch (_) {}\n\n// Removes node_modules and interna... | javascript | chosen |
[
{
"from": "system",
"value": "Make redirect test independent of db\n"
},
{
"from": "human",
"value": "import { test } from 'qunit';\n\nimport moduleForAcceptance from 'ember-api-docs/tests/helpers/module-for-acceptance';\n\nmoduleForAcceptance('Acceptance | redirects');\n\ntest('visiting /', fun... | javascript | chosen |
[
{
"from": "system",
"value": "Transform old notification payload shape into new shape\n\nWill eventually have to refactor, but this makes it backwards\ncompatible for now\n"
},
{
"from": "human",
"value": "<<<<<<< HEAD\nexport const publishNotification = notification => ({\n type: 'PUBLISH_NOTI... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug allowing login with any password for a valid username\n"
},
{
"from": "human",
"value": "var User = require('../models/userModel');\n\nvar jwt = require('jsonwebtoken');\nvar _ = require('lodash');\n\nvar createToken = function(user) {\n return jwt.sign(_.o... | javascript | chosen |
[
{
"from": "system",
"value": "Comment out reference to favicon for now.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst path = require('path');\nconst serveStatic = require('feathers').static;\nconst favicon = require('serve-favicon');\nconst compress = require('compression');\nconst c... | javascript | chosen |
[
{
"from": "system",
"value": "Remove (hopefully) extraneous wrapper div\n"
},
{
"from": "human",
"value": "import React, { PropTypes} from 'react'\nimport classes from './ArtistItem.css'\n\nexport const ArtistItem = (props) => (\n <div>\n <div onClick={props.onArtistSelect} className={classe... | javascript | chosen |
[
{
"from": "system",
"value": "Use global.datadir to obtain package files\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst path = require('path');\nconst fs = require('fs');\n\nconst jsontolua = require('../jsontolua');\nconst registry = require('../registry');\n\nmodule.exports = functi... | javascript | chosen |
[
{
"from": "system",
"value": "Update YUI version to 3.9.0pr3\n"
},
{
"from": "human",
"value": "var isProduction = process.env.NODE_ENV === 'production';\n\nmodule.exports = Object.freeze({\n version: '3.8.1',\n\n config: JSON.stringify({\n combine: isProduction,\n filter : i... | javascript | chosen |
[
{
"from": "system",
"value": "Use bloxparty-server.kvnneff.me as default server.\n"
},
{
"from": "human",
"value": "import bus from 'bus'\nimport Store from 'localstorage-ns'\n\nexport default function plugin (app) {\n const localStorage = Store('settings', {\n serverURI: '',\n nick: ''\n... | javascript | chosen |
[
{
"from": "system",
"value": "Rename \"address\" to more precise \"host\"\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar express = require('express');\nvar webpack = require('webpack');\nvar config = require('./webpack.config.cli.dev');\n\nvar app = express();\nvar compiler ... | javascript | chosen |
[
{
"from": "system",
"value": "Increase migration conversion speed by a factor of 3x\n"
},
{
"from": "human",
"value": "/* eslint-env browser */\n\nconst EventEmitter = require('events');\n\n\nconst POLL_INTERVAL_MS = 15 * 1000;\nconst IDLE_THRESHOLD_MS = 20;\n\nclass IdleDetector extends EventEm... | javascript | chosen |
[
{
"from": "system",
"value": "Send message, even if it was a delete\n"
},
{
"from": "human",
"value": "/**\n * Copyright 2014 Nicholas Humfrey\n * Copyright 2013 IBM Corp.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance... | javascript | chosen |
[
{
"from": "system",
"value": "Add state to NewOptionForm; add Col util function\n"
},
{
"from": "human",
"value": "import m from 'mithril';\n\nexport class NewOptionForm {\n view() {\n return m('form', [\n m('div.row.p-3', [\n m('div.col', [\n m('input.form-control', { t... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary escape call that is automated w/ react\n"
},
{
"from": "human",
"value": "var Avatar = React.createClass({\n _getAvatar: function(username) {\n return 'https://avatars.githubusercontent.com/' + escapeHTML(username.toLowerCase());\n },... | javascript | chosen |
[
{
"from": "system",
"value": "Create variable with all js files\n"
},
{
"from": "human",
"value": "module.exports = function (grunt) {\n\n 'use strict';\n\n grunt.initConfig({\n jshint: {\n files: [\n 'Gruntfile.js',\n 'generators/**/*.js'\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove extra quoting of Atom path\n"
},
{
"from": "human",
"value": "/** @babel */\n\nimport fs from 'fs-plus'\nimport Opener from '../opener'\nimport { isPdfFile } from '../werkzeug'\n\nexport default class SumatraOpener extends Opener {\n async open (filePath, te... | javascript | chosen |
[
{
"from": "system",
"value": "Use async/await on createAuthenticator tests and add proper assertion\n"
},
{
"from": "human",
"value": "/* eslint-disable no-unused-expressions */\nimport { createAuthenticator } from '../src'\n\ndescribe('createAuthenticator', () => {\n describe('config', () => {... | javascript | chosen |
[
{
"from": "system",
"value": "Kill this use strict for now\n\nShould explicitly assign to global at some point I guess.\n"
},
{
"from": "human",
"value": "/*global browser:true, protractor:true, httpBackend:true, By:true, expect:true, Promise:true */\n'use strict';\n\nvar CustomWorld = (function... | javascript | chosen |
[
{
"from": "system",
"value": "Include minified file in grunt bump-commit\n"
},
{
"from": "human",
"value": "module.exports = function (grunt) {\n 'use strict';\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jshint: {\n all: [\n './src/paginate-anything.js'... | javascript | chosen |
[
{
"from": "system",
"value": "FIX - added regions to query\n"
},
{
"from": "human",
"value": "import {dimensionLabelTitle} from './labels'\n\nexport default function csvDimensionsBuilder(dimensions) {\n\n const result = dimensions.reduce((allDimensions, dimension) => {\n if (!allDimensions.d... | javascript | chosen |
[
{
"from": "system",
"value": "Use bower components from dist subfolder\n"
},
{
"from": "human",
"value": "module.exports = function Gruntfile(grunt) {\n 'use strict';\n\n require('load-grunt-tasks')(grunt);\n\n grunt.initConfig(\n {\n babel: {\n options: {\n modules: '... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary option from grunt-jscs\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function(grunt) {\n grunt.initConfig({\n jshint: {\n options: {\n jshintrc: true,\n },\n all: [\n 'Gruntfile.js',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use custom config page hosted on gh-pages.\n\nThe config page is hosted on the gh-pages branch of this repo. This allows it to be HTTPS, and much lighter than the predecessor."
},
{
"from": "human",
"value": "var UI = require('ui');\nvar Vibe = require('ui/vibe');\n... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust coverage values to match existing setup\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jshint: {\n allFiles: ['Gruntfile.j... | javascript | chosen |
[
{
"from": "system",
"value": "Allow threshold for IRV elections to be configurable.\n"
},
{
"from": "human",
"value": "import _ from 'lodash';\n\nimport {countFirstPrefs} from './utils';\n\nfunction irv (election) {\n var curBallots, curCandidates, voteCount, firstPrefs, ratios, winner, loser;\... | javascript | chosen |
[
{
"from": "system",
"value": "Use local webpack instead of global\n"
},
{
"from": "human",
"value": "module.exports = {\n build: \"webpack\",\n // networks: {\n // \"live\": {\n // network_id: 1 // Ethereum public network\n // },\n // \"morden\": {\n // network_id: 2 // Of... | javascript | chosen |
[
{
"from": "system",
"value": "Support more special characters in normalization\n\n"
},
{
"from": "human",
"value": "module.exports = function() {\n String.prototype.normalizeResponse = function() {\n return this.toString().trim().toLocaleLowerCase()\n .replace(/à|á|ä|â/g, 'a... | javascript | chosen |
[
{
"from": "system",
"value": "Add Skip Waiting to service worker\n"
},
{
"from": "human",
"value": "/*\nCopyright 2016 Google Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the ... | javascript | chosen |
[
{
"from": "system",
"value": "Rework some routing\n- Move stomach-ache into symptoms sub-directory\n- Only add route for elements guide in non-prod environments\n"
},
{
"from": "human",
"value": "// eslint-disable-next-line new-cap\nconst router = require('express').Router();\nconst indexControl... | javascript | chosen |
[
{
"from": "system",
"value": "Fix ESLint's whims about indentation\n"
},
{
"from": "human",
"value": "// @flow\n\nexport default [`# Getting the first 3 Pipelines of an Organization\n\nquery FirstThreePipelinesQuery {\n organization(slug: $organizationSlug) {\n id\n name\n pipelines(fi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for US-40 : having user's data during assessment creation\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport RSVP from 'rsvp';\n\nexport default Ember.Route.extend({\n\n model(params) {\n const store = this.get('store');\n return store.... | javascript | chosen |
[
{
"from": "system",
"value": "Remove last vestige of Ember-Data\n"
},
{
"from": "human",
"value": "export default {\n name: 'preloadData',\n\n initialize: function (container, application) {\n var head = document.head;\n\n var attributes = [\n {\n target: 'route:g... | javascript | chosen |
[
{
"from": "system",
"value": "Move user input prompt (and input manip) inside activate()\n"
},
{
"from": "human",
"value": "var openBlockList = function (blog) {\n $('document').ready( function () {\n $(\"#blocked_blogs > .accordion_trigger_wrapper > .accordion_trigger\").click... | javascript | chosen |
[
{
"from": "system",
"value": "Add specific page selector for copy value js handler\n"
},
{
"from": "human",
"value": "(function($) {\n 'use strict';\n var COPY_BUTTON_SELECTOR = '#experience-points-disbursement-copy-button';\n\n function copyExperiencePoints(event) {\n event.preventDefault... | javascript | chosen |
[
{
"from": "system",
"value": "Enable FF tracking Protection to speed up websites"
},
{
"from": "human",
"value": "user_pref(\"browser.backspace_action\", 2);\nuser_pref(\"browser.bookmarks.max_backups\", 2);\nuser_pref(\"browser.tabs.insertRelatedAfterCurrent\", false);\nuser_pref(\"browser.urlb... | javascript | chosen |
[
{
"from": "system",
"value": "Use host + port from config"
},
{
"from": "human",
"value": "var Express = require('express');\nvar webpack = require('webpack');\n\nvar config = require('../src/config');\nvar webpackConfig = require('./dev.config');\nvar compiler = webpack(webpackConfig);\n\nvar h... | javascript | chosen |
[
{
"from": "system",
"value": "Replace ReactiveDict with ReactiveVar for simplicity.\n"
},
{
"from": "human",
"value": "Template.index.onCreated( () => {\n let template = Template.instance();\n\n template.state = new ReactiveDict();\n template.state.setDefault({\n contentReady: false,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use less restrictive tag permission on media\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react';\nimport FontAwesome from 'react-fontawesome';\nimport { can } from '../Can';\n\nclass MediaActions extends Component {\n constructor... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug where assets with a balance of less than 1.0 gets hidden\n"
},
{
"from": "human",
"value": "\n/* global angular */\n\nangular.module('app')\n.directive('accountBalance', function (Wallet) {\n\t'use strict';\n\n\tfunction link(scope, iElement, iAttrs) {\n\n\t... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug in graduatability checking\n\nI'm reasonably sure that it would never return true at the right time, checking for > 1\n"
},
{
"from": "human",
"value": "import Promise from 'bluebird'\nimport _ from 'lodash'\nimport Immutable from 'immutable'\nimport {isTrue... | javascript | chosen |
[
{
"from": "system",
"value": "Set Critical CSS before minimization\n\n"
},
{
"from": "human",
"value": "/**\n * Automatic Deploy\n *\n * @description: Deploy Task for an automated Build Process\n */\n\nimport gulp from 'gulp'\nimport runSequence from 'run-sequence'\n\nconst buildTask = (cb) => {... | javascript | chosen |
[
{
"from": "system",
"value": "Make demo work in Node 4\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nif (process.argv.includes(\"browser\") === true) {\n require(\"./browser\");\n} else if (process.argv.includes(\"console\") === true) {\n require(\"./console\");\n} else {\n cons... | javascript | chosen |
[
{
"from": "system",
"value": "Define M+ font subset that contains only those characters necessary for the site.\n"
},
{
"from": "human",
"value": "/**\n * aws - deploys \"earth\" files to AWS S3\n */\n\n\"use strict\";\n\nvar util = require(\"util\");\nvar tool = require(\"./tool\");\nvar aws = ... | javascript | chosen |
[
{
"from": "system",
"value": "Add class name to authenticated component wrapper\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport { routeActions } from 'redux-simple-router';\n\n\nconst requireAuthentication = (Component)... | javascript | chosen |
[
{
"from": "system",
"value": "Hide UnionPay in PayWithCardView list of icons\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar classlist = require('./classlist');\nvar cardTypes = require('../constants').supportedCardTypes;\n\nmodule.exports = function (element, supportedCardTypes) {\n Ob... | javascript | chosen |
[
{
"from": "system",
"value": "Revert parameter name for isExpired() to validSeconds\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst VError = require(\"verror\");\n\nmodule.exports = function (dependencies) {\n const sign = dependencies.sign;\n const decode = dependencies.decode;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for date convert not traversing arrays\n"
},
{
"from": "human",
"value": "/* jshint maxdepth:4 */\n'use strict';\n\nvar _ = require('underscore');\n\nmodule.exports = function convertDateStrings(kontx, next){\n kontx.args = convertDates( kontx.args );\n ne... | javascript | chosen |
[
{
"from": "system",
"value": "Fix ContentBlocks dashboard preview render bug.\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport Box from 'grommet/components/Box';\nimport { BLOCK_TYPE_MAP } from 'grommet-cms/containers/Dashboard/DashboardContentBlocks/constants... | javascript | chosen |
[
{
"from": "system",
"value": "Extend proptype for data to account for immutable\n"
},
{
"from": "human",
"value": "import PropTypes from \"prop-types\";\nimport CustomPropTypes from \"../victory-util/prop-types\";\n\nexport default {\n active: PropTypes.bool,\n className: PropTypes.string,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "[Docs] Allow external links to be opened in Safari\n"
},
{
"from": "human",
"value": "(function (window, document) {\n 'use strict';\n\n // Do not allow pinned site on iOS to open links in a browser.\n if (/iphone|ipod|ipad/i.test(window.navigator.userAgent)) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix event delegation on mouseover events\n"
},
{
"from": "human",
"value": "function recipeSearch(input) {\n $.ajax({\n url: \"/recipes\",\n data: input,\n }).done(function(recipeItemPartial) {\n $(recipeItemPartial).appendTo(\".main-searchbar\");\n });\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove commented out console.log lines\n"
},
{
"from": "human",
"value": "class MCWorkflowGraphComponentController {\n /*@ngInject*/\n constructor(processGraph, cyGraph) {\n this.processGraph = processGraph;\n this.cyGraph = cyGraph;\n thi... | javascript | chosen |
[
{
"from": "system",
"value": "Improve test coverage for creatPaper\n"
},
{
"from": "human",
"value": "describe(\"ResumeTimeline\", function() {\n var plugin_name = \"plugin_resumeTimeline\";\n\n beforeEach(function() {\n loadFixtures('fixture.html');\n });\n\n describe(\"plugin\", functio... | javascript | chosen |
[
{
"from": "system",
"value": "Reset search results on new search\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n\n angular\n .module('app')\n .controller('MenuController', MenuController);\n\n MenuController.$inject = ['$scope', 'UserService', '$rootSc... | javascript | chosen |
[
{
"from": "system",
"value": "Use \"Aptible Legacy Infrastructure\" everywhere\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport ajax from 'diesel/utils/ajax';\nimport config from 'diesel/config/environment';\n\nfunction errorToMessage(e) {\n switch(e.status) {\n case 0:\... | javascript | chosen |
[
{
"from": "system",
"value": "Add Mobile menu button styled inherited from Header-Main wrapper\n\n"
},
{
"from": "human",
"value": "//@flow\n\nimport styled, { css } from \"styled-components\";\n\nexport const Wrapper = styled.div`\n\n ${({ theme }: { theme: Theme }) => css`\n\n box-sizing: ... | javascript | chosen |
[
{
"from": "system",
"value": "Change global name to `emgrate`\n"
},
{
"from": "human",
"value": "var makeModules = require('broccoli-dist-es6-module');\n\nmodule.exports = makeModules('lib', {\n global: 'emq',\n packageName: 'ember-testing-grate',\n main: 'main',\n shim: {\n 'ember': 'Emb... | javascript | chosen |
[
{
"from": "system",
"value": "Fix browser-sniffing-induced bug with tab in editor.\n"
},
{
"from": "human",
"value": "$.fn.extend({\n insertAtCaret: function(myValue){\n var obj;\n if( typeof this[0].name !='undefined' ) obj = this[0];\n else obj = this;\n\n if ($.browser.msie) {\n obj.f... | javascript | chosen |
[
{
"from": "system",
"value": "Allow for generators in ipc handlers\n"
},
{
"from": "human",
"value": "const { ipcMain } = require('electron');\n\nclass IPCHandler {\n handle(event, funct, binding = this) {\n const localFunc = funct.bind(binding);\n ipcMain.on(event, (ev, ...args... | javascript | chosen |
[
{
"from": "system",
"value": "Copy the node options too.\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst common = require('./webpack.common')\n\nconst webpack = require('webpack')\nconst webpackTargetElectronRenderer = require('webpack-target-electron-renderer')\nconst ExtractTextPlugin... | javascript | chosen |
[
{
"from": "system",
"value": "Deploy all contracts if test"
},
{
"from": "human",
"value": "var Conference = artifacts.require(\"./Conference.sol\");\nvar InvitationRepository = artifacts.require(\"./InvitationRepository.sol\");\nvar coolingPeriod = 1 * 60 * 60 * 24 * 7;\nvar invitationAddress =... | javascript | chosen |
[
{
"from": "system",
"value": "Change to new event handling code"
},
{
"from": "human",
"value": "const express = require('express')\nconst cors = require('cors')\n\nmodule.exports = function(config){\n const router = new express.Router();\n config.cors = {\n router: router,\n whitelist: ... | javascript | chosen |
[
{
"from": "system",
"value": "Include registeredPlayerIds and confirmedPlayerIds fields when creating a new section object.\n"
},
{
"from": "human",
"value": "angular.module('chessRank')\n .controller('sectionEditDetailsCtrl', function (_, $scope, $state, tournament, section, lookups,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Sort feed content to latest first\n"
},
{
"from": "human",
"value": "Session.setDefault(\"counter\", 0);\n\nTemplate.hello.helpers({\n counter: function () {\n return Session.get(\"counter\");\n },\n msg: function() {\n console.log(this.msg);\n return th... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor xhrToast slightly to remove mutability\n"
},
{
"from": "human",
"value": "import {showErrorToast, showSuccessToast} from \"./Toast\";\nimport messages from \"../messages\";\n\nconst defaultStatusMap = {\n 400: messages.status.bad_request,\n 401: messages.... | javascript | chosen |
[
{
"from": "system",
"value": "Check selectedIndex >= 0 before accessing options collection for select elements\n"
},
{
"from": "human",
"value": "/**\n * Input controls based on select boxes\n *\n * @implements v2.FieldElement\n * @depends input_element.js\n */\nv2.SelectElement = v2.InputElemen... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for movie model\n"
},
{
"from": "human",
"value": "import {\n moduleForModel,\n test\n} from 'ember-qunit';\n\nmoduleForModel('movie', {\n // Specify the other units that are required for this test.\n needs: []\n});\n\ntest('it exists', function(assert)... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in dependency name\n"
},
{
"from": "human",
"value": "var webpack = require('webpack');\nconst path = require('path');\n\nmodule.exports = {\n entry: './js/index.js',\n output: {\n filename: 'index.js',\n path: path.resolve(__dirname, 'b... | javascript | chosen |
[
{
"from": "system",
"value": "Make app runnable as a module\n"
},
{
"from": "human",
"value": "/*\n Entry point of this app, sets us up and running from config and env variables\n*/\n\nconst config = require('./config.js');\n\nif (!config.SLACK_CLIENT_ID || !config.SLACK_SECRET) {\n console.... | javascript | chosen |
[
{
"from": "system",
"value": "Connect CLI tool to Analyzer\n"
},
{
"from": "human",
"value": "module.exports = function analyze() {\n console.log('analyzing...');\n};\n"
},
{
"from": "gpt",
"value": "'use strict';\n\nconst path = require('path');\nconst Analyzer = require('hekla-cor... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for reports not showing up for not logged in users\n"
},
{
"from": "human",
"value": "\n\nAuthRouteController = RouteController.extend({\n\tonBeforeAction: function() {\n\t if(_.isNull(Meteor.user())) {\n\t Router.go(Router.path('ConceptIndex'));\n\t ... | javascript | chosen |
[
{
"from": "system",
"value": "Use ImageDiff Component of react-article-components\n"
},
{
"from": "human",
"value": "'use strict';\nimport { Entity } from 'draft-js';\nimport _ from 'lodash';\nimport classNames from 'classnames';\nimport ImagesDiff from '../../../../../admin/client/components/Im... | javascript | chosen |
[
{
"from": "system",
"value": "Add a method for adding custom CSS class\n\nAllow us to append a class for the body when it's the night"
},
{
"from": "human",
"value": "(function (g, ns) {\n\t\"use strict\";\n\n\tfunction gn() {\n\t\tvar Goodnight = { AM: 6, PM: 18 }, hours = new Date().getHours()... | javascript | chosen |
[
{
"from": "system",
"value": "Add push function to binary search tree program\n"
},
{
"from": "human",
"value": "// Program that creates a binary search tree: each node has up to two children, and all left descendants of a node is less than or equal to the node and all right descendants are grea... | javascript | chosen |
[
{
"from": "system",
"value": "Send back data to callback\n"
},
{
"from": "human",
"value": "var autotrace = require('autotrace');\nvar gm = require('gm').subClass({imageMagick: true});\nvar fs = require('fs');\n\nmodule.exports.composeImage = function (drawing, photo, callback) {\n var width = ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix possible exception by using empty object for options\n"
},
{
"from": "human",
"value": "/**\n * @providesModule MusicControl\n * @flow\n */\n'use strict';\n\nimport { NativeModules, DeviceEventEmitter } from 'react-native';\nconst NativeMusicControl = NativeModu... | javascript | chosen |
[
{
"from": "system",
"value": "Put script before first label\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar assign = require('es5-ext/object/assign')\n , mixin = require('es5-ext/object/mixin')\n , d = require('d')\n , autoBind = require('d/auto-bind')\... | javascript | chosen |
[
{
"from": "system",
"value": "Check the response body from google geocode api\n"
},
{
"from": "human",
"value": "const _ = require('lodash');\nconst GoogleMapsAPI = require('googlemaps');\nconst gmAPI = new GoogleMapsAPI();\n\nmodule.exports = function(latitude, longitude, language = 'zh-TW') {\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the unnecessary use of lodash\n\n\n\nFormer-commit-id: ce3aefbef958e30a55232235c2721743b347a505"
},
{
"from": "human",
"value": "import isArray from 'lodash-es/isArray';\nimport isObject from 'lodash-es/isObject';\n\nexport const instruct = (array, instArray)... | javascript | chosen |
[
{
"from": "system",
"value": "Update router configurations to point to correct templates\n"
},
{
"from": "human",
"value": "angular.module( 'ngVn', [\n 'templates-app',\n 'templates-common',\n 'ngVn.home',\n 'ngVn.about',\n 'ngVn.updates',\n 'ui.router'\n])\n\n.config( function myAppConfig... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for multiple tab highlighting\n"
},
{
"from": "human",
"value": "$(document).foundation();\n\nfunction show(clickId) {\n\t\t\tvar showdiv = document.getElementById(clickId);\t\n\t\t\tvar tabUl = document.querySelector('.tabs');\n\t\t\tvar tabs = tabUl.querySelec... | javascript | chosen |
[
{
"from": "system",
"value": "Add error handling and change names of properties.\n"
},
{
"from": "human",
"value": "var mongodb = require('mongodb');\nvar nodefn = require('when/node');\n\nfunction MongoAdapter() {\n\tthis.connectURI = 'mongodb://0.0.0.0:27017/';\n\tthis.databaseName = 'testowa'... | javascript | chosen |
[
{
"from": "system",
"value": "Use lib build in example\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport ReactSVG from '../src';\n\nReactDOM.render(\n <ReactSVG\n path={'atomic.svg'}\n className={'example'}\n callback={(svg) => c... | javascript | chosen |
[
{
"from": "system",
"value": "Remove local-time dependent unit test\n"
},
{
"from": "human",
"value": "const assert = require('assert');\nconst color = require('../app/components/tasks/color');\n\ndescribe('tasks', () => {\n describe('color.js', () => {\n describe('returnColor', () => {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update svg script to remove ids and classes namespace\n"
},
{
"from": "human",
"value": "var buildFolder = require('../helper').getBuildRootFolder();\nvar execCommand = require('../helper/exec-command');\n\nvar command = 'svg-sprite -D \"'+ buildFolder +'\" -l \"ver... | javascript | chosen |
[
{
"from": "system",
"value": "Use the JUnit reporter on Circle\n"
},
{
"from": "human",
"value": "import {createRunner} from 'atom-mocha-test-runner';\nimport chai from 'chai';\nimport chaiAsPromised from 'chai-as-promised';\n\nimport until from 'test-until';\n\nchai.use(chaiAsPromised);\nglobal... | javascript | chosen |
[
{
"from": "system",
"value": "Add function to display a price with units\n"
},
{
"from": "human",
"value": "import 'whatwg-fetch';\nimport _ from 'underscore';\n\nlet helpers = {\n capitalize,\n checkStatus,\n displayPrice,\n findTypeId,\n findTypeName,\n parseJSON,\n headers: {\n Acce... | javascript | chosen |
[
{
"from": "system",
"value": "Update extension to work with latest showdown version\n\nFrom showdown v1.0.0 and onward, the namespace changed from `Showdown` to `showdown`. This change reflect the new namespace, making it compatible with the latest version"
},
{
"from": "human",
"value": "/*\n *... | javascript | chosen |
[
{
"from": "system",
"value": "Add fbemitter and immutable to module map\n"
},
{
"from": "human",
"value": "/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of ... | javascript | chosen |
[
{
"from": "system",
"value": "Use travis build number as tunnel id in sauce labs tests to prevent errors\n"
},
{
"from": "human",
"value": "var customLaunchers = require('./saucelabs-browsers');\n\nmodule.exports = function(config) {\n config.set({\n frameworks: ['mocha', 'browserify']... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.