conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "fix: Initialize feedy with an empty object crashes\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDom from 'react-dom';\nimport Feedy from './Components/Feedy';\n\nimport styles from './assets/styles/reset.less';\n\nmodule.exports = funct... | javascript | chosen |
[
{
"from": "system",
"value": "Add code to unregister the service worker for now\n"
},
{
"from": "human",
"value": "import firebase from 'firebase/app';\nimport 'firebase/auth';\nimport 'firebase/database';\nimport marked from 'marked';\nimport 'normalize.css';\nimport prism from 'prismjs';\nimpo... | javascript | chosen |
[
{
"from": "system",
"value": "Use execSync to avoid race\n\nRunning coffeescript in the background means that cordova might use\nstale output, depending on who is faster.\n\nAs an added bonus, throws error if coffeescript exits with a non-zero\nreturn code. Usually, that is because of a syntax error in the\... | javascript | chosen |
[
{
"from": "system",
"value": "Switch const to var for node 4\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 === 'product... | javascript | chosen |
[
{
"from": "system",
"value": "FIX on response data reference.\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * @ngdoc service\n * @name wavesApp.responseredirector\n * @description\n * # responseredirector\n * Service in the wavesApp.\n */\nangular.module('wavesApp')\n .service('resp... | javascript | chosen |
[
{
"from": "system",
"value": "Load lib extensions after loading middleware\n"
},
{
"from": "human",
"value": "\nvar Protos = require('../');\n\nProtos.bootstrap(__dirname, {\n \n // Server configuration\n server: {\n host: 'localhost',\n port: 8080,\n multiProcess: false,\n stayUp... | javascript | chosen |
[
{
"from": "system",
"value": "Add security notice for encryption"
},
{
"from": "human",
"value": "var doc = new jsPDF({\r\n encryption: {\r\n userPassword: \"user\",\r\n ownerPassword: \"owner\",\r\n userPermissions: [\"print\", \"modify\", \"copy\", \"annot-forms\"]\r\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Disable keyboard shortcuts when editing input field\n"
},
{
"from": "human",
"value": "window.GLOBAL_ACTIONS = {\n 'play': function () {\n wavesurfer.playPause();\n },\n\n 'back': function () {\n wavesurfer.skipBackward();\n },\n\n 'forth': function () {\... | javascript | chosen |
[
{
"from": "system",
"value": "Implement service method for payment cancellation (SAAS-1101)\n"
},
{
"from": "human",
"value": "'use strict';\n\n(function() {\n angular.module('ncsaas')\n .service('paymentsService', ['baseServiceClass', 'ENV', '$http', paymentsService]);\n\n function payment... | javascript | chosen |
[
{
"from": "system",
"value": "Set multipleStatements to true in mysql.createConnection object\n"
},
{
"from": "human",
"value": "var mysql = require('mysql');\n\n// Create a database connection and export it from this file.\n// You will need to connect with the user \"root\", no password,\n// a... | javascript | chosen |
[
{
"from": "system",
"value": "Implement play and stop sound\n"
},
{
"from": "human",
"value": "(function (window) {\n\t'use strict';\n\n\tvar hearingTest = HearingTest;\n\tvar hearing = hearingTest.init();\n\n\tvar app = new Vue({\n\t\tel: '#hearing-test-app',\n\t\tdata: {\n\t\t\tisPlaySound: fa... | javascript | chosen |
[
{
"from": "system",
"value": "Remove hard coding 100% width height\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { Provider } from 'react-redux';\nimport ReactDOM from 'react-dom';\n\nimport configureStore from 'redux/configureStore';\nimport { newGame } fr... | javascript | chosen |
[
{
"from": "system",
"value": "Handle ECONNRESET errors gracefully as well\n"
},
{
"from": "human",
"value": "const Eris = require(\"eris\");\nconst config = require(\"./cfg\");\n\nconst intents = [\n // PRIVILEGED INTENTS\n \"guildMembers\", // For server greetings\n\n // REGULAR INTENTS\n \... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for calling default nice()\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport Scale from './d3-scale';\n\nconst { on, observer } = Ember;\n\nexport default Scale.extend({\n init() {\n this.set('scale', d3.scale.linear());\n },\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix direct requirements for tests\n"
},
{
"from": "human",
"value": "\nexports.get_config = get_config;\n\nfunction get_config() {\n var config = { };\n try {\n config = require('./config');\n } catch(exception) {\n config = require('./config-example');\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove babel-compiler dependency in minifier-js\n"
},
{
"from": "human",
"value": "Package.describe({\n summary: \"JavaScript minifier\",\n version: \"2.6.1\"\n});\n\nNpm.depends({\n terser: \"4.8.0\"\n});\n\nPackage.onUse(function (api) {\n api.use('ecmascript'... | javascript | chosen |
[
{
"from": "system",
"value": "Add calculation of text label\n"
},
{
"from": "human",
"value": "/*\n==================================================================================================\n Lowland - JavaScript low level functions\n Copyright (C) 2012 Sebatian Fastner\n==============... | javascript | chosen |
[
{
"from": "system",
"value": "Set default tolerans and lastupdate values\n"
},
{
"from": "human",
"value": "/**\n * These are all the device types defined in Johnny-Five. These\n * extend our Input objects (not elements)\n *\n * min - Minimum value for the device type\n * max - Maximum... | javascript | chosen |
[
{
"from": "system",
"value": "Update strings to use single quotes for jshint"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n\n angular.module('app.states')\n .run(appRun);\n\n /** @ngInject */\n function appRun(routerHelper) {\n routerHelper.configureStates(getStates()... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to reuse test case initialization code\n"
},
{
"from": "human",
"value": "/* global describe it */\n'use strict'\n\nconst chai = require('chai')\nconst chaiAsPromised = require('chai-as-promised')\nconst requireInject = require('require-inject')\nconst sino... | javascript | chosen |
[
{
"from": "system",
"value": "Use smartadmin bootraps.css version instead of bower one\n"
},
{
"from": "human",
"value": "module.exports = {\n src: [\n 'vendor/bower_components/bootstrap/dist/css/bootstrap.css',\n 'vendor/bower_components/open-sans/css/open-sans.css',\n 'ven... | javascript | chosen |
[
{
"from": "system",
"value": "Add a function to validate relationship objects\n"
},
{
"from": "human",
"value": "import _ from 'lodash';\nimport { Graph, alg } from 'graphlib';\n\n_.memoize.Cache = WeakMap;\nlet dijkstra = _.memoize(alg.dijkstra);\n\nexport function setupGraph(pairs) {\n\tlet gr... | javascript | chosen |
[
{
"from": "system",
"value": "Validate if input is number\n"
},
{
"from": "human",
"value": "/**\n*\n* CellTextField\n*\n*/\n\nimport React from 'react';\nimport TextField from 'material-ui/TextField';\n\nimport styles from './styles.css';\n\nclass CellTextField extends React.Component { // esli... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for destroy method of Confirm\n"
},
{
"from": "human",
"value": "(function () {\n \"use strict\";\n\n var moduleObj = moduler('confirm', {\n defaults: {\n message: 'Are you sure you want to perform this action?',\n event: 'clic... | javascript | chosen |
[
{
"from": "system",
"value": "Add prompt to ask for css framework install\n"
},
{
"from": "human",
"value": "var generators = require('yeoman-generator');\n\nmodule.exports = generators.Base.extend({\n method1: function () {\n console.log('method 1 just ran');\n },\n method2: function () {... | javascript | chosen |
[
{
"from": "system",
"value": "Add aria label to external link component\n"
},
{
"from": "human",
"value": "/*\n * @flow\n */\n\nimport type {Module} from '../../types/Stats';\n\nimport React from 'react';\nimport {getClassName} from '../Bootstrap/GlyphiconNames';\nimport {Link} from '../Bootstra... | javascript | chosen |
[
{
"from": "system",
"value": "Remove global styles and add some dummy state (cards)\n\n"
},
{
"from": "human",
"value": "//@flow\n\nimport { bindActionCreators } from \"redux\";\nimport { connect } from \"react-redux\";\nimport * as actionCreators from \"./data/actions/actionCreators\";\nimport ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove auto insertion of test card number.\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport bukovelAPI from './dataAccess/bukovelApi';\nimport CardNumberInput from './CardNumberInput';\n\nconst TEST_CARD_NUMBER = '01-2167-30-92545';\n\nexport de... | javascript | chosen |
[
{
"from": "system",
"value": "Update GitHub icon alt text\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport styled from 'styled-components'\n\nimport { Intro, CheckboxTree } from './components'\nimport data from './data/data.json'\nimport github from './assets/github.svg'\n\nc... | javascript | chosen |
[
{
"from": "system",
"value": "Fix up file references after folder restructure\n"
},
{
"from": "human",
"value": "/* global fetch */\nimport React from 'react';\nimport { render } from 'react-dom';\nimport { Router, Route, hashHistory } from 'react-router'\n\nimport Home from './home';\nimport Ca... | javascript | chosen |
[
{
"from": "system",
"value": "Fix calcLineNo for undefined offset\n\n- now returns -1\n"
},
{
"from": "human",
"value": "/**\n * copyObject(object, [recurse]) -- for all JS Objects\n *\n * Copies all properties and the prototype to a new object\n * Optionally set recurse to array containing the ... | javascript | chosen |
[
{
"from": "system",
"value": "Add title and fix tags and image path in Jekyll template\n"
},
{
"from": "human",
"value": "var path = require('path');\nmodule.exports = function jekyllTemplate(answers) {\n return [\n '---',\n 'layout: post',\n 'date: ' + answers.date,\n 'duration: ' ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"reopen port to 80\"\n\nThis reverts commit 3cfed3456cbed7f6f4a71c114b2645a278b27979.\n"
},
{
"from": "human",
"value": "// see http://vuejs-templates.github.io/webpack for documentation.\nvar path = require('path')\n\nmodule.exports = {\n build: {\n env... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug with url refernce to server\n"
},
{
"from": "human",
"value": "const PORT = '6882'\nconst ROOT =\n location.href.indexOf('localhost') > 0 ? 'http://localhost:' : 'http://192.168.5.102:'\nexport const ROOT_URL = ROOT + PORT + '/'\nexport const ROOT_URL_A... | javascript | chosen |
[
{
"from": "system",
"value": "Switch over detail store to call central requestChange event\n"
},
{
"from": "human",
"value": "var glimpse = require('glimpse'),\n requestRepository = require('../repository/request-repository.js'),\n // TODO: Not sure I need to store the requests\n _reque... | javascript | chosen |
[
{
"from": "system",
"value": "Fix match time not showing for fixtures\n"
},
{
"from": "human",
"value": "import React, { Component } from \"react\";\nimport { formatTime } from \"../../common/util/date\";\n\nexport default class extends Component {\n render() {\n const { match } = this.props... | javascript | chosen |
[
{
"from": "system",
"value": "Use correct background & icon colors according to design\n"
},
{
"from": "human",
"value": "import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport theme from './theme.css';\nimport Box from '../box';\... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Access controll allow headers will be correctly detected\n"
},
{
"from": "human",
"value": "import { routers } from './router';\n\nconst detectsubdomain = async function detectsubdomain (ctx, next) {\n\tlet [subdomain = 'www'] = ctx.request.subdomains;\n\tctx.s... | javascript | chosen |
[
{
"from": "system",
"value": "Fix hunters name (my fault)\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\nimport styled from 'styled-components'\n\nconst FooterWrapper = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n height: 10vh... | javascript | chosen |
[
{
"from": "system",
"value": "Fix using tokens in js.\n"
},
{
"from": "human",
"value": "$(function() {\n $.get('/tagovi', {csrfmiddlewaretoken: $(\"input[name='csrfmiddlewaretoken']\").val()}, function(data) {\n var options = []\n for (var i = 0; i < data.length; i++) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Enhancement: Use {{!}} instead of ! for help."
},
{
"from": "human",
"value": "var BLTPlugin = {\n init: function (client, imports) {\n return {\n handlers: {\n '!givemeblt': function (command) {\n client.act(co... | javascript | chosen |
[
{
"from": "system",
"value": "Clean and ADD ++ (stop)\n\nstop == alert"
},
{
"from": "human",
"value": "console.log(\"Running!\");\n\nvar Library = {\n name: \"Timmy\", //Library has been called Timmy\n greet: function(){\n alert(\"Hello from the \" + Library.name + \" library.\");\... | javascript | chosen |
[
{
"from": "system",
"value": "Add simple api for loading message\n"
},
{
"from": "human",
"value": "define(function() {\n var hr = codebox.require(\"hr/hr\");\n\n var StatusBar = hr.View.extend({\n className: \"component-statusbar\"\n });\n\n return StatusBar;\n});"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Check status code returned from croonga command\n"
},
{
"from": "human",
"value": "var http = require('http');\nvar should = require('should');\nvar spawn = require('child_process').spawn;\n\nfunction run(options, callback) {\n var command, commandPath, output;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make a bit more complex dummy\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n toggleModal: false,\n\n actions: {\n testing() {\n window.swal(\"Hello World\", \"success\");\n },\n toggle() {\... | javascript | chosen |
[
{
"from": "system",
"value": "Update google analytics input plugin.\n複数のカラムの取得対応 (resultsプロパティ追加, filterに渡すフォーマット制御プロパティ追加)\n"
},
{
"from": "human",
"value": "var gaAnalytics = require(\"ga-analytics\"),\n moment = require(\"moment\");\n\nvar googleAnalytics = {};\n\ngoogleAnalytics.load = fu... | javascript | chosen |
[
{
"from": "system",
"value": "Use variables for the expires date.\n"
},
{
"from": "human",
"value": "var express = require('express');\n\nmodule.exports.init = function(app) {\n\n\tapp.use('/js', express.static(__dirname + '/dist/js', {maxAge: 86400000 * 7}));\n\tapp.use('/css', express.static(_... | javascript | chosen |
[
{
"from": "system",
"value": "Add verbose if else for additional logging, etc.\n"
},
{
"from": "human",
"value": "/**\n * This config takes some basic config from conf/webpack/<dev|prod>.js\n * and builds the appropriate webpack config from there.\n *\n * The primary difference is that dev has w... | javascript | chosen |
[
{
"from": "system",
"value": "Enable running blueprint without entity name\n\nMissed a comma after description and fix issue running blueprint\nwithout an entity name. Fixes #6\n"
},
{
"from": "human",
"value": "module.exports = {\n description: 'Add bower dependencies for bootstrap and bootswa... | javascript | chosen |
[
{
"from": "system",
"value": "Add workaroudn to let blueprints work correctly\n"
},
{
"from": "human",
"value": "module.exports = {\n description: 'Creates an initializer to load posts from the meta tag.'\n\n // locals: function(options) {\n // // Return custom template variables here.\n /... | javascript | chosen |
[
{
"from": "system",
"value": "Add alias for core directories, update devtool property\n"
},
{
"from": "human",
"value": "/*global\n \tmodule, __dirname, require\n */\n\n/**\n * @name webpack\n * @type {Object}\n * @property NoEmitOnErrorsPlugin\n */\n\n/**\n * @name path\n * @property resolve\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix module not found error on moment\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst webpack = require('webpack');\n\nmodule.exports = {\n entry: {\n app: path.resolve(__dirname, 'app/Resources/assets/js/app.js')\n },\n output... | javascript | chosen |
[
{
"from": "system",
"value": "Create login/logout/getCurrentUser functions on AuthService\n"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n\n angular\n .module('static')\n .factory('AuthService', function ($http, apiHost, Session) {\n var authService = {};\n \n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix to support token based auth strategies\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst authentication = require('feathers-authentication');\n<% for (var i = 0; i < authentication.length; i++) { %>\nconst <%= S(authentication[i].name).capitalize().s %>S... | javascript | chosen |
[
{
"from": "system",
"value": "Add more directories to be resolved from\n"
},
{
"from": "human",
"value": "const config = require('hjs-webpack')({\n in: 'src/index.js',\n out: 'dist',\n clearBeforeBuild: true,\n devServer: {\n stats: {\n colors: true,\n },\n },\n})\n\nmodule.expor... | javascript | chosen |
[
{
"from": "system",
"value": "Improve pragma handling for sqlite3\n"
},
{
"from": "human",
"value": "var Utils = require(\"../../utils\")\n , sqlite3 = require('sqlite3').verbose()\n , Query = require(\"./query\")\n\nmodule.exports = (function() {\n var ConnectorManager = function(sequeli... | javascript | chosen |
[
{
"from": "system",
"value": "Allow only name, url keys for win32.\n"
},
{
"from": "human",
"value": "var spawn = require('child_process').spawn;\nvar path = require('path');\n\nmodule.exports = function (options) {\n options = options || {};\n options.url = options.url || 'http://nodejs.o... | javascript | chosen |
[
{
"from": "system",
"value": "Site: Add error message for undefined envvars\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst express = require('express')\nconst dotenv = require('dotenv')\n\nconst result = dotenv.config()\nif (result.error)\n dotenv.config({\n path: '../.env'\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix router not resolving route in some cases\n"
},
{
"from": "human",
"value": "import createHistory from 'history/createBrowserHistory'\nimport * as qs from 'querystring'\n\nimport config from './config'\n\nconst history = createHistory()\n\nconst navigate = path =... | javascript | chosen |
[
{
"from": "system",
"value": "Remove a change in node version to have the change in a seperated pr\n"
},
{
"from": "human",
"value": "/* globals require */\n\nimport resolver from './helpers/resolver';\nimport loadEmberExam from 'ember-exam/test-support/load';\n\nconst framework = require.has('e... | javascript | chosen |
[
{
"from": "system",
"value": "Add stub for posting valid client\n"
},
{
"from": "human",
"value": "'use strict';\n\n\n/* TODO:\n GET client (all/specific/sortBy/pagination/search)\n POST client (ok/fail)\n PUT client\n DELETE client\n*/\n\nexports.get = function(assert, client) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Deploy to Kovan test network.\n"
},
{
"from": "human",
"value": "module.exports = {\n migrations_directory: \"./migrations\",\n networks: {\n development: {\n host: \"localhost\",\n port: 8545,\n network_id: \"*\"\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add variant prop to form text component\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\n\nconst propTypes = {\n children: PropTypes.node.isRequired,\n className: PropTypes.string,\n}... | javascript | chosen |
[
{
"from": "human",
"value": "Add insert fxn to insertion sort\n"
},
{
"from": "gpt",
"value": "var insert = function(array, rightIndex, value) {\n for(var index = rightIndex;\n index >= 0 && array[index] > value;\n index--){\n array[index + 1] = array[index];\n }\n array[ind... | javascript | chosen |
[
{
"from": "system",
"value": "Fix passing dashed module paths to generator\n"
},
{
"from": "human",
"value": "'use strict';\nvar _ = require('lodash');\nvar fs = require('fs');\nvar path = require('path');\n\nvar convert = {\n moduleToFolder: moduleToFolder,\n pathToModule: pathToModule\n};\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Check if hierarchySeparator presents in the options object\n"
},
{
"from": "human",
"value": "import addons from '@storybook/addons';\nimport { EVENT_ID } from '../shared';\n\n// init function will be executed once when the storybook loads for the\n// first time. Th... | javascript | chosen |
[
{
"from": "system",
"value": "Add a consistent way to set and apply strategies for tools\n"
},
{
"from": "human",
"value": "export default class {\n constructor (name) {\n this.name = name;\n this.mode = 'disabled';\n this.element = undefined;\n\n //\n this.data = {};\n this._... | javascript | chosen |
[
{
"from": "system",
"value": "Make the buttons do stuff\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('myApp.students', ['ngRoute'])\n\n.config(['$routeProvider', function($routeProvider) {\n $routeProvider.when('/students', {\n templateUrl: 'components/students/students... | javascript | chosen |
[
{
"from": "system",
"value": "Set code push install mode to immediate\n"
},
{
"from": "human",
"value": "// @flow\n\nimport CodePush from 'react-native-code-push';\nimport { AppRegistry, YellowBox } from 'react-native';\nimport {\n SingleHotelStandalonePackage,\n NewHotelsStandAlonePackage,\n}... | javascript | chosen |
[
{
"from": "system",
"value": "Disable i++ error in loops\n"
},
{
"from": "human",
"value": "// https://eslint.org/docs/user-guide/configuring\n\nmodule.exports = {\n root: true,\n parserOptions: {\n parser: \"babel-eslint\",\n sourceType: \"module\"\n },\n env: {\n browser: true\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update concatenation algorithm to prevent strings larger than the max length\n\nFrom https://github.com/ljharb/proposal-string-pad-left-right/commit/7b6261b9a23cbc00daf0b232c1b40243adcce7d8"
},
{
"from": "human",
"value": "'use strict';\n\nvar bind = require('functi... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for save on Ctrl/Cmd+S\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport AceEditor from 'react-ace';\nimport githubTheme from 'brace/theme/github';\nimport markdownSyntax from 'brace/mode/markdown';\n\nimport styles fro... | javascript | chosen |
[
{
"from": "system",
"value": "Clear out unneeded MainController stuff\n"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n\n angular\n .module('annualTimeBlock')\n .controller('MainController', MainController);\n\n /** @ngInject */\n function MainController($timeout, webD... | javascript | chosen |
[
{
"from": "system",
"value": "Change icon for non-target tool and remove length tool\n"
},
{
"from": "human",
"value": "Template.viewerMain.helpers({\n 'toolbarOptions': function() {\n var toolbarOptions = {};\n\n var buttonData = [];\n\n buttonData.push({\n id... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test of admin/custodian password change\n"
},
{
"from": "human",
"value": "var utils = require('./utils.js');\n\nvar temporary_password = \"typ0drome@absurd.org\";\n\ndescribe('receiver first login', function() {\n it('should redirect to /firstlogin upon succes... | javascript | chosen |
[
{
"from": "system",
"value": "Change submit event listener to start or stop\n"
},
{
"from": "human",
"value": "$(document).ready(function(){\n\n $(\".metronome-parameters\").on(\"submit\", function(event){\n event.preventDefault();\n var tempo = $(\"#tempo-field\").val();\n var beatsPe... | javascript | chosen |
[
{
"from": "system",
"value": "Split out logic to improve readability\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport { connect } from \"react-redux\";\nimport { push } from \"react-router-redux\";\nimport { parse } from \"qs\";\nimport { downloadJournal } from \"../action... | javascript | chosen |
[
{
"from": "system",
"value": "Add a failing test for the ControllerProvider\n"
},
{
"from": "human",
"value": "import { ControllerProvider } from './controller';\n\nconst testModuleName = 'hot-reload-demo';\n\nfdescribe('ControllerProvider', () => {\n describe('creating a controller through the... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for Node.js 0.6.0: Build seems to be now in Release instead of default"
},
{
"from": "human",
"value": "var EventEmitter = require('events').EventEmitter;\nvar util = require('util');\nvar expat = require('../build/default/node-expat');\n\n/**\n * Simple wrapper... | javascript | chosen |
[
{
"from": "system",
"value": "Update blog link click event to make ajax request\n"
},
{
"from": "human",
"value": "$(document).on('ready', function() {\n\n $('nav a').on('click', function(event) {\n event.preventDefault();\n var targetURI = event.target.dataset.pagePartial;\n $.ajax({\... | javascript | chosen |
[
{
"from": "system",
"value": "Move app/db tasks into stex-dev\n"
},
{
"from": "human",
"value": "var stexDev = require(\"stex-dev\");\nvar gulp = stexDev.gulp();\nvar plugins = stexDev.gulpPlugins();\nvar paths = stexDev.paths;\n\n\n// composite gulp tasks\ngulp.task('default', ['test']);\... | javascript | chosen |
[
{
"from": "system",
"value": "Make an example for data fetching\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nclass JewelryProducts extends React.Component {\n render() {\n return (\n <h1>Jewelry Products</h1>\n );\n }\n}\n\nexport default JewelryProducts;\n"
},... | javascript | chosen |
[
{
"from": "system",
"value": "Fix and ungodly number of linter errors\n"
},
{
"from": "human",
"value": "angular.module('bolt.controller', [])\n\n.controller('BoltController', function($scope, $location, $window){\n $scope.session = $window.localStorage;\n $scope.startRun = function() {\n i... | javascript | chosen |
[
{
"from": "system",
"value": "Revert to old compilation format except compile JSX\n"
},
{
"from": "human",
"value": "const del = require('del')\nconst { dest, series, src } = require('gulp')\nconst {\n init: sourceMapsInit,\n write: sourceMapsWrite,\n} = require('gulp-sourcemaps')\nconst { cre... | javascript | chosen |
[
{
"from": "system",
"value": "Disable Elixir and BrowserSync notifications\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar elixir = require('laravel-elixir');\nvar argv = require('yargs').argv;\nvar bin = require('./tasks/bin');\n\nelixir.config.assetsPath = 'source/_assets';... | javascript | chosen |
[
{
"from": "system",
"value": "Copy the localForage library in dist/\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar fse = require('fs-extra');\n\ngulp.task('clean', function(done) {\n fse.removeSync('dist');\n fse.mkdirSync('dist');\n done();\n});\n\ngulp.task('default', [... | javascript | chosen |
[
{
"from": "system",
"value": "Set system notification sound to silent\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react'\nimport { playAudio } from '../utils/audioplayer'\n\nexport default class Tap extends Component {\n\n static PropTypes = {\n receivedTa... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure can/util/vdom can load\n\nThe new version of Can now maps can/util/vdom/vdom to @empty by default,\n\tso if you are using an env other than server-development or\n\tserver-production can-ssr can't load. To fix this we need to map\n\tcan/util/vdom/vdom onto itself so t... | javascript | chosen |
[
{
"from": "system",
"value": "Add EOL to tokens JSON file\n"
},
{
"from": "human",
"value": "\nconst fs = require(\"fs\");\nconst objectEquals = require(\"./objectEquals\");\n\nconst { DEFAULT_TOKENS_FILENAME } = require(\"../lib/constants\");\n\nconst tokensManager = function tokensManager (fil... | javascript | chosen |
[
{
"from": "system",
"value": "Add additional test for Node environment\n\nmodule !== this.module in Node, but this can be true in a browser\n"
},
{
"from": "human",
"value": "/**\n * Detect platform-specific things.\n */\n\n\ngoog.provide('onfire.utils.detection');\n\n\n/**\n * @type {boolean}\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use a watch function instead of adding submission to scope\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function ($interpolate, $parse) {\n return {\n require: '^bdSubmit',\n restrict: 'A',\n compile: function (element, attributes) ... | javascript | chosen |
[
{
"from": "system",
"value": "Update notice for email sent\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n session: Ember.inject.service(),\n actions: {\n invalidateSession () {\n this.get('session').invalidate();\n },\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use constants for component/validator types in cloud tenant form\n"
},
{
"from": "human",
"value": "/**\n * @param {Boolean} renderEmsChoices\n * @param {Object} emsChoices\n */\nfunction createSchema(renderEmsChoices, emsChoices) {\n let fields = [{\n component... | javascript | chosen |
[
{
"from": "system",
"value": "Use performance.now instead of Date.now"
},
{
"from": "human",
"value": "function easing(time) {\n return 1 - (--time) * time * time * time;\n};\n\n/**\n * Given a start/end point of a scroll and time elapsed, calculate the scroll position we should be at\n * @para... | javascript | chosen |
[
{
"from": "system",
"value": "Send message to other API\n"
},
{
"from": "human",
"value": "const models = require('../../models');\nlet Project = models.projects;\n\nmodule.exports = function(connection, done) {\n connection.createChannel(function(err, ch) {\n console.log(err);\n var ex =... | javascript | chosen |
[
{
"from": "system",
"value": "Remove missing exports from react-jsx-highmaps\n"
},
{
"from": "human",
"value": "import { withSeriesType } from 'react-jsx-highcharts';\nexport {\n Chart,\n Credits,\n Debug,\n Loading,\n Legend,\n Series,\n Subtitle,\n Title,\n Tooltip,\n HighchartsConte... | javascript | chosen |
[
{
"from": "system",
"value": "Append view's element after rendering\n\nThis makes no difference, but seem more logical\n"
},
{
"from": "human",
"value": "import Model from '../base/model';\n\n\nexport default class ViewSwitcher {\n constructor(app, element) {\n this.app = app;\n this.elem... | javascript | chosen |
[
{
"from": "system",
"value": "Set renderingBaseURL on the loader\n"
},
{
"from": "human",
"value": "var pkg = require(\"../package.json\");\n\nglobal.navigator = global.navigator || {\n\tuserAgent: \"Mozilla/5.0 \" + \"done-ssr/\" + pkg.version\n};\n\nmodule.exports = function(loader){\n\t// Ens... | javascript | chosen |
[
{
"from": "system",
"value": "Fix webamp.onTrackDidChange, by actually passing the action to the event emitter\n"
},
{
"from": "human",
"value": "import { createStore, applyMiddleware } from \"redux\";\nimport thunk from \"redux-thunk\";\nimport { composeWithDevTools } from \"redux-devtools-exte... | javascript | chosen |
[
{
"from": "system",
"value": "Allow auto update for prerelease based on betaupdates setting\n"
},
{
"from": "human",
"value": "'use strict';\nconst {app, dialog} = require('electron');\nconst {autoUpdater} = require('electron-updater');\n\nfunction appUpdater() {\n\t// Log whats happening\n\tcon... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.