conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Remove unnecessary caching of StyleGuideView class\n" }, { "from": "human", "value": "StyleguideView = null\nstyleguideUri = 'atom://styleguide'\n\ncreateStyleguideView = (state) ->\n StyleguideView ?= require './styleguide-view'\n new StyleguideView(state)\n\nato...
coffeescript
chosen
[ { "from": "system", "value": "Fix music entry previews not being visible" }, { "from": "human", "value": "###*\n* Copyright 2015 ppy Pty. Ltd.\n*\n* This file is part of osu!web. osu!web is distributed with the hope of\n* attracting more community contributions to the core ecosystem of ...
coffeescript
chosen
[ { "from": "system", "value": "Fix fallback when header is missing\n" }, { "from": "human", "value": "Q = require 'q'\n_ = require 'underscore'\n\nmodule.exports =\n fetchUntilEndInParallel: (options = {}) ->\n dfd = Q.defer()\n\n { success, error } = options # Pull out original success an...
coffeescript
chosen
[ { "from": "system", "value": "Allow changing environment from browser" }, { "from": "human", "value": "DEFAULT_ENV = '_cam'\n\nAPI_HOSTS =\n production: '' # Same domain!\n staging: 'https://panoptes-staging.zooniverse.org'\n development: 'http://localhost:3000'\n test: 'http://localhost:735...
coffeescript
chosen
[ { "from": "system", "value": "Fix necessary key for looped items\n" }, { "from": "human", "value": "MaterialLink = React.createClass\n render: ->\n link = @props.link\n return `(\n <div style={{float: 'right'}}><a href={link.url} className={'button'} target={link.target}>{link.text}<...
coffeescript
chosen
[ { "from": "system", "value": ":penguin: Use correct email address for deb package.\n" }, { "from": "human", "value": "fs = require 'fs'\npath = require 'path'\n_ = require 'underscore-plus'\n\nfillTemplate = (filePath, data) ->\n template = _.template(String(fs.readFileSync(filePath + '.in')))\...
coffeescript
chosen
[ { "from": "system", "value": "Set DataCollector's primary key as set by Pancakes' services.\n" }, { "from": "human", "value": "adapter = if window.location.search.lastIndexOf('fixture') != -1\n DS.FixtureAdapter.extend\n latency: 250\n else\n DS.RESTAd...
coffeescript
chosen
[ { "from": "system", "value": "Update to coffeescript for select all and individual select interactivity\n" }, { "from": "human", "value": "$(document).ready ->\n $('#index-table').on 'change', '#select-all', ->\n if $(this).is(':checked')\n $('#index-table').find('.print-survey').prop '...
coffeescript
chosen
[ { "from": "system", "value": "Add spec for copying version\n" }, { "from": "human", "value": "About = require '../lib/about'\n\ndescribe \"About\", ->\n workspaceElement = null\n\n beforeEach ->\n workspaceElement = atom.views.getView(atom.workspace)\n\n waitsForPromise ->\n atom.pa...
coffeescript
chosen
[ { "from": "system", "value": "Remove extraneous - from variant." }, { "from": "human", "value": "React = require 'react'\n\n{ Classes } = require 'shiny'\n\nmodule.exports = React.createClass\n displayName: '_Title'\n\n propTypes:\n title : React.PropTypes.oneOfType([React.PropTyp...
coffeescript
chosen
[ { "from": "system", "value": "Check for user id on feed redirect\n" }, { "from": "human", "value": "_ = require 'underscore'\nsd = require('sharify').data\nExploreBlocks = require '../../collections/explore_blocks'\n\n@index = (req, res, next) ->\n return next() unless req.user\n \n res.locals...
coffeescript
chosen
[ { "from": "system", "value": "Fix sortie free slot check\n" }, { "from": "human", "value": "window.addEventListener 'game.response', \n ({detail: {path, body}}) ->\n if path == '/kcsapi/api_get_member/mapinfo'\n basic = getStore 'info.basic'\n if config.get 'poi.mapStartCheck.ship....
coffeescript
chosen
[ { "from": "system", "value": "Rename isMemberOfCourse to just getCourse\n" }, { "from": "human", "value": "_ = require 'underscore'\nReact = require 'react'\nEventEmitter2 = require 'eventemitter2'\nCourse = require '../course/model'\napi = require '../api'\n\nBLANK_USER =\n is_admin: false\n ...
coffeescript
chosen
[ { "from": "system", "value": "Simplify guarding in address-selection watch\n" }, { "from": "human", "value": "Sprangular.directive 'addressSelection', ->\n restrict: 'E'\n templateUrl: 'addresses/selection.html'\n scope:\n address: '='\n addresses: '='\n countries: '='\n disabled:...
coffeescript
chosen
[ { "from": "system", "value": "Add a snippet that references an external script\n\nSometimes you just don't want to inline...\n" }, { "from": "human", "value": "\".text.html\":\n \"polymer element\":\n \"prefix\": \"pe\"\n \"body\": \"\"\"\n <link rel=\"import\" href=\"${1:../bower_comp...
coffeescript
chosen
[ { "from": "system", "value": ":fire: Remove deprecations from Atom exports\n" }, { "from": "human", "value": "TextBuffer = require 'text-buffer'\n{Point, Range} = TextBuffer\n{File, Directory} = require 'pathwatcher'\n{Emitter, Disposable, CompositeDisposable} = require 'event-kit'\n{includeDepr...
coffeescript
chosen
[ { "from": "system", "value": "Add error handling in BufferToCanvas\n" }, { "from": "human", "value": "noflo = require 'noflo'\nCanvas = require('noflo-canvas').canvas\n\n# @runtime noflo-nodejs\n# @name BufferToCanvas\n\nexports.getComponent = ->\n c = new noflo.Component\n\n c.icon = 'expand'...
coffeescript
chosen
[ { "from": "system", "value": "Use object to dedupe languages\n" }, { "from": "human", "value": "{Emitter} = require 'event-kit'\n{KeyboardLayoutObserver} = require '../build/Release/keyboard-layout-observer.node'\n\nemitter = new Emitter\nobserver = new KeyboardLayoutObserver -> emitter.emit 'di...
coffeescript
chosen
[ { "from": "system", "value": "Store less cache in ~/.atom/compile-cache\n" }, { "from": "human", "value": "path = require 'path'\nos = require 'os'\nLessCache = require 'less-cache'\n{Subscriber} = require 'emissary'\n\ntmpDir = if process.platform is 'win32' then os.tmpdir() else '/tmp'\n\n# {L...
coffeescript
chosen
[ { "from": "system", "value": "Add iconfont to list of tools\n" }, { "from": "human", "value": "_ = require 'underscore'\nBackbone = require 'backbone'\nBackbone.$ = require 'jquery'\nplugin = require 'plugin'\n\nmodule.exports = Backbone.View.extend\n\n template: require './templ...
coffeescript
chosen
[ { "from": "system", "value": "Save point before Boss Fight\n" }, { "from": "human", "value": "_ = require 'underscore-plus'\n{EventEmitter} = require 'events'\n\nmodule.exports =\nclass AutoUpdater\n _.extend @prototype, EventEmitter.prototype\n\n setFeedUrl: ->\n console.log 'setFeedUrl'\n...
coffeescript
chosen
[ { "from": "system", "value": "Fix up the sandbox testing functions.\n" }, { "from": "human", "value": "Aether = require '../aether'\n\ndescribe \"Global Scope Exploit Suite\", ->\n it 'should intercept \"this\"', ->\n code = \"G=100;var globals=(function(){return this;})();return globals.G;\...
coffeescript
chosen
[ { "from": "system", "value": "Set ‘bin’ to main executable in every test file\n" }, { "from": "human", "value": "chai = require 'chai'\nglobal.should = chai.should()\n" }, { "from": "gpt", "value": "path = require 'path'\n\nchai = require 'chai'\nglobal.should = chai.should()\n\nglob...
coffeescript
chosen
[ { "from": "system", "value": "Create helper to auto-undef requirejs modules\n\nUseful if some module needs to be mocked.\n" }, { "from": "human", "value": "allTestFiles = []\nTEST_REGEXP = /(spec|test)\\.js$/i\n\nObject.keys(window.__karma__.files).forEach (file) ->\n allTestFiles.push(file) if...
coffeescript
chosen
[ { "from": "system", "value": "Add watcher and watch manifest.json\n" }, { "from": "human", "value": "lineman = require(process.env[\"LINEMAN_MAIN\"])\n\n# completely ignore Lineman's built-in application config\nconfig =\n pkg: lineman.grunt.file.readJSON(\"package.json\")\n\n appTasks:\n c...
coffeescript
chosen
[ { "from": "system", "value": "Handle error on browserify to keep watching\n" }, { "from": "human", "value": "{full: version} = require './lib/version'\nTARGET = \"eyetribe-#{version}\"\nisDevelopment = version.indexOf 'SNAPSHOT' > 0\n\ngulp = require 'gulp'\nbrowserify = require 'browserify'\nug...
coffeescript
chosen
[ { "from": "system", "value": "Save session explicitly before returning from user refresh\n" }, { "from": "human", "value": "CurrentUser = require '../../models/current_user'\n\nmodule.exports.refresh = (req, res) ->\n return res.redirect(\"/\") unless req.user\n req.user.fetch\n error: res....
coffeescript
chosen
[ { "from": "system", "value": "Make the global radio channel available to the views\n" }, { "from": "human", "value": "$ = require 'jquery'\n_ = require 'underscore'\nMarionette = require 'backbone.marionette'\nrequire './helpers/mixinTemplateHelpers'\nrequire './helpers/handleb...
coffeescript
chosen
[ { "from": "system", "value": "Destroy editors without files after checkout\n" }, { "from": "human", "value": "{$$, SelectListView} = require 'atom'\n\ngit = require '../git'\nStatusView = require './status-view'\n\nmodule.exports =\nclass ListView extends SelectListView\n initialize: (@data) ->...
coffeescript
chosen
[ { "from": "system", "value": "Clean up backbone plugin code\n" }, { "from": "human", "value": "el = @elvis\n\nclass Binding\n constructor: (@model, @attr, @transform) ->\n\n bindTo: (obj, attr) ->\n @model.on \"change:#{@attr}\", =>\n el.setAttr(obj, attr, @getValue())\n\n getValue: -...
coffeescript
chosen
[ { "from": "system", "value": "Save action for new user\n" }, { "from": "human", "value": "App.UsersNewController = Em.Controller.extend\n needs: [\"application\"]\n validRoles: [\"admin\", \"member\"]\n" }, { "from": "gpt", "value": "App.UsersNewController = Em.Controller.extend\n ...
coffeescript
chosen
[ { "from": "system", "value": "Switch servers to use the heroku beta\n" }, { "from": "human", "value": "\nservers = {\n official: 'sync.nitrotasks.com:443'\n local: 'localhost:8080'\n heroku: 'nitro-server.herokuapp.com'\n custom: '192.168.0.100:8080'\n}\n\n# Set active server\nactive ...
coffeescript
chosen
[ { "from": "system", "value": ":bug: Fix error raised when expanding the number of cursors\n" }, { "from": "human", "value": "{View} = require 'atom-space-pen-views'\n{CompositeDisposable} = require 'event-kit'\n\nmodule.exports =\nclass MinimapSelectionView extends View\n decorations: []\n @co...
coffeescript
chosen
[ { "from": "system", "value": "PrivateMessage: Add settings button to Private message list item\n" }, { "from": "human", "value": "class PrivateMessageListItemView extends ActivityListItemView\n\n constructor: (options = {}, data) ->\n\n options.cssClass = KD.utils.curry 'privatemes...
coffeescript
chosen
[ { "from": "system", "value": "Fix parsing markdown at first\n" }, { "from": "human", "value": "# Place all the behaviors and hooks related to the matching controller here.\n# All this logic will automatically be available in application.js.\n# You can use CoffeeScript in this file: http://coffee...
coffeescript
chosen
[ { "from": "system", "value": "Add ability to make Liobot emote\n" }, { "from": "human", "value": "# Description:\n# Liona is just so awesome\n#\n# Commands:\n# hubot <3\n\nwhitelist = require '../support/whitelist'\n\nmodule.exports = (robot) ->\n robot.respond /say to ([a-zA-Z-_\\#]+) (.*)...
coffeescript
chosen
[ { "from": "system", "value": "Use the `ember-data` initializer as a target instead of the soon to be deprecated `store` initializer" }, { "from": "human", "value": "`import Ember from 'ember'`\n`import DS from 'ember-data'`\n`import { findAll, findById, findByQuery } from '../extensions/finders'...
coffeescript
chosen
[ { "from": "system", "value": "Adjust fixture to match current generated content\n" }, { "from": "human", "value": "class AppyApp.Screens.ReadySetGo extends AppyApp.Screens.Base\n\n render: ->\n <div className=\"fancy-header\">\n <h1>Hello bright shiny world</h1>\n ...
coffeescript
chosen
[ { "from": "system", "value": "Add workflow ID to tutorial subject" }, { "from": "human", "value": "Subject = require 'zooniverse/models/subject'\n\nmodule.exports = ->\n new Subject\n location: standard: './subjects/standard/514092d13ae74064ba00000e.jpg'\n coords: [0, 0]\n metadata: tu...
coffeescript
chosen
[ { "from": "system", "value": "Throw on type error during CLI run\n" }, { "from": "human", "value": "fs = require 'fs'\npath = require 'path'\nhelpers = require './helpers'\ncompiler = require './compiler'\n\nexports.compileModule = compile = (source, options) ->\n result = compiler.compileModul...
coffeescript
chosen
[ { "from": "system", "value": "Remove unneeded tools from the toolbar\n" }, { "from": "human", "value": "\nwindow.Tahi = {}\nTahi.papers =\n init: ->\n $('#add_author').on 'click', (e) ->\n e.preventDefault()\n $('<li class=\"author\">').appendTo $('ul.authors')\n\n$(document).ready...
coffeescript
chosen
[ { "from": "system", "value": "Use class instead of instanceof to check if the active view is an editor\n\nThis supports the ReactEditorView in addition to the legacy EditorView." }, { "from": "human", "value": "_ = require 'underscore-plus'\n{EditorView, View} = require 'atom'\nMarkerView = requ...
coffeescript
chosen
[ { "from": "system", "value": "Use just `process.env.USERPROFILE` to determine a user's home folder on Windows\n\nRemoved reference to %HOMEPATH%, because it doesn't contain a drive\nspec. (e.g., it contains only \\Users\\Jdoe rather than C:\\Users\\Jdoe),\nwhereas %USERPROFILE% does include the drive spec.,...
coffeescript
chosen
[ { "from": "system", "value": "Remove TDS 7.1 from supported versions\n" }, { "from": "human", "value": "\nexports.versions =\n '7_1': 0x71000001\n '7_2': 0x72090002\n '7_3_A': 0x730A0003\n '7_3_B': 0x730B0003\n '7_4': 0x74000004\n\nexports.versionsByValue = {}\nfor name, value of exports.ve...
coffeescript
chosen
[ { "from": "system", "value": "Replace the use of this with\n" }, { "from": "human", "value": "angular.module('admin.orderCycles').controller 'AdminOrderCycleIncomingCtrl', ($scope, $controller, $location, Enterprise, OrderCycle, ocInstance) ->\n $controller('AdminOrderCycleExchangesCtrl', {$sco...
coffeescript
chosen
[ { "from": "system", "value": ":art: Fix typo in csv config class name\n" }, { "from": "human", "value": "_ = require 'underscore-plus'\n\nmodule.exports =\nclass CSVEditor\n constructor: (@config={}) ->\n\n get: (path, config) ->\n if config? then @config[path]?[config] else @config[path]\n...
coffeescript
chosen
[ { "from": "system", "value": "Call done() in leveled async test\n" }, { "from": "human", "value": "assert = require 'assert'\nleveldb = require '../lib'\n\n\n\n\n\ndescribe 'db', ->\n db = new leveldb.DB\n path = \"#{__dirname}/../tmp/db-test-file\"\n key = \"Hello\"\n value = \"World\"\n\n...
coffeescript
chosen
[ { "from": "system", "value": "Use a link with target=_blank for account profile\n" }, { "from": "human", "value": "React = require 'react'\nBS = require 'react-bootstrap'\nRouter = require 'react-router'\n{CurrentUserStore} = require '../../flux/current-user'\n{TransitionAssistant} = require '.....
coffeescript
chosen
[ { "from": "system", "value": "Remove automatic Daniel Webster achievement\n\nLooks like test code accidentally left in" }, { "from": "human", "value": "# Description:\n# None\n#\n# Dependencies:\n# None\n#\n# Configuration:\n# None\n#\n# Commands:\n# hubot achievement get <achievement> [...
coffeescript
chosen
[ { "from": "system", "value": "Fix deleted post triggering new post notification\n" }, { "from": "human", "value": "class TentStatus.FetchPool extends TentStatus.Paginator\n constructor: (@collection, @options = {}) ->\n super\n @sinceId = @options.sinceId\n\n paramsForOffsetAndLimit: (si...
coffeescript
chosen
[ { "from": "system", "value": "Fix adapter code to handle unresolved services, errors\n" }, { "from": "human", "value": "should = require 'should'\nrestler = require 'restler'\n\nsetup = require './setup'\n\n\ndescribe 'with no services or routes wired up', () ->\n beforeEach (done) ->\n {@ap...
coffeescript
chosen
[ { "from": "system", "value": "Add support for ctrl key\n" }, { "from": "human", "value": "angular.module('loomioApp').directive 'lmoHref', ($window, $router, LmoUrlService) ->\n restrict: 'A'\n scope:\n path: '@lmoHref'\n model: '=lmoHrefModel'\n link: (scope, elem, attrs) ->\n route...
coffeescript
chosen
[ { "from": "system", "value": "Adjust font size of editor\n" }, { "from": "human", "value": "\"*\":\n autosave:\n enabled: true\n core:\n audioBeep: false\n closeDeletedFileTabs: true\n excludeVcsIgnoredPaths: false\n packagesWithKeymapsDisabled: []\n telemetryConsent: \"limit...
coffeescript
chosen
[ { "from": "system", "value": "Update preview pane url and emit location changed event.\n" }, { "from": "human", "value": "class IDE.PreviewPane extends IDE.Pane\n\n constructor: (options = {}, data) ->\n\n options.cssClass = KD.utils.curry 'preview-pane', options.cssClass\n options.paneTy...
coffeescript
chosen
[ { "from": "system", "value": "Add event parameter to popover close button click\n" }, { "from": "human", "value": "$(document).on 'ready page:load', ->\n \n $(\"a.popover\").click (event) ->\n event.preventDefault()\n popover_src = $(this).children(\"img\").attr(\"data-src\")\n popove...
coffeescript
chosen
[ { "from": "system", "value": "Remove console log and wrap in document start\n" }, { "from": "human", "value": "$(\".js-bucket-list\").sortable({\n connectWith: \".js-bucket-list\"\n update: (event, ui) ->\n if this == ui.item.parent()[0]\n window.target = $(event.target)\n buck...
coffeescript
chosen
[ { "from": "system", "value": "Fix follow on show page\n" }, { "from": "human", "value": "CurrentUser = require '../../../../models/current_user.coffee'\n{ Following, FollowButton } = require '../../../../components/follow_button/index.coffee'\n\nmodule.exports = (artists) ->\n user = CurrentUse...
coffeescript
chosen
[ { "from": "system", "value": "Order matters on arrays, unfortunately\n" }, { "from": "human", "value": "describe 'acceptance', ->\n Given -> @subject = require '../lib/kindly'\n\n context 'sync', ->\n When -> @files = @subject.get('test/fixtures')\n Then -> expect(@files).to.deep.equal\n...
coffeescript
chosen
[ { "from": "system", "value": "Make /try hit the new endpoint.\n" }, { "from": "human", "value": "runEvaluation = ->\n $('#result').text(\"Loading...\")\n $.ajax {\n \"url\": \"/jsontest\",\n \"type\": \"POST\",\n \"data\": JSON.stringify({\n \"language\": $('#eval-language').val(...
coffeescript
chosen
[ { "from": "system", "value": "WIP: Implement decorator pattern for student dashboard.\n" }, { "from": "human", "value": "#= require almond\n\nwindow.ttm ||= {}\n\nttm.ClassMixer = (klass)->\n klass.build = ->\n it = new klass\n it.initialize && it.initialize.apply(it, arguments)\n it\n...
coffeescript
chosen
[ { "from": "system", "value": "Add points command to command list.\n" }, { "from": "human", "value": "# A collection of common, simple text response\n# commands that don’t require data from elsewhere\n#\n# Command(s):\n# hubot schedule — Return the current stream schedule\n# hubot social ...
coffeescript
chosen
[ { "from": "system", "value": "Improve warning message when loading notebooks\n" }, { "from": "human", "value": "Flow.Browser = (_) ->\n _docs = signals []\n\n _sortedDocs = lift _docs, (docs) ->\n sortBy docs, (doc) -> -doc.date().getTime()\n\n _hasDocs = lift _docs, (docs) -> docs.length ...
coffeescript
chosen
[ { "from": "system", "value": "Add helper method to goto a course by name\n" }, { "from": "human", "value": "selenium = require 'selenium-webdriver'\n{TestHelper} = require './test-element'\n\n\nCOMMON_ELEMENTS =\n courseLink: (appearance, isCoach = false) ->\n dataAttr = 'data-appearance'\n\...
coffeescript
chosen
[ { "from": "system", "value": "Use request helper in ThemeConverter class\n" }, { "from": "human", "value": "path = require 'path'\nurl = require 'url'\nrequest = require 'request'\nfs = require './fs'\nTextMateTheme = require './text-mate-theme'\n\n# Convert a TextMate theme to an Atom theme\nmo...
coffeescript
chosen
[ { "from": "system", "value": "Load atom://assets/ urls from ~/.atom/assets\n" }, { "from": "human", "value": "app = require 'app'\nfs = require 'fs'\npath = require 'path'\nprotocol = require 'protocol'\n\n# Handles requests with 'atom' protocol.\n#\n# It's created by {AtomApplication} upon inst...
coffeescript
chosen
[ { "from": "system", "value": "Disable logging to Sentry in development\n" }, { "from": "human", "value": "Client = require('raven').Client\n\nClient.prototype.captureDocumentError = (req, err) ->\n @captureMessage \"#{req.type}: #{err.details[0].message}\",\n level: 'warning'\n extra: req...
coffeescript
chosen
[ { "from": "system", "value": "Use ATOM_HOME env var in protocol handler\n\nCloses #5501\n" }, { "from": "human", "value": "app = require 'app'\nfs = require 'fs'\npath = require 'path'\nprotocol = require 'protocol'\n\n# Handles requests with 'atom' protocol.\n#\n# It's created by {AtomApplicati...
coffeescript
chosen
[ { "from": "system", "value": "Use getPrediction() instead of predict() during inspection\n" }, { "from": "human", "value": "H2O.PredictOutput = (_, prediction) ->\n { frame, model } = prediction\n\n _predictionTable = _.inspect 'prediction', prediction\n\n inspect = ->\n #XXX get this from...
coffeescript
chosen
[ { "from": "system", "value": "Set Solarized Dark as editor theme and One Dark as UI theme\n" }, { "from": "human", "value": "\"*\":\n Zen:\n softWrap: false\n width: 160\n core:\n disabledPackages: [\n \"notebook\"\n \"language-gfm\"\n \"wrap-guide\"\n ]\n telemet...
coffeescript
chosen
[ { "from": "system", "value": "Add findOrCreate and a method for course updates\n" }, { "from": "human", "value": "_ = require 'underscore'\nReact = require 'react'\nEventEmitter2 = require 'eventemitter2'\nCourse = require '../course/model'\napi = require '../api'\n\nBLANK_USER =\n is_admin: fa...
coffeescript
chosen
[ { "from": "system", "value": "Disable vm patching by default.\n" }, { "from": "human", "value": "fs = require 'fs'\npath = require 'path'\n\nvm = require './vm'\nwalk = require './walk'\n{debounce, parseArgs} = require './utils'\n\nmodule.exports = parseArgs (basePath, opts, cb) ->\n {relat...
coffeescript
chosen
[ { "from": "system", "value": "FIX: Use function pointer for plagiarism view report\n" }, { "from": "human", "value": "angular.module('doubtfire.projects.states.dashboard.directives.task-dashboard.directives.task-plagiarism-card', [])\n#\n# plagiarism of task information\n#\n.directive('taskPlagi...
coffeescript
chosen
[ { "from": "system", "value": "Allow overlay to be opened multiple times\n" }, { "from": "human", "value": "class @Overlay\n constructor: (selector, options) ->\n @selector = selector\n @options = options\n self = this\n @overlay = $(\"<div class='overlay'></div>\")\n\n $(@selecto...
coffeescript
chosen
[ { "from": "system", "value": "NavigationMachineItem: Update machine label on UI when machine domain updated.\n" }, { "from": "human", "value": "class NavigationMachineItem extends JView\n\n {Running, Stopped} = Machine.State\n\n stateClasses = ''\n stateClasses += \"#{state.toLowerCase()} \"...
coffeescript
chosen
[ { "from": "system", "value": "Hide browser extension button on feed when kennisland\n" }, { "from": "human", "value": "window.ReactFeedSelection = React.createClass\n displayName: 'ReactFeedSelection'\n mixins: [UpdateOnSignInOrOutMixin]\n\n getInitialState: ->\n feedChoice: 'global'\n ...
coffeescript
chosen
[ { "from": "system", "value": "Make archive group work again\n" }, { "from": "human", "value": "angular.module('loomioApp').factory 'GroupRecordsInterface', (BaseRecordsInterface, GroupModel) ->\n class GroupRecordsInterface extends BaseRecordsInterface\n model: GroupModel\n\n fetchByParen...
coffeescript
chosen
[ { "from": "system", "value": "Remove :large suffix to usefully expand on limechat\n" }, { "from": "human", "value": "# Description:\n# 今日も一日頑張るぞい!\n#\n# Commands:\n# hubot zoi - 今日も一日頑張る\n#\n# Author:\n# Uchio KONDO\n\n\nrequest = require 'request'\nuri = 'http://zoi.herokuapp.com/js/s...
coffeescript
chosen
[ { "from": "system", "value": ":bug: Append HTML instead of Text\n" }, { "from": "human", "value": "# Source: https://github.com/lukehoban/atom-ide-flow/blob/master/lib/tooltip-view.coffee\n{$, View} = require 'atom'\n\nmodule.exports = (Main)->\n class TooltipView extends View\n @content: ->...
coffeescript
chosen
[ { "from": "system", "value": "Fix default_callback wrong method names\n" }, { "from": "human", "value": "# Default callbacks for internal storage of received packets\nclass CableNotifications.Store.DefaultCallbacks\n constructor: (@collections) ->\n\n # Callbacks\n ###########################...
coffeescript
chosen
[ { "from": "system", "value": "Remove unused methods from Fold" }, { "from": "human", "value": "Range = require 'range'\nPoint = require 'point'\n\nmodule.exports =\nclass Fold\n @idCounter: 1\n\n renderer: null\n startRow: null\n endRow: null\n\n constructor: (@renderer, @startRow, @endRow)...
coffeescript
chosen
[ { "from": "system", "value": "Add isPastDue method and export methods\n\nI don't think this actually worked before? It didn't export anything\n" }, { "from": "human", "value": "moment = require 'moment'\ntwix = require 'twix'\n_ = require 'underscore'\n\n\ndurations =\n create: (startTime, endT...
coffeescript
chosen
[ { "from": "system", "value": "Set browser to true on Game class when in browser\n" }, { "from": "human", "value": "requirejs.config({\n paths: {\n fabric: [\n 'lib/fabric']\n }\n})\n\ndefine ['game', 'synchronizedtime', 'position', 'lib/fabric'], (Game, SynchronizedTime, Position) -> #...
coffeescript
chosen
[ { "from": "system", "value": "Support get parameters for fragment routing" }, { "from": "human", "value": "\nloadFragment = (locale, university, controller, param, modal) ->\n controller ?= \"\"\n param ?= \"\"\n\n url = \"/#{locale}/#{university}\"\n if controller\n url += \"/#{cont...
coffeescript
chosen
[ { "from": "system", "value": "Make sure selection elements have 0 line height to not offset line height.\n" }, { "from": "human", "value": "{makeElement, defer} = Trix\n\nprototypes =\n cursorTarget:\n makeElement\n tagName: \"span\"\n textContent: Trix.ZERO_WIDTH_SPACE\n data...
coffeescript
chosen
[ { "from": "system", "value": "Use dev.zooniverse.org for local development\n" }, { "from": "human", "value": "define (require, exports, module) ->\n # This object stores generic information about the app\n # that might need to be available globally.\n config = {}\n\n # `set` is a shortcut fo...
coffeescript
chosen
[ { "from": "system", "value": "Add extra line at end of file\n" }, { "from": "human", "value": "# An animation sequence is an array of frames where each frame includes:\n# * A pattern\n# * A duration (ms)\nclass AnimationSequence\n\n # Initializes an animation sequence with a pattern and a durat...
coffeescript
chosen
[ { "from": "system", "value": "Set default data property in schema validation when formatting\n" }, { "from": "human", "value": "JSV = require(\"JSV\").JSV\n\nclass SchemaValidator\n\n constructor: (@schema_manager) ->\n @jsv = JSV.createEnvironment(\"json-schema-draft-03\")\n for schema i...
coffeescript
chosen
[ { "from": "system", "value": "Make updateDocument and readDocument sync\n" }, { "from": "human", "value": "completionDelay = 100\n\nexports.triggerAutocompletion = (editor, moveCursor = true, char = 'f') ->\n if moveCursor\n editor.moveToBottom()\n editor.moveToBeginningOfLine()\n editor...
coffeescript
chosen
[ { "from": "system", "value": "Add keymap for new selection expansion\n" }, { "from": "human", "value": "# Keybindings require three things to be fully defined: A selector that is\n# matched against the focused element, the keystroke and the command to\n# execute.\n#\n# Below is a basic keybindin...
coffeescript
chosen
[ { "from": "system", "value": "Fix errors appearing after long requests\n" }, { "from": "human", "value": "define [\n \"chaplin\"\n \"lib/utils\"\n], (Chaplin, utils) ->\n \"use strict\"\n\n class Model extends Chaplin.Model\n\n urlRoot: utils.bnwUrl \"/api\"\n\n apiCall: (url = @url(),...
coffeescript
chosen
[ { "from": "system", "value": "Improve how params and routes are looked up\n" }, { "from": "human", "value": "express = require 'express'\nstylus = require 'stylus'\nassets = require 'connect-assets'\n\napp = express.createServer()\napp.use assets()\napp.set 'view engine', 'jade'\n\napp.get '/', ...
coffeescript
chosen
[ { "from": "system", "value": "Remove deprecated User.create{} method call\n" }, { "from": "human", "value": "angular.module('gi.security').controller 'usersController'\n, ['$scope', '$location', 'User', 'Auth'\n, ($scope, $location, User, Auth) ->\n\n $scope.newUser = User.create()\n $scope.cu...
coffeescript
chosen
[ { "from": "system", "value": "Send back the original time entry\n" }, { "from": "human", "value": "crypto = require 'crypto'\n_ = require 'underscore'\n\nSingleton = require 'singleton'\nRiak = require \"#{__dirname}/../db/riak\"\nTimeEntry = require \"#{__dirname}/../models/time_entry\"\n\nclas...
coffeescript
chosen
[ { "from": "system", "value": "Remove flamsteed from secure pages\n" }, { "from": "human", "value": "require ['jquery', 'lib/core/base', 'flamsteed', 'lib/utils/scroll_perf', 'polyfills/function_bind', 'trackjs'], ($, Base, _FS, ScrollPerf) ->\n $ ->\n base = new Base()\n new ScrollPerf\n ...
coffeescript
chosen
[ { "from": "system", "value": "Add reset company image behavior for Startups.coffee\n" }, { "from": "human", "value": "$ ->\n $body = $('body')\n bodyClass = $body.attr 'class'\n routes = ['startups-new', 'startups-edit']\n\n if bodyClass in ['startups-new', 'startups-edit']\n ...
coffeescript
chosen
[ { "from": "system", "value": "Include templates in column.coffee deps.\n" }, { "from": "human", "value": "define [\n '../../core'\n 'tpl!templates/views/columns.html'\n 'plugins/jquery-ui'\n], (c, templates...) ->\n \n" }, { "from": "gpt", "value": "define [\n '../../c...
coffeescript
chosen
[ { "from": "system", "value": "Add on click event only once to each toggle element.\n" }, { "from": "human", "value": "root = exports ? this\n\nclass DateChooser\n\n constructor: (chooser) ->\n @chooser = chooser\n selectors = chooser.find(\".date-chooser-select\") # Today/Tomorrow selecti...
coffeescript
chosen
[ { "from": "system", "value": ":new: Add spec for visibility being toggled on tab double click\n" }, { "from": "human", "value": "describe 'Linter Behavior', ->\n linter = null\n linterState = null\n bottomContainer = null\n trigger = (el, name) ->\n event = document.createEvent('HTMLEvent...
coffeescript
chosen
[ { "from": "system", "value": "Add version test for minimap v3\n" }, { "from": "human", "value": "{CompositeDisposable} = require 'event-kit'\n\nclass MinimapHighlightSelected\n constructor: ->\n @subscriptions = new CompositeDisposable\n\n activate: (state) ->\n @highlightSelectedPackage...
coffeescript
chosen
[ { "from": "system", "value": "Add loading view when joining session\n" }, { "from": "human", "value": "require 'atom'\nrequire 'window'\n{createPeer, connectDocument} = require './session-utils'\n{createSite, Document} = require 'telepath'\n\nwindow.setDimensions(x: 0, y: 0, width: 800, height: ...
coffeescript
chosen