conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix animation prefix to work with multiple keyframes in one animation\n"
},
{
"from": "human",
"value": "var postcss = require('postcss');\n\nmodule.exports = postcss.plugin('postcss-prefixer-keyframes', function (opts) {\n opts = opts || {};\n\n var prefix = ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo from copying over configs."
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n module: {\n loaders: [\n { test: /\\.js$/, loaders: ['babel-loader'], exclude: /node_modules/ }\n ]\n },\n output: {\n library: 'Redux',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for relative resolution from data files\n"
},
{
"from": "human",
"value": "const fs = require('fs');\nconst path = require('path');\n\ndescribe('node data resolution', () => {\n const relativeDataPath = './data/data.json';\n\n it('should be able to resolv... | javascript | chosen |
[
{
"from": "system",
"value": "Use grunt.util.spawn to execute the grunt task. This makes sure grunt configuration set via grunt.option is properly read again\n"
},
{
"from": "human",
"value": "var grunt = require('grunt');\n\nvar makeOptions = function (options) {\n\n var baseOptions = {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update: Use null instead of undefined for errors\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar asyncDone = require('async-done');\n\nfunction settle(fn, done){\n asyncDone(fn, function(error, result){\n var settled = {};\n\n if(error != null){\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove webkit prefix, not needed anymore\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\n\nimport { TYPE } from './../utils/constant';\n\nfunction ProgressBar({\n delay,\n isRunning,... | javascript | chosen |
[
{
"from": "system",
"value": "Return google play store links with or without language specification.\n"
},
{
"from": "human",
"value": "'use strict';\nmodule.exports = function (str, opts) {\n\tif (typeof str !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\topts = opts ||... | javascript | chosen |
[
{
"from": "system",
"value": "Rename items in demo folder structure\n"
},
{
"from": "human",
"value": "import { ItemTypes } from './constants';\n\nconst demoFolderStructure = {\n 0: {\n type: ItemTypes.ROOT,\n content: [1, 7]\n },\n 1: {\n type: ItemTypes.FOLDER,\n name: 'Answers'... | javascript | chosen |
[
{
"from": "system",
"value": "Use a symmetric eazing curve with flat center\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar svg = require('virtual-dom/virtual-hyperscript/svg')\nvar bezier = require('bezier-easing')\nvar Size = require('create-svg-size')\nvar Circle = require('./circle')\... | javascript | chosen |
[
{
"from": "system",
"value": "Use exposed method not a hack, and make backwards compatable\n"
},
{
"from": "human",
"value": "wrapAsync = (Meteor.wrapAsync)? Meteor.wrapAsync : Meteor._wrapAsync;\nMongo.Collection.prototype.aggregate = function(pipelines) {\n var coll = MongoInternals.defaultRe... | javascript | chosen |
[
{
"from": "system",
"value": "feat: Update default svg config to include scss render, template file\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n\n'use strict';\n\nfunction getTaskConfig(projectConfig) {\n\tvar taskConfig = {\n\t\tsvgSrc: projectConfig.paths.src.svgs + '**/*.svg',... | javascript | chosen |
[
{
"from": "system",
"value": "feat: Add trap tab key functionality to modal\n\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport $ from 'jquery';\n\nexport default Ember.Component.extend({\n attributeBindings: ['role'],\n didInsertElement () {\n const $emEl = this.$();\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Switch back to login check via location compare\n\n(where staying on login means failed login and success\nresulted in forward to search results)\n"
},
{
"from": "human",
"value": "protractor.expect = {\n challengeSolved: function (context) {\n describe('(shared... | javascript | chosen |
[
{
"from": "system",
"value": "Add support of node >=6 grunt tasks\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar helper = require('../helper');\n\n/**\n * Defines all linting task.\n *\n * @function\n * @memberof! GruntLint\n * @private\n * @param {Object} grunt - The grunt instance\n *... | javascript | chosen |
[
{
"from": "system",
"value": "Fix createWindow call to reference app\n"
},
{
"from": "human",
"value": "var DemoApp = function(desktop) {\n this.demoWindow = desktop.createWindow({\n x: 50,\n y: 50,\n title: \"Demo App!\"\n });\n this.demoWindow.body.innerHTML = \"<span class='posDis... | javascript | chosen |
[
{
"from": "system",
"value": "Set gulp icon as default\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar\n growler = require('growler')\n;\n\nmodule.exports = function(applicationOptions) {\n\n applicationOptions = applicationOptions || {};\n\n var growl = new growler.GrowlApplication('... | javascript | chosen |
[
{
"from": "system",
"value": "Return a promise from void step\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst BaseStep = require('./base-step');\n\nmodule.exports = class VoidStep extends BaseStep {\n start() {}\n};\n"
},
{
"from": "gpt",
"value": "'use strict';\n\nconst B... | javascript | chosen |
[
{
"from": "system",
"value": "Resolve SDK directory check issue\n"
},
{
"from": "human",
"value": "var fs = require('fs');\n\nfunction isSdkDirectory() {\n var cwd = process.cwd();\n\n var data = fs.readdirSync(cwd);\n\n data = data.map(item => item.toLowerCase());\n\n if (data.indexOf('scri... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust nav to new recommended layout.\n\nThis removes \"Intro\", which is actually no longer the recommended\nget-started place (Learn takes that spot).\n\nAdditionally, there is now a separator between the high level business\nvalue stuff, and the low level developer stuff.\n"... | javascript | chosen |
[
{
"from": "system",
"value": "Update test for no features"
},
{
"from": "human",
"value": "import Map from '../src/ol/Map.js';\nimport View from '../src/ol/View.js';\nimport MVT from '../src/ol/format/MVT.js';\nimport VectorTileLayer from '../src/ol/layer/VectorTile.js';\nimport VectorTileSource... | javascript | chosen |
[
{
"from": "system",
"value": "Remove loaded module which was removed\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar app = angular.module('settingsWindow', ['schemaForm']);\n\napp.run(function($rootScope) {\n $rootScope.GUI = require('nw.gui');\n $rootScope.AppName = $rootScope.GUI... | javascript | chosen |
[
{
"from": "system",
"value": "Fix user picker search request\n\nThe users API controller expects the search params to be contains in a\n`q` node."
},
{
"from": "human",
"value": "$.fn.userAutocomplete = function () {\n 'use strict';\n\n function formatUser(user) {\n return Select2.util.esca... | javascript | chosen |
[
{
"from": "system",
"value": "Make route to /game/:id/edit link to EditGame\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { Router, Route, hashHistory } from 'react-router'\n\nimport App from './App'\nimport Home from './Home'\nimport Overview from './Overview'\nimport Mat... | javascript | chosen |
[
{
"from": "system",
"value": "Use borderBottom instead of shadow for cards\n"
},
{
"from": "human",
"value": "import { StyleSheet } from 'react-native';\n\nconst theme = {\n colours: {\n primary: '#fbb632',\n secondary: '#2c2c2c',\n dark: '#212121',\n light: '#bebebe',\n }\n}\n\nco... | javascript | chosen |
[
{
"from": "system",
"value": "Comment UI appears on AF for users if they own the post and have at least 1 AF Karma, but not if they don't.\n"
},
{
"from": "human",
"value": "import { Comments } from \"meteor/example-forum\";\n\nComments.addField([\n // This commment will appear in alignment for... | javascript | chosen |
[
{
"from": "system",
"value": "Improve ui responsiveness if urls.path is databound"
},
{
"from": "human",
"value": "var m = angular.module(\"routeUrls\", []);\n\nm.factory(\"urls\", function($route) {\n\n var pathsByName = {};\n angular.forEach($route.routes, function (route, path) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Hide any alerts when user starts to interact with \"Features\" page again\nafter completing an action.\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n\n $(\"#new-feature\").hide();\n $(\".edit-feature\").hide();\n\n $(\"#new-feature-button\").... | javascript | chosen |
[
{
"from": "system",
"value": "Remove line that tries to sync the DatumCollection.\n\nFormer-commit-id: 769c0335d1ad8f066c66f902272c5f7d786f0955"
},
{
"from": "human",
"value": "// Set the RequireJS configuration\nrequire.config({\n paths : {\n \"use\" : \"libs/use\",\n \"text\" ... | javascript | chosen |
[
{
"from": "system",
"value": "fix(jsonmvc): Remove extra param for module indexing.\n"
},
{
"from": "human",
"value": "\nimport reduce from 'lodash-es/reduce'\nimport merge from 'lodash-es/merge'\n\nfunction bundleModules (modules) {\n let bundle = reduce(modules, (acc, v1, k1) => {\n reduce... | javascript | chosen |
[
{
"from": "system",
"value": "Allow eslint config options overrides\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst { getLoader } = require('react-app-rewired');\n\n// this is the path of eslint-loader `index.js`\nconst ESLINT_PATH = `eslint-loader${path.sep}index.js`;\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Include address information in unit fetch\n"
},
{
"from": "human",
"value": "import {createAction} from 'redux-actions';\nimport values from 'lodash/values';\nimport {UnitActions} from './constants';\nimport {Action} from '../common/constants';\nimport {ApiResponse,... | javascript | chosen |
[
{
"from": "system",
"value": "Make 'Changelog' h1, Versions h2"
},
{
"from": "human",
"value": "/**\n * # Convert Release.json to Changes.md\n *\n * @param {Array} data The releases from Github's API\n * @param {String} out Changelog filename\n * @return {Stream} The file write stream\n */\n... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure not to animate into position on first render\n"
},
{
"from": "human",
"value": "var d3 = require('d3');\nvar React = require('react');\nvar ReactDOM = require('react-dom');\n\nvar AnitmationCircle = React.createClass({\n\n displayName: 'AnitmationCircle',... | javascript | chosen |
[
{
"from": "system",
"value": "Order notes on the server (API) side.\n"
},
{
"from": "human",
"value": "require('dotenv').load();\nvar express = require('express');\nvar notelyServerApp = express();\nvar Note = require('./models/note');\nvar bodyParser = require('body-parser');\n\n// Allow oursel... | javascript | chosen |
[
{
"from": "system",
"value": "Enable the email forwarding UI for CUSTOMER6.\n\n(imported from commit 587159412ad208d1f5e44479f50ca2f25a98f70a)\n"
},
{
"from": "human",
"value": "var feature_flags = (function () {\n\nvar exports = {};\n\nexports.mark_read_at_bottom = page_params.staging ||\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add swedish translation in browser warning message\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nfunction BrowserWarning() {\n return (\n <div>\n <p className=\"alert alert-warning\">\n Currently, Varaamo does not support IE11.\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix native splicing as well\n"
},
{
"from": "human",
"value": "export default class GameLoop {\n loop = () => {\n this.subscribers.forEach((callback) => {\n callback.call();\n });\n\n this.loopID = window.requestAnimationFrame(this.loop);\n }\n cons... | javascript | chosen |
[
{
"from": "system",
"value": "Implement a write test for Locket.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar Locket = require('../')\nvar cadence = require('cadence')\nvar path = require('path')\nvar crypto = require('crypto')\nvar seedrandom = require('seedrandom')\n\n\nfuncti... | javascript | chosen |
[
{
"from": "system",
"value": "Put bus-tracker as default page\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar http = require('http');\nvar path = require('path');\nvar fs = require('fs');\nvar mime = require('mime');\n\nfunction send404 (response) {\n\tresponse.writeHead(404, {\"Conten... | javascript | chosen |
[
{
"from": "system",
"value": "Add simple closing quotation marks\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport CodeMirror from 'codemirror';\nimport './qwery-mode';\nimport Hint from './hint';\nimport Completion from './completion';\nimport QueryRunner from './query-runne... | javascript | chosen |
[
{
"from": "system",
"value": "Add new dependencies paths to requirejs config\n"
},
{
"from": "human",
"value": "require.config({\n\n // alias libraries paths\n paths: {\n 'domReady': '../bower_components/requirejs-domready/domReady',\n 'angular': '../bower_components/angular/... | javascript | chosen |
[
{
"from": "system",
"value": "Make button a stateless component\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react';\nimport {\n Text,\n TouchableHighlight\n} from 'react-native';\n\nclass Button extends Component {\n constructor(props) {\n super(prop... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with selecting text input on iOS\n"
},
{
"from": "human",
"value": "angular.module('app')\n.directive('selectOnClick', function () {\n return {\n restrict: 'A',\n link: function (scope, element) {\n var focusedElement;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow calling `setState` nested in a function in `componentDidMount`\n\nFor motivation see \r\n https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md#allow-in-func-mode"
},
{
"from": "human",
"value": "module.exports = {\... | javascript | chosen |
[
{
"from": "system",
"value": "Modify toUpper to return uppercase of its calling string\n"
},
{
"from": "human",
"value": "/**\n * Has Vowels\n * \n * hasVowel tests if the String calling the function has a vowels\n * \n * @param {void}\n * @return {Boolean} returns true or false indicating if th... | javascript | chosen |
[
{
"from": "system",
"value": "Remove new line from the if"
},
{
"from": "human",
"value": "import Vue from \"vue\";\nimport VueResource from \"vue-resource\";\nimport Carousel from \"./components/Carousel.vue\";\nimport styles from './carousel.css';\n\nVue.use(VueResource);\nVue.config.debug = t... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary wrapper span from YouTube player.\n"
},
{
"from": "human",
"value": "import cx from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport YouTubePlayerEmbed from './PlayerEmbed';\n\nconst YouTubePlayer = ({\n acti... | javascript | chosen |
[
{
"from": "system",
"value": "Add options attribute to pass a complete options list to directive\n\nThe option attribute must contains an object with the additional options\nyou want to pass to the justgage object. Normal option are still use but\nwill be overload by object if declared twice.\n\nHere's a sa... | javascript | chosen |
[
{
"from": "system",
"value": "Add warning message on site alpha version\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport {withReduxSaga} from 'configureStore'\n\nimport Layout from 'components/Layout'\nimport HomeHero from 'components/HomeHero'\nimport ProgramsList from 'cont... | javascript | chosen |
[
{
"from": "system",
"value": "Include babel-polyfill for using Promises\n"
},
{
"from": "human",
"value": "/**\n * Popup script\n */\n\n'use strict';\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport App from './components/app-component';\n\nReactDOM.render(<App/>, documen... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up unfinished work + conflict\n"
},
{
"from": "human",
"value": "function sortProject(changeEvent) {\n\n var data = {};\n\n // Get old and new index from event\n data.oldIndex = changeEvent.oldIndex;\n data.newIndex = changeEvent.newIndex;\n\n /... | javascript | chosen |
[
{
"from": "system",
"value": "Remove browsers from PostCSS Config\n\nSpecifying browsers via this config is not recommended. The best way to provide browsers is a .browserslistrc file in your project root, or by adding a browserslist key to your package.json. (see: https://github.com/postcss/autoprefixer). ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix numbers in Python (octal, binary, imaginary)\n"
},
{
"from": "human",
"value": "Prism.languages.python= { \n\t'comment': {\n\t\tpattern: /(^|[^\\\\])#.*?(\\r?\\n|$)/g,\n\t\tlookbehind: true\n\t},\n\t'string': /\"\"\"[\\s\\S]+?\"\"\"|'''[\\s\\S]+?'''|(\"|')(\\\\?... | javascript | chosen |
[
{
"from": "system",
"value": "Initialize array with 30 black and white stones/checkers.\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('sk.backgammon', [])\n .controller('MainCtrl', ['$scope', function ($scope) {\n }]);\n\n"
},
{
"from": "gpt",
"value": "'use st... | javascript | chosen |
[
{
"from": "system",
"value": "Change WebSocket to @faddat one\n"
},
{
"from": "human",
"value": "import { api } from 'steem';\n\nmodule.exports = api;\n"
},
{
"from": "gpt",
"value": "import { api } from 'steem';\n\napi.setWebSocket('ws://138.201.198.167:8090');\n\nmodule.exports = a... | javascript | chosen |
[
{
"from": "system",
"value": "Fix `npm test` failing to run\n\nTrying to run `npm test` fails because the mocha path was set to the\nmocha shell script instead of the mocha init script (it tried to spawn\nnode with a shell script).\nThis commit fixes the issue and the tests run as expected.\n"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Add example invocation for operator override for +\n"
},
{
"from": "human",
"value": "\n// add two numbers without using +\nfunction add(a,b) {\n if(b == 0)\n return a;\n var sum = a ^ b;\n var carry = (a & b) << 1;\n return add(sum,carry);\n... | javascript | chosen |
[
{
"from": "system",
"value": "Load initial user data via get\n"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n\n angular\n .module('app.layout')\n .controller('ShellController', ShellController);\n\n function ShellController(\n $rootScope,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor - slightly more elegant way of splitting the template\n\nSplitting the template into the button element and the popup.\n"
},
{
"from": "human",
"value": "/*\n * Provide a search widget with a popup to enter and clear search terms.\n * Test suite can get a h... | javascript | chosen |
[
{
"from": "system",
"value": "Add optional initial_crc to calculate()"
},
{
"from": "human",
"value": "var sse4_crc32 = require(\"bindings\")(\"sse4_crc32\");\n\n\n/**\n * Defines a progressive 32-bit CRC calculator\n *\n * @param input The input string for which the CRC is to be calculated\n * ... | javascript | chosen |
[
{
"from": "system",
"value": "Load keyboard shortcuts json using json requirejs plugin so that it can be compiled into build\n"
},
{
"from": "human",
"value": "define(['require', 'app', 'backbone.marionette', 'backbone', 'marked', 'underscore'],\n function (require, App, Marionette, Backbone, m... | javascript | chosen |
[
{
"from": "system",
"value": "Set the global object explicitly\n"
},
{
"from": "human",
"value": "var makeNode = require(\"../node/make_node\"),\n\tminify = require(\"../graph/minify\"),\n\tprettier = require(\"prettier\");\n\nmodule.exports = function(bundle, options){\n\tvar source = prettier.... | javascript | chosen |
[
{
"from": "system",
"value": "Fix date processing on RPL_TOPIC_WHO_TIME\n"
},
{
"from": "human",
"value": "\nmodule.exports = function () {\n\treturn function (irc) {\n\t\tirc.topic = function (channel, topic, fn) {\n\t\t\tif (typeof topic === 'function') {\n\t\t\t\tfn = topic;\n\t\t\t\ttopic = ... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for unicode thumbs up.\n"
},
{
"from": "human",
"value": "\nvar assert = require('assert');\nvar ghir = require('../dist');\n\nassert.ok(true);\n\nassert(ghir.hasVote('I agree, +1!'));\nassert(! ghir.hasVote('I agree, 2+1!'));\nassert(! ghir.hasVote('I agr... | javascript | chosen |
[
{
"from": "system",
"value": "Allow query parameters in font source urls\n"
},
{
"from": "human",
"value": "// noinspection JSUnresolvedVariable\nmodule.exports = {\n cache: false,\n debug: false,\n module: {\n loaders: [\n {\n // This is a custom property.\n name: 'jsx'... | javascript | chosen |
[
{
"from": "system",
"value": "Add use strict to tests\n\nSigned-off-by: Ian Macalinao <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@ian.pw>\n"
},
{
"from": "human",
"value": "var expect = require('chai').expect;\nvar passwords = require('..');\n\ndescribe('mongoose-password-bcrypt-nodejs', function(... | javascript | chosen |
[
{
"from": "system",
"value": "Add location hack to node.js test runtime\n"
},
{
"from": "human",
"value": "jsdom = require('jsdom')\nwindow = jsdom.jsdom().createWindow();\ndocument = window.document;\nglobal.document.implementation.createHTMLDocument = function (html, url) {\n return js... | javascript | chosen |
[
{
"from": "system",
"value": "Fix statistics not showing in navbar during the first iteration of textillate\n"
},
{
"from": "human",
"value": "var navbar = function($interval, $q, User) {\n return {\n restrict: 'E', // only activate on element attribute\n templateUrl: 'navbar.ht... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary perf test config\n"
},
{
"from": "human",
"value": "global.useBluebird = false;\nglobal.useQ = false;\nglobal.useWhen = false;\n\nglobal.useCreed = true;\nglobal.parallelQueries = 25;\n\nvar creed = require('../../dist/creed');\n\nrequire('../lib/... | javascript | chosen |
[
{
"from": "system",
"value": "Add setTimeout property to delay ufo before starting over again\n"
},
{
"from": "human",
"value": "var virus = document.querySelector(\"div\");\nvar x = 1;\nvar y = 0;\nvar vy = 0;\nvar ay = 0;\nvar vx = .1; // px per millisecond\nvar startTime = Date.now();\nvar cl... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in JS client example"
},
{
"from": "human",
"value": "// Fake service (makes a tether)\n/* jshint node: true */\n\n(function () {\n \"use strict\";\n\n var runtime = require(\"quark_node_runtime.js\");\n var ipify = require(\"./ipify\");\n\n fun... | javascript | chosen |
[
{
"from": "system",
"value": "Fix potential security flaw in createSubcompany()\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar async = require('async');\n\n/**\n * Create a new user and move it to a new subcompany.\n * The new user will be the first admin of the subcompany.\n * @param {... | javascript | chosen |
[
{
"from": "system",
"value": "Rewrite js as stand alone function\n"
},
{
"from": "human",
"value": "$(function() {\n $(\"#modal-1\").on(\"change\", function() {\n if ($(this).is(\":checked\")) {\n $(\"body\").addClass(\"modal-open\");\n } else {\n $(\"body\").removeClass(\"modal... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce delay to 1 second; 2 is too long.\n\n"
},
{
"from": "human",
"value": "pref(\"extensions.FolderPaneSwitcher.logging.console\",\"Warn\");\npref(\"extensions.FolderPaneSwitcher.logging.dump\",\"Warn\");\npref(\"extensions.FolderPaneSwitcher.arrows\",true);\npre... | javascript | chosen |
[
{
"from": "system",
"value": "Fix indent, single-quotes and leaking i"
},
{
"from": "human",
"value": "// nth-child pseudo selector\nModernizr.addTest('nthchild', function(){\n\n return Modernizr.testStyles(\"#modernizr div {width:1px} #modernizr div:nth-child(2n) {width:2px;}\", function (elem... | javascript | chosen |
[
{
"from": "system",
"value": "Add replace urls text to replace urls with proper links\n"
},
{
"from": "human",
"value": "var Chat = function() {\n //this.members = {};\n //this.messages = [];\n this.state = this.buildState();\n this.colors = [\n 'red',\n 'blue',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use is defined to check is a function not has property\n"
},
{
"from": "human",
"value": "define([\n 'aux/has-property'\n], function (hasProperty) {\n /**\n * Using the browsers console logging options, allowing to use console.error if accessible otherwise... | javascript | chosen |
[
{
"from": "system",
"value": "Fix constructor shared between components\n"
},
{
"from": "human",
"value": "import pluck from './pluck';\nimport {\n noop,\n mixin,\n observable,\n insertCss,\n emptyTemplate,\n computedAll,\n pureComputedAll\n} from '../util/';\n\nconst module... | javascript | chosen |
[
{
"from": "system",
"value": "Fix __dirname and __filename in sunwell-card-renderer\n\nReferences webpack/webpack#1599\n"
},
{
"from": "human",
"value": "const path = require(\"path\");\nconst webpack = require(\"webpack\");\n\n\nvar MINIFY = new webpack.optimize.UglifyJsPlugin({minimize: true})... | javascript | chosen |
[
{
"from": "system",
"value": "Change test wrapper callback from `call` to `apply`\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport { getContext } from 'ember-test-helpers';\n\nexport default function testWrapper(testName, callback, qunit) {\n function wrapper(assert) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix exit altitude units placement\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport PropTypes from 'prop-types'\n\nimport { useI18n } from 'components/TranslationsProvider'\n\nconst maxAltitude = 3353\nconst minAltitude = 3200\n\nconst ExitAltitud... | javascript | chosen |
[
{
"from": "system",
"value": "Fix page /pipe 's error."
},
{
"from": "human",
"value": "// server.js\n\n/**IMPORT**/\nvar express = require('express');\nvar url = require('url');\nvar inject_pipe = require('./inject-pipe.js');\n\n/** SET **/\nvar app = express();\n\n/**FUNCTION**/\nfunction send... | javascript | chosen |
[
{
"from": "system",
"value": "Remove Object.assign for node v0.12 compatibility\n"
},
{
"from": "human",
"value": "var path = require(\"path\");\nvar express = require(\"express\");\nvar webpack = require(\"webpack\");\nvar config = Object.assign({}, require(\"./webpack.docs.config\"));\n\nconfi... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure client gets update after a refresh\n"
},
{
"from": "human",
"value": "var WebSocketServer = require('ws').Server\n , http = require('http')\n , express = require('express')\n , app = express()\n , port = process.env.PORT || 5000;\n\napp.use(express.sta... | javascript | chosen |
[
{
"from": "system",
"value": "Fix rollup for lazy load image\n"
},
{
"from": "human",
"value": "import nodeResolve from 'rollup-plugin-node-resolve';\nimport commonjs from 'rollup-plugin-commonjs';\nimport uglify from 'rollup-plugin-uglify';\n\nexport default {\n entry: 'src/main-aot.js... | javascript | chosen |
[
{
"from": "system",
"value": "Change to updating every 10s\n"
},
{
"from": "human",
"value": "// TODO: should the baseScore be stored, and updated at vote time?\n\n// This interface should change and become more OO, this'll do for now\nvar Scoring = {\n // re-run the scoring algorithm on a sing... | javascript | chosen |
[
{
"from": "system",
"value": "Update specs to reflect options key change\n"
},
{
"from": "human",
"value": "var { generateClient } = require(\"../generateClient\")\n\nit(\"returns generated code\", function() {\n var code = generateClient({\n path: \"./__tests__/documents/*.graphql\",\n c... | javascript | chosen |
[
{
"from": "system",
"value": "Put reference handling correct way around\n"
},
{
"from": "human",
"value": "VIE.prototype.Collection = Backbone.Collection.extend({\n model: VIE.prototype.Entity,\n\n get: function(id) {\n if (!this.models.length) {\n return null;\n }... | javascript | chosen |
[
{
"from": "system",
"value": "Use dots instead of index notation\n"
},
{
"from": "human",
"value": "GAME.setConsts({\n SHIT : 1\n});\n\nGAME.Generator = (function() {\n\n var wow = false;\n\n function generate(level) {\n width = level.size[width];\n height = lev... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for IE11 custom event\n"
},
{
"from": "human",
"value": "import assign from 'object-assign';\n\nimport { store } from './helpers';\n\nexport const MENU_SHOW = 'REACT_CONTEXTMENU_SHOW';\nexport const MENU_HIDE = 'REACT_CONTEXTMENU_HIDE';\n\n\nexport function disp... | javascript | chosen |
[
{
"from": "system",
"value": "Hide translation tab for available one language\n"
},
{
"from": "human",
"value": "/**\n * Created by mkurc1 on 15/06/16.\n */\n"
},
{
"from": "gpt",
"value": "(function ($) {\n\n $(function () {\n hideTranslationTabForOneLanguage();\n });\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix few code to match the doc\n"
},
{
"from": "human",
"value": "/**\n * Copyright 2017 Google Inc. All Rights Reserved.\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.\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix warning in eclipse (missing ;) "
},
{
"from": "human",
"value": "#set( $prefix=$className.toLowerCase())\n#set( $symbol_dollar = '$' )\n'use strict';\n\nfunction ${className}ListController($scope, $location, ${className}) {\n $scope.${prefix}s = ${className}.... | javascript | chosen |
[
{
"from": "system",
"value": "Rename descProperty, make properties non-configurable by default.\n"
},
{
"from": "human",
"value": "function descAccessor(get, set) {\n return {\n get: get,\n set: set,\n configurable: true,\n enumerable: true\n };\n}\nfunction descConst(val) {\n ret... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify webpack css module config\n"
},
{
"from": "human",
"value": "const merge = require('webpack-merge');\nconst common = require('./webpack.common.js');\nconst MiniCssExtractPlugin = require('mini-css-extract-plugin');\n\nmodule.exports = merge(common, {\n m... | javascript | chosen |
[
{
"from": "system",
"value": "Apply the new `innerHTML` only if the text have actually changed avoiding unnecessary HTML parses and DOM rendering\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n function transformText(text) {\n text = text.replace(/\\[0m/g, \"</span>... | javascript | chosen |
[
{
"from": "system",
"value": "Add TODO with plan for getting rid of findDOMNode in dragHandle\n"
},
{
"from": "human",
"value": "/* @flow */\n\nimport React from 'react';\nimport type {Element as ReactElement} from 'react';\nimport {findDOMNode} from 'react-dom';\n\ntype Props = {\n onMouseDown... | javascript | chosen |
[
{
"from": "system",
"value": "Handle case where Status===inherit but no parent available\n"
},
{
"from": "human",
"value": "// const debug = require('debug')('W2:portal:instance/page/compute-document-status');\nconst Promise = require('bluebird');\n\nfunction getParentStatus(statusConfig, persis... | javascript | chosen |
[
{
"from": "system",
"value": "Add property to delay repeat\n"
},
{
"from": "human",
"value": "var React = require('react');\nvar { Repeat } = require('Immutable');\n\nclass ReactTypeInAndOut extends React.Component {\n\n constructor (props) {\n super(props);\n\n var words = prop... | javascript | chosen |
[
{
"from": "system",
"value": "Split out a separate function for reducing the cells\n"
},
{
"from": "human",
"value": "export default function board(state = {}, action) {\n if (action.type === 'PLAY_TURN') {\n const { location, moveId, piece } = action;\n const cells = [\n ...state.ce... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.