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\nvar mongodb = require('mongodb');\nvar nodefn = require('when/node');\nvar util = require('util');\n\n\n// ### Errors ###\n\nfunction MongoConnectionError(error) {\n\tthis.name = 'MongoConnectionError';\n\tthis.message = error;\n}\nutil... | javascript | edit | 0 | 2 | mit | 83c1ca6ef6f634b051c916246fdd187850cd9ccd | rootsher/server-side-portal-framework | Adapters/Mongo.js | rejected_duplicate | Near-duplicate of sample 91430 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndescribe('indexObj', function(){\n\tvar indexObj = new Index;\n\n beforeEach(function(done){\n indexObj.createIndex.done(function(data){\n done();\n });\n })\n\tdescribe('createIndex', function(){\n\n\t\tit('reads json file... | javascript | edit | 0 | 1 | mit | 74a2d6fe9c0b49b674fcb5bfc75c0ea29ce2d11f | andela-jwarugu/checkpoint-1,andela-jwarugu/checkpoint-1 | jasmine/spec/inverted-index-spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Run test specs in node environment\n * Usage:\n * $ cd seajs\n * $ node tests/runner-node.js\n */\n\nrequire('../lib/sea.js')\n\ndefine('./tests/node-runner', function(require) {\n var test = require('./test')\n\n var suit... | javascript | edit | 0 | 1 | mit | 98ce8e4368b0a18deb9ab4cbf0472696e8481e4a | yuhualingfeng/seajs,evilemon/seajs,wenber/seajs,kaijiemo/seajs,LzhElite/seajs,FrankElean/SeaJS,yuhualingfeng/seajs,miusuncle/seajs,Lyfme/seajs,miusuncle/seajs,treejames/seajs,Gatsbyy/seajs,angelLYK/seajs,liupeng110112/seajs,ysxlinux/seajs,zaoli/seajs,LzhElite/seajs,longze/seajs,coolyhx/seajs,longze/seajs,eleanors/SeaJS... | tests/node-runner.js | rejected_duplicate | Near-duplicate of sample 74697 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst WIDTH = 800;\nconst HEIGHT = 600;\n\nconst SPACING = 25;\n\nconst RECT_SIZE_X = 15;\nconst RECT_SIZE_Y = 2;\n\nvar setup = function() {\n createCanvas(WIDTH, HEIGHT);\n background(0);\n fill(255);\n\n angleMode(DEGREES);\n\n ... | javascript | edit | 0 | 3 | mit | c4cbf08b6eb45ca49ff1fbaf067653e101bc5ebd | SimonHFrost/my-p5,SimonHFrost/my-p5 | sketch.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function context (asset) {\n var base = require('../base')(asset)\n\n return function form (name, opts) {\n if (typeof name !== 'string') {\n opts = name\n name = undefined\n }\n\n if (!opts) {\n ... | javascript | edit | null | null | mit | 7e1ec26b4f7017a998717ab7a0e865bbb01d5079 | joshgillies/zion-assets | assets/form/index.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n\nimport { requireNativeComponent, View } from 'react-native';\n\nexport default requireNativeComponent('BVLinearGradient', null);\n\nexport type Point = $Exact<{x: number, y: number}>;\nexport type Props = $Exact<{\n start?:... | javascript | edit | null | null | mit | 45667cd94705ed53974c4ebf6494e0fb830388f5 | react-native-community/react-native-linear-gradient,react-native-community/react-native-linear-gradient,react-native-community/react-native-linear-gradient,react-native-community/react-native-linear-gradient | common.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { version } from '../../../../package'\n\n// Should include the package version so we can increase the version number\n// when the structure of the state has changed to avoid loading outdated states.\nconst PERSISTED_STATE_KEY = ... | javascript | edit | 0 | 2 | mit | 881781abcc44c65c6c3d7176fed4233297605108 | electerious/Ackee | src/ui/scripts/utils/storage.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add defaults to Contact model"
},
{
"role": "assistant",
"content": "ContactManager.Models.Contact = Backbone.Model.extend({\n defaults: {\n name: null,\n tel: null,\n email: null,\n avatar: null\n }\n});\n"
}... | javascript | new_file | 0 | 0 | mit | ca4f9c458466d8efe12decd7190f5112bb9415c9 | giastfader/backbone-contact-manager,SomilKumar/backbone-contact-manager,dmytroyarmak/backbone-contact-manager,EaswarRaju/angular-contact-manager,hrundik/angular-contact-manager,vinnu-313/backbone-contact-manager,SomilKumar/backbone-contact-manager,giastfader/backbone-contact-manager,hrundik/angular-contact-manager,vinn... | app/js/models/contact.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar AmpersandCollection = require('ampersand-collection');\n\nvar Metadata = AmpersandCollection.extend({\n mainIndex: 'id',\n comparator: 'power'\n});\n\n/*\n Convenience method to see if each item\n exists in the collection and to... | javascript | edit | 0 | 3 | apache-2.0 | d56c9d2cd840461ba548f41efa7198733ff2cb38 | libbymiller/whe,libbymiller/birdsnapper,libbymiller/whe,libbymiller/whe,libbymiller/birdsnapper,libbymiller/whe,libbymiller/whe,libbymiller/birdsnapper,libbymiller/birdsnapper,libbymiller/birdsnapper | collector/api/lib/metadata.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar restify = require('restify');\nvar knex = require('knex')({\n client: 'mysql',\n connection: {\n host : '127.0.0.1',\n user : 'root',\n password : 'root',\n database : 'brestful_test',\n charset : 'utf8'\n ... | javascript | edit | 0 | 1 | mit | d92a699118d59eafb0c3c072927091f28a5f82dd | ganemone/bookshelf-restful | tests/util/shared.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Use list of stocks to corresponding to tabs."
},
{
"role": "assistant",
"content": "var prefix = 'http://finance.yahoo.com/echarts?s=',\n middle = '+Interactive#symbol=',\n suffix = ';range=1y;compare=;indicator=sma+vol... | javascript | new_file | 0 | 2 | mit | f59d69d0ff333f862bb6514230de076321f3c770 | aisthesis/multi-tab | background.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmeteorBabelHelpers = module.exports = {\n sanitizeForInObject: function (obj) {\n if (Array.isArray(obj)) {\n var newObj = {};\n var keys = Object.keys(obj);\n var keyCount = keys.length;\n for (var i = 0; i < ke... | javascript | edit | 0 | 4 | mit | 60e2de7993255c810894f279c04ad2d6bcbe6236 | Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor | packages/helpers/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (grunt) {\n 'use strict';\n\n grunt.initConfig({\n pkg: grunt.file.readJSON( 'package.json' ),\n jshint: {\n all: [\n 'Gruntfile.js',\n 'bot.js',\n ... | javascript | edit | 0 | 1 | mit | 87c6ecca8a205ad593631ff7325cb083e54a4b23 | kokarn/KokBot | gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar RSVP = require('rsvp');\nvar request = RSVP.denodeify(require('request'));\nvar jsdom = require(\"jsdom\").jsdom;\n\nQUnit.module('Fastboot render');\n\nQUnit.test('it renders', function(assert) {\n assert.expect(3);\n\n retu... | javascript | edit | 0 | 1 | mit | e0320030df01e16049719d59c120cb728e3696f9 | cibernox/ember-power-select,cibernox/ember-power-select,cibernox/ember-power-select,esbanarango/ember-power-select,esbanarango/ember-power-select,esbanarango/ember-power-select,cibernox/ember-power-select,chrisgame/ember-power-select,Dremora/ember-power-select,Dremora/ember-power-select,chrisgame/ember-power-select | fastboot-tests/power-select-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar EncryptedLocations = {\n decryptAll: function(locations) {\n var dfd = $.Deferred()\n\n askForPassword().done(function(password) {\n var decryptedLocations = _(locations).map(function(location) {\n try {\n ... | javascript | edit | 0 | 2 | mit | f4cdd96b5166c76712f6c395eabb9f29a357ed72 | jarmo/carguard-server,jarmo/carguard-server,jarmo/carguard-server,jarmo/carguard-server | public/encrypted_locations.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar active = true;\n\nfunction setIcon() {\n if (active) {\n chrome.browserAction.setIcon({ path: 'icon_enabled.png' });\n } else {\n chrome.browserAction.setIcon({ path: 'icon_disabled.png' });\n }\n}\n\nfunction changeState()... | javascript | edit | 0 | 2 | apache-2.0 | fcc4546c9faef38495516513fb886984abc08c73 | ubeacsec/Silverdog,ubeacsec/Silverdog | background.js | rejected_duplicate | Near-duplicate of sample 75643 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst installer = require('electron-installer-windows');\nconst path = require('path');\n\nconst options = {\n src: 'build/Headset-win32-ia32',\n dest: 'build/installers/',\n productDescription: 'Headset is a desktop app that turns Y... | javascript | edit | 0 | 1 | mit | 3507c30d655970372d56bcead39a3e45b9e7960a | fcastilloec/headset-electron,fcastilloec/headset-electron,headsetapp/headset-electron,fcastilloec/headset-electron,headsetapp/headset-electron,headsetapp/headset-electron | windows/bin/winstaller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component, Fragment } from 'react'\nimport { Heading } from '@hackclub/design-system'\nimport LoginForm from 'components/apply/LoginForm'\nimport PostForm from 'components/challenge/PostForm'\nimport LoadingAnimation fro... | javascript | edit | 0 | 4 | mit | f5ccf858eab3ef27936804e2a5f34f4a8cea6bdf | hackclub/website,hackclub/website,hackclub/website | src/components/challenge/Form.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport FakeOwner from './fake-owner';\n\nlet getOwner;\n\nif (Ember.getOwner) {\n getOwner = Ember.getOwner;\n} else {\n getOwner = function(object) {\n return new FakeOwner(object);\n };\n}\n\nexport d... | javascript | edit | 0 | 4 | mit | 4e507d4fb10d77ff92cc3571a3e05a063928303b | rwjblue/ember-getowner-polyfill,rwjblue/ember-getowner-polyfill | addon/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport fs from 'fs-extra';\nimport path from 'path';\nimport app from 'app';\n\nimport BaseAutoLauncher from 'browser/components/auto-launcher/base';\nimport files from 'common/utils/files';\n\nconst autoStartDir = path.join(app.getPath... | javascript | edit | 0 | 1 | mit | 84b2b3c6c81ad512ed55cf04153df5ad32cb789d | Aluxian/Messenger-for-Desktop,rafael-neri/whatsapp-webapp,Aluxian/Messenger-for-Desktop,rafael-neri/whatsapp-webapp,Aluxian/Facebook-Messenger-Desktop,Aluxian/Facebook-Messenger-Desktop,Aluxian/Facebook-Messenger-Desktop,rafael-neri/whatsapp-webapp,Aluxian/Messenger-for-Desktop | src/scripts/browser/components/auto-launcher/impl-linux.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n\n config: {\n Name: \"citybuilder\",\n Vagrant: {\n Box: 'ubuntu/xenial64',\n Install: 'npm docker.io'\n }\n },\n\n software: {\n \"couchdb\": {\n Source: \"couchdb\"\n },\n\n \"n... | javascript | edit | 0 | 0 | mit | 6f15c71fb5765860961f40d433e645820b5b8ee5 | oglimmer/citybuilder,oglimmer/citybuilder,oglimmer/citybuilder | Fulgensfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(window).on('entity:view:add entity:view:update', function (e, data) {\n $('#div_id_message_sentinel').prop('hidden', true);\n $('#div_id_message_supervisor').prop('hidden', true);\n $('#div_id_uses_timers').prop('hidden', tru... | javascript | edit | 0 | 2 | bsd-2-clause | c2579a72f997988565751a2e95d1894c9a518c95 | GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin | geotrek/feedback/static/feedback/main.js | rejected_duplicate | Near-duplicate of sample 80177 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, {PropTypes, Component} from 'react'\nimport { Form, FormGroup, FormControl, Row, Col } from 'react-bootstrap'\nimport { connect } from 'react-redux'\n\nimport { setQueryParam } from '../../actions/form'\n\nclass DropdownSe... | javascript | edit | 0 | 2 | mit | 2beaf8b2706f4dedcf3619288d68497d39438907 | opentripplanner/otp-react-redux,opentripplanner/otp-react-redux,opentripplanner/otp-react-redux,opentripplanner/otp-react-redux | lib/components/form/dropdown-selector.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n---\nlibrary: jquery-2.1.3.min.js\n---\n// If using a JS framework, include it here\n// {% include_relative _lib/{{page.library}} %}\n\n// Application code goes here\n\n// Vanilla JS equivalent of $(document).ready\ndocument.addEventLis... | javascript | edit | null | null | mit | 0f68ace7eb521b9eefe6ee8fe9dcc0da121ffcf0 | egardner/egardner.github.io,egardner/egardner.github.io,egardner/egardner.github.io,egardner/egardner.github.io | assets/js/main.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nfunction cast_to_edge(x, y, pos) {\n var d = Math.sqrt((pos.x - x) * (pos.x - x) + (pos.y - y) * (pos.y - y)); \n var uv = {\n \"x\": (x-pos.x)/d,\n \"y\": (y-pos.y)/d\n }\n \n do {\n x+=uv... | javascript | edit | 0 | 5 | mit | f3c034d7e7e34f7b0d9fc4bd0ad1cb5eb4552b30 | aquisenberry/ggj_meditate,aquisenberry/ggj_meditate | src/scripts/spawn_projectiles.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * @ngdoc directive\n * @name vlui.directive:modal\n * @description\n * # modal\n */\nangular.module('vlui')\n .directive('welcomeModal', function (Modals, localStorageService) {\n return {\n templateUrl: ... | javascript | edit | 0 | 2 | bsd-3-clause | de1d5746491d1db8f772a16b31592864e4c0f806 | uwdata/vega-lite-ui,vega/vega-lite-ui,uwdata/vega-lite-ui,vega/vega-lite-ui,vega/vega-lite-ui,uwdata/vega-lite-ui | src/welcomemodal/welcomemodal.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport styles from 'components/Event/Event.scss';\n\nexport default class Event extends React.Component {\n\n render() {\n return (\n <div>\n <div className={styles.Event}>\n <h1> T... | javascript | edit | 0 | 1 | mit | c6417150cdfc9b7d53f027ad7b87b11c3b29ebcf | HackCWRU/HackCWRU-Website,HackCWRU/HackCWRU-Website | src/components/Event/Event.react.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport function shortLabelFromScore(score) {\n if (score >= 400 && score < 450) return 'NM';\n if (score >= 450 && score < 500) return 'P';\n if (score >= 500 && score < 550) return 'M';\n if (score >= 550 && score < 600) return 'E'... | javascript | edit | 0 | 9 | mit | 260748d91ae1ff823b5b1e80d9abb29c59cf0a0a | studentinsights/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights | app/assets/javascripts/student_profile/nextGenMcasScores.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = async function listApisAction(args, context) {\n const {apiClient, output, chalk} = context\n\n const client = apiClient({\n requireUser: true,\n requireProject: true\n })\n\n let endpoints\n try {\n endpo... | javascript | edit | 0 | 4 | mit | 7b026e0184ced8c5d0e55b05de71615c51053607 | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | packages/@sanity/core/src/actions/graphql/listApisAction.js | rejected_duplicate | Near-duplicate of sample 81952 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* Copyright 2015 Realm Inc - All Rights Reserved\n * Proprietary and Confidential\n */\n\n'use strict';\n\nif (typeof Realm != 'undefined') {\n module.exports = Realm; // eslint-disable-line no-undef\n} else if (navigator.userAgent... | javascript | edit | 0 | 0 | apache-2.0 | 7202994482172af071dad98d622160e237a132e9 | realm/realm-js,realm/realm-js,realm/realm-js,realm/realm-js,realm/realm-js,realm/realm-js,realm/realm-js,realm/realm-js,realm/realm-js | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { getSelectedAlgorithm } from './utils.js';\nimport { \n secretInput,\n secretBase64Checkbox,\n} from '../dom-elements.js';\n\nimport log from 'loglevel';\nimport tippy from 'tippy.js';\nimport { b64utohex, utf8tohex } from 'js... | javascript | edit | 0 | 5 | mit | 6e6ffb257e12a21e32779362220ada576efec3aa | simo5/jsonwebtoken.github.io,nov/jsonwebtoken.github.io,nov/jsonwebtoken.github.io,simo5/jsonwebtoken.github.io | src/editor/secret-length-tooltip.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = {\n\tEdge: require('./edge'),\n\tSystem: require('./system')\n};\n\n```\n\nApply this change: Revert \"Revert \"just to initiate travis\"\"\n\nThis reverts commit 8a7889643ce9cbf566d76538acee5b55afc6790... | javascript | edit | 0 | 0 | mit | f10ad413479607e54aa3fef631be18a24e4935a5 | KnowRe/swint-pipe | lib/index.js | rejected_duplicate | Near-duplicate of sample 91517 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$().ready(function() {\n const location = getCookie('location');\n if (location != \"\") {\n $('#location-checkbox').prop('checked', true);\n }\n\n $('#location-checkbox').change(function() {\n if(this.checked) {\n setCoo... | javascript | edit | 0 | 2 | apache-2.0 | f65c5083612b8ab8be9021269b6cb038f2e8ec01 | googleinterns/step36-2020,googleinterns/step36-2020,googleinterns/step36-2020 | src/main/webapp/scripts/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nconst Marionette = require('backbone.marionette');\nconst CapabilityIconsView = require('./CapabilityIconsView.js');\nconst NotificationBadgeView = require('./NotificationBadgeView.js');\n\nmodule.exports = class PhoneNavView extends ... | javascript | edit | 0 | 2 | mit | 8fff53ca600a72875ddca3097aef04f33348e3ac | monitron/jarvis-ha,monitron/jarvis-ha | lib/web/scripts/nav/PhoneNavView.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire([\"gitbook\"], function(gitbook) {\n gitbook.events.bind(\"page.change\", function() {\n $('ul.summary li li').hide();\n // $('ul.summary li').find('li.active').parent().children().show();\n $('ul.summary... | javascript | edit | 0 | 1 | apache-2.0 | 7d3f5b9371edc7914185056c9e3bb33af067501a | rtCamp/gitbook-plugin-collapsible-menu | book/plugin.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport pluck from './pluck';\nimport {\n ref,\n refs,\n noop,\n mixin,\n insertCss,\n emptyTemplate,\n computedAll,\n pureComputedAll\n} from '../util/';\n\nconst modulePolyfill = {\n constructor: noop,\n d... | javascript | edit | 0 | 4 | mit | 38f096870f07a2ac1a6d2f22e138c43c976fe779 | baza-fe/knockout.register | src/core/transform.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport chai from 'chai'\nimport ifShortPart from '@/wordbreaker-russian/rules/if-short-part'\n\ndescribe(\n 'ifShortPart', () => {\n it(\n 'Это функция', () => {\n chai.assert.isFunction(ifShortPart)\... | javascript | edit | 0 | 1 | mit | f3739044abb7dfb5bc09628ff4655a77d90b54a8 | Ohar/wordbreaker-russian,Ohar/wordbreaker-russian | test/rules/if-short-part.test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Yadda = require('yadda'),\n config = require('./configure'),\n language = Yadda.localisation[upperCaseFirstLetter(config.language)],\n fs = require('fs'),\n path = require('path'),\n chai = require('chai');\n\nmodule.... | javascript | edit | 0 | 1 | mit | 2b990a04566463c8c12a06fa3585440890b354ca | webdriverio/cucumber-boilerplate,webdriverio/cucumber-boilerplate,Hunghbm/cucumber-boilerplate-package,webdriverio/cucumber-boilerplate,Hunghbm/cucumber-boilerplate-package,Marketionist/cucumber-boilerplate,Marketionist/cucumber-boilerplate,jjanssen/cucumber-boilerplate,jjanssen/cucumber-boilerplate | test/support/step-definitions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { NewsSection } from 'react-components';\nimport { c } from 'ttag';\n\nimport Page from '../components/page/Page';\n\nconst AccountContainer = () => {\n return (\n <Page title={c('Title').t`A... | javascript | edit | 0 | 1 | mit | 2a5a403dbdf67931a2d079e6f474fdae3b25da09 | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | applications/vpn-settings/src/app/containers/AccountContainer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// For normal consumers, use -1\nconst REPLICA_ID = -1\n\nconst versions = {\n 0: ({ replicaId = REPLICA_ID, maxWaitTime, minBytes, topics }) => {\n const request = require('./v0/request')\n const response = require('./v0/respons... | javascript | edit | 0 | 1 | mit | 3c31a40d12d8f41f22535e8b6980f5fd2e16521c | tulios/kafkajs,tulios/kafkajs,tulios/kafkajs,tulios/kafkajs | src/protocol/requests/fetch/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Map } from 'immutable';\n\nimport {\n START_LINE,\n END_LINE\n} from './../client/app/canvas/canvasActions';\n\nexport const initialBoard = Map({\n isDrawing: false\n});\n\nconst boardReducer = (state = initialBoard, action)... | javascript | edit | 0 | 4 | bsd-3-clause | 03f5c68dcd1383138f090a0de110a466433364c9 | jackrzhang/boardsession,jackrzhang/boardsession | src/state/boardReducer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n$(function () {\n \n 'use strict';\n \n var fixture = $('#qunit-fixture');\n \n QUnit.module('indeterminable.js');\n \n});\n\n```\n\nApply this change: Add unit tests for indeterminable.js"
},
{
"role": "a... | javascript | edit | 0 | 1 | mit | 0dff6f924d0ef1523af00fce019f4669c49d147a | renaatdemuynck/form-extensions.js,renaatdemuynck/form-extensions.js | tests/indeterminable-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport markdown from './markdown.stories.mdx';\n\nexport default {\n title: 'Addons|Docs/mdx-in-story',\n};\n\n// This renders the contents of the docs panel into story content\nexport const typography = () ... | javascript | edit | 0 | 1 | mit | f3af2786fa45d59aff352f1555ecb21debb076bd | storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook,kadirahq/react-storybook | examples/official-storybook/stories/addon-docs/mdx.stories.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwindow.diamondash = function() {\n return {\n };\n}.call(this);\n\n```\n\nApply this change: Add a global diamondash config"
},
{
"role": "assistant",
"content": "window.diamondash = function() {\n var DiamondashConfigMod... | javascript | edit | 0 | 1 | bsd-3-clause | 5abf046dea598affa6087809b4c78b3809bb7179 | praekelt/diamondash,praekelt/diamondash,praekelt/diamondash | diamondash/client/js/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs'),\n words = require('./data/profanities.json');\n\nfs.writeFileSync('Supported-profanities.md',\n 'Supported Profanities\\n' +\n '=================\\n' +\n '\\n' +\n\n words.map(function (word) {\n ... | javascript | edit | 0 | 1 | mit | 4fe3803b525ae3f7e4f70ee2b25ff1144f3bb80a | wooorm/profanities | build-supported-words.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Departure = require('./Components/Departure');\n\nvar url = 'http://bybussen.api.tmn.io/';\n\nvar get = function (path, callback) {\n return fetch(url + path, {\n method: 'GET',\n headers: { 'Content-Type': 'application/json'... | javascript | edit | 0 | 2 | bsd-2-clause | 19337f05cd257dfdf094ce46788228d139ae70db | tmn/FuseBus | js/Api.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst pino = require('pino')\nconst serializers = require('./serializers.js')\n\nfunction createLogger (shardID) {\n return pino({\n base: {\n shardID: String(shardID)\n },\n prettyPrint: {\n translateTime: 'yyyy-mm-... | javascript | edit | 0 | 1 | mit | 3297012b746f0352298237c78a9d79bd64c31c48 | synzen/Discord.RSS,synzen/Discord.RSS | src/util/logger/create.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(exports) {\n\n // Dependencies -----------------------------------------------------------\n var Class = require('./Class').Class,\n is = require('./is').is;\n\n\n // Implementation ----------------------------... | javascript | edit | 0 | 5 | mit | b890a4a69157e7d8856ce42fdf3de8bfb6b1f0f0 | BonsaiDen/seed-lib | Base.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { Link } from 'react-router-dom';\nimport { Navbar } from 'react-bootstrap';\nimport 'bootstrap/dist/css/bootstrap.css';\nimport './Banner.css';\n\nclass Banner extends Component {\n re... | javascript | edit | 0 | 1 | apache-2.0 | f5ada8d161cbc969bbe65e5e81e3e66068270786 | googleinterns/Pictophone,googleinterns/Pictophone,googleinterns/Pictophone,googleinterns/Pictophone | client/src/Banner.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global $ */\nvar PanelToggler = require(\"../side_pannels/SidePanelToggler\");\n\nvar buttonHandlers = {\n \"bottom_toolbar_contact_list\": function () {\n BottomToolbar.toggleContactList();\n },\n \"bottom_toolbar_fi... | javascript | edit | 0 | 2 | apache-2.0 | 2c573d76ea0543d878e88756035664e388ad4822 | micahflee/jitsi-meet,pstros/jitsi-meet,IpexCloud/jitsi-meet,jitsi/jitsi-meet,jitsi/jitsi-meet,bickelj/jitsi-meet,bgrozev/jitsi-meet,jitsi/jitsi-meet,gpolitis/jitsi-meet,dyweb/jitsi-meet,bgrozev/jitsi-meet,pstros/jitsi-meet,gpolitis/jitsi-meet,luciash/jitsi-meet-bootstrap,gpolitis/jitsi-meet,jitsi/jitsi-meet,jitsi/jitsi... | modules/UI/toolbars/BottomToolbar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n!function () {\n\n var keys\n , timer\n , timeout = 300\n , issueURLs = []\n , issueIndex = ''\n ;\n\n var issues = Array.prototype.slice.call( document.querySelectorAll( '.issue' ) );\n\n fun... | javascript | edit | 0 | 2 | mit | 2ebadec566081c700c5661d2f95ed73efc0965fd | ryanfitzer/eslint.tmbundle | Support/views/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nangular.module('pathwayApp')\n.controller('PathwayController', function ($scope, $http, $stateParams, $cookieStore, $state) {\n $scope.user = $cookieStore.get('pathway_user')\n $http({method: 'GET',\n url: '/ap... | javascript | edit | 0 | 1 | mit | ca424726a9e75236e4ca5cebef21b19550392aff | aattsai/Pathway,aattsai/Pathway,aattsai/Pathway | pipeline/app/assets/javascripts/controllers/PathwayController.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\nvar pick = require('lodash.pick')\nvar url = require('url')\nvar connect = require('pull-ws/client')\n\nmodule.exports = function (params, cb) {\n params = pick(params, 'host', 'port', 'path', 'protocol')\n var address =... | javascript | edit | 0 | 5 | mit | 4e2e42bad294133a69833552988ba1ae9b922d35 | alligator-io/icebreaker-network | lib/ws/connect.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Complete lesson 10 - picker view"
},
{
"role": "assistant",
"content": "function PickerView() {\n\tvar self = Ti.UI.createWindow({});\n\t\n\t// create the picker\n\tvar picker = Ti.UI.createPicker({});\n\tself.add(picker);\n\... | javascript | new_file | 0 | 5 | apache-2.0 | 197b011092044d6d101b9df4ff437191369da6c1 | kosticus/TitaniumTutorial_RecipeApp | Resources/ui/PickerView.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n(function () {\n var app = angular.module('dailyMummApp',\n ['ngCookies',\n 'ngResource',\n 'ngSanitize',\n 'ui.router',\n 'angular-rating',\n 'pascalprec... | javascript | edit | 0 | 2 | mit | 18458780c0bc9d4f72f939e9cc5845b46d8638f1 | MedhatDawoud/dailymumm,MedhatDawoud/dailymumm,MedhatDawoud/dailymumm | client/app/app.module.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport md from 'components/md'\n\nconst Refs = () => md`\n ## Refs\n\n Passing a \\`ref\\` prop to a styled component will give you an instance of\n the \\`StyledComponent\\` wrapper, but not to the underlying DOM node.\n This is du... | javascript | edit | 0 | 1 | mit | b97c1f18bb81f2bf21800b92a98786416a792920 | styled-components/styled-components-website,styled-components/styled-components-website | sections/advanced/refs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nimport React, { Component } from 'react';\nimport {\n View,\n ListView,\n Text,\n} from 'react-native';\n\nimport globalStyles from '../config/globalStyles';\nimport { SearchBar, List, ListItem } from 'react-native-e... | javascript | edit | 0 | 1 | mit | d43c0c19998075676b09e6fb55b33d9f262d86fa | besing/frischeApp | app/scenes/CustomerSearch.js | rejected_duplicate | Near-duplicate of sample 93062 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nMeteorCamera.getPicture = function (options, callback) {\n // if options are not passed\n if (! callback) {\n callback = options;\n options = {};\n }\n\n var success = function (data) {\n callback(null, \"data:image/jpeg;ba... | javascript | edit | 0 | 5 | mit | 5bf27f657db99d4196a41eaba4ac00d4faf6fae3 | samcorcos/mobile-packages,ChromaPDX/camera,sasikanth513/mobile-packages,mattsinnock/mobile-packages,mikkelking/mobile-packages,parlaywithme/mobile-packages,parlaywithme/mobile-packages,samcorcos/mobile-packages,SeanOceanHu/mobile-packages,wflieller/mobile-packages,ChromaPDX/camera,SeanOceanHu/mobile-packages,wflieller/... | packages/mdg:camera/photo-cordova.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst jwt = require('jsonwebtoken')\nconst config = require('config')\nconst CurrentUser = require('./../../services/current-user')\nconst Messages = require('./../../messages')\n\nconst isBypassed = (req) => {\n const ... | javascript | edit | 0 | 4 | mit | b88e6b3cbbf1299ce3b67cc82de72c5e0f246fa2 | lucasrcdias/customer-mgmt | middlewares/authentication/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n// Starting date\nglobal.startedAt = Date.now();\n\n/**\n * Instantiate and expose a Strapi singleton\n * (maintains legacy support).\n */\n\nmodule.exports = function(global) {\n try {\n return global.strapi = requ... | javascript | edit | 0 | 2 | mit | 889a9ccc2affd43dc47d6d956b16c66d2852a1d4 | wistityhq/strapi,wistityhq/strapi | packages/strapi/lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react'\nimport Block from './Block'\n\nclass EmbedBlock extends Component {\n\n static propTypes = {\n data: PropTypes.shape({\n url: PropTypes.string,\n service: PropTypes.stri... | javascript | edit | 0 | 2 | mit | 47970abbecc31cc8db81f66dfcc7d121bc6103d7 | ello/webapp,ello/webapp,ello/webapp | src/components/editor/EmbedBlock.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { testAsync } from './testHelpers'\nimport setupTestApp from './setupTestApp'\n\ntestAsync('Add Reference: TODO do serious stuff here', async (t) => {\n let { app } = await setupTestApp(t)\n let articlePanel = app.find('.sc-art... | javascript | edit | 0 | 1 | mit | 678b6f0b0284ce482fe5eb4fd9f7ee00b7ef2857 | substance/texture,substance/texture | test/AddReference.test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar fs = require('fs');\nvar expect = require('chai').expect;\nvar bitmapReader = require('../lib/bitmapReader');\n\ndescribe('bitmapReader', function() {\n before(function() {\n // remove ./img/newbmp.bmp if it exi... | javascript | edit | 0 | 2 | mit | 1571ce1a73730727156615a7db99a94f51d585f0 | rorysterley/bit-transformer | test/bitmapReader_test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexports.config = {\n user: process.env.BROWSERSTACK_USER,\n key: process.env.BROWSERSTACK_KEY,\n specs: [\n './webdriver-tests/*Spec.js'\n ],\n capabilities: [\n {\n browserName: 'chrome',\n ... | javascript | edit | 0 | 0 | mit | 032dea00078f6725ad653adc5f694b55b2b5dc50 | alisd23/d3fc-d3v4,alisd23/d3fc-d3v4,djmiley/d3fc,djmiley/d3fc,alisd23/d3fc-d3v4,djmiley/d3fc | webdriver-tests/wdio.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nfunction DropdownCtrl($scope, $http, Data, pubsub) {\n $scope.data = Data;\n $scope.pubsub = pubsub;\n $scope.indices = [];\n $scope.types = [];\n\n $scope.pubsub.subscribe('HOST_CHANGED', function(newHost){\n $sco... | javascript | edit | 0 | 5 | apache-2.0 | 76fca8c71a3a319d264840ba89a7897ff414179b | AlphaStaxLLC/elasticsearch-inquisitor,AlphaStaxLLC/elasticsearch-inquisitor,polyfractal/elasticsearch-inquisitor,polyfractal/elasticsearch-inquisitor | _site/js/controllers/DropdownCtrl.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nconst keyCodeToEventMap = {\n 27: 'esc',\n 37: 'leftArrow',\n 38: 'upArrow',\n 39: 'rightArrow',\n 40: 'downArrow'\n};\n\nexport default Ember.Mixin.create({\n mergedProperties: ['keyEvents'],\n keyE... | javascript | edit | 0 | 2 | mit | 1c39ab7f00a103e19936bc77b2f2919d23bbd399 | alphasights/ember-cli-paint,alphasights/ember-cli-paint | addon/mixins/key-events.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst { TerminalReporter } = require('jasmine-tagged')\n\nclass JasmineListReporter extends TerminalReporter {\n fullDescription (spec) {\n let fullDescription = spec.description\n let currentSuite = spec.suite\n while (curren... | javascript | edit | 0 | 3 | mit | d8559d37a2e943c6efd1d907b21a97362da71341 | PKRoma/atom,PKRoma/atom,Mokolea/atom,brettle/atom,PKRoma/atom,brettle/atom,Mokolea/atom,atom/atom,Mokolea/atom,atom/atom,brettle/atom,atom/atom | spec/jasmine-list-reporter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar autocompleter = {\n look_up: function(value) {\n if(value == \"\") {\n this.clear_popup();\n }\n else {\n var self = this;\n $.ajax(\"/autocomplete\", {\n data: { \"query\":value }\n }).done(func... | javascript | edit | 0 | 3 | mit | 327cd1f31cc467f165e3b65f12079dc4fbceab38 | jamestpalmer1979/autopickle,james-we7/autopickle,jtq/autopickle,jamestpalmer1979/autopickle,jamestpalmer1979/autopickle,james-we7/autopickle,james-we7/autopickle,jtq/autopickle,jtq/autopickle | public/autocompleter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n 'backbone', 'moment',\n 'connect/models/Story'\n], function(Backbone, moment, Story) {\n\n 'use strict';\n\n var Stories = Backbone.Collection.extend({\n model: Story,\n\n //url: window.gfw.config.GFW_API_HOST_V2 + ... | javascript | edit | 0 | 4 | mit | b3f755ca8f006259b174ab2b56c91bb6500b1039 | Vizzuality/gfw,Vizzuality/gfw | app/assets/javascripts/connect/collections/Stories.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mongoose = require( \"mongoose\" );\n\nvar Schema = mongoose.Schema;\n\n\nvar TransitStopSchema = Schema ( {\n system: String,\n name: String,\n latitude: Number,\n longitude: Number,\n route_id: String,\n route_na... | javascript | edit | 0 | 1 | mit | 4a8559eba9bed8e97e06196a2e16be1bc87bcffb | projectweekend/Transit-Stop-API | api/transit-stop/models.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * @ngdoc filter\n * @name dockstore.ui.filter:PreviewFilter\n * @function\n * @description\n * # PreviewFilter\n * Filter in the dockstore.ui.\n */\nangular.module('dockstore.ui')\n .filter('PreviewFilter', [func... | javascript | edit | 0 | 3 | apache-2.0 | ebc40123a9db29f8c0b7f8a06c2516a0b955533d | ga4gh/dockstore-ui,ga4gh/dockstore-ui,ga4gh/dockstore-ui | app/scripts/filters/previewfilter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport AppConfig from 'scripts/config';\n\nexport default class User extends Backbone.Model {\n constructor(...args) {\n this.urlRoot = `${AppConfig.apiPath}/users`;\n\n this.validation = {\n username: {\n required: (... | javascript | edit | 0 | 2 | mit | 7475abcfd0be3d29aac8f9c01974184ec716f830 | fs/backbone-base,fs/backbone-base,fs/backbone-base | app/scripts/models/user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Copyright 2015 Studentmediene i Trondheim AS\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 ... | javascript | edit | 0 | 1 | apache-2.0 | 6252cf46250be056c05e3950b132a13c5d94a7bb | Studentmediene/Barteguiden,Studentmediene/Barteguiden | app/scripts/services/eventservice.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport Pollard from './Pollard';\nimport { createStore, combineReducers } from 'redux';\nimport { Provider } from 'react-redux';\nimport * as reducers from '../reducers';\n\nconst reducer = com... | javascript | edit | 0 | 1 | mit | 50cb30791ed163153a5c3f3921614989a4d231d5 | spencerliechty/pollard,spencerliechty/pollard,spncrlkt/pollard,spncrlkt/pollard,spencerliechty/pollard,spncrlkt/pollard,freeformpdx/pollard,freeformpdx/pollard,freeformpdx/pollard | containers/App.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst logger = require('logger');\nconst mailService = require('services/mailService');\n\nconst DEFAULT_TEMPLATE = 'forest-change-notification';\nconst TEMPLATE_MAP = {\n 'viirs-active-fires': 'forest-fires-notification-viirs',\n ... | javascript | edit | 0 | 2 | mit | ae535872b193df77458114798d8df92c1d9da48e | gfw-api/gfw-subscription-api,gfw-api/gfw-subscription-api,gfw-api/gfw-subscription-api | app/src/publishers/emailPublisher.js | rejected_duplicate | Near-duplicate of sample 95163 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\nimport type { Store } from 'redux'\nimport type { RoutesMap } from '../flow-types'\n\nexport default (routesMap: RoutesMap, selectLocationState: Function) => ({\n dispatch,\n getState\n}: Store<*, *>): Promise<any> => {\n c... | javascript | edit | null | null | mit | 4f89a1d86b8c967a2c838c9f1f7f3b2d8b2b65fe | faceyspacey/redux-first-router | src/pure-utils/createThunk.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {CHANGE_FORM, SET_AUTH, SENDING_REQUEST} from '../actions/constants'\n\nlet assign = Object.assign\n\nlet initialState = {\n formState: {\n username: '',\n password: ''\n },\n currentlySending: false,\n loggedIn: false\... | javascript | edit | 0 | 4 | mit | 1677e9dd0d5cbdb796d1439b86e2575ced1edd99 | seannives/solid-react-login,sotojuan/saga-login-flow,seannives/solid-react-login,sotojuan/saga-login-flow | app/reducers/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar dbm = require('db-migrate');\nvar type = dbm.dataType;\n\nexports.up = function(db, callback) {\n db.createTable('external_transactions', { \n\t\tid: { type: 'int', primaryKey: true, autoIncrement: true },\n deposit: { type: 'bo... | javascript | edit | 0 | 1 | isc | 4636aba49ee1da7018459a5d35948af1f5d6c48a | crazyquark/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd,xdv/gatewayd,zealord/gatewayd,xdv/gatewayd,zealord/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd,crazyquark/gatewayd | db/migrations/20131216232955-external-transactions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nMeteor.startup(function () {\n var scoreInterval = getSetting(\"scoreUpdateInterval\") || 30;\n if(scoreInterval>0){\n\n // active items get updated every N seconds\n intervalId=Meteor.setInterval(function () {\n var upda... | javascript | edit | 0 | 3 | mit | eca25a30be399961a88a72d14dffd4e3e3a9cb13 | IanWhalen/Telescope | server/scoring.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport showdown from \"showdown\"\n\nmodule.exports = {\n getShowdownConverter: (mediaPath) => {\n return new showdown.Converter({\n extensions: [\n (converter) => [\n {\n type : \"lang\",\n ... | javascript | edit | 0 | 5 | mit | b074898cba22215a25a79dbc61ebbaae9f846688 | doryphores/down-quark,doryphores/down-quark | src/utils/markdown_converter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path')\nconst nodeExternals = require('webpack-node-externals')\nconst TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin')\n\nconst ROOT = path.join(__dirname, '/../../')\n\nconst config = {\n mode: pro... | javascript | edit | 0 | 0 | mit | 11ecc5c95a8ed41c898b71407bf1cfb4c18af0e5 | crowi/crowi,crowi/crowi,crowi/crowi | webpack/server/webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst mirror = require('./mirror'),\n functions = require('firebase-functions');\n\nmodule.exports = { mirror: functions.https.onRequest(mirror.app) };\n\n```\n\nApply this change: Set maxInstances to 10, timeout to ... | javascript | edit | 0 | 0 | mit | 9e880b5c97fa8ae2525dd996125be650ed033ec8 | eexit/mirror-http-server | functions/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar nconf = require('./config/nconf.js');\nvar fs = require('fs');\nvar https = require('https');\n\nvar adapter = require(nconf.get('RIPPLE_DATAMODEL_ADAPTER'));\nvar GatewayExpress = require(nconf.ge... | javascript | edit | 0 | 1 | isc | d8be77764fbc0e6cc06086604c1c1434058ad70e | crazyquark/gatewayd,Parkjeahwan/awegeeks,Parkjeahwan/awegeeks,crazyquark/gatewayd,whotooktwarden/gatewayd,whotooktwarden/gatewayd,xdv/gatewayd,zealord/gatewayd,xdv/gatewayd,zealord/gatewayd | server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport {\n Animated,\n StyleSheet,\n View,\n Dimensions,\n TouchableHighlight\n} from 'react-native';\n\nconst DEFAULT_ANIMATE_TIME = 300;\nconst styles = StyleSheet.create({\n fullOverlay: {\n ... | javascript | edit | 0 | 3 | mit | 398aa738c8d3fc7de4f43f1c158dc3866313b1c2 | EstebanFuentealba/react-native-share,EstebanFuentealba/react-native-share,EstebanFuentealba/react-native-share,EstebanFuentealba/react-native-share | components/Overlay.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\nvar child = require(\"child_process\");\nvar http = require(\"http\");\nvar os = require(\"os\");\nvar url = require(\"url\");\n\nvar irc = require(\"../library/irc.js\");\nvar settings = require(\"../settings.js\")... | javascript | edit | 0 | 2 | mit | 4a90ffa4f1a0ef938a3c5310bdf6e7b9f2afcffe | screeps-irc/irc-bot | scripts/bootstrap.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar PermissionConstructor = require('./PermissionConstructor').PermissionConstructor;\n\nfunction WebService(currentUser, dependencies) {\n\tthis.currentUser = currentUser;\n\tthis.dependencies = dependencies;\n}\n\nWebService.prototype... | javascript | edit | 0 | 2 | mit | 70e133e14eb76c31dbc4b5bcbb69b1958cc1c021 | rootsher/server-side-portal-framework | Architecture/WebService.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\n/**\n * Creates and returns a JavaScript array containing WebGL compatible colors\n * from a grayscale palette, enough to cover every 3 vertices.\n * @param {faces} total number of vertices divided by 6.\n * @return {... | javascript | edit | 0 | 4 | bsd-2-clause | b7a742385ad87f118a9dc5ff513229fb5af99a09 | wsdhart/webgl,wsdhart/webgl | common/color_utils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (socket) {\n socket.on('connect', function () {\n console.log('Socket: connect');\n });\n socket.on('connect_error', function () {\n console.log('Socket: connect_error');\n });\n socket.on('connect_t... | javascript | edit | 0 | 1 | mit | 1eb01f32d59ae643968ad14a752412372da02e74 | axelpale/tresdb,axelpale/tresdb | client/connection/socket/messages.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nimport timeFormatter from './../../utils/timeformatter';\n\nconst style = {\n\n container: {\n position: 'absolute',\n left: '0',\n bottom: '0',\n width: '100%'\n },\n\n ... | javascript | edit | 0 | 1 | mit | 9cb80ca85cd5f2ab92d6f6ebb3f9a0edc4a297bf | bastuijnman/carpi,bastuijnman/carpi,bastuijnman/carpi | src/js/ui/app/components/music/scrubbar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar fs = require('fs');\nvar express = require('express');\nvar app = express();\nvar multer = require('multer');\nvar path = require('path');\nvar upload = multer... | javascript | edit | 0 | 2 | mit | 6da90ec12f0c29ac2d247f2bfec401408af08563 | SupportClass/lfg-sounds,SupportClass/lfg-sounds | extension/uploads.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nimport placeToEat from \"../domain/placeToEat\";\n\n// First implementation always return the same in memory hardcoded place :)\nfunction selectAPlaceToEat() {\n return () => placeToEat({ id: 123, name: \"My House\... | javascript | edit | 0 | 1 | mit | 6c359d5e269508ccd1ed93c6c11209c35b186db8 | pbouzakis/hexy-ex | node_modules/application/actions/selectAPlaceToEat.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* HTML utilities */\ndefine(function () {\n function parseDocument(html) {\n /*\n var parser = new DOMParser();\n return parser.parseFromString(html, 'text/html');\n */\n var doc = document.impleme... | javascript | edit | 0 | 2 | mit | 056790e2f661dbcc6ae9906e8c8d3430026d11cc | sprat/nany,sprat/nany | src/utils/html.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or a... | javascript | edit | 0 | 0 | mit | bcfd32cd79017bf9925ab861eccd7e9908647d55 | btrax/watson_news,btrax/watson_news,btrax/watson_news | app/assets/javascripts/application.js | rejected_duplicate | Near-duplicate of sample 71086 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n // setup html editor\n var imgUploadHtml = $('#html-editor-image-upload-tab').html();\n var handler;\n\n if (imgUploadHtml) {\n var options = {\n \"html\": true,\n customTemplates: {\n... | javascript | edit | 0 | 2 | mit | 866d4ef1ddc75a0b11ed6862561ca1a4c1f63c9d | nusedutech/coursemology.org,nnamon/coursemology.org,dariusf/coursemology.org,allenwq/coursemology.org,Coursemology/coursemology.org,allenwq/coursemology.org,dariusf/coursemology.org,dariusf/coursemology.org,nusedutech/coursemology.org,nnamon/coursemology.org,Coursemology/coursemology.org,allenwq/coursemology.org,nusedu... | app/assets/javascripts/html_editor.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport manifest from '../../../package.json';\nimport debug from 'debug';\nimport path from 'path';\nimport app from 'app';\n\nexport function debugLogger(filename) {\n const name = path.basename(filename, '.js');\n const namespace = ... | javascript | edit | 0 | 2 | mit | 2efd2de9d848535a1483168a4ee925f318cfbff8 | Aluxian/Facebook-Messenger-Desktop,Aluxian/Facebook-Messenger-Desktop,Aluxian/Messenger-for-Desktop,rafael-neri/whatsapp-webapp,Hadisaeed/test-build,Hadisaeed/test-build,rafael-neri/whatsapp-webapp,Aluxian/Messenger-for-Desktop,Hadisaeed/test-build,Aluxian/Facebook-Messenger-Desktop,Aluxian/Messenger-for-Desktop,rafael... | src/scripts/browser/utils/logger.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport _ from 'lodash';\n\nconst IfPermission = props =>\n (_.get(props, ['currentPerms', props.perm]) ? props.children : null);\n\nexport default IfPermission;\n\n```\n\nApply this change: Use stripes-core v0.3.0 API for permissions."... | javascript | edit | 0 | 2 | apache-2.0 | 4f6112e614df26df32647ac1042c60df50aa646d | folio-org/stripes-components,folio-org/stripes-components | lib/IfPermission/IfPermission.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport reducer from \"./reducers\";\nimport { getEqfData } from \"./selectors\";\ndescribe(\"getEqfData\", () => {\n it(\"can extract EQF data from the current state\", () => {\n const state = reducer();\n //state = reducer(state... | javascript | edit | 0 | 1 | mit | de1a3a5693238a8b4cfdd319522c7690ecdfbbe5 | captbaritone/winamp2-js,captbaritone/winamp2-js,captbaritone/winamp2-js | js/selectors.test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// This code is to implement the tabs on the home page\n\n// navigate to the selected tab or the first tab\nfunction tabNavigation(e) {\n var activeTab = $('[href=\"' + location.hash + '\"]');\n if (activeTab.length) {\n ac... | javascript | edit | 0 | 4 | apache-2.0 | 4026a9f5338fb71f1a92839e4f3cc70d1255f59e | samvera/hyrax,samvera/hyrax,samvera/hyrax,samvera/hyrax | app/assets/javascripts/hyrax/tabs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default {\n // Get an array specifying the tools included in the current step.\n getStepTools: state => {\n if (state.steps && state.steps[state.activeStep].tools) {\n return state.steps[state.activeStep].tools\n } e... | javascript | edit | 0 | 3 | mit | a57ad591e6c25a501c984db543116ada39ec57ea | alanaberdeen/AIDA,alanaberdeen/annotate,alanaberdeen/AIDA,alanaberdeen/annotate | src/store/modules/editor/getters.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// global_config.js\n\nvar Parse = require('parse/node').Parse,\n PromiseRouter = require('./PromiseRouter');\n\nvar router = new PromiseRouter();\n\nfunction getGlobalConfig(req) {\n return req.config.database.rawCollection('_Globa... | javascript | edit | 0 | 3 | bsd-3-clause | 930573bb4768f0cdf48c166c4acffa3ed487c5a5 | rendongsc/parse-server,PinssibleLabs/parse-server,montymxb/parse-server,montymxb/parse-server,codegefluester/parse-server,wellhealthinc/parse-server,alanphoon/parse-server-ap,aneeshd16/parse-server,rendongsc/parse-server,Isaack90/parse-server,radu-geronimo/parse-server1,seejayuu/parse-server,seejayuu/parse-server,Isaac... | src/global_config.js | rejected_duplicate | Near-duplicate of sample 96714 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.