conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Clone form template: any number can be the placeholder\n\nnot just -1, through the magic of regex\n"
},
{
"from": "human",
"value": "(function ($) {\n $.fn.clone_form_template = function () {\n return $(this).map(function () {\n return update($(this).clone(... | javascript | chosen |
[
{
"from": "system",
"value": "Fix partitioning for channels with capital letters\n"
},
{
"from": "human",
"value": "import { murmurHash1 } from '../util/murmur';\n\nclass PartitionDecider {\n constructor(config) {\n this.config = config;\n }\n\n getPartitionForChannel(channel) {\... | javascript | chosen |
[
{
"from": "system",
"value": "Add handling set prescriber action\n"
},
{
"from": "human",
"value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport { PRESCRIBER_ACTIONS } from '../actions/PrescriberActions';\n\nconst prescriberInitialState = () => ({\n currentPres... | javascript | chosen |
[
{
"from": "system",
"value": "Fix path to build output\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\r\n\r\nconst fs = require('fs-extra');\r\nconst nunjucks = require('nunjucks');\r\nconst packageJson = require('../package.json');\r\n\r\nlet results = nunjucks.render('chocolatey/rename... | javascript | chosen |
[
{
"from": "system",
"value": "Fix full reload on specific message.\n"
},
{
"from": "human",
"value": "const serverRouter = require('server-router')\nconst browserify = require('browserify')\nconst bankai = require('bankai')\nconst http = require('http')\n\nconst PORT = 8080\n\nconst server = htt... | javascript | chosen |
[
{
"from": "system",
"value": "Fix logins on VK and FB\n"
},
{
"from": "human",
"value": "module.exports = {\n title: 'Andrey Prokopyuk',\n summary: [\n \"Hello! My name is Andrey. I'm a developer in\",\n '<a href=\"https://yandex.com\" target=\"_blank\">Yandex</a>,',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update dummy app config to use `rootURL`\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'dummy',\n environment: environment,\n rootURL: '/',\n locationType: 'auto',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix arrow functions should not return assignment\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst AbstractDataSource = require(path.resolve(__dirname, 'abstract-data-source.js'));\nconst Twit = require('twit');\n\nclass Twitter extends Abstrac... | javascript | chosen |
[
{
"from": "system",
"value": "Test that getOptions returns user options when they are provided\n"
},
{
"from": "human",
"value": "QUnit.test( \"getOptions default\", function( assert ) {\n\n var options = $.fn.inputFileText.getOptions();\n\n assert.equal(options.text, \n 'Choose Fil... | javascript | chosen |
[
{
"from": "system",
"value": "Trim the email before logging-in\n"
},
{
"from": "human",
"value": "var TopLevelView = require('ui/common/components/TopLevelView');\nvar NetworkHelper = require('helpers/NetworkHelper');\n\nfunction LoginView() {\n\n var loginUrl = Ti.App.Properties.getString('ser... | javascript | chosen |
[
{
"from": "system",
"value": "Fix resource normalization for under_scored props\n\ncloses #1\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport DS from 'ember-data';\n\nexport default DS.JSONAPISerializer.extend({\n _normalizeAttributes(attributes) {\n var normalized... | javascript | chosen |
[
{
"from": "system",
"value": "Remove a comment that wasn't needed anymore.\n"
},
{
"from": "human",
"value": "$(function () {\n \n $(\".boundBoxSize\").on(\"click\", function () {\n var currentValue = $(this).val();\n var grnsightContainerClass = \"grnsight-container \" + currentValue;\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add a failing test for deep withRouter() updates\n"
},
{
"from": "human",
"value": "import expect from 'expect'\nimport React, { Component } from 'react'\nimport { render, unmountComponentAtNode } from 'react-dom'\nimport createHistory from '../createMemoryHistory'\... | javascript | chosen |
[
{
"from": "system",
"value": "Make starship remember its coordinates\n"
},
{
"from": "human",
"value": "var hammer = require ('hammerjs')\n , canvas = document.getElementById('canvas')\n , ctx = canvas.getContext('2d')\n , img = new Image() // Create new img element\n , i = 0\n , starship... | javascript | chosen |
[
{
"from": "system",
"value": "Add clic handler with basic interactivity\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\n\nvar BOARD_STATE = [\n [true, true, null],\n [null, false, false],\n [true, false, true],\n];\n\nclass Cell extends ... | javascript | chosen |
[
{
"from": "system",
"value": "Use Ember.run.later instead of setTimeout\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nfunction scrollToBottom() {\n Ember.$('#channel-content').animate({\n scrollTop: Ember.$('#channel-content ul').height()\n }, '500');\n}\n\nfunction focus... | javascript | chosen |
[
{
"from": "system",
"value": "Fix: Check if url is defined\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * @ngdoc filter\n * @name SubSnoopApp.filter:isImage\n * @function\n * @description\n * # isContent\n * Filter in the SubSnoopApp.\n */\nangular.module('SubSnoopApp')\n .filter('... | javascript | chosen |
[
{
"from": "system",
"value": "Add 'Vagrant vs Other Software' section to docs navigation\n"
},
{
"from": "human",
"value": "// The root folder for this documentation category is `pages/vmware`\n//\n// - A string refers to the name of a file\n// - A \"category\" value refers to the name of a dire... | javascript | chosen |
[
{
"from": "system",
"value": "Fix migration to modify multiple documents\n"
},
{
"from": "human",
"value": "Migrations.add({\n version: 1,\n name: \"Extract items to a separate collection from the nested field\",\n up: function () {\n Flights.find({items: {$exists: true}}).forEach(function... | javascript | chosen |
[
{
"from": "system",
"value": "Remove redundant empty paragraph tag under IE family.\n"
},
{
"from": "human",
"value": "/*\n jquery.popline.justify.js 0.1.0-dev\n\n Version: 0.1.0-dev\n Updated: Aug 11th, 2014\n\n (c) 2014 by kenshin54\n*/\n;(function($) {\n $.popline.addButton({\n justif... | javascript | chosen |
[
{
"from": "system",
"value": "Set properties of AdminApi after ajax response\n"
},
{
"from": "human",
"value": "Discourse.AdminApi = Discourse.Model.extend({\n VALID_KEY_LENGTH: 64,\n\n keyExists: function(){\n var key = this.get('key') || '';\n return key && key.length === this.VALID_KE... | javascript | chosen |
[
{
"from": "system",
"value": "Hide `createdAt` and `updatedAt` for verified users\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst mongoose = require('mongoose');\n\nconst Schema = mongoose.Schema;\n\nconst userSchema = new Schema({\n email: {\n type: String,\n lowercase: true,\n... | javascript | chosen |
[
{
"from": "system",
"value": "Switch <TouchableHighlight> for simpler <TouchableOpacity>\n"
},
{
"from": "human",
"value": "/**\n * Created by BK on 21/06/16.\n *\n * @flow\n */\n\n 'use strict';\n\n import React, { Component } from 'react';\n import {\n Text,\n View,\n TouchableHigh... | javascript | chosen |
[
{
"from": "system",
"value": "Unify AppData, attribute is 'fill_window' everywhere\nTO maintain consistency with pack data, The fillWindow property should be fill_window, this is the style that all JSON in the API takes\n"
},
{
"from": "human",
"value": "pc.extend(pc.fw, function () {\r\n /**... | javascript | chosen |
[
{
"from": "system",
"value": "Fix caching time dependant MNT provider query (api)\n"
},
{
"from": "human",
"value": "const db = require('../db.js');\n\nconst cache = require('../utils/cache.js');\n\nasync function getTrips(id, coachOnly) {\n\t\n\treturn await cache.use('mnt-trips', id, async () ... | javascript | chosen |
[
{
"from": "system",
"value": "Update dashboard nav sign out.\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport Anchor from 'grommet/components/Anchor';\nimport Box from 'grommet/components/Box';\nimport Header from 'grommet/components/Header';\nimport Heading from 'grommet/co... | javascript | chosen |
[
{
"from": "system",
"value": "Use `commonmark` specification for Pandoc `md` format conversion\n"
},
{
"from": "human",
"value": "const ComponentConverter = require('../component/ComponentConverter')\nconst pandoc = require('../helpers/pandoc')\n\nclass DocumentMarkdownConverter extends Componen... | javascript | chosen |
[
{
"from": "system",
"value": "Fix editor card header duplicate prefix\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\nimport { StyleSheet, css } from 'aphrodite';\nimport { Card, CardHeader, CardText, CardActions} from 'material-ui/Card';\n\nconst styles = StyleShee... | javascript | chosen |
[
{
"from": "system",
"value": "Save some changes to Casper file\n"
},
{
"from": "human",
"value": "var casper = require('casper').create();\n\ncasper.start('http://localhost:9292/', function() {\n this.echo(this.getTitle());\n});\n\ncasper.run();\n"
},
{
"from": "gpt",
"value": "va... | javascript | chosen |
[
{
"from": "system",
"value": "Enable scrolling in personal view\n"
},
{
"from": "human",
"value": "angular.module('ocWebGui.navbar', ['ui.router', 'ocWebGui.login', 'FBAngular'])\n .controller('NavbarController', function ($scope, $http, User, Fullscreen) {\n var vm = this;\n\n vm.isAuthe... | javascript | chosen |
[
{
"from": "system",
"value": "Update current weather controller to use forecast service.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar angular = require('angular'),\n //apiKey = 'f8dc9e2b6acd93f0a57b4abf0e86ecad',\n lund = 'http://api.openweathermap.org/data/2.5/weather?q=Lund,se... | javascript | chosen |
[
{
"from": "system",
"value": "Send correct stop to server\n"
},
{
"from": "human",
"value": "import fetch from 'isomorphic-fetch'\n\n/* Add a SL public transit stop\nexport const ADD_STOP = 'ADD_STOP'\nfunction addStop(stop) {\n return {\n type: ADD_STOP,\n stop\n }\n}\n*/\n\nexport cons... | javascript | chosen |
[
{
"from": "system",
"value": "Add common paths to the Require task\n\nNow you can just define \"jquery\" \"pym\" or \"angular\" as a dependency\nafter running the requisite bower install.\n"
},
{
"from": "human",
"value": "/*\n\nBuilds a source package, starting from src/js/main.js\n\n*/\n\nvar ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow editing of plan name and code.\n"
},
{
"from": "human",
"value": "Ext.define(\"DMPlanner.view.PlanList\", {\n extend : 'Ext.grid.Panel',\n alias : 'widget.planlist',\n\n requires : ['Ext.Button', 'Ext.util.*'],\n\n title : 'Plans',\n columnLines... | javascript | chosen |
[
{
"from": "system",
"value": "Truncate tweet is message is too long\n"
},
{
"from": "human",
"value": "var Twitter = require('twitter');\n\nvar client,\n\tshareUrl;\n\n\nmodule.exports = {\n\n\tinit: function(config) {\n\n\t\tif (config.enabled) {\n\n\t\t\tshareUrl = config.shareUrl;\n\n\t\t\tcl... | javascript | chosen |
[
{
"from": "system",
"value": "Optimize react dev entry point\n"
},
{
"from": "human",
"value": "// Licensed under the Apache License, Version 2.0 (the “License”); you may not\n// use this file except in compliance with the License. You may obtain a copy of\n// the License at\n//\n// http://www.a... | javascript | chosen |
[
{
"from": "system",
"value": "Use POST instead of GET\n"
},
{
"from": "human",
"value": "/* Global variables to cache the user and tweet data. */\nvar user;\nvar tweet_data;\n\nfunction submit_username() {\n var val = $('#usernamefield').val();\n\n /* We can use the cache and return. */\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update Date for 2017 Festival"
},
{
"from": "human",
"value": "$(function() {\n var riverbendStart = moment('2016-06-10T17:00:00-04:00');\n var riverbendEnd = moment('2016-06-18T23:30:00-04:00');\n var futureEventStart = moment('2016-06-10T17:00:00-04:00');... | javascript | chosen |
[
{
"from": "system",
"value": "Update warnings to return on null or undefined.\n"
},
{
"from": "human",
"value": "/**\n * Internal dependencies\n */\nimport Data from 'googlesitekit-data';\nimport { STORE_NAME as CORE_MODULES } from '../../googlesitekit/modules/datastore/constants';\nimport class... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing code (var exp was removed and got back)\n"
},
{
"from": "human",
"value": "/**\n * Created by stefas on 19/05/15.\n */\nangular.module('myApp.controllers')\n .controller('ParameterButtonCtrl', ['$sce', '$scope', '$http',\n 'defaults', '$control... | javascript | chosen |
[
{
"from": "system",
"value": "Move resource endpoint into constructor\n\n- SAAS-250\n"
},
{
"from": "human",
"value": "'use strict';\n\n(function() {\n angular.module('ncsaas')\n .service('resourcesService', ['baseServiceClass', resourcesService]);\n\n function resourcesService(baseServiceC... | javascript | chosen |
[
{
"from": "system",
"value": "Add method for calculation hashcode of string.\n"
},
{
"from": "human",
"value": "// Replaces one or more format items in a specified string\n// with the string representation of a specified object.\n// Returns formatted string.\nif (!String.prototype.format) {\n S... | javascript | chosen |
[
{
"from": "system",
"value": "Correct way to fallback when decodingInfo() throws.\n"
},
{
"from": "human",
"value": "/**\n * Returns decoding info for a given media configuration.\n *\n * @param {MediaDecodingConfiguration} configuration Media configuration.\n * @returns {Promise<MediaCapabiliti... | javascript | chosen |
[
{
"from": "system",
"value": "Check for jQuery presence correctly.\n"
},
{
"from": "human",
"value": ";(function() {\n var $ = $ || django.jQuery;\n $(function() {\n initialiseCKEditor();\n initialiseCKEditorInInlinedForms();\n\n function initialiseCKEditorInInlinedForms() {\n tr... | javascript | chosen |
[
{
"from": "system",
"value": "Update project artifacts when saving\n"
},
{
"from": "human",
"value": "const requests = require('./requestFactory')\nconst data = require('../../persistence')\n\nmodule.exports = function(req, res) {\n const project = req.body\n\n requests\n .createTree(req, p... | javascript | chosen |
[
{
"from": "system",
"value": "Throw errors in the test\n"
},
{
"from": "human",
"value": "import path from 'path';\nimport webpack from 'webpack';\nimport config from '../webpack.config';\n\njest.setTimeout(10000); // 10 second timeout\n\ndescribe('example', () => {\n it('combines loader result... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo & log chalk-version on initialization\n"
},
{
"from": "human",
"value": "import _ from 'lodash'\n\nimport cocos from '../cocos'\nimport leaves from '../leaves'\n\nexport class Palm {\n\n constructor (params) {\n this.cocos = cocos\n this.leaf = param... | javascript | chosen |
[
{
"from": "system",
"value": "Move jsaction_logger to []/js so that it can be used by both reactive and []\nbootstrap.\n\nAlso adds an optional info field to the log method to log template/controller\ninformation.\n\n\tChange on 2017/05/09 by huangwei <huangwei@google.com>\n\n-------------\nCreated by MOE: ... | javascript | chosen |
[
{
"from": "system",
"value": "Add from functions in path object\n"
},
{
"from": "human",
"value": "import boundingBox from \"./bounding-box\"\nimport clean from \"./clean\"\nimport combine from \"./combine\"\nimport isEqual from \"./is-equal\"\nimport join from \"./join\"\nimport reverse from \"... | javascript | chosen |
[
{
"from": "system",
"value": "Use chrome storage local instead\n"
},
{
"from": "human",
"value": "// chrome.storage.sync.clear();\n\nfile.load('sites/config.json', function (err, body) {\n var config = JSON.parse(body)\n chrome.storage.sync.set(config)\n})\n\n// events\n\nchrome.extension.onMe... | javascript | chosen |
[
{
"from": "system",
"value": "Use DEV_ENV. Add console.log for testing UglifyJS\n"
},
{
"from": "human",
"value": "// home.js\n\n\"use strict\";\n\nimport { welcome } from \"./welcome\";\n\nif (NODE_ENV == \"development\") {\n welcome(\"home\");\n}\n\nexport { welcome };\n"
},
{
"from":... | javascript | chosen |
[
{
"from": "system",
"value": "Set some PropTypes in main.js following the init guidelines\n\nWARNING: might be a little out of date, still need to check for certainty\n"
},
{
"from": "human",
"value": "import React from 'react'\n\nimport { readJSON } from '../helpers'\nimport Title from './Title... | javascript | chosen |
[
{
"from": "system",
"value": "Change keytar account for tests\n"
},
{
"from": "human",
"value": "'use strict'\n\nimport keytar from 'keytar'\n\nconst SERVICE = 'gh-notifications-snoozer'\nconst ACCOUNT = 'github'\n\nclass GitHubAuth {\n static isAuthenticated() {\n return this.getToken() !==... | javascript | chosen |
[
{
"from": "system",
"value": "Update for moved static assets\n"
},
{
"from": "human",
"value": "//= require phaser.min\n//= require_tree ./rubyrpg\n\n//= depend_on_asset \"logo.png\"\n//= depend_on_asset \"uipack.png\"\n//= depend_on_asset \"uipack.json\""
},
{
"from": "gpt",
"value"... | javascript | chosen |
[
{
"from": "system",
"value": "3421: Add a timeout value to the AJAX request\n\nAuthors: 72d0743fa974f1b94d0389ab43a06cc7eebf90ac@davbo\n"
},
{
"from": "human",
"value": "(function () {\n \"use strict\";\n\n var root = this,\n $ = root.jQuery;\n\n if(typeof root.GOVUK === 'undefined') { roo... | javascript | chosen |
[
{
"from": "system",
"value": "Include templates in assets pipeline for plugins.\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar cwd = process.cwd();\nvar filter = require('../../api/hooks/pluginloader/pluginhelper').filter;\n\nmodule.exports = function(grunt) {\n grunt.reg... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error with import babel-polyfill in multiple spots\n"
},
{
"from": "human",
"value": "import 'babel-polyfill';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Helmet from 'react-helmet';\n\nimport Header from '../components/Header';\nimp... | javascript | chosen |
[
{
"from": "system",
"value": "Change Avatar Title and Sub-Title strings\n"
},
{
"from": "human",
"value": "import React, { PropTypes, Component } from 'react'\nimport classes from './PostItem.scss'\nimport { ListItem } from 'material-ui/List'\nimport Delete from 'material-ui/svg-icons/action/del... | javascript | chosen |
[
{
"from": "system",
"value": "Fix missing prototype function declaration\n"
},
{
"from": "human",
"value": "// does recursion\nvar recursiveFunction = function recursiveFunction () {\n if (typeof theFunctionToCall !== 'function') {\n if (window.confirm('Unable to locate function. Click... | javascript | chosen |
[
{
"from": "system",
"value": "Remove out of date comment.\n\nWe are actually able to collect trace logs from WPT now.\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n open(context) {\n this.storageManager = context.storageManager;\n },\n processMessage(message) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix web components example init\n"
},
{
"from": "human",
"value": "var AppView = require('./views/app_view');\nvar AppModel = require('./models/app_model');\nvar template = window.template = require('../templates/app_view.mustache');\n\nmodule.exports = window.view ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix javascript checkbox toggle for resharing\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n\t$('#allowResharing').bind('change', function() {\n\t\tvar checked = 1;\n\t\tif (!$('#allowResharing').attr('checked')) {\n\t\t\tchecked = 0;\n\t\t}\n\t\... | javascript | chosen |
[
{
"from": "system",
"value": "Update displayMessage to allow html tags if set in arguments\n"
},
{
"from": "human",
"value": "'use strict';\n\nif (!waitlist) {\n\tvar waitlist = {};\n}\n\nwaitlist.base = (function(){\n\tfunction getMetaData (name) {\n\t\treturn $('meta[name=\"'+name+'\"]').attr(... | javascript | chosen |
[
{
"from": "system",
"value": "Fix PGP purge message popup\n"
},
{
"from": "human",
"value": "// @flow\nimport {TypedConnector} from '../util/typed-connect'\nimport PurgeMessage from './purge-message.desktop'\nimport * as Constants from '../constants/pgp'\n\nimport type {Props} from './purge-mess... | javascript | chosen |
[
{
"from": "system",
"value": "Fix UploadThemeController to support disable:true customThemes flag\n\nno issue\n"
},
{
"from": "human",
"value": "import Controller from '@ember/controller';\nimport {inject as service} from '@ember/service';\n\nexport default class UploadThemeController extends Co... | javascript | chosen |
[
{
"from": "system",
"value": "Check if the two strings are the same length\n"
},
{
"from": "human",
"value": "var stringRotation = function (a, b) {\n return (a + a).indexOf(b) > -1;\n};\n"
},
{
"from": "gpt",
"value": "var stringRotation = function (a, b) {\n if (a.length != b.len... | javascript | chosen |
[
{
"from": "system",
"value": "Remove additional data request error (internal testing is completed)\n"
},
{
"from": "human",
"value": "(function (window) {\n 'use strict';\n\n function sendError(e) {\n var userData = {\n username: '',\n fullname: '',\n email: ''\n };\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Build as a library so it can be imported\n"
},
{
"from": "human",
"value": "const BabiliPlugin = require('babili-webpack-plugin');\nvar path = require('path');\n\nmodule.exports = {\n entry: './src/civ5save.js',\n output: {\n filename: 'civ5save.min.js',\n p... | javascript | chosen |
[
{
"from": "system",
"value": "Add a webpack output key for library name.\n"
},
{
"from": "human",
"value": "const path = require('path')\n\nmodule.exports = {\n context: __dirname,\n entry: './src/index.js',\n devtool: 'source-map',\n\n output: {\n libraryTarget: 'umd',\n path: path.re... | javascript | chosen |
[
{
"from": "system",
"value": "Add webpack hot reload patch\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst webpack = require('webpack');\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\nconst FaviconsWebpackPlugin = require('favicons-webpack-plugin');\n\nmodule... | javascript | chosen |
[
{
"from": "system",
"value": "Use fullname \"development\" for NODE_ENV\n"
},
{
"from": "human",
"value": "const webpackMerge = require('webpack-merge');\nconst commons = require('./buildtools/webpack.commons');\n\nlet config = commons.config;\n\nconst nodeEnv = process.env['NODE_ENV'] || 'dev';... | javascript | chosen |
[
{
"from": "system",
"value": "Update fix to add return\n"
},
{
"from": "human",
"value": "'use strict';\n\n\n/*\n We calculate the similarity between an experimental spectrum and a specific XY\n */\n\n\nvar Similarity = require('peaks-similarity');\n\nfunction SimilarityProcessor(experimental, ... | javascript | chosen |
[
{
"from": "system",
"value": "Add optional env vars to prevent additional leakage of personal info\n"
},
{
"from": "human",
"value": "var Pokeio = require('./poke.io')\n\nvar location = 'Stockflethsvej 39';\n\nvar username = 'Arm4x';\nvar password = 'OHSHITWADDUP';\n\nPokeio.SetLocation(location... | javascript | chosen |
[
{
"from": "system",
"value": "Set up Travis test environment (cont. 4)\n\nBased [this post](https://developers.google.com/web/updates/2017/06/headless-karma-mocha-chai)\nit looks like we may not need to define `ChromeHeadless`\nas it might be \"built-in\".\n"
},
{
"from": "human",
"value": "// K... | javascript | chosen |
[
{
"from": "system",
"value": "Replace for-in call w/ Object.keys call to determine object length\n"
},
{
"from": "human",
"value": "//Write a function, deepEqual, that takes two values and returns true only if they are the same value or are objects with the same properties whose values are also ... | javascript | chosen |
[
{
"from": "system",
"value": "build(algolia): Add objects *after* clearing index\n"
},
{
"from": "human",
"value": "import algolia from 'algoliasearch';\nimport icons from '../dist/icons.json';\nimport tags from '../src/tags.json';\n\nconst ALGOLIA_APP_ID = '5EEOG744D0';\n\nif (\n process.env.T... | javascript | chosen |
[
{
"from": "system",
"value": "Add react preset for babel\n"
},
{
"from": "human",
"value": "module.exports = function (api) {\n api.cache.forever()\n\n const presets = ['@babel/preset-env']\n const plugins = [\n ['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],\n ... | javascript | chosen |
[
{
"from": "human",
"value": "Resolve problem 04. Third Digit\n"
},
{
"from": "gpt",
"value": "function solve(argument) {\n\tvar n = argument[0];\n\n\tvar digitStr = n[n.length - 3];\n\n\tif (digitStr === \"7\") {\n\t\treturn \"true\";\n\t} else {\n\t\tif (digitStr === undefined) { return \"false... | javascript | chosen |
[
{
"from": "system",
"value": "Increase debounce for settings input\n"
},
{
"from": "human",
"value": "import { h, Component } from 'preact';\nimport style from './style';\n\nfunction debounce(fn, delay) {\n let timer = null;\n return function () {\n const context = this;\n const args = a... | javascript | chosen |
[
{
"from": "system",
"value": "Expand replies by default on story permalink page.\n"
},
{
"from": "human",
"value": "HB.StoryShowRoute = Ember.Route.extend({\n controllerName: \"story\",\n\n model: function(params) {\n return this.store.find('story', params.id);\n }\n});\n"
},
{
"fr... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor and add flow types\n"
},
{
"from": "human",
"value": "import { getRandomNumber, generatePassword } from '../../src/helpers/password';\n\nconst R = require('ramda');\n\n// Get rid of this and refactor\nconst repeat = (fn, arg1, arg2, count) => {\n const arr... | javascript | chosen |
[
{
"from": "system",
"value": "RN: Create SyntheticEvent and ScrollEvent Types\n\nReviewed By: sahrens\n\nDifferential Revision: D6720478\n\nfbshipit-source-id: b542bd50db7cd7085aecce8b986c6922bfb24a43\n"
},
{
"from": "human",
"value": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All r... | javascript | chosen |
[
{
"from": "system",
"value": "Remove an old code part\n"
},
{
"from": "human",
"value": "\"use strict\";\n\n// Load env with dotenv from .env file\nvar dotenv = require('dotenv');\ndotenv.load();\n\n// node_env can either be \"development\", \"production\" or \"test\"\nvar nodeEnv = process.env.... | javascript | chosen |
[
{
"from": "system",
"value": "[FEATURE] Build default bank account when creating a user.\n"
},
{
"from": "human",
"value": "var User = require('../models/user'),\n utils = require('../utils');\n\nmodule.exports = (function() {\n\tfunction index(req, res) {\n\t\tUser.all().success(function(use... | javascript | chosen |
[
{
"from": "system",
"value": "chore(migrate): Print blog post link when warning about package migration\n"
},
{
"from": "human",
"value": "#!env node\n\"use strict\";\n\nvar pkg = require('../package.json');\nvar migrate = require('./migrate.json');\n\nif (pkg.name === migrate.old) {\n var warn... | javascript | chosen |
[
{
"from": "system",
"value": "Add redux devtools to generator\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport {combineReducers, createStore, applyMiddleware} from 'redux'\nimport thunk from 'redux-thunk'\nimport { Provider } from 'react-redux'\nimport { render } from 'react-... | javascript | chosen |
[
{
"from": "system",
"value": "Increase max image attachment to 32mb\n"
},
{
"from": "human",
"value": "var app = require('../app')\n\nswitch (process.env.NODE_ENV || 'development') {\n case 'development':\n app.constant('MAX_IMAGE_SIZE', 512 * 1024)\n break\n default:\n app.constant('... | javascript | chosen |
[
{
"from": "system",
"value": "[test] Test message from server to client\n"
},
{
"from": "human",
"value": "var test = require('tap').test,\n ws = require('ws'),\n wsProxy = require('../');\n\ntest(\"ws-proxy\", function (t) {\n var server = new ws.Server({ port: 8000 }),\n proxy = ws... | javascript | chosen |
[
{
"from": "system",
"value": "MetaCPAN: Move MetaCPAN to group 'base'.\n"
},
{
"from": "human",
"value": "(function(env) {\n env.ddg_spice_meta_cpan = function(api_result) {\n \"use strict\";\n\n if (!(api_result && api_result.author && api_result.version)) {\n return... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the other bit of ES6\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar IS_BROWSER = require('is-browser');\nif (!IS_BROWSER) {\n var wtfnode = require('wtfnode');\n}\nvar Suite = require('./lib/suite');\nvar defaultSuite = new Suite();\ndefaultSuite.add... | javascript | chosen |
[
{
"from": "system",
"value": "Remove font name prefix from snippet\n\nThe suffix is not required by android or ios but is a leftover from the\nwindows support.\n"
},
{
"from": "human",
"value": "import {ScrollView, TextView, contentView, app} from 'tabris';\n\napp.registerFont('pacifico', 'resou... | javascript | chosen |
[
{
"from": "system",
"value": "Add VERSION field to module top-level\n"
},
{
"from": "human",
"value": "'use strict';\n\nexports.JID = require('xmpp-jid').JID;\nexports.Client = require('./lib/client');\n\n\nexports.createClient = function (opts) {\n var client = new exports.Client(opts);\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update styles for update box.\n"
},
{
"from": "human",
"value": "$('#dripbot-title').css({\n\t\"display\": \"inline-block\",\n\t\"margin-right\": \"20px\"\n});\n\n$('#dripbot').css({\n \"text-align\": \"left\"\n});\n\n$('#dripbot-toggle.stop').css({\n \"backgr... | javascript | chosen |
[
{
"from": "system",
"value": "Convert a number to scientific notation\n"
},
{
"from": "human",
"value": "#! /usr/bin/env node\n\nvar cube = require('dot').process({ path: './templates' });\n\nvar result = cube.solid({ a: '1.000000e+00' });\n\nconsole.log(result);\n"
},
{
"from": "gpt",
... | javascript | chosen |
[
{
"from": "system",
"value": "Add content length to logging"
},
{
"from": "human",
"value": "var url = require('url'),\n add = function (logger, level) {\n loggers.push([logger, level]);\n return fn;\n },\n loggers = [],\n fn,\n Churchill;\n\nfn = function (req, res,... | javascript | chosen |
[
{
"from": "system",
"value": "Add player status to player container [skip ci]\n"
},
{
"from": "human",
"value": "import { connect } from 'redux-clazz'\nimport Player from './Player'\n\nimport * as PlayerActions from './PlayerActions'\nimport * as PlayerSelectors from './PlayerSelectors'\nimport ... | javascript | chosen |
[
{
"from": "system",
"value": "Add copyright, license header to js.\n"
},
{
"from": "human",
"value": "jQuery(function() {\n\n jQuery('table tr td.assignee a').click(function(e) {\n e.preventDefault();\n\n var dialog = jQuery('#assign-ticket');\n var options = dialog.find('form select')... | javascript | chosen |
[
{
"from": "system",
"value": "Fix on_error triggered twice issue\n\nIf some error happens, the on_error will be triggered twice."
},
{
"from": "human",
"value": "var request = require('request');\nvar path = require('path');\nvar fs = require('fs');\n\nfunction on_error(err, options) {\n if (... | javascript | chosen |
[
{
"from": "system",
"value": "Increase the first keep-alive idle time\n"
},
{
"from": "human",
"value": "/* Copyright (c) 2013 Wang Wenlin. See LICENSE for more information */\n\n;(function () {\n var TCP = process.binding('tcp_wrap').TCP\n , _setKeepAlive = TCP.prototype.setKeepAlive\n ,... | javascript | chosen |
[
{
"from": "system",
"value": "Use new flow event error handlers\n"
},
{
"from": "human",
"value": "// Dependencies\nvar $ = require(\"/libs/jquery\");\nrequire(\"./libs/sidebar\")\n\n/**\n * init\n *\n * @name init\n * @function\n * @return {undefined}\n */\nexports.init = function () {\n var... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.