conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Set selected topic on state\n\n"
},
{
"from": "human",
"value": "/*\n *\n * NavigationContainer reducer\n *\n */\n\nimport { fromJS } from 'immutable';\nimport {\n REQUEST_TOPICS_SUCCEEDED,\n} from './constants';\n\nconst initialState = fromJS({\n topics: [],\n});... | javascript | chosen |
[
{
"from": "system",
"value": "Fix tailwind settings that purged all classes\n"
},
{
"from": "human",
"value": "module.exports = {\n purge: [\n \"../../views/**/*.erb\",\n \"../../views/**/*.html.erb\"\n ],\n darkMode: false, // or 'media' or 'class'\n theme: {\n extend: {},\n },\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove sendInBlue referrers from phishing list\n"
},
{
"from": "human",
"value": "(function() {\n'use strict';\n\nvar phishingExpressions = [\n /\\.beget\\.tech/,\n /acusticanapoli\\.com/,\n /archer\\.fr/,\n /assurance-ameli-recouvrement\\.com/,\n /as... | javascript | chosen |
[
{
"from": "system",
"value": "ADD todo as a reminder to remove this file at V6\n"
},
{
"from": "human",
"value": "import { window } from 'global';\nimport deprecate from 'util-deprecate';\n\nimport ReactCentered from './react';\nimport VueCentered from './vue';\n\nconst Centered = deprecate(\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use FIREBASE_URL in waitList module.\n"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n\n angular\n .module('app.waitList')\n .controller('WaitListController', WaitListController);\n\n WaitListController.$inject = ['$firebaseArray'];\n\n fu... | javascript | chosen |
[
{
"from": "system",
"value": "Add proper region name for the Overwatch rank command\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst DiscordCommand = require('../../../../bot/modules/DiscordCommand');\n\nconst models = require('../../../models');\n\n\nclass CommandRank extends DiscordCo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix alias service detail display\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport Service from 'ui/models/service';\n\nconst esc = Ember.Handlebars.Utils.escapeExpression;\n\nvar DnsService = Service.extend({\n type: 'dnsService',\n intl: Embe... | javascript | chosen |
[
{
"from": "system",
"value": "Add site footer to each documentation generator\n"
},
{
"from": "human",
"value": "var _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar cssstats = require('cssstats')\n\nvar module = require('tac... | javascript | chosen |
[
{
"from": "system",
"value": "Fix API host URL for Ember\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport DS from 'ember-data';\n\nexport default DS.RESTAdapter.extend({\n host: Ember.apiHost,\n});\n"
},
{
"from": "gpt",
"value": "import DS from 'ember-data';\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Make JS function for preventing body scroll with id more secure\n\nCheck if we are dealing with a modal by checking if the first\nelement in selected element has a class `modal-content`.\n"
},
{
"from": "human",
"value": "(function () {\n\n\t'use strict';\n\n\t// Hi... | javascript | chosen |
[
{
"from": "system",
"value": "Format interval in the message to improve readability\n"
},
{
"from": "human",
"value": "/**\n * lib/app.js: main module for `bonta` CLI utility\n *\n * Copyright 2015, Sudaraka Wijesinghe <sudaraka@sudaraka.org>\n *\n * This program comes with ABSOLUTELY NO WARRANT... | javascript | chosen |
[
{
"from": "system",
"value": "Use only one entry in production\n"
},
{
"from": "human",
"value": "var config = require('./webpack.config.js')\n\nvar path = require('path')\nvar webpack = require('webpack')\n\nconfig.debug = false\nconfig.devtool = 'source-map'\n\nconfig.output.filename = '[name]... | javascript | chosen |
[
{
"from": "system",
"value": "Remove var declaration from richtexteditor init js\n"
},
{
"from": "human",
"value": "/* ***** ----------------------------------------------- ***** **\n** ***** Rich Text Editor JS\n** ***** ----------------------------------------------- ***** */\n\n/* global Main... | javascript | chosen |
[
{
"from": "system",
"value": "Change default view to VerticalDetailView to retain preexisting FObjectProperty view rendering behaviour\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 */... | javascript | chosen |
[
{
"from": "system",
"value": "Add getRandom() function and fix latlong function\n"
},
{
"from": "human",
"value": "/**\n * The 'leopard' namespace\n * @type {Object}\n */\n'use strict';\n\n(function() {\n\tvar leopard = {\n\t\tapi: {\n\t\t\tkey: 'AIzaSyCbPuQGIShYS-IYU1T6eIfhxH9yc-8biCg',\n\t\t\t... | javascript | chosen |
[
{
"from": "system",
"value": "Format the clock time when a bus will arrive at the stop\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport moment from 'moment';\nimport stringToHue from 'bus-detective/utils/string-to-hue';\nvar inject = Ember.inject;\n\nexport default Ember.Com... | javascript | chosen |
[
{
"from": "system",
"value": "Change x-axis from time to category\n\nEqual spacing between elements on the x-axis\n"
},
{
"from": "human",
"value": "var svg = dimple.newSvg(\"#plot\", 800, 600);\n\nfunction replot(data) {\n svg.selectAll('*').remove();\n console.log($('#grouping').val())\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use computed readonly so that it's clear we're not writing to it\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nconst { computed, inject } = Ember;\n\nexport default Ember.Controller.extend({\n currentAccount: inject.service(),\n loggedIn: comput... | javascript | chosen |
[
{
"from": "system",
"value": "CHANGE: Refresh page on reset button\n"
},
{
"from": "human",
"value": "(function (g, d, $, u){\n var\n init = function() {\n var\n title = $('title').text() + ' :: Przemysław SID Szelenberger';\n\n $('title').text(titl... | javascript | chosen |
[
{
"from": "system",
"value": "Fix file chunk size off-by-one error\n"
},
{
"from": "human",
"value": "module.exports = class RarFileChunk {\n constructor(fileMedia, startOffset, endOffset) {\n this.fileMedia = fileMedia;\n this.startOffset = startOffset;\n this.endOffset = endOffset;\n... | javascript | chosen |
[
{
"from": "system",
"value": ":sparkles: Use initialized array as memory\n"
},
{
"from": "human",
"value": "import { handleActions } from \"redux-actions\";\nimport { changeSource, step, run, reset } from \"actions\";\n\nimport interpreter from \"interpreter\";\n\nconst initialSource = `++++++++... | javascript | chosen |
[
{
"from": "system",
"value": "Add setup-db and setup-doc targets.\n"
},
{
"from": "human",
"value": "var cly = require('cly'),\n Couchpenter = require('./couchpenter').Couchpenter,\n p = require('path');\n\nfunction exec() {\n\n var options = {\n url: {\n string: '-u url',\n help... | javascript | chosen |
[
{
"from": "system",
"value": ":rocket: Add unit tests for InvoiceUtils: parsePage and parseLimit\n"
},
{
"from": "human",
"value": "process.env.NODE_ENV = 'test';\n\nvar chai = require('chai');\nvar should = chai.should();\nvar utils = require('../controllers/utils/InvoiceUtils');\n\nvar assert ... | javascript | chosen |
[
{
"from": "system",
"value": "Change webpack dev server port\n"
},
{
"from": "human",
"value": "var webpack = require('webpack')\nvar path = require('path')\nvar autoprefixer = require('autoprefixer')\n\nmodule.exports = {\n entry: './index.js',\n output: {\n path: './',\n fi... | javascript | chosen |
[
{
"from": "system",
"value": "Update type to updated namespace\n"
},
{
"from": "human",
"value": "/*browser:true*/\n/*global define*/\ndefine(\n [\n 'uiComponent',\n 'Magento_Checkout/js/model/payment/renderer-list'\n ],\n function (\n Component,\n rendererLi... | javascript | chosen |
[
{
"from": "system",
"value": "Rewrite Oid js convenience wrapper.\n"
},
{
"from": "human",
"value": "var git = require( '../' );\n\nvar Oid = function(rawOid) {\n var self = {};\n\n if(rawOid instanceof git.raw.Oid) {\n self.oid = rawOid;\n } else {\n self.oid = new git.raw.Oid();\n }\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove comma at end of line when there are no other items in the array.\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar webpack = require('webpack');\n\nmodule.exports = function(fabricatorConfig) {\n\n\t\"use strict\";\n\n\tvar config = {\n\t\te... | javascript | chosen |
[
{
"from": "system",
"value": "Use the extract-text-webpack-plugin in scss\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst NODE_ENV = process.env.NODE_ENV;\n\nmodule.exports = {\n mode: NODE_ENV || 'production',\n\n entry: {\n 'app': './src/js/app.js',\n 'train-num... | javascript | chosen |
[
{
"from": "system",
"value": "Throw error when Wi-Fi is turned off\n\nFixes #8.\n"
},
{
"from": "human",
"value": "'use strict';\nconst execa = require('execa');\n\nmodule.exports = () => {\n\tconst cmd = '/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport'... | javascript | chosen |
[
{
"from": "system",
"value": "Add current time to output messages.\n"
},
{
"from": "human",
"value": "var chalk = require('chalk');\nvar options = require('./options');\nvar Promise = require('promise');\n\nfunction say(message, type) {\n var shouldEmit = true;\n var header... | javascript | chosen |
[
{
"from": "system",
"value": "Add platform, downgrade platformVersion for Android\n\nBased on\nhttps://github.com/appium/appium/blob/master/lib/devices/android/android\n.js\n"
},
{
"from": "human",
"value": "// Test runner\nvar runTests = require('./affixing-header-specs'),\n browsers = [\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add sassify_meshki() function to compile Meshki's main.scss\n"
},
{
"from": "human",
"value": "const fs = require('fs')\nconst colors = require('colors')\nconst sass = require('node-sass')\n\nfunction remove_dir(path) {\n if (fs.existsSync(path)) {\n fs.r... | javascript | chosen |
[
{
"from": "system",
"value": "Set more detail log on error\n"
},
{
"from": "human",
"value": "var sys = require('sys');\nvar fs = require('fs');\n\nvar cache = {}\nfunction now() { return (new Date).getTime(); }\n\nexports.put = function(key, value, time) {\n fs.writeFile('cache/' + key, value,... | javascript | chosen |
[
{
"from": "system",
"value": "SnakeCase: Enable snake case mapping in ORM.\n"
},
{
"from": "human",
"value": "import { Model /* snakeCaseMappers */ } from 'objection'\nimport { toGeoJSON } from '../util/jsonUtils'\n\nexport class BaseModel extends Model {\n // TODO enable this after migrating f... | javascript | chosen |
[
{
"from": "system",
"value": "Fix modals in bs5 for isntall module\n"
},
{
"from": "human",
"value": "export class Modules {\n constructor () {\n $('.jsConfirmationTrigger').off().on('click', this.installModal)\n }\n\n installModal (e) {\n // prevent default\n e.preventDefault()\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add debug.html to build script\n"
},
{
"from": "human",
"value": "var historyApiFallback = require(\"connect-history-api-fallback\");\n\nvar dest = \"./build\";\nvar src = './src';\n\n\n\nmodule.exports = {\n browserSync: {\n server: {\n // Serv... | javascript | chosen |
[
{
"from": "system",
"value": "Add new function to get analysis constraints as a json obj to be sent to the backend as parameter.\n"
},
{
"from": "human",
"value": "\nvar RmodulesView = function () {}\n\nRmodulesView.prototype.clear_high_dimensional_input = function (div) {\n //Clear the drag ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix path of jquery-ui effects.\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": "Refactor missed stuff to ES6.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar React = require('react');\nvar Draggable = require('draggabilly');\n\n/**\n * Makes the element draggable inside its parent container.\n */\nmodule.exports = {\n\n\tgetInitialS... | javascript | chosen |
[
{
"from": "system",
"value": "chore: Use vers 0.61.1 of mass-tools\n"
},
{
"from": "human",
"value": "export { default } from '../../../../../../../../lib/mass-tools/0.58.2/mass-tools.min';\n// } from 'http://localhost:9898/cheminfo-js/molecular-formula/dist/molecular-formula.js';\n"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Modify production url for github hosting\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'eapp',\n environment: environment,\n baseURL: '/',\n locationType: 'auto',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change input class name for GMap input template.\n"
},
{
"from": "human",
"value": "angular.module('myApp', ['uiGmapgoogle-maps'])\n\n.config(function (uiGmapGoogleMapApiProvider) {\n\tuiGmapGoogleMapApiProvider.configure({\n\t\t// key: 'your api key',\n\t\tv: '3... | javascript | chosen |
[
{
"from": "system",
"value": "Create webview, navigate it, and once it loads fire devicereaddy\n"
},
{
"from": "human",
"value": "\n\nmodule.exports = {\n\tloadView:function(win, fail, args) {\n\t\tconsole.log(\"loadview proxy called with \" + args);\n\t},\n\tdismissView:function(win, fail, args... | javascript | chosen |
[
{
"from": "system",
"value": "Move tags to new pagination\n"
},
{
"from": "human",
"value": "// @flow\nimport callAPI from 'app/actions/callAPI';\nimport { Tag } from './ActionTypes';\nimport type { Thunk } from 'app/types';\nimport { tagSchema } from 'app/reducers';\n\nexport function fetch(id:... | javascript | chosen |
[
{
"from": "system",
"value": "Make binding working in table location (JOIN)"
},
{
"from": "human",
"value": "'use strict';\n\nconst Node = require('../Node');\n\nclass TableLocation extends Node\n{\n\tconstructor(complexIdent)\n\t{\n\t\tsuper();\n\n\t\tconst source = complexIdent.fragments.shift... | javascript | chosen |
[
{
"from": "system",
"value": "Access data of object instead\n"
},
{
"from": "human",
"value": "function populateMarkers(mapData) {\n\tconsole.log(mapData[0]);\n}\n\nfunction initMap() {\n\tvar element = document.createElement('div');\n\tvar mapDiv = document.getElementById('map-hider').appendChi... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce chattiness of dev debug logging"
},
{
"from": "human",
"value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n baseURL: '/',\n locationType: 'auto',\n EmberENV: {\n FEATURES: {\n // Here you can enab... | javascript | chosen |
[
{
"from": "system",
"value": "Change spectra-data to HEAD version for testing"
},
{
"from": "human",
"value": "'use strict';\n\nexport {default as OCLE} from 'https://www.lactame.com/lib/openchemlib-extended/1.13.0/openchemlib-extended.js';\nexport {default as SD} from 'https://www.lactame.com/l... | javascript | chosen |
[
{
"from": "system",
"value": "Update require signature for React and React Native"
},
{
"from": "human",
"value": "'use strict';\n\nvar React = require('react-native');\n\nvar {\n requireNativeComponent,\n DeviceEventEmitter,\n View\n} = React;\n\nvar Component = requireNativeComponent('RSSig... | javascript | chosen |
[
{
"from": "system",
"value": "Remove dead code from test\n"
},
{
"from": "human",
"value": "test('script_error_fallback.php', function (assert, document) {\n var expected = [\n 'inline',\n 'deferred inline',\n 'synchronous external',\n 'second inline',\n 'de... | javascript | chosen |
[
{
"from": "system",
"value": "Fix wrong pagination limit data type\n"
},
{
"from": "human",
"value": "import Vue from 'vue';\nimport Vuex from 'vuex';\n\nimport modules from './module';\n\nVue.use(Vuex);\n\n// global state\nconst state = {\n paginationLimit: 20\n}\n\n// global mutations\nconst ... | javascript | chosen |
[
{
"from": "system",
"value": "Improve the gulp file.\nAdds watch and default commands.\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar less = require('gulp-less');\nvar path = require('path');\nvar minifyCSS = require('gulp-minify-css');\nvar rename = require('gulp-rename');\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix selection not occurring on compact select+expand\n"
},
{
"from": "human",
"value": "(function(bitflux) {\n 'use strict';\n\n angular.module('openfin.showcase')\n .directive('showcase', ['quandlService', 'configService', (quandlService, configService... | javascript | chosen |
[
{
"from": "system",
"value": "Check that adding a new todo works\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport $ from 'jquery';\nimport App from './app.setup.js';\n\n\ndescribe('App', function() {\n describe('adding new todos', function... | javascript | chosen |
[
{
"from": "system",
"value": "Use bs for localhost (needed for tests)\n"
},
{
"from": "human",
"value": "import {computed} from '@ember/object';\nimport Service from '@ember/service';\n\nexport default class Fw extends Service {\n\n @computed()\n get isBs3() {\n return window.location.href.... | javascript | chosen |
[
{
"from": "system",
"value": "Allow port in host specification\n"
},
{
"from": "human",
"value": "var joi = require(\"joi\");\n\nmodule.exports = {\n host: joi.string().hostname().required(),\n serviceType: joi.string().min(1).required(),\n metadata: joi.object(),\n serviceUri: joi.string().... | javascript | chosen |
[
{
"from": "system",
"value": "Add gulp-changed to improve build performance in minimizing images\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulp = require('gulp');\nvar imagemin = require('gulp-imagemin');\n\n\ngulp.task('minimizeImages', function() {\n return gulp.src('img/*.gif')... | javascript | chosen |
[
{
"from": "system",
"value": "Update test to be compatible with browsers that do not support err.stack\n"
},
{
"from": "human",
"value": "if (!chai) {\n var chai = require('..');\n}\n\nvar assert = chai.assert;\n\nsuite('assert-config', function () {\n\n function fooThrows () {\n assert.equ... | javascript | chosen |
[
{
"from": "system",
"value": "Use a string to represent the name of a variable to check.\n"
},
{
"from": "human",
"value": "'use strict';\n\n(function() {\n\nangular.requires('//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js', function() {\n return typeof window.$ !== 'undefined';\... | javascript | chosen |
[
{
"from": "system",
"value": "Set a default value for editorType\n\nOops. Forgot about that one.\n"
},
{
"from": "human",
"value": "// Copyright (c) 2011 David Benjamin. All rights reserved.\n// Use of this source code is governed by an MIT-style license that can be\n// found in the LICENSE file... | javascript | chosen |
[
{
"from": "system",
"value": "Update datetime_picker.js so that the calendar icon works on click too.\n"
},
{
"from": "human",
"value": "//= require moment\n//= require bootstrap-datetimepicker\n\n$(function() {\n $(document).on('ready page:change', function() {\n $('input.datetime_picker').... | javascript | chosen |
[
{
"from": "system",
"value": "Comment out client version injection for now\n"
},
{
"from": "human",
"value": "import $ from 'jquery';\n\nimport versionInfo from 'girder/version';\nimport View from 'girder/views/View';\nimport { cancelRestRequests, getApiRoot } from 'girder/rest';\nimport events ... | javascript | chosen |
[
{
"from": "system",
"value": "Add resolve, reject handlers. Try to work with them\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nexport default function getReplies(topicId) {\n return new Promise(function () {\n _getRepliesFromTopic(topicId, function (data) {\n let replies = data... | javascript | chosen |
[
{
"from": "system",
"value": "Fix comment about Assigned Unicode property\n"
},
{
"from": "human",
"value": "const {\n assemble,\n writeFile,\n unicodeVersion\n} = require('./utils.js');\n\n// This intentially includes only the binary properties required by UTS 18 Level 1 RL1.2 for Unic... | javascript | chosen |
[
{
"from": "system",
"value": "Update the idea town URL\n"
},
{
"from": "human",
"value": "var self = require('sdk/self');\n\n// a dummy function, to show how tests work.\n// to see how to test this function, look at test/test-index.js\nfunction dummy(text, callback) {\n callback(text);\n}\n\nex... | javascript | chosen |
[
{
"from": "human",
"value": "Add the first part of the server core\n"
},
{
"from": "gpt",
"value": "/**\n * Server root\n *\n * Collects all routes and starts the server\n */\nconst glob = require('glob-promise');\nconst express = require('express');\nconst { partial } = require('lodash');\ncons... | javascript | chosen |
[
{
"from": "human",
"value": "Add ability to purchase potatoes and lemons\n"
},
{
"from": "gpt",
"value": "/**\n * Manages items that the player can buy.\n * @type {Object}\n */\nconst itemManager = {\n\n /**\n * All the items available for purchase.\n * @type {Object}\n */\n ITEMS: [\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix requires if being used as a library\n"
},
{
"from": "human",
"value": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.o... | javascript | chosen |
[
{
"from": "system",
"value": "Return last 50 messages only from cache\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar eventStream = require('express-eventsource')();\nvar clientSSDP = require('./clients/ssdp');\nvar clientMDNS = require('./clients/mdns');\n\nvar app ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow passing options to request lib\n"
},
{
"from": "human",
"value": "'use strict';\nvar request = require('request');\nvar xray = require('x-ray')();\nvar tabletojson = require('tabletojson');\n\nmodule.exports.get = function get(url) {\n return new Promise(func... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor job summary adapter to use the namespace ID base class\n"
},
{
"from": "human",
"value": "import Watchable from './watchable';\n\nexport default class JobSummaryAdapter extends Watchable {\n urlForFindRecord(id, type, hash) {\n const [name, namespace] =... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Allow router to handle root routes\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst helmet = require('helmet');\nconst winston = require('winston');\nconst bodyParser = require('body-parser');\nconst env = require('./src/env');\n\nv... | javascript | chosen |
[
{
"from": "system",
"value": "Throw when no XHR object available.\n"
},
{
"from": "human",
"value": "function newXHR() {\n if (window.ActiveXObject)\n return new ActiveXObject('Microsoft.XMLHTTP');\n else if (window.XMLHttpRequest)\n return new XMLHttpRequest();\n return null;\n};\n\nmo... | javascript | chosen |
[
{
"from": "system",
"value": "Add js as input format\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar babel = require('babel-core');\n\nexports.name = 'babel';\nexports.inputFormats = ['es6', 'babel'];\nexports.outputFormat = 'js';\n\n/**\n * Babel's available options.\n */\nvar available... | javascript | chosen |
[
{
"from": "system",
"value": "Fix failing brfs browserify transform\n\nBrowserify currently fails on this package due to a known issue. See substack/node-browserify/issues/1142 and substack/brfs/issues/28.\r\n\r\nWe can work around this by breaking up the inline `var` statement."
},
{
"from": "human... | javascript | chosen |
[
{
"from": "system",
"value": "Change ping trigger to need exclaimation point\n"
},
{
"from": "human",
"value": "const Discord = require('discord.io');\n\nconst bot = new Discord.Client({\n token: process.env.DISCORD_TOKEN,\n autorun: true,\n});\n\nconst previousMessages = [];\n\nbot.on('ready'... | javascript | chosen |
[
{
"from": "system",
"value": "Add regex rule for repeater selector\n"
},
{
"from": "human",
"value": "var utilConfig = { \n\tregexList : [ \n\t\t{\n\t\t\ttype : \"attr\",\n\t\t\tattrName : \"ng-model\",\n\t\t\tmatch : /[b|B]y\\.model\\(\\s*['|\"](.*?)['|\"]\\s*\\)/gi\n\t\t},\n\t\t{\n\t\t\ttype ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix gulp watch file path\n"
},
{
"from": "human",
"value": "const gulp = require('gulp');\nconst sync = require('browser-sync').create();\n\n// Server\n\ngulp.task('default', [], () => {\n\tsync.init({\n\t\tui: false,\n\t\tnotify: false,\n\t\tserver: {\n\t\t\tbaseDi... | javascript | chosen |
[
{
"from": "system",
"value": "Add POSIX compliant newline at end of generated JSON file.\n"
},
{
"from": "human",
"value": "var fs = require('fs');\nvar async = require('async');\n\n\nmodule.exports = function (path, data, callback) {\n\n function load (callback) {\n fs.readFile(path, 'utf8'... | javascript | chosen |
[
{
"from": "system",
"value": "Check for navigator before checking its properties.\n"
},
{
"from": "human",
"value": "// Shim to avoid requiring Velocity in Node environments, since it\n// requires window. Note that this just no-ops the components so\n// that they'll render, rather than doing som... | javascript | chosen |
[
{
"from": "system",
"value": "Remove useless variables + iife\n"
},
{
"from": "human",
"value": "angular.module('qtip2', [])\n .directive('qtip', function($rootScope, $timeout, $window) {\n return {\n restrict: 'A',\n link: function(scope, element, attrs) {\n var my = attrs.... | javascript | chosen |
[
{
"from": "system",
"value": "Fix playground webpack so that target is `node`\n"
},
{
"from": "human",
"value": "const path = require('path');\n\nmodule.exports = {\n entry: [\n './playground/client' // Your appʼs entry point\n ],\n output: {\n publicPath: 'http://localhost:8080/build/'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Google Analytics tracking code\n"
},
{
"from": "human",
"value": "(function (window) {\n \"use strict\";\n\n window.GOVUK = window.GOVUK || {};\n\n const trackingId = 'UA-26179049-1';\n\n // Disable analytics by default\n window[`ga-disable-${trackingId}`] ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove load_deferred, not needed anymore\n"
},
{
"from": "human",
"value": "if (typeof Kwf == 'undefined') Kwf = {};\nKwf.loadDeferred = function(fn) {\n if (!Kwf._loadDeferred) Kwf._loadDeferred = [];\n if (Kwf._loadDeferred === 'done') {\n fn();\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add array-based command to example\n"
},
{
"from": "human",
"value": "import React, { useState } from 'react'\nimport Dictaphone from './Dictaphone'\n\nconst DictaphoneWidgetA = () => {\n const [message, setMessage] = useState('')\n const commands = [\n {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add clear command to example\n"
},
{
"from": "human",
"value": "import React, { useState } from 'react'\nimport Dictaphone from './Dictaphone'\n\nconst DictaphoneWidgetA = () => {\n const [message, setMessage] = useState('')\n const commands = [\n {\n comm... | javascript | chosen |
[
{
"from": "system",
"value": "Send query param to backend\n\nsend query param ?mark_as_seen=true on route /find-broadcasts so the\nbackend can create impressions with a neutral response\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n s... | javascript | chosen |
[
{
"from": "system",
"value": "Make dashboard list fetch from API\n\nThis removes some mocked-out data to make the Dashboard list actually\nhit the API.\n"
},
{
"from": "human",
"value": "// import AJAX from 'utils/ajax';\n\nexport function getDashboards() {\n // return AJAX({\n // method: 'G... | javascript | chosen |
[
{
"from": "system",
"value": "Fix url for get request\n"
},
{
"from": "human",
"value": "document.addEventListener(\"DOMContentLoaded\", function (event) {\n // redirect to 7777 port\n // ping golang counter\n getRequest(\"localhost:7777/count\", function (request) {\n var respon... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"GCW-1826 Disable scroll when menu is open\"\n\nThis reverts commit 18e774eb4e8a0033727c0a16e494ed04c60c8abb.\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport config from '../config/environment';\n\nexport default Ember.Component.extend(... | javascript | chosen |
[
{
"from": "system",
"value": "Fix path to beautify libs.\n"
},
{
"from": "human",
"value": "/**\nThe following batches are equivalent:\n\nvar beautify_js = require('js-beautify');\nvar beautify_js = require('js-beautify').js;\nvar beautify_js = require('js-beautify').js_beautify;\n\nvar beautify... | javascript | chosen |
[
{
"from": "system",
"value": "fix(test): Add prettierPath to Jest config\n\n"
},
{
"from": "human",
"value": "module.exports = {\n testPathIgnorePatterns: ['<rootDir>[/\\\\\\\\](dist|node_modules)[/\\\\\\\\]'],\n moduleNameMapper: {\n '(seek-style-guide/react|.(css|less)$)': require.resolve... | javascript | chosen |
[
{
"from": "system",
"value": "Make LCD behave a bit better\n"
},
{
"from": "human",
"value": "function Messages(clear, empty, firstMessage, displayMessage, displayMessageLong) {\n\tthis.messages = [];\n\tthis.clear = clear;\n\tthis.empty = empty;\n\tthis.firstMessage = firstMessage;\n\tthis.disp... | javascript | chosen |
[
{
"from": "system",
"value": "Fix mock ads for development\n"
},
{
"from": "human",
"value": "\nexport default function (adId) {\n var mockNetworkDelayMs = 0\n const useMockDelay = false\n if (useMockDelay) {\n mockNetworkDelayMs = Math.random() * (1500 - 900) + 900\n }\n\n // Mock retur... | javascript | chosen |
[
{
"from": "system",
"value": "Change Array check using Array.isArray"
},
{
"from": "human",
"value": "var camelCase = require('camel-case');\nvar snakeCase = require('snake-case');\nvar paramCase = require('param-case');\n\nvar changeKeys = function changeKeys(transformer, obj) {\n if (Objec... | javascript | chosen |
[
{
"from": "system",
"value": "Make replacements for [year] and [fullname]\n"
},
{
"from": "human",
"value": "#!/usr/local/bin/node\n\nvar program = require('commander');\nvar http = require('http');\nvar fs = require('fs');\n\nvar version = require('./package.json').version;\n\nprogram\n .comma... | javascript | chosen |
[
{
"from": "system",
"value": "Enhance cache to one week\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar express = require('express');\nvar morgan = require('morgan');\nvar compression = require('compression');\nvar bodyParser = require('body-parser');\nvar cookieParser = re... | javascript | chosen |
[
{
"from": "system",
"value": "Add HTMLParser to viewless mdoels.\n"
},
{
"from": "human",
"value": "/**\n * @license\n * Copyright 2012 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance wi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix odometer spacing on smaller screen sizes\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { PropTypes } from 'prop-types'\nimport Odometer from 'react-odometerjs'\nimport Col from 'react-bootstrap/lib/Col'\n\nexport default class Stat extends... | javascript | chosen |
[
{
"from": "system",
"value": "Allow testing with ip for dev\n"
},
{
"from": "human",
"value": "var CleanWebpackPlugin = require('clean-webpack-plugin');\nvar CopyWebpackPlugin = require('copy-webpack-plugin');\n\n\nvar debug = '&debug=true'\n\nmodule.exports = {\n entry: './src/index.js',\n\n ... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.