conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix for it not detecting the sock_modules folder\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n // Project configuration.\n grunt.initConfig({\n\tgitclone: {\n\t\tdocs: {\n\t\t\toptions: {\n\t\t\t\tdirectory: \"site\",\n\t\t\t\trepositor...
javascript
chosen
[ { "from": "system", "value": "Fix BreadcrumbsView docs that still said DropdownMenuView\n" }, { "from": "human", "value": "/**\n * A Backbone view that renders breadcrumbs-type tiered navigation.\n *\n * Initialize the view by passing in the following attributes:\n *\n *~~~ javascript\n * var vi...
javascript
chosen
[ { "from": "system", "value": "Fix download location for 'nuget.exe'\n" }, { "from": "human", "value": "const fs = require('fs');\nconst request = require('request');\n\nconst nuget = './nuget.exe';\n\nconsole.info(`Downloading 'nuget.exe'...`);\nconsole.info();\n\nrequest\n .get('http://nuget...
javascript
chosen
[ { "from": "system", "value": "Update Hearts lambda function to new DB schema.\n" }, { "from": "human", "value": "'use strict';\nconst db = require('../utils/database');\n\n/**\n * Fetches a user ID from the database.\n * @constructor\n * @param {integer} userId - The user's ID\n * @return {integ...
javascript
chosen
[ { "from": "system", "value": "Fix usage of Piwik in renderer\n" }, { "from": "human", "value": "import {ipcRenderer} from 'electron';\n\nimport piwik from 'renderer/services/piwik';\nimport webView from 'renderer/webview';\n\n/**\n * Forward a message to the webview.\n */\nipcRenderer.on('fwd-we...
javascript
chosen
[ { "from": "system", "value": "Store high scores to redis set\n" }, { "from": "human", "value": "module.exports = function Server(expressInstance, sessionStore) {\n\tvar parseCookie = require('connect').utils.parseCookie;\n\tvar io = require('socket.io').listen(expressInstance);\n\n\tio.configure...
javascript
chosen
[ { "from": "system", "value": "Use history fallback on development\n" }, { "from": "human", "value": "/* eslint-disable no-var */\n\nvar webpack = require('webpack')\nvar Config = require('webpack-config').default\n\nmodule.exports = new Config().extend('webpack/config/base.config.js').merge({\n ...
javascript
chosen
[ { "from": "system", "value": "Update form elements to more accurately reflect actual Stripe form\n\nThese attributes more closely reflect the actual form injected by Stripe. The additional attributes are also useful for selecting elements in tests\n" }, { "from": "human", "value": "class Element...
javascript
chosen
[ { "from": "system", "value": "Add some more trigger messages\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n'use strict';\n\nvar Slack = require('slack-client');\nvar token = process.argv[2];\n\nif (!token) {\n console.error([\n 'Usage: feurbot <token>',\n null,\n 'To genera...
javascript
chosen
[ { "from": "system", "value": "Print data about extended headers\n" }, { "from": "human", "value": "var tar = require(\"../tar.js\")\n , fs = require(\"fs\")\n\nfs.createReadStream(__dirname + \"/../test/fixtures/c.tar\")\n .pipe(tar.Reader())\n .on(\"entry\", function (e) {\n console.error...
javascript
chosen
[ { "from": "system", "value": "Add a Grunt task to produce a minified version of clever-video.js.\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n\n\tgrunt.initConfig({\n\n\t\tpkg: grunt.file.readJSON('package.json'),\n\n\t\tclean: {\n\t\t\tbuild: {\n\t\t\t\tsrc: \"build\"...
javascript
chosen
[ { "from": "system", "value": "Move global task options object above task targets\n\nTo improve that readability.\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function (grunt) {\n\n\tgrunt.initConfig({\n\t\tpkg: {\n\t\t\tname: 'grunt-jekyll'\n\t\t},\n\n\t\tjekyll: {\n\t\t\...
javascript
chosen
[ { "from": "system", "value": "Update Grunt deploy to use bundle\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n require('load-grunt-tasks')(grunt);\n\n grunt.initConfig({\n secret: grunt.file.readJSON('secret.json'),\n\n // TODO: This won't rm removed resources au...
javascript
chosen
[ { "from": "system", "value": "Set up a copy task.\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n concat: {\n options: {\n separator: ';'\n },\n dist: {\n src: 'src/*.js',...
javascript
chosen
[ { "from": "system", "value": "Add grunt-release and rename NPM module to grypher.\n" }, { "from": "human", "value": "// Generated on 2014-07-07 using generator-nodejs 2.0.0\nmodule.exports = function (grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n js...
javascript
chosen
[ { "from": "system", "value": "Fix JS on profile page\n\nOn profile edit this is not #content\nFixes #866\n" }, { "from": "human", "value": "$(document).ready(function () {\n var offset\n var viewMessageId = $('#content').data().viewMessageId\n if (viewMessageId) {\n offset = $('#message-' ...
javascript
chosen
[ { "from": "system", "value": "Watch only tests root folder\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n \"use strict\";\n\n grunt.initConfig({\n pkg: grunt.file.readJSON(\"package.json\"),\n watch: {\n php: {\n files: [\"sr...
javascript
chosen
[ { "from": "system", "value": "Fix up some tabs & spaces inconsistencies\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n grunt.initConfig({\n bower: {\n main: {\n rjsConfig: 'js/main.js'\n }\n },\n jshint: {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix for broken last version jquery destination\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n grunt.initConfig({\n karma: {\n options: {\n basePath: '',\n frameworks: ['mocha', 'sinon-chai'],\n files: [\n ...
javascript
chosen
[ { "from": "system", "value": "Remove init function from resource service, project uuid gives API.\n\n– SAAS-130\n" }, { "from": "human", "value": "'use strict';\n\n(function() {\n angular.module('ncsaas')\n .service('resourcesService', ['RawResource', 'RawProject', 'currentStateService', '$q...
javascript
chosen
[ { "from": "system", "value": "Add complete user data to session\n" }, { "from": "human", "value": "angular.module('bolt.auth', [])\n\n.controller('AuthController', function ($scope, $window, $location, Auth) {\n $scope.user = {};\n\n $scope.signin = function () {\n Auth.signin($scope.user)\...
javascript
chosen
[ { "from": "system", "value": "[BUGFIX] Set the correct new name for the docs autoprefixer sub-task\n" }, { "from": "human", "value": "/**\n * Compile:documentation task.\n * Create the extension documentation/styleguide.\n */\n\nmodule.exports = function(grunt) {\n\t\"use strict\";\n\n\tgrunt.re...
javascript
chosen
[ { "from": "system", "value": "Add real XP value to ChracterStatusDialog.\n\nStill need real MaxXP\n" }, { "from": "human", "value": "ui.CharacterStatusDialog = function(template, character) {\r\n ui.Dialog.call(this, template);\r\n\r\n this.name = ui.label(this, '.label.name');\r\n this.hp = ...
javascript
chosen
[ { "from": "system", "value": "Load themes when DOM is ready\n" }, { "from": "human", "value": "/**\n * The application initalizer.\n */\nfunction app() {\n alert('test');\n}\n\nexport default app;\n" }, { "from": "gpt", "value": "import $ from 'jquery';\nimport themes from './themes...
javascript
chosen
[ { "from": "system", "value": "Revert accidental committal of client test-data\n\nClient should not get test-data right now; that was just for debugging." }, { "from": "human", "value": "Package.describe({\n summary: \"Given the set of the constraints, picks a satisfying configuration\",\n vers...
javascript
chosen
[ { "from": "system", "value": "Fix proptypes error related to validation\n" }, { "from": "human", "value": "import {PropTypes} from 'react'\n\nfunction lazy(fn) {\n let cachedFn\n return (...args) => (cachedFn || (cachedFn = fn()))(...args)\n}\n\nconst field = PropTypes.shape({\n name: PropTyp...
javascript
chosen
[ { "from": "system", "value": "Fix finalOpacity unable to be 0\n" }, { "from": "human", "value": "import Motion from '../motion';\nimport Tween from '../tween';\nimport { rAF } from '../concurrency-helpers';\n\nexport default class Opacity extends Motion {\n constructor(sprite, opts) {\n supe...
javascript
chosen
[ { "from": "system", "value": "Add coverage, fix jquery-ui component line\n" }, { "from": "human", "value": "basePath = '..';\n\nfiles = [\n JASMINE,\n JASMINE_ADAPTER,\n 'components/jquery/jquery.js',\n 'components/jquery-ui/ui/jquery-ui.custom.js',\n 'components/angular/angular.js',\n 'co...
javascript
chosen
[ { "from": "system", "value": "Remove jsx binds from secondary toolbar\n" }, { "from": "human", "value": "import React from 'react';\nimport { TALENTS_PAGES } from '../constants';\n\nexport default class SecondaryToolbar extends React.Component {\n\n render() {\n const { page, navigateTo } = ...
javascript
chosen
[ { "from": "system", "value": "Fix a problem with rails-ujs and Decidim 0.15.2\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/as...
javascript
chosen
[ { "from": "system", "value": "Tidy up initialization code and error messages\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport config from '../config/environment';\nimport { getContext, generateError } from 'ember-cli-bugsnag/utils/errors';\nimport { getMetaData } from '../u...
javascript
chosen
[ { "from": "system", "value": "Test out activity stuff for basic DataObject stuff\n" }, { "from": "human", "value": "// activity-test.js\n//\n// Test the activity module\n//\n// Copyright 2012, StatusNet Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may no...
javascript
chosen
[ { "from": "system", "value": "Remove unused Closure compiler configuration\n\nFiles are compiled using Uglifier, which has its own config.\n" }, { "from": "human", "value": "({\n appDir: \"./app\",\n baseUrl: \"scripts\",\n mainConfigFile: \"./app/scripts/main.js\",\n dir: \"./build\...
javascript
chosen
[ { "from": "system", "value": "Remove sorting so it doesn't appear we're ordering things correctly\n" }, { "from": "human", "value": "angular.module('SceneSkeleton')\n\t.controller('SceneListController',function($scope,Scenes){\n\t\t$scope.scenes = [];\n\t\tScenes.query(function(data) {\n\t\t\t$s...
javascript
chosen
[ { "from": "system", "value": "Move invocation into parens that contain function\n" }, { "from": "human", "value": "/**\n * cbpAnimatedHeader.js v1.0.0\n * http://www.codrops.com\n *\n * Licensed under the MIT license.\n * http://www.opensource.org/licenses/mit-license.php\n *\n * Copyright 2013,...
javascript
chosen
[ { "from": "system", "value": "Fix `event.clearSelection is not a function` error\n" }, { "from": "human", "value": "import Component from '@ember/component';\nimport { later } from '@ember/runloop';\n\nexport default Component.extend({\n tagName: '',\n copyText: '',\n showSuccess: false,\n s...
javascript
chosen
[ { "from": "system", "value": "Use the component's element as the scroll container, by default\n\nWe also have to allow the same container to be both the scroll container\nand the content container, which we've done here.\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport def...
javascript
chosen
[ { "from": "system", "value": "Rearrange express config according to docs\n" }, { "from": "human", "value": "var express = require('express'),\n path = require('path'),\n config = require('config'),\n setupPassport = require('./setupPassport'),\n flash = require('connect-flash'),\n ...
javascript
chosen
[ { "from": "system", "value": "Implement shutdown command for Windows\n" }, { "from": "human", "value": "// Initial timer length in seconds\nvar timerCount = 15,\n remote = require('electron').remote,\n arguments = remote.getGlobal('sharedObject').prop1;\n\n// debug mode ensures that comput...
javascript
chosen
[ { "from": "system", "value": "feature: Allow use of snap-opt-* attrs for opts\n" }, { "from": "human", "value": "angular.module('snap')\n .directive('snapContent', ['SnapConstructor', 'snapRemote', function (SnapConstructor, snapRemote) {\n 'use strict';\n return {\n restrict: 'AE',\...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary code to init the game\n" }, { "from": "human", "value": "describe('Satellite game', function () {\n it('should exists', function () {\n expect(s).to.be.an('object');\n expect(s).to.have.property('config');\n expect(s).to.have.prope...
javascript
chosen
[ { "from": "system", "value": "Convert URL to lower case before applying regex\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react';\n\nconst Comhead = ({ url }) => {\n if (url) {\n const comhead = url.match(/^https?:\\/\\/(?:www.)*([^\\/?#]+)/)[1];\n const urlLink =...
javascript
chosen
[ { "from": "system", "value": "Fix indentation of the C++ grammar\n" }, { "from": "human", "value": "define(function() {\n\n // Export\n return function(Prism) {\n\n Prism.languages.cpp = Prism.languages.extend('c', {\n \t'keyword': /\\b(alignas|alignof|asm|auto|bool|break|case|catch|char...
javascript
chosen
[ { "from": "system", "value": "Fix db yargs hookup for bundle\n" }, { "from": "human", "value": "const OS = require(\"os\");\nconst serveCommand = require(\"./commands/serve\");\n\nconst usage =\n \"truffle db <sub-command> [options]\" +\n OS.EOL +\n OS.EOL +\n \" Available sub-commands: \" ...
javascript
chosen
[ { "from": "system", "value": ":bug: Fix potential null reference callback invokation\n\nFixes #11328\n" }, { "from": "human", "value": "var childProcess = require('child_process');\n\n// Exit the process if the command failed and only call the callback if the\n// command succeed, output of the c...
javascript
chosen
[ { "from": "system", "value": "Set defalut focus on first input element in search panel\n" }, { "from": "human", "value": "angular.module('openspecimen')\n .directive('osRightDrawer', function(osRightDrawerSvc) {\n return {\n restrict: 'A',\n\n link: function(scope, element, attrs) ...
javascript
chosen
[ { "from": "system", "value": "Update jscodeshift transform to replace and rewrite style expr\n" }, { "from": "human", "value": "/**\n * This replaces every occurence of variable \"foo\".\n */\nmodule.exports = function(fileInfo, api) {\n const j = api.jscodeshift;\n const root = j(fileInfo.sou...
javascript
chosen
[ { "from": "system", "value": "Fix the carry over script\n" }, { "from": "human", "value": "\n'use strict';\n\nconst\n Promise = require('bluebird'),\n models = require('../lib/model/db');\n\nconst\n YEAR_FROM = '2017',\n YEAR_TO = '2018';\n\n/*\n * 1. Get all users\n *\n * 2. Iterate thr...
javascript
chosen
[ { "from": "system", "value": "Remove chat messages from mails\n" }, { "from": "human", "value": "'use strict';\n/**\n * @file Retrieve mails from the account\n */\n\nvar googleapis = require('googleapis');\n\n// Retrieve all mails associated with this user account,\n// using refresh_token\n// st...
javascript
chosen
[ { "from": "system", "value": "Use content field for description: no need to prepare posts for RSS.\n" }, { "from": "human", "value": "import RSS from 'rss';\nimport { errorHtml } from '../util';\n\n/**\n * Generates RSS.\n *\n * @param {object} props\n * @return {string}\n */\nexport default fun...
javascript
chosen
[ { "from": "system", "value": "Handle `window` object through crowi instance\n\n" }, { "from": "human", "value": "import queryString from 'query-string'\n\nexport default class CrowiAuth {\n constructor(crowi) {\n this.crowi = crowi\n this.location = crowi.location\n this.localStorage =...
javascript
chosen
[ { "from": "system", "value": "Remove more AMD-style module code\n" }, { "from": "human", "value": "/* global define */\n\ndefine([\n 'backbone'\n], function(Backbone) {\n 'use strict';\n\n var AppRouter = Backbone.Router.extend({\n\n routes: {\n '': 'loadDefault'\n ...
javascript
chosen
[ { "from": "system", "value": "Put newGameAction into its own function\n" }, { "from": "human", "value": "import { drawCard } from './deck';\nimport { addAndFillMana } from './character';\n\nexport const NEW_GAME = 'NEW_GAME';\n\nexport function newGame({ yourName, opponentName, isPlayerStarting ...
javascript
chosen
[ { "from": "system", "value": "Make proxy proxy to backend\n" }, { "from": "human", "value": "const merge = require('webpack-merge');\nconst config = require('./webpack.config');\n\nconst host = process.env.SDF_HOST || 'localhost';\nconst port = process.env.SDF_PORT || '3000';\n\nmodule.exports =...
javascript
chosen
[ { "from": "system", "value": "Fix a typo in a description\n" }, { "from": "human", "value": "View = (function() {\n\n // Fetch a template based on its ID from the HTML page. Return the\n // text content of the template without rendering it.\n var get = function(templateID) {\n };\n\n // Re...
javascript
chosen
[ { "from": "system", "value": "Call AuthModal inside ang-auth directive and save authenticated user in the scope.\n" }, { "from": "human", "value": "/**\n * Created by oleksandr at 6/1/14 1:47 PM\n */\nangular.module('myApp')\n .directive('angAuth', [function() {\n function link($scope) {\n ...
javascript
chosen
[ { "from": "system", "value": "refactor(plugin-koa): Make Koa/Express ip logic consistent\n" }, { "from": "human", "value": "module.exports = ctx => {\n if (!ctx) return {}\n const request = ctx.req\n const connection = request.connection\n const address = connection && connection.address && ...
javascript
chosen
[ { "from": "system", "value": "Disable text return false on ajax links only\n\nSigned-off-by: tomdev <96835dd8bfa718bd6447ccc87af89ae1675daeca@codigy.nl>\n" }, { "from": "human", "value": "(function () {\n $('a[data-disable-with][data-onloadingtext]')\n .live(\"ajax:before\", setLoadingText);...
javascript
chosen
[ { "from": "system", "value": "Set the locale in dummy app\n\nFor internationalization in dates and translations I've set the default\nlocale to english.\n" }, { "from": "human", "value": "import Route from '@ember/routing/route';\nimport ApplicationRouteMixin from 'ember-simple-auth/mixins/appli...
javascript
chosen
[ { "from": "system", "value": "Improve services by gsim appearance\n\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react'\nimport { connectFromRoute } from '../routes'\nimport { sparqlConnect } from '../sparql/configure-sparql'\nimport { LOADED } from 'sparql-connect'\nimpo...
javascript
chosen
[ { "from": "system", "value": "Add portDefinitionos to app config defaults\n" }, { "from": "human", "value": "import Util from \"../helpers/Util\";\n\n// Default values for the config form editor\nexport const AppConfigFormDefaultValues = Util.deepFreeze({\n id: \"\",\n cmd: \"\",\n cpus: 1,\n...
javascript
chosen
[ { "from": "system", "value": "Add update method to WebGameMaker\n\nThe update method should update all subsystems\nthat might need to be updated, since this is the\napplication main loop.\n" }, { "from": "human", "value": "var WebGameMaker = {};\n\nWebGameMaker.init = function() {\n\n var plu...
javascript
chosen
[ { "from": "system", "value": "Build minimized versions of sdk\n" }, { "from": "human", "value": "const fs = require('fs');\nconst path = require('path');\nconst formatter = require('eslint-friendly-formatter');\n\nconst port = process.env.PORT || 9000;\n\nmodule.exports = {\n devtool: 'inline-s...
javascript
chosen
[ { "from": "system", "value": "Update the cytoscape alias to `cytoscape/src/cjs`\n\nThis updates the cytoscape alias with the recent changes to the\ncytoscape build system. When you pull this commit into your local copy,\nmake sure to `npm i cytoscape` to make sure your cytoscape dependency is\nin-sync.\n\n...
javascript
chosen
[ { "from": "system", "value": "Change bundle output dir to public\n" }, { "from": "human", "value": "var path = require('path')\n\nmodule.exports = {\n entry: './src/index.js',\n output: {\n path: path.resolve(__dirname, 'dist'),\n filename: 'bundle.js'\n },\n module: {\n rules: [\n ...
javascript
chosen
[ { "from": "system", "value": "Fix gulp clean task to not read files before sending them before deletion.\n" }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp');\n\nvar config = require('./_config.js');\nvar paths = config.paths;\nvar $ = config.plugins;\n\nvar istanbul = ...
javascript
chosen
[ { "from": "system", "value": "Add chapter 2, exercise 3\n" }, { "from": "human", "value": "let str = \"\";\nlet size = 8;\nfor (let i = 0; i < size; ++i) {\n for (let j = 0; j < size; ++j) {\n str += (j + i) % 2 ? \"#\" : \" \";\n }\n str += \"\\n\";\n}\nconsole.log(str)\n" }, ...
javascript
chosen
[ { "from": "system", "value": "Add Button title and externalLink props\n" }, { "from": "human", "value": "import React from 'react';\n\nexport default class Button extends React.Component {\n\n render() {\n return (\n <div>\n <form action=\"http://hack.cwru.edu\">\n <inpu...
javascript
chosen
[ { "from": "system", "value": "Make game of cards example more complete\n" }, { "from": "human", "value": "// Sample spec for a game of cards\n\nconst _ = require('lodash');\n\nconst s = require('../lib/spec');\n\nconst isSuit = [':club', ':diamond', ':heart', ':spade'];\nconst isRank = _.range(2...
javascript
chosen
[ { "from": "system", "value": "Add 'each' method to Array2d.\n" }, { "from": "human", "value": "define(function() {\n\tvar Array2d = function () {\n\t\tthis._columns = {};\n\t};\n\n\tArray2d.prototype.get = function(location) {\n\t\tvar row = this._columns[location.x];\n\n\t\tif (row)\n\t\t\tretu...
javascript
chosen
[ { "from": "system", "value": "Return an array of elements for `waitFor` with `count`.\n" }, { "from": "human", "value": "import waitUntil from '../wait-until';\nimport { getContext } from '../setup-context';\nimport getElement from './-get-element';\n\n/**\n @method waitFor\n @param {string|El...
javascript
chosen
[ { "from": "system", "value": "Revert \"set promises delay to 0ms for syncing tests\"\n\nThis reverts commit 0635c2e3f885433899fb773f8be4d6c1e4fda583.\n" }, { "from": "human", "value": "// use higher values to slow down tests for debugging\nvar promisesDelay;\n\n// const syncingTestsActive = (pro...
javascript
chosen
[ { "from": "system", "value": "chore(sinon-doublist): Update use to latest API\n" }, { "from": "human", "value": "var sinon = require('sinon');\nvar chai = require('chai');\n\nvar should = chai.should();\nchai.Assertion.includeStack = true;\nchai.use(require('sinon-chai'));\n\nvar cliMod = requir...
javascript
chosen
[ { "from": "system", "value": "Disable the load of the experimental code\n" }, { "from": "human", "value": "// Minimap\n\nvar minimap = {\n minilist: function () {\n console.log(\"Mini list started\");\n $pages = jQuery(\"#minimap__plugin .list-group-item\")\n $pages.map(...
javascript
chosen
[ { "from": "system", "value": "Hide logout message on login\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n var app = angular.module('radar.store');\n\n function unauthorizedResponseFactory($q, session, notificationService, $state) {\n return function(promise) {\n ...
javascript
chosen
[ { "from": "system", "value": "frontend: Use an Ember.Object as model\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n model: function() {\n return this.store.createRecord('runscript');\n },\n actions: {\n cancel: function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Add party and state to tooltip\n" }, { "from": "human", "value": "$(document).ready(function() {\n var $body = $('body');\n var className = 'dial-congress';\n var senateData;\n\n var scan = function() {\n $.each(senateData, function(i, senator) {\n var f...
javascript
chosen
[ { "from": "system", "value": "Use the german version of grako_map.\n" }, { "from": "human", "value": "var EC = protractor.ExpectedConditions;\nvar map = require('./map/map.page');\n\ndescribe('map', function() {\n it('should include a heatmap on the grako_map page', function() {\n brow...
javascript
chosen
[ { "from": "system", "value": "Update Target rendering to use gCamera.isInView\n" }, { "from": "human", "value": "Target = function(x, y) {\r\n this.x = x;\r\n this.y = y;\r\n this.life = 11;\r\n return this;\r\n}\r\nTarget.prototype.render = (function(context) {\r\n function render() {\r\n ...
javascript
chosen
[ { "from": "system", "value": "Update description of load texture\n" }, { "from": "human", "value": "export default {\n title: 'Load Texture',\n description: 'Simple example to load a texture',\n tags: 'ImageLoader, Image',\n public: true,\n scripts: [\n // '../../libs/three/r84/three.js'...
javascript
chosen
[ { "from": "system", "value": "Remove incorrect references to exports\n" }, { "from": "human", "value": "import Immutable from 'immutable';\n\nconst project = {\n projectKey: '12345',\n sources: {html: '', css: '', javascript: ''},\n enabledLibraries: [],\n};\n\nconst state = {\n currentProje...
javascript
chosen
[ { "from": "system", "value": "Disable no-new-func lint rule and remove TODO\n" }, { "from": "human", "value": "'use strict';\n\n/**\n* Test if the global scope is bound to the \"global\" variable present in Node.js environments. When creating a new function using the `Function(){}` constructor, ...
javascript
chosen
[ { "from": "system", "value": "Refresh login status on link\n" }, { "from": "human", "value": "'use strict';\n\nvar hairfieApi = require('../../services/hairfie-api-client');\nvar Facebook = require('../../services/facebook');\nvar login = require('./utils').login;\n\nmodule.exports = function (...
javascript
chosen
[ { "from": "system", "value": "Move NPM repo to production mode. Add minified version.\n" }, { "from": "human", "value": "const path = require(\"path\");\n\nmodule.exports = {\n module: {\n rules: [\n {\n test: /\\.css$/,\n use: [\"style-loader\", \"css-loader\"]\n },\...
javascript
chosen
[ { "from": "system", "value": "Add icon information for views\n" }, { "from": "human", "value": "angular.module('Mccy.routes', [\n 'ngRoute'\n ])\n\n .config(function ($routeProvider) {\n $routeProvider\n .when('/view', {\n templateUrl: 'views/view-co...
javascript
chosen
[ { "from": "human", "value": "Add new project adding module [skip ci]\n" }, { "from": "gpt", "value": "/**\n * UI and function to add project\n */\n'use strict';\n\nvar $ = require('jquery');\nvar m = require('mithril');\nvar $osf = require('js/osfHelpers');\n\n\nvar AddProject = {\n controlle...
javascript
chosen
[ { "from": "system", "value": "Revert \"Load org inside location\"\n\nThis reverts commit d2c28437309a2df5a0ea9641f4619ca32fa4910f.\n" }, { "from": "human", "value": "import React, { Component } from 'react'\n\nimport globalConfig from '../../config'\n\nimport { fetchLocation, fetchOrganization }...
javascript
chosen
[ { "from": "system", "value": "Fix TimedEvent sets GUID twice\n\nTBR=nduca@chromium.org\nBUG=\n\nReview URL: https://codereview.appspot.com/12746044" }, { "from": "human", "value": "// Copyright (c) 2013 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-s...
javascript
chosen
[ { "from": "system", "value": "Use the dots reporter for karms tests\n" }, { "from": "human", "value": "module.exports = function(config) {\n config.set({\n frameworks: ['jasmine', 'browserify', 'source-map-support'],\n\n files: [\n 'src/js/Application.js',\n ...
javascript
chosen
[ { "from": "system", "value": "News: Change the \"More at ...\" link when flipping through.\n" }, { "from": "human", "value": "function ddg_spice_news(api_result) {\n \"use strict\";\n\n if(api_result.length === 0) {\n\treturn;\n }\n\n console.log(api_result);\n\n var generic = fal...
javascript
chosen
[ { "from": "system", "value": "Update map view to log out data from parent model\n" }, { "from": "human", "value": "\"use strict\";\n\nvar Backbone = require('backbone');\nvar $ = require('jquery');\nBackbone.$ = $;\n\nmodule.exports = Backbone.View.extend({\n tagName: 'div',\n id: 'map-canvas'...
javascript
chosen
[ { "from": "system", "value": "Throw on uhandled promise rejections. Jest will return non-zero code eventually.\n" }, { "from": "human", "value": "/* eslint-disable import/no-extraneous-dependencies */\n/* This file is used only by jest test framework. */\nimport { configure } from 'enzyme';\nimp...
javascript
chosen
[ { "from": "system", "value": "Use openveo-player html implementation by default\n\nIf no player is specified, it will now use the html implementation of the player instead of the vimeo player\n" }, { "from": "human", "value": "(function(app){\n\n \"use strict\"\n\n app.controller(\"PlayerContr...
javascript
chosen
[ { "from": "system", "value": "Remove scroll listener when it is really not necessary\n" }, { "from": "human", "value": "(function(root, factory) {\n if (typeof define === 'function' && define.amd) {\n define('scrollindo', factory);\n } else if (typeof module === 'object' && module.exports) ...
javascript
chosen
[ { "from": "system", "value": "Add new function for relative paths.\n" }, { "from": "human", "value": "/*jslint node: true*/\n\"use strict\";\n\nvar fs = require('fs');\nvar path = require('path');\nvar S = require('string');\n\nvar options = require('./options.js');\nvar logging = require('./log...
javascript
chosen
[ { "from": "system", "value": "Make sourceError optional in CallProcessingError\n" }, { "from": "human", "value": "/**\n Errors\n @description defines custom errors used for the middleware\n @exports {class} APIError\n**/\n\n/**\n @class APIError\n @desc given when API response gives error o...
javascript
chosen
[ { "from": "system", "value": "Update number on page load\n" }, { "from": "human", "value": "function updateIdea() {\n $('#idea').attr('id', 'idea-old').animate({ left: '200%', right: '-200%', opacity:'0' }, function() {\n this.remove();\n });\n $('#idea-old').clone().attr('id', 'idea').app...
javascript
chosen
[ { "from": "system", "value": "Add parameter validation to contact form\n" }, { "from": "human", "value": "// Here be the site javascript!\n\n$(document).ready(function () {\n\n new WOW().init();\n\n $('.preload-section').fadeOut(function() {\n $('.profile').fadeIn();\n });\n\n ...
javascript
chosen
[ { "from": "system", "value": "Add sample page where sessions data gets fetched from appropriate collection\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n model(params) {\n return this.store.find('experiment', params.experiment_id)...
javascript
chosen
[ { "from": "system", "value": "Fix that pesky text box resize!\n" }, { "from": "human", "value": "function activateResize(element) {\n Event.observe(element, 'keyup', function() {\n updateSize(element)\n });\n updateSize(element)\n}\n\nfunction updateSize(element) {\n //if scrollbars appea...
javascript
chosen