conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Remove the unnecessary dot that matches everything\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:... | javascript | chosen |
[
{
"from": "system",
"value": "Enable canvas rendering by default (SVG is broken for now after this commit!)\n"
},
{
"from": "human",
"value": "import qs from 'qs';\n\n// TODO: if we're in a test mode it'd be nice not to have to set document.location.search... pull\n// from global or something in... | javascript | chosen |
[
{
"from": "system",
"value": "chore(lint): Add missing newline at the end of file\n"
},
{
"from": "human",
"value": "module.exports = {\n // desribes the URL the browser redirects to when it cannot resolve the requested host\n 'POST :sessionId/url hostNotFoundUrl': 'about:blank',\n // describ... | javascript | chosen |
[
{
"from": "system",
"value": "Send ‘testCandidate’ message to background process when user is in the HTML5 Trial.\n"
},
{
"from": "human",
"value": "// ==UserScript==\n// @include http://youtube.com/html5\n// @include http://www.youtube.com/html5\n// @include https://youtube.com/html5\n// @inclu... | javascript | chosen |
[
{
"from": "system",
"value": "Test (absolute basics): Change margins to absolute coordinates\n"
},
{
"from": "human",
"value": "/**\n * Basics\n */\ndescribe('Basics', () => {\n beforeEach(beforeEachHook);\n afterEach(afterEachHook);\n\n /**\n * Absolute tracking\n */\n it('absolute trac... | javascript | chosen |
[
{
"from": "system",
"value": "Add in a missing change from r67143 for print preview options.\n\nBUG=none\nTEST=none\nReview URL: http://codereview.chromium.org/5334002\n\ngit-svn-id: http://src.chromium.org/svn/trunk/src@67155 4ff67af0-8c30-449e-8e8b-ad334ec8d88c\n\nFormer-commit-id: 216c5805aff5e437ba09b83... | javascript | chosen |
[
{
"from": "system",
"value": "Add unit test for unit test generator\n"
},
{
"from": "human",
"value": "/*global describe, beforeEach, it*/\n'use strict';\n\nvar path = require('path');\nvar helpers = require('yeoman-generator').test;\n\n\ndescribe('protractor generator', function() {\n beforeEa... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust padding on animated page wrapper\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport styled from 'styled-components';\n\nconst ANIMATION_PERIOD = 500;\n\nconst AnimatedPageWrapper = styled.div`\n align-items: center;\n bottom: 0;\n displa... | javascript | chosen |
[
{
"from": "system",
"value": "Allow setting the accept attribute."
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Component.extend(Ember.Evented, {\n tagName: 'input',\n type: 'file',\n attributeBindings: ['type', 'multiple'],\n multiple: false,\n change ... | javascript | chosen |
[
{
"from": "system",
"value": "Update scopes to accept delete and update :lock:\n"
},
{
"from": "human",
"value": "import cozy, { LocalStorage as Storage } from 'cozy-client-js'\n\nconst getStorage = () => new Storage()\nconst getClientName = device => `Cozy Files Application on ${device} (${Math... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing file to commit - Refactor app structure\n"
},
{
"from": "human",
"value": "import { combineReducers } from 'redux'\nimport { reducer as formReducer } from 'redux-form'\nimport { routerReducer } from 'react-router-redux'\n\nimport organization from '../pa... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure accountdock doesn't actually get loaded if it's not there\n"
},
{
"from": "human",
"value": "$(function() {\n if (AccountDock) {\n var billing = $(\"#billing\");\n var customerId = billing.data(\"stripe-id\");\n var handler = AccountDock.configur... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for other custom assert functions.\n"
},
{
"from": "human",
"value": "var http = require('http');\n\nvar async = require('async');\n\nexports['test_assert.response'] = function(test, assert) {\n var server = http.createServer(function (req, res) {\n if... | javascript | chosen |
[
{
"from": "system",
"value": "Disable the commons part who broke the style in some cases\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst ls = require('ls');\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\n\nconst plugins = [];\nconst entry = {};\n\nconst filen... | javascript | chosen |
[
{
"from": "system",
"value": "Remove dangling comma in array"
},
{
"from": "human",
"value": "module.exports = {\n plugins: ['ghost'],\n extends: [\n 'plugin:ghost/node',\n ]\n};\n"
},
{
"from": "gpt",
"value": "module.exports = {\n plugins: ['ghost'],\n extends... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in the shared ui webpack snippets preventing content pages from building\n\nSigned-off-by: Victor Porof <7d8eebacd0931807085fa6b9af29638ed74e0886@mozilla.com>\n"
},
{
"from": "human",
"value": "// Any copyright is dedicated to the Public Domain.\n// http://... | javascript | chosen |
[
{
"from": "system",
"value": "FIX support for multiple instance of movie status on the same page\n"
},
{
"from": "human",
"value": "function scan()\r\n{\r\n\r\n\t$('.status').each(function()\r\n\t{\r\n\t\t$(this).click(function()\r\n\t\t{\r\n\t\t\t$.getJSON(this.href + '?format=json',\r\n\t\t\t ... | javascript | chosen |
[
{
"from": "system",
"value": "Make AuthProvider a function component\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport app from '../Firebase';\n\nconst AuthContext = React.createContext();\n\n/**\n * AuthProvider component that keeps track of the authentication status of the\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix fonts path when sass is loaded\n"
},
{
"from": "human",
"value": "var styles = [\n 'materialize'\n];\n\nmodule.exports = function(content) {\n this.cacheable(true);\n var config = this.exec(content, this.resourcePath);\n source = styles.filter(functi... | javascript | chosen |
[
{
"from": "system",
"value": "Convert to ES6 class syntaxes.\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport '../stylesheets/ui.scss'\n\nexport const SkiDayCount = React.createClass({\n\tpercentToDecimal(decimal) {\n\t\treturn ((decimal * 100) + '%')\n\t},\n\tcalcGoalProgres... | javascript | chosen |
[
{
"from": "system",
"value": "Add pimg.tw production url spec\n"
},
{
"from": "human",
"value": "var webdriverio = require('webdriverio'),\n assert = require('assert');\n\ndescribe('PIXNET 大首頁', () => {\n it('標題應為品牌字', () => {\n const title = browser.url('https://www.pixnet.net... | javascript | chosen |
[
{
"from": "system",
"value": "Fix sorting issue that broke chrome and safari\n"
},
{
"from": "human",
"value": "import getTime from \"date-fns/get_time\";\nimport isAfter from \"date-fns/is_after\";\nimport React from \"react\";\n\nconst UPDATE_INTERVAL = 1000;\n\nconst getNextGame = (now, games... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a bug that code in toots are doubly HTML escaped\n"
},
{
"from": "human",
"value": "import hljs from 'highlight.js';\n\nexport default function highlightCode(text) {\n try {\n const doc = new DOMParser().parseFromString(text, 'text/html');\n\n doc.querySe... | javascript | chosen |
[
{
"from": "system",
"value": "Make storyshots resolve config without ext\n"
},
{
"from": "human",
"value": "import fs from 'fs';\nimport path from 'path';\n\nfunction getConfigPathParts(configPath) {\n const resolvedConfigPath = path.resolve(configPath);\n\n if (fs.lstatSync(resolvedConfigPath... | javascript | chosen |
[
{
"from": "system",
"value": "Check for null input; there is no input on page load\n"
},
{
"from": "human",
"value": "import Component from '@ember/component';\nimport { empty, or } from '@ember/object/computed';\n\nexport default Component.extend({\n emptyName: empty('api_token.name'),\n disa... | javascript | chosen |
[
{
"from": "system",
"value": "Update energy chunk exchange for energy users\n"
},
{
"from": "human",
"value": "// Copyright 2016, University of Colorado Boulder\n\n/**\n * Base class for energy users, i.e. model elements that take energy from\n * an energy converter and do something with it, suc... | javascript | chosen |
[
{
"from": "system",
"value": "Fix extension to work with latest state changes\n\nRefs flarum/core#2151.\n"
},
{
"from": "human",
"value": "import { extend } from 'flarum/extend';\nimport LinkButton from 'flarum/components/LinkButton';\nimport IndexPage from 'flarum/components/IndexPage';\nimport... | javascript | chosen |
[
{
"from": "system",
"value": "Add Backbone to MapView module dependencies.\n"
},
{
"from": "human",
"value": "define(['jquery', 'async!http://maps.googleapis.com/maps/api/js?sensor=true' + (window.location.host === 'localhost' ? '' : '&key=AIzaSyDZj9_A4WUDGph6cKf2A7VsFbDz6Pb7QBk')], function($) ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a authorization header bug in post calls\n"
},
{
"from": "human",
"value": "import 'whatwg-fetch';\nimport { clearToken, loadToken, injectTokenHeader } from './token';\n\nexport async function fetchJSON(url, options = {}) {\n const resp = await fetch(url, {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update onEvents schema to allow array of signal/scale listeners.\n"
},
{
"from": "human",
"value": "export default {\n \"defs\": {\n \"onEvents\": {\n \"type\": \"array\",\n \"items\": {\n \"allOf\": [\n {\n \"type\": \"objec... | javascript | chosen |
[
{
"from": "system",
"value": "Handle extra offset for fixed footer\n\nAdded new example page\n\nTryng to fix page-wrapper min-heigh on small width\n"
},
{
"from": "human",
"value": "$(function() {\n\n $('#side-menu').metisMenu();\n\n});\n\n//Loads the correct sidebar on window load,\n//collap... | javascript | chosen |
[
{
"from": "system",
"value": "Add description in createNum function\n"
},
{
"from": "human",
"value": "var questions = [\n Q1 = {\n question: \"What does HTML means?\",\n answer: \"HyperText Markup Language\"\n },\n Q2 = {\n question: \"What does CSS means?\",\n answer: \"Cascadin... | javascript | chosen |
[
{
"from": "system",
"value": "Format minutes for better output\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nclass Clock extends React.Component {\n constructor() {\n super();\n this.state = {\n date: new Date()\n };\n }\n\n // Lifecycle hooks\n // when compo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix html wrapper linter issue\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\n\nconst HtmlWrapper = ({ children, state, head, scripts, stylesheets }) => {\n // eslint-disable-next-line react/no-danger\n const content = (<div id=\"root... | javascript | chosen |
[
{
"from": "system",
"value": "Set server response type to json\n"
},
{
"from": "human",
"value": "var http = require('http'),\n io = require('socket.io-client'),\n url = require('url');\n\nvar server = http.createServer(function(request, response) {\n response.writeHead(200, {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Include alias generation in lambda function template\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst _camelCase = require('camelcase');\nconst LambdaTemplates = require('wysknd-aws-cf-generator').LambdaTemplates;\nconst FunctionTemplate = LambdaTemplates.F... | javascript | chosen |
[
{
"from": "system",
"value": "Comment out returned value annotations"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n* Evaluate the arctangent of the quotient of two numbers.\n*\n* @module @stdlib/math/base/special/atan2\n*\n* @example\n* var v = atan2( 2.0, 2.0 ); // => atan( 1.0 )\n* //... | javascript | chosen |
[
{
"from": "system",
"value": "Allow user to set HOT_RELOAD_PORT from ENV\n"
},
{
"from": "human",
"value": "import path from 'path';\n\nconst ABSOLUTE_BASE = path.normalize(path.join(__dirname, '..'));\n\nconst constants = Object.freeze({\n ABSOLUTE_BASE: ABSOLUTE_BASE,\n NODE_MODULES_DIR: pat... | javascript | chosen |
[
{
"from": "system",
"value": "Make header clickable on details page\n"
},
{
"from": "human",
"value": "export default `\n <section class=\"navbar\">\n <div id=\"condensed-branding\">\n <div class=\"row\">\n <header>\n <div class=\"firefox-logo\"></div>\n <h2>Ide... | javascript | chosen |
[
{
"from": "system",
"value": "Use relative path to script directory, rather than to where script was run.\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport express from 'express';\nimport bodyParser from 'body-parser';\nimport path from 'path';\n\n/**\n * Set up Express.\n */... | javascript | chosen |
[
{
"from": "system",
"value": "Remove remote receipt validation as we do not have it\n"
},
{
"from": "human",
"value": "angular.module('focus.services')\n .factory('Store', function(AudioLibrary) {\n\n\n\n var functions = {\n\n\n initStore: function (){\n console.log(\"Initializin... | javascript | chosen |
[
{
"from": "system",
"value": "Support test files in any level of nested test/ directory\n"
},
{
"from": "human",
"value": "'use strict'\n\nmodule.exports = {\n // Test files patterns\n test: [\n // Classic layout\n 'test/**',\n // Lerna monorepo\n 'packages/*/test/**/*.test.*',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use textContent instead of innerHTML.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nchrome.sessions.getDevices({}, function(sessions){\n\n for (var i in sessions) {\n var device = sessions[i];\n var deviceDiv = document.createElement(\"div\");\n de... | javascript | chosen |
[
{
"from": "system",
"value": "Update Juice depency to 1.0.0."
},
{
"from": "human",
"value": "Package.describe({\n summary: \"Juice wrapper package\",\n version: '0.1.1',\n name: \"sacha:juice\",\n git: \"https://github.com/SachaG/meteor-juice\"\n});\n\nNpm.depends({\n juice: \"0.5.0\", \n}... | javascript | chosen |
[
{
"from": "system",
"value": "Fix lint (missing newline merged to devel)\n"
},
{
"from": "human",
"value": "import { registerMigration, fillDefaultValues } from './migrationUtils';\n\nimport { Users } from 'meteor/vulcan:users';\n\nregisterMigration({\n name: \"setSunshineSnoozeValues\",\n dat... | javascript | chosen |
[
{
"from": "system",
"value": "Add outputting Node version to config dumper rule\n"
},
{
"from": "human",
"value": "function (user, context, callback) {\n const _config = JSON.stringify(configuration, Object.keys(configuration).sort(), 2);\n const _context = JSON.stringify(context, null, 2);\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Implement morgan, added port variable\n"
},
{
"from": "human",
"value": "var express = require('express')\nvar app = express()\nvar bodyparser = require('body-parser');\n\napp.get('/', function (req, res) {\n res.send('get request received');\n})\n\napp.post('/', f... | javascript | chosen |
[
{
"from": "system",
"value": "Change public dir to working dir, not dist\n"
},
{
"from": "human",
"value": "var loopback = require('loopback');\nvar boot = require('loopback-boot');\nvar path = require('path');\nvar app = module.exports = loopback();\n\n// Set up the /favicon.ico\napp.use(loopba... | javascript | chosen |
[
{
"from": "system",
"value": "Allow adding extra form-data to FileUpload component\n"
},
{
"from": "human",
"value": "define([\n 'require',\n '../inheritance',\n '../component',\n '../event',\n '../view',\n '../collections',\n '../network',\n '!fileupload.css',\n '!fil... | javascript | chosen |
[
{
"from": "system",
"value": "Mark as experimental for now\n"
},
{
"from": "human",
"value": "/**\n * Cloud9 Python support\n *\n * @copyright 2015, Ajax.org B.V.\n */\ndefine(function(require, exports, module) {\n main.consumes = [\"Plugin\", \"language\", \"jsonalyzer\"];\n main.provides... | javascript | chosen |
[
{
"from": "system",
"value": "Correct graying of attribute names in deep nesting\n\nProperly gray the prefix of attribute names in a table when there are more than 2 nested hashes/structs.\n\n\nSigned-off-by: Josep M. Blanquer <843d9a062ab1c6792ebebca5589f22ce86ac85ce@rightscale.com>"
},
{
"from": "... | javascript | chosen |
[
{
"from": "system",
"value": "Call window as global so it works on Node\n"
},
{
"from": "human",
"value": "export default function getBaseUrl() {\n const inDevelopment = window && window.location.hostname === 'localhost';\n return inDevelopment ? 'http://localhost:3001/' : '/';\n}\n"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Use routes from config object.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar View = require(\"./view\");\nvar Router = require(\"./router\");\nvar util = require(\"substance-util\");\nvar _ = require(\"underscore\");\n\n// Substance.Application\n// =====... | javascript | chosen |
[
{
"from": "system",
"value": "Create a proper identation for the tests\n"
},
{
"from": "human",
"value": "var replace = require( \"../src/str-replace\" );\n\nmodule.exports = {\n replace_all: function( assert ) {\n var actual = replace.all( \"/\" ).from( \"/home/dir\" ).to( \"\\\\\" );\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing import to getTILrc\n"
},
{
"from": "human",
"value": "import fs from 'fs';\n\nexport function mkdir(dir) {\n return new Promise((resolve, reject) => {\n fs.mkdir(dir, (err) => {\n if (err) {\n reject(err);\n } else {\n resolve... | javascript | chosen |
[
{
"from": "system",
"value": "Change progress callback to a function instead of null\n"
},
{
"from": "human",
"value": "const mongoose = require('mongoose');\nconst Schema = mongoose.Schema;\nconst bcrypt = require('bcrypt-nodejs');\n\nconst userSchema = new Schema({\n username: { type: String,... | javascript | chosen |
[
{
"from": "system",
"value": "Add examples of typography settings to home page\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport Helmet from 'components/Helmet'\nimport Banner from 'components/Banner'\nimport Link from 'components/Link'\n\nexport default function Home({ data }... | javascript | chosen |
[
{
"from": "system",
"value": "refactor: Declare now as a string\n"
},
{
"from": "human",
"value": "const notifications = {\n namespaced: true,\n state: {\n isFetching: false,\n isErrored: false,\n error: [],\n notifications: []\n\n },\n computed: {},\n getters: {},\n mutations:... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the reload constants button\n"
},
{
"from": "human",
"value": "jQuery.fn.rotate = function(degrees) {\n $(this).css({'-webkit-transform' : 'rotate('+ degrees +'deg)',\n '-moz-transform' : 'rotate('+ degrees +'deg)',\n '-ms-transform' : 'rotate('+... | javascript | chosen |
[
{
"from": "system",
"value": "NEW: Add header with the module name, copyright, author, licence.\n"
},
{
"from": "human",
"value": "module.exports = require(\"./lib/solr\");\n\n\n"
},
{
"from": "gpt",
"value": "/*!\n * solr client\n * Copyright(c) 2011-2012 HipSnip Limited\n * Author ... | javascript | chosen |
[
{
"from": "system",
"value": "Test adding and removing TODO items\n"
},
{
"from": "human",
"value": "'use strict';\n\ndescribe('Controller: MainCtrl', function () {\n\n // load the controller's module\n beforeEach(module('learningAngularJsApp'));\n\n var MainCtrl,\n scope;\n\n // Initiali... | javascript | chosen |
[
{
"from": "system",
"value": "Print error messages to the console as well\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport config from '../config/environment';\n\nvar currentEnv = config.environment;\n\nexport default {\n name: 'bugsnag-error-service',\n\n initialize: fun... | javascript | chosen |
[
{
"from": "system",
"value": "Complete unique characters in js.\n"
},
{
"from": "human",
"value": "\n\nfunction isAllUniqueCharsFast (...strings) {\n let seenChars = {};\n\n for (let i=0; i<strings.length; i++) {\n for (let j=0; j<strings[i].length; j++) {\n let char = st... | javascript | chosen |
[
{
"from": "system",
"value": "Fix cypress test for version number.\n"
},
{
"from": "human",
"value": "describe('Unauthenticated CMS access', function () {\n it('should visit the login page and check the version', function () {\n cy.visit('/');\n\n cy.url().should('include', '/lo... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up the composite statement example a bit\n"
},
{
"from": "human",
"value": "import Local\nimport Global\n\n\"Global.x:\" <input data=Global.x dataType=\"number\"/>\n<br />\n\"Global.y:\" <input data=Global.y dataType=\"number\"/>\n\n<div>\n\t\"Global.x + 5 = \... | javascript | chosen |
[
{
"from": "system",
"value": "Change code style to use single-quoted strings instead of double-quoted strings.\n"
},
{
"from": "human",
"value": "/*\n * Copyright (c) 2015 Steven Soloff\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and ... | javascript | chosen |
[
{
"from": "system",
"value": "Add grandparent association and populate family tree\n"
},
{
"from": "human",
"value": "var familyTree = [];\n\nfunction Person(name)\n{\n\tthis.name = name;\n\tthis.parent = null;\n\tthis.children = [];\n\tthis.siblings = [];\n\t\n\tthis.addChild = function(name) \... | javascript | chosen |
[
{
"from": "system",
"value": "Send JSON on the index route.\n"
},
{
"from": "human",
"value": "var app = require('express')();\nvar bodyParser = require('body-parser')\nvar mongoose = require('mongoose');\nvar controllers = require('./controllers/all');\n\napp.use(bodyParser.json());\n\nmongoose... | javascript | chosen |
[
{
"from": "system",
"value": "Use online CDN for DOK\n"
},
{
"from": "human",
"value": "// For any third party dependencies, like jQuery, place them in the lib folder.\n\n// Configure loading modules from the lib directory,\n// except for 'app' ones, which are in a sibling\n// directory.\nrequir... | javascript | chosen |
[
{
"from": "system",
"value": "Return right path on gulp watch\n"
},
{
"from": "human",
"value": "var pathModule = require('path');\n\nmodule.exports = function(data) {\n data = data || {};\n var functions = [\n {\n name: 'revisionedPath',\n func: function (fullPath) {\n var... | javascript | chosen |
[
{
"from": "system",
"value": "Add a logger and fix port.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n// feedbackAI\n// A bot that listens to feedback\n\n// hosting =====================================================================\nvar host = require('./bot_messenger/services/ho... | javascript | chosen |
[
{
"from": "system",
"value": "Change the default port to 80.\n"
},
{
"from": "human",
"value": "var PORT = 9002;\nvar Server = require('socket.io');\n\nexports.connect = function(port) {\n\tif (!port) {\n\t\tport = PORT;\n\t}\n\n\tvar io = new Server(port);\n\tio.on('connection', function(socket... | javascript | chosen |
[
{
"from": "system",
"value": "Fix sync no .env file\n"
},
{
"from": "human",
"value": "require('dotenv').config();\n\nlet contentful = require('contentful'),\n fs = require('fs-extra');\n\nlet client = contentful.createClient({\n space: process.env.CONTENTFUL_SPACE,\n accessToken: process.env... | javascript | chosen |
[
{
"from": "system",
"value": "Fix ReferenceError: Can't find variable: algos"
},
{
"from": "human",
"value": "$(function(){\n\n var hotSwap = function(page, pushSate){\n if (pushSate) history.pushState(null, null, '/' + page);\n $('.selected').removeClass('selected');\n $... | javascript | chosen |
[
{
"from": "system",
"value": "Use eval for more flexibility\n"
},
{
"from": "human",
"value": "var fs = require('fs')\n\ntests = String(fs.readFileSync('tests.tsv')).split('\\n').splice(1)\n\n;['array.vector.min.js','array.vector.js'].forEach(function (file) {\n failures = 0\n\n try {\n var... | javascript | chosen |
[
{
"from": "system",
"value": "Use bootstrap4 markup for tabs\n"
},
{
"from": "human",
"value": "import React, { Component, Children, PropTypes } from 'react'\n\nexport function Tab(props, {activeTab, changeTab}) {\n const onClick = (e) => {\n e.preventDefault()\n changeTab(props.for)\n }... | javascript | chosen |
[
{
"from": "system",
"value": "Allow upper case env vars as nconf source\n"
},
{
"from": "human",
"value": "'use strict';\n/**\n * @module config\n */\nconst path = require('path');\nconst pck = require(path.join('..', '..', 'package'));\nconst nconf = require('nconf');\n\nconst DEFAULT_ENVIRONME... | javascript | chosen |
[
{
"from": "system",
"value": ":tiger: Add a test for saving a setting.\n"
},
{
"from": "human",
"value": "import {assert} from 'chai';\nimport fs from 'fs';\nimport {contains, dissoc, merge} from 'ramda';\n\nimport {getSetting} from '../../backend/settings.js';\n\ndescribe('Settings', function()... | javascript | chosen |
[
{
"from": "system",
"value": "Add TODO to clean up 'departed' field\n"
},
{
"from": "human",
"value": "Template.home.onCreated(function () {\n const instance = this;\n\n // Set current Home ID from router\n instance.homeId = Router.current().params.homeId;\n\n // Subscribe to current home\n ... | javascript | chosen |
[
{
"from": "system",
"value": "UserAvatar: Remove redundant default value for `user` property\n"
},
{
"from": "human",
"value": "import Component from '@ember/component';\nimport { computed } from '@ember/object';\nimport { readOnly } from '@ember/object/computed';\n\nexport default class UserAva... | javascript | chosen |
[
{
"from": "system",
"value": "Expand DefaultLayout html and Widget placement\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst LayoutRenderable = require('./layoutRenderable');\n\nclass DefaultLayoutRenderable extends LayoutRenderable {}\n\nDefaultLayoutRenderable.id = 'defaultLayout';... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor promises implementation to use ES2017 async/await syntax\n"
},
{
"from": "human",
"value": "const passport = require(\"passport\");\nconst mongoose = require(\"mongoose\");\nconst GoogleStrategy = require(\"passport-google-oauth20\").Strategy;\nconst keys =... | javascript | chosen |
[
{
"from": "system",
"value": "[Storybook] Remove header of addon-info temporary\n\nSince the inline styling is damn strange now, header and preview parts are split into separate shadowed containers.\n\nIssue: storybooks/storybook#1877\n"
},
{
"from": "human",
"value": "import { configure, setAdd... | javascript | chosen |
[
{
"from": "system",
"value": "Fix invalid reference to bower package\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n normalizeEntityName: function() {\n // this prevents an error when the entityName is\n // not specified (since that doesn't actually matter\n //... | javascript | chosen |
[
{
"from": "system",
"value": "fix(grid): Remove whitespace between polygon elements\n"
},
{
"from": "human",
"value": "import React, {PropTypes, Component} from 'react';\nimport Color from '~/src/tools/Color';\n\nexport default class Polygon extends Component {\n static propTypes = {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix walkSync filter from recursing into node_modules\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar walkSync = require('walk-sync');\nvar execFile = require(\"child_process\").execFile;\n\nvar nodeTestFiles = walkSync('.')\n .filter(function(file) {\n r... | javascript | chosen |
[
{
"from": "system",
"value": "Use the DOMContentLoaded event instead of the load event."
},
{
"from": "human",
"value": "window.addEventListener(\"load\", function() {\n // Create the client instance.\n Pusher.instance = new Pusher(\"API_KEY\");\n\n // Force the connection to go unavailable a... | javascript | chosen |
[
{
"from": "system",
"value": "Add back hasMany, belongsTo to default export\n"
},
{
"from": "human",
"value": "import Factory from './factory';\nimport Response from './response';\nimport faker from './faker';\nimport Model from './orm/model';\nimport Serializer from './serializer';\nimport HasM... | javascript | chosen |
[
{
"from": "system",
"value": "Remove force to production ES\n"
},
{
"from": "human",
"value": "import _ from 'underscore'\nimport search from 'api/lib/elasticsearch.coffee'\nimport { matchAll } from 'api/apps/search/queries'\nconst { NODE_ENV } = process.env\n\n// GET /api/search\nexport const i... | javascript | chosen |
[
{
"from": "system",
"value": "Make use of the template variable in coupon weeks\n"
},
{
"from": "human",
"value": "jQuery(function ($) {\n\tvar endDate = new Date('$EndDate');\n\tvar template = '<span class=\"weeks\">%w</span> <span class=\"text-weeks\">weeks</span> <span class=\"days\">%d</span... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue where first selection in detail pane after refresh would not be possible\n\n"
},
{
"from": "human",
"value": "\ndefine([\n 'rangy',\n 'rangy-text'\n], function(\n rangy,\n rangyText\n) {\n\n return {\n expandRangeByWords: function(ran... | javascript | chosen |
[
{
"from": "system",
"value": "Add matomo _paq obj to global list\n"
},
{
"from": "human",
"value": "/* global MATOMO_SITE_ID, MATOMO_TRACKER_URL, MATOMO_ENABLE_LINK_TRACKING */\n\nexport default ({ router }) => {\n // Google analytics integration\n if (process.env.NODE_ENV === 'production' && ... | javascript | chosen |
[
{
"from": "system",
"value": "Change `StatusBar` into React-Class component from stateless function\n"
},
{
"from": "human",
"value": "/* @flow */\n\nimport React from \"react\";\nimport { observer } from \"mobx-react\";\n\nimport type Kernel from \"./../kernel\";\nimport typeof store from \"./.... | javascript | chosen |
[
{
"from": "system",
"value": "Use ember getter/setters the correct way\n"
},
{
"from": "human",
"value": "var SortHeaderView = Ember.View.extend({\n\ttagName: 'th',\n\tclassNameBindings: ['asc', 'desc', 'sorted'],\n\tclassNames: ['sortable'],\n\tattributeBindings: ['style'],\n\tstyle: \"cursor: ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo:\nserer =>\nserver\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar express = require('express'),\n kotoumi = require('./index'),\n http = require('http');\n\nvar application = express();\nvar server = http.createServer(application);\napp... | javascript | chosen |
[
{
"from": "system",
"value": "Add exception handler to CLI\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nconst jsdotmd = require('../lib')\nconst program = require('commander')\nconst path = require('path')\n\nprogram\n .usage('[options] <source> <destination')\n .option(\n '-l,... | javascript | chosen |
[
{
"from": "system",
"value": "Fix generation of serializer tests\n\nin `flexberry-model` blueprint\n"
},
{
"from": "human",
"value": "import { moduleForModel, test } from 'ember-qunit';\n\nmoduleForModel('<%= name %>', 'Unit | Serializer | <%= name %>', {\n // Specify the other units that are r... | javascript | chosen |
[
{
"from": "system",
"value": "Test with short pwd fails\n"
},
{
"from": "human",
"value": "/* TODO list\nisValid(\"\") --> false\nisValid(null) --> false\nisValid() --> false\nisValid(\"1Ag_\") --> false \nisValid(\"123456Je\") --> false \nisValid(\"123456y_\") --> false \nisValid(\"_JYhgyQ\") -... | javascript | chosen |
[
{
"from": "system",
"value": "Include context properties in track() calls\n\n[#131391691]\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst app = require('express')();\nconst Analytics = require('analytics-node');\nconst { secrets } = require('app/config/config');\nconst { guid } = requ... | javascript | chosen |
[
{
"from": "system",
"value": "Add grid, hide bmi by default\n"
},
{
"from": "human",
"value": " var chart = c3.generate({\n size: {\n },\n data: {\n url: 'weight_two.tsv',\n mimeType: 'tsv',\n x: 'date_time',\n xFormat: '%Y-%m-%d %H:%M:%S', // 'xFormat' can be used ... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.