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": "Write javascript code for the following: Fix export of the components"
},
{
"role": "assistant",
"content": "export { Diory as default, Diory } from './Diory'\nexport { DioryText } from './DioryText'\nexport { DioryImage } from './DioryImage'\n"
}
] | javascript | new_file | 0 | 0 | mit | 2db577b84eb075b0183bc3744fd60464e6ed6465 | DioryMe/diory-react-components,DioryMe/diory-react-components | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function (context) {\n var Sample = {};\n\n Sample.switchCase = function (x) {\n var returnValue;\n switch(val) {\n case 2:\n returnValue = 'A'\n break;\n case 6:\n returnValue = 'B'\n brea... | javascript | edit | 0 | 4 | unlicense | 50ff39933815985cd7bcc8df3cbe25a2b5f4a543 | CWDG/Functional-JavaScript-Talk | js/scratch-pad.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction setup() {\n createCanvas(640, 480);\n}\n\nfunction draw() {\n ellipse(50, 50, 80, 80);\n}\n\n/**\n * Boid class\n */\nfunction Boid(x_pos, y_pos, mass) {\n this.position= createVector(x_pos, y_pos);\n this.velocity = create... | javascript | edit | 0 | 2 | mit | 4a95ed75556c4922653a14c8db7a0e480eba1b28 | dkgramming/rgw,dkgramming/rgw | src/sketch.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright 2012 Mark Cavage, Inc. All rights reserved.\n\nvar jsonParser = require('./json_body_parser');\nvar formParser = require('./form_body_parser');\nvar multipartParser = require('./multipart_parser');\n\nvar errors = require(... | javascript | edit | 0 | 10 | mit | 691f9ecf58861fec54d299d3d1f9b14d123f0d14 | rborn/node-restify,msaffitz/node-restify,jclulow/node-restify,kevinykchan/node-restify,TheDeveloper/node-restify,chaordic/node-restify,adunkman/node-restify,prasmussen/node-restify,ferhatsb/node-restify,uWhisp/node-restify | lib/plugins/body_parser.js | rejected_duplicate | Near-duplicate of sample 96643 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// imports\nvar gulp = require('gulp');\nvar browserify = require('browserify');\nvar source = require('vinyl-source-stream');\nvar uglify = require('gulp-uglify');\nvar buffer = require('vinyl-buffer');\n\n// build src\ngulp... | javascript | edit | 0 | 1 | mit | 0fb83aef5911c733fe11de81e5b7d316406edd81 | microscope-mobile/ionic-maps,microscope-mobile/ionic-maps,microscope-mobile/ionic-maps,microscope-mobile/ionic-maps,microscope-mobile/ionic-maps | tasks/build.js | rejected_duplicate | Near-duplicate of sample 67635 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar _ = require('lodash');\n\nvar prompts = [\n {\n type: 'input',\n name: 'projectName',\n message: 'Machine-name of your project?',\n // Name of the parent directory.\n default: _.last(process.cwd().sp... | javascript | edit | 0 | 2 | mit | c90559b246ed418c54ddc9c64cdb864dbab3ef6d | phase2/generator-outrigger-drupal,phase2/generator-outrigger-drupal,phase2/generator-outrigger-drupal | prompts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar config = require('./config');\nvar rdb = config.rdb;\nvar rdbLogger = config.rdbLogger;\n\nmodule.exports = function statistics() {\n return function (req, res, next) {\n rdb.sismember(\n 'stats:ip',\n req.connection.r... | javascript | edit | 0 | 4 | mit | 10af81baad62584ef31a497b21479ca8db31fb5a | s1na/talkie | statistics.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwindow.onload = function(){\n var headerText = \"WriteNow\".split(\"\")\n animateHeader(headerText);\n};\n\nanimateHeader = function(text){\n current = 0;\n header = $(\".main_header\");\n setInterval(function() {\n if(current <... | javascript | edit | 0 | 2 | mit | 56ffe01657459d41dc62b187903afbad2348e587 | tiger-swallowtails-2014/write-now,tiger-swallowtails-2014/write-now | app/assets/javascripts/title_onload.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport loadAll from 'ember-osf/utils/load-relationship';\n\nexport default Ember.Component.extend({\n users: Ember.A(),\n bibliographicUsers: Ember.A(),\n institutions: Ember.A(),\n getAuthors: fu... | javascript | edit | 0 | 4 | apache-2.0 | e9a71f62a6d88a13d8be3435e970814b6087bd3e | Rytiggy/osfpages,caneruguz/osfpages,caneruguz/osfpages,Rytiggy/osfpages | app/components/layer-info/component.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\n\nvar Ticket = new mongoose.Schema({\n name:String,\n phoneNumber: String,\n description: String,\n createdAt : Date\n});\n\nvar ticket = mongoose.model('ticket', Ticket);\nmodule.exports = ticke... | javascript | edit | 0 | 0 | mit | fb1d25a1135f41b4be2cb18f73f14b94dfc47bbf | TwilioDevEd/browser-calls-node,TwilioDevEd/browser-calls-node | models/ticket.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst gulp = require('gulp');\nconst webpack = require('webpack');\nconst webpackDevMiddleware = require('webpack-dev-middleware');\nconst compress = require('compression');\nconst browserSync = require('browser-sync');\nconst config = ... | javascript | edit | 0 | 3 | mit | 031233307e0a4892ad4ff80372873a44d11d6fa9 | strt/bricks | tasks/serve.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar tabRemoved = false;\n\nbrowser.browserAction.setBadgeBackgroundColor({color: \"gray\"});\nbrowser.tabs.onActivated.addListener(refreshCounter);\nbrowser.tabs.onCreated.addListener(refreshCounter);\nbrowser.tabs.onAt... | javascript | edit | 0 | 2 | mit | d13b0473314ff148146f00b60c8a3fa4dd3b26f7 | cakebaker/yet-another-tab-counter | tabcounter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n;(function() {\n\n var MODULES_PATH = 'https://a.alipayobjects.com/static/arale/'\n\n if (location.href.indexOf('/~lifesinger/') > 0) {\n MODULES_PATH = 'http://' + location.host + '/~lifesinger/seajs/spm/modules/'\n }\n\n\n //... | javascript | edit | 0 | 3 | mit | db884e3373d9ad0440473e292dd41d41ccf93c99 | kaijiemo/seajs,miusuncle/seajs,miusuncle/seajs,LzhElite/seajs,yuhualingfeng/seajs,121595113/seajs,sheldonzf/seajs,FrankElean/SeaJS,13693100472/seajs,PUSEN/seajs,LzhElite/seajs,treejames/seajs,kuier/seajs,judastree/seajs,lianggaolin/seajs,FrankElean/SeaJS,moccen/seajs,sheldonzf/seajs,seajs/seajs,liupeng110112/seajs,imcy... | test/vendor.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar setupTestHooks = require('ember-cli-blueprint-test-helpers/lib/helpers/setup');\nvar BlueprintHelpers = require('ember-cli-blueprint-test-helpers/lib/helpers/blueprint-helper');\nvar generateAndDestroy = Bluep... | javascript | edit | 0 | 1 | mit | 7a933da519e0cd556ea2e79b380978b8df9787e1 | ember-cli/ember-cli-legacy-blueprints,ember-cli/ember-cli-legacy-blueprints | node-tests/blueprints/test-helper-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst bcrypt = require('bcryptjs')\n\nconst users = [\n {\n username: 'kudakwashe',\n password: hashedPassword('kp')\n },\n {\n username: 'garikai',\n password: hashedPassword('gg')\n }\n]\n\nfunction hashedPassword (pas... | javascript | edit | 0 | 1 | mit | 8cea0ec1551b4b51123a6e9c25ab6fe1823c8d1e | byteBridge/transcriptus-api | database/seeds/users.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { connect } from 'react-redux';\nimport { compose } from 'redux';\nimport Link from 'next/link';\n\nimport app from '../components/App';\nimport { load } from '../redux/articleDetail';\n\nexport default... | javascript | edit | 0 | 3 | mit | bb400919494f2805e6a4d6087602a47866d362d4 | cofacts/rumors-site,cofacts/rumors-site | pages/article.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport omit from 'lodash/omit';\nimport db from '../models';\n\nconst { User } = db;\nexport default {\n create(req, res) {\n return User\n .create(req.userInput)\n .then((user) => {\n const data = omit(user.dataVal... | javascript | edit | 0 | 2 | mit | 00216ffd2ba8907d5c70ff067f4bf9fa051027f8 | nosisky/Hello-Books,nosisky/Hello-Books | server/controllers/Book.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n * apiai\n * Copyright(c) 2015 http://api.ai/\n * Apache 2.0 Licensed\n */\n\n'use strict';\n\nvar Request = require('./request').Request;\nvar util = require('util');\n\nvar ServerError = require('./exceptions').ServerError;\n\nex... | javascript | edit | 0 | 6 | apache-2.0 | 29abdb6ceff6038cce37e9e5761513b204a08ea0 | dialogflow/dialogflow-nodejs-client,api-ai/api-ai-node-js,api-ai/apiai-nodejs-client,api-ai/api-ai-node-js,api-ai/apiai-nodejs-client,dialogflow/dialogflow-nodejs-client | module/json_api_request.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport path from 'path'\nimport json from '../../util/json'\n\nconst saguiScripts = {\n 'build': 'sagui build',\n 'develop': 'sagui develop --port 3000',\n 'dist': 'NODE_ENV=production sagui build --optimize',\n 'start': 'npm run de... | javascript | edit | 0 | 2 | mit | 74b9cebd9c43e4a281ba642c9bcc20f24411a801 | saguijs/sagui,saguijs/sagui | src/runner/install/package-json.js | rejected_duplicate | Near-duplicate of sample 75267 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Test for a few basic patterns that usually should\n * case no warnings.\n *\n * This should not be used by rules that intentionally\n * warn for these cases.\n */\nexport default function (tr) {\n tr.ok(\"\", \"empty stylesheet... | javascript | edit | 0 | 1 | mit | b4c5139d53430ae26bb869d621cfbdfa9f3124ec | gaidarenko/stylelint,gucong3000/stylelint,stylelint/stylelint,stylelint/stylelint,hudochenkov/stylelint,gucong3000/stylelint,heatwaveo8/stylelint,hudochenkov/stylelint,heatwaveo8/stylelint,heatwaveo8/stylelint,stylelint/stylelint,m-allanson/stylelint,gucong3000/stylelint,gaidarenko/stylelint,evilebottnawi/stylelint,sty... | src/testUtils/warningFreeBasics.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\nvar safeOpts = {\n j: 1,\n w: \"majority\",\n wtimeout: 10000\n};\n\nvar postSchema = new Schema({\n saved_at: { type: Date, default: ... | javascript | edit | 0 | 0 | mit | 71a1c4a3fe010a3f79ea83a4271b6240f5c9c0a8 | dburgos/HN-feed,dburgos/HN-feed | app/models/post.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction makeEditSections(collectionName, response) {\n if (response.type === 'bulletin') {\n bulletinEditor(collectionName, response);\n } else {\n $('.fl-editor__sections').hide();\n $(\"#addSection\").remove();\n $('.fl... | javascript | edit | 0 | 2 | mit | c80bd1e6459211f35f3f7676c11e62e132f91c27 | ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence | src/main/web/florence/js/functions/_makeEditSections.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n $(document).ready(function() {\n $(\"#id_place\")\n .geocomplete({\n map: \"#map_location\",\n mapOptions: {\n zoom: 10\n },\n markerOptions: {\n draggable: true\n }\n ... | javascript | edit | 0 | 1 | mit | e130009deb5af19ae8de099dc38d81ae076f12f7 | oscarmcm/django-places,oscarmcm/django-places,oscarmcm/django-places | djplaces/static/js/djplaces.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport DS from \"ember-data\";\r\nimport Ember from \"ember\";\r\nimport config from '../config/environment';\r\n\r\nexport default DS.Model.extend( {\r\n prerequisities: DS.attr(\"prerequisite\"),\r\n\r\n state: DS.attr(\"string\... | javascript | edit | 0 | 3 | mit | 7f511555f48096c94aeaefd0254d43f8bcf672fc | fi-ksi/web-frontend,fi-ksi/web-frontend,fi-ksi/web-frontend | app/models/task.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n/**\n * Minimal server for local, manual web page testing.\n */\n\n'use strict'; // eslint-disable-line\n\nconst portfinder = require('portfinder');\nconst http = require('http');\nconst path = require('path');\nc... | javascript | edit | 0 | 2 | isc | 144874d96097be560057901149af29fe65bf57ba | WeAreGenki/wag-ui | packages/test/testserver.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Disable html hint class value check\n\nVuetify helper classes contain double dashes,\ne.g. grey--text."
},
{
"role": "assistant",
"content": "const htmlHintConfig = require('kolibri-tools/.htmlhintrc');\nhtmlHintConfig['id-cl... | javascript | new_file | 0 | 0 | mit | 11e185860f52757c013f64221927f0b605805cd1 | DXCanas/content-curation,DXCanas/content-curation,DXCanas/content-curation,DXCanas/content-curation | .htmlhintrc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* Magic Mirror Test config default weather\n *\n * By fewieden https://github.com/fewieden\n *\n * MIT Licensed.\n */\n\nlet config = {\n\tport: 8080,\n\tipWhitelist: [\"127.0.0.1\", \"::ffff:127.0.0.1\", \"::1\"],\n\n\tlanguage: \"en\... | javascript | edit | 0 | 0 | mit | e6ef64968bc99b6f8ed30fb0f1a581bc78763a97 | MichMich/MagicMirror,MichMich/MagicMirror,Tyvonne/MagicMirror,MichMich/MagicMirror,Tyvonne/MagicMirror,Tyvonne/MagicMirror,MichMich/MagicMirror,Tyvonne/MagicMirror | tests/configs/modules/weather/currentweather_options.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar configUtils = _altboilerScope.configUtils\n\n/* Wait until the client-side configuration has been done */\naddEventListener('load', function () {\n var showLoader = altboiler.getConfig('showLoader')\n /* Clear the object */\n alt... | javascript | edit | 0 | 2 | mit | 5c4981122946fbbe8c8bcece6ebc959dd942aa76 | Kriegslustig/meteor-altboiler,Kriegslustig/meteor-altboiler | client.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction viewTeams() {\n\n getTeams(\n success = function (data) {\n populateTeamsTable(data.teams);\n },\n error = function (jqxhr) {\n handleApiError(jqxhr);\n }\n );\n\n func... | javascript | edit | 0 | 2 | mit | a288ab32b8b5c5e6e545739cbb480b16cc00da22 | ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence | src/main/web/florence/js/functions/_viewTeams.js | rejected_duplicate | Near-duplicate of sample 76911 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-read-only-property' );\n\n\... | javascript | edit | 0 | 0 | apache-2.0 | 010fc67d6558cb35f6810d00ac4fcb62092c75fa | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib | lib/node_modules/@stdlib/math/base/dist/betaprime/lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// PhantomJS does not support web fonts\nif (Meteor.isTest == false) {\n WebFontConfig = {\n google: { families: [ 'Oswald:300,400' ] }\n };\n (function() {\n var wf = document.createElement('script');\n wf.src = '//ajax.goo... | javascript | edit | 0 | 1 | mit | 094b42ab7dd77ead37bb8160d0001343c4347972 | howlround/worldtheatremap,howlround/worldtheatremap | imports/startup/client/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Tests if the `amber version` command returns the expected amber version number, according to the configuration file `package.json`\n// Displays 'ok' in green if test succeeds, else 'not ok' in red.\n\nrequire('shelljs/global');\nrequ... | javascript | edit | null | null | mit | 670580b52e520b42698ab80f02fe9fb8df6c8b50 | adrian-castravete/amber,adrian-castravete/amber,amber-smalltalk/amber,adrian-castravete/amber,amber-smalltalk/amber,amber-smalltalk/amber | external/amber-cli/tests/amberVersionTest.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular\n\t.module('app')\n\t.controller('AuthLoginController', ['$scope', 'AuthService', '$state',\n\t\tfunction ($scope, AuthService, $state) {\n\t\t\t$scope.login = function () {\n\t\t\t\tAuthService.login($scope.user.username, $scop... | javascript | edit | 0 | 1 | mit | cc5410b3b4860862d41da79a569ae8eeb268d23e | dev-augmenta/vrseum-backend,dev-augmenta/vrseum-backend | client/js/controllers/auth.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add stupid polling for changes via API"
},
{
"role": "assistant",
"content": "var last_update = Date.now()/1000;\n\nfunction refresh_drop_points() {\n return $.ajax({\n type: \"POST\",\n url: apiurl,\n ... | javascript | new_file | 0 | 3 | mit | d93d4dd2b4300641505509191956b42c8a132a87 | der-michik/c3bottles,der-michik/c3bottles,der-michik/c3bottles,der-michik/c3bottles | static/js/drop_points.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * External dependencies\n */\nimport { storiesOf } from '@storybook/react';\n\n/**\n * Internal dependencies\n */\nimport Setup from '../assets/js/components/setup';\n\nstoriesOf( 'Setup', module )\n\t.add( 'Step one', () => {\n\t... | javascript | edit | 0 | 1 | apache-2.0 | 55230781219ec63c6e95c0fd94a632b4c9677180 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp | stories/setup.stories.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nvar Client = require('./client')\nvar defaults = require('./defaults')\nvar Connection = require('./connection')\nvar Pool = require('pg-pool')\n\nconst poolFactory = (Client) => {\n return class BoundPool extends Pool ... | javascript | edit | 0 | 1 | mit | 415bf090411644dc2844b4a86a7d38b3fae6667a | brianc/node-postgres,brianc/node-postgres | packages/pg/lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport $ from \"cheerio\";\n\nconst SvgTestHelper = {\n RECTANGULAR_SEQUENCE: [\"M\", \"L\", \"L\", \"L\", \"L\"],\n\n expectIsRectangular(wrapper) {\n expect(exhibitsRectangularDirectionSequence(wrapper)).to.be.true;\n }\n};\n\nf... | javascript | edit | 0 | 1 | mit | d6f57a39a457e800a87fec02d3c5cc6800cdd6d0 | FormidableLabs/victory-chart,GreenGremlin/victory-chart,FormidableLabs/victory-chart,GreenGremlin/victory-chart | test/svg-test-helper.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(root) {\n\nif (typeof exports !== 'undefined') {\n var _ = require('underscore');\n var util = require('./util')\n} else {\n var util = Substance.util;\n}\n\nvar errors = {};\n\nSubstanceError = function(name, code, messag... | javascript | edit | 0 | 4 | mit | 2094436175c4a3c2482b974700ac2202a1a4b6a8 | substance/util | errors.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(config) {\n config.set({\n basePath: '',\n frameworks: ['mocha'],\n webpack: {\n mode: 'development',\n module: {\n rules: [\n {\n test: /\\.js$/,\n exc... | javascript | edit | 0 | 2 | mit | afdf568adcb412eb2c37bb9a516696f12f381000 | formio/formio.js,formio/formio.js,formio/formio.js | karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Create Recipe class to wrap desired JSON data from 2nd API call\n\nAll attributes for Recipe object, created on invocation of BigOvenGetRecipeJson function, are functional except for ingredients, which requires creation of new JS constru... | javascript | new_file | 0 | 1 | mit | d2d0a8a4f911d6a46cf4def218dabc9ca2c50ed4 | danasselin/line-cook,nyc-rock-doves-2015/line-cook,nyc-rock-doves-2015/line-cook,nyc-rock-doves-2015/line-cook,danasselin/line-cook,danasselin/line-cook,danasselin/line-cook,nyc-rock-doves-2015/line-cook,nyc-rock-doves-2015/line-cook,danasselin/line-cook,danasselin/line-cook,nyc-rock-doves-2015/line-cook,danasselin/lin... | workshop/www/js/recipe.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst mocha = require('mocha');\nconst assert = require('assert');\nconst path = require('path');\nconst fs = require('fs');\nconst describe = mocha.describe;\nconst it = mocha.it;\nconst allResumes = require('./allResumes');\n\ndescrib... | javascript | edit | 0 | 1 | mit | 75bbb60783f5decc00ece0cf80cb590b5dfbafef | salomonelli/best-resume-ever,salomonelli/best-resume-ever | test/scripts/preview.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar atlas = {};\n\nfunction initMap() {\n atlas = L.map('atlas').setView([40, -100], 4);\n\n L.tileLayer('//stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.png').addTo(atlas);\n}\n\nfunction buildMap() {\n console.log(data.m... | javascript | edit | 0 | 1 | mit | a164d5fdd4ab443abd63042737d91706e7559350 | axismaps/tile-browser,axismaps/tile-browser | js/map.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// If you're running on a device or in the Android simulator be sure to change\nlet METEOR_URL = 'http://localhost:3000/websocket';\nif (process.env.NODE_ENV === 'production') {\n METEOR_URL = ''; // your production server url\n}\n\nco... | javascript | edit | 0 | 0 | mit | 2e357a6ac4c3b55fa5e7c0764c8d3902c058d464 | blovato/sca-mobile,spencercarli/react-native-meteor-boilerplate,spencercarli/react-native-meteor-boilerplate,blovato/sca-mobile,blovato/sca-mobile,spencercarli/react-native-meteor-boilerplate,spencercarli/react-native-meteor-boilerplate | RNApp/app/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar buffers = [];\n\nprocess.stdin.on('readable', function(chunk) {\n var chunk = process.stdin.read();\n if (chunk !== null) {\n buffers.push(chunk);\n }\n});\n\nprocess.stdin.on('end', function() {\n console.log(Buffer.concat(b... | javascript | edit | 0 | 2 | bsd-2-clause | 0154b921fa55444bb09dffb5e2f09382cc780def | karissa/bytewiser,karissa/bytewiser,maxogden/bytewiser,maxogden/bytewiser | exercises/buffer_concat/solution/solution.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { expect } from 'chai'\n\nimport types from '../../src/constants/ActionTypes'\nimport reducer from '../../src/reducers'\n\ndescribe('reducers/index.js', () => {\n it('should handle POSTS_SUCCESS and parse posts data to posts ent... | javascript | edit | 0 | 1 | mit | 9e0abc84a05e82f28fbe8a87f5ac9fd95b41c5f7 | nomkhonwaan/nomkhonwaan.github.io | tests/reducers/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst path = require('path');\n\nconst should = require('should');\n\nconst Nconfdir = require('./../index.js');\n\ndescribe('Nconfdir#getDirectory', () => {\n\n it('should getDirectory include dir and expanded env', (... | javascript | edit | 0 | 1 | mit | 1b4f4523d42549ea08bd5be35ebd33c68ba3f459 | 5minds/nconfetti | tests/test_directory.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\n// add timestamps in front of log messages\nrequire('console-stamp')(console, 'HH:MM:ss');\n\nvar bb = require('../bb.js');\nvar fs = require('fs')\n\nvar progArgs = process.argv.slice(2);\nvar sourceDir = progArgs[0]... | javascript | edit | 0 | 1 | mit | 8fff3eceb06a181f486f0f7ba06daa9b38ac2140 | danio/bb | examples/hello_world.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy... | javascript | edit | 0 | 2 | apache-2.0 | 96ad74425a84f70460bb47da0b72f65d57e39455 | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib | lib/node_modules/@stdlib/utils/define-property/lib/has_define_property_support.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n// npm compatibility\nif (typeof define !== 'function') { var define = require('./requirejs-shim')(module); }\n\ndefine([\"base/j... | javascript | edit | 0 | 1 | bsd-3-clause | 44084602901326e0d80a222aa5fc7976ab6d3742 | jupyter-widgets/ipywidgets,SylvainCorlay/ipywidgets,cornhundred/ipywidgets,SylvainCorlay/ipywidgets,SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,ipython/ipywidgets,cornhundred/ipywidgets,SylvainCorlay/ipywidgets,cornhundred/ipywidgets,cornhundred/ipywidgets,cornhundr... | ipywidgets/static/widgets/js/widget_state.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function ($) {\n\n $.fn.animateCSS = function (effect, delay, callback) {\n\n // Return this to maintain chainability\n return this.each(function () {\n\n // Cache $(this) for speed\n var $this = ... | javascript | edit | 0 | 3 | mit | 200e08dc7cc29a756244be4fc4b2d17d78584d1a | craigmdennis/animateCSS,output/animateCSS | animateCSS.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar RSVP = require('rsvp');\nvar tinylr = require('tiny-lr');\nvar ui = require('../ui');\n\nexports.start = function(options) {\n var liveReloadServer = new tinylr.Server();\n\n var listen = RSVP.denodeify(liveReload... | javascript | edit | 0 | 1 | mit | e4431fac1576b7339a827e1e5129218a4bf608eb | mike-north/ember-cli,lancedikson/ember-cli,olegdovger/ember-cli,raycohen/ember-cli,tsing80/ember-cli,martypenner/ember-cli,williamsbdev/ember-cli,ServiceTo/ember-cli,HeroicEric/ember-cli,joliss/ember-cli,elwayman02/ember-cli,givanse/ember-cli,jasonmit/ember-cli,rtablada/ember-cli,bevacqua/ember-cli,greyhwndz/ember-cli,... | lib/server/livereload-server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\nimport Ember from 'ember';\n\n\nconst localeStub = Ember.Service.extend({\n locale: null\n});\n\nmoduleForComponent('language-picke... | javascript | edit | 0 | 1 | apache-2.0 | 400d359330c55bc560fcc6a54e0a0389cffda46f | CenterForOpenScience/isp,CenterForOpenScience/isp,CenterForOpenScience/isp | tests/integration/components/language-picker/component-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//DateQuestionView Component Constructor\nfunction DateQuestionView(question, content) {\n\n\tvar self = Ti.UI.createPicker({\n\t\ttype : Ti.UI.PICKER_TYPE_DATE,\n\t\tvalue : new Date(),\n\t\tcolor : '#336699',\n\t\tright : 5,\n\t\tleft... | javascript | edit | 0 | 2 | mit | 14e6af87071c45a603302fac67deabe8d51c2dc8 | nilenso/ashoka-survey-mobile,nilenso/ashoka-survey-mobile | Resources/ui/common/questions/DateQuestionView.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nParse.Cloud.beforeSave(\"Bill\", function (request, response) {\n request.object.get(\"Family\").fetch().then(function (family) {\n family.get(\"Writers\").fetch().then(function (writers) {\n writers.relation(\"user... | javascript | edit | 0 | 4 | mit | c8a8552487da81cd252b660ce7f774442e93b161 | michaellperry/BillTender_Parse,michaellperry/BillTender_Parse | ParseCloud/cloud/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar rc = require('rc');\n\n/*eslint-disable camelcase */\n\nmodule.exports = rc('number_switcher_3000', {\n aws_region: 'us-east-1',\n aws_s3_bucket: 'let-me-in-dev',\n brennens_number: '222-222-2223',\n jeffs_number: '222-222-2222'... | javascript | edit | 0 | 0 | mit | 79ee4bb7b405875a29fae21f122ef83d2572450f | jeffcharles/number-switcher-3000,jeffcharles/number-switcher-3000,jeffcharles/number-switcher-3000 | api/conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nApplication.Directives.directive('visNetwork', visNetworkDirective);\n\nfunction visNetworkDirective() {\n return {\n restrict: 'E',\n require: '^ngModel',\n scope: {\n ngModel: '=',\n onSel... | javascript | edit | 0 | 4 | mit | 1a5dda702f1cbef923665c78f950af5b2e186e82 | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | website/app/application/core/projects/project/provenance/vis-network-directive.js | rejected_duplicate | Near-duplicate of sample 72280 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-env node */\nconst Reporter = require('ember-test-utils/reporter')\n\nmodule.exports = {\n disable_watching: true,\n framework: 'mocha',\n launch_in_ci: [\n 'Chrome',\n 'Firefox'\n ],\n launch_in_dev: [\n 'Chrome... | javascript | edit | 0 | 0 | mit | cc9d132e29ae00825ccdea9701507f1c4bbf53ac | ciena-frost/ember-frost-bunsen,ciena-frost/ember-frost-bunsen,ciena-frost/ember-frost-bunsen | testem.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar express = require('express');\nvar kraken = require('kraken-js');\nvar db = require('./lib/db');\nvar crypto = require('./lib/crypto');\n\nvar passport = require('passport');\n\nvar localStrategy = require('./lib/re... | javascript | edit | 0 | 1 | mit | 55bbb091356f4720cb6382c0ac6c102643218321 | uahengojr/NCA-Web-App,uahengojr/NCA-Web-App | WebApp/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(function (require) {\n\tvar $ = require(\"jquery\");\n\n\tvar documentKeyboardHandler = function (handler) {\n\t\t// keeps track of which keys have already been pressed,\n\t\t// so we can keep track of which key is a repeated eve... | javascript | edit | 0 | 3 | mit | db50d24940ef8475c9eb9c72c3dedf29d3b55c8e | stuartkeith/webaudiosequencer,stuartkeith/webaudiosequencer | source/javascript/utilities/documentKeyboardHandler.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function (){\n // smooth scrolling\n $(\".smoothie\").on('click', function(event) {\n var target = $(this.hash)\n , navOffset = $('#navbar').height()\n\t;\n\n\tevent.preventDefault();\n\n return $('html, b... | javascript | edit | 0 | 1 | apache-2.0 | d49021b9084cecf4dcd6eb960bdd62098169ffcb | oaklandfinishup/oaklandfinishup.github.io,oaklandfinishup/oaklandfinishup.github.io | js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\r\n],\r\nfunction (\r\n) {\r\n var File = function (name, contents) {\r\n this.name = name || 'Example';\r\n this.contents = contents;\r\n this.selected = true;\r\n };\r\n File.prototype.findNumberAt = function (ind... | javascript | edit | 0 | 3 | mit | 5ac3987fc1560130062301ecb15dccc8e7dd1965 | brianpeiris/RiftSketch,brianpeiris/RiftSketch | js/File.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default class RocExportPlugin {\n constructor(resolveRequest) {\n this.resolveRequest = resolveRequest;\n }\n\n apply(compiler) {\n // We assume that loaders will be managed in Webpack-land, that is we will... | javascript | edit | 0 | 3 | mit | 90092a9471420ec98ba0e3128ad299080574472f | rocjs/roc-package-webpack | extensions/roc-package-webpack-dev/src/webpack/utils/rocExportWebpackPlugin.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar updatePreviewTarget = function(data, status) {\n $('.spinner').hide();\n $('#preview-target').html(data);\n renderLatexExpressions();\n}\n\nvar renderLatexExpressions = function() {\n $('.latex-container').each(\n function(in... | javascript | edit | 0 | 1 | mit | 7c058000f2dc6380c36da830ebd1eea83260081b | erettsegik/erettsegik.hu,erettsegik/erettsegik.hu,erettsegik/erettsegik.hu | js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*globals define*/\ndefine([\n 'geometry/views/object2d-view'\n], function( Object2DView ) {\n 'use strict';\n\n var PathView = Object2DView.extend({\n });\n\n return PathView;\n});\n\n```\n\nApply this change: canvas-animation: Ad... | javascript | edit | 0 | 2 | mit | 9b759461828d79c94925b5c7f812d9df1dce0eb4 | razh/experiments-app | canvas-animation/js/geometry/views/path-view.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* @flow */\n\nimport React from 'react';\nimport {\n TouchableHighlight,\n TouchableWithoutFeedback,\n View\n} from 'react-native';\n\nimport AbstractContainer from '../AbstractContainer';\n\n/**\n * Represents a container of ... | javascript | edit | 0 | 7 | apache-2.0 | 03b043ca2bd4a2af9759b91f1287bff670336a2c | jitsi/jitsi-meet,jitsi/jitsi-meet,bgrozev/jitsi-meet,jitsi/jitsi-meet,gpolitis/jitsi-meet,bgrozev/jitsi-meet,gpolitis/jitsi-meet,gpolitis/jitsi-meet,bgrozev/jitsi-meet,gpolitis/jitsi-meet,jitsi/jitsi-meet,jitsi/jitsi-meet,gpolitis/jitsi-meet,bgrozev/jitsi-meet,gpolitis/jitsi-meet,jitsi/jitsi-meet,gpolitis/jitsi-meet,gp... | react/features/base/react/components/native/Container.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @flow\n */\n'use strict';\n\nlet { Easing } = require('react-native');\n\n// See Apple's \"CAMediaTimingFunction Class Reference\" for the Bezier control\n// points\nexports.easeIn = Easing.bezier(0.42, 0, 1, 1);\nexports.easeOu... | javascript | edit | 0 | 0 | mit | e08cb91560a4505927da0f0192403c0467f77206 | exponentjs/react-apple-easing | AppleEasing.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport class Notification {\n /**\n * @typedef NotificationData\n * @property {boolean} [read]\n * @property {string} title\n * @property {string} message\n * @property {('basic'|'sms')} [type='basic']\n * @property {string... | javascript | edit | 0 | 4 | mit | bb370e1138ecd46f7bcff9b3b5c28776a294913d | nextgensparx/quantum-router,nextgensparx/quantum-router | src/chrome/notification.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport template from './chat-page.html';\nimport { addMessage, selectThread } from '../../shared/threads/threads.actions';\nimport { getChannels, getDirectMessages, getCurrentThread } from '../../shared/threads/threads.selectors';\nimpo... | javascript | edit | 0 | 2 | mit | b1a74db98c9724b84cc90704b43af6ab2ef61758 | LoganDupont/ModernAngularJS_SlackCloneApp,LoganDupont/ModernAngularJS_SlackCloneApp | src/app/chat/containers/chat-page/chat-page.component.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\nPublic API for the container is still in flux.\nThe public API, specified on the application namespace should be considered the stable API.\n// @module container\n @private\n*/\n\nimport Registry from 'container/registry';\nimport ... | javascript | edit | 0 | 0 | mit | 6aa70081f55feefc106b2c2cfaae369ab8d74d60 | jaswilli/ember.js,qaiken/ember.js,karthiick/ember.js,workmanw/ember.js,szines/ember.js,bekzod/ember.js,alexdiliberto/ember.js,patricksrobertson/ember.js,GavinJoyce/ember.js,davidpett/ember.js,Leooo/ember.js,bekzod/ember.js,miguelcobain/ember.js,mixonic/ember.js,trentmwillis/ember.js,runspired/ember.js,bantic/ember.js,S... | packages/container/lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Axios from 'axios'\nimport PathBuilder from './path-builder'\n\nclass RailsRouteBuilder {\n constructor (configs = {}) {\n // TODO\n // Make an option for switching to GET for destroy actions\n this.pathBuilder = new Pa... | javascript | edit | 0 | 1 | mit | 45c8577d518fe8ef347d8bd6bde2773c0aa73447 | victor-am/rails-ranger,victor-am/rails-ranger | src/rails-route-builder.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Promise = require('es6-promise').Promise;\n\nfunction fetch(options) {\n\n return new Promise(function(resolve, reject) {\n var xhr = new XMLHttpRequest();\n\n xhr.onload = function() {\n\n if(xhr.getResponseHeader('cont... | javascript | edit | 0 | 4 | apache-2.0 | 26b3a8b2e635d56a16b8ed745cba49ff213870bf | yrezgui/dokomygp | src/scripts/utils/fetch.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n $(document).on('click', '.accept-btn', function(e) {\n e.preventDefault();\n answer = $(this).closest('.delegate-text-answer').find('textarea').val();\n text_answer = $(this).closest('.answer_f... | javascript | edit | 0 | 1 | bsd-3-clause | e5edfa25835ab4f2c07d0728cbcb742c6e3574ac | unepwcmc/ORS,unepwcmc/ORS,unepwcmc/ORS,unepwcmc/ORS,unepwcmc/ORS | app/assets/javascripts/respondent/accept_answer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nTaskar.Sections.Feedback = function(element){\n var appear = Taskar.UI.WindowForm(\"feedback_form\");\n\n $(\"feedback_form\").observe('ajax:after', function(e) {\n this.fade();\n });\n\n element.observe(\"click\", function(e){\n... | javascript | edit | 0 | 1 | mit | 4d08209582575954aa0c13c7316883aa9fd63d6f | RStankov/Taskar | app/assets/javascripts/taskar/sections/feedback.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar http = require('http');\nvar util = require('./util');\nvar file = require('.file_system.file');\nvar counter=0;\n\nhttp.createServer(function (req, res) {\n var answer = util.helloWorld();\n\n res.writeHead(200, {'Content-Ty... | javascript | edit | 0 | 1 | mit | 711eeea3937d548c2adf9ed1ba79981f1bd52645 | fhinkel/SimpleChatServer,fhinkel/SimpleChatServer | js/server.js | rejected_duplicate | Near-duplicate of sample 96631 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Shared styles of highcharts-chart for polymer 3.0\nimport { html } from '@polymer/lit-element';\n\nexport const SharedStyles = html`\n<style>\n :host {width: 100%;display: inline-block;min-height: var(--highcharts-min-height, 26em... | javascript | edit | 0 | 0 | mit | aae3475a6fe42891175f4a6ab35224f12531f5f0 | avdaredevil/highcharts-chart,avdaredevil/highcharts-chart | shared-styles.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { usingConnect, sql } from './pg-helpers'\nimport Promise from 'bluebird';\nimport crypto from 'crypto';\nimport scmp from 'scmp'\n\nconst pbkdf2 = Promise.promisify(crypto.pbkdf2, crypto);\n\nclass User {\n constructor(userData... | javascript | edit | 0 | 2 | mit | 3f32d2e881df728b3983668b8e6a154464956e51 | googol/drinkkiarkisto,googol/drinkkiarkisto | src/data/UserRepository.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequirejs.config({\n baseUrl: '/static',\n\n paths: {\n antibodies: 'modules/antibodies',\n app: 'modules/app',\n assert: 'modules/assert',\n base: 'modules/base',\n home: 'modules/home',\n ... | javascript | edit | 0 | 1 | mit | 2f8370a000f8a4718d806b55c7bff5462e29ac9d | 4dn-dcic/fourfront,philiptzou/clincoded,ENCODE-DCC/snovault,ClinGen/clincoded,hms-dbmi/fourfront,kidaa/encoded,hms-dbmi/fourfront,ClinGen/clincoded,kidaa/encoded,ENCODE-DCC/snovault,philiptzou/clincoded,4dn-dcic/fourfront,ENCODE-DCC/encoded,ENCODE-DCC/encoded,T2DREAM/t2dream-portal,kidaa/encoded,ENCODE-DCC/snovault,hms... | src/encoded/static/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// locations.js\n// caches location information from foursquare \n\n// TO-DO: Foursquare ToS says data can be stored for 30 days before it must be updated. \n// Any data that is older than 30 days should be removed. \n\nmodule.exports =... | javascript | edit | 0 | 1 | mit | b0137bde40fef71fb4d311fdd049d59de23d472a | wrrnwng/partyof4,shelleywang/partyof4,wrrnwng/partyof4,Trustworthy-Hair/partyof4,shelleywang/partyof4,Trustworthy-Hair/partyof4 | server/models/locations.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { version as nodeVersion } from 'process'\n\nimport readPkgUp from 'read-pkg-up'\n\n// Caches it.\n// TODO: use async instead\nconst {\n pkg: { version: autoserverVersion },\n} = readPkgUp.sync()\n\n// Retrieve environment-speci... | javascript | edit | 0 | 1 | apache-2.0 | 480ca6e607311242980aca268d2d7a20944483bd | autoserver-org/autoserver,autoserver-org/autoserver | src/serverinfo/versions.js | rejected_duplicate | Near-duplicate of sample 87102 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n\nimport { Meeting } from '../actions/ActionTypes';\nimport { createSelector } from 'reselect';\nimport createEntityReducer from 'app/utils/createEntityReducer';\n\nexport default createEntityReducer({\n key: 'meetings',\n t... | javascript | edit | 0 | 4 | mit | ef450ee7a6eabac237dd6fce63dad99153b670bf | webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp | app/reducers/meetings.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmyApp.service('breadCrumbService', function($location) {\n\n this.crumbs = [\n ];\n\n this.current = {\n path: './',\n display:'Inventories'\n };\n\n this.update = function(crumb) {\n console.log(\"Up... | javascript | edit | 0 | 4 | cc0-1.0 | fe2a52fae2539c03433cf069f513714678388c41 | zcdunn/inventory,zcdunn/inventory | js/BreadCrumbService.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as Backbone from 'backbone';\nimport SearchView from '../search/views/search-view';\nimport Messages from './messenger';\n\nclass AppRouter extends Backbone.Router {\n\n get routes() {\n return {\n 'search/(?q=*querySt... | javascript | edit | 0 | 1 | mit | f34d0b2873b162177a92d0a5b2f0a7d9535f7492 | trevormunoz/katherine-anne,trevormunoz/katherine-anne,trevormunoz/katherine-anne | src/js/utils/app-router.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n function initTinyMceTextarea(event) {\n var targetRow = $(event.target).parents('tr');\n if (targetRow.find('td:contains(\".help\"),td:contains(\".html\"),td:contains(\".information.\")'... | javascript | edit | 0 | 3 | apache-2.0 | d0eb6cdbc315e750a4bed9a1520a279db1e825c1 | SURFnet/sp-dashboard,SURFnet/sp-dashboard,SURFnet/sp-dashboard,SURFnet/sp-dashboard,SURFnet/sp-dashboard | app/js/components/translation_ui.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function ( $ ) {\n\t\"use strict\";\n\n\t$(function () {\n\n\t\t// catch the upvote/downvote action\n\t\t$( 'div.karma' ).on( 'click', 'span > a', function( e ){\n\t\t\te.preventDefault();\n\t\t\tvar value = 0;\n\t\t\tvar comment_id = ... | javascript | edit | 0 | 3 | mit | dd0e3b85b1ac47c3342b2a282cd5b7432481b1e6 | humanmade/comment-popularity,humanmade/comment-popularity,humanmade/comment-popularity,humanmade/comment-popularity | assets/js/voting.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nKpcc.ArticleView = Ember.View.extend({\n didInsertElement: function() {\n $('body').scrollTop(0).addClass('article');\n }\n});\n\n```\n\nApply this change: Make page scroll to top when switching between articles"
},
{
... | javascript | edit | 0 | 1 | mit | d252c40727f4b9e3b0ae06a4db89f4ad580b42b2 | SCPR/kpcc-reader,SCPR/kpcc-reader,bricker/KPCC-Reader,bricker/KPCC-Reader,SCPR/kpcc-reader | js/views/article_view.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function () {\n $('#btn-add-gadget').click(function () {\n var elem = $(this);\n asset.process(elem.data('type'), elem.data('aid'), location.href, elem);\n });\n\n $('#btn-remove-subscribe').click(function () {\... | javascript | edit | 0 | 3 | apache-2.0 | d4356d9a7ad1cad9fbb5ad4a8e6f2f3ae6922442 | jeradrutnam/carbon-store,Rajith90/carbon-store,madawas/carbon-store,thushara35/carbon-store,daneshk/carbon-store,jeradrutnam/carbon-store,daneshk/carbon-store,daneshk/carbon-store,splinter/carbon-store,wso2/carbon-store,cnapagoda/carbon-store,prasa7/carbon-store,jeradrutnam/carbon-store,cnapagoda/carbon-store,madawas/c... | apps/store/themes/store/js/asset.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Client = require('client'),\n Utils = require('utils'),\n ZAFClient = {};\n\n/// ### ZAFClient API\n///\n/// When you include the ZAF SDK on your website, you get access to the `ZAFClient` object.\n///\n/// #### ZAFClie... | javascript | edit | 0 | 7 | apache-2.0 | f95e386233f99207a08a566742a02fff34828aa1 | zendesk/zendesk_app_framework_sdk,zendesk/zendesk_app_framework_sdk,zendesk/zendesk_app_framework_sdk | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport DS from 'ember-data';\n\nexport default DS.RESTSerializer.extend({\n _shouldSerializeHasMany: function() {\n return true;\n },\n\n // This fixes a failure in Ember Data 1.13 where an empty hasMany\n // was saving as undefi... | javascript | edit | 0 | 4 | apache-2.0 | ff3eab83c057109b2b755cc6d32c5747997e3df4 | nolanlawson/ember-pouch,nolanlawson/ember-pouch,pouchdb-community/ember-pouch,pouchdb-community/ember-pouch | addon/serializers/pouch.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable no-return-assign */\nimport { format, addHours, addDays } from 'date-fns';\n\nconst formatUpcomingReviews = (data = []) => {\n let extraDays = 0;\n const getFutureDayName = (daysAhead = 0) => format(addDays(new Date(... | javascript | edit | 0 | 2 | mit | eb278fb6040eb9fc8ed4669d8afe7fffe72c3847 | Kaniwani/KW-Frontend,Kaniwani/KW-Frontend | app/common/utils/formatUpcomingReviews.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport './SearchUrl.css';\n\nfunction SearchUrl(props) {\n const searchUrl = decodeURI(props.searchUrl.substring(59));\n return (\n <div className=\"SearchUrl\">\n {searchUrl}\n </div>\n );\n}\n... | javascript | edit | 0 | 1 | mit | 9f039fdba867dca810bb293e0d6c5bc0a8473ecd | bbokorney/hold-my-beer,bbokorney/hold-my-beer | src/SearchUrl.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Implement require.resolve(), log and return module name given\n\nhttps://github.com/deathcap/webnpm/issues/5 Implement require.resolve"
},
{
"role": "assistant",
"content": "(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[... | javascript | new_file | 0 | 7 | mit | 53deb74b1fdf3dc7cb88ec54580d2d0c0b24df45 | deathcap/nodeachrome,deathcap/nodeachrome,deathcap/nodeachrome | app/prelude2.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst os = require('os');\nconst TerserPlugin = require('terser-webpack-plugin');\n\n/**\n * parallel doesn't work yet for WSL (GNU/Linux on Windows)\n * cf https://github.com/webpack-contrib/terser-webpack-plugin/issues/21\n * https://... | javascript | edit | 0 | 3 | mit | 95a4a2ad8f5236d7d4fefdfb30d986a73c72915a | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | packages/pack/webpack/optimization.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nimport config from '../config';\nimport gulp from 'gulp';\nimport browserSync from 'browser-sync';\n\nvar reload_delay = 1000;\n\ngulp.task('server', function() {\n console.log('BROWSER SYNC ENABLED ON PORT... | javascript | edit | 0 | 1 | mit | b6c6b23215158d43a4766d25e13c8ce4f7d16488 | russiansoon/gulp-start,russiansoon/gulp-start | lib/gulp/tasks/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n/* global fetch */\n\nimport merge from 'lodash/merge'\n\ntype ResponseBody = Object | null | string\n\nconst fetchJSON = (url: string | Request | URL, options: Object = {}) => {\n const jsonOptions = merge(\n {\n hea... | javascript | edit | null | null | mit | 8de99f2716a7a0e7c944e35163b5e4f7ed5a9f5a | vlki/refresh-fetch | src/fetchJSON.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst mongoose = require('mongoose');\nconst Schema = mongoose.Schema;\n\nconst CardSchema = new Schema({\n\n name: {\n type: String,\n unique: true,\n require: true,\n },\n\n idName: {\n type: String,\n unique: true,\... | javascript | edit | 0 | 2 | mit | 76f4bffaed358b3193b5e22069c946d0575c3f9a | martincarrera/clash-royale-api,martincarrera/clash-royale-api | src/schemas/card-schema.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Copyright 2011 eBay Software Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n ... | javascript | edit | 0 | 4 | mit | 066b06936ab78ddac7c1cf5f81d6ece27c7d06d0 | marko-js/marko,marko-js/marko | taglibs/core/AssignNode.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar provision = function(abstraction, options) {\n var self = this; // eslint-disable-line no-unused-vars\n\n if (options.provider) {\n abstraction.setProvider(options.provider);\n }\n\n if (options.network_id) {\n abstraction... | javascript | edit | 0 | 5 | mit | 47bcd63ceb4cc42b39c0b34432ec662e203bf4dd | ConsenSys/truffle | packages/truffle-provisioner/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nfunction retrieveContact(conn, date, limit, offset, cb) {\n conn.sobject(\"Contact\")\n .select('Id, IsDeleted, FirstName, LastName, Name, Phone, Fax, MobilePhone, MailingStreet, HomePhone, OtherPhone, AssistantPhon... | javascript | edit | 0 | 4 | mit | 440886f3037d157d4bc040223263873bd264dd22 | AnyFetch/salesforce-provider.anyfetch.com | lib/helpers/retrieve.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Q = require('Q'),\n childProcess = require('child_process');\n\nfunction processPath(exec) {\n var exec = exec || Q.denodeify(childProcess.exec);\n var deferred = Q.defer();\n\n function handleDone(stdout, stderr) {\n var ... | javascript | edit | 0 | 2 | apache-2.0 | c1330b3e685ca1ab4bc41ab16bc47631afab887a | radiodan/radiodan.js,radiodan/radiodan.js | lib/mpd-child-process.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Controller.extend({\n queryParams: ['viewType', 'nodeId'],\n query: Ember.inject.service(),\n viewType: 'live',\n\n modelArrived: Ember.observer('model', function() {\n const nod... | javascript | edit | 0 | 2 | mit | 91ffe7f36067f6921c8537f7db9d7e43aae49362 | UrbanCCD-UChicago/plenario-explorer,UrbanCCD-UChicago/plenario-explorer,UrbanCCD-UChicago/plenario-explorer | app/controllers/sensors.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.