messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst invokeLambdaFunction = require('../src/lambda-invoke-function');\n\nfunction respondOnError(error) {\n const payload = {\n message: error.message,\n };\n\n return invokeLambdaFunction(payload, 'need-to-write-this');\n}\n\nmo... | javascript | edit | 0 | 1 | mit | 0268292f245fe5f46119fb24384af1b5a529070f | Quartz/quackbot | slack-events-api-router/src/respond-on-error.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar should = require('should')\n , time = require('../')\n\ndescribe('tzset()', function () {\n\n beforeEach(function () {\n process.env.TZ = 'UTC'\n })\n\n it('should work with no arguments', function () {\n process.env.TZ = ... | javascript | edit | 0 | 1 | mit | a896071d4c282a23662e6aa3cfcaaf4a69cb901a | TooTallNate/node-time,TooTallNate/node-time,santigimeno/node-time,santigimeno/node-time,santigimeno/node-time,TooTallNate/node-time | test/tzset.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport window from 'global/window';\nimport document from 'global/document';\nimport $ from 'jquery';\nimport videojs from 'video.js';\n\nconst player = window.player = videojs('preview-player', {\n fluid: true,\n plugins: {\n mux:... | javascript | edit | 0 | 2 | mit | 60d2770c762811bcd21ab9324d683ea9daedb27c | videojs/videojs.com | _src-js/home.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar prefork = require('../build/Release/prefork').prefork,\n fs = require('fs');\n\nmodule.exports = function (options) {\n options = options || {};\n var outfd, errfd;\n\n if (Array.isArray(options.customFds) && options.customF... | javascript | edit | 0 | 10 | mit | e35487c6fb979c0931cd2a3505f4c9063705c702 | AvianFlu/node-prefork,AvianFlu/node-prefork,AvianFlu/node-prefork | lib/prefork.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndescribe('Dataview', function () {\n this.bail(true)\n this.timeout(20 * 1000)\n\n it('Switch to \"Dataview\" tab', function (done) {\n eTT().tab('Dataview').click(done)\n })\n\n it('Click on second \"customDatavie... | javascript | edit | 0 | 1 | mit | 3eaf3d248b0118353260a4c9b2f8ecdc23fff359 | antonfisher/extjs-testing-tool,antonfisher/extjs-testing-tool,antonfisher/node-mocha-extjs,antonfisher/node-mocha-extjs,antonfisher/mocha-extjs,antonfisher/node-mocha-extjs,antonfisher/extjs-testing-tool,antonfisher/mocha-extjs,antonfisher/mocha-extjs | test/suites/080-dataview.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n Modernizr.load({\n test: Modernizr.inputtypes.date,\n nope: ['http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery... | javascript | edit | 0 | 1 | apache-2.0 | b6c8c4c49aa05e66504efbae37a2838ddf046564 | CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords | public_records_portal/static/js/all_requests.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport '@/css/tailwind.css'\nimport '@/css/prism.css'\n\nimport { ThemeProvider } from 'next-themes'\nimport Head from 'next/head'\n\nimport siteMetadata from '@/data/siteMetadata'\nimport Analytics from '@/components/analytics'\nimport... | javascript | edit | 0 | 3 | mit | 51167144a5be785042ff15a9435f6ea8c75d6c53 | ravuthz/ravuthz.github.io,ravuthz/ravuthz.github.io | pages/_app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar chai = require('chai');\nvar chaiHttp = require('chai-http');\nvar server = require('../app');\nvar should = chai.should();\n// var expect = chai.expect;\n// var request = require(\"request\");\n\ndescribe(\"Date-a-Dog Server\", fu... | javascript | edit | 0 | 1 | mit | 9b34ee7d9ab3d2cacedcf549273fbca9c6465cb3 | Date-a-Dog/Date-a-Dog,Date-a-Dog/Date-a-Dog,jammua/dog-dating-app,Date-a-Dog/Date-a-Dog | api/test/api.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Implement Set SubcampaignModel Function (Create)"
},
{
"role": "assistant",
"content": "var configuration = require('../../config/configuration.json')\nvar utility = require('../../public/method/utility')\n\nmodule.exports = ... | javascript | new_file | 0 | 2 | mit | a1f68d943eed3335fc3620dbb6088186b2b05a29 | Flieral/Announcer-Service,Flieral/Announcer-Service | logic/subcampaign/writeSubcampainModelLogic.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { bindable, inject } from 'aurelia-framework';\nimport imagesLoaded from 'imagesloaded';\nimport Masonry from 'masonry-layout';\nimport { EventAggregator } from 'aurelia-event-aggregator';\nimport { RefreshView } from 'resources/... | javascript | edit | 0 | 2 | mit | e44aba0a81f3eaef631290c10776d94d033c74d9 | mttmccb/dark_social,mttmccb/dark_social,mttmccb/dark_social | src/templates/interactions/interaction-list.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar config = require('../lib/config'),\n cors = require('../lib/cors'),\n fs = require('fs');\n\nvar paths = [],\n len = 0;\n\nexports.init = function() {\n if (config.mocksEnabled) {\n console.log(\"Mock server enabl... | javascript | edit | 0 | 7 | mit | 9163d9dbc4f58aefbc620934c3db961f0bbf0477 | walmartlabs/mock-server,walmartlabs/mock-server | mocks/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { XMLTextElement } from 'substance'\nimport { TEXT } from '../kit'\n\nexport default class TableCellNode extends XMLTextElement {\n constructor (...args) {\n super(...args)\n\n this.rowIdx = -1\n this.colIdx = -1\n }\n... | javascript | edit | 0 | 2 | mit | fee15f1ba4479c2cbfa2005cea0f46bf53b9604c | substance/texture,substance/texture | src/article/TableCellNode.js | rejected_duplicate | Near-duplicate of sample 77366 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { createSelector } from 'reselect';\n\nimport ActionTypes from 'constants/ActionTypes';\nimport searchFiltersSelector from 'selectors/searchFiltersSelector';\nimport searchResultsSelector from 'selectors/searchResultsSelector';\n... | javascript | edit | 0 | 1 | mit | 90d29f9b4968cb4b3f2175847954cb76bee9825b | fastmonkeys/respa-ui | app/selectors/containers/searchPageSelector.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(() => {\n 'use strict';\n\n var player = \"O\";\n var moves = [];\n var winningCombos = [\n [\"1\", \"2\", \"3\"],\n [\"4\", \"5\", \"6\"],\n [\"7\", \"8\", \"9\"],\n [\"1\", \"5\", \"9\"],\n ... | javascript | edit | 0 | 4 | mit | af6cdec03b5ff9934466b7625e887d76f0a862ce | olillevik/olillevik.github.io,olillevik/olillevik.github.io | script.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global window */\n\nwindow.deprecationWorkflow = window.deprecationWorkflow || {};\nwindow.deprecationWorkflow.config = {\n workflow: [\n { handler: 'silence', matchId: 'ember-metal.get-with-default' },\n { handler: 'silence',... | javascript | edit | 0 | 0 | mit | 41e38cf5affb703233b4aa0097af8e7d10e4e817 | jrjohnson/frontend,dartajax/frontend,ilios/frontend,ilios/frontend,dartajax/frontend,jrjohnson/frontend | config/deprecation-workflow.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//= require jquery\n//= require jquery_ujs\n\n// -- Plugins, in alphabetical order\n//= require backstretch\n//= require bootstrap\n//= require bootstrap.collapse\n//= require bootstrap.modal\n//= require bootstrap.tabs\n//= require can... | javascript | edit | 0 | 1 | mit | 6d0b782f76d6c05a5a2bb6c085de8a8767cf3b06 | factore/tenon,factore/tenon,factore/tenon,factore/tenon | app/assets/javascripts/tenon/tenon_manifest.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {css} from 'react-emotion';\n\nconst wipStyle = css`\n background-color: tomato;\n color: ivory;\n font-variant: small-caps;\n line-height: 1.1;\n padding: 0 2... | javascript | edit | 0 | 3 | mit | 0df84d28c5767cfd17c54d3eff5d338ad5c31768 | openregister/specification | src/components/status-tag.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { registerFragment } from 'meteor/vulcan:lib';\n\n// ------------------------------ Vote ------------------------------ //\n\n// note: fragment used by default on the UsersProfile fragment\nregisterFragment(`\n fragment UsersAdm... | javascript | edit | 0 | 0 | mit | b3972a05472f510278dbd5d94e95bde4ae14e6cc | VulcanJS/Vulcan,VulcanJS/Vulcan | packages/vulcan-admin/lib/modules/fragments.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n!function(exports) {\n 'use strict';\n\n var RunQueue = exports.RunQueue;\n\n function Component() {\n this.next = new RunQueue;\n this.end = new RunQueue;\n }\n\n Component.extend = function(constructorFn) {\n var scope =... | javascript | edit | 0 | 4 | mit | 3b2be9fe350de22a5a4e466287dade2ab983c9ac | reissbaker/gamekernel,reissbaker/gamekernel | lib/component.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\nCopyright 2009 University of Toronto\n\nLicensed under the Educational Community License (ECL), Version 2.0. \nou may not use this file except in compliance with this License.\n\nYou may obtain a copy of the ECL 2.0 License at\nhttp... | javascript | edit | 0 | 4 | apache-2.0 | 406332aa98abddd4ce4d910c23cd596cf7912dab | cspace-deployment/ui,cspace-deployment/ui,cherryhill/collectionspace-ui,cspace-deployment/ui,cspace-deployment/ui,cherryhill/collectionspace-ui,cspace-deployment/ui,cherryhill/collectionspace-ui,cherryhill/collectionspace-ui | src/main/webapp/js/objEntrySetup.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction load_timelines() {\n $.getJSON('/time_series.json',function(data) {\n var options = {\n xaxis: {\n mode: \"time\"\n },\n series: {\n points: {\n show: \"true\"\n },\n line... | javascript | edit | null | null | mit | 91faa0f9e1e9d211b7be72b254b18578d2bdb3b3 | tdaede/awcy,tdaede/awcy,mdinger/awcy,tdaede/awcy,mdinger/awcy,tdaede/awcy,mdinger/awcy,tdaede/awcy,tdaede/awcy,mdinger/awcy,mdinger/awcy | www/timelines.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Basedata = require('./base-data');\nconst BouquetModel = require('./models/bouquete-model');\n\nclass BouquetsData extends Basedata {\n constructor(db) {\n super(db, BouquetModel, BouquetModel);\n }\n}\n\nmodule.export... | javascript | edit | 0 | 1 | mit | 94a36fed0967ce47563c8b7b0dd31261bc4253e4 | viktoria-flowers/ViktoriaFlowers,viktoria-flowers/ViktoriaFlowers | data/bouquets-data.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Router from 'marbles/router';\nimport WizardComponent from './views/wizard';\nimport Dispatcher from './dispatcher';\n\nvar MainRouter = Router.createClass({\n\troutes: [\n\t\t{ path: '', handler: 'landingPage' },\n\t\t{ path: '/... | javascript | edit | 0 | 8 | bsd-3-clause | 7bca0c33e145e79e368f0a2dd216ea424130c312 | Brandywine2161/flynn,felixrieseberg/flynn,benbjohnson/flynn,whouses/flynn,shads196770/flynn,lmars/flynn,ozum/flynn,rikur/flynn,tonicbupt/flynn,josephglanville/flynn,arekkas/flynn,josephglanville/flynn,ozum/flynn,benbjohnson/flynn,jzila/flynn,rikur/flynn,schatt/flynn,kgrz/flynn,shads196770/flynn,GrimDerp/flynn,justintun... | installer/app/src/router.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n 'hr/utils',\n 'hr/hr',\n 'collections/users'\n], function (_, hr, Users) {\n // Collection for all current collaborators\n var collaborators = new Users();\n\n return collaborators;\n});\n```\n\nApply this c... | javascript | edit | 0 | 1 | apache-2.0 | 413d998e9a23cf6dea7653a87fef26e52773a622 | nobutakaoshiro/codebox,CodeboxIDE/codebox,nobutakaoshiro/codebox,Ckai1991/codebox,rodrigues-daniel/codebox,rajthilakmca/codebox,lcamilo15/codebox,code-box/codebox,etopian/codebox,kustomzone/codebox,smallbal/codebox,kustomzone/codebox,quietdog/codebox,ahmadassaf/Codebox,ronoaldo/codebox,rodrigues-daniel/codebox,Ckai1991... | client/core/collaborators.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n app.models.Package = Backbone.Model.extend({ \n initialize : function () {\n\n }\n });\n})();\n\n```\n\nApply this change: Use client-side browsing for modules"
},
{
"role": "assistant",
"content": "... | javascript | edit | 0 | 5 | mit | 48c27bbb46634c75d02bcfb60f89b327232fc913 | web-audio-components/component.fm-old | client/app/models/package.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Correct path to package file"
},
{
"role": "assistant",
"content": "require('http').createServer(function(req, res) {\n res.end(require('./package.json').version);\n}).listen(process.env.PORT || 3000);"
}
] | javascript | new_file | 0 | 1 | mit | ba53cf9d780c86286ae53b38fbd28fd904ad8273 | proofme/grunt-awsebtdeploy,endrec/grunt-awsebtdeploy,metacommunications/grunt-awsebtdeploy,nathanwelch/grunt-awsebtdeploy,simoneb/grunt-awsebtdeploy | app/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n$(function () {\n\n (function fixControlsLength () {\n $('.form-group').each(function (index) {\n $('.control-label', this)\n .addClass('col-xs-4').css({'text-align':'right'})\n .next... | javascript | edit | 0 | 2 | mit | 39a25f48ec2728f756ae65836d51f15ff7c0f866 | simov/express-admin-site | examples/public/examples.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Stories2SnapsConverter from './Stories2SnapsConverter';\nimport api from './api';\n\nexport * from './test-bodies';\nexport { Stories2SnapsConverter };\n\nexport default api;\n\n```\n\nApply this change: Change \"export * from x\... | javascript | edit | 0 | 0 | mit | 36d6a9c69feb8b13289c8f15ab517a0667b60fdb | storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook | addons/storyshots/storyshots-core/src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nclass LobbyController {\n constructor($scope, $log, $location, GameService, SocketService) {\n 'ngInject';\n\n this.$log = $log;\n this.$scope = $scope;\n this.GameService = GameService;\n this.SocketService = SocketServ... | javascript | edit | 0 | 4 | mit | 54f3ce25289725244ff7945559223c7d9cd12cca | hendryl/Famous-Places-Web,hendryl/Famous-Places-Web | src/app/lobby/lobby.controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfrappe.ui.form.ControlHTML = frappe.ui.form.Control.extend({\n\tmake: function() {\n\t\tthis._super();\n\t\tthis.disp_area = this.wrapper;\n\t},\n\trefresh_input: function() {\n\t\tvar content = this.get_content();\n\t\tif(content) this... | javascript | edit | 0 | 2 | mit | 118261e590c58a5c69daced92aae03144a98500b | yashodhank/frappe,manassolanki/frappe,paurosello/frappe,frappe/frappe,neilLasrado/frappe,tmimori/frappe,vjFaLk/frappe,RicardoJohann/frappe,saurabh6790/frappe,ESS-LLP/frappe,mhbu50/frappe,ESS-LLP/frappe,mhbu50/frappe,almeidapaulopt/frappe,almeidapaulopt/frappe,mbauskar/frappe,tundebabzy/frappe,yashodhank/frappe,yashodha... | frappe/public/js/frappe/form/controls/html.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport View from '../view';\nimport template from '../../templates/widgets/datasetInfoWidget.pug';\nimport '../../stylesheets/widgets/datasetInfoWidget.styl';\n/**\n* This widget is used to diplay minerva metadata for a dataset.\n*/\nco... | javascript | edit | 0 | 9 | apache-2.0 | 93664c46cc6d4c98ba1143016df5915d685a1c5a | Kitware/minerva,Kitware/minerva,Kitware/minerva | web_external/views/widgets/DatasetInfoWidget.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by farid on 8/16/2017.\n */\nimport React, {Component} from \"react\";\nimport Category from \"./Category\";\nimport {getCategories} from \"../actions/Category\";\nimport {connect} from \"react-redux\";\n\nexport class H... | javascript | edit | 0 | 2 | mit | ae1cbbc68890a64279ba3a17ba61d8b24cdb0d2d | faridsaud/udacity-readable-project,faridsaud/udacity-readable-project | src/components/HomePage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n/**\n * Module dependencies.\n */\n\nvar express = require('express');\nvar path = require('path');\nvar api = require('./lib/api');\nvar app = module.exports = express();\n\napp.set('port', process.env.PORT || 3000... | javascript | edit | 0 | 1 | mit | 85b2d4790c23204545d0c12d145b6aea1e0f408d | brettshollenberger/rootstrikers,brettshollenberger/rootstrikers | server/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Meteor } from 'meteor/meteor';\n\nimport { Posts } from '../';\n\nMeteor.publish('posts', () => Posts.find({}, { limit: 10 }));\n\n```\n\nApply this change: Join comments on posts publication"
},
{
"role": "assistant",
... | javascript | edit | 0 | 1 | apache-2.0 | 4b5444a909d064ec2b8fb1e237001152816b3403 | evancorl/portfolio,evancorl/skate-scenes,evancorl/skate-scenes,evancorl/skate-scenes,evancorl/portfolio,evancorl/portfolio | imports/api/collections/posts/publications.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { Link } from 'react-router';\n\nclass HomeView extends Component {\n render() {\n return (\n <div>\n <Link to={\"v/1\"}>Video Link</Link>\n </div>\n );\n }\n}\n... | javascript | edit | 0 | 1 | mit | 0a6a8623a2ba76e88718fb733b6f87fffca58dda | mg4tv/mg4tv-web,mg4tv/mg4tv-web | src/components/HomeView.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(['jquery', 'underscore', 'pullManager', 'appearanceManager', 'module', 'PullFilter', 'ElementFilter', 'Column', 'ConnectionManager'],\n function($, _, pullManager, appearanceManager, module, PullFilter, ElementFilter, Column, Con... | javascript | edit | 0 | 1 | mit | 47034634668b0baea5cb0b13a88d2172e7e5a8ac | iFixit/pulldasher,iFixit/pulldasher,iFixit/pulldasher,iFixit/pulldasher | public/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from \"react\";\n\nclass ExperimentImages extends React.Component {\n\n constructor() {\n super();\n }\n\n\n render() {\n let imageDiv = this.props.images.map(url => {\n return (<a href={url... | javascript | edit | 0 | 2 | mit | a4f4dd98a2b78ed66af02761d33ebbc8dd5e516d | olavvatne/ml-monitor | src/shared/components/libs/ExperimentImages.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\nconst fs = require('fs')\nprocess.stdout.write = ((write) => (chunk, encoding, cb) => {\n if (typeof chunk !== 'string' && !(chunk instanceof Buffer)) {\n throw new TypeError(\n 'Invalid data, chunk must be a stri... | javascript | edit | 0 | 1 | mit | 0fdd418274a18fa954510053fd34c4730d2c7267 | davidmarkclements/0x | lib/preload/redir-stdout.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n/*Their structure is different because\nof how the commands to use them are invoked.*/\nmodule.exports = {\n \"elevated\": {\n \"80773161284538368\": \"Admins\",\n \"80773196516700160\": \"Mods\"\n }... | javascript | edit | 0 | 0 | mit | fba75bcb6bd371d42a22bbe09a34c11631233b21 | izy521/Sera-PCMR | modules/roles.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ngoog.provide('ol.source.TopoJSON');\n\ngoog.require('ol.format.TopoJSON');\ngoog.require('ol.source.VectorFile');\n\n\n\n/**\n * @constructor\n * @extends {ol.source.VectorFile}\n * @param {olx.source.TopoJSONOptions=} opt_options Optio... | javascript | edit | 0 | 2 | bsd-2-clause | 5590ae2a489a339abf3e3694d3ba31ea0d31fa36 | oterral/ol3,tschaub/ol3,denilsonsa/ol3,openlayers/openlayers,bogdanvaduva/ol3,ahocevar/ol3,geekdenz/ol3,gingerik/ol3,alexbrault/ol3,alvinlindstam/ol3,thhomas/ol3,jmiller-boundless/ol3,CandoImage/ol3,fblackburn/ol3,jacmendt/ol3,bartvde/ol3,mechdrew/ol3,geekdenz/ol3,bill-chadwick/ol3,pmlrsg/ol3,antonio83moura/ol3,kkuunnd... | src/ol/source/topojsonsource.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Deploy to GitHub pages [ci skip]"
},
{
"role": "assistant",
"content": "import React from \"react\";\nimport Image from \"../../../components/Image\"\nexport const BackgroundsPlus = p => <Image {...p} src={require(\"./backgro... | javascript | new_file | 0 | 1 | mit | 1ecaf30445b97cfea26f73f388964eb71c5e05fc | tutti-ch/react-styleguide,tutti-ch/react-styleguide | src/styles/Images/assets/index.js | rejected_duplicate | Near-duplicate of sample 71348 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport settings from 'settings';\n\nexport default [\n {\n element: 'input',\n name: 'petitionId',\n hidden: true,\n html: {\n type: 'hidden'\n }\n },\n {\n element: 'input',\n name: 'token',\n hidden: tr... | javascript | edit | 0 | 0 | apache-2.0 | 23d59b4908f2b48934207b711221026859797820 | iris-dni/iris-frontend,iris-dni/iris-frontend,iris-dni/iris-frontend | src/components/RespondToPetitionForm/fields.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n name: \"server-render\",\n version: \"0.1.0\",\n summary: \"Generic support for server-side rendering in Meteor apps\",\n documentation: \"README.md\"\n});\n\nNpm.depends({\n \"magic-string\": \"0.21.3\",\n \"... | javascript | edit | 0 | 1 | mit | 3a1f44610586e3a984b2a5a468132be81038fca1 | Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor | packages/server-render/package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport lib from './lib';\nimport redis from 'src/lib/redisClient';\nimport addTime from 'date-fns/add';\nimport Client from 'src/database/mongoClient';\n\nexport default async function scanRepliesAndNotify() {\n const timeOffset = JSON... | javascript | edit | 0 | 2 | mit | b8424424ae7e46f2b0fbc36d16a8a1d41f6e66c5 | cofacts/rumors-line-bot,cofacts/rumors-line-bot,cofacts/rumors-line-bot | src/scripts/scanRepliesAndNotify.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar http = require('http'),\n assert = require('assert'),\n cb = require('assert-called'),\n resourceful = require('resourceful');\n\nrequire('../');\n\nvar PORT = 8123,\n gotCallbacks = 0;\n\nfunction maybeEnd() {\n if (++... | javascript | edit | 0 | 3 | mit | b8b145fee10b51f99deefc86001fa745cc2e96da | mmalecki/resourceful-webhooks,mmalecki/resourceful-webhooks | test/resourceful-webhooks-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nangular.module('arethusa.core').directive('sentenceList', [\n '$compile',\n 'navigator',\n function($compile, navigator) {\n return {\n restrict: 'A',\n scope: true,\n link: function(scope, elemen... | javascript | edit | 0 | 2 | mit | 660dc74cef1a6a3f7da701b57e9f3f71ccd6bb57 | alpheios-project/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa | app/js/arethusa.core/directives/sentence_list.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#! /usr/bin/env node\n\nconst args = process.argv\nconst command = args[2]\n\nconst config = {\n app_dir: process.env.HOME + '/.stay'\n}\n\nif (!command) {\n require('./cli/help')(args, config)\n process.exit(1)\n}\n\ntry {\n requir... | javascript | edit | 0 | 0 | mit | a0ec4aae2d9b4e07f281d49235d11543ffb9066f | EverythingStays/stay-cli,EverythingStays/stay-cli | cli.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\nCopyright 2018 André Jaenisch\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.o... | javascript | edit | 0 | 0 | apache-2.0 | ae645ad9f0173639dfaf642928684849e4a16ec1 | krombel/matrix-js-sdk,krombel/matrix-js-sdk,matrix-org/matrix-js-sdk,matrix-org/matrix-js-sdk,krombel/matrix-js-sdk,matrix-org/matrix-js-sdk,matrix-org/matrix-js-sdk | src/logger.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar pkg = require(\"./package.json\");\n\nmodule.exports = {\n build: require(\"./lib/build\"),\n create: require(\"./lib/create\"),\n compiler: require(\"truffle-compile\"),\n config: require(\"./lib/config\"),\n console: require(... | javascript | edit | 0 | 0 | mit | 138fdeef3eef86aeb629b64e69c523fe0aa62db4 | DigixGlobal/truffle,prashantpawar/truffle | index.js | rejected_duplicate | Near-duplicate of sample 100007 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar connect = Npm.require('connect');\nvar Fiber = Npm.require('fibers');\n\nvar root = global;\n\nvar connectHandlers\n , connect;\n\nif (typeof __meteor_bootstrap__.app !== 'undefined') {\n connectHandlers = __meteor_bootstrap__.app... | javascript | edit | 0 | 2 | mit | 2d3954d279f686187369dfeb673f49f6dd050988 | Aaron1992/iron-router,Sombressoul/iron-router,leoetlino/iron-router,abhiaiyer91/iron-router,Aaron1992/iron-router,assets1975/iron-router,TechplexEngineer/iron-router,Hyparman/iron-router,jg3526/iron-router,tianzhihen/iron-router,jg3526/iron-router,firdausramlan/iron-router,iron-meteor/iron-router,DanielDornhardt/iron-r... | lib/server/server_router.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular\n .module('app')\n .factory('googleMapsService', ['$rootScope', '$q',\n function($rootScope, $q) {\n\n /*\n// Load the Google Maps scripts Asynchronously\n (function(d){\n var js, id = 'google-ma... | javascript | edit | 0 | 2 | mit | b9835c9a26829fd36917d16a1a6813f9d54e9d3f | brettshollenberger/mrl001,brettshollenberger/mrl001 | client/app/scripts/services/googleMapsService.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport classnames from 'classnames';\nimport styles from './custom-title.scss';\n\nconst Title = ({ icon, label, titleColor, customTitleStyles, onClick, style, labelStyle, children }) => (\n <div className... | javascript | edit | 0 | 2 | apache-2.0 | 7d8efe71af7abf4bc21f400fd06bc3f2247be4c1 | centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon | centreon-frontend/centreon-ui/src/Title/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable global-require */\n\nexport const exposeGlobals = () => {\n let dep;\n switch (global.enzymedepDescriptor) {\n case 'react13':\n dep = 'enzyme-adapter-react-13';\n break;\n case 'react14':\n dep ... | javascript | edit | 0 | 7 | mit | 326466c2a866cd27749d6d5561f23b674840fd67 | blainekasten/enzyme-matchers | packages/jest-environment-enzyme/src/setup.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar gulp = require('gulp');\n\nvar defs = [\n {\n title: 'Test Index Title',\n path: '',\n description: 'Test index description',\n twitterImage: '20euro.png',\n openGraphImage: '50euro.png',\n schemaImage: '100euro... | javascript | edit | 0 | 0 | mit | 776ee9c3d3dd199f5c3ef746cf948bd7c06e162b | lucified/lucify-component-builder,lucified/lucify-component-builder,lucified/lucify-component-builder | test-projects/multi-page-test-project/gulpfile.js | rejected_duplicate | Near-duplicate of sample 83273 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nApp.ready(function() {\n \"use strict\";\n var body = $('body');\n var links = $('a:not([data-method=\"delete\"]):not(.has_many_add):not(.dropdown_menu_button):not([target=\"_blank\"])');\n\n // Add active class on click to style wh... | javascript | edit | 0 | 1 | mit | df2cf92d8667a3a598aecb37c86c45c82804d089 | codelation/active_admin_pro,codelation/active_admin_pro,codelation/activeadmin_pro,codelation/activeadmin_pro | app/assets/javascripts/active_admin_pro/components/link.js | rejected_duplicate | Near-duplicate of sample 68398 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from \"react\";\nimport styled from \"styled-components\";\n\nclass SubmitButton extends Component {\n render() {\n const {\n isShowingPositive,\n onNegativeClick,\n onPositiveClick,\n ... | javascript | edit | 0 | 3 | mit | f6259eb662610e8d140028661d41e223d619293d | Tejpbit/talarlista,Tejpbit/talarlista,Tejpbit/talarlista | frontend/src/SubmitButton.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Notification from 'flarum/components/Notification';\nimport username from 'flarum/helpers/username';\n\nexport default class NewPostNotification extends Notification {\n icon() {\n return 'star';\n }\n\n href() {\n const... | javascript | edit | 0 | 2 | mit | a441c8a3c7dc7d6a97ff71e8fc9c248b618dcfb5 | flarum/subscriptions,flarum/subscriptions,flarum/subscriptions | js/forum/src/components/NewPostNotification.js | rejected_duplicate | Near-duplicate of sample 98448 | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add basic code for timer with commented lines where requests will go"
},
{
"role": "assistant",
"content": "var timeDisplay = document.querySelector('#timeDisplay');\nvar startButton = document.querySelector('#startButton');\... | javascript | new_file | 0 | 3 | mit | 8d8ba7bf3358f5a42f4c2fe377ec20a78d05478a | The-Authenticators/gitpom,The-Authenticators/gitpom | public/js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nconst { RSVP } = Ember;\n\nfunction preloadRecord(record, toPreload) {\n return preloadAll([record], toPreload).then(() => {\n return record;\n });\n}\n\nfunction preloadAll(records, toPreload) {\n ... | javascript | edit | 0 | 5 | mit | 07688d877058ed228ffb776b927138fc2ad1ed8d | levanto-financial/ember-data-preload,levanto-financial/ember-data-preload | addon/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ncinema.models.LayerModel = Backbone.Model.extend({\n\n constructor: function (defaults, options) {\n Backbone.Model.call(this, {}, options);\n if (typeof defaults === 'string') {\n this.setFromString(defaults... | javascript | edit | 0 | 3 | bsd-3-clause | 6db238389c76f1a8b6ae30126eae28a2e16a95c8 | Kitware/cinema,Kitware/cinema,Kitware/cinema,Kitware/cinema | web/src/js/lib/models/LayerModel.js | rejected_duplicate | Near-duplicate of sample 75969 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Native\nimport path from 'path'\n\n// Packages\nimport test from 'ava'\nimport {transformFile} from 'babel-core'\n\n// Ours\nimport plugin from '../babel'\nimport read from './_read'\n\nconst transform = file => (\n new Promise((res... | javascript | edit | 0 | 2 | mit | 427c79e42267e4f326e8ed0048914a9e2feb3a4a | zeit/styled-jsx | test/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst DrawCard = require('../../../drawcard.js');\n\nclass PutToTheTorch extends DrawCard {\n canPlay(player, card) {\n if(player !== this.controller || this !== card) {\n return false;\n }\n\n var cur... | javascript | edit | 0 | 8 | mit | 7d81ece0291bb469f1bea3bcf2c9225f74eab7d6 | Antaiseito/throneteki_for_doomtown,jeremylarner/ringteki,jeremylarner/ringteki,samuellinde/throneteki,cavnak/throneteki,cryogen/gameteki,jbrz/throneteki,cryogen/throneteki,gryffon/ringteki,cryogen/throneteki,Antaiseito/throneteki_for_doomtown,cryogen/gameteki,jeremylarner/ringteki,ystros/throneteki,gryffon/ringteki,Duk... | server/game/cards/events/01/puttothetorch.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar ko = require('knockout-client'),\n\tvm = require('./viewModel');\n\nvm.wtf();\nko.applyBindings(vm);\n\n```\n\nApply this change: Remove increment on refresh / initial visit"
},
{
"role": "assistant",
"content": "var ko ... | javascript | edit | 0 | 0 | mit | 4c1987b918d353f849ad1aaad174db797525ee10 | joshka/countw.tf,joshka/countw.tf,joshka/countw.tf,joshka/countw.tf | scripts/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Wrap your stuff in this module pattern for dependency injection\n(function ($, ContentBlocks) {\n // Add your custom input to the fieldTypes object as a function\n // The dom variable contains the injected field (from the templ... | javascript | edit | 0 | 1 | mit | 7e355008d3bc810b84ca4818e4aeecf494a89d20 | jpdevries/checkblock,jpdevries/checkblock | assets/components/checkblock/js/inputs/checkblock.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar readFile = require('fs').readFile;\nvar assert = require('assert');\nvar exec = require('child_process').exec;\nvar join = require('path').join;\n\n// Test the expected output.\nexec('node .', function(err, stdout, stderr) {\n if... | javascript | edit | 0 | 4 | isc | 9cb2f8d9efef1d47ddaec2266bcc203baa1990bc | unioncollege-webtech/fizzbuzz | test/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nenchant();\n\nwindow.onload = function () {\n var core = new Core(320, 320);\n\n core.onload = function () {\n core.rootScene.backgroundColor = '#eee';\n\n var field = new TextField(160, 24);\n field.x = (core.width - field.w... | javascript | edit | 0 | 1 | mit | 53db7bd5313293b436d9664d90080eee18315165 | 131e55/textField.enchant.js | sample/core.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar w = 300,\n gens = 10;\n\nvar c = document.getElementById('cs');\nvar ctx = c.getContext('2d');\n\nvar ruleset = [0,1,0,1,1,0,1,0].reverse();\n\nvar cells = [];\nfor (var i=0; i<w; i++) {\n cells[i] = 0;\n}\ncells[Math.ceil(w/2)]... | javascript | edit | 0 | 3 | mit | 3b9af3bf12b4ec3790caf898900b94d3d49aee00 | mmcfarland/canvas-renderings | elemental-ca.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function () {\n $(document).on({\n ajaxStart: function() { $('body').addClass(\"loading\"); },\n ajaxStop: function() { $('body').removeClass(\"loading\"); }\n })\n\n\n $( \"#request_form\" ).submit(function( event ) {\n ... | javascript | edit | 0 | 2 | mit | 66e5f23ae0283fd89d313b802c3ed20ea52137ed | nezhar/PictureChallenge,nezhar/PictureChallenge | app/public/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* @flow */\nexport default function extractUsedProps(\n rule: Function,\n theme: Object = {}\n): Array<string> {\n const usedProps = []\n\n // if the browser doesn't support proxies\n // we simply return an empty props object\n /... | javascript | edit | null | null | mit | e91e43feeddafb7d674f67f18cb2c0748a395006 | risetechnologies/fela,rofrischmann/fela,risetechnologies/fela,rofrischmann/fela,risetechnologies/fela,rofrischmann/fela | packages/fela-bindings/src/extractUsedProps.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { webcastPropType } from '../utils/webcastUtils'\n\nconst EmbedTwitch = (props) => {\n const channel = props.webcast.channel\n const iframeSrc = `https://player.twitch.tv/?channel=${channel}`\n retur... | javascript | edit | 0 | 1 | mit | c70bb59f3a7357f7d2711f0de20c1cd1717fec70 | nwalters512/the-blue-alliance,bdaroz/the-blue-alliance,jaredhasenklein/the-blue-alliance,nwalters512/the-blue-alliance,fangeugene/the-blue-alliance,fangeugene/the-blue-alliance,jaredhasenklein/the-blue-alliance,verycumbersome/the-blue-alliance,verycumbersome/the-blue-alliance,nwalters512/the-blue-alliance,bdaroz/the-bl... | react/gameday2/components/EmbedTwitch.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport fetchData from '../../actions/fetchData';\nimport Toast from '../../components/Toast';\nimport Modals from '../Modals';\nimport types from '../../utils/types';\nimport SocketE... | javascript | edit | 0 | 2 | mit | 4be53761875922cc8d27e54363624cd1ae34bc16 | JasonEtco/flintcms,JasonEtco/flintcms | app/containers/Main/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar fs = require('fs');\nvar path = require('path');\n\n/**\n * Extract the React Native module paths for a given directory\n *\n * @param {String} rootDir\n * @return {Object}\n */\nfunction getReactNativeExternals(roo... | javascript | edit | 0 | 5 | mit | 0c91dac30e3bf9a0fb06e315c3ab52489d703a5e | hammerandchisel/react-native-webpack-server,Owenzh/react-native-webpack-server,pascience/react-native-webpack-server,patrickomeara/react-native-webpack-server,jeffreywescott/react-native-webpack-server,refinery29/react-native-webpack-server,nevir/react-native-webpack-server,carcer/react-native-webpack-server,prathamesh... | lib/getReactNativeExternals.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Character = require('./character');\nvar React = require('react');\nvar _ = require('underscore')\n\nvar CharactersList = React.createClass({\n render: function () {\n return (\n <div>\n {\n this.props.items.map... | javascript | edit | 0 | 1 | mit | 779157a8fb6076e35fce4edcb2eb7a7a55ccdade | adrrian17/excelsior | js/characters-list.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport appReducer from './app/reducer';\nimport createLogger from 'redux-logger';\nimport fetch from 'isomorphic-fetch';\nimport injectDependencies from './lib/injectDependencies';\nimport promiseMiddleware from 'redux-promise-middlewar... | javascript | edit | 0 | 4 | mit | a942d28c315f59428a80d2fd0b268cd99bbe3b66 | puzzfuzz/othello-redux,christophediprima/este,XeeD/este,abelaska/este,skyuplam/debt_mgmt,AugustinLF/este,TheoMer/Gyms-Of-The-World,skyuplam/debt_mgmt,langpavel/este,XeeD/test,robinpokorny/este,aindre/este-example,christophediprima/este,SidhNor/este-cordova-starter-kit,robinpokorny/este,glaserp/Maturita-Project,christop... | common/src/configureStore.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use babel'\n\nimport {Emitter, CompositeDisposable} from 'atom'\nimport Validate from './validate'\nimport Indie from './indie'\n\nexport default class IndieRegistry {\n constructor() {\n this.subscriptions = new CompositeDisposabl... | javascript | edit | 0 | 2 | mit | 43f0a5cefb43be20ae8f48deb2fa886540528b2d | Arcanemagus/linter,e-jigsaw/Linter,atom-community/linter,AtomLinter/Linter,steelbrain/linter | lib/indie-registry.js | rejected_duplicate | Near-duplicate of sample 81697 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Description:\n// Pick and tag a random user that has to do shitty work, replies when the bot\n// hears @noen. This script also supports mentions of @aktive and @nye.\n\nconst _ = require('lodash');\nconst members = require('../li... | javascript | edit | 0 | 2 | mit | 438e6b49e171e8db87e1982677861b6c61dfcdad | webkom/ababot,webkom/ababot | scripts/nummer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst root = __dirname + '/../../../..';\n\nrequire('@babel/register')({\n root,\n cwd: root,\n configFile: root + '/packages/server/babel.config.js',\n extensions: ['.js', '.jsx', '.ts', '.tsx']\n});\n\nrequire.extensions['.scss'] ... | javascript | edit | 0 | 1 | mit | 969cc51155d7be88f97e27f305bf678836fa9220 | sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-fullstack-starter-kit | packages/server/src/__tests__/jestSetup.js | rejected_duplicate | Near-duplicate of sample 74269 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction quantify(data, unit, value) {\n if (value) {\n if (value > 1 || value < -1)\n unit += 's';\n\n data.push(value + ' ' + unit);\n }\n\n return data;\n}\n\nmodule.exports = function prettySeconds(... | javascript | edit | 0 | 5 | mit | 36ae9ccc7f43445485a6baacc4dc18834d61cda2 | binarykitchen/pretty-seconds | pretty-seconds.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar util = require('util');\nvar MapStoreMapConfigProvider = require('./mapstore_mapconfig_provider');\n\nfunction DummyMapConfigProvider(mapConfig, params) {\n if (!(this instanceof DummyMapConfigProvider)) {\n return new Dum... | javascript | edit | 0 | 1 | bsd-3-clause | 73b274515279466e125e658e539b1863301c5759 | CartoDB/Windshaft,wsw0108/Windshaft,CartoDB/Windshaft,CartoDB/Windshaft,wsw0108/Windshaft,wsw0108/Windshaft | lib/windshaft/models/dummy_mapconfig_provider.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n\n grunt.config.merge({\n imagemin: {\n slider: {\n files: [{\n expand: true,\n cwd: 'cacao/modules/slider/images',\n ... | javascript | edit | 0 | 1 | mit | 8bc778f740fa3fa77a49328739265e5d4edd9e54 | aptuitiv/cacao | modules/slider/Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global describe, it, before */\nvar request = require('supertest')\nvar assert = require('assert')\nvar path = require('path')\nvar fs = require('fs')\n\n/**\n * Basic sanity checks on the dev server\n */\ndescribe('The prototype kit... | javascript | edit | 0 | 2 | mit | 49965cc87d2f9ebf8ce7b0601845533b4721ecff | hannalaakso/accessible-timeout-warning,alphagov/govuk_prototype_kit,nhsbsa/ppc-prototype,joelanman/govuk_prototype_kit,davedark/proto-timeline,companieshouse/ch-accounts-prototype,Demwunz/esif-prototype,danblundell/verify-local-patterns,Demwunz/esif-prototype,abbott567/govuk_prototype_kit,dwpdigitaltech/ejs-prototype,c... | test/spec/sanity-checks.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst {app} = require('electron').remote;\nconst JsonDB = require('node-json-db');\n\nclass DomainUtil {\n constructor() {\n this.db = new JsonDB(app.getPath('userData') + '/domain.json', true, true);\n }\n... | javascript | edit | 0 | 1 | apache-2.0 | 1aef53ef94e4031cb23e9c79c1b677299307284b | zulip/zulip-desktop,zulip/zulip-desktop,zulip/zulip-electron,zulip/zulip-desktop,zulip/zulip-electron,zulip/zulip-electron,zulip/zulip-desktop | app/renderer/js/utils/domain-util.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n version: '1.1.1',\n summary: 'Meteor bundle analysis and visualization.',\n documentation: 'README.md',\n});\n\nNpm.depends({\n \"d3-selection\": \"1.0.5\",\n \"d3-shape\": \"1.0.6\",\n \"d3-hierarchy\": \"1.1... | javascript | edit | 0 | 1 | mit | ad80b2068cdb6804ffe22f9d98b19ee1a19ea6c3 | Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor | packages/non-core/bundle-visualizer/package.js | rejected_duplicate | Near-duplicate of sample 103043 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by ChengFuLin on 2015/6/10.\n */\nvar factoryAnalyzedCFG = require('../../lib/dujs').factoryAnalyzedCFG,\n should = require('should');\n\ndescribe('ModelFactory', function () {\n \"use strict\";\n describe('Fact... | javascript | edit | 0 | 1 | mit | f4ef68a267821b41409b60d1f3efe51e7a8cd588 | chengfulin/dujs,chengfulin/dujs | tests/dujs/modelfactory.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nimport CreaditCardPayment from './credit_card_payment.js'\nimport Paypal from './paypal.js'\n\nexport default (props) => {\n return props.user_payments.payment_sent\n ? SuccessfulPayment(props)\n : (p... | javascript | edit | 0 | 3 | mit | 1a71a91e9b143625d5863c21dc9de039e38541a2 | foundersandcoders/sail-back,foundersandcoders/sail-back | src/user/components/online_payments.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/*\n * /create [name] - Creates a voice-chat channel. Optionally names it, otherwise names it Username-[current game]\n *\n */\n\nclass Create{\n constructor (bot, config) {\n this.bot = bot;\n this.con... | javascript | edit | 0 | 3 | mit | 2b5f19052395fd6364bd488b85e37f15b9a9bda9 | Just-Fans-Of/Impromp2 | cmds/create.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Sieve of Eratosthenes\n\n/*RULES:\n Function takes one parameter\n Return an array of all prime numbers from 0-parameter\n*/\n\n/*PSEUDOCODE:\n 1) Find square root of parameter\n 2) Create an array of numbers from 0-parameter\n ... | javascript | edit | 0 | 1 | mit | d23aed5fd0e19b5a6612211810ebce796af3db58 | benjaminhyw/javascript_algorithms | sieve-of-eratosthenes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Javascript specific to guide admin\n$(function() {\n var sortable_opts = {\n axis: \"y\",\n handle: \"a.accordion-toggle\",\n stop: function(event, ui) {\n $('.part').each(function (i, elem) {\n $(elem).find('in... | javascript | edit | 0 | 2 | mit | 6387ed56e8b5e41aa51a7994ca9f1db5b68a5644 | theodi/publisher,telekomatrix/publisher,alphagov/publisher,theodi/publisher,theodi/publisher,telekomatrix/publisher,alphagov/publisher,leftees/publisher,telekomatrix/publisher,leftees/publisher,leftees/publisher,theodi/publisher,alphagov/publisher,leftees/publisher,telekomatrix/publisher | app/assets/javascripts/multi-part.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nApp.Search.SearchPanelUi = Ext.extend(Ext.form.FormPanel, {\n title: 'Search criteria',\n labelWidth: 100,\n labelAlign: 'left',\n layout: 'form',\n tbar: {\n xtype: 'toolbar',\n items: [{\n text: 'Add language',\n ... | javascript | edit | 0 | 1 | mit | 940624b8bbd2d18fa4072808cb3037078d5820d3 | textlab/glossa,textlab/rglossa,textlab/rglossa,textlab/rglossa,textlab/glossa,textlab/rglossa,textlab/glossa,textlab/glossa,textlab/glossa,textlab/rglossa | public/javascripts/App/Search/SearchPanel.ui.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Sample Lambda Function to send notifications via text when an AWS Health event happens\nvar AWS = require('aws-sdk');\nvar sns = new AWS.SNS();\n\n// define configuration\nconst phoneNumber =''; // Insert phone number here. For exam... | javascript | edit | 0 | 2 | apache-2.0 | 9d7c0cf74c1f7c1791cfe9ec8a36edca7a2b646d | chetankrishna08/aws-health-tools,robperc/aws-health-tools,robperc/aws-health-tools,chetankrishna08/aws-health-tools | sms-notifier/LambdaFunction.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*global Package*/\nPackage.describe({\n name: 'dschnare:meteor-components-ioc-plugin',\n version: '0.2.0',\n // Brief, one-line summary of the package.\n summary: 'A plugin for Meteor Components that integrates IOC Containers.',\n ... | javascript | edit | 0 | 1 | mit | 6421950d93e8e34e55971e6a0a84817075ed18fc | dschnare/meteor-components-ioc-plugin,dschnare/meteor-components-ioc-plugin | packages/meteor-components-ioc-plugin/package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('arethusa').constant('VERSION', {\n revision: '<%= sha %>',\n date: '<%= new Date().toJSON() %>'\n});\n\n```\n\nApply this change: Add the repo to the version CONSTANT"
},
{
"role": "assistant",... | javascript | edit | 0 | 0 | mit | 6fe782fcd362e3cd330d22dbd17e270f26ebcf1b | fbaumgardt/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa | app/js/arethusa/.version_template.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport WebMiddle, { PropTypes } from 'webmiddle';\nimport request from 'request';\n\nconst HttpRequest =\n({ name, contentType, url, method = 'GET', body = {}, httpHeaders = {}, cookies = {} }) => {\n // TODO: cookies\n return new Pro... | javascript | edit | 0 | 6 | mit | 16e2183f60a66f41a78fef3f12b6321000be6357 | webmiddle/webmiddle | packages/webmiddle-service-http-request/src/HttpRequest.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('MovnThereUI').factory('AuthFactory', function($http, $window, ServerUrl) {\n 'use strict';\n\n var login = function(credentials) {\n\n return $http\n .post(ServerUrl + 'login', credentials)\n ... | javascript | edit | 0 | 1 | mit | 7d0effb1e72b0957b20676a1717e07780100dae6 | HollyM021980/movin-there | app/scripts/services/auth.factory.js | rejected_duplicate | Near-duplicate of sample 79852 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { module, test } from 'qunit';\nimport { setupRenderingTest } from 'ember-qunit';\nimport { render, find } from '@ember/test-helpers';\nimport hbs from 'htmlbars-inline-precompile';\nimport { later } from '@ember/runloop';\n\nmod... | javascript | edit | 0 | 1 | mit | f972dfc1091d58884b0a5b656f0e2cf02d94ba1d | dartajax/frontend,thecoolestguy/frontend,djvoa12/frontend,dartajax/frontend,thecoolestguy/frontend,djvoa12/frontend,jrjohnson/frontend,ilios/frontend,ilios/frontend,jrjohnson/frontend | tests/integration/components/loading-bar-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar camshaftReference = require('../../../src/analysis/camshaft-reference');\n\ndescribe('src/analysis/camshaft-reference', function () {\n describe('.getSourceNamesForAnalysisType', function () {\n it('should return the source name... | javascript | edit | 0 | 1 | bsd-3-clause | 1bbb5f18d567cc45f10b4d1a3b943ccdf93fb7d2 | splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js | test/unit/analysis/camshaft-reference.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @module client/main\n */\n'use strict';\n\nvar app = require('./app');\nrequire('angular');\n\n/**\n * Each 'index' generated via grunt process dynamically includes all browserify common-js modules\n * in js bundle\n */\nrequire... | javascript | edit | 0 | 1 | mit | f224d222e7ee47c272b168004aad4f1a344733cb | Runnable/hyperion,Runnable/hyperion | client/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Meteor } from 'meteor/meteor';\n\n// In the client and server entry points, we make sure the\n// bundler loads the correct thing. Here, we just need to\n// make sure that we require the right one.\nexport default function getCl... | javascript | edit | 0 | 2 | mit | 0da59ee8c95f2d065b6f0b600f4d6cffd654437e | Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor | packages/ddp-client/common/getClientStreamClass.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use babel';\n\nimport completions from '../data/completions';\n\nclass CurryProvider {\n constructor() {\n this.scopeSelector = '.source.curry';\n this.disableForScopeSelector = '.source.curry .comment';\n\n this.suggestionPr... | javascript | edit | 0 | 4 | mit | 9c11b6de5181e4825a345c103add725a2f487926 | matthesjh/autocomplete-curry | lib/curry-provider.js | rejected_duplicate | Near-duplicate of sample 69353 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar exec = require('cordova/exec');\n\nvar PLUGIN_NAME = 'SystemSound';\n\nvar SystemSound = {\n playSound: function(cb) {\n exec(cb, null, PLUGIN_NAME, 'playSound', []);\n }\n};\n\nmodule.exports = SystemSound;\n\n```\n\... | javascript | edit | 0 | 1 | mit | c3d64c3a782d546284955d653a88dcd41237f6f4 | Switch168/cordova-plugin-system-sound-services | www/plugin.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.