conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Update docs router location type to `hash` for netlify\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function(environment) {\n let ENV = {\n modulePrefix: 'dummy',\n environment,\n rootURL: '/',\n locationType: 'auto',\n EmberE...
javascript
chosen
[ { "from": "system", "value": "Destroy stream early on error\n" }, { "from": "human", "value": "let Stream = require('stream');\nconst {SaxesParser, EVENTS} = require('saxes');\n\n// Backwards compatibility for earlier node versions and browsers\nif (!Stream.Readable || typeof Symbol === 'undefin...
javascript
chosen
[ { "from": "system", "value": "Make it possible to run a single benchmark file.\n" }, { "from": "human", "value": "var glob = require('glob');\nvar path = require('path');\nvar bench = require('do-you-even-bench');\n\nvar suites = [];\nglob.sync('./bench/benches/*.js').forEach(function(file) {\n ...
javascript
chosen
[ { "from": "system", "value": "Use utils instead of verbose bluebird\n" }, { "from": "human", "value": "// @flow\nimport Promise from 'bluebird'\nimport {normalizeMatch} from '../utils'\n\n\nexport async function checkDoMatchesExist(obj, args, ctx) {\n const count = await Promise.fromCallback(...
javascript
chosen
[ { "from": "system", "value": "Add two more tests and they are both failing\n" }, { "from": "human", "value": "describe(\"The constructor is supposed a proper Captcha object\", function() {\n it('Constructor Captcha exists', function(){\n expect(Captcha).toBeDefined();\n });\n var...
javascript
chosen
[ { "from": "system", "value": "Set up task detail template\n" }, { "from": "human", "value": "define(['Backbone'], function(Backbone){\n var TaskDetail = Backbone.View.extend({\n\n initialize: function(){\n this.collection.bind('change:selected', this.render, this);\n },\n\n render...
javascript
chosen
[ { "from": "system", "value": "Add the project url and license to the head.\n" }, { "from": "human", "value": "(function($) {\n\nvar defaults = {\n slow: 500\n};\n\n$.whenSlow = function(promise, callback, context) {\n\n // whenSlow(promise, 'methodName', object);\n if ($.type(callback) === 's...
javascript
chosen
[ { "from": "system", "value": "Use correct path and add log to show not working.\n" }, { "from": "human", "value": "import initStoryshots from '@storybook/addon-storyshots';\nimport { puppeteerTest } from '@storybook/addon-storyshots-puppeteer';\n\n// TODO\nconst path = () => {};\n\ninitStoryshot...
javascript
chosen
[ { "from": "system", "value": "Add link to account page in banner.\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { Navbar } from 'react-bootstrap';\n\nimport SignOutButton from './SignOut';\n\nimport 'bootstrap/dist/css/bootstrap.css';\nimport './Banner.css'...
javascript
chosen
[ { "from": "system", "value": "Fix test by omitting Modal expectation\n" }, { "from": "human", "value": "const React = require('react')\nconst should = require('should')\nconst { shallow } = require('enzyme')\nconst { expect } = require('chai')\n\nimport DropdownAlert from '../DropdownAlert'\nimp...
javascript
chosen
[ { "from": "system", "value": "Add pacman (commit missing file)\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar notify = require('gulp-notify'); // unused\nvar browserSync = require('browser-sync').create();\n\nvar projectName;\n// projectName = 'flappy-bird';\npro...
javascript
chosen
[ { "from": "system", "value": "Change to sending admin-say and mod-say to send messages directly\n\nGetting replied to each time is annoying.\n" }, { "from": "human", "value": "var commands = []\n\ncommands.ping = {\n adminOnly: false,\n modOnly: false,\n fn: function (client, message) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add a link to the 'add library' instructions in the footer\n" }, { "from": "human", "value": "import React from 'react';\n\nimport Link from '../components/Link';\n\nexport default () => {\n return (\n <footer className=\"footer\">\n <style jsx>{`\n ...
javascript
chosen
[ { "from": "system", "value": "Disable reduceIndents on CSS optimization package to fix animation issues\n" }, { "from": "human", "value": "// NOTE: this configuration file MUST NOT be loaded with `-p` or `--optimize-minimize` option.\n// This option includes an implicit call to UglifyJsPlugin an...
javascript
chosen
[ { "from": "system", "value": "Make spec_progress.js show up in the coverage report\n\n99% test coverage is nice, but it's not true.\n" }, { "from": "human", "value": "/*\n * Copyright 2014 Per Eckerdal\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use ...
javascript
chosen
[ { "from": "system", "value": "test: Add test to ensure you can provide any base class you want to Element().\n\nFixes #804\n" }, { "from": "human", "value": "/* eslint-env jasmine, mocha */\n\nimport { Element } from '../../../src';\nimport root from '../../../src/util/root';\n\nconst { HTMLDivE...
javascript
chosen
[ { "from": "system", "value": "Update Web Intents sample to correctly handle window closing\n" }, { "from": "human", "value": "var main = null;\nchrome.experimental.app.onLaunched.addListener(function(data) {\n if (main) {\n main.focus();\n } else {\n chrome.appWindow.create('index.html',...
javascript
chosen
[ { "from": "system", "value": "Fix bug where dedupe handler wasn't firing when the page changed (due to PJAX)\n" }, { "from": "human", "value": "\n$(function() {\n $('body').on('change', '[js-validate-dedupe]', function(e) {\n $formEl = $(e.currentTarget);\n ValidationDeduper.updateFormSta...
javascript
chosen
[ { "from": "system", "value": "Allow test port to be overridden by env variable.\n" }, { "from": "human", "value": "// Use the gulp-help plugin which defines a default gulp task\n// which lists what tasks are available.\nvar gulp = require('gulp-help')(require('gulp'));\n\ngulp.task('set-envs:tes...
javascript
chosen
[ { "from": "system", "value": "Improve dynamic code helper to cover `{{this.*}}` and filter empty values\n" }, { "from": "human", "value": "import { helper } from '@ember/component/helper';\nimport { get } from '@ember/object';\n\nexport default helper(function ([source], { language, dynamic, quo...
javascript
chosen
[ { "from": "system", "value": "Replace dummy data with actual pull from the API\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('cheeperApp')\n .controller('MainCtrl', function ($scope) {\n $scope.stream = [\n {\n 'id': '1',\n 'content': 'It\\'s true Robi...
javascript
chosen
[ { "from": "system", "value": "Add Token-Contract files to deploy stage\n" }, { "from": "human", "value": "module.exports = {\n build: {\n \"index.html\": \"index.html\",\n \"app.js\": [\n \"javascripts/app.js\"\n ],\n \"app.css\": [\n \"stylesheets/app.css\"\n ],\n \...
javascript
chosen
[ { "from": "system", "value": "Improve error logging for ct\n" }, { "from": "human", "value": "const logger = require('logger');\nconst ErrorSerializer = require('serializers/errorSerializer');\n\nfunction init() {\n\n}\n\nfunction middleware(app, plugin) {\n app.use(async(ctx, next) => {\n ...
javascript
chosen
[ { "from": "system", "value": "Add localStorage variable for add_to_cart function\n" }, { "from": "human", "value": "function something()\n\t{\n\t\tvar x = window.localStorage.getItem('ccc'); // x = hh['ccc']\n\n\t\tx = x * 1 + 1; // x = x + 1 // x * 1 is because in JS first row return as a strin...
javascript
chosen
[ { "from": "system", "value": "fix($browser): Allow custom styling for board component\n" }, { "from": "human", "value": "import React, {Component, PropTypes} from 'react'\nimport {BoardDiv, RackDiv, RackTile} from '../styles/Board'\nimport Grid from './Grid'\nimport Title from './Title'\n\nexpor...
javascript
chosen
[ { "from": "system", "value": "Make sure we call the correct method in sshKey.list()\n" }, { "from": "human", "value": "'use strict';\n\nvar SshKey = function (request) {\n this.request = request;\n};\n\n// https://github.com/GleSYS/API/wiki/functions_sshkey#sshkeyadd\nSshKey.prototype.add = f...
javascript
chosen
[ { "from": "system", "value": "Fix regexp to include modules whose names begin with \"ui-\"\n" }, { "from": "human", "value": "let tests = [\n // what result to expect, string to match against\n [ true, '/home/mike/git/work/stripes-experiments/stripes-connect' ],\n [ true, '/home/mike/git/work...
javascript
chosen
[ { "from": "system", "value": "Convert `Metadata` to use private `class` fields\n\nPlease refer to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields\n" }, { "from": "human", "value": "/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apac...
javascript
chosen
[ { "from": "system", "value": "Use viewBox instead of width and height.\n" }, { "from": "human", "value": "\"use strict\";\n\nmodule.exports = svg;\n\nvar xml = require(\"xml\");\n\nvar orient = require(\"./lib/orient\");\nvar trace = require(\"./lib/trace\");\nvar optimize = require(\"./lib/opti...
javascript
chosen
[ { "from": "system", "value": "Add object for arrays and create constructor for car\n" }, { "from": "human", "value": "var colors = [\"teal\", \"burnt sienna\", \"aquamarine blue\", \"yellow\"];\nvar horseName = [\"Amanda\", \"Anabel\", \"Nibisco\", \"Nickles and Dimes\"];\n\ncolors.push(\"red\")...
javascript
chosen
[ { "from": "system", "value": "Remove class active from ul not targeted.\n" }, { "from": "human", "value": "$(\"a.dropdown\").click(function(){\n $(this).toggleClass(\"active\");\n $(\".dropdown\").not(this).has(\".active\").removeClass(\"active\");\n $(this).siblings().toggleClass(\"active\")...
javascript
chosen
[ { "from": "system", "value": "Fix mutation not returning person\n" }, { "from": "human", "value": "import { Likes } from '../collections';\nimport { swapiLoader, peopleUrl } from './swapi-loader';\nimport { pubsub } from './pubsub';\n\nexport const resolvers = {\n Person: {\n id: ({ url }) =...
javascript
chosen
[ { "from": "system", "value": "Add more verbose output to version test\n" }, { "from": "human", "value": "/* eslint no-new: 0 */\n\nimport { module, test } from 'qunit';\nimport version from 'shopify-buy/version';\n\nmodule('Unit | Version');\n\ntest('it exists', function (assert) {\n assert.exp...
javascript
chosen
[ { "from": "system", "value": "Build es6 Survey Module for Production\n" }, { "from": "human", "value": "var webpack = require('webpack');\nvar ManifestPlugin = require('webpack-manifest-plugin');\nvar source = __dirname + \"/../../app/assets/javascripts/\";\nvar output = \"./public/assets/javasc...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary nextTick in server loader\n\nloadInContext ensures async exec." }, { "from": "human", "value": "/*jshint evil: true */\n/*global loadResources, lumbarLoader */\nlumbarLoader.loadJS = function(moduleName, callback, options) {\n return loadResource...
javascript
chosen
[ { "from": "system", "value": "Send user false if does not exist\n" }, { "from": "human", "value": "module.exports = {\n\n setUp: function(self, passport){\n return function(){\n Array.prototype.push.call(arguments, passport);\n self.login.apply(this, arguments);\n };\n },\n\n ...
javascript
chosen
[ { "from": "system", "value": "Remove method that does nothing when class closes - it was used before when testing things out\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaS...
javascript
chosen
[ { "from": "system", "value": "Add constants for products and categories\n" }, { "from": "human", "value": "export const AUTH_USER = 'AUTH_USER';\nexport const UNAUTH_USER = 'UNAUTH_USER';\nexport const AUTH_ERROR = 'AUTH_ERROR';\nexport const SET_USER_DATA = 'SET_USER_DATA';" }, { "from"...
javascript
chosen
[ { "from": "system", "value": "Add knobs for `timeout` and `in` to the FadeIn compnent\n" }, { "from": "human", "value": "import React from 'react';\nimport { storiesOf } from '@storybook/react';\n\nimport { FadeIn } from 'components';\n\nstoriesOf('Animations/FadeIn', module)\n .add('default'...
javascript
chosen
[ { "from": "system", "value": "Fix FoldersList not refreshing correctly\n" }, { "from": "human", "value": "import React, { PureComponent } from 'react';\nimport Icon from 'react-fontawesome';\n\nimport classnames from 'classnames';\n\nimport AppActions from '../../actions/AppActions';\n\n/*\n|---...
javascript
chosen
[ { "from": "system", "value": "Fix countdown time identifier mistake\n" }, { "from": "human", "value": "module.exports = {\n 0: {\n countdown: 0,\n time: \"מיידי\",\n time_en: \"Immediately\"\n },\n 15: {\n countdown: 15,\n time: \"15 שניות\",\n ...
javascript
chosen
[ { "from": "system", "value": "Debug the whole execution 🎯\n" }, { "from": "human", "value": "import { execFile } from 'child_process'\nimport flow from 'flow-bin'\nimport { logError, log } from '../util/log'\n\nconst errorCodes = {\n TYPECHECK_ERROR: 2\n}\n\nexport default (saguiOptions) => ne...
javascript
chosen
[ { "from": "system", "value": "Expand the REST health test to assert on more stuff\n" }, { "from": "human", "value": "import request from 'supertest';\nimport { expect } from 'chai';\n\ndescribe('/health', () => {\n it('displays the health status of the app', function test(done) {\n this.time...
javascript
chosen
[ { "from": "system", "value": "Support to use \"data-*\" attributes to set options\n" }, { "from": "human", "value": " // Save the other cropper\n Cropper.other = $.fn.cropper;\n\n // Register as jQuery plugin\n $.fn.cropper = function (options) {\n var args = toArray(arguments, 1);\n v...
javascript
chosen
[ { "from": "system", "value": "Change style for better coverage report\n" }, { "from": "human", "value": "import {Stream} from 'stream'\n\n/**\n * This is taken from event-stream npm module.\n *\n * Merges the given streams into a new stream.\n *\n * @param {Stream[]) toMerge streams to be merged...
javascript
chosen
[ { "from": "system", "value": "Stop logging the MDB object" }, { "from": "human", "value": "\nrequire(['ByteSource', 'AppleVolume'], function(ByteSource, AppleVolume) {\n \n 'use strict';\n \n function makeFileDrop(el, callback) {\n if (typeof el === 'string') {\n el = document.getEle...
javascript
chosen
[ { "from": "system", "value": "Add 'window' as global if it doesn't exist. Detect webpack when using android.\n" }, { "from": "human", "value": "if(process.browser){\n //Webpack code\n if(!window.fetch){\n require('whatwg-fetch');\n }\n module.exports = require('./noco-loader!....
javascript
chosen
[ { "from": "system", "value": "Rename variable for better clarity\n" }, { "from": "human", "value": "'use strict';\n\nangular\n .module('lmServices')\n .service('Window', function($window) {\n this.on = function(opts) {\n // Cache the available width and height to avoiding...
javascript
chosen
[ { "from": "human", "value": "Implement Update Subcampaign Model REST\n" }, { "from": "gpt", "value": "var writeSubcampaignModelLogic = require('../../logic/subcampaign/writeSubcampaignModelLogic')\nvar subcampaignModelCheckerLogic = require('../../logic/subcampaign/subcampaignModelCheckerLogic')...
javascript
chosen
[ { "from": "system", "value": "Support for RPC to work from chrome ext itself.\n\nNormally our RPC was just for the web site to the bg context but I found\na need to use it in the boot stage.\n" }, { "from": "human", "value": "/* global chrome, sauce */\n\n(function() {\n 'use strict';\n\n ...
javascript
chosen
[ { "from": "system", "value": "Set icon title and cleanups\n" }, { "from": "human", "value": "const tabsWithCarousel = {};\n\n// Toggle icon for tab.\nfunction toggleState(tabId, open) {\n tabsWithCarousel[tabId] = open;\n browser.browserAction.setIcon({\n tabId: tabId,\n path...
javascript
chosen
[ { "from": "system", "value": "Support queries in created browserHistory\n" }, { "from": "human", "value": "/* global window document */\n/* eslint \"import/no-extraneous-dependencies\": 0 */\n\nimport 'babel-polyfill';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport Relay ...
javascript
chosen
[ { "from": "system", "value": "Make the run script the default\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n\"use strict\";\n\nconst program = require('commander');\n\nprogram\n .version('1.0.0')\n .command('deploy', 'deploy Lambda based microservice to AWS')\n .command('deploy-si...
javascript
chosen
[ { "from": "system", "value": "Make 404 page render as HTML\n" }, { "from": "human", "value": "'use strict';\n\nvar bodyParser = require('body-parser');\nvar express = require('express');\n\nvar app = express();\n\nvar Config = require('./config/index');\n//var SessionConfig = require('./config/s...
javascript
chosen
[ { "from": "system", "value": "Reword use strict plugin so it's not such a blatant copy of the Banner Plugin anymore\n" }, { "from": "human", "value": "/*\r\n MIT License http://www.opensource.org/licenses/mit-license.php\r\n Author Tobias Koppers @sokra\r\n*/\r\nvar ConcatSource = require(...
javascript
chosen
[ { "from": "system", "value": "Fix wrong selector in the \"beforeFind\" event\n" }, { "from": "human", "value": "events = {};\n\nevents.beforeFind = function(e) {\n var Class = this;\n var selector = e.data.selector;\n\n var behaviorData = Class.getBehavior('softremove');\n\n selector[behavio...
javascript
chosen
[ { "from": "system", "value": "Add 'defaultCollapsed' option to treeConfig" }, { "from": "human", "value": "/**\n * @license Angular UI Tree v2.10.0\n * (c) 2010-2015. https://github.com/angular-ui-tree/angular-ui-tree\n * License: MIT\n */\n(function () {\n 'use strict';\n\n angular.module('ui...
javascript
chosen
[ { "from": "system", "value": "Remove temp directory just after the test (as well)\n" }, { "from": "human", "value": "/* eslint no-console:0 */\n\nvar os = require('os');\nvar crypto = require('crypto');\nvar fse = require('fs-extra');\n\nvar originalCwd = process.cwd();\nvar createdDirectories =...
javascript
chosen
[ { "from": "system", "value": "Update CoffeeScript docs to use the current ES6 syntax\n" }, { "from": "human", "value": "// CoffeeScript compilation. This must be enabled by modification\n// of Gruntfile.js.\n//\n// The `bare` option is used since this file will be transpiled\n// anyway. In Coffe...
javascript
chosen
[ { "from": "system", "value": "Remove a comment about the polyfill that's no longer included\n" }, { "from": "human", "value": "/*\n * jquery.requestAnimationFrame\n * https://github.com/gnarf37/jquery-requestAnimationFrame\n * Requires jQuery 1.8+\n *\n * Copyright (c) 2012 Corey Frang\n * Licen...
javascript
chosen
[ { "from": "system", "value": "Remove 'show table' button insertion. Button has been added to template instead\n" }, { "from": "human", "value": "$(function() {\n var markdownTable = $('.markdown-table-wrap');\n\n if (markdownTable.length) {\n $('<button class=\"btn btn--secondary bt...
javascript
chosen
[ { "from": "system", "value": "Update GenerateJsonPlugin to match JSON.stringify signature\n" }, { "from": "human", "value": "function GenerateJsonPlugin(filename, obj) {\n this.filename = filename;\n this.obj = obj;\n}\n\nGenerateJsonPlugin.prototype.apply = function apply(compiler) {\n compi...
javascript
chosen
[ { "from": "system", "value": "Configure port number through environment variable.\n" }, { "from": "human", "value": "const WebSocketServer = require('ws').Server;\nconst Rx = require('rx');\nconst wss = new WebSocketServer({ port: 8080 });\n\nconst connects$ = Rx.Observable.fromEvent(wss, 'conne...
javascript
chosen
[ { "from": "system", "value": "[Feature] Create ADD_REVIEW case for reducer\n" }, { "from": "human", "value": "import { List, Set } from 'Immutable'" }, { "from": "gpt", "value": "import { List, Set, Map } from 'Immutable'\n\nconst reviews = (state=List(), action) => {\n switch (acti...
javascript
chosen
[ { "from": "system", "value": "Add note regarding username/password interchange." }, { "from": "human", "value": "// Create the credentials object for export\nexports.credentials = {};\n\n// Watson Speech to Text\n// https://www.ibm.com/watson/developercloud/speech-to-text.html\nexports.credentia...
javascript
chosen
[ { "from": "system", "value": "Call feed fetch_info, then transition to add-operator\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n createFeedFromGtfsService: Ember.inject.service('create-feed-from-gtfs'),\n actions: {\n next: func...
javascript
chosen
[ { "from": "system", "value": "Set TERM variable on shell\n" }, { "from": "human", "value": "import OverlayRoute from 'ui/pods/overlay/route';\n\nexport default OverlayRoute.extend({\n model: function() {\n var container = this.modelFor('container');\n var opt = {\n attachStdin: true,...
javascript
chosen
[ { "from": "system", "value": "Revert \"conditionally adds nav links to textbook page\"\n\nThis reverts commit cda678f41d9f4376ac46e4bb1d95a204f95a18ec.\n" }, { "from": "human", "value": "var RenderPage = function () {\n if (myuwFeatureEnabled('instructor_schedule')) {\n $(\"#app_naviga...
javascript
chosen
[ { "from": "system", "value": "Allow running gulp install as root\n" }, { "from": "human", "value": "var alloy = require('../.alloy');\nvar gulp = require('gulp');\nvar path = require('path');\nvar replace = require('gulp-replace');\nvar run = require('run-sequence');\nvar spawn = require('spawn-...
javascript
chosen
[ { "from": "system", "value": "Use sample values from the documentation.\n" }, { "from": "human", "value": "'use strict';\n\n// Load external modules\nvar Cloudinary = require('cloudinary');\nvar Code = require('code');\nvar Hapi = require('hapi');\nvar Lab = require('lab');\n\n// Load internal m...
javascript
chosen
[ { "from": "system", "value": "Update to WADO Image Loader 2.1.3\n" }, { "from": "human", "value": "Package.describe({\n name: 'ohif:cornerstone',\n summary: 'Cornerstone Web-based Medical Imaging libraries',\n version: '0.0.1'\n});\n\nNpm.depends({\n hammerjs: '2.0.8',\n 'cornerst...
javascript
chosen
[ { "from": "system", "value": "Fix window global bug in explode" }, { "from": "human", "value": "import Bacon from 'baconjs';\n\n\nfunction _snakeToCamel(s){\n // From https://coderwall.com/p/iprsng/convert-snake-case-to-camelcase\n return s.replace(/(\\_\\w)/g, function(m){return m[1].toUp...
javascript
chosen
[ { "from": "system", "value": "Add script for input-fields and navigation toggle\n" }, { "from": "human", "value": "$(window).load(function () {\n var $container = $('.row').masonry();\n $container.imagesLoaded(function () {\n $container.masonry();\n });\n});" }, { "from":...
javascript
chosen
[ { "from": "system", "value": "Add some actions to start with to bring search to every page\n\nRef #32\n" }, { "from": "human", "value": "import styles from './../css/styles.css';\nimport fonts from './../fonts.css';\n\nimport './algolia/instantsearch.js'\nimport './lazysizes.js'\n//import './lis...
javascript
chosen
[ { "from": "system", "value": "Disable settings to avoid config window popping up on android\n" }, { "from": "human", "value": "/*\n * This is the main PebbleJS file. You do not need to modify this file unless\n * you want to change the way PebbleJS starts, the script it runs or the libraries\n *...
javascript
chosen
[ { "from": "system", "value": "Remove unneeded param from require.ensure\n\nwebpack will infer it from the require inside!\n" }, { "from": "human", "value": "/** @flow */\n\nrequire('es6-shim');\n\nfunction run() {\n var React = require('react');\n var router = require('./router');\n router.ru...
javascript
chosen
[ { "from": "system", "value": "Use real parsed datas for monuments" }, { "from": "human", "value": "\n// compile and add handlebars templates\n\n'use strict';\n\ndefine([\n\t'text!templates/monuments_list.hbs'\n], function(monuments_list_template) {\n\t\n\n\t// TODO replace by real datas and rena...
javascript
chosen
[ { "from": "system", "value": "Use 'XDomainRequest' to facilitate cross domain requests in Old IE.\n" }, { "from": "human", "value": "var get = function(url, cb) {\n var req = new XMLHttpRequest();\n\n req.open('GET', url, true);\n req.onload = function() {\n if (req.status === 200 && req.s...
javascript
chosen
[ { "from": "system", "value": "Remove user-content- link prefix from the generated html\n" }, { "from": "human", "value": "\nvar fs = require('fs'),\n path = require('path'),\n hogan = require('hogan.js'),\n Client = require('github');\n\nvar html = fs.readFileSync('base.html', 'utf8');\...
javascript
chosen
[ { "from": "system", "value": "Initialize by attribute name instead of element ID\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('arachne.visualizations.directives')\n .directive('con10tVega', function () { // con10t-vega\n return {\n restrict: 'E',\n ...
javascript
chosen
[ { "from": "system", "value": "Remove deprecated react rule (added in eslint > 1.4)\n" }, { "from": "human", "value": "module.exports = {\n\n extends: 'commercetools',\n\n plugins: ['react'],\n\n ecmaFeatures: {\n jsx: true\n },\n\n env: {\n browser: true\n },\n\n rules: {\n 'reac...
javascript
chosen
[ { "from": "system", "value": "chore(test): Fix styleguide specs now that tabs changed\n" }, { "from": "human", "value": "require('./spec_helper');\n\nimport StyleguideNav from '../../src/styleguide-nav';\n\ndescribe('StyleguideNav', () => {\n beforeEach(() => {\n const navTree = {\n CSS...
javascript
chosen
[ { "from": "system", "value": "Send old stringified actions with sendAction\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n classNameBindings: ['isActive'],\n isActive: false,\n selectedClass: 'active',\n\n list: Ember.computed({\n ...
javascript
chosen
[ { "from": "system", "value": "Use console.error instead of throw\n\n- We want the script to continue.\n- Console.error supports logging objects.\n- Poltergeist will still fail with this implementation.\n" }, { "from": "human", "value": "import request from \"browser-request\";\n\nconst url = \"h...
javascript
chosen
[ { "from": "system", "value": "Update docs for row constructor\n" }, { "from": "human", "value": "import Ember from 'ember';\n\n /**\n * @module Classes\n * @class Row\n */\nexport default class Row extends Ember.ObjectProxy.extend({\n /**\n * @property hidden\n * @type {Boolean}\n * @d...
javascript
chosen
[ { "from": "system", "value": "Add fetch with cache method\n" }, { "from": "human", "value": "const Errors = require('./../errors');\n\nmodule.exports = new (function ModelFactory() {\n\n this.new = function (properties = {}, unsaved = true) {\n let newModel = new thi...
javascript
chosen
[ { "from": "system", "value": "Make sure we fetch and merge from the local repository directory\n\nFixes #8\n" }, { "from": "human", "value": "var Strings = require('./strings');\n\nvar fs = require('fs'),\n\tcp = require('child_process');\n\nmodule.exports = function(repo, name, callback){\n\tva...
javascript
chosen
[ { "from": "system", "value": "Add ui-router and build site routes\n" }, { "from": "human", "value": "(function(){\n 'use strict';\n\n angular\n .module('shareMark', ['ui.router', 'templates', 'ngclipboard'])\n .config(function($stateProvider, $urlRouterProvider){\n\n $urlRouterProvi...
javascript
chosen
[ { "from": "system", "value": "Reformat slightly and update call to Message ctor.\n" }, { "from": "human", "value": "// FIXME: Find a portable way to add our project files to NODE_PATH\n\nvar Message = require('./bin/message');\nvar HandlerAdaptor = require('./bin/handler_adaptor');\nvar calculat...
javascript
chosen
[ { "from": "system", "value": "Correct the entry point used by the packaged versions of the software\n" }, { "from": "human", "value": "/*\n * Copyright 2014-2016 Simon Edwards <simon@simonzone.com>\n *\n * This source code is licensed under the MIT license which is detailed in the LICENSE.txt fi...
javascript
chosen
[ { "from": "system", "value": "Fix error msg about datasource key length\n" }, { "from": "human", "value": "const datasource = require('../../lib/datasource')\n\nmodule.exports = (data, state, send, done) => {\n if (data.key.length !== 64) {\n return done(new Error('datasource keys must be 32...
javascript
chosen
[ { "from": "system", "value": "Set back to login code\n" }, { "from": "human", "value": "function ApplicationTabGroup(Window) {\n\t//create module instance\n\tvar self = Ti.UI.createTabGroup();\n\t\n\t//load component dependencies\n\tvar Post = require('post');\n\n\t\n\t//create app tabs\n\tvar w...
javascript
chosen
[ { "from": "system", "value": "Refactor MD as a pure function\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react'\nimport Post from 'Post'\n\nexport default class MD extends Component {\n static propTypes = {\n route: PropTypes.object.isRequired\n }\n\n re...
javascript
chosen
[ { "from": "system", "value": "Set scope correctly with bind\n" }, { "from": "human", "value": "var fieldRegistry = require('kwf/frontend-form/field-registry');\nvar Field = require('kwf/frontend-form/field/field');\nvar kwfExtend = require('kwf/extend');\n\nvar TextArea = kwfExtend(Field, {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix typo compiliation > compilation" }, { "from": "human", "value": "var colors = require(\"colors\");\nvar TruffleError = require(\"truffle-error\");\nvar inherits = require(\"util\").inherits;\n\ninherits(CompileError, TruffleError);\n\nfunction CompileError(messa...
javascript
chosen
[ { "from": "system", "value": "Add error message to NFC sample" }, { "from": "human", "value": "scanButton.addEventListener(\"click\", async () => {\n log(\"User clicked scan button\");\n\n try {\n const reader = new NDEFReader();\n await reader.scan();\n log(\"> Scan started\");\n\n ...
javascript
chosen
[ { "from": "system", "value": "Implement dialog injection of buttons\n" }, { "from": "human", "value": "/**\n * Created by bjanish on 3/6/15.\n */\n\nRcmAdminService.rcmAdminPageNotFound = {\n\n onEditChange: function(page){\n\n var pageData = page.model.getData();\n\n if(page.ed...
javascript
chosen
[ { "from": "system", "value": "Add second SearchInput for First Name/Last Name (prototyped and not connected for now)\n" }, { "from": "human", "value": "'use strict';\n\nimport React, { Component } from 'react';\nimport {\n View,\n ListView,\n Text,\n} from 'react-native';\n\nimport globalStyl...
javascript
chosen
[ { "from": "system", "value": "Allow unknown options on \"root level\"\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n'use strict';\n\nconst program = require('commander');\nconst pkg = require('../package.json');\n\nprogram\n .version(pkg.version)\n\n .command('diff <left> <right>',...
javascript
chosen
[ { "from": "system", "value": "Add buildElements function to build a list of requested elements.\n" }, { "from": "human", "value": "( function (root) {\n root.utils = {\n $: function (selector) {\n return $('#fixtures').find(selector);\n },\n clearFixtures: function () {\n $('...
javascript
chosen