conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix prettyTime not being found\n"
},
{
"from": "human",
"value": "var exports = {};\n\nexports.simplePrint = function(video) {\n return `**${video.title}**`;\n};\n\nexports.prettyPrint = function(video) {\n try {\n viewCount = video.view_count.replace(/\\B(?=(\... | javascript | chosen |
[
{
"from": "system",
"value": "Add wiki css file to file detail [skip ci]\n"
},
{
"from": "human",
"value": "var $ = require('jquery');\nvar m = require('mithril');\nvar $osf = require('js/osfHelpers');\nvar FileViewPage = require('js/filepage');\nvar waterbutler = require('js/waterbutler');\n\nm... | javascript | chosen |
[
{
"from": "system",
"value": "Handle mapBy on ED models and plain arrays differently\n\nTemporary, as ED will soon return a plain array instead of this promise\nhere.\n"
},
{
"from": "human",
"value": "import { tracked } from '@glimmer/tracking';\nimport { Resource } from 'ember-could-get-used-t... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure response handler can handle response in chunks\n\nThere is no guarantee that the data will all arrive at once.\nRefs: #12\n"
},
{
"from": "human",
"value": "var events = require('events');\nvar Parser = require('./parser');\n\n/**\n * Handles responses fro... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the example test fail\n"
},
{
"from": "human",
"value": "module.exports = {\n 'Demo: GitHub URL Test' : function (browser) {\n browser\n .url('https://github.com')\n .assert.urlEquals('https://github.com/')\n .end();\n },\n 'Demo: GitHub Tit... | javascript | chosen |
[
{
"from": "system",
"value": "Fix new website SLI status\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar injectParams = ['$mdToast','websiteDataService'];\n\nvar WebsiteListController = function($mdToast, websiteDataService)\n{\n var vm = this;\n\n vm.websites = [];\n\n vm.$onI... | javascript | chosen |
[
{
"from": "system",
"value": "Add socket echo util function for adminBroadcast\n"
},
{
"from": "human",
"value": "const { ERROR } = require('../common/actionTypes/error');\n\nconst mergePermanentAndMetadata = (perm, meta) => Object.assign(perm, meta);\n\nconst createSocketObject = (channel, payl... | javascript | chosen |
[
{
"from": "system",
"value": "Use endOf() to calculate DATA_END_MOMENT\n"
},
{
"from": "human",
"value": "\nvar moment = require('moment');\n\n// note that month indices are zero-based\n\nmodule.exports.DATA_START_YEAR = 2012;\nmodule.exports.DATA_START_MONTH = 0;\n\nmodule.exports.DATA_END_YEAR... | javascript | chosen |
[
{
"from": "system",
"value": "Fix stubs not being served correctly\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar path = require('path');\nvar parseBundle = require('nodecg-bundle-parser');\nvar express = require('express');\nvar app = express();\nvar injectScripts = require('./script_i... | javascript | chosen |
[
{
"from": "system",
"value": "Fix dropdowneditor not setting value on blur\n"
},
{
"from": "human",
"value": "/* @flow */\n/**\n * @jsx React.DOM\n\n\n */\n'use strict';\n\nvar React = require('react');\nvar EditorBase = require('./EditorBase');\n\nclass DropDownEditor extends EditorBase {\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix: Reset filter in sub stats\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * @ngdoc function\n * @name SubSnoopApp.controller:StatsCtrl\n * @description\n * # UserStatsCtrl\n * Controller of the SubSnoopApp\n */\nangular.module('SubSnoopApp')\n .contr... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust left padding of Chevron to move it closer to label\n\n"
},
{
"from": "human",
"value": "//@flow\n\nimport styled from \"styled-components\";\n\nexport const Svg = styled.svg.attrs({\n viewBox: \"0 0 24 24\"\n})`\n ${({ theme, isActive, stateful }: { theme: ... | javascript | chosen |
[
{
"from": "system",
"value": "Add raf mock cancel function\n\nUsed in the next commit.\n"
},
{
"from": "human",
"value": "/* @flow */\n\ntype Callback = (now: number) => void;\n\nexport default function(): Object {\n let allCallbacks = [];\n let prevTime = 0;\n let id = 0;\n\n const now = ()... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for binary-safe HTTP request\n"
},
{
"from": "human",
"value": "var vows = require('vows'),\n\tassert = require('assert'),\n\tbot = require('../lib/bot');\n\nvar client = new bot({\n\t\tserver: 'en.wikipedia.org',\n\t\tpath: '/w'\n\t});\n\nvows.describe('UR... | javascript | chosen |
[
{
"from": "system",
"value": "Add browser/node envs to eslint\n"
},
{
"from": "human",
"value": "module.exports = {\n \"extends\": \"airbnb\",\n \"plugins\": [\n \"react\"\n ],\n \"parser\": \"babel-eslint\", // support for decorators etc\n \"rules\": {\n \"import/no-extraneous-depend... | javascript | chosen |
[
{
"from": "system",
"value": "[BUGFIX] Fix ReferenceError in global context detection\n\nWhen undefined variable is referenced in global context detection,\nit throws `ReferenceError`.\n"
},
{
"from": "human",
"value": "/* global self, global, window */\nfunction ifDefined(o) {\n return typeof ... | javascript | chosen |
[
{
"from": "system",
"value": "Use 10 iteration for bcrypt\n"
},
{
"from": "human",
"value": "\"use strict\";\nvar R = require('ramda');\nvar errors = require('../errors');\nvar bcrypt = require('bcrypt-nodejs');\nvar Promise = require('bluebird');\n\nmodule.exports = {\n encryptPassword: functi... | javascript | chosen |
[
{
"from": "system",
"value": "Update filenames based on long-expires token"
},
{
"from": "human",
"value": "var exec = require('child_process').exec,\n lumbar = require('lumbar');\n\nmodule.exports = {\n generateToken: function(command, callback) {\n exec(command, {cwd: lumbar.fileUtil.lo... | javascript | chosen |
[
{
"from": "system",
"value": "Add test with non-Array data\n"
},
{
"from": "human",
"value": "describe('after storing garbage data', () => {\n // This is the key from storage.js.\n const runsKey = 'playbyplay_runs_A*O%y21#Q1WSh^f09YO!';\n\n beforeEach(() => {\n localStorage[runsK... | javascript | chosen |
[
{
"from": "system",
"value": "Add API method for fetching user favorites\n"
},
{
"from": "human",
"value": "'use strict'\n\nangular.module('soundmist').service('API', function ($http, $q) {\n const API_BASE = 'https://api-v2.soundcloud.com/';\n let self = this\n\n this.getStream = function ()... | javascript | chosen |
[
{
"from": "system",
"value": "refactor: Save currentTimePeriod passed to component to variable\n\nPrevents bubbling"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport moment from 'npm:moment';\n\nexport default Ember.Component.extend({\n btnActive: false,\n didReceiveAttrs () ... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust tests to new changes\n"
},
{
"from": "human",
"value": "import test from \"ava\";\nimport {runKaba} from \"./lib/runner\";\n\n\n/**\n * @typedef {{\n * status: number,\n * dir?: string,\n * args?: string[],\n * match?: RegExp,\n * noM... | javascript | chosen |
[
{
"from": "system",
"value": "Remove extra Font Awesome resources\n"
},
{
"from": "human",
"value": "/* global require, module */\nvar EmberApp = require('ember-cli/lib/broccoli/ember-app');\nvar mergeTrees = require('broccoli-merge-trees');\n\nvar app = new EmberApp({\n modals: {\n layout... | javascript | chosen |
[
{
"from": "system",
"value": "Add random string generation function.\n"
},
{
"from": "human",
"value": "exports = module.exports = function(keyGenerator) {\n var api = {};\n \n api.generateKey = function(options, cb) {\n keyGenerator.generate(options, cb);\n }\n \n return api;\n};\n\nex... | javascript | chosen |
[
{
"from": "system",
"value": "Update contact to function on click"
},
{
"from": "human",
"value": "jQuery(document).ready(function() {\n var loginToken = window.localStorage.getItem(\"token\");\n\n setTimeout(function() {\n keepAliveTwo(loginToken);\n }, 500);\n\n displayAllUs... | javascript | chosen |
[
{
"from": "system",
"value": "Replace active symbols, dont merge\n"
},
{
"from": "human",
"value": "import { fromJS } from 'immutable';\nimport {\n SERVER_DATA_ACTIVE_SYMBOLS,\n} from '../_constants/ActionTypes';\n\nconst initialState = fromJS([]);\n\nexport default (state = initialState, act... | javascript | chosen |
[
{
"from": "system",
"value": "Remove default scale from timeline generator\n"
},
{
"from": "human",
"value": "import dateUtil from '../common/date-util';\n\nconst dateMap = {\n days: 1,\n weeks: 7\n};\n\nexport default function({ referenceDate, back, forward, scale = 'days' }) {\n // The \"1\... | javascript | chosen |
[
{
"from": "system",
"value": "Update workingOn initial state so it matches empty state\n\n\nFormer-commit-id: 299f828a4348abc930162dce36fae6bf46c50489\nFormer-commit-id: 040e5eded8b35b2792d28b398d085da28a18cd2c\nFormer-commit-id: 9fc80277314d8a553b8148703be9fcb62832c20b"
},
{
"from": "human",
"v... | javascript | chosen |
[
{
"from": "system",
"value": "Check if pit has data\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\n\nimport './index.css';\n\nconst Pit = React.createClass({\n propTypes: {\n pit: PropTypes.object.isRequired,\n },\n\n render() {\n const { pit } = this.prop... | javascript | chosen |
[
{
"from": "system",
"value": "Build correct url on production\n"
},
{
"from": "human",
"value": "import {\n Environment,\n Network,\n RecordSource,\n Store,\n} from 'relay-runtime';\nimport { getToken } from 'app/utils/token';\n\nconst GRAPHQL_PORT = process.env.GRAPHQL_PORT;\nconst GRAPHQL_... | javascript | chosen |
[
{
"from": "system",
"value": ":hammer: Watch for changes in all SCSS files\n"
},
{
"from": "human",
"value": "/**\n * Copyright 2021 The AMP HTML Authors. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compli... | javascript | chosen |
[
{
"from": "system",
"value": "Set max width and height for inventory items\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst React = require('react');\nconst {string} = React.PropTypes;\n\nconst InventoryDetail = React.createClass({\n displayName: 'InventoryDetail',\n propTypes: {\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Implement clickdown and clickup to function correctly\n"
},
{
"from": "human",
"value": "/*\n * @module Clickable\n * @namespace component\n * @desc Used to make a game component perfom an action when she's clicked\n * @copyright (C) SpilGames\n * @author Jeroe... | javascript | chosen |
[
{
"from": "system",
"value": "Add album support, fix Discover detection\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar $ = require(\"jquery\");\nvar Plugin = require(\"../modules/Plugin\");\nvar Utils = require(\"../modules/Utilities\");\nvar bandcamp = Object.create(Plugi... | javascript | chosen |
[
{
"from": "system",
"value": "Change viewport and zoom factor\n"
},
{
"from": "human",
"value": "var page = require(\"webpage\").create();\r\nvar system = require(\"system\");\r\n\r\npage.paperSize = {\r\n width: '6in',\r\n height: '4in',\r\n margin: {\r\n top: '10px',\r\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor code based on PR comments.\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\n\nimport ResponseFields from './ResponseFields.js'\n\nexport default class ResponseList extends Component {\n render () {\n return (\n <div clas... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for Discord 11 login\n"
},
{
"from": "human",
"value": "// Include needed files\nvar fluffbot = require('../lib/fluffbot')\nvar discord = require('discord.js')\nvar event = require('../lib/event')\n\n// Instantiate bots\nvar fluffbot = new fluffbot()\ndiscord = ... | javascript | chosen |
[
{
"from": "system",
"value": "Change default base url to be next"
},
{
"from": "human",
"value": "var baseUrl = process.env.OS_BASE_URL || 'https://staging.openspending.org';\nvar osExplorerSearchHost = process.env.OS_EXPLORER_SEARCH_HOST || baseUrl;\nvar searchUrl = process.env.OS_SEARCH_URL ||... | javascript | chosen |
[
{
"from": "system",
"value": "lathe[cuboid]: Support string args in BoxGeometry transform helpers.\n\nIn addition to object definitions.\n"
},
{
"from": "human",
"value": "/* eslint-env es6 */\n/* global THREE, VertexIndices */\nfunction transformBoxVertices( method ) {\n 'use strict';\n\n con... | javascript | chosen |
[
{
"from": "system",
"value": "[TASK] Remove logger.error as default callback to deposit finished job.\n"
},
{
"from": "human",
"value": "var depositCallbackJob = require(__dirname+'/../jobs/deposit_completion_callback.js');\nvar OutgoingPayment = require(__dirname+'/outgoing_payment.js');\n\nfun... | javascript | chosen |
[
{
"from": "system",
"value": "Add the instructor toggle functionality\n"
},
{
"from": "human",
"value": "var AdminPanel = function() {\n var self = this;\n $('.admin_toggle').change(function() {\n self.togglePrivileges(this, $(this).data('url'), 'admin', this.checked);\n });\n ... | javascript | chosen |
[
{
"from": "system",
"value": "js: Remove reference to chosen js file by using require_tree.\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 dir... | javascript | chosen |
[
{
"from": "system",
"value": "Fix to allow setting IDs for newly created records\n\nPreviously, saving a new record would trigger a POST request to\nthe FHIR server. In the FHIR specification, the only way to create\na new record and assign it an ID is by using a PUT request. This\nfix causes the adapter to... | javascript | chosen |
[
{
"from": "system",
"value": "Add metrics page to webpack instead of main metrics js script\n"
},
{
"from": "human",
"value": "var webpack = require('webpack');\nvar path = require('path');\nvar common = require('../webpack.common.config.js');\nvar assign = require('object-assign');\nvar BundleT... | javascript | chosen |
[
{
"from": "system",
"value": "Set is-ie class on grid root.\n"
},
{
"from": "human",
"value": "import { defaultTemplate } from './basic-grid-template'\nimport { appendIfMissing } from '@zambezi/d3-utils'\nimport { select } from 'd3-selection'\n\nexport function createSetupGridTemplate() {\n\n c... | javascript | chosen |
[
{
"from": "system",
"value": "Make challenges and discussion visibles\n\nThis is based on\nhttps://github.com/swcarpentry/instructor-training/pull/437/files and\nhttps://github.com/swcarpentry/instructor-training/pull/439/files,\nboth write by @ErinBecker.\n"
},
{
"from": "human",
"value": "// M... | javascript | chosen |
[
{
"from": "system",
"value": ":fire: Remove unused code for react-native-dotenv\n"
},
{
"from": "human",
"value": "import { CONSUMER_KEY, REDIRECT_URI } from 'react-native-dotenv'\n\nconst initialState = {\n requestToken: null,\n username: null,\n accessToken: null,\n}\n\nexport default funct... | javascript | chosen |
[
{
"from": "system",
"value": "Implement --invoke for running exact tasks."
},
{
"from": "human",
"value": "/*\n * grunt-node-deploy\n * https://github.com/ValeriiVasin/grunt-node-deploy\n *\n * Copyright (c) 2013 Valerii Vasin\n * Licensed under the MIT license.\n */\n\nmodule.exports = function... | javascript | chosen |
[
{
"from": "system",
"value": "Update script to use Lo-Dash\n"
},
{
"from": "human",
"value": "// Thank you Rob Dodson\n\n'use strict';\n\nvar path = require('path')\n , request = require('request')\n , fs = require('fs')\n , _ = require('underscore');\n\nmodule.exports = function(grunt) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "test: Make sure env isn't going to troll us before running the test\n\nSome test leaves a node_modules folder in test/tap and that makes\nthis test fail. =/\n"
},
{
"from": "human",
"value": "var path = require('path')\nvar test = require('tap').test\nvar common = r... | javascript | chosen |
[
{
"from": "system",
"value": "Remove state from summary controller\n"
},
{
"from": "human",
"value": "(function(){\n 'use strict';\n\n angular.module('cla.controllers')\n .controller('DiagnosisSummaryCtrl',\n ['$scope', '$state',\n function($scope, $state) {\n $scope.de... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unneccessary wrapper around observation container\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport moment from 'moment';\n\nexport default Ember.Component.extend({\n /**\n * So what's the issue?\n *\n * Updating my data att... | javascript | chosen |
[
{
"from": "system",
"value": "Revert D7319513: Depend on local version of babel-plugin-react-transform\n\nDifferential Revision:\nD7319513\n\nOriginal commit changeset: 4945ec753087\n\nfbshipit-source-id: 98de6a0fda19732c02ad780953497f9d9b451dea\n"
},
{
"from": "human",
"value": "/**\n * Copyrig... | javascript | chosen |
[
{
"from": "system",
"value": "Fix up wmata controller tests\n"
},
{
"from": "human",
"value": "/* eslint-env mocha */\nconst redisMock = require('redis-mock');\nconst chai = require('chai');\nchai.should();\n\nconst db = {\n redis: redisMock.createClient(),\n};\nconst fakeRedis = redisMock.crea... | javascript | chosen |
[
{
"from": "human",
"value": "Add baseline Complex JS type, non-asm.js\n"
},
{
"from": "gpt",
"value": "(function(global) {\n /**\n * Complex prototype for computation with complex numbers\n */\n var Complex = function(real, imag) {\n if (!(this instanceof Complex)) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Implement admin bulk tweet deletion\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst Boom = require('boom');\nconst User = require('../models/user');\nconst Tweet = require('../models/tweet');\n\nconst utils = require('./utils.js');\nconst _ = require('loda... | javascript | chosen |
[
{
"from": "system",
"value": "Make it a map in MultipleProcess\n"
},
{
"from": "human",
"value": "// MulitpleProcess model\n// An abstract class that allows us to group some atomic process related entities\n// Like: registrations, requirements or processingSteps\n\n'use strict';\n\nvar memoize ... | javascript | chosen |
[
{
"from": "system",
"value": "Set clear flag on render pass to false\n\nThe clear flag needs to be false to allow transparent render passes on\ntop of eachother. It was originally set to false in nin, but updating\nthree.js resets it to true, since that's the default in the official\nthree.js version.\n\nTh... | javascript | chosen |
[
{
"from": "system",
"value": "Add integration test to assert that it fails ignoring \"not a feature\"\n"
},
{
"from": "human",
"value": "var spawn = require('child_process').spawn;\n\n\nvar BIN = './src/index.js';\n\n\ndescribe('--config without 1', function() {\n\n\tit('should be 1 on a failed ... | javascript | chosen |
[
{
"from": "system",
"value": "Internal: Add the \"strict\" ESLint rule\n\nRefs. #4\n"
},
{
"from": "human",
"value": "module.exports = {\n extends: [\"google\", \"plugin:react/all\", \"./index.js\", \"./react.js\"],\n plugins: [\"react\", \"prettier\"],\n env: {\n es6: true,\n node: tru... | javascript | chosen |
[
{
"from": "system",
"value": "Replace incorrect const with let\n"
},
{
"from": "human",
"value": "class EventEmitter {\n constructor() {\n this.observers = {};\n }\n\n on(events, listener) {\n events.split(' ').forEach(event => {\n this.observers[event] = this.observers[event] || [... | javascript | chosen |
[
{
"from": "system",
"value": "Disable purgecss for production builds\n\n"
},
{
"from": "human",
"value": "// postcss.config.js\nconst path = require('path');\nconst purgecss = require('@fullhuman/postcss-purgecss')({\n\n // Specify the paths to all of the template files in your project\n conte... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary code in test\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { Header } from 'components/Header/Header';\nimport { shallow } from 'enzyme';\n\ndescribe('(Component) Header', () => {\n let _wrapper;\n\n beforeEach(() => {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix eslint errors in leaderboard.js\n"
},
{
"from": "human",
"value": "var LeaderboardView, RatView\n\nRatView = Marionette.ItemView.extend({\n tagName: 'tr',\n\n template: Handlebars.compile(\n '<td>{{CMDRname}}</td>' +\n '<td>{{successfulRescueCount}}</td>... | javascript | chosen |
[
{
"from": "system",
"value": "Add port 80 support for heroku\n"
},
{
"from": "human",
"value": "var app = require('./web-server/app');\n\napp.listen(3000, () => {\n console.log(`Pong web-server!`);\n console.log(`Mode: ${app.get('env')}`);\n console.log(`Port: listening on port 3000`);\n con... | javascript | chosen |
[
{
"from": "system",
"value": "Change Markdown file name to index.md\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n'use strict';\n\nvar pkg = require('./package.json');\nvar statsministerietSpeeches = require('./');\nvar argv = process.argv.slice(2);\n\nvar fs = require('fs');\n\nfuncti... | javascript | chosen |
[
{
"from": "system",
"value": "Fix helment null ptr exception\n\nThis fixes https://github.com/webkom/lego/issues/1720\n"
},
{
"from": "human",
"value": "// @flow\n\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet';\nimport config from 'app/config';\nimport { type ComponentT... | javascript | chosen |
[
{
"from": "system",
"value": "Update launcher to always launch a window onstartup/install/launch\n"
},
{
"from": "human",
"value": "var period = 1;\n\nchrome.runtime.onInstalled.addListener(function() {\n chrome.alarms.create(\"update\", {\n periodInMinutes: period\n });\n});\n\nchrome.runt... | javascript | chosen |
[
{
"from": "system",
"value": "Add exp id validation to apiroutes.\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar assign = require('lodash.assign');\n\nfunction ensureAPIAuthenticated(req, res, next) {\n if (req.isAuthenticated()) {return next();}\n sendAPIError(res, ... | javascript | chosen |
[
{
"from": "human",
"value": "Add initial and refactored solutions\n"
},
{
"from": "gpt",
"value": " // I worked on this challenge by myself.\n // This challenge took me 1 hours.\n\n // Pseudocode\n // 1.) Accept a number argument and set defaults for fib and next fib.\n// 2.) Compare the number... | javascript | chosen |
[
{
"from": "system",
"value": "Fix faulty mutation that was not updating related fields.\n"
},
{
"from": "human",
"value": "import {\n commitMutation,\n graphql\n} from 'react-relay/compat'\n\nconst mutation = graphql`\n mutation LogTabMutation($input: LogTabInput!) {\n logTab(input: $input... | javascript | chosen |
[
{
"from": "system",
"value": "Check for empty response for getMessageList() calls\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport _ from 'lodash';\n\nexport default Ember.Route.extend({\n /**\n * @param {params.mailbox_name} The name of the mailbox ('Inbox', 'Archives')\... | javascript | chosen |
[
{
"from": "system",
"value": "Change updateCounterView to stand alone function\n"
},
{
"from": "human",
"value": "function Metronome(tempo, beatsPerMeasure){\n this.tempo = Number(tempo);\n this.beatsPerMeasure = Number(beatsPerMeasure);\n this.interval = null;\n}\n\nMetronome.prototype.start... | javascript | chosen |
[
{
"from": "system",
"value": "Fix restapi in meteor docker container\n"
},
{
"from": "human",
"value": "/*\nThis Source Code Form is subject to the terms of the Mozilla Public\nLicense, v. 2.0. If a copy of the MPL was not distributed with this\nfile, You can obtain one at http://mozilla.org/MPL... | javascript | chosen |
[
{
"from": "system",
"value": "Add command-line support to HTML-to-JSON script\n\nThe code is very common between the script and the test runner, which\nobviates the need to do a bit of refactoring. That will have the\nadvantage of removing the JSDOM dependency from the test-runner and code\nconsumers.\n"
... | javascript | chosen |
[
{
"from": "system",
"value": "Create method for checking if user is logged. Method also set account type.\n"
},
{
"from": "human",
"value": "function CurrentUser() {\n\t// 0 - guest, 1 - user, 2 - admin, 3 - root\n\tthis._typeAccount = 0; // default 0\n}\n\nCurrentUser.prototype.getTypeAccount =... | javascript | chosen |
[
{
"from": "system",
"value": "Add a missing return false at the end of a jquery event\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n $('.add_child').click(function() {\n var assoc = $(this).attr('data-association');\n var content = $('#' + assoc + '_fields_template'... | javascript | chosen |
[
{
"from": "system",
"value": "Remove empty route nesting for channel\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport config from './config/environment';\n\nvar Router = Ember.Router.extend({\n location: config.locationType\n});\n\nRouter.map(function() {\n this.resource('... | javascript | chosen |
[
{
"from": "system",
"value": "Fix leaderboard page reload problem\n"
},
{
"from": "human",
"value": "const $ = require('jquery');\n\nfunction reload() {\n $('#stats').load(`${location.href}stats`, ''); // eslint-disable-line\n $('#glider-rider-detail').load(`${location.href}?refresh=true`, '')... | javascript | chosen |
[
{
"from": "system",
"value": "Update template to include expiration date.\n"
},
{
"from": "human",
"value": "var Templates = {};\n\nTemplates.ItemListingTemplate = _.template('\\\n\t<div class=\"item media\">\\\n\t\t<img class=\"pull-left\" src=\"<%= imageUrl %>\" />\\\n\t\t<div class=\"media-bo... | javascript | chosen |
[
{
"from": "system",
"value": "chore(tests): Add source maps to browserify\n\nSigned-off-by: Nicole Sullivan <4ab7e2960369063855aad4ef791fa27066322d72@pivotal.io>\n"
},
{
"from": "human",
"value": "// Karma configuration\n// Generated on Fri Oct 17 2014 15:45:37 GMT-0400 (EDT)\n\nmodule.exports =... | javascript | chosen |
[
{
"from": "system",
"value": "Remove html coverage reporter, caused test to hang\n"
},
{
"from": "human",
"value": "const path = require('path');\n\nvar webpack = require('./webpack.config.js');\nwebpack.module.preLoaders = [\n {\n test: /\\.js$/,\n include: path.resolve('app/lib/'),\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update all tab icons on install/extension reload\n"
},
{
"from": "human",
"value": "/*global chrome hashblot blotpw bloticon*/\n\nchrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {\n bloticon.updateTabIcon(tab);\n});\n"
},
{
"from": "gpt",... | javascript | chosen |
[
{
"from": "system",
"value": "Alert: Add offset for header bar.\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react'\nimport Alert from 'react-s-alert';\n\nconst Layout = ({ children }) => (\n <div>\n {children}\n <Alert stack={{ limit: 3 }} position=\"top-left\" ti... | javascript | chosen |
[
{
"from": "system",
"value": "Update persistent example following prediction return API changes\n"
},
{
"from": "human",
"value": "(function() {\n if (!window.localStorage) {\n console.warn('Sorry, this example needs localStorage support');\n return;\n }\n\n // Get Probabi... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify enyo.load call since it handles arrays natively\n\nEnyo-DCO-1.1-Signed-Off-By: Ben Combee (ben.combee@lge.com)\n"
},
{
"from": "human",
"value": "(function() {\n\tif(window.cordova || window.PhoneGap) {\n\t\tvar v = window.useCordovaTVVersion||\"3.0\";\n\t\... | javascript | chosen |
[
{
"from": "system",
"value": "Update method name from 'getVirtTSMS' to 'virtDateNow'\n"
},
{
"from": "human",
"value": "module.exports = VirtDate;\n\nfunction VirtDate(timeVirtualizer) {\n this._timeVirtualizer = timeVirtualizer;\n this._realDate = window.Date;\n this._realDateNow = win... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with message handling"
},
{
"from": "human",
"value": "function msgReceived(info, tab) {\n chrome.tabs.create({'url': chrome.extension.getURL('newtab.html'), 'selected': true}, function(tab) {\n console.log('In create: ', tab);\n chrome.tabs.getSele... | javascript | chosen |
[
{
"from": "system",
"value": ":art: Use exact matching instead of startsWith in uri\n"
},
{
"from": "human",
"value": "/** @babel */\n\nimport { CompositeDisposable } from 'atom';\nimport TerminalView from './terminal-view';\n\nexport default {\n\n disposables: null,\n terminalViews: [],\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Put TimeHSM inputs inline to save space\n"
},
{
"from": "human",
"value": "/**\n * @license\n * Copyright 2019 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfoam.CLASS({\n package: 'foam.nanos.cron',\n name: 'TimeHMS... | javascript | chosen |
[
{
"from": "system",
"value": "Remove app from registry on uninstall\n"
},
{
"from": "human",
"value": "import filePaths from '../utils/file-paths';\nimport cp from 'child_process';\nimport path from 'path';\nimport app from 'app';\n\nclass SquirrelEvents {\n\n check(options) {\n if (options.... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Fix print button (still downloads, does not print)\n\nPrintButton was using `this.url` instead of `this.props.url`.\nHowever also removed some unnecessary code in this component\n"
},
{
"from": "human",
"value": "// @flow\nimport React from 'react'\nimport Prin... | javascript | chosen |
[
{
"from": "system",
"value": "Set height and width for Sub Ebook Embed iframe"
},
{
"from": "human",
"value": "import m from 'mithril';\nimport h from '../h';\nimport userVM from '../vms/user-vm';\nimport projectVM from '../vms/project-vm';\nimport youtubeLightbox from '../c/youtube-lightbox';\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add opacity to the drop shadow filter.\n"
},
{
"from": "human",
"value": "// Adapted from: http://bl.ocks.org/cpbotha/5200394\nexport function dropShadow (el, name, dx, dy, blur) {\n let defs = el.select('defs');\n\n if (defs.empty()) {\n defs = el.append('defs... | javascript | chosen |
[
{
"from": "system",
"value": "Add \"/fail\" route to errors lib for 500 testing.\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar app = module.exports = express();\n\napp.get('*', function(req, res) {\n console.log('404 ERROR:', req.url);\n res.redirect('/#' + req.... | javascript | chosen |
[
{
"from": "system",
"value": "Release: Add console log of commands\n"
},
{
"from": "human",
"value": "/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n/* eslint-disable no-console, global-req... | javascript | chosen |
[
{
"from": "system",
"value": "Remove entire playlist if too long\n"
},
{
"from": "human",
"value": "const utils = require('./../../utils.js');\n\nmodule.exports.info = {\n\tname: 'Playlist',\n\tdescription: 'List the current sounds and music that is stored within the playlist.',\n\tcategory: 'Mu... | javascript | chosen |
[
{
"from": "system",
"value": "Make using AMD imports a linting error\n\nChange-Id: I8c5073d660b808f6eb62432f914be71941253a80\nReviewed-on: https://gerrit.instructure.com/105000\nTested-by: Jenkins\nReviewed-by: Ryan Shaw <ea3cd978650417470535f3a4725b6b5042a6ab59@instructure.com>\nProduct-Review: Clay Diffri... | javascript | chosen |
[
{
"from": "system",
"value": "Add leaflet extensions to build script.\n"
},
{
"from": "human",
"value": "var deps = {\n\tDrawHandler: {\n\t\tsrc: ['Handler.Draw.js'],\n\t\tdesc: 'The base class for drawing.',\n\t},\n\n\tPolys: {\n\t\tsrc: ['Polyline.Draw.js',\n\t\t 'Polygon.Draw.js'],\n\t\t... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude the node modules from es6ify\n"
},
{
"from": "human",
"value": "/*jshint node: true */\n'use strict';\n\nvar browserify = require('browserify'),\n es6ify = require('es6ify'),\n glob = require('glob');\n\nes6ify.traceurOverrides = { blockBindi... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.