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\n// local imports\nimport addPerformanceModeHandlers from './addPerformanceModeHandlers'\n\n/**\n * Creates a store enhancer based off an (optional) throttle time.\n * @arg {object} [options={calculateInitialState}] - Options object.\n *... | javascript | edit | 0 | 3 | mit | 2e86a446b68c2cd66fcd15a394e68623d20d0384 | AlecAivazis/redux-responsive,AlecAivazis/redux-responsive,AlecAivazis/redux-responsive | src/util/createResponsiveStoreEnhancer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function PhraseMappingServiceModule() {\n\t\"use strict\";\n\t\n\tangular.module('translate.app')\n\t\t.factory('phraseMappingService', PhraseMappingService);\n\t\n\tPhraseMappingService.$inject = ['configService'];\n\t\n\tfunction Phr... | javascript | edit | 0 | 3 | mit | 07e79b7213abb185b0f6d9c852b0646e67e523ba | stellarashes/japtem-translate,stellarashes/japtem-translate,stellarashes/japtem-translate | angular/services/phrase-mapping-service.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// CHANGELOG check\nif (_.includes(git.modified_files, \"CHANGELOG.md\") === false) {\n fail(\"No CHANGELOG added.\")\n}\n\nconst test_files = _.filter(git.modified_files, function(path){\n return _.includes(path, '__tests__/');\n})\n... | javascript | edit | 0 | 1 | mit | bc5d8fbb0345247acf0378ece06aa9f63795625e | artsy/emission,artsy/emission,artsy/eigen,artsy/emission,artsy/emission,artsy/eigen,artsy/eigen,artsy/emission,artsy/emission,artsy/emission,artsy/eigen,artsy/eigen,artsy/eigen,artsy/eigen | Dangerfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst webpack = require('webpack');\nconst path = require('path');\n\nmodule.exports = {\n entry: './src/index.js',\n devtool: 'source-map',\n output: {\n path: path.join(__dirname, 'dist'),\n filename: 'sync-client.min.js',\n ... | javascript | edit | 0 | 0 | mit | b5ec95018cf533092171da469fc9285996688fb9 | nponiros/sync_client | webpack.prod.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar $soloModal = null // Used when allowMultiple = false.\n\n// The public API.\nModal = {\n\t\n\tallowMultiple: false,\n\t\n\tshow: function(templateName, data){\n\t\t\n\t\tif($soloModal == null || this.allowMultiple){\n\t\t\t\n\t\t\tv... | javascript | edit | 0 | 3 | mit | 6fd757967d575674127c799e43c9b8fb66997c7d | Opstarts/bootstrap-3-modal,Opstarts/bootstrap-3-modal | main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @file Node env\n * @author treelite(<EMAIL>)\n */\n\nvar extend = require('saber-lang').extend;\nvar configMgr = require('./lib/config');\n\n/**\n * 全局配置\n *\n * @param {Object} options 配置信息\n * @param {string|Array.<string>=} o... | javascript | edit | 0 | 4 | mit | c72cf59ff64e7efdb8c325e379a04f0c2f888f49 | ecomfe/saber-mm,ecomfe/saber-mm | main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * The Publishable Behaviour class\n *\n * @constructor\n * @extends alchemy.classes.Behaviour\n *\n * @author Jelle De Loecker <<EMAIL>>\n * @since 0.1.0\n * @version 0.1.0\n */\nBehaviour.extend(funct... | javascript | edit | 0 | 5 | mit | 9bc125d86fa08de154f1beee873913d333f6d56c | skerit/alchemy,skerit/alchemy | lib/app/behaviour/publishable_behaviour.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// ES1 - 8: Unary + Operator\n// To do: make all tests pass, leave the assert lines unchanged!\n// Follow the hints of the failure messages!\n\ndescribe('Unary \"+\" operator', () => {\n it('converts its operand to the Number type', ()... | javascript | edit | 0 | 1 | mit | dc31bb7bbf8913bac113b6bf19f608a31deadaad | tddbin/katas,tddbin/katas,tddbin/katas | katas/es1/language/unary-operators/plus.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'proptypes';\nimport graphql from 'graphql';\nimport Link from '../components/Link';\n\nclass TagRoute extends React.Component {\n static propTypes = {\n data: PropTypes.object,\n ... | javascript | edit | 0 | 1 | mit | 2399226db8515dacf0e284641ab5d5fea104c79a | angeloocana/angeloocana,angeloocana/angeloocana | src/templates/tag-page.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar sys = require(\"sys\"), \n utils = require(\"utils\");\n\nvar Events = require(\"./events\");\n\nvar SuperClass = require(\"superclass\");\nChannel = module.exports = new SuperClass;\n\nChannel.extend({\n channels: {},\n \n fi... | javascript | edit | 0 | 3 | mit | 733f2c5384b3ebb6e1179f853f445458a35423dc | strideapp/juggernaut,maccman/juggernaut,strideapp/juggernaut,STRd6/juggernaut,civicevolution/juggernaut,maccman/juggernaut,civicevolution/juggernaut,STRd6/juggernaut,mediweb/juggernaut,civicevolution/juggernaut-OLD,strideapp/juggernaut,strideapp/juggernaut,civicevolution/juggernaut-OLD,mediweb/juggernaut,mediweb/jugger... | lib/juggernaut/channel.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { includePaths, excludePaths } from '../config/utils';\n\nexport default options => ({\n test: /\\.(mjs|jsx?)$/,\n use: [\n {\n loader: 'babel-loader',\n options,\n },\n ],\n include: includePaths,\n exclude:... | javascript | edit | 0 | 1 | mit | e92a82e8e0aee713eae2349efa55fe26c02763cb | storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/react-storybook,storybooks/react-storybook | lib/core/src/server/common/babel-loader.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { StatsD } from 'node-dogstatsd'\nvar dogstatsd = new StatsD()\n\nfunction registerEvents (bot) {\n bot.on('messageCreate', (msg) => {\n dogstatsd.increment('blair.messages_total')\n if (msg.command) {\n dogstatsd.inc... | javascript | edit | 0 | 2 | mit | 4d60584b2e3e561cf03386d62c29f7915bf69035 | germanoeich/blair-bot,germanoeich/blair-bot | src/metrics.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright 2015 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n// Flags: --allow-natives-syntax --cache=code\n\ntry { } catch(e... | javascript | edit | null | null | mit | 541aa57718ecdd0ff192e89e76c5140cd2ad2a5d | UniversalFuture/moosh,UniversalFuture/moosh,UniversalFuture/moosh,UniversalFuture/moosh | test/mjsunit/regress/regress-crbug-507070.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst {\n app,\n BrowserWindow,\n ipcMain\n} = require('electron')\nconst { platform } = require('os')\nconst { join } = require('path')\n\nlet win\napp.on('ready', () => {\n win = new BrowserWindow({\n width:800,\n height... | javascript | edit | 0 | 2 | mit | 4f1123877cdad26b26899dfff50e9102114b6e56 | vterm/vterm,vterm/vterm | main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport { connect } from \"react-redux\";\nimport { push } from \"connected-react-router\";\nimport { routerLocationHasState } from \"../../utils/utils\";\nimport { removeSample } from \"../actions\";\nimpor... | javascript | edit | 0 | 1 | mit | 9bcbd163852070a1cdd83b402bb70835b3bb85bf | igboyes/virtool,virtool/virtool,virtool/virtool,igboyes/virtool | client/src/js/samples/components/Remove.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nglobal.$ = global.jQuery = require('jquery');\nglobal._ = require('lodash');\nrequire('bootstrap');\n\nrequire('pui-prismjs');\n\nrequire('./scale')();\nrequire('@npmcorp/pui-react-back-to-top/jquery-plugin');\nrequire('@npmcorp/pui-css... | javascript | edit | 0 | 0 | mit | 34cacff7dbe3836309df52d6ce8ee226b2d5307b | npm/pivotal-ui,npm/pivotal-ui,npm/pivotal-ui | src/pivotal-ui/javascripts/pivotal-ui.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n \"parserOptions\": {\n \"ecmaVersion\": 6,\n \"sourceType\": \"module\",\n \"ecmaFeatures\": {\n \"experimentalObjectRestSpread\": true,\n },\n },\n\n \"rules\": {\n \"arrow-parens\": \"warn\"... | javascript | edit | 0 | 0 | mit | cc3537bd187624ed0e9efd631fe68da96cf8cb6c | interfirm/eslint-config-interfirm | common.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Config from '../config/environment';\n\nexport function initialize(instance) {\n if (Config.mixpanel.enabled) {\n var router = instance.lookup('router:main');\n router.on('didTransition', function() {\n instance.looku... | javascript | edit | 0 | 3 | mit | 536569c661d1178992ae6c23226c2be338302308 | sportly/ember-cli-mixpanel-service,sportly/ember-cli-mixpanel-service,fastly/ember-cli-mixpanel-service,fastly/ember-cli-mixpanel-service | app/instance-initializers/mixpanel.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar express = require('express');\nvar api = require('./modules/projectController.js');\nvar errorHandler = require('./modules/errorHandler.js');\nvar mongoose = require('mongoose');\n\nmongoose.connect(process.env.MO... | javascript | edit | 0 | 2 | apache-2.0 | 3ca62f212c06bbbd05ddc9639918cc6f9d4d8b52 | with-regard/regard-website | api/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default chart => {\n if (chart.responsive) {\n\n const {\n width,\n height\n } = chart\n\n // preserve original values\n chart._originWidth = width\n chart._originHeight = height\n\n // setup height c... | javascript | edit | 0 | 4 | mit | 8a5b6ceb0f732cb4685b36d341ab6a5ce9ceb274 | simonwoerpel/d3-playbooks,simonwoerpel/d3-playbooks,simonwoerpel/d3-playbooks | src/lib/responsive/setup_responsiveness.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPebble.addEventListener(\"ready\",\n function(e) {\n console.log(\"Hello world! - Sent from your javascript application.\");\n }\n);\n\n```\n\nApply this change: Add a functionnal Ajax module"
},
{
"role": "assistan... | javascript | edit | 0 | 3 | mit | 9e162df80cff3d0e8c05303f0c226111283800f0 | hwhelchel/sat_alert,hwhelchel/sat_alert,hwhelchel/sat_alert,hwhelchel/sat_alert,hwhelchel/sat_alert | src/js/pebble-js-app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Extract all the necessary\n * configuration information\n * from either command line arguments\n * (which take priority) or environment\n * variables. Non-specified information\n * should prevent the application from starting,\n... | javascript | edit | 0 | 0 | mit | 49f38f0acee0fe7043fe53f43fa6a345651d5216 | dataquito/poll-maker,dataquito/poll-maker | config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Base gradeName for handlebars \"helper\" modules, which can be used on both the client and server side handlebars stacks.\nvar fluid = fluid || require('infusion');\nvar gpii = fluid.registerNamespace(\"gpii\");\nfluid.registerNames... | javascript | edit | 0 | 1 | bsd-3-clause | 38126d0ad33ef4ecd4b8d57f2d8d239deb5fc1aa | GPII/gpii-handlebars,the-t-in-rtf/gpii-handlebars,the-t-in-rtf/gpii-handlebars,GPII/gpii-handlebars | src/js/common/helper.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwindow.addEventListener('keydown', function(e) {\n let audio = document.querySelector(`audio[data-key='${e.keyCode}']`)\n\tlet key = document.querySelector(`.key[data-key='${e.keyCode}']`)\n\tif (!audio) return\n audio.currentTime = 0... | javascript | edit | 0 | 2 | mit | 2608d6eb43912628f362bfaeab871cd0878a449e | stivaliserna/scripts,stivaliserna/scripts | javascript30/01-drum-kit/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global describe it */\n'use strict'\n\nconst chai = require('chai')\nconst chaiAsPromised = require('chai-as-promised')\nconst requireInject = require('require-inject')\nconst sinon = require('sinon')\nconst sinonChai = require('sino... | javascript | edit | 0 | 1 | isc | 0c3b87928536c1d47901e477fb232a79585e7514 | jcollado/multitest | test/travis.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nprocess.title = 'test-server';\n\nvar fs = require('fs');\nvar hapi = require('hapi');\nvar inert = require('inert');\n\nvar root = fs.readFileSync(__dirname + '/layout_partials/root.hbt').toString();\n\nvar server = new hapi.Server()... | javascript | edit | 0 | 1 | mit | 64b74709e06119583e6a956f23f147ae2bfff4e7 | Densaugeo/TriDIYBio,Densaugeo/TriDIYBio | test_server.js | rejected_duplicate | Near-duplicate of sample 73569 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('myApp.register',['ngRoute', 'firebase'])\n\n//Declare route\n.config(['$routeProvider', function($routeProvider){\n\t$routeProvider.when('/register', {\n\t\ttemplateUrl: 'register/register.html',\n\t\tco... | javascript | edit | 0 | 4 | mit | 2954ab22d021d63922889f3b739f12280f82853a | kmaheshwari24/Implementing-Sign-In-Functionality-with-Firebase-w-o-Simple-login,kmaheshwari24/Implementing-Sign-In-Functionality-with-Firebase-w-o-Simple-login | app/register/register.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport TestUtils from 'react-addons-test-utils';\nimport expect from 'unexpected';\n\nimport CardComponent from './CardComponent';\n\nconst shallowRenderer ... | javascript | edit | 0 | 1 | mit | 9baf468d75c8eda1097546cf9c137b120ef8174f | akikoo/systemjs-jspm-boilerplate,akikoo/systemjs-jspm-sass-setup,akikoo/systemjs-jspm-boilerplate,akikoo/systemjs-jspm-sass-setup | app/CardComponentTest.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// An infinite computer must be able to do the following things:\n// 1. getTotalScrollableHeight()\n// 2. getDisplayIndexStart()\n// 3. getDisplayIndexEnd()\n\nclass InfiniteComputer {\n constructor(heightData, numberOfChildren) {\n... | javascript | edit | 0 | 1 | bsd-3-clause | 7b135d2a51e410a451daa9016f7a536cccc45f6f | herojobs/react-infinite,beni55/react-infinite,ahutchings/react-infinite,pierregoutheraud/react-infinite,nishp1/react-infinite,shopping-adventure/react-infinite,NordicSemiconductor/react-infinite,amplii/react-infinite,zachwooddoughty/react-infinite,NordicSemiconductor/react-infinite,cesarandreu/react-infinite,zachwooddo... | src/computers/infinite_computer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/// <reference types=\"cypress\" />\n\ncontext('Actions', () => {\n beforeEach(() => {\n cy.visit('http://localhost:8000')\n })\n\n it('All + elements are clickable', () => {\n cy.get('.step-up').click( { multiple: true } )\n\n... | javascript | edit | 0 | 1 | mit | fc3ff99bee60d0dbcc41a17fa3abe1f763f70edc | CodeForPhilly/chime,CodeForPhilly/chime,CodeForPhilly/chime | e2e/cypress/integration/tests/actions.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as symbols from '../../src/symbols.js';\nimport KeyboardDirectionMixin from '../../src/KeyboardDirectionMixin.js';\n\n\nclass KeyboardDirectionMixinTest extends KeyboardDirectionMixin(HTMLElement) {\n [symbols.goRight]() {\n ... | javascript | edit | 0 | 2 | mit | 3bbe607186cefdc6f925fcb345296f634b95abd1 | robbear/elix,elix/elix,robbear/elix,elix/elix,JanMiksovsky/elix,JanMiksovsky/elix | test/tests/KeyboardDirectionMixin.tests.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar REPLACE_TOKEN = '__LOGGING_NAME__'\n, THIS_MODULE = /(?:[^\\/]+\\/node_modules\\/)?triton\\/buildutils\\/logging-name-loader\\.js$/\n, BASE_PATH = module.filename.replace(THIS_MODULE,'')\n\nmodule.exports = function(source... | javascript | edit | 0 | 2 | apache-2.0 | 9d9cbd75253f3cd017f2dd806ba68823e11c4e1a | szhou8813/react-server,emecell/react-server,redfin/react-server,doug-wade/react-server,davidalber/react-server,emecell/react-server,lidawang/react-server,davidalber/react-server,lidawang/react-server,szhou8813/react-server,doug-wade/react-server,redfin/react-server | buildutils/logging-name-loader.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs');\r\n\r\nif(process.env.EXIT_ON_CHANGES) {\r\n\tconsole.log(\"In development mode, will exit on file changes in cwd\");\r\n\tfs.watch('.', {}, function(ev, filename) {\r\n\t\tif(/\\.js$/.test(filename)) {\r\n\t\t\t... | javascript | edit | 0 | 2 | isc | 3442c27b9a95a99d652cd07a02fcd6ad41332965 | ludios/exit-on-changes | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Disable the Stamp and Line Panels"
},
{
"role": "assistant",
"content": "//export {default as StampPanel} from './stamp-panel.js';\n//export {default as LinePanel} from './line-panel.js';\n"
}
] | javascript | new_file | 0 | 0 | mit | 419ebfd2acbc89d591193963751fd79a3665ccdf | TechNaturally/stamplines,TechNaturally/stamplines | src/panel/panels/_index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\napp.service(\"cardService\", function() {\n this.getCardUrl = function(name) {\n name = this.sanitizeName_(name);\n return \"http://gatherer.wizards.com/Pages/Card/Details.aspx?name=\" + name;\n };\n \n this.getCardImage = fun... | javascript | edit | 0 | 1 | mit | 0cf337b4dafe741c53eadb107e184c972dc68651 | kevinpang/edhrec-site | app/card/card_service.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n* FIXME: Move format-specific stuff out of responder into\n* individual strategies? All the API formats share this\n* strategy for now.\n*/\nvar utils = require('utilities')\n , Strategy = function (content, options, cb) {\n\n ... | javascript | edit | 0 | 6 | apache-2.0 | e0a4b55e029c9fd9d0643a0d8079698cbf9c2e37 | mmis1000/ejs-promise,insidewarehouse/ejs,zensh/ejs,insidewarehouse/ejs,xanxiver/ejs,rpaterson/ejs,operatino/ejs,kolonse/ejs,tyduptyler13/ejs,zensh/ejs,TimothyGu/ejs-tj,kolonse/ejs,TimothyGu/ejs-tj,cnwhy/ejs,cnwhy/ejs,jtsay362/solveforall-ejs2,mde/ejs | lib/controller/responder/strategies/api.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Main process\n'use strict';\nconst path = require('path');\nconst app = require('app');\nconst ipcMain = require('electron').ipcMain;\nconst BrowserWindow = require('browser-window');\n\napp.on('ready', () => {\n\tconst win = new Bro... | javascript | edit | 0 | 1 | mit | 610f9170e73ed647ae69b70b64489df756a74d96 | seriema/electron-notification-shim | test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar through = require('through2');\nvar gutil = require('gulp-util');\nvar ejs = require('ejs');\nvar assign = require('object-assign');\n\nmodule.exports = function (options, settings) {\n options = options || {};\n... | javascript | edit | 0 | 5 | mit | 0ac69f362e548385fb8916314bcc3d1c59f29504 | rogeriopvl/gulp-ejs | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst app = express();\nconst backpat = require('backpat').backpat;\n\napp.use(express.static('./'));\napp.use(express.static('dist'));\n\napp.get('/favicon.ico', (req, res) => {\n res.sendFile(`${_... | javascript | edit | 0 | 1 | mit | 6879eb209e1786f84285cfc48058268b74b0f540 | cachilders/backpat-demo,cachilders/backpat-demo | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar fs = require('fs'),\n path = require('path'),\n url = require('url'),\n templates = require('./templates'),\n Server = require('./server').Server;\n\nServer.new(function (req, res) {\n consol... | javascript | edit | 0 | 5 | mit | d2ff3f4e1672b1bc7e8a8b73326e21d8bd94c83c | lorcanmcdonald/ServerHere | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nvar gutil = require('gulp-util');\nvar through = require('through2');\nvar react = require('react-tools');\n\nmodule.exports = function (name) {\n\treturn through.obj(function (file, enc, cb) {\n\t\tif (file.isNull()) {\n... | javascript | edit | 0 | 4 | mit | 953a71190bc7ac604c0ea08eff002f40f3519f18 | sindresorhus/gulp-react | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet fs = require(\"fs\");\n\nlet data = fs.readFileSync(\"./data\").toString();\n\nlet codeCharacters = 0;\nlet encodedCharacters = 0;\n\ndata.split(\"\\n\").forEach(line => {\n\tcodeCharacters += line.length;\n\n\tconst encodedLine = l... | javascript | edit | 0 | 0 | mit | 00db80a4d99a66f1b98dfc788df4a349402791eb | Mark-Simulacrum/advent-of-code-2015,Mark-Simulacrum/advent-of-code-2015,Mark-Simulacrum/advent-of-code-2015,Mark-Simulacrum/advent-of-code-2015 | day08/solution.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n 'jquery',\n 'backbone',\n 'dust',\n 'dust.marionette',\n 'models/settings-model',\n 'controllers/event-bus',\n 'header-template',\n], function ($, Backbone, dust, dustMarionette, Settings, EventBus) {\n var HeaderView... | javascript | edit | 0 | 1 | mit | d945b274838ce6cd50f2f5ab342d620742fad8d0 | B3ST/B3,B3ST/B3,B3ST/B3 | app/views/header-view.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst duration = require('iso8601-duration');\r\n\r\nclass Video {\r\n constructor(youtube, data) {\r\n this.youtube = youtube;\r\n this.title = data.snippet.title;\r\n this.id = data.id.videoId ? data.id.videoId... | javascript | edit | 0 | 6 | mit | b8749fc34aa87212a18f6a17915c078a7b26ed11 | HyperCoder2975/simple-youtube-api,HyperCoder2975/simple-youtube-api,Hyper-Coder/simple-youtube-api | src/structures/Video.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n\n/* eslint-disable no-console */\n\nimport path from 'path';\nimport inquirer from 'inquirer';\nimport writeDefaultConfig from '../writeDefaultConfig';\nimport { fileExists } from '../util/fs';\nimport { exitError } from '../... | javascript | edit | null | null | apache-2.0 | f8fe295e21d24274b7d0353f4e1cb7bbed93feca | amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon | cli/src/commands/init.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('repicbro', ['repicbro.controllers',\n 'repicbro.services',\n 'repicbro.filters',\n 'ngRoute',\n ... | javascript | edit | 0 | 1 | mit | 227c33e52b16cf27da0abf5e4f9838c0613fc3ef | stinaq/repicbro.com,stinaq/repicbro.com | app/scripts/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by George Ruan on May 22, 2016.\n *\n * Defines the routing behavior for the web application.\n */\n\n(function() {\n 'use strict';\n\n angular\n .module('nobe', ['ngRoute']) // Set up app dependencies\n .config... | javascript | edit | 0 | 1 | mit | 53c073bdcb67f849e858f304c2752970ab84c9db | gruan/NOBEIllinois-Website,gruan/NOBEIllinois-Website | app/scripts/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst jwt = require('jsonwebtoken')\nconst userModel = require('../../models/users')\nconst { buildResponse } = require('../../utils/responseService')\nconst validator = require('./loginValidation')\n\nmodule.exports = (req, res) => {\n... | javascript | edit | 0 | 3 | mit | 778afc6a4ef33a0c4ba046af6cacb29e7ac8668f | byteBridge/transcriptus-api | api/login/loginController.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nvar ESC = 27;\nvar $document = Ember.$(document);\n\nexport default Ember.Component.extend({\n classNames: 'ui-overlay',\n role: 'dialog',\n\n actions: {\n close: function() {\n var compone... | javascript | edit | 0 | 2 | mit | b215297a545818f43e4a2ab98eeff51346c03300 | unspace/ember-banco | app/components/ui-overlay.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n;(function($, win, doc) {\n var $win = $(win);\n var $doc = $(doc);\n\n // Enable CSS active pseudo styles in Mobile Safari\n $doc.on({\n touchstart: function() {}\n });\n})(jQuery, window, document);\n\n```\n\nApply this change... | javascript | edit | 0 | 1 | mit | b06a3b2d15ad2535d8e605587dcd68d9e6c5ca07 | woneob/woneob.github.io,woneob/1upnote,woneob/woneob.github.io,woneob/1upnote,woneob/woneob.github.io,woneob/1upnote | assets/scripts/common.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n\t//initialize code here\n\t\n\tvar update_ranking = function()\n\t{\n\t\t$.get\n\t\t(\n\t\t\t'ajax.php?m=get_ranking',\n\t\t\tfunction( xml )\n\t\t\t{\n\t\t\t\tvar table = $( '<table>' );\n\n\t\t\t\t$( xm... | javascript | edit | 0 | 1 | mit | b626f77a88e29f567e355dce9657cdfe4d1b1012 | wsh32/CTF,wsh32/CTF,wsh32/CTF | js/ctf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport axios from 'axios';\n\n// get top twitch channels\nexport const GET_CHANNELS = 'GET_CHANNELS';\nexport function getChannels() {\n const request = axios.get('https://api.twitch.tv/kraken/streams?api_version=3&limit=25');\n retur... | javascript | edit | 0 | 1 | mit | 2395142f90a66a32da15e43dde6c33c0b3bf1b58 | TerryCapan/twitchBot,TerryCapan/twitchBot,badT/Chatson,badT/twitchBot,dramich/Chatson,badT/Chatson,dramich/Chatson,badT/twitchBot,dramich/twitchBot,dramich/twitchBot | src/actions/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Implement user aware notifications controller"
},
{
"role": "assistant",
"content": "module.exports = {\n\n find: function(req, res) {\n return res.badRequest('List notifications is not supported');\n },\n\n findOne: fu... | javascript | new_file | 0 | 3 | mit | d93584e15b484ac11a8a115f4e38a15207642c06 | TheConnMan/missd,TheConnMan/missd,TheConnMan/missd | api/controllers/NotificationController.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Object.extend({\n posterDefaultSize: 2,\n posterUrl: function() {\n var posterPath = this.get('poster_path');\n var config = this.get('tmdbConfig');\n console.log('config',th... | javascript | edit | 0 | 3 | mit | 1a955f0863e07291108f8e10c4688938988b8de0 | ryanbradynd05/polyflix,ryanbradynd05/polyflix,ryanbradynd05/polyflix,ryanbradynd05/polyflix,ryanbradynd05/polyflix | client/ember/app/models/tmdb-movie.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { inject as service } from '@ember/service';\nimport Component from '@ember/component';\nimport { tracked } from '@glimmer/tracking';\n\nclass Field {\n @tracked name;\n @tracked class;\n}\n\nexport default class ClassFieldDesc... | javascript | edit | 0 | 1 | mit | fd3bf885acc4cc222378fbb9d29b12bf2632eef6 | ember-learn/ember-api-docs,ember-learn/ember-api-docs | app/components/class-field-description.js | rejected_duplicate | Near-duplicate of sample 97019 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst DB = require('./db');\n\nclass Boost extends DB {\n constructor(config) {\n super(config);\n this.model = config.model;\n }\n\n db() {\n return this.model;\n }\n\n data() {\n return this.... | javascript | edit | 0 | 3 | apache-2.0 | 4b9bf6c3549352707835114b6972e37faffb068c | briancw/boostjs-server | store/adapters/boost.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Module dependencies.\n */\nvar mailChimp = require('../../node_modules/mailchimp-api/mailchimp'),\n\tvalidator = require('../../node_modules/email-validator'),\n\tconfig = require('../../config/mc-config.json');... | javascript | edit | 0 | 4 | mit | c338450b727047e5fad3cf38d57ab6eb79b1244e | CodeLily/codelily.education,CodeLily/codelily.education,CodeLily/codelily.education | app/controllers/core.server.controller.js | rejected_duplicate | Near-duplicate of sample 75750 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n angular\n .module('vmsFrontend')\n .controller('CreateProjectController', CreateProjectController);\n\n /** @ngInject */\n function CreateProjectController(\n $log,\n $state,\n $trans... | javascript | edit | 0 | 2 | mit | d201bac7d1dad6e72ee9e9c024c575f08915fcaa | OpenISDM/VMS-frontend,OpenISDM/VMS-frontend,OpenISDM/VMS-frontend | src/app/project/createProject.controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Relay from 'react-relay';\n\nimport OrganizationMemberRoleConstants from '../constants/OrganizationMemberRoleConstants';\n\nexport default class OrganizationInvitationCreate extends Relay.Mutation {\n static fragments = {\n o... | javascript | edit | 0 | 1 | mit | 775cb748148bf5a426b01ab8ae4088f2d2e3fead | buildkite/frontend,fotinakis/buildkite-frontend,fotinakis/buildkite-frontend,buildkite/frontend | app/mutations/OrganizationInvitationCreate.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { Link } from 'react-router-dom';\n\nconst HelpBox = ({showHelp}) => {\n\tif (showHelp) {\n\t\treturn (\n\t\t\t<div className='pt-callout pt-icon-help pt-intent-primary'>\n\t\t\t\tHere you can see an o... | javascript | edit | 0 | 2 | mit | cf5d81b8b9c3d19809534142d98144ffdd4afb1b | bwyap/ptc-amazing-g-race,bwyap/ptc-amazing-g-race | src/client/react/user/views/Home/HelpBox.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nimport Dispatcher from \"../dispatcher\";\nimport Constants from \"../constants\";\nimport StoreCommon from \"./store_common\";\nimport assign from \"object-assign\";\n\nlet _user = {};\n\n// log t... | javascript | edit | 0 | 3 | mit | 67c80611174ee9489116c49fca034bc4b20fee8b | lumenlearning/OpenAssessments,atomicjolt/OpenAssessments,BYU-Open-Analytics/BYUOpenAssessments,BYU-Open-Analytics/BYUOpenAssessments,lumenlearning/OpenAssessments,BYU-Open-Analytics/BYUOpenAssessments,lumenlearning/OpenAssessments,atomicjolt/OpenAssessments,atomicjolt/OpenAssessments,lumenlearning/OpenAssessments,atomi... | client/js/stores/user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nApplication.Controllers.controller('projectsProject',\n [\"$scope\", \"$stateParams\", \"pubsub\", \"$state\",\n \"ProvDrafts\", \"$filter\", \"$rootScope\", \"model.p... | javascript | edit | 0 | 1 | mit | a919bc46ccb31df2a9a13b6f5c6912bc9c0dc591 | 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/project-controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar hostname = window.location.hostname;\nvar wsaddr = \"wss://\".concat(hostname, \":1234/api\");\nconsole.log(\"Connecting to \" + wsaddr);\n\nvar paladinws = new PaladinWebSocket(wsaddr);\n\nvar width = $(document).width();\nvar heig... | javascript | edit | 0 | 1 | mit | 494d70c54baa6cd669ece78c39ac5593a616d0fe | PolarisLaboratories/Paladin,PolarisLaboratories/Paladin,PolarisLaboratories/Paladin | public/javascripts/map.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\nconst yargs = require('yargs');\n\nyargs\n.usage('$0 command')\n.command('all', 'run all bundled commands', yargs => {\n\tconst operations = require('./src');\n\tconsole.log(\"yargs\", yargs)\n\n\tfor (const key of ... | javascript | edit | null | null | mit | 7842f28f4f2209b9a9ccaf8be1b00170109a2fec | Thinkmill/react-native-schemes-manager,Thinkmill/react-native-schemes-manager | index.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar dust = require('dustjs-linkedin');\nvar _ = require('lodash');\n\ndust.compiled = function(template) {\n\treturn this.template(template).compiled;\n};\n\ndust.src = function(template) {\n\treturn this.template(template).src;\n};\n\n... | javascript | edit | 0 | 5 | mit | 761ad5e4aa99b8e41ada1b17089e4ad555084c45 | thecodebureau/epiphany | lib/dust-extensions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(global) {\n 'use strict';\n var app = global.app || {};\n var m = global.m;\n\n var document = global.document;\n\n app.controller = function() {\n var HeaderController = app.HeaderController;\n\n this.headerControl... | javascript | edit | 0 | 2 | mit | b49e4ff0da0789649d257f0e88c88f5457662614 | ionstage/timeline,ionstage/timeline | js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nchrome.runtime.onMessage.addListener( function(request, sender, sendResponse){\r\n var click_event = new Event('click');\r\n\r\n switch(request.action){\r\n case 'NEXT-MK':\r\n //NEXT_MK\r\n document.g... | javascript | edit | 0 | 4 | mit | baf7a9a1f62e1043aa1e135894e8dba443ca3d1f | julianxhokaxhiu/chrome-grooveshark-mediakeys-reloaded | js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar re = /\\]\\]>/g;\n\nexports.name = 'cdata-js';\nexports.outputFormat = 'xml';\n\nexports.render = function (str, options) {\n var escaped = str.replace(re, \"]]]]><![CDATA[>\");\n return '//<![CDATA[\\n' + escaped... | javascript | edit | 0 | 1 | mit | 9d75bc19b081423ac84af4f5dc8256dc4b9b1c76 | jstransformers/jstransformer-cdata-js | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function(){\n $('textarea.yaml').change(function(){\n var yaml = jsyaml.load($(this).val());\n var yaml_flat = JSON.flatten(yaml);\n var gengo = \"\"; // = JSON.stringify(yaml_flat, null, 2);\n for (var key in yaml_flat) ... | javascript | edit | 0 | 2 | isc | 62817fa5fcef52390ec76746e2e377e51ad6dd05 | leighmcculloch/gengo-yaml,leighmcculloch/gengo-yaml,leighmcculloch/gengo-yaml | source/javascripts/_index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst app = require('express')();\nconst Organization = require('../models/Organization');\n\napp.get('/', (req, res) => {\n Organization.find()\n .then(orgs => {\n res.json(orgs);\n });\n});\napp.get('/:id',... | javascript | edit | 0 | 3 | mit | 4650ec3f3e5646b9a6f90fc81740f18c5c29db88 | MrGuiMan/gettingtoknow-graphql | api/organizations.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*jslint node: true */\n\"use strict\";\n\nvar utils = require(\"../utils\");\nvar log = require(\"npmlog\");\n\nmodule.exports = function(mergeWithDefaults, api, ctx) {\n return function deleteMessage(messageOrMessages, callback) {\n ... | javascript | edit | 0 | 6 | mit | 3ec8eb9dd3dd483445a57dd6a9e6e4e6f5b866b4 | tpphu/facebook-chat-api,Karlheinzniebuhr/facebook-chat-api,bbatliner/facebook-chat-api,shabbir-hussain/facebook-chat-api,PaulinePro/facebook-chat-api,noodle-learns-programming/facebook-chat-api,garrylachman/facebook-chat-api,ravkr/facebook-chat-api,Schmavery/facebook-chat-api,ShivanKaul/facebook-chat-api,AdamBurgess/fa... | src/deleteMessage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar rest = require('restler');\n\nmodule.exports = {\n 'gif': function(input, cb) {\n var self = this;\n var query = encodeURIComponent(input.parsed);\n var options = { rejectUnauthorized: false };\n var baseUrl = 'https://... | javascript | edit | 0 | 3 | mit | b161eb392442910a5ab832cb05be2fd047c3af95 | martindale/snarl-gif | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar TurbolinksAdapter = {\n beforeMount: function(){\n document.addEventListener('turbolinks:before-cache', () => {\n this.$destroy();\n });\n\n this.$originalEl = this.$el.outerHTML;\n },\n destroyed: function() {\n ... | javascript | edit | 0 | 1 | mit | 50bd545ce8f5e10ca06f9524a2b82aa3ab0c024f | jeffreyguenther/vue-turbolinks | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar map = null;\n\n$(document).on('pageshow', '#map', function() {\n // draw the map once\n if (map == null) drawMap();\n});\n\nfunction drawMap() {\n $('#map_canvas').css('height', 500);\n\n var latlng = new google.maps.Lat... | javascript | edit | 0 | 2 | mit | a3e51eedd839356a3c506dddd6cff8e7b70d2024 | otknoy/michishiki | js/map.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar peg = require('pegjs');\n\nclass PegJsPlugin {\n\n constructor(config) {\n this.config = config.plugins.pegjs;\n this.config.output = 'source';\n }\n\n compile(file) {\n var parser;\n try {\n par... | javascript | edit | 0 | 3 | mit | 3b0b357fba463ce45af145d5ed624d0534593d77 | caleb531/pegjs-brunch | index.js | rejected_duplicate | Near-duplicate of sample 78713 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('dotenv').config();\nconst express = require('express');\nconst bodyParser = require('body-parser');\nconst cookieParser = require('cookie-parser');\nconst login = require('./login.js');\nconst getPullRequests = require('./getPu... | javascript | edit | 0 | 1 | mit | a80b578d1597ace85cbb0c26bc9435d3f50fd9f4 | kyusu/Amalie,kyusu/Amalie | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function (movieString) {\n\n var baseName = movieString.replace(/\\.(avi|mkv|mpeg|mpg|mov|mp4|m4v)/i, '');\n var movie = baseName.match(/(.*?)(directors(.?)cut|480p|720p|1080p|dvdrip|xvid|cd[0-9]|blur... | javascript | edit | 0 | 3 | mit | 723dae069bfa60993843e361879d383c95d3c023 | danielhusar/movie-title | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PropTypes, PureComponent } from 'react';\nimport { View, Platform, WebView, ActivityIndicator } from 'react-native';\n\nexport default class SVGImage extends PureComponent {\n static propTypes = {\n style: PropTypes.... | javascript | edit | 0 | 2 | mit | a76f68a6ae2b8a8909f745fd4c9f59880894cc37 | chitezh/react-native-svg-image | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\nimport { NARROW_SPACE, WIDE_SPACE, NARROW_BAR, WIDE_BAR } from \"../Core/Characters\"\n\nexport function rect(x: number, height: number, width: number, filled: boolean): string {\n\treturn `<rect x=\"${x}\" y=\"0\" width=\"${w... | javascript | edit | null | null | mit | a562f175358de3c1249cfbeddee288a430bed221 | mormahr/barcode.js,mormahr/barcode.js | src/Renderers/SVGRenderer.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nvar path = require('path');\n\nmodule.exports = {\n name: 'ember-solr',\n\n config: function(environment, appConfig) {\n if (!appConfig.solrBaseURL || appConfig.solrBaseURL.indexOf(':') ===... | javascript | edit | 0 | 5 | mit | 41a4a135d0b3968612e4008342bf7b0b30d375d8 | chriseldredge/ember-solr,chriseldredge/ember-solr | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = EventSender;\n\nfunction EventSender(httpResponse) {\n this.httpResponse = httpResponse;\n this.httpResponse.setHeader('Content-Type', 'text/event-stream');\n}\n\nEventSender.prototype.send = function EventSender_send... | javascript | edit | 0 | 4 | mit | 03551236cced190f76ee7925457edaff6b7feac3 | cGuille/event-sender | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict';\n\nvar\n clipboard = require('copy-paste'),\n request = require('request');\n\nvar\n FAILURE_EXIT = 1,\n SUCCESS_EXIT = 1;\n\nvar options = {\n url: 'http://www.lgtm.in/g',\n method: 'GET',\n ... | javascript | edit | 0 | 2 | isc | 79a6739e370d7ba7fd7d369087c3b63ae16d676a | da0shi/node-lgtm,takayukioda/node-lgtm | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\ndefine([], function(){\n\tvar FocusDirective = function ($parse) {\n\t\t\treturn{\n\t\t\t\tlink : function(scope, element,attrs) {\n\t\t\t\t\tscope.$watch($parse(attrs.focus), function(value) {\n\t\t\t\t\t\tif (value =... | javascript | edit | 0 | 2 | apache-2.0 | 57370cf62bfe747f8cf0476990ae6508bb525ea6 | tssi/app,tssi/app,tssi/app | directives/bootstrap_directive.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar Objectid = mongoose.Schema.Types.ObjectId;\nvar Mixed = mongoose.Schema.Types.Mixed;\n\nvar TagSchema = new Schema({\n\tname: { type: String, unique: ... | javascript | edit | 0 | 1 | mit | ee2a163af26cfa4c14d8617e305f4ff115d265fd | 10layer/jexpress,10layer/jexpress | app/models/tag_model.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\napp.service('TopicService', ['$rootScope', '$firebase', function($rootScope, $firebase) {\n var topicsRef = $firebase(fb.child('topics'));\n\n this.list = function() {\n return topicsRef;\n };\n\n this.add = function(topic) {\n ... | javascript | edit | 0 | 1 | mit | f86060f83b6a08ff484d8345e9a6f7b5b9f27dec | DiUS/pimp-my-retro,DiUS/pimp-my-retro | src/js/angular/services/topics.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\n/**\n * @module components\n * @class sl-pagination-per-page-select\n */\nexport default Ember.Component.extend({\n\n /**\n * Class names for the root element\n *\n * @property {array} classN... | javascript | edit | 0 | 0 | mit | 7e28b57d09428ae711bdd85a64654c51e73c62be | Suven/sl-ember-components,juwara0/sl-ember-components,Suven/sl-ember-components,theoshu/sl-ember-components,alxyuu/sl-ember-components,juwara0/sl-ember-components,azizpunjani/sl-ember-components,jonathandavidson/sl-ember-components,SpikedKira/sl-ember-components,SpikedKira/sl-ember-components,alxyuu/sl-ember-components... | addon/components/sl-pagination-per-page-select.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Imports svg into items with groups\n * Stetson Alpha - Paper.js\n *\n */\n\nvar ImportSVG = function()\n{\n //initialize\n function initialize()\n {\n\n };\n\n /**\n *\n * Takes the svg dom obj and parse... | javascript | edit | null | null | mit | 8659c6b44c1b5247ec0793df742e784d5a409402 | Olegas/paper.js,EskenderDev/paper.js,Olegas/paper.js,JunaidPaul/paper.js,iconexperience/paper.js,luisbrito/paper.js,mcanthony/paper.js,baiyanghese/paper.js,li0t/paper.js,chad-autry/paper.js,JunaidPaul/paper.js,ClaireRutkoske/paper.js,mcanthony/paper.js,fredoche/paper.js,proofme/paper.js,byte-foundry/paper.js,rgordeev/p... | src/svg/ImportSVG.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n Copyright 2015 Leafbird\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\n http://www.apac... | javascript | edit | 0 | 2 | apache-2.0 | 58df695f61c0e6858af8af53ba190b8c0a3caebf | bscherer/leafbird,lucasb/leafbird,bscherer/leafbird,leafbirdjs/leafbird,lucasb/leafbird,leafbirdjs/leafbird | test/spec/leafbird.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path')\n\n// Private: re-join the segments split from an absolute path to form another absolute path.\nfunction absolute (...parts) {\n const candidate = path.join(...parts)\n return path.isAbsolute(candidate) ? ... | javascript | edit | 0 | 5 | mit | c645804bd1da6ca7e00896677d2e38b51621bd43 | atom/watcher,atom/watcher,atom/watcher,atom/watcher,atom/watcher | lib/registry/helper.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*global define*/\ndefine([\n 'underscore',\n 'backbone',\n 'marionette'\n], function (_, Backbone) {\n 'use strict';\n\n var GraphiteModel = Backbone.Model.extend({\n url: function() {\n throw('you need... | javascript | edit | 0 | 1 | mit | 92bcde0f3c6c0ace76060e67942c68d3a00e3d1e | GregMeno/test,SUSE/romana,ceph/romana,GregMeno/test,SUSE/calamari-clients,ceph/romana,SUSE/romana,GregMeno/test,SUSE/romana,SUSE/romana,ceph/calamari-clients,ceph/calamari-clients,SUSE/calamari-clients,SUSE/calamari-clients,ceph/romana,SUSE/romana,SUSE/calamari-clients,ceph/calamari-clients,GregMeno/test,ceph/romana,ce... | dashboard/app/scripts/models/graphite-model.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar RadiodanClient = require('./lib/radiodan-client'),\n MessagingClient = require('./lib/messaging-client');\n\nmodule.exports.create = function (opts) {\n opts = opts || {};\n\n var client = MessagingClient.create(opts);\n retu... | javascript | edit | 0 | 2 | apache-2.0 | 08d6cc2c8b760968e1e2decf80b47f0ab1092d64 | radiodan/radiodan-client.js | main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport $ from 'jquery';\nimport { onMessage, addMessage } from '../messageQueue.js';\nimport { getCurrentScene } from '../currentScene.js';\n\nexport default class {\n constructor() {\n this.$frame = $('#game');\n }\n start() {\n ... | javascript | edit | 0 | 2 | mit | d0e20dd5d9a37f3558358dadbbed71cefd832bbb | TEAMBUTT/LD35 | app/webpack/views/CircleBurgerGameView.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar BaseView = require('views/map-view');\n\nmodule.exports = BaseView.extend({\n gRouteOptions: {\n polylineOptions: {\n strokeColor: '#e6a640'\n }\n },\n initialize: function () {\n this.collec... | javascript | edit | 0 | 1 | apache-2.0 | 9b4b580d68c2fa8708489d0441f3977186efeb85 | forio/route-optimizer,gamaral92/route-optimizer,forio/route-optimizer,gamaral92/route-optimizer | src/scripts/views/map/optimized-map-view.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { UPDATE_SEARCH_PARAMS } from \"../actions\";\n\nconst searchParamsReducer = ( state = {\n reviewed: false,\n quality_grade: \"needs_id\",\n verifiable: true\n}, action ) => {\n if ( action.type === UPDATE_SEARCH_PARAMS ) {\n... | javascript | edit | 0 | 2 | mit | 75170f32a8a2a58078656112eb74ca5ef02a88d1 | pleary/inaturalist,calonso-conabio/inaturalist,inaturalist/inaturalist,calonso-conabio/inaturalist,inaturalist/inaturalist,pleary/inaturalist,inaturalist/inaturalist,calonso-conabio/inaturalist,pleary/inaturalist,pleary/inaturalist,inaturalist/inaturalist,calonso-conabio/inaturalist,calonso-conabio/inaturalist,pleary/i... | app/webpack/observations/identify/reducers/search_params_reducer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Add your blacklisted sites to this array. Subdomain and TLD are optional and flexible.\nvar BLACKLIST = [\n\t'agolo.com',\n\t'youtube',\n\t'twitter.com',\n\t'mail.google'\n];\n\n\n/** Convert the array to an object and export it **/\... | javascript | edit | 0 | 2 | mit | 478f22cc2f4f2fbfd3d0bc58eead40cfe4910429 | premgane/agolo-slackbot | blacklisted-sites.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'dummy',\n environment: environment,\n baseURL: '/',\n locationType: 'auto',\n EmberENV: {\n FEATURES: {\n // ... | javascript | edit | 0 | 4 | mit | 7306680fd4d2f28679104558e04fb0a6da62122d | anilmaurya/ember-inplace-edit,anilmaurya/ember-inplace-edit | tests/dummy/config/environment.js | rejected_duplicate | Near-duplicate of sample 69089 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Terrain from 'react-icons/lib/md/terrain'\nimport SnowFlake from 'react-icons/lib/ti/weather-snow'\nimport Calendar from 'react-icons/lib/fa/calendar'\nimport { SkiDayRow } from './SkiDayRow'\n\nexport const SkiDayList = ({days})... | javascript | edit | 0 | 1 | mit | 5c2caa9b402c9287fd4cb53ebae81ea66e06a89a | shawfire/ReactReduxActivityCounter | src/components/SkiDayList.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar React = require('react');\nvar actions = require('../actions');\nvar { Navigation } = require('react-router');\nvar QueryStore = require('../stores/query_store.js');\n\nvar QueryList = React.createClass({\n mixins: [QueryStore.li... | javascript | edit | 0 | 2 | isc | 8aa76d03d77022e297f1ed925e40229ecf7413be | ernestrc/stickshift,ernestrc/stickshift,tmcw/stickshift,tmcw/stickshift | src/components/query_list.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable no-underscore-dangle */\n\nimport { avoidWarnForRequire } from './utils';\nimport { toggleNetworkInspect } from './networkInspect';\n\nlet availableDevMenuMethods = {};\n\nexport const checkAvailableDevMenuMethods = as... | javascript | edit | 0 | 6 | mit | 69323a05a489948089a3eb8f6962757b0ddcab5c | jhen0409/react-native-debugger,jhen0409/react-native-debugger,jhen0409/react-native-debugger | app/worker/devMenu.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nconst problem47 = require('./problem-0047');\n\ndescribe('consecutiveDistinctPrimeFactors', () => {\n xit('finds first consecutive numbers with distinct prime factors for known input', () => {\n let max = Number.MAX_S... | javascript | edit | 0 | 1 | mit | 4cab78442e5ea88c781ad7ecd5bff1833d306938 | bkaid/puzzles-js,bkaid/puzzles-js | project-euler/problem-0047/problem-0047.spec.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.