conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Include comments for each line of code\n"
},
{
"from": "human",
"value": "// DOM Manipulation Challenge\n\n\n// I worked on this challenge [by myself, with: ].\n\n\n// Add your JavaScript calls to this page:\n\n// Release 1:\n\ndocument.getElementById('release-0').c... | javascript | chosen |
[
{
"from": "system",
"value": "Fix and streamline TopoJSON loading.\n"
},
{
"from": "human",
"value": "import json from './json';\nimport {feature, mesh} from 'topojson-client';\nimport {error} from 'vega-util';\n\nexport default function(data, format) {\n var object, property;\n data = json(da... | javascript | chosen |
[
{
"from": "system",
"value": "Allow React HTML to be set\n"
},
{
"from": "human",
"value": "module.exports = {\n \"extends\": \"justinlocsei/configurations/es6\",\n \"ecmaFeatures\": {\n \"jsx\": true\n },\n \"env\": {\n \"browser\": true\n },\n \"plugins\": [\n \"react\"\n ],\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add model types to DataStore after instantiation\n"
},
{
"from": "human",
"value": "import DataStore from 'client/utils/data-store';\n\nexport default {\n name: 'datastore',\n\n initialize: function (container, application) {\n application.register('store... | javascript | chosen |
[
{
"from": "system",
"value": "Remove duplicated record plain get\n"
},
{
"from": "human",
"value": "const jwt = require('jsonwebtoken')\nconst config = require('config')\nconst bcrypt = require('bcrypt')\nconst _ = require('lodash')\nconst User = require('./../models/user')\n... | javascript | chosen |
[
{
"from": "system",
"value": "Implement getUserRecipes on api/v1/users/myRecipes route\n"
},
{
"from": "human",
"value": "import express from 'express';\n\nimport * as userController from '../../controllers/users';\n\nconst user = express.Router();\n\n// define route controllers for creating sig... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for ruby sass\n\nShould have been added in this commit but wasn't:\n\nhttps://github.com/tombye/express_prototype/commit/f6f2338bda9ff55c6ca4e9b19edeb1af5d54899f\n"
},
{
"from": "human",
"value": "var fs = require('fs'),\n pidFile = __dirname + '/.sta... | javascript | chosen |
[
{
"from": "system",
"value": "Fix require das dependências externas (gulp)\n"
},
{
"from": "human",
"value": "\nvar _ = require('lodash');\nvar chalk = require('chalk');\n\nmodule.exports = function(options){\n\n var defaultOptions = require('./defaults.js')();\n options = _.def... | javascript | chosen |
[
{
"from": "system",
"value": "Allow cursor to be executed directly\n"
},
{
"from": "human",
"value": "module.exports = function(schema, options) {\n options || (options = {});\n options.path || (options.path = '_acl');\n\n // Fields\n\n var fields = {};\n\n if (!schema.paths[optio... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to helpers.assertFile - assertFiles is deprecated\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar path = require('path');\nvar helpers = require('yeoman-generator').test;\n\ndescribe('basic project generator', function () {\n beforeEach(function (don... | javascript | chosen |
[
{
"from": "system",
"value": "Use https now that we have certificates fixed\n"
},
{
"from": "human",
"value": "import { PureComponent } from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\n\nimport actions from './geolocation-provider-actions';\nimport redu... | javascript | chosen |
[
{
"from": "system",
"value": "Reset media type as well\n"
},
{
"from": "human",
"value": "import settings from '../../settings';\n\n\nexport class SearchController {\n constructor($log, $state, SessionService) {\n 'ngInject';\n\n this.queryParams = SessionService.queryParams;\n this.se... | javascript | chosen |
[
{
"from": "system",
"value": "Use .size() instead of .length\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport { module, test } from 'qunit';\nimport startApp from 'bus-detective/tests/helpers/start-app';\n\nvar application;\n\nmodule('Acceptance | Searching for stops', {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix variable name (clashes with process)\n"
},
{
"from": "human",
"value": "var exec = require('child_process').exec;\n\n\nvar Tunnel = function Tunnel (key, port, callback, err) {\n var tunnelCommand = 'java -jar ~/.browserstack/BrowserStackTunnel.jar ';\n tunnel... | javascript | chosen |
[
{
"from": "system",
"value": "[CHORE] Set domain to example.com by default.\n"
},
{
"from": "human",
"value": "var nconf = require('nconf');\n\nnconf\n .file({ file: './config/config.json' })\n .env();\n\nnconf.defaults({\n 'RIPPLE_REST_API': 'http://localhost:5990',\n 'DATABASE_URL': 'postg... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in Danish locale file\n\nThe correct spelling is two words: https://ordnet.dk/ddo/ordbog?query=i%20dag"
},
{
"from": "human",
"value": "\nexport default {\n code: \"da\",\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4 // The w... | javascript | chosen |
[
{
"from": "system",
"value": "Use percent for the y-axis binding\n"
},
{
"from": "human",
"value": "import { computed } from '@ember/object';\nimport moment from 'moment';\nimport d3TimeFormat from 'd3-time-format';\nimport d3Format from 'd3-format';\nimport d3Scale from 'd3-scale';\nimport d3Ar... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary encoded spaces '%20'\n"
},
{
"from": "human",
"value": "Boom();\n\nfunction Boom() {\n var requestedBookmarklet = window.prompt('Boom:%20Which%20One');\n var boomMarklets = {\n plex: 'javascript:%20var%20s=document.createElement(%22sc... | javascript | chosen |
[
{
"from": "system",
"value": "Fix map undefined issue in welcome dialogue\n"
},
{
"from": "human",
"value": "angular.module('beam.controllers')\n .controller('beamSettingsController', function($scope, configService) {\n\n this.save = function() {\n configService.set('host', $scope.setti... | javascript | chosen |
[
{
"from": "system",
"value": "Hide click to play message if video is already playing\n"
},
{
"from": "human",
"value": "/* global AFRAME */\nAFRAME.registerComponent('hide-on-play', {\n schema: {type: 'selector'},\n init: function () {\n this.onPlaying = this.onPlaying.bind(this);\n this... | javascript | chosen |
[
{
"from": "system",
"value": "Allow for routes that don't have a component\n"
},
{
"from": "human",
"value": "import _ from 'lodash';\n\nimport executeMultiple from 'fluxible-action-utils/async/executeMultiple';\n\nexport default function fetchRouteData(context, routerState) {\n const actions... | javascript | chosen |
[
{
"from": "system",
"value": "Fix when using a <script> tag\n"
},
{
"from": "human",
"value": ";(function (f) {\n // module name and requires\n var name = '';\n var requires = [];\n\n // CommonJS\n if (typeof exports === \"object\" && typeof module !== \"undefined\") {\n module.exports =... | javascript | chosen |
[
{
"from": "system",
"value": "Extend a request body parsing\n"
},
{
"from": "human",
"value": "import mongoose from 'mongoose'\nimport {logger, http_logger} from './utils/logger'\nimport express from 'express'\nimport cookie_parser from 'cookie-parser'\nimport body_parser from 'body-parser'\nimp... | javascript | chosen |
[
{
"from": "system",
"value": "Fix module capitalization for Linux\n\nResolve the error Module not found: Error: Can't resolve 'components/Utils/Loader/Loader' in a Docker container"
},
{
"from": "human",
"value": "import Vue from 'vue';\nimport VueRouter from 'vue-router';\n\nimport { LoadingSta... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude babel from `.js` in module as well\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar webpack = require('webpack');\n\nmodule.exports = {\n entry: ['./docs/index.js'],\n output: {\n path: path.join(__dirname, 'build'),\n filename: 'b... | javascript | chosen |
[
{
"from": "system",
"value": "Add Javascript connections to Java class\n"
},
{
"from": "human",
"value": "var parsePushPlugin = {\n\tinitialize: function(appId, clientKey, success, failure) {\n\t\tcordova.exec(\n\t\t\tsuccess,\n\t\t\tfailure,\n\t\t\t'ParsePushPlugin',\n\t\t\t'initialize',\n\t\t\... | javascript | chosen |
[
{
"from": "system",
"value": "Return the result of defineProperty\n\n"
},
{
"from": "human",
"value": "const FIRST_ROW = 0;\nconst FIRST_COL = 0;\n\nconst CHAR_CODE_OFFSET = 65;\nconst LABEL_OFFSET = 1;\n\nconst calculateLabel = function calculateLabel(row, col) {\n const rowLabel = String.from... | javascript | chosen |
[
{
"from": "system",
"value": "Write to stdout when the http server is listening\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar argv = require('minimist')(process.argv.slice(2))\n\nif (argv.help) {\n return console.log([\n '',\n 'Usage: kinesalite [--port <port>] [--path <pa... | javascript | chosen |
[
{
"from": "system",
"value": "Remove notices on window.* functions\n"
},
{
"from": "human",
"value": "/**\n * Meters number of invocations of window.alert, window.confirm, and\n * window.prompt.\n */\n\nexports.version = '0.1';\n\nexports.module = function(phantomas) {\n\tvar alerts = [],\n\t\tc... | javascript | chosen |
[
{
"from": "system",
"value": "Move all input filtering to emit episodes for now\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar path = require('path');\nvar async = require('async');\nvar _ = require('lodash');\nvar parse = require('../lib/torrent-parser');\nvar glob = require('../plugin... | javascript | chosen |
[
{
"from": "system",
"value": "Rewrite test cases to chai\n"
},
{
"from": "human",
"value": "// component test\nimport jsdom from \"mocha-jsdom\";\nimport assert from \"assert\";\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport ReactTestUtils from \"react-addons-test-uti... | javascript | chosen |
[
{
"from": "system",
"value": "Improve tab navigation with history push\n"
},
{
"from": "human",
"value": "agneta.directive('AgTabs',function($routeParams,$location, $timeout){\n var vm = this;\n\n vm.select = function(name) {\n vm.activeSection = name;\n var query = $location.search();\n... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude dev-server file from coverage\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n devtool: 'inline-source-map',\n module: {\n rules: [{\n test: /\\.js$/,\n loader: 'babel-loader',\n exclude: /node_modules/\n }, {\n... | javascript | chosen |
[
{
"from": "system",
"value": "feat: Modify the mobile judgment standard\n"
},
{
"from": "human",
"value": "const UA = window.navigator.userAgent;\n\nexport const isiOS = /iPhone/i.test(UA);\n\nexport const isAndroid = /android/i.test(UA);\n\nexport const isMobile = isiOS || isAndroid;\n"
},
... | javascript | chosen |
[
{
"from": "system",
"value": "Fix blur issue with auth form validation\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\nimport styles from './AuthPage.css';\n\nfunction AuthInputField(props) {\n const {\n input, type, placeholder, className, meta,\n } = props;\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use calcLineNo() for getLineExcerpt() to handle undefined offset\n"
},
{
"from": "human",
"value": "/**\n * copyObject(object, [recurse]) -- for all JS Objects\n *\n * Copies all properties and the prototype to a new object\n * Optionally set recurse to array contai... | javascript | chosen |
[
{
"from": "system",
"value": "Enable exportNamespaceFrom plugin for Babylon parser.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst babylon = require(\"babylon\");\n\nexports.options = {\n allowImportExportEverywhere: true,\n allowReturnOutsideFunction: true,\n plugins: [\n \"*... | javascript | chosen |
[
{
"from": "system",
"value": "Rename source to data for\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar RSVP = require('rsvp');\nvar fork = require('child_process').fork;\n\nmodule.exports = function (language, source) {\n return new RSVP.Promise(function (resolve) {\n var child = fo... | javascript | chosen |
[
{
"from": "system",
"value": "Split URL and File comment attachment endpoints.\n"
},
{
"from": "human",
"value": "var utils = require('../utils/httpUtils.js');\nvar _ = require('underscore');\nvar constants = require('../utils/constants.js');\n\nexports.create = function(options) {\n var option... | javascript | chosen |
[
{
"from": "system",
"value": "Fix articles schema {uri} -> {source: uri}\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport Question from './question'\nimport Article from './article'\nimport fetch from 'isomorphic-fetch'\n\nclass ArticleList extends React.Component {\n constr... | javascript | chosen |
[
{
"from": "system",
"value": "Send message on success and set error message from config.\n"
},
{
"from": "human",
"value": "var config = require('./config');\n\nvar nodemailer = require('nodemailer');\n\nmodule.exports = function (req, res, next) {\n\tvar smtpTransport = nodemailer.createTranspo... | javascript | chosen |
[
{
"from": "system",
"value": "FIX on post words to InflectAPI.\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * @ngdoc service\n * @name wavesApp.InflectionsAPIService\n * @description\n * # InflectionsAPIService\n * Service in the wavesApp.\n */\nangular.module('wavesApp')\n .servic... | javascript | chosen |
[
{
"from": "system",
"value": "Check for exsiatnce of slideshow before inits\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = LessonHeader;\n\nimport Flickity from 'flickity-imagesloaded'\n\nfunction LessonHeader() {\n\n\tconsole.log(\"-- LessonHeader initialized\")\n\n\tlet p... | javascript | chosen |
[
{
"from": "system",
"value": "Add payment info to db representation of HIT\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose');\n\nvar hitSchema = mongoose.Schema({\n name: String,\n condition: { \n // i.e. basic, training, fast\n firstTask: String,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix extra space on 'Bienvenue !'\n"
},
{
"from": "human",
"value": "// Is device mobile?\nif (window.innerWidth >= 850) {\n // Give video its source, will initiate load. Otherwise, it won't load anything and will be hidden by CSS.\n // This is so the video doe... | javascript | chosen |
[
{
"from": "system",
"value": "Add Userscript variable to ESLint settings\n"
},
{
"from": "human",
"value": "module.exports = {\n \"env\": {\n \"browser\": true,\n \"es2021\": true\n },\n \"globals\": {\n \"module\": \"readonly\",\n \"Game\": \"writable\",\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for adding the second image\n"
},
{
"from": "human",
"value": "var fixture;\n\ndescribe(\"MoveImages\", function() {\n\n it('should have a fixture', function() {\n loadFixtures('oneImage.html');\n fixture = $('#test');\n fixture.moveImages(\"what... | javascript | chosen |
[
{
"from": "system",
"value": "Handle the new signature of will-navigate\n"
},
{
"from": "human",
"value": "import { remote } from 'electron';\n\nconst webview = document.querySelector('webview');\n\nif (webview) {\n let once = true;\n webview.addEventListener('did-start-loading', () => {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add example to start using commander.js\n"
},
{
"from": "human",
"value": "/*jshint forin:true, noarg:true, noempty:true, eqeqeq:true, bitwise:true,\nstrict:true, undef:true, unused:true, curly:true, browser:false, indent:4,\nmaxerr:50 */\n\n/*global require, consol... | javascript | chosen |
[
{
"from": "system",
"value": "Make main template really configurable again\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nangular.module(\n 'arethusa', [\n 'mm.foundation',\n 'ngRoute',\n 'arethusa.core',\n 'arethusa.morph',\n 'arethusa.hist'\n ],\n function($routeProvid... | javascript | chosen |
[
{
"from": "system",
"value": "[form-builder] Fix broken references wrt previews\n"
},
{
"from": "human",
"value": "import {ReferenceInput} from '../../index'\n\nimport {materializeReferences, referenceSearch, fetch} from '../data/fetch'\nimport {once} from 'lodash'\nimport {materializeForPreview... | javascript | chosen |
[
{
"from": "system",
"value": "Add function to make array a heap tree\n"
},
{
"from": "human",
"value": "// Sort array using heap sort\n\n// main heap sort function\nfunction heapSort(arr) {\n\tvar len = arr.length,\n\t\tend = len - 1;\n\n\theapify(arr, len);\n\n\twhile (end > 0) {\n\t\tswap(arr,... | javascript | chosen |
[
{
"from": "system",
"value": "Remove references to mongoDB as we pivot to mySQL\n"
},
{
"from": "human",
"value": "\nvar express = require('express');\nvar mongoose = require('mongoose');\n\nvar app = express();\n\n// mongoose.connect('mongodb://localhost/sentimental01'); // connect to mongo dat... | javascript | chosen |
[
{
"from": "system",
"value": "Disable react-in-jsx-scope ESLint rule because of Flareact\n"
},
{
"from": "human",
"value": "module.exports = {\n extends: ['airbnb', 'plugin:prettier/recommended', 'prettier/react'],\n env: {\n browser: true,\n commonjs: true,\n es6: true,\n jest: tr... | javascript | chosen |
[
{
"from": "system",
"value": "Add react settings for eslint\n"
},
{
"from": "human",
"value": "module.exports = {\n \"env\": {\n \"browser\": true,\n \"commonjs\": true,\n \"es6\": true\n },\n \"extends\": \"eslint:recommended\",\n \"parserOptions\": {\n \... | javascript | chosen |
[
{
"from": "system",
"value": "Update eslint config for switch case construct\n"
},
{
"from": "human",
"value": "module.exports = {\n \"env\": {\n \"browser\": true,\n \"es6\": true,\n \"node\": true\n },\n \"extends\": \"eslint:recommended\",\n \"parserOptions\":... | javascript | chosen |
[
{
"from": "system",
"value": "CSRA-000: Add addtional app insights login\n"
},
{
"from": "human",
"value": "import superagent from 'superagent';\n\nimport buildAssessmentRequest from './buildAssessmentRequest';\n\nconst postAssessmentToBackend = (assessmentType, {\n nomisId,\n outcome,\n vipe... | javascript | chosen |
[
{
"from": "system",
"value": "Update convention and add variables to core-cron task.\n\nSigned-off-by: Karl Hepworth <c14c6f041bb80410635ef9142e07c8627a565b5a@gmail.com>\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { Mutation } from 'react-apollo';\nimport gql from 'grap... | javascript | chosen |
[
{
"from": "system",
"value": "Update grunt file to run coverage reports\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jshint: {\n allFiles: ['Gruntfile.js', '... | javascript | chosen |
[
{
"from": "system",
"value": "Fix alias usage for new grunt-browserify.\n"
},
{
"from": "human",
"value": "module.exports = function (grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON(\"package.json\"),\n browserify: {\n cgds: {\n src: \"lib/<%... | javascript | chosen |
[
{
"from": "system",
"value": "Add heroku task in Grunt\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n grunt.initConfig({\n bower: {\n install: {\n options: {\n copy: false\n }\n }\n },\n\n sass: {\n dist: {\n options... | javascript | chosen |
[
{
"from": "system",
"value": "Add watch option and make it default\n"
},
{
"from": "human",
"value": "var james = require('james');\nvar cssmin = require('james-cssmin');\nvar uglify = require('james-uglify');\n\n\nvar inputRoot = 'dev/';\nvar outputRoot = 'public/';\n\njames.task('minify_css', ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow devDeps in eslint rules\n"
},
{
"from": "human",
"value": "module.exports = {\n rules: {\n camelcase: 'off',\n 'no-bitwise': 'off',\n 'no-plusplus': 'off',\n 'no-restricted-syntax': 'off',\n 'no-underscore-dangle': 'off',\n 'import/extension... | javascript | chosen |
[
{
"from": "system",
"value": "Fix public URL of static assets\n"
},
{
"from": "human",
"value": "var path = require(\"path\");\nvar webpack = require('webpack');\nvar BundleTracker = require('webpack-bundle-tracker');\n\nvar context = path.resolve('pyconcz_2016', 'static');\n\nmodule.exports = {... | javascript | chosen |
[
{
"from": "system",
"value": "Fix broken webpack ES3 support\n\nWebPack now has the screw_ie8 default. This isn't acceptable for a module\nthat is to be used as a general basis for other software. Also, Redux, which\nthis module is designed to extend, does support IE8 as well.\n"
},
{
"from": "human... | javascript | chosen |
[
{
"from": "system",
"value": "Change webpack output from dist to static\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar webpack = require('webpack');\n\nmodule.exports = {\n devtool: 'eval-source-map',\n resolve: {\n modulesDirectories: ['node_modules', 'src']\n },\n e... | javascript | chosen |
[
{
"from": "system",
"value": "iOS: Fix crash on following a link with non-ASCII characters.\n\nThe `SafariView` library apparently crashes when passed a `url`\nparameter that isn't all ASCII. Strictly such a thing isn't\na URL (or URI), in fact, but rather an \"IRI\":\n https://en.wikipedia.org/wiki/Inter... | javascript | chosen |
[
{
"from": "system",
"value": "Rename to invalidate possible grunt caches\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n\n require('wf-js-grunt').init(grunt, {\n options: {\n requireConfig: {\n paths: {\n modernizr: '... | javascript | chosen |
[
{
"from": "system",
"value": "Resolve spacing inconsistency (no space before function parameters)\n"
},
{
"from": "human",
"value": ";(function(global, factory) {\n // Use UMD pattern to expose exported functions\n if (typeof exports === 'object') {\n // Expose to Node.js\n module.export... | javascript | chosen |
[
{
"from": "system",
"value": "Fix stretched button in sessions view.\n"
},
{
"from": "human",
"value": "// @flow\nimport React from 'react'\nimport Button from '../Button'\n\ntype Props = {\n createSession: Function\n}\n\nconst CreateButton = Button.extend`align-self: flex-start;`\n\nconst Crea... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary byline in sidebar"
},
{
"from": "human",
"value": "import React from \"react\";\nimport { connect } from \"react-redux\";\nimport { withTranslation } from \"react-i18next\";\n\nimport Toggle from \"./toggle\";\nimport { controlsWidth } from \"../.... | javascript | chosen |
[
{
"from": "system",
"value": "Add a test so that other regions are fine with DynamoDB using the STS service\n"
},
{
"from": "human",
"value": "var fmt = require('fmt');\nvar awssum = require('awssum');\nvar amazon = awssum.load('amazon/amazon');\nvar DynamoDB = awssum.load('amazon/dynamodb').Dyn... | javascript | chosen |
[
{
"from": "system",
"value": "ENH: Add validation method for analysis model\n"
},
{
"from": "human",
"value": "ct.models.Analysis = Backbone.Model.extend({\n id: null,\n name: null,\n loadDataArgs: null\n});\n"
},
{
"from": "gpt",
"value": "ct.models.Analysis = Backbone.Mode... | javascript | chosen |
[
{
"from": "system",
"value": "Remove captured output last line from the API\n\nno longer needed\n"
},
{
"from": "human",
"value": "{\n \"draw\": {{draw}},\n \"recordsTotal\": {{recordsTotal}},\n \"recordsFiltered\": {{recordsFiltered}},\n \"data\": [\n {% autoescape false %}\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Move highstock exporting before export-csv plugin\n"
},
{
"from": "human",
"value": "module.exports = {\n all: {\n options: {\n format: 'json_flat',\n pretty: true\n },\n files: [{ \n dest: 'dist/javascript.js... | javascript | chosen |
[
{
"from": "system",
"value": "Support ESLint 3 rule format\n"
},
{
"from": "human",
"value": "module.exports = function(context) {\n var regex = /^(describe|it)$/;\n\n return {\n Identifier: function(node) {\n if (node.name === 'only' && regex.test(node.parent.object.name)) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Rectify issue with homepage in deployment\n"
},
{
"from": "human",
"value": "import path from 'path';\nimport express from 'express';\nimport logger from 'morgan';\nimport bodyParser from 'body-parser';\n\n\nrequire('dotenv').config();\n\nconst app = express();\ncon... | javascript | chosen |
[
{
"from": "system",
"value": "Test only \"yo element:app\" for now\n"
},
{
"from": "human",
"value": "/*global describe, beforeEach, it */\n'use strict';\nvar path = require('path');\nvar helpers = require('yeoman-generator').test;\n\ndescribe('element generator', function () {\n beforeEach(f... | javascript | chosen |
[
{
"from": "system",
"value": "Update MaterialCheckbox unit test with chai-jquery\n"
},
{
"from": "human",
"value": "\n describe('checkbox tests', function () {\n\n it('Should have MaterialCheckbox globally available', function () {\n expect(MaterialCheckbox).to.be.a('function');\n })... | javascript | chosen |
[
{
"from": "system",
"value": "Add updated/created and renamed editionset\n"
},
{
"from": "human",
"value": "import { GraphQLID, GraphQLInt, GraphQLObjectType } from \"graphql\"\nimport { connectionDefinitions } from \"graphql-relay\"\nimport Artwork from \"schema/artwork\"\nimport EditionSet fro... | javascript | chosen |
[
{
"from": "system",
"value": "Fix to schema to remove id. Use mongodb's built in _id.\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose');\n\nvar Schema = mongoose.Schema, \n ObjectId = Schema.ObjectId;\n\nvar Question = new Schema({\n id : {type : Number, require : true,... | javascript | chosen |
[
{
"from": "system",
"value": "Include example func in controller\n\nThe example function save_portfolio will demonstrate how to save portfolio information"
},
{
"from": "human",
"value": "'use strict';\r\n\r\n\r\nvar mongoose = require('mongoose'),\r\n request = require('request');\r\n\r\nexpor... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for querying for player by username\n"
},
{
"from": "human",
"value": "import isString from 'lodash/isString';\n\nconst ENDPOINT_PREFIX = 'players';\n\nexport default (http, options, parser) => {\n async function getByName(playerName) {\n console.log('Heads ... | javascript | chosen |
[
{
"from": "system",
"value": "Move the APP_VERSION into app instead of config.\n\nIt felt kinda silly to have to remember to update a config var before pushing up a deploy. This allows us to just modify it in the js and have it purge from one spot. Also allows us the ability to have more logic around what g... | javascript | chosen |
[
{
"from": "system",
"value": "Change the firebase hosting url to use quill-writer\n"
},
{
"from": "human",
"value": "angular.module(\"sf.constants\", [])\n\n .constant(\"appName\", \"Quill Writer\")\n .constant(\"tagLine\", \"Learn by Writing Together\")\n .constant(\"baseFbUrl\", \"https://s... | javascript | chosen |
[
{
"from": "system",
"value": "Implement a better requestAnimationFrame polyfill\n"
},
{
"from": "human",
"value": "// jsdom doesn't have support for requestAnimationFrame so we just make it work.\nglobal.requestAnimationFrame = function (func) {\n var args = Array.prototype.slice.call(arguments... | javascript | chosen |
[
{
"from": "system",
"value": "Update to reflect new MVI structure\n"
},
{
"from": "human",
"value": "import countdownTimer from './countdown_timer/main'\nimport firebaseLogin from './firebase_login/main'\nimport view from './view'\nimport {Observable} from 'rx'\n\nexport default function main ({... | javascript | chosen |
[
{
"from": "system",
"value": "Remove console.log call for debugging\n"
},
{
"from": "human",
"value": "'use strict'\nconst mongoose = require('mongoose')\nconst api = require('./api')\nconst trends = require('./twitter/trends')\nconst config = require('./config')\nconst mainUtils = require('./ut... | javascript | chosen |
[
{
"from": "system",
"value": "Add day of the month\n"
},
{
"from": "human",
"value": "// @flow\n\n/**\n * We want to represent each subs. type as minimally as possible,\n * so instead of using strings we just use characters, which lets us\n * represent 27 individual subs. using a single characte... | javascript | chosen |
[
{
"from": "system",
"value": "Add Documentation for the Response's 'encode(...)'/'decode(...)' Functions\n\nAdd in-code documentation for the response's 'encode(...)' and 'decode(...)' functions.\n"
},
{
"from": "human",
"value": "/**\n * @flow\n */\n\n\ntype ResData = Object; //TODO\n\n/**\n * ... | javascript | chosen |
[
{
"from": "system",
"value": "Correct URL for settings page\n"
},
{
"from": "human",
"value": "(function(Pebble, window) {\n var settings = {};\n\n Pebble.addEventListener(\"ready\", function(e) {\n settings = window.localStorage.getItem(\"settings\");\n if(settings !== '') {\n var ... | javascript | chosen |
[
{
"from": "system",
"value": "Use reduce instead of forEach.\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function ($fs, matchers) {\n matchers = matchers.map(function (matcher) {\n return matcher($fs);\n });\n\n return function (file, code) {\n var matches = [];... | javascript | chosen |
[
{
"from": "system",
"value": "Use integer for cache key"
},
{
"from": "human",
"value": "import LRU from 'lru-cache'\nimport path from 'path'\nimport fs from 'fs-plus'\nimport _ from 'underscore'\n\nexport default class ReadCache {\n constructor (folder, cacheSize) {\n this.path = path.join(... | javascript | chosen |
[
{
"from": "system",
"value": "Set popup height equal to window height\n"
},
{
"from": "human",
"value": "$(document).ready(function(){\n $('.popup__toggle').on('click', popup);\n function popup() {\n $('#popup').toggleClass(\"open\");\n }\n function fileHandler(event){\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove quotes to be consistent\n"
},
{
"from": "human",
"value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts,... | javascript | chosen |
[
{
"from": "system",
"value": "Switch from jquery_ujs to rails-ujs\n\nrails-ujs is a port of jquery_ujs without jQuery that is distributed as\npart of the Rails ActionView gem.\n\nIt provides the same functionality but without the jQuery dependency.\n"
},
{
"from": "human",
"value": "// This file... | javascript | chosen |
[
{
"from": "system",
"value": "Patch when no data received.\n\nIf there was not a response from the Mojang servers then an error would occur:\r\n\r\n```\r\nSyntaxError: Unexpected end of input\r\n at Object.parse (native)\r\n at IncomingMessage.<anonymous> (/home/player-info/node_modules/mojang/lib/_re... | javascript | chosen |
[
{
"from": "system",
"value": "Check if function type as well\n"
},
{
"from": "human",
"value": "import { applyMiddleware } from 'redux';\nimport { useRoutes } from 'react-router';\nimport historyMiddleware from './historyMiddleware';\nimport { ROUTER_STATE_SELECTOR } from './constants';\n\nexpor... | javascript | chosen |
[
{
"from": "system",
"value": "Add alternative callback that would call with the execution\n"
},
{
"from": "human",
"value": "\nvar createClient = require('./swf').createClient,\n WorkflowExecution = require('./workflow-execution').WorkflowExecution;\n\n/**\n * Represents an Amazon WebService ... | javascript | chosen |
[
{
"from": "system",
"value": "Convert Non-strict to strict equality checking\nConvert non-strict equality checking, using `==`, to the strict version, using `===`."
},
{
"from": "human",
"value": "module.exports = {\n link: async function(library, destinations, deployer) {\n let eventArgs;\n... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.