conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add battery API detection. Lint code.\n"
},
{
"from": "human",
"value": "(function(window) {\n 'use strict';\n\n function toTime(sec) {\n sec = parseInt(sec, 10);\n\n var hours = Math.floor(sec / 3600);\n var minutes = Math.floor((sec - (hours * 3600)) / ... | javascript | chosen |
[
{
"from": "system",
"value": "Add fetchReport to exported functions\n\nThis is useful if you want to use the library without running the cli.\n"
},
{
"from": "human",
"value": "import RemoteBrowserTarget from './RemoteBrowserTarget';\nimport uploadReport from './uploadReport';\n\nexport {\n Rem... | javascript | chosen |
[
{
"from": "system",
"value": "Use forEach instead of map\n"
},
{
"from": "human",
"value": "export const BATCH = 'BATCHING_REDUCER.BATCH';\n\nexport function batchActions(actions, type = BATCH) {\n\treturn {type, meta: { batch: true }, payload: actions}\n}\n\nexport function enableBatching(reduc... | javascript | chosen |
[
{
"from": "system",
"value": "Handle missing route definition with meaningful error message\n"
},
{
"from": "human",
"value": "!function() {\n 'use strict';\n\n angular.module('crumble', ['ngRoute'])\n .factory('crumble', function ($location, $route, $interpolate) {\n var crumble = {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused process require, fixed spacing\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar spawn = require('child_process').spawn;\nvar process = require('process');\nvar async = require('async');\n\nvar scripts = ['locker/locker.js', 'messagebroker/... | javascript | chosen |
[
{
"from": "system",
"value": "Implement check for empty file selections while using the CLI\n\nFixes #3\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar path = require('path');\nvar nconf = require('nconf');\nvar yamlLint = require('./yaml-lint');\nvar leprechaun = require('leprecha... | javascript | chosen |
[
{
"from": "human",
"value": "Implement Get Subcampaign List REST\n"
},
{
"from": "gpt",
"value": "var readSubcampaignModelLogic = require('../../logic/subcampaign/readSubcampaignModelLogic')\nvar subcampaignModelCheckerLogic = require('../../logic/subcampaign/subcampaignModelCheckerLogic')\n\nva... | javascript | chosen |
[
{
"from": "system",
"value": "Test Graph: Adds test to check for creating Graph\n"
},
{
"from": "human",
"value": "/* eslint-env mocha */\nconst Graph = require('../../src').DataStructures.Graph;\nconst assert = require('assert');\n\ndescribe('Graph', () => {\n it('should be empty when initiali... | javascript | chosen |
[
{
"from": "system",
"value": "FIX redirect to checkout after guest login\n"
},
{
"from": "human",
"value": "var ValidationService = require(\"services/ValidationService\");\nvar ApiService = require(\"services/ApiService\");\n\nVue.component(\"guest-login\", {\n\n props: [\n \"template... | javascript | chosen |
[
{
"from": "system",
"value": "Apply site controller to the root state in embedded mode\n"
},
{
"from": "human",
"value": "'use strict';\n\n(function() {\n angular\n .module('app')\n .config(['$stateProvider', '$urlRouterProvider',\n function($stateProvider, $urlRouterProvider) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add logic to parse hash and return it to callback when done.\n"
},
{
"from": "human",
"value": "function MaterialsFilePicker(callback) {\n this.doneCallback = callback;\n this.selectedMaterials = {};\n this.treeElement = $('#file-picker-tree');\n \n var courseI... | javascript | chosen |
[
{
"from": "system",
"value": "Test for multiple instances of file\n"
},
{
"from": "human",
"value": "var expect = require('chai').use(require('chai-subset')).expect\nvar flow = require('../flow')\nvar PouchDB = require('pouchdb-core')\nPouchDB.plugin(require('pouchdb-adapter-memory')).plugin(req... | javascript | chosen |
[
{
"from": "system",
"value": "Mark failing JS specs with 'F' on the console report\n"
},
{
"from": "human",
"value": "(function($) {\n $(Screw).bind(\"before\", function(){\n $('.it')\n .bind('passed', function(){\n java.lang.System.out.print(\".\");\n\n BlueRidge.CommandL... | javascript | chosen |
[
{
"from": "system",
"value": "Read file with fs module\n"
},
{
"from": "human",
"value": "/*\n * grunt-rev\n * https://github.com/cbas/grunt-rev\n *\n * Copyright (c) 2013 Sebastiaan Deckers\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nvar fs = require('fs'),\n path = require('p... | javascript | chosen |
[
{
"from": "system",
"value": "Add a constant for `pipe`.\n"
},
{
"from": "human",
"value": "// Copyright 2012 The Obvious Corporation.\n\n/*\n * Common constants used within this module\n */\n\n\n/*\n * Exported bindings\n */\n\n/**\n * Special error value indicating that there was in fact no er... | javascript | chosen |
[
{
"from": "system",
"value": ":white_check_mark: Check if function is available\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport * as phantom from 'phantom';\nimport test from 'ava';\n\nconst page = new Promise(resolve => {\n phantom.create()\n .then(p => p.createPage())\n .then... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure URL helped doesn't break if a url is undefined\n"
},
{
"from": "human",
"value": "var moment = require('moment');\n\nexports.dateFormat = function(datestamp) {\n var date = moment(datestamp);\n \n if (date.isBefore(moment(), 'week')) {\n re... | javascript | chosen |
[
{
"from": "system",
"value": "Add mangasName in the route\n"
},
{
"from": "human",
"value": "var subscriptions = new SubsManager();\n\nRouter.configure({\n\tlayoutTemplate: 'layout',\n\tloadingTemplate: 'loading',\n\tnotFoundTemplate: 'notFound'\n});\n\nRouter.route('/', {\n\tname: 'home',\n\twa... | javascript | chosen |
[
{
"from": "system",
"value": "Fix an issue where compress option was ignored\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar extend = require('extend');\nvar connect = require('connect');\nvar defaults = {\n\t/* connect options */\n\tport: 3000,\n\n\t/* connect.static options... | javascript | chosen |
[
{
"from": "human",
"value": "Add grunt script for babel\n"
},
{
"from": "gpt",
"value": "module.exports = grunt => {\n require('load-grunt-tasks')(grunt);\n grunt.initConfig({\n babel: {\n options: {\n sourceMap: 'inline',\n presets: ['es2015', 'react'],\n },\n ... | javascript | chosen |
[
{
"from": "system",
"value": "[TASK] Make sure all stylesheets get parsed with autoprefixer while running the default grunt task\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n\t\"use strict\";\n\n\t// Display the execution time of grunt tasks\n\trequire(\"time-grunt\")(g... | javascript | chosen |
[
{
"from": "system",
"value": "Fix head dir path name\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst mkdirp = require('./mkdirp');\nconst writeFile = require('./writeFile');\nconst writeTag = require('./writeTag');\n\nmodule.exports = (config, head) => {\n let output = '';\n\n const ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix remove event listener in OutsideClickHandler\n"
},
{
"from": "human",
"value": "/**\n * Outside click document\n */\n\nimport React from 'react';\n\nexport default class OutsideClickHandler extends React.Component {\n static propTypes = {\n onOutsideCl... | javascript | chosen |
[
{
"from": "system",
"value": "Rename the TEXTAREA_FIELD to TEXTAREA in the VM snapshot form\n"
},
{
"from": "human",
"value": "import { componentTypes, validatorTypes } from '@@ddf';\n\nconst createSchema = (hideName, showMemory, descriptionRequired) => {\n const nameField = {\n component: c... | javascript | chosen |
[
{
"from": "system",
"value": "Add Value Link Prop To Textarea Component\n\nAdd value link prop to textarea component in order to use with ReactLink\nAddon.\n"
},
{
"from": "human",
"value": "let React = require(\"react\")\nlet {errorList, sizeClassNames, formGroupCx, label} = require(\"../util.j... | javascript | chosen |
[
{
"from": "system",
"value": "Add nested pages to active\n"
},
{
"from": "human",
"value": "$('div#main-menu a').each(function () {\n if ($(this)[0].pathname == window.location.pathname) {\n $(this).addClass('active').removeAttr('href');\n return false;\n }\n});\n\n$('div#acc... | javascript | chosen |
[
{
"from": "system",
"value": "Use dot reporter for mocha\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n 'use strict';\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n // !jshint all code\n jshint: {\n options: {\n jshintrc: true... | javascript | chosen |
[
{
"from": "system",
"value": "Edit gruntfile: create task less2css\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n\n // config\n grunt.initConfig({\n\n less: {\n build: {\n expand: true,\n cwd: 'src/less/',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add 'setImmediate' to JSHint globals\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nmodule.exports = function(grunt){\n grunt.initConfig({\n pkg: grunt.file.readJSON(\"package.json\"),\n\n jshint: {\n options: {\n curly: true,\n eqeq... | javascript | chosen |
[
{
"from": "system",
"value": "Switch default branch to survival"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n grunt.loadNpmTasks('grunt-screeps');\n\n grunt.initConfig({\n screeps: {\n options: {\n email: '<EMAIL>',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Revert \"Fix failing test\"\"\n\nThis reverts commit 90d1c48de061fb54585fc2206928dcc81bd14b0f.\n"
},
{
"from": "human",
"value": "// Test the test runner\n\nvar assert = require('assert');\nvar chai = require('chai');\nvar expect = chai.expect;\nvar should ... | javascript | chosen |
[
{
"from": "system",
"value": "Add grunt test task for build\n"
},
{
"from": "human",
"value": "module.exports = function (grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n karma: {\n options: {\n files: [\n '... | javascript | chosen |
[
{
"from": "system",
"value": "Use doxx.template instead of default\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 all: [\n 'Gruntfil... | javascript | chosen |
[
{
"from": "system",
"value": "Create object to store news source api keys\n"
},
{
"from": "human",
"value": "// to make yourself an authorized user in Mysql:\n\n// $ mysql.server start\n// $ mysql -uroot\n// mysql> create database sentimentalDev\n// mysql> grant all on sentimentalDev.* to 'myNew... | javascript | chosen |
[
{
"from": "system",
"value": "Add grunt watch task registered as the default task.\n"
},
{
"from": "human",
"value": "module.exports = function (grunt) {\n\trequire('grunt-dojo2').initConfig(grunt, {\n\t\tdtsGenerator: {\n\t\t\toptions: {\n\t\t\t\tmain: 'dojo-store-prototype/main'\n\t\t\t}\n\t\t... | javascript | chosen |
[
{
"from": "system",
"value": "Add live-reload to watch task\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n browserify: {\n debug: {\n files: {\n 'public/assets/js/app.debug.js': ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove nodeunit as that test is bad\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n 'use strict';\n grunt.initConfig({\n benchmark: {\n singleTest: {\n src: ['benchmarks/singleTest.js'],\n dest: 'results/singleTest.csv... | javascript | chosen |
[
{
"from": "system",
"value": "Update our designs section text\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\nimport { Carousel, Well } from 'react-bootstrap'\n\nimport design1 from './Noah-Fagan-portfolio-oct-14-4.jpg'\nimport design2 from './Noah-Fagan-portfolio-oc... | javascript | chosen |
[
{
"from": "system",
"value": "Set a very large timeout for AppVeyor slowness\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function(grunt) {\n\n // Project configuration.\n grunt.initConfig({\n\tsimplemocha: {\n\t\tapp: {\n\t\t\tsrc: ['test/test.js']\n\t\t}\n\t},\n\tjshi... | javascript | chosen |
[
{
"from": "system",
"value": "Update links to privacy and contact page\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport i18n from '../../i18n'\n\nconst MapFooter = () => (\n <footer className=\"map-footer\">\n <ul>\n <li className=\"map-footer-home\">\n <a\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add period on line 9\n\nAdded period on line 9 to match other comments"
},
{
"from": "human",
"value": "import createStore from './createStore'\nimport combineReducers from './combineReducers'\nimport bindActionCreators from './bindActionCreators'\nimport applyMiddl... | javascript | chosen |
[
{
"from": "system",
"value": "Correct main module name in jsdoc comment.\n"
},
{
"from": "human",
"value": "// Copyright (c) Rotorz Limited. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root.\n\n/** @module webreed */\n"
},
{
"from": "gpt",
... | javascript | chosen |
[
{
"from": "system",
"value": "Remove default export to pure export\n"
},
{
"from": "human",
"value": "import Tree from './data/Tree';\nimport Trie from './data/Trie';\nimport BinarySearchTree from './data/BinarySearchTree';\nimport Graph from './data/Graph';\nimport MinHeap from './data/MinHeap'... | javascript | chosen |
[
{
"from": "system",
"value": "Change Map export to just be named \"Map\"\n"
},
{
"from": "human",
"value": "import ReactMapboxGl from \"./map\";\n\nimport Layer from \"./layer\";\nimport Feature from \"./feature\";\nimport ZoomControl from \"./zoom-control\";\nimport Popup from \"./popup\";\n\ne... | javascript | chosen |
[
{
"from": "system",
"value": "revert(Buttons): Exclude dynamic buttons from ES6ification.\n"
},
{
"from": "human",
"value": "'use strict';\n(() => {\n module.exports = (gulp, plugins, config) => {\n return () => {\n console.log(`${config.patternsPath}/**/*.js`);\n return gulp.src([... | javascript | chosen |
[
{
"from": "system",
"value": "Update POST route request to be JSON\n"
},
{
"from": "human",
"value": "var express = require('express')\nvar bodyParser = require('body-parser')\nvar app = express()\n\nvar port = process.env.PORT || 3000\n\napp.use(bodyParser.urlencoded({ extended: true }))\n\n\na... | javascript | chosen |
[
{
"from": "system",
"value": "Add theme to ThemeModel if it does not exist\n"
},
{
"from": "human",
"value": "Iago.ThemesController = Ember.ArrayController.extend({\n needs: 'use_case',\n actions: {\n create: function() {\n var name = this.get('newThemeName'),\n controller = t... | javascript | chosen |
[
{
"from": "system",
"value": "Fix another thing that is bad\n"
},
{
"from": "human",
"value": "import loadZips from '../shared/load-zips'\nimport importData from '../shared/import-data'\n\nexports.seed = async function(knex, Promise) {\n let zipCodes = loadZips('./seeds/shared/zip-codes.csv')\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add a list of tools\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport Helmet from 'react-helmet';\n\nclass About extends React.Component {\n\trender() {\n\t\treturn (<div className=\"sm-flex flex-wrap\">\n\t\t\t<div className=\"sm-col-12 p2\">\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Add time cache to static cache\n"
},
{
"from": "human",
"value": "importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.0.0/workbox-sw.js')\n\nconst staticCache = 'react-base-static-v1'\nconst dynamicCache = 'react-base-dynamic-v1'\nconst timeCache = ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix lint warnings. cc @kadamwhite"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * @ngdoc directive\n * @name vlui.directive:bookmarkList\n * @description\n * # bookmarkList\n */\nangular.module('vlui')\n .directive('bookmarkList', function (Bookmarks, con... | javascript | chosen |
[
{
"from": "system",
"value": "Remove date from text indices\n"
},
{
"from": "human",
"value": "import mongoose from 'mongoose'\nvar Schema = mongoose.Schema\n\nvar athleticsSchema = new Schema({\n id: String,\n date: Date,\n events: [{\n title: String,\n location: String,\n building_... | javascript | chosen |
[
{
"from": "system",
"value": "Fix sending a null game object in the base case\n"
},
{
"from": "human",
"value": "var models = require('../models');\nvar GameController = require(\"./GameController\");\n\nvar playerQueue = [];\n\nexports.startGame = function(req, res) {\n\n var player1 = req.bod... | javascript | chosen |
[
{
"from": "system",
"value": "Check whether a layer existing on the map before trying to add it\n"
},
{
"from": "human",
"value": "const addPaintOptions = (options, layer) => {\n if (layer.isPoint) {\n options['type'] = 'circle'\n options['paint'] = { \n 'circle-radius': [\n '... | javascript | chosen |
[
{
"from": "system",
"value": "Verify that type 4 fields are parsed correctly\n\nSee #13\n"
},
{
"from": "human",
"value": "var assert = require(\"assert\");\nvar parseApk = require(\"..\");\n\ndescribe(\"APK V24\", function () {\n var output = null;\n\n before(function (done) {\n pa... | javascript | chosen |
[
{
"from": "system",
"value": "Add Promise | Modulize into functions | add ES2016 let and const\n"
},
{
"from": "human",
"value": "var xhr = new XMLHttpRequest();\nxhr.onreadystatechange = function() {\n if (xhr.readyState === 4) {\n if (xhr.status === 200){\n var employees = JSON.parse(... | javascript | chosen |
[
{
"from": "system",
"value": "Call all socket functions in socket handler\n"
},
{
"from": "human",
"value": "me.canvas = document.querySelector('#area');\nme.ctx = me.canvas.getContext('2d');\nme.ctx.lineWidth = 5;\nme.arena = game.createArena('white', /*230*/me.canvas.height/2-10, me.canvas.wid... | javascript | chosen |
[
{
"from": "system",
"value": "Make fallback paste catcher a bit less obtrusive."
},
{
"from": "human",
"value": "/* \n * Methods for fetching pasted html before it gets inserted into content\n**/\n\n/* Modern event.clipboardData driven approach.\n * Advantage is that it does not have to loose se... | javascript | chosen |
[
{
"from": "system",
"value": "Use click event instead of change event for checkbox list so it works in IE\n\nsvn commit r13549\n"
},
{
"from": "human",
"value": "/**\n * JavaScript SwatCheckboxList component\n *\n * @param id string Id of the matching {@link SwatCheckboxList} object.\n */\nfunct... | javascript | chosen |
[
{
"from": "system",
"value": "Kill process to end browserify compile test\n"
},
{
"from": "human",
"value": "var amok = require('../');\nvar test = require('tape');\nvar fs = require('fs');\n\ntest('compile with browserify', function(t) {\n var args = [\n 'test/fixture/bundle.js'\n ];\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Put textarea counter class in variable\n"
},
{
"from": "human",
"value": "const editTextarea = {\n init() {\n // get all textarea elements with a maxlength attr\n const textAreaEls = document.querySelectorAll(\"textarea[data-max-length]\");\n\n if (textAre... | javascript | chosen |
[
{
"from": "system",
"value": "Add nested tailcall to debugger step test\n"
},
{
"from": "human",
"value": "/*\n * Test illustrating GH-1684 and GH-1726.\n *\n * Run with debugger attached, and:\n *\n * - StepOut from test1 and test2.\n *\n * - StepOver the 'return' statement in test1 and tes... | javascript | chosen |
[
{
"from": "system",
"value": ":art: Add selected attribute to message type\n"
},
{
"from": "human",
"value": "'use babel'\n\n/* @flow */\n\nexport type Atom$Point = [number, number]\nexport type Atom$Range = [Atom$Point, Atom$Point] |\n {start: {row: number, column: number}, end: {row: number, ... | javascript | chosen |
[
{
"from": "system",
"value": "Split logic on separate lines\n"
},
{
"from": "human",
"value": "document.body.innerHTML = document.body.innerHTML.replace(new RegExp(\"(?!.*\\\")(0[xX][0-9a-fA-F]{40})(?!\\\")(!?<\\s|\\<|$)\", \"g\"), `<a href=\"https://etherscan.io/address/$1\" class=\"ext-etherad... | javascript | chosen |
[
{
"from": "system",
"value": "Use Date.now() and add startTime\n"
},
{
"from": "human",
"value": "var os = Npm.require('os');\nvar uvmon = Npm.require('nodefly-uvmon');\n\nvar SYSTEM_METRICS_FIELDS = ['testfield'];\n\nSystemModel = function () {\n var self = this;\n this.lastGetData = new Date... | javascript | chosen |
[
{
"from": "system",
"value": "Add skip to failing test\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { expect } from 'chai';\nimport MarkupFrame from '../src';\n\nfunction mount( component ) {\n\tconst contentArea = window.document.query... | javascript | chosen |
[
{
"from": "system",
"value": "Include platform and arch in the compiler error message\n\nReviewed By: voideanvalue\n\nDifferential Revision: D36975241\n\nfbshipit-source-id: 5ac6b9e8d072f940cb6c403299f4f7b79454a009\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n/**\n * Copyright (c) Met... | javascript | chosen |
[
{
"from": "system",
"value": "Fix empty table not showing up\n"
},
{
"from": "human",
"value": "(function(angular, $, RepeaterUtilities) {\n\n 'use strict';\n\n var module = angular.module('table.empty-table', []);\n module.directive('tableEmptyMessage', function($timeout, $log) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add db entry for slotmachine\n\n"
},
{
"from": "human",
"value": "const Sequelize = require('sequelize');\n\nconst Database = require('../postgreSQL');\n\nconst database = new Database();\n\nlet Money = database.db.define('money', {\n\tuserID: Sequelize.STRING,\n\tm... | javascript | chosen |
[
{
"from": "system",
"value": "Change max teaser length to 250\n"
},
{
"from": "human",
"value": "/*\n * File to store and export reusable constant values\n */\n\n/*\n * Teaser length is constrained to 156 characters so\n * that the teaser is not cut off by search engines\n */\nexport const MAX_T... | javascript | chosen |
[
{
"from": "system",
"value": "fix(keyframe-grid): Make all keyframes visible via scroll\n"
},
{
"from": "human",
"value": "import { LitElement, html } from '@polymer/lit-element/lit-element.js'\nimport { repeat } from 'lit-html/directives/repeat.js'\nimport { shared } from '../../styles/shared.j... | javascript | chosen |
[
{
"from": "system",
"value": "Save value in storage on init\n"
},
{
"from": "human",
"value": "(function (angular) {\n 'use strict';\n\n var StoredItem = function (storage, itemName, defaultValueFactory, log) {\n\n var value = defaultValueFactory();\n\n var storedValue = storage.getItem(... | javascript | chosen |
[
{
"from": "system",
"value": "Add class when an input receives focus\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nconst FormControl = Ember.Component.extend({\n intl: Ember.inject.service(),\n\n showErrors: false,\n\n classNames: \"form-field\",\n\n classNameBindings: ['h... | javascript | chosen |
[
{
"from": "system",
"value": "test: Update tests so that it will polyfill v0 supported browsers up to v1.\n"
},
{
"from": "human",
"value": "/* eslint-env jasmine, mocha */\n\nimport helperFixture from './lib/fixture';\n\nif (!document.registerElement && !window.customElements) {\n require('ska... | javascript | chosen |
[
{
"from": "system",
"value": "Allow to specify arguments for new function"
},
{
"from": "human",
"value": "/* See license.txt for terms of usage */\n\ndefine([\n \"firebug/lib/trace\"\n],\nfunction(FBTrace) {\n\n// ******************************************************************************... | javascript | chosen |
[
{
"from": "system",
"value": "Fix new read-pkg-up major release\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 package: { version: autoserverVersion },\n} = readPk... | javascript | chosen |
[
{
"from": "system",
"value": "Add 'q' unit to length validator.\n"
},
{
"from": "human",
"value": "import isNumber from './isNumber';\n\nconst lengths = [\n 'em',\n 'ex',\n 'ch',\n 'rem',\n 'vh',\n 'vw',\n 'vmin',\n 'vmax',\n 'px',\n 'mm',\n 'cm',\n 'in',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add our own error class for invalid arguments\n"
},
{
"from": "human",
"value": "(function (GoL) {\n var CT = {\n Dead: {},\n Alive: {}\n };\n\n function cellSymbolToObject(symbol) {\n switch (symbol) {\n case '.':\n return CT.Dead;\n c... | javascript | chosen |
[
{
"from": "system",
"value": "Fix log option with ternary operator\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar batch = require('gulp-batch');\n\nmodule.exports = init;\n\nfunction init(options){\n options = defaultOptions(options);\n\n registerTask(options);\n}\n\nfunct... | javascript | chosen |
[
{
"from": "system",
"value": "Add an option to only include clones when the original node is hovered. This is useful when traversing down the graph because clones don't display children.\n"
},
{
"from": "human",
"value": "/**\n * Collect all cloned nodes, including the original node.\n *\n * @me... | javascript | chosen |
[
{
"from": "system",
"value": "Change location of test file\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar <%= safeSlugname %> = require('../lib/<%= slugname %>.js');\n\n/*\n ======== A Handy Little Nodeunit Reference ========\n https://github.com/caolan/nodeunit\n\n Test methods:\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up and better jshint support.\n"
},
{
"from": "human",
"value": "(function (window) {\n \"use strict\";\n\n var JSON_ = {};\n\n function snakeToCamelCase(key) {\n // first_name -> firstName\n return key.replace(/(_+[a-z])/g, function (s... | javascript | chosen |
[
{
"from": "system",
"value": "Remove Anchor from ckeditor tab for now\n"
},
{
"from": "human",
"value": "CKEDITOR.editorConfig = function( config )\n{\n config.toolbar_Silki =\n [ [ \"Bold\", \"Italic\" ],\n [ \"H2\", \"H3\", \"H4\", \"-\", \"Pre\" ],\n [ \"NumberedLi... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment for graphql fragment\n"
},
{
"from": "human",
"value": "/* global window */\nimport ApolloClient from 'apollo-client';\nimport { withClientState } from 'apollo-link-state';\nimport { from } from 'apollo-link';\nimport getGraphqlFragments from './getGraph... | javascript | chosen |
[
{
"from": "system",
"value": "Support the xhr abort event\n"
},
{
"from": "human",
"value": "// this xhr patch may move to {N} core some day and can be removed\nrequire(\"xhr\");\n\nvar xhrAddEventListenerOrig = XMLHttpRequest.prototype.addEventListener;\nXMLHttpRequest.prototype.addEventListene... | javascript | chosen |
[
{
"from": "system",
"value": "Remove connected prooperty from client\n"
},
{
"from": "human",
"value": "/**\n * 24.05.2017\n * TCP Chat using NodeJS\n * https://github.com/PatrikValkovic/TCPChat\n * Created by patri\n */\n'use strict'\n\nlet counter = 0\n\n/**\n * Represent connected client\n * ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix not being able to edit commandless tile\n"
},
{
"from": "human",
"value": "var parser = require('./parser');\nvar Interpreter = require('./interpreter');\n\nfunction TileAction(tile, tileX, tileY, key, data, renderer, callback) {\n this.tile = tile;\n this.key... | javascript | chosen |
[
{
"from": "system",
"value": "Add question mark to query path.\n"
},
{
"from": "human",
"value": "var assert = require('assert');\nvar fs = require('fs');\nvar should = require('should');\n\nvar ResultsPage = require('./../../lib/results-page');\nvar Plugin = require('./../../lib/plugin');\n\nva... | javascript | chosen |
[
{
"from": "system",
"value": "Use utility to detect Symbol support\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar isnan = require( './../lib' );\n\nconsole.log( isnan( NaN ) );\n// returns true\n\nconsole.log( isnan( new Number( NaN ) ) );\n// returns true\n\nconsole.log( isnan( 5 ) );\... | javascript | chosen |
[
{
"from": "system",
"value": "Add Reference list model for Disabilities.\n"
},
{
"from": "human",
"value": "var keystone = require('keystone'),\n\tTypes = keystone.Field.Types;\n\n// Create model. Additional options allow menu name to be used what auto-generating URLs\nvar Disabilities = new key... | javascript | chosen |
[
{
"from": "system",
"value": "Convert .js files with babel\n"
},
{
"from": "human",
"value": "module.exports = {\n entry: ['./app/main.jsx'],\n output: {\n path: './build',\n filename: 'bundle.js',\n pathinfo: true\n },\n module: {\n loaders: [\n {\n test: /\\.jsx$/,\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix subme/unsubme not seeing subscriptions\n"
},
{
"from": "human",
"value": "/*\n* Used to generate a list of roles that are both lower than the bot's role, and subscribed to feeds\n* Returns the feed source and the role list\n*/\n\nmodule.exports = (guild, rssList... | javascript | chosen |
[
{
"from": "system",
"value": "Fix tests for image fallbacks\n"
},
{
"from": "human",
"value": "define([\n 'client/preprocessors/visualisation_fallback'\n], function (visualisationFallback) {\n describe('Module actions', function () {\n\n var originalModernizr = visualisationFallback.Moderni... | javascript | chosen |
[
{
"from": "system",
"value": "Update for github payload structure"
},
{
"from": "human",
"value": "var express = require('express'),\n pubnub = require('pubnub');\n\npubnub = pubnub.init({\n publish_key: process.env.PUBNUB_PUBLISH_KEY || 'demo',\n subscribe_key: process.env.PUBNUB_SUBSCRIBE... | javascript | chosen |
[
{
"from": "system",
"value": "Convert module code to upper case for routing\n"
},
{
"from": "human",
"value": "define(['underscore', 'require', 'app', 'backbone.marionette'],\n function (_, require, App, Marionette) {\n 'use strict';\n\n var navigationItem = App.request('addNavigationItem... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Resolve typescript files *before* resolving javascript files.\"\n\nThis reverts commit e47cffc722c0ae405eb2c00e2109b98b191019e1.\n"
},
{
"from": "human",
"value": "module.exports = function() {\n\treturn {\n\t\tbail: true,\n\t\tmodule: {\n\t\t\tloaders: [\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add isServiceFactory flag to Adapter blueprint\n"
},
{
"from": "human",
"value": "import Adapter from '../adapters/<%= entity %>';\nimport ServiceCache from 'ember-jsonapi-resources/mixins/service-cache';\n\nexport default Adapter.extend(ServiceCache);\n"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Remove comment about arduino load order\n"
},
{
"from": "human",
"value": "var\n\tmkdirp = require('mkdirp')\n\t, loader = require('./client/module/loader')\n\t, path = require('path')\n\t, fs = require('fs')\n;\n\n/**\n * TODO: configuration profiles\n */\n\nmodule... | javascript | chosen |
[
{
"from": "system",
"value": "Fix toString implementation for ValidationError\n"
},
{
"from": "human",
"value": "export function ValidationError(message, details = {}) {\n const {\n columns = {},\n value = null\n } = details;\n\n this.message = message;\n this.columns =... | javascript | chosen |
[
{
"from": "system",
"value": "Increase timeouts for async query compilation even more.\n"
},
{
"from": "human",
"value": "import slimdom from 'slimdom';\n\nimport blueprint from 'fontoxml-blueprints/readOnlyBlueprint';\nimport createSelectorFromXPathAsync from 'fontoxml-selectors/parsing/createS... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.