conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Use new logging facilites in Lambda code updater\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nrequire('colors');\nconst AWS = require('aws-sdk');\nconst fs = require('fs');\nconst Promise = require('bluebird');\n\n//\n// Step that loops over Lambdas and up... | javascript | chosen |
[
{
"from": "system",
"value": "Allow full control of button disabled\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport {connect} from '../store';\nimport {hasFormErrors} from '../store/reducers';\n\nconst Button = ({type = 'button', text,... | javascript | chosen |
[
{
"from": "system",
"value": "Add error log to test\n"
},
{
"from": "human",
"value": "export class ValidationError extends Error {\n name = 'ValidationError'\n status = 400\n\n constructor(error) {\n super(error.message);\n this.payload = {\n ...error,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add security vars in config\n"
},
{
"from": "human",
"value": "\"use strict\";\n\n// Load environment variables from .env file\nvar dotenv = require('dotenv');\ndotenv.load();\n\nmodule.exports = {\n port: process.env.QUEUE_PORT || process.env.PORT || 3000,\n redi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix \"ReferenceError: Bob is not defined\" for correct use of module.exports"
},
{
"from": "human",
"value": "require('./bob');\n\ndescribe(\"Bob\", function() {\n var bob = new Bob();\n\n it(\"stating something\", function() {\n var result = bob.hey('Tom-ay-to... | javascript | chosen |
[
{
"from": "system",
"value": "Swap name with nama variable\n"
},
{
"from": "human",
"value": "window.onload = action\nvar action = document.pesan.action = login();\n\nfunction login() {\n\tvar nama = document.pesan.nama.value;\n\tvar name = \"Andre Christoga\";\t\n\n\tif ((nama == name)) {\n\t\t... | javascript | chosen |
[
{
"from": "system",
"value": "Change the name in the javascript plugin to the correct name from the native code\n"
},
{
"from": "human",
"value": "/*global cordova, module*/\n\nvar exec = require(\"cordova/exec\")\n\nvar JWTAuth = {\n /*\n * Returns the stored user email.\n * Can retu... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the tabindex that flickity adds so it does not tab to it, rather it will tab to natural tabbable elements inside the hero area.\n"
},
{
"from": "human",
"value": "var Flickity = require('flickity');\n\n(function(Flickity) {\n \"use strict\";\n\n if(docu... | javascript | chosen |
[
{
"from": "system",
"value": "Add (empty) gulp test target\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\n\ngulp.task('default', function() {\n // place code for your default task here\n});\n"
},
{
"from": "gpt",
"value": "var gulp = require('gulp');\n\ngulp.task('d... | javascript | chosen |
[
{
"from": "system",
"value": "Use require for this special case\n"
},
{
"from": "human",
"value": "import gutil from 'gulp-util';\nimport makeWebpackConfig from './makeConfig';\nimport webpack from 'webpack';\n\nexport default function build(callback) {\n const config = makeWebpackConfig(false)... | javascript | chosen |
[
{
"from": "system",
"value": "Complete 9.2.1 Ruby challenge and recreated Die Class\n"
},
{
"from": "human",
"value": "// psuedocode\n\n// a grocery list\n//\n\n// initial solution\n// refactor\n// reflection\n// What concepts did you solidify in working on this challenge?\n// What was the most ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix reload task starts too early\n"
},
{
"from": "human",
"value": "var gulp = require('gulp-npm-run')(require('gulp'));\nvar connect = require('gulp-connect');\nvar cors = require('cors');\nvar run = require('gulp-run');\nvar path = require('path');\n\nvar DIST_DIR... | javascript | chosen |
[
{
"from": "system",
"value": "Add `./bin` folder to `gulp lint`"
},
{
"from": "human",
"value": "var azk_gulp = require('azk-dev/gulp')({\n cwd : __dirname,\n // lint: [ \"bin/**/*.js\" ], // Extra files for the lint analyzer\n});\n\nvar gulp = azk_gulp.gulp;\n\ngulp.task('sample', 'This is a... | javascript | chosen |
[
{
"from": "system",
"value": "Fix private method registration to work\n\nThis makes <custom-a> display the correct URL for its properties\n"
},
{
"from": "human",
"value": "import * as privateMethods from './private-methods.js';\n\nconst callbacks = ['createdCallback', 'attachedCallback', 'detac... | javascript | chosen |
[
{
"from": "system",
"value": "Send a read-reciept to the API\n\nACK, ACK!\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport ENV from '../config/environment';\nimport { Bindings } from 'ember-pusher/bindings';\n\n// used by the Application controller\n\nexport default Ember.Mi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the headerFormat locale for range calendar\n\ncloses #93\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport {withImmutableProps} from '../utils';\nimport defaultSelectionRenderer from './defaultSelectionRenderer';\nimport styles from './Header... | javascript | chosen |
[
{
"from": "system",
"value": "Remove randomiter to silence jshint warnings.\n"
},
{
"from": "human",
"value": "(function (exports) {\n\n var itertools = {};\n\n itertools.ringIter = function (collection) {\n var idx = -1,\n lim = collection.length;\n\n return {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Set the first item of the select-box selected by default\n"
},
{
"from": "human",
"value": "/**\n * @see https://vuejs.org/v2/guide/components.html#Form-Input-Components-using-Custom-Events\n */\nvar typesSelectbox = {\n\n template:\n '<select v-bind:value=\"val... | javascript | chosen |
[
{
"from": "system",
"value": "Update to pass correct argument"
},
{
"from": "human",
"value": "// Download the Node helper library from twilio.com/docs/node/install\n// These identifiers are your accountSid and authToken from\n// https://www.twilio.com/console\nconst accountSid = 'ACXXXXXXXXXXXX... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing ActiveAdmin js scripts\n"
},
{
"from": "human",
"value": "//= require jquery.ui.tabs\n//= require vendor/select2\n//= require vendor/redactor\n\n$(document).ready(function(){\n if($(\"select.select2\").length) {\n $(\"select.select2\").select2();\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Ljubomir screwing up services\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n\n angular\n .module('scrum_retroboard')\n .service('userService', ['$http', 'sessionService', userService]);\n\n function userService($http, ... | javascript | chosen |
[
{
"from": "system",
"value": "Make facet selector JS slightly less horrific and error prone.\n"
},
{
"from": "human",
"value": "$(function($) {\n\n $(\".more-facets\").each(function(i, elem) {\n $(elem).modal({backdrop:true,\n shown: function(e) { alert(\"show\"); },\n ... | javascript | chosen |
[
{
"from": "system",
"value": "LayerSwitcher: Convert `open` to tracked property\n"
},
{
"from": "human",
"value": "import Component from '@ember/component';\nimport { inject as service } from '@ember/service';\n\nimport { BASE_LAYERS, OVERLAY_LAYERS } from '../services/map-settings';\n\nexport d... | javascript | chosen |
[
{
"from": "system",
"value": "Hide columns not needed in add locale view\n"
},
{
"from": "human",
"value": "$(function() {\n\n // Show only locales available for the selected project\n var projectLocales = $('#server').data('project-locales');\n $(projectLocales).each(function() {\n $('.me... | javascript | chosen |
[
{
"from": "system",
"value": "Support document object as first argument\n"
},
{
"from": "human",
"value": "export default createNodeIterator\n\n\nfunction createNodeIterator(root, whatToShow = 0xFFFFFFFF, filter = null) {\n const doc = root.ownerDocument\n const iter = doc.createNodeIterator(r... | javascript | chosen |
[
{
"from": "system",
"value": "Use .getPath() to get the relPath from either old or new files\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nimport {MultiFilePatchPropType} from '../prop-types';\nimport FilePatchController from '../controllers/file-patch-controller';\n\nexport d... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor of file writing example.\n"
},
{
"from": "human",
"value": "const fs = require('fs');\nconst logFile = fs.createWriteStream('test.log', { flags: 'a' }); // open stream for appending\n\nconst log = function(message, close) {\n logFile.write(message);\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make FixtureDataItem private in related_to_domain\n"
},
{
"from": "human",
"value": "function(doc) {\n var DOC_TYPES = { // use this object to look up case types\n 'ExceptionRecord': false,\n 'MessageLog': false,\n 'RegistrationRequest': fals... | javascript | chosen |
[
{
"from": "system",
"value": "Update Posts. Just stillplugging a little bit at a time at the posting sections\n"
},
{
"from": "human",
"value": "//Posts for Blog\nPosts = new Mongo.Collection('posts');\n\nif (Meteor.isServer) {\n Posts.allow({\n insert: function (userId, doc) {\n return... | javascript | chosen |
[
{
"from": "system",
"value": "Make test check for errorCount of 0\n"
},
{
"from": "human",
"value": "var test = require('tape')\n\ntest('load config in eslint to validate all rule syntax is correct', function (t) {\n var CLIEngine = require('eslint').CLIEngine\n\n var cli = new CLIEngine({\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Improve the readaibility and hopefully make it easier to complete the kata and learn better."
},
{
"from": "human",
"value": "// 9: object-literals - basics\n// To do: make all tests pass, leave the assert lines unchanged!\n\ndescribe('new shorthands for objects', (... | javascript | chosen |
[
{
"from": "system",
"value": "Fix remove words on mobile\n"
},
{
"from": "human",
"value": "\n'use strict';\n\nangular.module('copayApp.services').factory('confirmDialog', function($log, profileService, configService, gettextCatalog, isCordova, isChromeApp) {\n var root = {};\n\n\n var acceptM... | javascript | chosen |
[
{
"from": "system",
"value": "Add modal for adding a sim\n"
},
{
"from": "human",
"value": "import React, { useState, useEffect } from 'react';\nimport API from '../api';\nimport SimList from './SimList';\n\nconst Home = () => {\n const [simlist, setSimlist] = useState([]);\n const [notes,... | javascript | chosen |
[
{
"from": "system",
"value": "Remove save call in build storage\n"
},
{
"from": "human",
"value": "import Dispatcher from '../dispatcher';\nimport Store from './store';\nimport {BUILDS_RECEIVE} from '../constants';\nimport {sortByAttributeComparator, Storage} from '../utils';\n\nvar storage = ne... | javascript | chosen |
[
{
"from": "system",
"value": "Delete unused fields to reduce response size\n\n"
},
{
"from": "human",
"value": "import firebase from '@/config/firebase-admin';\r\nimport Tipp from '@/models/TippAdmin';\r\n\r\nconst ref = firebase.database().ref('/tipps');\r\n\r\nexport const getTipps = (req, res... | javascript | chosen |
[
{
"from": "system",
"value": "Fix exon position when positionFrom (seq) varies\n"
},
{
"from": "human",
"value": "import { connect } from 'react-redux';\nimport Nucleotide from './presenter';\n\nexport const mapStateToProps = (state, ownProps) => {\n const selection = state.selection;\n const ... | javascript | chosen |
[
{
"from": "system",
"value": "Change index-controller to use util helper classes\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst jsonFile = require('jsonfile-promised');\nconst logger = require('winston');\n\nconst points = require('../assets/json/points.json');\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix logs displaying when a restart happens\n\nWhen a user restarts a job, we should not try fetching the log again. In\norder to do this I added a guard in job-log component, which checks if\nattributes changed in didReceiveAttrs callback. If the old job value is\nthe same as t... | javascript | chosen |
[
{
"from": "system",
"value": "Make edge tests more interesting\n"
},
{
"from": "human",
"value": "/* eslint-env mocha */\n\nconst Vue = require('vue-test');\nconst progressBar = require('../src/views/progress-bar');\n\nconst ProgressBarComponent = Vue.extend(progressBar);\nconst assert = require... | javascript | chosen |
[
{
"from": "system",
"value": "Check json structure rather than extension\n"
},
{
"from": "human",
"value": "/**\n * Ensures that the label package file actually exists\n * @param {String} path - path to the json file label package\n * @return {Bool || Error} this is a try-catch where t... | javascript | chosen |
[
{
"from": "system",
"value": "Fix precompiler to work with Handlebars 2.0.0\n"
},
{
"from": "human",
"value": "var exports = this.exports || {};\n\nvar Emblem;\nvar self = this;\n\nfunction require() {\n // ember-template-compiler only requires('handlebars')\n return Handlebars;\n}\n\nvar Barb... | javascript | chosen |
[
{
"from": "system",
"value": "Call function when options is a function\n"
},
{
"from": "human",
"value": "'use strict';\n\n(function(root, factory) {\n if (typeof define === 'function' && define.amd) {\n define([\n 'marionette',\n 'underscore',\n 'boots... | javascript | chosen |
[
{
"from": "system",
"value": "Use default value instead of operator 'or'\n"
},
{
"from": "human",
"value": "'use strict'\nconst path = require('path')\nconst {spawnSync} = require('child_process')\nconst {\n env: {\n STANDARDJS_EXECUTABLE,\n STANDARDJS_ARGV,\n SKIP_CODE_STYLE_CHECKING\... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor Javascript now concepts are understood (again)\n"
},
{
"from": "human",
"value": "var columns = 3\nvar itemPadding = 10\n\nfunction numberOfColumns() {\n var buildStatusCount = $('li').size()\n return Math.min(columns, $('li').size())\n}\n\nfunction n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix hljs reference not found in browser\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst webpack = require('webpack');\n\nmodule.exports = {\n entry: {\n app: path.resolve(__dirname, 'app/Resources/assets/js/app.js')\n },\n out... | javascript | chosen |
[
{
"from": "system",
"value": "Update commands and removed comment\n"
},
{
"from": "human",
"value": "/** We know this is not how Webpack should be used, but we are slowly transferring our code.\n * For now this is how at least start to create a structure that allows us to transfer towards\n * mo... | javascript | chosen |
[
{
"from": "system",
"value": "Replace lodash with native calls, part 1\n"
},
{
"from": "human",
"value": "// Static file handler. Serves all of the files from `public/root` directory\n// under the main application root path.\n\n'use strict';\n\n\nconst path = require('path');\nconst send ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix selectedLabels selected$ merge function\n\nAs we did for localStorage, we should also consider that values can\nchange over time and so newSelected may not be part of it anymore.\n\nFallback onto props.select() method in such case − which will here deal\nwith localStorage v... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust dimensions on window resize\n"
},
{
"from": "human",
"value": "document.addEventListener('DOMContentLoaded', onDocumentReady, false);\n\nfunction onDocumentReady() {\n var aside = document.querySelector('aside');\n var section = document.querySelector('sect... | javascript | chosen |
[
{
"from": "system",
"value": "Add a link to home in the menu\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { Link } from 'react-router'\n\n//TODO config routes for GSIM and GSBPM explorers in the dedictated file\nexport default function App({ children }) {\n return (\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use swellrt credentials in e2e-test\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulpConfig = require(__dirname + '/../gulpfile').config;\n\nexports.config = {\n allScriptsTimeout: 90000,\n\n specs: [\n 'e2e/*.js'\n ],\n\n capabilities: {\n 'bro... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor the app initialization code into its own class.\n"
},
{
"from": "human",
"value": "\n( function( mdash, $ )\n{\n \n $( document ).ready( function()\n {\n var manager = new mdash.Manager(),\n fontCtrl = new mdash.FontCtrl( $( '#fo... | javascript | chosen |
[
{
"from": "system",
"value": "Use latest from master as a base."
},
{
"from": "human",
"value": "\"use strict\";\n\nvar path = require(\"path\");\nvar clc = require(\"cli-color\");\nvar _ = require(\"lodash\");\n\nmodule.exports = function (mPath, moduleIsOptional, opts) {\n var resolvedRequire... | javascript | chosen |
[
{
"from": "system",
"value": "Fix shorthand translation of \"seconds\"\n\n\"seconds\" means \"less than a minute\". In Turkish, \"sn\" is the\nabbreviation of \"saniye\", which means \"second\". So we should use\n\"dk\" which is the abbreviation for \"dakika\" (minute).\n"
},
{
"from": "human",
... | javascript | chosen |
[
{
"from": "system",
"value": "FIX - override ngModel.$isEmpty to work as in input type checkbox."
},
{
"from": "human",
"value": "/**\n * @author xialei <xialeistudio@gmail.com>\n */\nangular.module('angular-icheck', [])\n .directive('iCheck', [function () {\n return {\n res... | javascript | chosen |
[
{
"from": "system",
"value": "Resolve promise with image value in image loader\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport $ from 'jquery';\n\nexport default class ImageLoader {\n\n constructor(dataSrcAttr) {\n this.dataSrcAttr = dataSrcAttr || 'data-preload-src';\n }... | javascript | chosen |
[
{
"from": "system",
"value": "Exit with error code on failure.\n"
},
{
"from": "human",
"value": "/**\n * Module dependencies.\n */\nvar path = require('path')\n , rivet = require('..')\n\n\n/**\n * Executes `tasks` in rivet `file`.\n *\n * @param {String} file\n * @param {Array} tasks\n * @api... | javascript | chosen |
[
{
"from": "system",
"value": "Make workaround for controller-generation issue.\n\nFixes #19\n"
},
{
"from": "human",
"value": "module.exports = {\n description: 'Generates a controller of the given type.',\n\n availableOptions: [\n { name: 'type', values: ['basic', 'object', 'array'], defau... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust template js style to rest\n"
},
{
"from": "human",
"value": "/*\n * <%= props.name %>\n * <%= props.homepage %>\n *\n * Copyright (c) <%= currentYear %> <%= props.author_name %>\n * Licensed under the <%= props.license %> license.\n */\n\n(function($) {\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix ObjectURL in browsers that don't support it\n"
},
{
"from": "human",
"value": "(function() {\n\n\tvar URL = window.URL || window.webkitURL;\n\n\tcore.Module(\"lowland.bom.Binary\", {\n\t\tcreateUrl : URL.createObjectURL,\n\n\t\trevokeUrl : URL.revokeObjectURL,\n... | javascript | chosen |
[
{
"from": "system",
"value": "redux: Rearrange `createStore` call to the form found in docs.\n\nThis is a pure refactor just based on the Redux API. The return\nvalue of `applyMiddleware` is a \"store enhancer\", which the Redux\ndocs suggest passing as the third argument to `createStore`:\n https://githu... | javascript | chosen |
[
{
"from": "system",
"value": "Hide page elements for fadeIn immediately, rather than taking 400.\n\nThis looks better.\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n $('h1, p, li').hide(400, function() {\n $('h1').fadeIn(1000);\n $('p, li').fadeIn(1500);\n });\n});\n... | javascript | chosen |
[
{
"from": "system",
"value": "Hide version in footer on mobile devices\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { List } from 'semantic-ui-react'\nimport { version } from 'package.json'\n\nexport default function Footer() {\n let versionStr\n\n if (GIT_TAG && GIT_TA... | javascript | chosen |
[
{
"from": "system",
"value": "Fix class syntax for SeededRandom\n"
},
{
"from": "human",
"value": "const MAX_INT32 = 2147483647;\nconst MIN_STD = 16807;\n\n/**\n * Generate a hashed number based on input string\n * Taken from https://github.com/darkskyapp/string-hash/blob/master/index.js\n */\ne... | javascript | chosen |
[
{
"from": "system",
"value": "Set webpack public path so file URLs become absolute\n"
},
{
"from": "human",
"value": "import path from 'path'\nimport webpack from 'webpack'\nimport StaticSiteGeneratorPlugin from 'static-site-generator-webpack-plugin'\nimport ExtractTextPlugin from 'extract-text-... | javascript | chosen |
[
{
"from": "system",
"value": "Fix CSS Modules ident name for production build\n"
},
{
"from": "human",
"value": "var cssnext = require('postcss-cssnext');\nvar postcssFocus = require('postcss-focus');\nvar postcssReporter = require('postcss-reporter');\n\nmodule.exports = {\n output: {\n pub... | javascript | chosen |
[
{
"from": "system",
"value": "Rename `codePoints` into `codeUnits` as that’s more accurate\n"
},
{
"from": "human",
"value": "if (!String.fromCodePoint) {\n\tString.fromCodePoint = function() {\n\t\tvar codePoints = [];\n\t\tvar floor = Math.floor;\n\t\tvar highSurrogate;\n\t\tvar lowSurrogate;\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in JavaScript file.\n"
},
{
"from": "human",
"value": "/*\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the Lice... | javascript | chosen |
[
{
"from": "system",
"value": "Remove API client constructor from window.Ipfs\n\nContext:\nhttps://github.com/ipfs-shipyard/ipfs-companion/issues/460#issuecomment-384225346\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst Ipfs = require('ipfs')\nconst { createProxyClient } = require('ipfs... | javascript | chosen |
[
{
"from": "system",
"value": "Add validation state to story title component"
},
{
"from": "human",
"value": "import React from 'react/addons';\n\nlet AddItemStoryTitle = React.createClass({\n\n propTypes: {\n who: React.PropTypes.object.isRequired,\n what: React.PropTypes.object.isRequire... | javascript | chosen |
[
{
"from": "system",
"value": "Fix to run at command line.\n"
},
{
"from": "human",
"value": "/*\tUsed to run TF Markdown at the command line. If including in your\n\tsoftware use tfmarkdown.js in the root folder.\n*/\n\nvar tfm = require('../tfmarkdown.js');\nvar stdio = require('stdio');\nvar f... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Þingmenn menu item not getting active state\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { Link, IndexLink } from 'react-router';\nimport './styles.css'\n\nclass Nav extends React.Component {\n render() {\n return (\n <nav classN... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify with forEach instead of for..in\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar forge = require(\"node-forge\");\n\nvar APNCertificate = require(\"./APNCertificate\");\n\nfunction apnCertificateFromPem(certData) {\n\tif (!certData) {\n\t\treturn n... | javascript | chosen |
[
{
"from": "system",
"value": "Increase test timeout (was only 2,000, not 20,000)\n"
},
{
"from": "human",
"value": "/* global describe, it */\n\nimport {exec} from '../../../src/utils/util';\nimport assert from 'assert';\nrequire('chai').should();\n\ndescribe(\"Oi CLI\", () => {\n\n it(\"can be... | javascript | chosen |
[
{
"from": "system",
"value": "Convert hello world test to mocha\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar buster = require(\"buster\");\nvar assert = buster.assert;\n\nbuster.testCase(\"hello world\", {\n \"hello world test\": function () {\n assert(true);\n }\n});\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add overflow, overflowX & overflowY to the valid Box props\n"
},
{
"from": "human",
"value": "import omit from 'lodash.omit';\nimport pick from 'lodash.pick';\n\nconst boxProps = [\n 'alignContent',\n 'alignItems',\n 'alignSelf',\n 'boxSizing',\n 'children',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary comments from webpack\n"
},
{
"from": "human",
"value": "const path = require(\"path\");\n\nmodule.exports = {\n module: {\n rules: [\n {\n test: /\\.css$/,\n include: path.resolve(__dirname, \"..\"),\n use: [\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add permission for email on Facebook\n"
},
{
"from": "human",
"value": "export const github = {\n clientID: '###',\n clientSecret: '###',\n callbackURL: 'http://localhost:8000/api/session/github'\n};\n\nexport const facebook = {\n clientID: '###',\n clientSecre... | javascript | chosen |
[
{
"from": "system",
"value": "Use \"Use strict\" function mode\n"
},
{
"from": "human",
"value": "/* file_widget */\n\n$('.file-widget-container .file-preview a').click(function(e) {\n $(this).closest('.file-widget-container').removeClass('show-preview');\n e.preventDefault();\n});"
},
... | javascript | chosen |
[
{
"from": "system",
"value": "Fix naming of LayoutContainer to Layout"
},
{
"from": "human",
"value": "/**\n * Point of contact for component modules\n *\n * ie: import { CounterButton, InfoBar } from 'components';\n *\n */\nexport App from './App/App';\nexport Button from './Button/Button';\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add `async.parallel` option to run tests in parallel instead of in series\n"
},
{
"from": "human",
"value": "/*\n * grunt-casperjs\n * https://github.com/ronaldlokers/grunt-casperjs\n *\n * Copyright (c) 2013 Ronald Lokers\n * Licensed under the MIT license.\n */\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Add speech to text and send text to server\n"
},
{
"from": "human",
"value": "const sendBtn = document.getElementById(`sendBtn`)\nconst input = document.getElementById(`input`)\nconst initSpeech = document.getElementById(`initSpeech`)\n\nfunction se... | javascript | chosen |
[
{
"from": "system",
"value": "Change to undefined instead of true, since it makes no difference anyway.\n"
},
{
"from": "human",
"value": "Template.home.rendered = function() {\n // Probably erroneous way to clear the previous Famous canvas.\n // But it works.\n var mainContext = Engine.creat... | javascript | chosen |
[
{
"from": "system",
"value": "Allow user to specify docker repo\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nconst util = require('util');\nconst packageVersion = require('./package.json').version\nconst exec = util.promisify(require('child_process').exec)\n\n;(async () => {\n cons... | javascript | chosen |
[
{
"from": "system",
"value": "Return unmodified input if it is undefined\n\nWhen input is an undefined value, filter returns a string 'undefined' instead of nothing. This check fixes that issue."
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('nl2br-filter', [])\n.filter('nl2br'... | javascript | chosen |
[
{
"from": "system",
"value": "Set the process title to \"obvious\"\n"
},
{
"from": "human",
"value": "process.title = 'ATTENTION';\n\nconst PERIOD = 500;\n\nvar term = require('term');\n\nvar repeatString = function (string, count) {\n\treturn new Array(count + 1).join(string);\n};\n\nvar drawSc... | javascript | chosen |
[
{
"from": "system",
"value": "Use file and outfile from options"
},
{
"from": "human",
"value": "'use strict';\n\nconst tools = require('./tools');\nconst ApplesignSession = require('./session');\n\nmodule.exports = class Applesign {\n constructor (options) {\n this.config = this.withConfig(... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure we match the original API for reporter use\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar fs = require('fs'),\n jshintPlugin = require('gulp-jshint'),\n cache = require('gulp-cache');\n\nvar jshintVersion = '0.2.4';\n\nvar task = {\n // A... | javascript | chosen |
[
{
"from": "system",
"value": "Fix fatal error on node require.\n\nBefore:\n\n$ node\n> var isOperaMini = require('is-opera-mini');\nReferenceError: window is not defined\n at Object.<anonymous> ([...]/node_modules/is-opera-mini/index.js:2:18)\n at Module._compile (module.js:435:26)\n at Object.Modu... | javascript | chosen |
[
{
"from": "system",
"value": "Allow hook to work without disrupting `sails lift`\n\nThe hook works great on environments that use `node app.js` to start the application, but causes breaking errors when using `sails lift`. I'm seeing this when developing locally vs on production.\r\n\r\nAdding this simple ch... | javascript | chosen |
[
{
"from": "system",
"value": "Make server listen on port 80\n"
},
{
"from": "human",
"value": "require('app-module-path').addPath(__dirname);\n\nvar express = require('express');\nvar passport = require('passport');\nvar session = require('express-session');\n\nvar app = express();\n\nvar invent... | javascript | chosen |
[
{
"from": "system",
"value": "Fix coding standard errors introduced in b18d30c\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst express = require('express')\nconst bodyParser = require('body-parser')\nconst deviceService = require('./src/devices')\n\nconst PORT = process.env.PORT || 8080... | javascript | chosen |
[
{
"from": "system",
"value": "GEN-167: Include 'git describe' output in header table\n"
},
{
"from": "human",
"value": "/*\n * Created brightSPARK Labs\n * www.brightsparklabs.com\n */\n\n'use strict';\n\n// -----------------------------------------------------------------------------\n// MODULE... | javascript | chosen |
[
{
"from": "system",
"value": "Access source and destination parameters in middleware\n"
},
{
"from": "human",
"value": "module.exports = function(kibana) {\n return new kibana.Plugin({\n\n // Export the front-end visualization definition.\n uiExports: {\n visTypes: [\n \"plugi... | javascript | chosen |
[
{
"from": "system",
"value": "Include vendorTree if not undefined.\n"
},
{
"from": "human",
"value": "/* eslint-env node */\n'use strict';\n\nvar path = require('path');\nvar Funnel = require('broccoli-funnel');\n\nmodule.exports = {\n name: 'ember-print-this',\n\n included(app) {\n this._s... | javascript | chosen |
[
{
"from": "system",
"value": "Add description for redis in 'heroku help'\n"
},
{
"from": "human",
"value": "exports.commands = [\n require('./lib/commands/redis/cli'),\n require('./lib/commands/redis/info'),\n require('./lib/commands/redis/wait'),\n require('./lib/commands/redis/credentials'... | javascript | chosen |
[
{
"from": "system",
"value": "Add event trigger when legend changes.\n"
},
{
"from": "human",
"value": "var OpenLayersPlusLegend = function(opts) {\n if (opts == null) {\n return;\n }\n var self = this;\n this.map = $(opts).data('map');\n\n this.setLegend = function(layer) ... | javascript | chosen |
[
{
"from": "system",
"value": "Convert incoming \\c1,1 and \\c01,01 to spoiler\n"
},
{
"from": "human",
"value": "Filters.filter(\"color\", [function ()\n{\n return function (input)\n {\n if (input)\n {\n var line = input.replace(/\\\\c/gi, \"\\u0003\");\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove options argument to setupFreedom.\n"
},
{
"from": "human",
"value": "Components.utils.import(\"resource://gre/modules/devtools/Console.jsm\");\nComponents.utils.import(\"resource://gre/modules/Timer.jsm\");\n// This module does not support all of es6 promise ... | javascript | chosen |
[
{
"from": "system",
"value": "Use all forms of shadow root creation. Fallback to the element being it's own shadowRoot.\n"
},
{
"from": "human",
"value": "import { IncrementalDOM } from '../api/vdom';\n\nconst { patch } = IncrementalDOM;\nconst symbolShadowRoot = '____shadow_root';\n\nexport def... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.