conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Update promiseThrottler for PromiseThrottled param.\n"
},
{
"from": "human",
"value": "/*\n * Author: CM\n */\n\n(function(global) {\n\n var storage = {};\n\n /**\n * @param {String} name\n * @param {Promise} promise\n * @returns {Promise}\n */\n function... | javascript | chosen |
[
{
"from": "system",
"value": "Implement get user by platform in service\n"
},
{
"from": "human",
"value": "var rfr = require('rfr');\n\nvar Utility = rfr('app/util/Utility');\nvar Storage = rfr('app/models/Storage');\n\nvar logger = Utility.createLogger(__filename);\n\nfunction UserService() {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add global methods to pause and resume simulation\n\nThese will eventually be hooked up to buttons in the DOM.\n\nSigned-off-by: Zac Delventhal <593147d2808cd66b7e2ad59ca4b0c07d6c52cddd@gmail.com>\n"
},
{
"from": "human",
"value": "import * as settings from './setti... | javascript | chosen |
[
{
"from": "system",
"value": "Add photoUrl to sample data\n"
},
{
"from": "human",
"value": "import { connect } from 'react-redux';\nimport Matches from '../components/Matches.jsx';\nimport { unmountMatch, removeMatch, incrementOffset, addMatches } from '../actions/index.js';\n\n\nconst mapState... | javascript | chosen |
[
{
"from": "system",
"value": "Add rear-error stack trace test\n"
},
{
"from": "human",
"value": "const RearError = require('../rear-error');\n\nit('Should have code, errno and other props', () => {\n const errMessage = 'Test error message';\n const errProps = {\n code: 'ETEST',\n errno: ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Revert \"Updates `ember-inflector` version\"\"\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n normalizeEntityName: function() {\n // this prevents an error when the entityName is\n // not specified (since that doesn't actual... | javascript | chosen |
[
{
"from": "system",
"value": "Fix legacy converter with proper regex to match opacity\n"
},
{
"from": "human",
"value": "/* global legacy, legacyConvert */\n\nmodule.exports = function(grunt) {\n\tgrunt.registerTask('convertLegacy', function(task) {\n\t\tvar dest = legacyConvert[task],\n\t\t\tcs... | javascript | chosen |
[
{
"from": "system",
"value": "Modify listening port (for heroku)\n"
},
{
"from": "human",
"value": "var path = require('path'),\r\n rootPath = path.normalize(__dirname + '/..'),\r\n env = process.env.NODE_ENV || 'development';\r\n\r\nvar config = {\r\n development: {\r\n root: rootPath,\r\... | javascript | chosen |
[
{
"from": "system",
"value": "Change mailgun route to POST\n"
},
{
"from": "human",
"value": "module.exports = function(server) {\n\n server.get('/', function(req, res) {\n\n res.render('home', {\n title: \"Title\"\n });\n\n });\n\n server.get('/inbound/:mailgun_key', function(re... | javascript | chosen |
[
{
"from": "system",
"value": "Add Aria checked attribute binding\n"
},
{
"from": "human",
"value": "import Component from '@ember/component';\nimport { computed } from '@ember/object';\nimport { isEqual } from '@ember/utils';\nimport { run } from '@ember/runloop';\n\nexport default Component.ext... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests to make sure transforms accept frozen objects\n"
},
{
"from": "human",
"value": "import TextDisplay from \"../src/text\";\n\nimport { richestMimetype, transforms } from \"../src\";\n\ndescribe(\"richestMimetype\", () => {\n it(\"picks the richest of the m... | javascript | chosen |
[
{
"from": "system",
"value": "Return object based on mobile version\n"
},
{
"from": "human",
"value": "module.exports = {\n\n updateInfo: function (req, res) {\n var result = {}\n\n /*\n Format for result:\n result = {\n type: 'force', // can be 'force' or 'suggest'\n tit... | javascript | chosen |
[
{
"from": "system",
"value": "Make library importable using CommonJS and ES6 module system"
},
{
"from": "human",
"value": "var path = require(\"path\");\nvar webpack = require(\"webpack\");\n\nmodule.exports = {\n entry: \"./src/main.ts\",\n output: {\n filename: \"bundle.js\",\n path: ... | javascript | chosen |
[
{
"from": "system",
"value": "Add module concatenation plugin and not transform to commonjs in web env\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst path = require('path');\nconst MinifyPlugin = require('babel-minify-webpack-plugin');\n\nmodule.exports = {\n\tdevtool: 'source-map',\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add ability to set specific nodes as focused nodes\n"
},
{
"from": "human",
"value": "/**\n *\n * Copyright 2016 Netflix, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with ... | javascript | chosen |
[
{
"from": "system",
"value": "fix(dist): Fix webpacked dist so that it exports skate not skatejs to the global.\n"
},
{
"from": "human",
"value": "const conf = module.exports = require('skatejs-build/webpack.config');\nconf.devtool = 'source-map';\nconf.entry = {\n 'dist/index-with-deps.js': '.... | javascript | chosen |
[
{
"from": "system",
"value": "Fix es6 error on node 5\n"
},
{
"from": "human",
"value": "/* eslint object-shorthand:0 func-names:0 */\n\nconst WebpackIsomorphicToolsPlugin = require('webpack-isomorphic-tools/plugin');\n\nmodule.exports = {\n // debug: true,\n // webpack_assets_file_path: 'webp... | javascript | chosen |
[
{
"from": "system",
"value": "Stop clobbering native CustomEvent constructor in polyfill.\n"
},
{
"from": "human",
"value": "// Copyright (c) 2013 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\... | javascript | chosen |
[
{
"from": "system",
"value": "Use ENV variables for SSH\n"
},
{
"from": "human",
"value": "/* Copyright 2017 Agneta Network Applications, LLC.\n *\n * Source file: portal/services/boot/git/credentials.js\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you ma... | javascript | chosen |
[
{
"from": "system",
"value": "Update engine to check for valid video codec\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Assign the video codec to use\nmodule.exports = function(command, file, options, metadata, details) {\n return new Promise((resolve, reject) => {\n\n // Assign vi... | javascript | chosen |
[
{
"from": "system",
"value": "Add profile prefilled interests and skills\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n showCurrentUserInfo();\n});\n\n/**\n * Populates inputs with current user information.\n */\nasync function showCurrentUserInfo() {\n const response = aw... | javascript | chosen |
[
{
"from": "system",
"value": "Use write streams for STOR\n"
},
{
"from": "human",
"value": "var command = require('../lib/command');\nvar channel = require('../lib/datachannel');\nvar fs = require('../lib/fs');\n\ncommand.add('STOR', 'STOR <sp> pathname', function (path, output, session) {\... | javascript | chosen |
[
{
"from": "system",
"value": "Make browserify case work both for npm and bower.\n"
},
{
"from": "human",
"value": "// Renamed functions\n\ndc.abstractBubbleChart = dc.bubbleMixin;\ndc.baseChart = dc.baseMixin;\ndc.capped = dc.capMixin;\ndc.colorChart = dc.colorMixin;\ndc.coordinateGridChart = dc... | javascript | chosen |
[
{
"from": "system",
"value": "Add organization settings menu test\n"
},
{
"from": "human",
"value": "import { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('organization-settings-menu', 'Integration | Component | organization ... | javascript | chosen |
[
{
"from": "system",
"value": "Enable actual changes with renovate\n"
},
{
"from": "human",
"value": "module.exports = {\n branchPrefix: 'renovate/',\n dryRun: true,\n username: 'renovate-bot',\n gitAuthor: 'Renovate Bot <bot@renovateapp.com>',\n onboarding: true,\n platform: 'github',\n i... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug causing extraneous notifications on repos with mixed-state modules\n"
},
{
"from": "human",
"value": "import Notify from 'notifyjs';\nimport WatchingProvider from './WatchingProvider';\n\nlet lastModuleStates = {};\n\nlet BuildsNotifier = {\n\n updateModule... | javascript | chosen |
[
{
"from": "system",
"value": "Fix chosen usage in admin\n"
},
{
"from": "human",
"value": "$(function() {\n $('.field select')\n .width(function(index, width) { return $(this).attr('multiple') ? width + 150 : width + 50; })\n .chosen({disable_search_threshold: 50});\n});\n"
},
{
"... | javascript | chosen |
[
{
"from": "system",
"value": "Change return value of noConcurrentCalls to make it return the promise return by λ\n"
},
{
"from": "human",
"value": "\"use strict\";\n\n/*\n* Creates a version of λ that cannot be executed concurrently.\n*\n* Expects λ to take no arguments and to return a Promise.\... | javascript | chosen |
[
{
"from": "system",
"value": "Reconnect to WS on close\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function () {\n const WebSocket = require('ws');\n var ws = new WebSocket(App.config.logserverIP, {headers: {'token': App.config.token}});\n var self = this;\n\n ws.on(... | javascript | chosen |
[
{
"from": "human",
"value": "Implement Get Subcampaign Model by HMGET\n"
},
{
"from": "gpt",
"value": "var configuration = require('../../config/configuration.json')\nvar utility = require('../../public/method/utility')\n\nmodule.exports = {\n getSubcampaignModel: function (redisClient, subcamp... | javascript | chosen |
[
{
"from": "system",
"value": "[query-sore] Refactor built in search store\n"
},
{
"from": "human",
"value": "var SearchStore = require('../store/search');\n\nmodule.exports = new SearchStore();"
},
{
"from": "gpt",
"value": "var SearchStore = require('../store/search');\nvar QuerySto... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor factorial web sample to use compileProgramFile\n"
},
{
"from": "human",
"value": "\rvar cobs = require('../..'),\r http = require('http'),\r fs = require('fs');\r\rfunction compileFile(filename) {\r var text = fs.readFileSync(filename).toString();\... | javascript | chosen |
[
{
"from": "system",
"value": "Select complete textbox content on click\n"
},
{
"from": "human",
"value": "document.addEventListener(\"DOMContentLoaded\", function () {\n var qr_cellsize = 8;\n var qr_margin = 2 * qr_cellsize;\n var qr_levels = [\"M\", \"L\"];\n\n var createImage = function(p... | javascript | chosen |
[
{
"from": "system",
"value": "Use JSX to render rectangles for bar chart\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport ReactDOM from \"react-dom\";\n\nimport tabify from \"../../utils/tabify\";\nimport * as d3 from \"d3\";\nimport \"./BarGraph.css\";\n\nexport default c... | javascript | chosen |
[
{
"from": "system",
"value": "Remove import of old routes\n"
},
{
"from": "human",
"value": "// We only need to import the modules necessary for initial render\nimport CoreLayout from '../layouts/CoreLayout/CoreLayout'\nimport Home from './Home'\nimport CounterRoute from './Counter'\nimport Togg... | javascript | chosen |
[
{
"from": "system",
"value": "Work around NaN, Infinity and -Infinity.\n"
},
{
"from": "human",
"value": "/*\n * ASCII sparklines.\n */\n\n(function(root) {\n var ticks = ['▁', '▂', '▃', '▄', '▅', '▆', '▇', '█'];\n\n var spark = function (ints) {\n var max = Math.max.apply(null, int... | javascript | chosen |
[
{
"from": "system",
"value": "Fix build process on linux\n"
},
{
"from": "human",
"value": "var isWindows = /^win/.test(process.platform)\n\nif(isWindows){\n spawn = require('child_process').exec\n spawn(__dirname + \"/node_modules/.bin/cjsx.cmd -o build -cw source\")\n spawn(__dirname + \"/n... | javascript | chosen |
[
{
"from": "system",
"value": "Add z-index to the Header\n"
},
{
"from": "human",
"value": "import styled from 'styled-components';\n\nimport { navbarHeight } from '../../common-styles/layout';\n\nexport const Wrapper = styled.nav`\n align-items: center;\n background-color: #fff;\n color: #666... | javascript | chosen |
[
{
"from": "system",
"value": "Enable some new React rules\n\nThe newer version of the React plugin gives us some nice new rules that\nwe want to enable.\n"
},
{
"from": "human",
"value": "module.exports = {\n 'extends': './index.js',\n\n 'plugins': [\n 'react'\n ],\n\n 'ecmaFeatures': {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add comments and tight-ify the code.\n\n:cookie:\nUpdated Get Current User with comments and tighter code.\n"
},
{
"from": "human",
"value": "function $_global_sputils_user () {\n (function (window) {\n 'use strict';\n\n var loginAsAnotherUser = function () {... | javascript | chosen |
[
{
"from": "system",
"value": "Set max height for kap window\n"
},
{
"from": "human",
"value": "import screenSizes from '../../../lib/screen-sizes'\n\nconst KapWindow = () => (\n <div className=\"window\">\n <img\n src={require('../../../static/images/kap-3@2x.png?inline')}\n alt=\"... | javascript | chosen |
[
{
"from": "system",
"value": "Change list tag to div\n"
},
{
"from": "human",
"value": "import React from 'react'\n\nconst PoemList = (props) => {\n return (\n <ul>\n {props.store.poems.map((poem, i) => {\n return (\n <li key={i}>{poem.body}\n <button onClick=... | javascript | chosen |
[
{
"from": "system",
"value": "Remove application struct type getter\n"
},
{
"from": "human",
"value": "import Service from './Service';\n\nmodule.exports = class Application extends Service {\n get isApplication() {\n return !this.labels.DCOS_PACKAGE_IS_FRAMEWORK;\n }\n};\n"
},
{
"f... | javascript | chosen |
[
{
"from": "system",
"value": "Replace Lodash isNumber with Angular isNumber\n"
},
{
"from": "human",
"value": "import isNumber from 'lodash/lang/isNumber';\n\nfunction ToastFactory($mdToast) {\n return {\n hide() {\n $mdToast.hide();\n },\n show(message, delay)... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the getters from the AuthKey class"
},
{
"from": "human",
"value": "// telegram.link\n// Copyright 2014 Enrico Stara 'enrico.stara@gmail.com'\n// Released under the MIT License\n// https://github.com/enricostara/telegram-mt-node\n\n// Auth... | javascript | chosen |
[
{
"from": "system",
"value": "Use redux store in chrome app\n"
},
{
"from": "human",
"value": "chrome.app.runtime.onLaunched.addListener(function() {\n chrome.app.window.create('window.html', {\n 'state': 'maximized'\n // More parameters: https://developer.chrome.com/apps/app_window#Creat... | javascript | chosen |
[
{
"from": "system",
"value": "Remove wind-related weathericons css rules\n\nDoing so removes hundreds upon hundreds of unused rules, reducing\nthe size of the main css file by more than half (~12kb to ~4kb).\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\n\nimport m... | javascript | chosen |
[
{
"from": "system",
"value": "Fix tests on node v4\n"
},
{
"from": "human",
"value": "const assert = require('assert');\nconst http = require('http');\nconst concat = require('concat-stream');\n\nfunction createServer() {\n return http.createServer((req, res) => {\n const {method, url, heade... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary assignment of static variables\n"
},
{
"from": "human",
"value": "import * as THREE from 'three';\nimport UberObject from './UberObject';\n\nconst Mesh = UberObject(THREE.Mesh);\n\nclass ZClippedMesh extends Mesh {\n constructor(geometry, materia... | javascript | chosen |
[
{
"from": "system",
"value": "Change redirect on conversion of lead\n"
},
{
"from": "human",
"value": "import ApiService from '../../../services/Api'\n\nconst addHousehold = (household) => {\n return {\n type: 'ADD_HOUSEHOLD_SUCCESS',\n household\n }\n}\n\nexport const convertLead = (id,... | javascript | chosen |
[
{
"from": "system",
"value": "Update autocomplete feature with API changes\n"
},
{
"from": "human",
"value": "/**\n * public/src/js/controllers/search.js - delish\n * \n * Licensed under MIT license.\n * Copyright (C) 2017 Karim Alibhai.\n */\n\nimport sock from '../socket'\nimport debounce from... | javascript | chosen |
[
{
"from": "system",
"value": "Fix hostname answer issue in catalog\n\nhttps://github.com/rancher/rancher/issues/17058\n"
},
{
"from": "human",
"value": "import Component from '@ember/component';\nimport { next } from '@ember/runloop';\nimport { get, set, observer } from '@ember/object'\nimport l... | javascript | chosen |
[
{
"from": "system",
"value": "refactor: Use spread operator to copy notification\n"
},
{
"from": "human",
"value": "const notifications = {\n namespaced: true,\n state: {\n isFetching: false,\n isErrored: false,\n error: [],\n notifications: []\n\n },\n computed: {},\n getters: ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix configuration leaking out from another test.\n"
},
{
"from": "human",
"value": "'use strict';\nrequire('../helpers');\nconst assert = require('assert');\nconst Ironium = require('../..');\n\n\ndescribe('Queue with delay', function() {\n\n const captureQueue = ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix tests for post likes\n"
},
{
"from": "human",
"value": "import test from 'tape';\nimport React from 'react';\n\nimport {PostLikes} from 'src/components/post-likes';\nimport sd from 'skin-deep';\n\nconst renderLikes = (likes, omittedLikes = 0) => {\n const post ... | javascript | chosen |
[
{
"from": "system",
"value": "tests: Fix broken setup/teardown in tests/index.html\n\nIn QUnit 1.16, module setup/teardown was renamed to beforeEach\nand afterEach (old names kept for back-compat).\n\nThe back-compat aliases were removed in QUnit 2.0.\n\nThis didn't break the karma run because we only used ... | javascript | chosen |
[
{
"from": "system",
"value": "Test that embedded style map is written to separate file\n"
},
{
"from": "human",
"value": "var assert = require(\"assert\");\n\nvar JSZip = require(\"jszip\");\n\nvar zipfile = require(\"../../lib/zipfile\");\nvar styleMap = require(\"../../lib/docx/style-map\");\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix 'use strict' linting error NotLikeThis\n"
},
{
"from": "human",
"value": "const browsers = [\n 'last 1 Chrome versions',\n 'last 1 Firefox versions',\n 'last 1 Safari versions'\n];\n\nconst isCI = !!process.env.CI;\nconst isProduction = process.env.EMBER_ENV ... | javascript | chosen |
[
{
"from": "system",
"value": "Add TODOs explaining short summary of plan for each core hook.\n"
},
{
"from": "human",
"value": "/**\n * Default hooks\n *\n * (order still matters for now for some of these-\n * but mostly not, due to ouruse of events...\n * ...but for a few core hooks, e.g. `mo... | javascript | chosen |
[
{
"from": "system",
"value": "Add parsing of simple key-value query params (sort, filter, etc.)\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Mixin.create({\n\n /** \n Parse the links in the JSONAPI response and convert to a meta-object \n */\n nor... | javascript | chosen |
[
{
"from": "system",
"value": "Add phplint into gulp pipline\n"
},
{
"from": "human",
"value": "'use strict';\n/**\n * Task runner for unit tests\n *\n * How To:\n *\n * Using Gulp.js to check your code quality\n * https://marcofranssen.nl/using-gulp-js-to-check-your-code-quality/\n */\n\nvar gul... | javascript | chosen |
[
{
"from": "system",
"value": "Use SSL for external resources.\n"
},
{
"from": "human",
"value": "import user from './mutations'\n\nconst defaults = {\n photoURL: 'http://gravatar.com/avatar?d=mm&s=100'\n}\n\nconst state = {\n uid: null,\n email: null,\n displayNam... | javascript | chosen |
[
{
"from": "system",
"value": "Change class name to CompilerVersionChecker and add space in the description error\n"
},
{
"from": "human",
"value": "const semver = require('semver')\nconst BaseChecker = require('./../base-checker')\n\nconst ruleId = 'compiler-version'\nconst meta = {\n type: 'se... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to avoid dynamic module resolution\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdl... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to assembleRelease on development\n"
},
{
"from": "human",
"value": "const DEFAULT_ENV = {}\n\nmodule.exports = {\n branches: {\n \"development\": {\n gradleCommand: 'assembleDev',\n envFile: \".env.dev\",\n env: Object.assign({}, DEFAULT_E... | javascript | chosen |
[
{
"from": "system",
"value": "TODO: Check for package.json and either warn that there's no project or show help instead\n"
},
{
"from": "human",
"value": "var multiline = require('multiline');\nvar docopt = require('docopt');\nvar Liftoff = require('liftoff');\nvar tildify = require('tildify');\... | javascript | chosen |
[
{
"from": "system",
"value": "Improve children prop validation in modal footer\n"
},
{
"from": "human",
"value": "/**\n * Modal Footer\n *\n * This is the default modal footer of a typical <Modal /> in the folio system.\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimp... | javascript | chosen |
[
{
"from": "system",
"value": "Put 'module.exports' in the beginning of the file\n"
},
{
"from": "human",
"value": "function assert(assertion, msg) {\n if (!assertion) {\n throw new Error(msg);\n }\n}\n\nfunction isUndefOrNull(val) {\n return val === null || (typeof val === 'undef... | javascript | chosen |
[
{
"from": "system",
"value": "Copy application specific cordova config.xml on build.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar cordova = require(process.env.framework + '/bin/cli-cordova');\nvar global = require(process.env.framework + '/bin/cli-global');\nvar shell = require... | javascript | chosen |
[
{
"from": "system",
"value": "Fix GZip issue in script.\n"
},
{
"from": "human",
"value": "import compression from 'compression';\nimport express from 'express';\nimport path from 'path';\nimport open from 'open';\n\n// tslint:disable:no-console\n\nconst port = 3000;\nconst app = express();\n\na... | javascript | chosen |
[
{
"from": "system",
"value": "Fix textarea in frontend port to jquery\n"
},
{
"from": "human",
"value": "var $ = require('jQuery');\nvar fieldRegistry = require('kwf/frontend-form/field-registry');\nvar Field = require('kwf/frontend-form/field/field');\nvar kwfExtend = require('kwf/extend');\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix require for webpack compatibility\n"
},
{
"from": "human",
"value": "var path = require('path')\nvar pgPath;\n//support both pg & pg.js\n//this will eventually go away when i break native bindings\n//out into their own module\ntry {\n pgPath = path.dirname(requ... | javascript | chosen |
[
{
"from": "system",
"value": "Add unit tests for input scanner\n"
},
{
"from": "human",
"value": "var assert = require('assert');\nvar InputScanner = require('../../src/core/inputscanner').InputScanner;\n\ndescribe('IndexScanner', function() {\n describe('new', function() {\n it('should retu... | javascript | chosen |
[
{
"from": "system",
"value": "Handle case with no configuration options\n"
},
{
"from": "human",
"value": "/*\n * Javacript for the API Configuration\n */\n\n/* jshint browser: true */\n/* jshint -W097 */\n/* globals apiRequest */\n'use strict';\n\nexport class apiConfiguration {\n constructor(... | javascript | chosen |
[
{
"from": "system",
"value": "Fix shadow appearing to right of menus when sub-menus opened.\n"
},
{
"from": "human",
"value": "/**\n * @license\n * Copyright 2017 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfoam.CLASS({\n package: 'foam.nanos.me... | javascript | chosen |
[
{
"from": "system",
"value": "Use lazy regex for parsing html <title/>\n\n/* returns: 'foo</title>bar<title>baz' */\n /<title>(.+)<\\/title>/.exec('<title>foo</title>bar<title>baz</title>')[1]\n\n/* returns: 'foo' */\n /<title>(.+?)<\\/title>/.exec('<title>foo</title>bar<title>baz</title>')[1]\n"
},
{... | javascript | chosen |
[
{
"from": "system",
"value": "Use port 3001 as a default port\n"
},
{
"from": "human",
"value": "export const dbURI = (() => {\n if (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test') {\n return 'mongodb://localhost/trelloCloneApi';\n } else {\n return 'mongodb://... | javascript | chosen |
[
{
"from": "system",
"value": "Update user model unit tests\n"
},
{
"from": "human",
"value": "import { moduleForModel, test } from 'ember-qunit';\n\nmoduleForModel('user', 'Unit | Model | user', {\n // Specify the other units that are required for this test.\n needs: [\n 'model:organization... | javascript | chosen |
[
{
"from": "system",
"value": "Fix linting errors in user unit test.\n"
},
{
"from": "human",
"value": "import { moduleFor, test } from 'ember-qunit';\n\nmoduleFor('route:user', 'Unit | Route | user', {\n // Specify the other units that are required for this test.\n // needs: ['controller:foo']... | javascript | chosen |
[
{
"from": "system",
"value": "Use data attributes instead of classes\n"
},
{
"from": "human",
"value": "(function ($) {\n\n function addCSSRule (selector, rules) {\n $('head').append('<style type=\"text/css\">' + selector + ' { ' + rules + ' }</style>');\n }\n\n $.fn.sticky = function () {... | javascript | chosen |
[
{
"from": "system",
"value": "Add path towards static assets\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst hbs = require('hbs');\n\n// instantiate Express.js\nconst app = express();\n\n// Tell Handlebars where to look for partials\nhbs.registerPartials(__dirname +... | javascript | chosen |
[
{
"from": "system",
"value": "Add 'add' event when io.on and add feedback to confirm\n\nadded the feedback piece to check and make sure that\nthe data would be actually coming through correctly\nbecause earlier was having issue with 'undefined' returning\n"
},
{
"from": "human",
"value": "// Imp... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor body DOM selector to the body prop\n"
},
{
"from": "human",
"value": "import ReactDOM from 'react-dom';\nimport React, { PropTypes } from 'react';\nimport { Provider } from 'react-redux';\n\nimport createStore from '../../app/store/configureStore';\nimport ... | javascript | chosen |
[
{
"from": "system",
"value": "Load conda tab at startup if url points there\n"
},
{
"from": "human",
"value": "define(function(require) {\n var $ = require('jquery');\n var IPython = require('base/js/namespace');\n var models = require('./models');\n var views = require('./views');\n... | javascript | chosen |
[
{
"from": "system",
"value": "Test the request being sent\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar should = require('should');\n\nvar Anyfetch = require('../lib/index.js');\n\n// Tests to write:\n// getStatus()\n// getCompany()\n// getSubcompanyById()\n// postUser()\n// updateComp... | javascript | chosen |
[
{
"from": "system",
"value": "Fix - remove Year and Agenda view in General settings\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { c } from 'ttag';\n\nimport { SETTINGS_VIEW } from '../../constants';\n\nconst { DAY, WEEK, MONTH, YEAR... | javascript | chosen |
[
{
"from": "system",
"value": "Fix triangle wave for the modulo of a negative number issue\n"
},
{
"from": "human",
"value": "/**\n * @depends TableLookupOscillator.js\n */\nvar Triangle = new Class({\n Extends: TableLookupOscillator,\n initialize: function(audiolet, frequency) {\n T... | javascript | chosen |
[
{
"from": "system",
"value": "parseTime: Duplicate commentary on dayOfYear handling\n\nSuggested-by: Hawken Rives <172aa8a882025f3e2d2bd621702ac9e557631cef@fastmail.fm>\nSigned-off-by: Kristofer Rye <1ed31cfd0b53bc3d1689a6fee6dbfc9507dffd22@gmail.com>\n"
},
{
"from": "human",
"value": "// @flow\... | javascript | chosen |
[
{
"from": "system",
"value": "Update expert card tests to use enzyme.\n"
},
{
"from": "human",
"value": "/* Copyright (C) 2018 Canonical Ltd. */\n'use strict';\n\nconst React = require('react');\n\nconst ExpertCard = require('../expert-card/expert-card');\nconst EXPERTS = require('../expert-card... | javascript | chosen |
[
{
"from": "system",
"value": "Refresh view when adding a new card\n"
},
{
"from": "human",
"value": "var app = angular.module('sprintBoard', ['ui.bootstrap']);\n\napp.controller('boardController', function($scope, $http, $uibModal) {\n var promise = $http.get(API_ROOT + 'board/' + BOARD_HASH)... | javascript | chosen |
[
{
"from": "system",
"value": "Configure parse on task server startup\n"
},
{
"from": "human",
"value": "\nconst debug = require('debug')('server:app');\nconst serverRegistration = require('./server-registration');\nconst heartBeat = require('./heart-beat');\nmodule.exports = function () {\n // ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix routes for a better state hierarchy\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar app = angular.module(\"VinculacionApp\", ['ui.router', 'ngAnimate']);\n\napp.config(['$stateProvider', '$urlRouterProvider',function($stateProvider, $urlRouterProvider)... | javascript | chosen |
[
{
"from": "system",
"value": "Fix equality statement to use === rather than ==.\n"
},
{
"from": "human",
"value": "Application.Services.factory('watcher',\n function () {\n var watcherService = {};\n\n watcherService.watch = function (scope, variable, fn) {\n scope.$w... | javascript | chosen |
[
{
"from": "system",
"value": "Set up other views and collections.\n"
},
{
"from": "human",
"value": "$(function() {\n\ttestModel = new Models.ItemListing({\n\t\tid: 0,\n\t\tname: \"Test Item\",\n\t\tprice: \"(USD) $5\",\n\t\tlocation: \"Singapore\",\n\t\tbuyers: [0],\n\t\towner: 0,\n\t\timageUrl... | javascript | chosen |
[
{
"from": "system",
"value": "Improve inline error display handling for modals.\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n canShoErrors: false,\n\n fieldNameDidChange: Ember.on('init', Ember.observer('fieldName', function() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Move period label to a config property\n"
},
{
"from": "human",
"value": "define([\n 'extensions/views/single-stat'\n],\nfunction (SingleStatView) {\n var ResponeTimeNumberView = SingleStatView.extend({\n\n changeOnSelected: true,\n\n getValue: function () {... | javascript | chosen |
[
{
"from": "system",
"value": "Migrate API call to use fetch\n"
},
{
"from": "human",
"value": "const axios = require('axios');\nconst through2 = require('through2');\nconst JSONStream = require('JSONStream');\n\nfunction processRow(filing, enc, next) {\n if (filing.fec_file_id) {\n fil... | javascript | chosen |
[
{
"from": "system",
"value": "Add & comment out --harmony_arrow_functions\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar findup = require('findup-sync');\nvar spawnSync = require('child_process').spawnSync;\nvar gruntPath = findup('node_modules/grunt-cli/bin/grunt', {cwd: __dirname});\n... | javascript | chosen |
[
{
"from": "system",
"value": "Gifs: Move map to normalize function.\n"
},
{
"from": "human",
"value": "function ddg_spice_gifs(res) {\n if(!res || !res.data || !res.data.length){ return; }\n\n var searchTerm = DDG.get_query().replace(/gif+/i,'').trim();\n\n var items = res.data.map(func... | javascript | chosen |
[
{
"from": "system",
"value": "Use Mongo instead of Meteor\n"
},
{
"from": "human",
"value": "function configureAdminMongo () {\n var AdminCollection = new Meteor.Collection('_PureAdmin-Admins');\n PureAdmin.isAdmin = function(userId) {\n if(userId === null) {\n return false;\n }\n ... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.