conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Check isSuccess before reading suggestion\n"
},
{
"from": "human",
"value": "angular.module \\laweasyread.controllers, []\n.controller \\TypeaheadCtrl, [\n \\$scope, \\Suggestions\n ($scope, Suggestions)->\n $scope.laws = []\n (res) <- Suggestion... | livescript | chosen |
[
{
"from": "system",
"value": "Fix missing 2,3 from liveScript solution\n"
},
{
"from": "human",
"value": "N = process.argv[2] || 1000\nnsqrt = Math.pow N, 0.5\n\nis_prime = []\n\nfor x from 1 to nsqrt\n for y from 1 to nsqrt\n continue if n > N\n n = 4 * (x ^ 2) + (y ^ 2)\n is_prime[n]... | livescript | chosen |
[
{
"from": "system",
"value": "Clear search results layer on search form reset\n"
},
{
"from": "human",
"value": "$, messagebar, mapMembersAPI, mapUserAPI, syncUserLocation, allUsers <-! define <[\n jquery messagebar map/members map/user data/sync data/allUsers domReady!\n]>\n\n# Text shown in t... | livescript | chosen |
[
{
"from": "system",
"value": "Update to new Stencil \"best practices\"\n"
},
{
"from": "human",
"value": "define ->\n\tclass Stencil\n\t\t/*\n\t\t\tConstructor takes a reference to a canvas with an SVG element in {svg} to draw atoms on.\n\t\t\tRequires a `canvas`.\n\t\t*/\n\t\t(@canvas)->\n\t\t\... | livescript | chosen |
[
{
"from": "system",
"value": "Kill child processes before removing temp dir after tests\n"
},
{
"from": "human",
"value": "require! {\n 'end-child-processes'\n 'fs-extra' : fs\n 'glob'\n 'path'\n 'rimraf'\n 'shelljs/global'\n 'tmp'\n 'touch'\n}\n\n\nmodule.exports = ->\n\n @set-default-... | livescript | chosen |
[
{
"from": "system",
"value": "Add ioGenerator test for calc03\n"
},
{
"from": "human",
"value": "require! {\n chai\n 'chai-things'\n mathjs # as reference implementation\n seedrandom\n 'core-js/es5'\n 'core-js/es6'\n '../../stages/factorial'\n}\n\nchai.use chai-things\n\n{expect} = chai\n... | livescript | chosen |
[
{
"from": "system",
"value": "Make timeout of functional test more longer and add console logger\n"
},
{
"from": "human",
"value": "require! {\n nightmare: Nightmare\n chai: {expect}\n 'mocha-logger'\n 'file-url'\n}\n\nIt = global.it\n\ndescribe 'Application' ->\n @retries 5\n\n before ->\... | livescript | chosen |
[
{
"from": "system",
"value": "Fix stupid mistake in test spec that makes tests never succeed."
},
{
"from": "human",
"value": "# http://stackoverflow.com/questions/1979884/how-to-use-javascript-regex-over-multiple-lines\nconst SCRIPT_ELEM_MATCHER = /<script[^>]*>[\\s\\S]*?<\\/script>/gim\nconst ... | livescript | chosen |
[
{
"from": "system",
"value": "Add EXTENSION_ID to app-wide constants.ls\n"
},
{
"from": "human",
"value": "module.exports =\n INACTIVE_ICON_PATH:\n \\19 : 'assets/19-inactive.png'\n \\38 : 'assets/19-inactive@2x.png'\n\n ACTIVE_ICON_PATH:\n \\19 : 'assets/19-active.png'\n \\38 : 'a... | livescript | chosen |
[
{
"from": "system",
"value": "Add test case for invalid user in get-uid-by-name\n"
},
{
"from": "human",
"value": "require!<[fs fs-extra js-yaml path tmp]>\nexpect = require \\chai .expect\n\napp = require \\..\n\ndescribe 'uhunt-api', (,) !->\n\n before !->\n app.logger.init-winston!\... | livescript | chosen |
[
{
"from": "system",
"value": "Add mk-pgrest-fortest to new pgrest instance in test cases.\n"
},
{
"from": "human",
"value": "exports.get_dbcnn = ->\n throw \"environment variable TESTDBNAME is required\" unless process.env.TESTDBNAME\n prefix = if process.env.TESTDBUSERNAME \n then \"#{ pro... | livescript | chosen |
[
{
"from": "system",
"value": "Use location.host for websocket addr\n"
},
{
"from": "human",
"value": "app = window.angular.module \"Hello\", [\"ngResource\"]\n\nng = {}\n\napp.factory \"Users\", ($resource) ->\n /**\n * @type {ng.Resource}\n */\n res = $resource \"/data/:id\"\n\n /**\n ... | livescript | chosen |
[
{
"from": "system",
"value": "Correct structure for the tests.\n"
},
{
"from": "human",
"value": "spec = (require 'hifive')!\n{id, ok, eq} = require '../../utils'\nMaybe = require '../../../src/monads/maybe'\n\nmodule.exports = spec 'Maybe a' (_, spec) ->\n\n spec '{} Maybe' (o) ->\n Just =... | livescript | chosen |
[
{
"from": "system",
"value": "Remove require of unused modules\n"
},
{
"from": "human",
"value": "#------------------------------------------------------------------------------\n# Implements command line interface.\n\nrequire! {\n glob\n commander: program\n 'prelude-ls': {map, flatten, empt... | livescript | chosen |
[
{
"from": "system",
"value": "Update DBAPI address to public server\n"
},
{
"from": "human",
"value": "<- define\n#'http://v3.db.aasg.name'\n'http://localhost:8000'\n"
},
{
"from": "gpt",
"value": "<- define\n'http://v3.db.aasg.name'\n#'http://localhost:8000'\n"
}
] | livescript | chosen |
[
{
"from": "system",
"value": "Fix paths when calling commands\n"
},
{
"from": "human",
"value": "# Returns the arguments for ObservableProcess to call the given command\ncall-args = (command) ->\n | process.platform is 'win32' => ['cmd' '/c' command]\n | otherwise => ['ba... | livescript | chosen |
[
{
"from": "system",
"value": "Create and start broker container on start, and stop and remove on end\n"
},
{
"from": "human",
"value": "require! { process, dockerode: Docker, express, 'body-parser' }\n\ndocker = new Docker!\n\nerr, container <-! docker.create-container Image: \\docker/whalesay C... | livescript | chosen |
[
{
"from": "system",
"value": "Use exa instead of ls if available\n"
},
{
"from": "human",
"value": "# Colors and aliases for ls\n\ncase `ls --version 2>/dev/null` in\n\t(*Free Software Foundation*)\n\t\tcase $TERM in\n\t\t\t(screen*) eval `TERM=screen dircolors -b`;;\n\t\t\t(rxvt*) eval `TERM=rx... | livescript | chosen |
[
{
"from": "system",
"value": "Set the page title to the channel name.\n"
},
{
"from": "human",
"value": "app = angular.module 'recess.controls'\n\napp.controller 'ControlsController', [\n\t'$scope'\n\t'$http'\n\n\t!($scope, $http) ->\n\t\t$scope.addFeed = (url) ->\n\t\t\t$http.post '/api/feed/ad... | livescript | chosen |
[
{
"from": "system",
"value": "Move Board test case to the top of suite and fix\n"
},
{
"from": "human",
"value": "require! {\n chai: {expect}\n '../../lib/board': Board\n '../../lib/block': Block\n}\n\nIt = global.it\n\ndescribe 'Board' ->\n before-each ->\n @board = new Board do\n i... | livescript | chosen |
[
{
"from": "system",
"value": "Add GA custom dimension constants"
},
{
"from": "human",
"value": "angular.module \\app.constant, <[]>\n.constant \\EDIT_URL, 'https://docs.google.com/document/d/189K9aM7m9wrxoj63De3zoBrK0LDYDF76_BTROXWPR4M/edit'\n.constant \\RULE_URL, 'https://compatable.hackpad.co... | livescript | chosen |
[
{
"from": "system",
"value": "Set opts to {} when absence\n"
},
{
"from": "human",
"value": "require!<[fs mkdirp path winston js-yaml]>\n\nconst DEFAULT_CONFIG_PATH = path.join process.env.HOME, \\.config, \\uva-cli, \\config.yaml\n\nload = (opts) ->\n try\n cfg = js-yaml.safeLoad fs.r... | livescript | chosen |
[
{
"from": "system",
"value": "Implement upload GIF (account icon)\n"
},
{
"from": "human",
"value": "require! {\n\tfs\n\tgm\n\t'../../../utils/register-image'\n\t'../../../utils/get-express-params'\n\t'../../auth': authorize\n}\nmodule.exports = (req, res) -> authorize req, res, (user, app) ->\n... | livescript | chosen |
[
{
"from": "system",
"value": "Fix the typo making constants not exported"
},
{
"from": "human",
"value": "exports =\n INACTIVE_ICON_PATH:\n \\19 : 'assets/19-inactive.png'\n \\38 : 'assets/19-inactive@2x.png'\n\n ACTIVE_ICON_PATH:\n \\19 : 'assets/19-active.png'\n \\38 : 'assets/19... | livescript | chosen |
[
{
"from": "system",
"value": "Fix bug where empty records were unallowed\n"
},
{
"from": "human",
"value": "module.exports = function newtype name, def, union-cls\n\tswitch\n\t| not def?\n\t\tnullType name, def, union-cls\n\n\t| isPlainObject def =>\n\t\tif _.all (.0.match(/^[A-Z]{1}$/)?), Objec... | livescript | chosen |
[
{
"from": "system",
"value": "Fix URL error in content script"
},
{
"from": "human",
"value": "# Send HTML back to backgound\n#\nchrome.runtime.send-message null,\n html: document.document-element.outerHTML\n url: location.url\n width: window.inner-width\n height: window.inner-height\n scro... | livescript | chosen |
[
{
"from": "system",
"value": "Fix a bug with makeProp\n"
},
{
"from": "human",
"value": "# Utility functions.\n#\n\n# Make an accessor/mutator function for the specified member variable.\n#\nexports.makeProp = (name, fn) ->\n (it) ->\n return this[name] unless it?\n this[name] =... | livescript | chosen |
[
{
"from": "system",
"value": "Add test for invalid options\n"
},
{
"from": "human",
"value": "expect = require 'must'\nEventStation = require '../src/main' .default\n\ndescribe 'EventStation.config()', (,) !->\n\n config = undefined\n\n beforeEach !->\n config :=\n emitAl... | livescript | chosen |
[
{
"from": "system",
"value": "Return empty object, not empty string.\n"
},
{
"from": "human",
"value": "/*\n* FileStore\n* https://github.com/DavidSouther/JEFRi\n*\n* Copyright (c) 2012 David Souther\n* Licensed under the MIT license.\n*/\nrequire! { fs }\n\nclass FileStore extends JEFRi.ObjectS... | livescript | chosen |
[
{
"from": "system",
"value": "Throw error on exocom failure (exo-setup)\n"
},
{
"from": "human",
"value": "require! {\n 'child_process'\n 'events' : {EventEmitter}\n '../../exosphere-shared' : {DockerHelper}\n 'observable-process' : ObservableProcess\n}\n\n\nclass ExocomSetup extends EventEm... | livescript | chosen |
[
{
"from": "system",
"value": "Access control allow origin for sign-in check\n"
},
{
"from": "human",
"value": "require! { express, 'body-parser', 'express-session': session, './sources/twitter.ls' }\n\napp = express!\n\napp.enable 'trust proxy'\n\napp.use session do\n resave: false\n save-unin... | livescript | chosen |
[
{
"from": "system",
"value": "Print correct variable as error\n\nOops, `thing` isn't defined; clearly `tree` is what we should be using.\n"
},
{
"from": "human",
"value": "# Turns an input S-expression string into a simple tree format based on JS\n# objects.\n\nparse-sexpr = require \\s-expressi... | livescript | chosen |
[
{
"from": "system",
"value": "Add more information when making new relationships.\n"
},
{
"from": "human",
"value": "Enty = !($scope, Model) ->\n\t$scope.addField = !->\n\t\t$scope.entity.properties Model.runtime.build \\Property, { name: \"New Property\", type: \\string }\n\t$scope.addRelations... | livescript | chosen |
[
{
"from": "system",
"value": "Use independant transactions; jsonp responses.\n"
},
{
"from": "human",
"value": "/*\n * jefri-server\n * https://github.com/DavidSouther/JEFRi\n *\n * Copyright (c) 2012 David Souther\n * Licensed under the MIT license.\n */\n\nrequire! { express, jefri, 'jefri-fil... | livescript | chosen |
[
{
"from": "system",
"value": "Use default color for exorun output"
},
{
"from": "human",
"value": "require! {\n 'chalk' : {black, blue, bold, cyan, dim, green, magenta, red, white}\n}\n\n\nclass Logger\n\n ->\n @colors =\n exocomm: blue\n exorun: black\n users: magenta\n ... | livescript | chosen |
[
{
"from": "system",
"value": "Support for multple environment variables on Windows\n"
},
{
"from": "human",
"value": "require! {\n promptly\n async: './import'.async\n}\n\nmodule.exports = (message, callback, list, type, options) ->\n # simple input arguments normalizer based on its type\n a... | livescript | chosen |
[
{
"from": "system",
"value": "Remove error listener, add close code\n"
},
{
"from": "human",
"value": "require! {\n events: { EventEmitter }\n \"../common/packets\"\n \"../common/network/packet\": Packet\n \"../common/network/side\": Side\n}\n\n\nurl = \"ws://localhost:42006/\"\n\n\nmodule.e... | livescript | chosen |
[
{
"from": "system",
"value": "Change src folder to dest\n"
},
{
"from": "human",
"value": "require 'shelljs/global'\n\nconst REV = exec 'git describe --always' .output.trim!\nconst SRC_DIR = 'client/dest/'\nconst OTHERS = 'misc/gh-pages/*'\nconst TEMPDIR = \"#{ tempdir! }/#{ REV }/\"\n\n!functio... | livescript | chosen |
[
{
"from": "system",
"value": "Set default account only when -d is used\n"
},
{
"from": "human",
"value": "require!<[fs mkdirp path winston js-yaml]>\n\nconst DEFAULT_CONFIG_PATH = path.join process.env.HOME, \\.config, \\uva-cli, \\config.yaml\n\nload = (opts) ->\n try\n cfg = jsYaml.s... | livescript | chosen |
[
{
"from": "system",
"value": "Remove the load spinner directive for another day\n"
},
{
"from": "human",
"value": "app = angular.module 'recess.controls'\n\napp.controller 'ControlsController', [\n\t'$scope'\n\t'$http'\n\t'PageTitle'\n\n\t($scope, $http, PageTitle) ->\n\t\t$scope.notNull = (grou... | livescript | chosen |
[
{
"from": "system",
"value": "Allow default values to be validated later\n"
},
{
"from": "human",
"value": "module.exports = class Field\n\t(@id, @def, @defaultValue, @unionCls) ->\n\t\t@__id = @id\n\n\t\tif @defaultValue?\n\t\t\t@validate @defaultValue\n\n\tcreate: (val) ->\n\t\tv = val ? @defa... | livescript | chosen |
[
{
"from": "system",
"value": "Save forum main page before creating first topic.\n"
},
{
"from": "human",
"value": "# Copyright (c) 2012 Kaj Magnus Lindberg. All rights reserved\n\nd = i: debiki.internal, u: debiki.v0.util\n$ = d.i.$;\n\n\n$('.dw-a-new-forum-topic').click !->\n # Create a new fo... | livescript | chosen |
[
{
"from": "system",
"value": "Comment why initial macro table has extra node\n\nThis was a bit mysterious. I'd forgotten to comment on it back in\n345fcfd when the change was made.\n"
},
{
"from": "human",
"value": "{ concat-map } = require \\prelude-ls\nroot-macro-table = require \\./built-i... | livescript | chosen |
[
{
"from": "system",
"value": "Change Entity.renderer to simple property\n"
},
{
"from": "human",
"value": "module.exports = class Entity\n ->\n @game = null\n @id = null\n \n @pos = [0, 0]\n @size = [0, 0]\n @solid = false\n \n # Used by SpriteRenderer\n @sprite = nul... | livescript | chosen |
[
{
"from": "system",
"value": "Fix \"exo add service\" path\n"
},
{
"from": "human",
"value": "require! {\n 'chalk' : {cyan, green, red}\n 'inquirer'\n 'fs'\n 'js-yaml' : yaml\n '../../logger' : Logger\n '../../../package.json' : {version}\n 'path'\n 'tmplconv'\n}\n\nconsole.log 'We are a... | livescript | chosen |
[
{
"from": "system",
"value": "Update arbiter URL to use network instead of link\n"
},
{
"from": "human",
"value": "require! { express, 'body-parser', request }\n\napp = express!\n\napp.enable 'trust proxy'\n\napp.use express.static 'static'\n\n#app.use body-parser.urlencoded extended: false\n\na... | livescript | chosen |
[
{
"from": "system",
"value": "Add test case for Typeahead\n"
},
{
"from": "human",
"value": "test = it\n\ndescribe 'Test laweasyread.controllers', ->\n beforeEach ->\n module \\laweasyread.controllers\n\n describe 'TypeaheadCtrl', ->\n\n test 'Get law list successful from Sug... | livescript | chosen |
[
{
"from": "system",
"value": "Use window.parent.chrome.runtime to perform quick test because\nwindow.parent.location.origin triggers SecurityError\n"
},
{
"from": "human",
"value": "require! {\n './components/Constants.ls'\n './components/SerializableEvent.ls'\n}\n\ndo ->\n is-testing = docum... | livescript | chosen |
[
{
"from": "system",
"value": "Use jquery and remove obsolite TODO\n"
},
{
"from": "human",
"value": "{each, map, join} = require 'prelude-ls'\n\ngather-scripts = (scripts) ->\n return '' if scripts is undefined\n \n join \"\\n\" (scripts |> map -> \"<script src='#it'></script>\")\n\nexports.s... | livescript | chosen |
[
{
"from": "system",
"value": "Clarify usage on when stdin is read\n"
},
{
"from": "human",
"value": "concat = require \\concat-stream\n{ zip } = require \\prelude-ls\nspawn = (require \\child_process).spawn\nesl = require \\./index\nrequire! <[ async fs path ]>\n\nprint-usage = ->\n console.log... | livescript | chosen |
[
{
"from": "system",
"value": "Set mongo write conern to 1\n"
},
{
"from": "human",
"value": "require!{async, fs, \\fs-tools, file, mongodb, optimist}\nmongoUri = process.env.MONGOLAB_URI or 'mongodb://localhost:27017/laweasyread'\n\ncreate_task = (db, collection_name, files) ->\n (cb) ->\n ... | livescript | chosen |
[
{
"from": "system",
"value": "Use _inject-config to do dependency injection\n"
},
{
"from": "human",
"value": "require!<[http winston]>\n\nset-default-opts = (opts) ->\n if not opts?\n opts = {}\n\n if not opts._api_prefix?\n opts._host = \\uhunt.felix-halim.net\n opts... | livescript | chosen |
[
{
"from": "system",
"value": "Return empty string if not available"
},
{
"from": "human",
"value": "\n\n# Request -> String -> Maybe String\nget-express-param = (req, name) --> req[{GET: \\query, POST: \\body}[req.method] ? \\query][name] ? null\n\n# Request -> [String] -> [Maybe String]\nmodule... | livescript | chosen |
[
{
"from": "system",
"value": "Add support for peer presence in multiple rooms\n"
},
{
"from": "human",
"value": "#!/usr/bin/env lsc\n\nrequire! { http, \\socket.io : io }\n\nserver = http.create-server!\n\nio = io server\n\nio.on \\connection (socket) !->\n socket.emit \\uid socket.id\n\n sock... | livescript | chosen |
[
{
"from": "human",
"value": "Add test case for PCRE in mongo\n"
},
{
"from": "gpt",
"value": "require!{chai, request, \\./helper}\nexpect = chai.expect\n\ndescribe 'Test regex in mongo', (,) ->\n const DATA =\n statute:\n * name:\n * name: \\a * 100\n ... | livescript | chosen |
[
{
"from": "human",
"value": "Add a tool to import a google reader exported subscriptions.xml file\n"
},
{
"from": "gpt",
"value": "/*\n * Import google reader subscriptions.xml\n */\n\nrequire! xml2js\nrequire! Q\nrequire! fs\nrequire! path\nfeeds = require '../server/feeds'\n\nconfig =\n\thost:... | livescript | chosen |
[
{
"from": "human",
"value": "Make it usable via CLI\n"
},
{
"from": "gpt",
"value": "``#!/usr/bin/env node``\n\n'use strict'\n\nrequire! {\n meow\n './' : valentines\n}\n\ncli = meow {help: [\n ''\n 'Happy Valentine\\'s Day!'\n ''\n 'How about wishing someone special a Happy Valentine\\'s ... | livescript | chosen |
[
{
"from": "human",
"value": "Bring up with the module itself\n"
},
{
"from": "gpt",
"value": "'use strict'\n\nrequire! {\n fs\n path\n 'iniparser' : parser\n 'chalk' : colors\n 'unique-random-array' : uniqueRandomArray\n './hearts.json' : hearts\n}\n\nmodule.exports = ->\n\n homeDir = if ... | livescript | chosen |
[
{
"from": "human",
"value": "Add module to optionally enable verbose mode\n"
},
{
"from": "gpt",
"value": "\n\n\ndebug = require('debug')('config')\n\n\n_module = ->\n\n config = {}\n \n iface = { \n set: ->\n config := it\n get: ->\n config\n ... | livescript | chosen |
[
{
"from": "human",
"value": "Implement status get timeline function\n"
},
{
"from": "gpt",
"value": "require! {\n\tasync\n\t'../models/user': User\n\t'../models/user-following': UserFollowing\n\t'../models/status': Status\n\t'./user-response-filter'\n\t'../config'\n}\n\nexports = (user-id, limit... | livescript | chosen |
[
{
"from": "human",
"value": "Add new motion 'statemachine'. This takes the place of movj_to_pr.\n"
},
{
"from": "gpt",
"value": "/PROG ROS_MOVESM\r\n/ATTR\r\nOWNER\t\t= MNEDITOR;\r\nCOMMENT\t\t= \"ROS-I MoveSM\";\r\nPROG_SIZE\t= 434;\r\nCREATE\t\t= DATE 12-10-02 TIME 12:08:46;\r\nMODIFIED\t= D... | livescript | chosen |
[
{
"from": "human",
"value": "Add dynamic list with input elements\n"
},
{
"from": "gpt",
"value": "require! 'prelude-ls': {flip, each, id, flatten}\n\nrequire! './util.js': {list}\n\n(container) <-! (flip each) do\n\tdocument.query-selector-all \\ul.list-input\n\nvalidate = container.validate\nv... | livescript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.