commit
stringlengths
40
40
old_file
stringlengths
4
237
new_file
stringlengths
4
237
old_contents
stringlengths
1
4.24k
new_contents
stringlengths
5
4.84k
subject
stringlengths
15
778
message
stringlengths
16
6.86k
lang
stringlengths
1
30
license
stringclasses
13 values
repos
stringlengths
5
116k
config
stringlengths
1
30
content
stringlengths
105
8.72k
b43bda81126c1b0422352e14aa5cf5be88f18801
lib/cryptoexchange/exchanges/lakebtc/services/market.rb
lib/cryptoexchange/exchanges/lakebtc/services/market.rb
module Cryptoexchange::Exchanges module Lakebtc module Services class Market < Cryptoexchange::Services::Market class << self def supports_individual_ticker_query? false end end def fetch output = super(ticker_url) adapt_all(output) end def ticker_url "#{Cryptoexchange::Exchanges::Lakebtc::Market::API_URL}/ticker" end def adapt_all(output) tickers = [] output.keys.each do |pair| if pair.include?('btc') ticker_json = output[pair] ticker = Lakebtc::Models::Ticker.new ticker.base = 'btc' ticker.target = pair[3..-1] ticker.market = Lakebtc::Market::NAME # NOTE: apparently it can be nil ticker.ask = ticker_json['ask'] ? BigDecimal.new(ticker_json['ask']) : nil ticker.bid = ticker_json['bid'] ? BigDecimal.new(ticker_json['bid']) : nil ticker.last = ticker_json['last'] ? BigDecimal.new(ticker_json['last']) : nil ticker.high = ticker_json['high'] ? BigDecimal.new(ticker_json['high']) : nil ticker.low = ticker_json['low'] ? BigDecimal.new(ticker_json['low']) : nil ticker.volume = ticker_json['volume'] ? BigDecimal.new(ticker_json['volume']) : nil ticker.timestamp = Time.now.to_i ticker.payload = ticker_json tickers << ticker end end tickers end end end end end
module Cryptoexchange::Exchanges module Lakebtc module Services class Market < Cryptoexchange::Services::Market class << self def supports_individual_ticker_query? false end end def fetch output = super(ticker_url) adapt_all(output) end def ticker_url "#{Cryptoexchange::Exchanges::Lakebtc::Market::API_URL}/ticker" end def adapt_all(output) tickers = [] output.keys.each do |pair| if pair.include?('btc') ticker_json = output[pair] ticker = Lakebtc::Models::Ticker.new ticker.base = 'btc' ticker.target = pair[3..-1] ticker.market = Lakebtc::Market::NAME # NOTE: apparently it can be nil ticker.ask = NumericHelper.to_d(ticker_json['ask']) ticker.bid = NumericHelper.to_d(ticker_json['bid']) ticker.last = NumericHelper.to_d(ticker_json['last']) ticker.high = NumericHelper.to_d(ticker_json['high']) ticker.low = NumericHelper.to_d(ticker_json['low']) ticker.volume = NumericHelper.to_d(ticker_json['volume']) ticker.timestamp = Time.now.to_i ticker.payload = ticker_json tickers << ticker end end tickers end end end end end
Use NumericHelper to parse lakebtc response
Use NumericHelper to parse lakebtc response
Ruby
mit
coingecko/cryptoexchange,coingecko/cryptoexchange
ruby
## Code Before: module Cryptoexchange::Exchanges module Lakebtc module Services class Market < Cryptoexchange::Services::Market class << self def supports_individual_ticker_query? false end end def fetch output = super(ticker_url) adapt_all(output) end def ticker_url "#{Cryptoexchange::Exchanges::Lakebtc::Market::API_URL}/ticker" end def adapt_all(output) tickers = [] output.keys.each do |pair| if pair.include?('btc') ticker_json = output[pair] ticker = Lakebtc::Models::Ticker.new ticker.base = 'btc' ticker.target = pair[3..-1] ticker.market = Lakebtc::Market::NAME # NOTE: apparently it can be nil ticker.ask = ticker_json['ask'] ? BigDecimal.new(ticker_json['ask']) : nil ticker.bid = ticker_json['bid'] ? BigDecimal.new(ticker_json['bid']) : nil ticker.last = ticker_json['last'] ? BigDecimal.new(ticker_json['last']) : nil ticker.high = ticker_json['high'] ? BigDecimal.new(ticker_json['high']) : nil ticker.low = ticker_json['low'] ? BigDecimal.new(ticker_json['low']) : nil ticker.volume = ticker_json['volume'] ? BigDecimal.new(ticker_json['volume']) : nil ticker.timestamp = Time.now.to_i ticker.payload = ticker_json tickers << ticker end end tickers end end end end end ## Instruction: Use NumericHelper to parse lakebtc response ## Code After: module Cryptoexchange::Exchanges module Lakebtc module Services class Market < Cryptoexchange::Services::Market class << self def supports_individual_ticker_query? false end end def fetch output = super(ticker_url) adapt_all(output) end def ticker_url "#{Cryptoexchange::Exchanges::Lakebtc::Market::API_URL}/ticker" end def adapt_all(output) tickers = [] output.keys.each do |pair| if pair.include?('btc') ticker_json = output[pair] ticker = Lakebtc::Models::Ticker.new ticker.base = 'btc' ticker.target = pair[3..-1] ticker.market = Lakebtc::Market::NAME # NOTE: apparently it can be nil ticker.ask = NumericHelper.to_d(ticker_json['ask']) ticker.bid = NumericHelper.to_d(ticker_json['bid']) ticker.last = NumericHelper.to_d(ticker_json['last']) ticker.high = NumericHelper.to_d(ticker_json['high']) ticker.low = NumericHelper.to_d(ticker_json['low']) ticker.volume = NumericHelper.to_d(ticker_json['volume']) ticker.timestamp = Time.now.to_i ticker.payload = ticker_json tickers << ticker end end tickers end end end end end
882bef7ee933ddae403d5e896e2e350db5450683
imagicktest.php
imagicktest.php
<?php $filename = __DIR__ . '/tests/Imbo/Fixtures/640x160_rotated.jpg'; $imagick = new Imagick(); $imagick->readImageBlob(file_get_contents($filename)); echo "getImageOrientation() => " . $imagick->getImageOrientation() . PHP_EOL; var_dump($imagick->getImageProperties()); var_dump(exif_read_data($filename));
<?php $filename = __DIR__ . '/tests/Imbo/Fixtures/640x160_rotated.jpg'; $imagick = new Imagick(); $imagick->readImageBlob(file_get_contents($filename)); echo "getImageOrientation() => " . $imagick->getImageOrientation() . PHP_EOL; var_dump($imagick->getImageProperties()); var_dump(exif_read_data($filename, 'EXIF')); var_dump(exif_read_data('tests/Imbo/Fixtures/image.png', 'EXIF')); $imagick = new Imagick(); $imagick->readImageBlob(file_get_contents('tests/Imbo/Fixtures/exif-logo.jpg')); var_dump($imagick->getImageProperties());
Test with another image as well
Test with another image as well
PHP
mit
imbo/imbo,androa/imbo,imbo/imbo,TV2/imbo,matslindh/imbo,matslindh/imbo,christeredvartsen/imbo,christeredvartsen/imbo,kbrabrand/imbo,rexxars/imbo,kbrabrand/imbo,TV2/imbo,rexxars/imbo,christeredvartsen/imbo,androa/imbo
php
## Code Before: <?php $filename = __DIR__ . '/tests/Imbo/Fixtures/640x160_rotated.jpg'; $imagick = new Imagick(); $imagick->readImageBlob(file_get_contents($filename)); echo "getImageOrientation() => " . $imagick->getImageOrientation() . PHP_EOL; var_dump($imagick->getImageProperties()); var_dump(exif_read_data($filename)); ## Instruction: Test with another image as well ## Code After: <?php $filename = __DIR__ . '/tests/Imbo/Fixtures/640x160_rotated.jpg'; $imagick = new Imagick(); $imagick->readImageBlob(file_get_contents($filename)); echo "getImageOrientation() => " . $imagick->getImageOrientation() . PHP_EOL; var_dump($imagick->getImageProperties()); var_dump(exif_read_data($filename, 'EXIF')); var_dump(exif_read_data('tests/Imbo/Fixtures/image.png', 'EXIF')); $imagick = new Imagick(); $imagick->readImageBlob(file_get_contents('tests/Imbo/Fixtures/exif-logo.jpg')); var_dump($imagick->getImageProperties());
d407b7ce6ae8ec60d23ab37ff0aaae0d9702e5e9
.storybook/head.html
.storybook/head.html
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800" rel="stylesheet"> <style> * { font-family: 'Open Sans', sans-serif; } </style>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800" rel="stylesheet"> <link rel="stylesheet" href="//icons.buffer.com/0.13.0/buffer-icons.css" type="text/css"/> <style> * { font-family: 'Open Sans', sans-serif; } </style>
Add Buffer Icons to Storybook
Add Buffer Icons to Storybook This is so that we can use our icons in our components. :)
HTML
mit
bufferapp/buffer-components,bufferapp/buffer-components
html
## Code Before: <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800" rel="stylesheet"> <style> * { font-family: 'Open Sans', sans-serif; } </style> ## Instruction: Add Buffer Icons to Storybook This is so that we can use our icons in our components. :) ## Code After: <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800" rel="stylesheet"> <link rel="stylesheet" href="//icons.buffer.com/0.13.0/buffer-icons.css" type="text/css"/> <style> * { font-family: 'Open Sans', sans-serif; } </style>
5189d0ff9424563fbf4f53c211a67b8d1c691871
packages/sp/spherical.yaml
packages/sp/spherical.yaml
homepage: '' changelog-type: markdown hash: b90e45826e1cf6b13719fd060d72d0a24c5aaaaab6f93e6edf0ede3cba54a0a7 test-bench-deps: {} maintainer: vanessa.mchale@iohk.io synopsis: Geometry on a sphere changelog: ! "# spherical\n\n## 0.1.2.1\n\n * Fix `sinc`\n\n## 0.1.2.0\n\n * Expose `bonne` projection\n\n## 0.1.1.0\n\n * Expose `distance` function\n\n## 0.1.0.0\n\nInitial release\n" basic-deps: composition-prelude: -any base: ! '>=4.3 && <5' all-versions: - 0.1.0.0 - 0.1.1.0 - 0.1.2.0 - 0.1.2.1 author: Vanessa McHale latest: 0.1.2.1 description-type: markdown description: ! '# spherical A library for working with geometry on the surface of the sphere, mainly for use in GIS. ' license-name: BSD-3-Clause
homepage: '' changelog-type: markdown hash: b338ecb78bd956c8a0612aa83e7395c16ec27e2e4a25ab3dacd9921cc6bcca80 test-bench-deps: {} maintainer: vanessa.mchale@iohk.io synopsis: Geometry on a sphere changelog: | # spherical ## 0.1.2.2 * Documentation improvements ## 0.1.2.1 * Fix `sinc` ## 0.1.2.0 * Expose `bonne` projection ## 0.1.1.0 * Expose `distance` function ## 0.1.0.0 Initial release basic-deps: composition-prelude: -any base: ! '>=4.3 && <5' all-versions: - 0.1.0.0 - 0.1.1.0 - 0.1.2.0 - 0.1.2.1 - 0.1.2.2 author: Vanessa McHale latest: 0.1.2.2 description-type: markdown description: | # spherical A library for working with geometry on the surface of the sphere, mainly for use in GIS. license-name: BSD-3-Clause
Update from Hackage at 2019-05-22T01:36:56Z
Update from Hackage at 2019-05-22T01:36:56Z
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: '' changelog-type: markdown hash: b90e45826e1cf6b13719fd060d72d0a24c5aaaaab6f93e6edf0ede3cba54a0a7 test-bench-deps: {} maintainer: vanessa.mchale@iohk.io synopsis: Geometry on a sphere changelog: ! "# spherical\n\n## 0.1.2.1\n\n * Fix `sinc`\n\n## 0.1.2.0\n\n * Expose `bonne` projection\n\n## 0.1.1.0\n\n * Expose `distance` function\n\n## 0.1.0.0\n\nInitial release\n" basic-deps: composition-prelude: -any base: ! '>=4.3 && <5' all-versions: - 0.1.0.0 - 0.1.1.0 - 0.1.2.0 - 0.1.2.1 author: Vanessa McHale latest: 0.1.2.1 description-type: markdown description: ! '# spherical A library for working with geometry on the surface of the sphere, mainly for use in GIS. ' license-name: BSD-3-Clause ## Instruction: Update from Hackage at 2019-05-22T01:36:56Z ## Code After: homepage: '' changelog-type: markdown hash: b338ecb78bd956c8a0612aa83e7395c16ec27e2e4a25ab3dacd9921cc6bcca80 test-bench-deps: {} maintainer: vanessa.mchale@iohk.io synopsis: Geometry on a sphere changelog: | # spherical ## 0.1.2.2 * Documentation improvements ## 0.1.2.1 * Fix `sinc` ## 0.1.2.0 * Expose `bonne` projection ## 0.1.1.0 * Expose `distance` function ## 0.1.0.0 Initial release basic-deps: composition-prelude: -any base: ! '>=4.3 && <5' all-versions: - 0.1.0.0 - 0.1.1.0 - 0.1.2.0 - 0.1.2.1 - 0.1.2.2 author: Vanessa McHale latest: 0.1.2.2 description-type: markdown description: | # spherical A library for working with geometry on the surface of the sphere, mainly for use in GIS. license-name: BSD-3-Clause
02a9a44399d98c291032a5c48a58a9afb4347cd7
scripts/lint.sh
scripts/lint.sh
set -o nounset set -o errexit shellcheck "$PWD"/scripts/*.sh CLOUDFORMATION_TEMPLATES="$PWD/cloudformation/*/*.yaml" for template in $CLOUDFORMATION_TEMPLATES do echo "Validating CloudFormation template - $template ..." aws cloudformation validate-template --template-body "file:///$template" done ANSIBLE_PLAYBOOKS="$PWD/ansible/*/*/*.yaml" for playbook in $ANSIBLE_PLAYBOOKS do echo "Checking Ansible Playbook syntax - $playbook ..." ansible-playbook -vvv "$playbook" --syntax-check done
set -o nounset set -o errexit #shellcheck "$PWD"/scripts/*.sh CLOUDFORMATION_TEMPLATES="$PWD/cloudformation/*/*.yaml" for template in $CLOUDFORMATION_TEMPLATES do echo "Validating CloudFormation template - $template ..." aws cloudformation validate-template --template-body "file:///$template" done ANSIBLE_PLAYBOOKS="$PWD/ansible/playbooks/*/*.yaml" for playbook in $ANSIBLE_PLAYBOOKS do echo "Checking Ansible Playbook syntax - $playbook ..." ansible-playbook -vvv "$playbook" --syntax-check done
Isolate Ansible filtering to playbooks only. Temporary disable shellcheck.
Isolate Ansible filtering to playbooks only. Temporary disable shellcheck.
Shell
apache-2.0
shinesolutions/aem-aws-stack-builder,shinesolutions/aem-aws-stack-builder
shell
## Code Before: set -o nounset set -o errexit shellcheck "$PWD"/scripts/*.sh CLOUDFORMATION_TEMPLATES="$PWD/cloudformation/*/*.yaml" for template in $CLOUDFORMATION_TEMPLATES do echo "Validating CloudFormation template - $template ..." aws cloudformation validate-template --template-body "file:///$template" done ANSIBLE_PLAYBOOKS="$PWD/ansible/*/*/*.yaml" for playbook in $ANSIBLE_PLAYBOOKS do echo "Checking Ansible Playbook syntax - $playbook ..." ansible-playbook -vvv "$playbook" --syntax-check done ## Instruction: Isolate Ansible filtering to playbooks only. Temporary disable shellcheck. ## Code After: set -o nounset set -o errexit #shellcheck "$PWD"/scripts/*.sh CLOUDFORMATION_TEMPLATES="$PWD/cloudformation/*/*.yaml" for template in $CLOUDFORMATION_TEMPLATES do echo "Validating CloudFormation template - $template ..." aws cloudformation validate-template --template-body "file:///$template" done ANSIBLE_PLAYBOOKS="$PWD/ansible/playbooks/*/*.yaml" for playbook in $ANSIBLE_PLAYBOOKS do echo "Checking Ansible Playbook syntax - $playbook ..." ansible-playbook -vvv "$playbook" --syntax-check done
283c719184006297b408420996b3b9c852c96c1c
web/js/router.coffee
web/js/router.coffee
define ['backbone', 'utils', 'backboneAnalytics'], (Backbone, Utils) -> Backbone.Router.extend initialize: () -> @route '', 'homeView' @route /([^\/]+)\/([^\/]+)\/([^\/]+)\/([^\/]+)\/([^\/]+)(?:\/([^\/]+))?(?:\/([^\/]+))?\/?/, 'routesView' homeView: () => Reitti.Event.trigger 'home' routesView: (from, to, departArrive, datetime, transportTypes, routeIndex, legIndex) => routeIndex = 0 if !routeIndex or routeIndex is '' Reitti.Event.trigger 'routes:find', from: Utils.decodeURIComponent(from) to: Utils.decodeURIComponent(to) date: if datetime is 'now' then 'now' else Utils.parseDateTimeFromMachines(datetime) arrivalOrDeparture: departArrive transportTypes: transportTypes.split(',') routeIndex: parseInt(routeIndex, 10) legIndex: if legIndex? then parseInt(legIndex, 10) else undefined navigateToRoutes: (params) -> path = [Utils.encodeURIComponent(params.from), Utils.encodeURIComponent(params.to), params.arrivalOrDeparture, if params.date is 'now' then 'now' else Utils.formatDateTimeForMachines(params.date), params.transportTypes.join(',')] if params.routeIndex? path.push params.routeIndex if params.legIndex? then path.push params.legIndex @navigate '/' + path.join('/'), trigger: true
define ['backbone', 'utils', 'backboneAnalytics'], (Backbone, Utils) -> Backbone.Router.extend initialize: () -> @route '', 'homeView' @route /([^\/]+)\/([^\/]+)\/([^\/]+)\/([^\/]+)\/([^\/]+)(?:\/([^\/]+))?(?:\/([^\/]+))?\/?/, 'routesView' homeView: () => Reitti.Event.trigger 'home' routesView: (from, to, departArrive, datetime, transportTypes, routeIndex, legIndex) => routeIndex = 0 if !routeIndex or routeIndex is '' Reitti.Event.trigger 'routes:find', from: Utils.decodeURIComponent(from) to: Utils.decodeURIComponent(to) date: if datetime is 'now' then 'now' else Utils.parseDateTimeFromMachines(datetime) arrivalOrDeparture: departArrive transportTypes: transportTypes.split(',') routeIndex: parseInt(routeIndex, 10) legIndex: if legIndex? and legIndex.length then parseInt(legIndex, 10) else undefined navigateToRoutes: (params) -> path = [Utils.encodeURIComponent(params.from), Utils.encodeURIComponent(params.to), params.arrivalOrDeparture, if params.date is 'now' then 'now' else Utils.formatDateTimeForMachines(params.date), params.transportTypes.join(',')] if params.routeIndex? path.push params.routeIndex if params.legIndex? then path.push params.legIndex @navigate '/' + path.join('/'), trigger: true
Check that legIndex isn't empty.
Check that legIndex isn't empty.
CoffeeScript
mit
reitti/reittiopas,reitti/reittiopas
coffeescript
## Code Before: define ['backbone', 'utils', 'backboneAnalytics'], (Backbone, Utils) -> Backbone.Router.extend initialize: () -> @route '', 'homeView' @route /([^\/]+)\/([^\/]+)\/([^\/]+)\/([^\/]+)\/([^\/]+)(?:\/([^\/]+))?(?:\/([^\/]+))?\/?/, 'routesView' homeView: () => Reitti.Event.trigger 'home' routesView: (from, to, departArrive, datetime, transportTypes, routeIndex, legIndex) => routeIndex = 0 if !routeIndex or routeIndex is '' Reitti.Event.trigger 'routes:find', from: Utils.decodeURIComponent(from) to: Utils.decodeURIComponent(to) date: if datetime is 'now' then 'now' else Utils.parseDateTimeFromMachines(datetime) arrivalOrDeparture: departArrive transportTypes: transportTypes.split(',') routeIndex: parseInt(routeIndex, 10) legIndex: if legIndex? then parseInt(legIndex, 10) else undefined navigateToRoutes: (params) -> path = [Utils.encodeURIComponent(params.from), Utils.encodeURIComponent(params.to), params.arrivalOrDeparture, if params.date is 'now' then 'now' else Utils.formatDateTimeForMachines(params.date), params.transportTypes.join(',')] if params.routeIndex? path.push params.routeIndex if params.legIndex? then path.push params.legIndex @navigate '/' + path.join('/'), trigger: true ## Instruction: Check that legIndex isn't empty. ## Code After: define ['backbone', 'utils', 'backboneAnalytics'], (Backbone, Utils) -> Backbone.Router.extend initialize: () -> @route '', 'homeView' @route /([^\/]+)\/([^\/]+)\/([^\/]+)\/([^\/]+)\/([^\/]+)(?:\/([^\/]+))?(?:\/([^\/]+))?\/?/, 'routesView' homeView: () => Reitti.Event.trigger 'home' routesView: (from, to, departArrive, datetime, transportTypes, routeIndex, legIndex) => routeIndex = 0 if !routeIndex or routeIndex is '' Reitti.Event.trigger 'routes:find', from: Utils.decodeURIComponent(from) to: Utils.decodeURIComponent(to) date: if datetime is 'now' then 'now' else Utils.parseDateTimeFromMachines(datetime) arrivalOrDeparture: departArrive transportTypes: transportTypes.split(',') routeIndex: parseInt(routeIndex, 10) legIndex: if legIndex? and legIndex.length then parseInt(legIndex, 10) else undefined navigateToRoutes: (params) -> path = [Utils.encodeURIComponent(params.from), Utils.encodeURIComponent(params.to), params.arrivalOrDeparture, if params.date is 'now' then 'now' else Utils.formatDateTimeForMachines(params.date), params.transportTypes.join(',')] if params.routeIndex? path.push params.routeIndex if params.legIndex? then path.push params.legIndex @navigate '/' + path.join('/'), trigger: true
cd169317083d6f4d9892ec2140ae6a4c18629b9a
Source/server/config/environment/development.js
Source/server/config/environment/development.js
'use strict'; // Development specific configuration // ================================== module.exports = { // MongoDB connection options mongo: { uri: 'mongodb://127.0.0.1/medcheck-dev' }, seedDB: true };
'use strict'; // Development specific configuration // ================================== module.exports = { // MongoDB connection options mongo: { uri: "mongodb://" + process.env.DB_PORT_27017_TCP_ADDR + ":" + process.env.DB_PORT_27017_TCP_PORT + "/test" }, seedDB: true };
Add correct mongo connection string (pull from docker env)
Add correct mongo connection string (pull from docker env)
JavaScript
apache-2.0
inforeliance/MedCheck,inforeliance/MedCheck,inforeliance/MedCheck
javascript
## Code Before: 'use strict'; // Development specific configuration // ================================== module.exports = { // MongoDB connection options mongo: { uri: 'mongodb://127.0.0.1/medcheck-dev' }, seedDB: true }; ## Instruction: Add correct mongo connection string (pull from docker env) ## Code After: 'use strict'; // Development specific configuration // ================================== module.exports = { // MongoDB connection options mongo: { uri: "mongodb://" + process.env.DB_PORT_27017_TCP_ADDR + ":" + process.env.DB_PORT_27017_TCP_PORT + "/test" }, seedDB: true };
99860316d55f1cfca169d274717f4a6fa9350f8a
src/client/reducers/StatusReducer.js
src/client/reducers/StatusReducer.js
import initialState from './initialState'; import { HEADER_SHRINKING, HEADER_EXPANDING, HEADER_ANIMATION_ENDED, LOGO_SPIN_STARTED, LOGO_SPIN_ENDED, SCROLL_STARTED, SCROLL_ENDED, APP_INIT } from '../constants'; export default function (state = initialState.status, action) { switch (action.type) { case APP_INIT: return Object.assign({}, state, { isMainPage: true }) case HEADER_EXPANDING: case HEADER_SHRINKING: return Object.assign({}, state, { isAnimating: true }) case HEADER_ANIMATION_ENDED: return Object.assign({}, state, { isAnimating: false, isMainPage: !state.isMainPage }) case SCROLL_STARTED: return Object.assign({}, state, { isScrolling: false, loadingMessage: action.type }) case SCROLL_ENDED: return Object.assign({}, state, { isScrolling: false, }) case LOGO_SPIN_STARTED: return Object.assign({}, state, { isLogoSpinning: true, loadingMessage: action.payload }) case LOGO_SPIN_ENDED: return Object.assign({}, state, { isLogoSpinning: false, loadingMessage: null }) default: return state } }
import initialState from './initialState'; import { LOGO_SPIN_STARTED, LOGO_SPIN_ENDED, PAGE_SCROLL_STARTED, SCROLL_ENDED, APP_INIT, STATUS_UPDATE, PROVIDER_CHANGE, BOARD_CHANGE, THREAD_REQUESTED, BOARD_REQUESTED, } from '../constants'; export default function (state = initialState.status, action) { switch (action.type) { case APP_INIT: return Object.assign({}, state, { isMainPage: true }) case PAGE_SCROLL_STARTED: return Object.assign({}, state, { isScrolling: true }) case SCROLL_ENDED: return Object.assign({}, state, { isScrolling: false, }) case LOGO_SPIN_STARTED: return Object.assign({}, state, { isLogoSpinning: true }) case LOGO_SPIN_ENDED: return Object.assign({}, state, { isLogoSpinning: false }) case PROVIDER_CHANGE: return Object.assign({}, state, { provider: action.payload }) case BOARD_REQUESTED: return Object.assign({}, state, { boardID: action.payload }) case THREAD_REQUESTED: return Object.assign({}, state, { threadID: action.payload }) case STATUS_UPDATE: return Object.assign({}, state, { statusMessage: action.payload }) default: return state } }
Add STATUS_UPDATE, remove header actions from status reducer
Add STATUS_UPDATE, remove header actions from status reducer
JavaScript
mit
AdamSalma/Lurka,AdamSalma/Lurka
javascript
## Code Before: import initialState from './initialState'; import { HEADER_SHRINKING, HEADER_EXPANDING, HEADER_ANIMATION_ENDED, LOGO_SPIN_STARTED, LOGO_SPIN_ENDED, SCROLL_STARTED, SCROLL_ENDED, APP_INIT } from '../constants'; export default function (state = initialState.status, action) { switch (action.type) { case APP_INIT: return Object.assign({}, state, { isMainPage: true }) case HEADER_EXPANDING: case HEADER_SHRINKING: return Object.assign({}, state, { isAnimating: true }) case HEADER_ANIMATION_ENDED: return Object.assign({}, state, { isAnimating: false, isMainPage: !state.isMainPage }) case SCROLL_STARTED: return Object.assign({}, state, { isScrolling: false, loadingMessage: action.type }) case SCROLL_ENDED: return Object.assign({}, state, { isScrolling: false, }) case LOGO_SPIN_STARTED: return Object.assign({}, state, { isLogoSpinning: true, loadingMessage: action.payload }) case LOGO_SPIN_ENDED: return Object.assign({}, state, { isLogoSpinning: false, loadingMessage: null }) default: return state } } ## Instruction: Add STATUS_UPDATE, remove header actions from status reducer ## Code After: import initialState from './initialState'; import { LOGO_SPIN_STARTED, LOGO_SPIN_ENDED, PAGE_SCROLL_STARTED, SCROLL_ENDED, APP_INIT, STATUS_UPDATE, PROVIDER_CHANGE, BOARD_CHANGE, THREAD_REQUESTED, BOARD_REQUESTED, } from '../constants'; export default function (state = initialState.status, action) { switch (action.type) { case APP_INIT: return Object.assign({}, state, { isMainPage: true }) case PAGE_SCROLL_STARTED: return Object.assign({}, state, { isScrolling: true }) case SCROLL_ENDED: return Object.assign({}, state, { isScrolling: false, }) case LOGO_SPIN_STARTED: return Object.assign({}, state, { isLogoSpinning: true }) case LOGO_SPIN_ENDED: return Object.assign({}, state, { isLogoSpinning: false }) case PROVIDER_CHANGE: return Object.assign({}, state, { provider: action.payload }) case BOARD_REQUESTED: return Object.assign({}, state, { boardID: action.payload }) case THREAD_REQUESTED: return Object.assign({}, state, { threadID: action.payload }) case STATUS_UPDATE: return Object.assign({}, state, { statusMessage: action.payload }) default: return state } }
bc8e548e51fddc251eb2e915883e3ee57bb9515b
zc_common/jwt_auth/utils.py
zc_common/jwt_auth/utils.py
import jwt from rest_framework_jwt.settings import api_settings def jwt_payload_handler(user): # The handler from rest_framework_jwt removed user_id, so this is a fork payload = { 'id': user.pk, 'roles': user.get_roles(), } return payload def jwt_encode_handler(payload): return jwt.encode( payload, api_settings.JWT_SECRET_KEY, api_settings.JWT_ALGORITHM ).decode('utf-8')
import jwt from rest_framework_jwt.settings import api_settings def jwt_payload_handler(user): '''Constructs a payload for a user JWT. This is a slimmed down version of https://github.com/GetBlimp/django-rest-framework-jwt/blob/master/rest_framework_jwt/utils.py#L11 :param User: an object with `pk` and `get_roles()` :return: A dictionary that can be passed into `jwt_encode_handler` ''' payload = { 'id': user.pk, 'roles': user.get_roles(), } return payload def jwt_encode_handler(payload): ''' Encodes a payload into a valid JWT. :param payload: a dictionary :return: an encoded JWT string ''' return jwt.encode( payload, api_settings.JWT_SECRET_KEY, api_settings.JWT_ALGORITHM ).decode('utf-8')
Add docstrings to jwt handlers
Add docstrings to jwt handlers
Python
mit
ZeroCater/zc_common,ZeroCater/zc_common
python
## Code Before: import jwt from rest_framework_jwt.settings import api_settings def jwt_payload_handler(user): # The handler from rest_framework_jwt removed user_id, so this is a fork payload = { 'id': user.pk, 'roles': user.get_roles(), } return payload def jwt_encode_handler(payload): return jwt.encode( payload, api_settings.JWT_SECRET_KEY, api_settings.JWT_ALGORITHM ).decode('utf-8') ## Instruction: Add docstrings to jwt handlers ## Code After: import jwt from rest_framework_jwt.settings import api_settings def jwt_payload_handler(user): '''Constructs a payload for a user JWT. This is a slimmed down version of https://github.com/GetBlimp/django-rest-framework-jwt/blob/master/rest_framework_jwt/utils.py#L11 :param User: an object with `pk` and `get_roles()` :return: A dictionary that can be passed into `jwt_encode_handler` ''' payload = { 'id': user.pk, 'roles': user.get_roles(), } return payload def jwt_encode_handler(payload): ''' Encodes a payload into a valid JWT. :param payload: a dictionary :return: an encoded JWT string ''' return jwt.encode( payload, api_settings.JWT_SECRET_KEY, api_settings.JWT_ALGORITHM ).decode('utf-8')
48aad0abed105c1c551c1853d850e00fae56377e
package.json
package.json
{ "name": "pixbi-build", "version": "0.0.0" }
{ "name": "pixbi-build", "version": "0.0.0", "devDependencies": { "grunt": "^0.4.5", "grunt-autoprefixer": "^1.0.0", "grunt-bump": "0.0.15", "grunt-closure-compiler": "0.0.21", "grunt-contrib-clean": "^0.6.0", "grunt-contrib-concat": "^0.5.0", "grunt-contrib-connect": "^0.8.0", "grunt-contrib-copy": "^0.5.0", "grunt-contrib-jade": "^0.12.0", "grunt-contrib-stylus": "^0.18.0", "grunt-contrib-uglify": "^0.5.1", "grunt-contrib-watch": "^0.6.1" } }
Add all necessary grunt tasks
Add all necessary grunt tasks
JSON
mit
pixbi/duplo,pixbi/duplo,pixbi/duplo
json
## Code Before: { "name": "pixbi-build", "version": "0.0.0" } ## Instruction: Add all necessary grunt tasks ## Code After: { "name": "pixbi-build", "version": "0.0.0", "devDependencies": { "grunt": "^0.4.5", "grunt-autoprefixer": "^1.0.0", "grunt-bump": "0.0.15", "grunt-closure-compiler": "0.0.21", "grunt-contrib-clean": "^0.6.0", "grunt-contrib-concat": "^0.5.0", "grunt-contrib-connect": "^0.8.0", "grunt-contrib-copy": "^0.5.0", "grunt-contrib-jade": "^0.12.0", "grunt-contrib-stylus": "^0.18.0", "grunt-contrib-uglify": "^0.5.1", "grunt-contrib-watch": "^0.6.1" } }
39a534d380afea37231cc0c2ca4c8a742354d6e1
app.py
app.py
from flask import Flask, render_template from sh import git app = Flask(__name__) version = git("rev-parse", "--short", "HEAD").strip() @app.route("/", methods=["GET"]) def status(): """ Status check. Display the current version of heatlamp, some basic diagnostics, and a simple form that may be used to manually trigger a deployment. """ return render_template("status.html", version=version) @app.route("/", methods=["POST", "PUT"]) def refresh(): """ Webhook accepted. Perform the configured action. """ return "yes" if __name__ == "__main__": app.run(host='0.0.0.0', port=10100)
import os import sys from flask import Flask, render_template from sh import git app = Flask(__name__) version = git("rev-parse", "--short", "HEAD").strip() command = os.getenv("HEATLAMP_COMMAND") def validate(): """ Validate the application configuration before launching. """ missing = [] if not command: missing.append(( "HEATLAMP_COMMAND", "The command to execute when a webhook is triggered." )) if missing: print("Missing required configuration values:\n", file=sys.stderr) for envvar, purpose in missing: print(" {}: {}".format(envvar, purpose), file=sys.stderr) print(file=sys.stderr) sys.exit(1) validate() @app.route("/", methods=["GET"]) def status(): """ Status check. Display the current version of heatlamp, some basic diagnostics, and a simple form that may be used to manually trigger a deployment. """ return render_template("status.html", version=version) @app.route("/", methods=["POST", "PUT"]) def refresh(): """ Webhook accepted. Perform the configured action. """ return "yes" if __name__ == "__main__": app.run(host='0.0.0.0', port=10100)
Configure the command that's executed.
Configure the command that's executed.
Python
mit
heatlamp/heatlamp-core,heatlamp/heatlamp-core
python
## Code Before: from flask import Flask, render_template from sh import git app = Flask(__name__) version = git("rev-parse", "--short", "HEAD").strip() @app.route("/", methods=["GET"]) def status(): """ Status check. Display the current version of heatlamp, some basic diagnostics, and a simple form that may be used to manually trigger a deployment. """ return render_template("status.html", version=version) @app.route("/", methods=["POST", "PUT"]) def refresh(): """ Webhook accepted. Perform the configured action. """ return "yes" if __name__ == "__main__": app.run(host='0.0.0.0', port=10100) ## Instruction: Configure the command that's executed. ## Code After: import os import sys from flask import Flask, render_template from sh import git app = Flask(__name__) version = git("rev-parse", "--short", "HEAD").strip() command = os.getenv("HEATLAMP_COMMAND") def validate(): """ Validate the application configuration before launching. """ missing = [] if not command: missing.append(( "HEATLAMP_COMMAND", "The command to execute when a webhook is triggered." )) if missing: print("Missing required configuration values:\n", file=sys.stderr) for envvar, purpose in missing: print(" {}: {}".format(envvar, purpose), file=sys.stderr) print(file=sys.stderr) sys.exit(1) validate() @app.route("/", methods=["GET"]) def status(): """ Status check. Display the current version of heatlamp, some basic diagnostics, and a simple form that may be used to manually trigger a deployment. """ return render_template("status.html", version=version) @app.route("/", methods=["POST", "PUT"]) def refresh(): """ Webhook accepted. Perform the configured action. """ return "yes" if __name__ == "__main__": app.run(host='0.0.0.0', port=10100)
37cc269e71f4a7faada31c47f0e644449f38b565
test/test_helper.rb
test/test_helper.rb
$:.unshift(File.dirname(File.dirname(File.expand_path(__FILE__))) + '/lib') require "rubygems" require "test/unit" require "coveralls" Coveralls.wear! require "rumonade" # see http://stackoverflow.com/questions/2709361/monad-equivalent-in-ruby module MonadAxiomTestHelpers def assert_monad_axiom_1(monad_class, value, f) assert_equal f[value], monad_class.unit(value).bind(f) end def assert_monad_axiom_2(monad) assert_equal monad, monad.bind(lambda { |v| monad.class.unit(v) }) end def assert_monad_axiom_3(monad, f, g) assert_equal monad.bind(f).bind(g), monad.bind { |x| f[x].bind(g) } end end
$:.unshift(File.dirname(File.dirname(File.expand_path(__FILE__))) + '/lib') require "rubygems" require "test/unit" # Setup code coverage via SimpleCov and post to Coveralls.io require "simplecov" require "coveralls" SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter ] SimpleCov.start do add_filter "/test/" end require "rumonade" # see http://stackoverflow.com/questions/2709361/monad-equivalent-in-ruby module MonadAxiomTestHelpers def assert_monad_axiom_1(monad_class, value, f) assert_equal f[value], monad_class.unit(value).bind(f) end def assert_monad_axiom_2(monad) assert_equal monad, monad.bind(lambda { |v| monad.class.unit(v) }) end def assert_monad_axiom_3(monad, f, g) assert_equal monad.bind(f).bind(g), monad.bind { |x| f[x].bind(g) } end end
Add SimpleCov configuration, to run coverage locally as well as Coveralls.io
Add SimpleCov configuration, to run coverage locally as well as Coveralls.io
Ruby
mit
ms-ati/rumonade
ruby
## Code Before: $:.unshift(File.dirname(File.dirname(File.expand_path(__FILE__))) + '/lib') require "rubygems" require "test/unit" require "coveralls" Coveralls.wear! require "rumonade" # see http://stackoverflow.com/questions/2709361/monad-equivalent-in-ruby module MonadAxiomTestHelpers def assert_monad_axiom_1(monad_class, value, f) assert_equal f[value], monad_class.unit(value).bind(f) end def assert_monad_axiom_2(monad) assert_equal monad, monad.bind(lambda { |v| monad.class.unit(v) }) end def assert_monad_axiom_3(monad, f, g) assert_equal monad.bind(f).bind(g), monad.bind { |x| f[x].bind(g) } end end ## Instruction: Add SimpleCov configuration, to run coverage locally as well as Coveralls.io ## Code After: $:.unshift(File.dirname(File.dirname(File.expand_path(__FILE__))) + '/lib') require "rubygems" require "test/unit" # Setup code coverage via SimpleCov and post to Coveralls.io require "simplecov" require "coveralls" SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter ] SimpleCov.start do add_filter "/test/" end require "rumonade" # see http://stackoverflow.com/questions/2709361/monad-equivalent-in-ruby module MonadAxiomTestHelpers def assert_monad_axiom_1(monad_class, value, f) assert_equal f[value], monad_class.unit(value).bind(f) end def assert_monad_axiom_2(monad) assert_equal monad, monad.bind(lambda { |v| monad.class.unit(v) }) end def assert_monad_axiom_3(monad, f, g) assert_equal monad.bind(f).bind(g), monad.bind { |x| f[x].bind(g) } end end
6363f657af23bf7142f5633eb96b8f0a23c35a18
roles/docker-engine/tasks/main.yml
roles/docker-engine/tasks/main.yml
--- - name: Add Docker APT key apt_key: keyserver="hkp://p80.pool.sks-keyservers.net:80" id=58118E89F3A912897C070ADBF76221572C52609D state=present - name: Add Docker APT repo apt_repository: repo="deb https://apt.dockerproject.org/repo ubuntu-trusty main" state=present - name: Install docker - based on "https://get.docker.com/" apt: name=docker-engine
--- - name: Add Docker APT key apt_key: keyserver=ha.pool.sks-keyservers.net id=58118E89F3A912897C070ADBF76221572C52609D state=present - name: Add Docker APT repo apt_repository: repo="deb https://apt.dockerproject.org/repo ubuntu-trusty main" state=present - name: Install docker - based on "https://get.docker.com/" apt: name=docker-engine
Use assumed high-available keyserver hostname
Use assumed high-available keyserver hostname Fixes the following error: failed: [10.141.141.12] => {"cmd": "apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv 58118E89F3A912897C070ADBF76221572C52609D", "failed": true, "rc": 2} stderr: gpg: requesting key 2C52609D from hkp server p80.pool.sks-keyservers.net gpg: no valid OpenPGP data found. gpg: Total number processed: 0 stdout: Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.4dczvwmUsC --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv 58118E89F3A912897C070ADBF76221572C52609D gpgkeys: key 58118E89F3A912897C070ADBF76221572C52609D can't be retrieved msg: gpg: requesting key 2C52609D from hkp server p80.pool.sks-keyservers.net gpg: no valid OpenPGP data found. gpg: Total number processed: 0
YAML
apache-2.0
ypg-data/mesos-stack,ypg-data/mesos-stack
yaml
## Code Before: --- - name: Add Docker APT key apt_key: keyserver="hkp://p80.pool.sks-keyservers.net:80" id=58118E89F3A912897C070ADBF76221572C52609D state=present - name: Add Docker APT repo apt_repository: repo="deb https://apt.dockerproject.org/repo ubuntu-trusty main" state=present - name: Install docker - based on "https://get.docker.com/" apt: name=docker-engine ## Instruction: Use assumed high-available keyserver hostname Fixes the following error: failed: [10.141.141.12] => {"cmd": "apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv 58118E89F3A912897C070ADBF76221572C52609D", "failed": true, "rc": 2} stderr: gpg: requesting key 2C52609D from hkp server p80.pool.sks-keyservers.net gpg: no valid OpenPGP data found. gpg: Total number processed: 0 stdout: Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.4dczvwmUsC --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv 58118E89F3A912897C070ADBF76221572C52609D gpgkeys: key 58118E89F3A912897C070ADBF76221572C52609D can't be retrieved msg: gpg: requesting key 2C52609D from hkp server p80.pool.sks-keyservers.net gpg: no valid OpenPGP data found. gpg: Total number processed: 0 ## Code After: --- - name: Add Docker APT key apt_key: keyserver=ha.pool.sks-keyservers.net id=58118E89F3A912897C070ADBF76221572C52609D state=present - name: Add Docker APT repo apt_repository: repo="deb https://apt.dockerproject.org/repo ubuntu-trusty main" state=present - name: Install docker - based on "https://get.docker.com/" apt: name=docker-engine
84a4ff5b16b0be42c969e7da50c7da7ce22fbe55
test/bootstrap.php
test/bootstrap.php
<?php /* * This file is part of Mustache.php. * * (c) 2010-2014 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ require dirname(__FILE__).'/../src/Mustache/Autoloader.php'; Mustache_Autoloader::register(); require dirname(__FILE__).'/../vendor/yaml/lib/sfYamlParser.php';
<?php /* * This file is part of Mustache.php. * * (c) 2010-2014 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ $loader = require dirname(__FILE__).'/../vendor/autoload.php'; $loader->add('Mustache_Test', dirname(__FILE__)); require dirname(__FILE__).'/../vendor/yaml/lib/sfYamlParser.php';
Use Composer autoload for unit tests.
Use Composer autoload for unit tests.
PHP
mit
zuluf/mustache.php,cgvarela/mustache.php,evdevgit/mustache.php,BrunoDeBarros/mustache.php,sophatvathana/mustache.php,ericariyanto/mustache.php,irontec/mustache,bobthecow/mustache.php,thecocce/mustache.php
php
## Code Before: <?php /* * This file is part of Mustache.php. * * (c) 2010-2014 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ require dirname(__FILE__).'/../src/Mustache/Autoloader.php'; Mustache_Autoloader::register(); require dirname(__FILE__).'/../vendor/yaml/lib/sfYamlParser.php'; ## Instruction: Use Composer autoload for unit tests. ## Code After: <?php /* * This file is part of Mustache.php. * * (c) 2010-2014 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ $loader = require dirname(__FILE__).'/../vendor/autoload.php'; $loader->add('Mustache_Test', dirname(__FILE__)); require dirname(__FILE__).'/../vendor/yaml/lib/sfYamlParser.php';
f58c0246dc9f3e00537807f99e4a1b8969ae3365
src/exercises/00-theGitGo/conf.js
src/exercises/00-theGitGo/conf.js
'use strict' module.exports = { global: { timeLimit: Infinity }, machine: { startState: 'done', done: null }, viewer: { title: 'Getting an existing repository', steps: {}, feedback: {} }, repo: { commits: [ { msg: 'Initial commit', files: [] }, { msg: 'Add hello.txt', files: [{ src: 'hello.txt', template: { greeting: 'Hello, world!' } }] }, { msg: 'Update hello.txt', files: [{ src: 'hello.txt', template: { greeting: 'Hello, Git!' } }] } ] } }
'use strict' module.exports = { global: { timeLimit: Infinity }, machine: { startState: 'done', done: null }, viewer: { title: 'Getting an existing repository', steps: {}, feedback: { null: { done: 'Your repository now contains the file <code>hello.txt</code>; typing <code>git log</code> will show its history.' } } }, repo: { commits: [ { msg: 'Initial commit', files: [] }, { msg: 'Add hello.txt', files: [{ src: 'hello.txt', template: { greeting: 'Hello, world!' } }] }, { msg: 'Update hello.txt', files: [{ src: 'hello.txt', template: { greeting: 'Hello, Git!' } }] } ] } }
Add some feedback to theGitGo
Add some feedback to theGitGo
JavaScript
mit
uid/gitstream-exercises,uid/gitstream-exercises,uid/gitstream-exercises,uid/gitstream-exercises,uid/gitstream-exercises,uid/gitstream-exercises,uid/gitstream-exercises,uid/gitstream-exercises,uid/gitstream-exercises,uid/gitstream-exercises
javascript
## Code Before: 'use strict' module.exports = { global: { timeLimit: Infinity }, machine: { startState: 'done', done: null }, viewer: { title: 'Getting an existing repository', steps: {}, feedback: {} }, repo: { commits: [ { msg: 'Initial commit', files: [] }, { msg: 'Add hello.txt', files: [{ src: 'hello.txt', template: { greeting: 'Hello, world!' } }] }, { msg: 'Update hello.txt', files: [{ src: 'hello.txt', template: { greeting: 'Hello, Git!' } }] } ] } } ## Instruction: Add some feedback to theGitGo ## Code After: 'use strict' module.exports = { global: { timeLimit: Infinity }, machine: { startState: 'done', done: null }, viewer: { title: 'Getting an existing repository', steps: {}, feedback: { null: { done: 'Your repository now contains the file <code>hello.txt</code>; typing <code>git log</code> will show its history.' } } }, repo: { commits: [ { msg: 'Initial commit', files: [] }, { msg: 'Add hello.txt', files: [{ src: 'hello.txt', template: { greeting: 'Hello, world!' } }] }, { msg: 'Update hello.txt', files: [{ src: 'hello.txt', template: { greeting: 'Hello, Git!' } }] } ] } }
cdbbb114f619a931781b4697c1ec6dc523d9819f
src/packages/collaboration/lib/session-utils.coffee
src/packages/collaboration/lib/session-utils.coffee
Peer = require './peer' Guid = require 'guid' module.exports = createPeer: -> id = Guid.create().toString() new Peer(id, host: 'ec2-54-218-51-127.us-west-2.compute.amazonaws.com', port: 8080) connectDocument: (doc, connection) -> nextOutputEventId = 1 outputListener = (event) -> event.id = nextOutputEventId++ console.log 'sending event', event.id, event connection.send(event) doc.outputEvents.on('changed', outputListener) queuedEvents = [] nextInputEventId = 1 handleInputEvent = (event) -> console.log 'received event', event.id, event doc.handleInputEvent(event) nextInputEventId = event.id + 1 flushQueuedEvents = -> loop eventHandled = false for event, index in queuedEvents when event.id is nextInputEventId handleInputEvent(event) queuedEvents.splice(index, 1) eventHandled = true break break unless eventHandled connection.on 'data', (event) -> if event.id is nextInputEventId handleInputEvent(event) flushQueuedEvents() else console.log 'enqueing event', event.id, event queuedEvents.push(event) connection.on 'close', -> doc.outputEvents.removeListener('changed', outputListener) connection.on 'error', (error) -> console.error 'connection error', error.stack ? error
Peer = require './peer' Guid = require 'guid' module.exports = createPeer: -> id = Guid.create().toString() new Peer(id, key: '0njqmaln320dlsor') connectDocument: (doc, connection) -> nextOutputEventId = 1 outputListener = (event) -> event.id = nextOutputEventId++ console.log 'sending event', event.id, event connection.send(event) doc.outputEvents.on('changed', outputListener) queuedEvents = [] nextInputEventId = 1 handleInputEvent = (event) -> console.log 'received event', event.id, event doc.handleInputEvent(event) nextInputEventId = event.id + 1 flushQueuedEvents = -> loop eventHandled = false for event, index in queuedEvents when event.id is nextInputEventId handleInputEvent(event) queuedEvents.splice(index, 1) eventHandled = true break break unless eventHandled connection.on 'data', (event) -> if event.id is nextInputEventId handleInputEvent(event) flushQueuedEvents() else console.log 'enqueing event', event.id, event queuedEvents.push(event) connection.on 'close', -> doc.outputEvents.removeListener('changed', outputListener) connection.on 'error', (error) -> console.error 'connection error', error.stack ? error
Use PeerServer :cloud: instead of EC2
Use PeerServer :cloud: instead of EC2
CoffeeScript
mit
sekcheong/atom,originye/atom,woss/atom,sillvan/atom,rookie125/atom,niklabh/atom,Hasimir/atom,vcarrera/atom,ezeoleaf/atom,tisu2tisu/atom,dannyflax/atom,fedorov/atom,jordanbtucker/atom,alfredxing/atom,oggy/atom,dkfiresky/atom,alfredxing/atom,vinodpanicker/atom,tony612/atom,RobinTec/atom,Jdesk/atom,kdheepak89/atom,yangchenghu/atom,constanzaurzua/atom,vcarrera/atom,codex8/atom,Galactix/atom,bj7/atom,RobinTec/atom,gisenberg/atom,Shekharrajak/atom,CraZySacX/atom,rlugojr/atom,qiujuer/atom,bj7/atom,Jandersolutions/atom,Rodjana/atom,pengshp/atom,sxgao3001/atom,rjattrill/atom,dannyflax/atom,basarat/atom,toqz/atom,niklabh/atom,burodepeper/atom,Austen-G/BlockBuilder,t9md/atom,prembasumatary/atom,kevinrenaers/atom,yalexx/atom,deepfox/atom,jordanbtucker/atom,hpham04/atom,kittens/atom,chengky/atom,targeter21/atom,constanzaurzua/atom,kevinrenaers/atom,bryonwinger/atom,jjz/atom,oggy/atom,Mokolea/atom,dannyflax/atom,kjav/atom,crazyquark/atom,brettle/atom,yalexx/atom,tanin47/atom,yamhon/atom,execjosh/atom,g2p/atom,AlbertoBarrago/atom,sebmck/atom,ironbox360/atom,Ingramz/atom,acontreras89/atom,sxgao3001/atom,russlescai/atom,kdheepak89/atom,YunchengLiao/atom,originye/atom,basarat/atom,bsmr-x-script/atom,qiujuer/atom,tony612/atom,Ingramz/atom,fredericksilva/atom,yangchenghu/atom,synaptek/atom,FIT-CSE2410-A-Bombs/atom,brettle/atom,Klozz/atom,devmario/atom,NunoEdgarGub1/atom,pkdevbox/atom,jlord/atom,jacekkopecky/atom,targeter21/atom,atom/atom,mostafaeweda/atom,lisonma/atom,synaptek/atom,BogusCurry/atom,rsvip/aTom,nucked/atom,florianb/atom,Jandersoft/atom,batjko/atom,KENJU/atom,ashneo76/atom,bcoe/atom,kandros/atom,ObviouslyGreen/atom,KENJU/atom,AlisaKiatkongkumthon/atom,sebmck/atom,sxgao3001/atom,gabrielPeart/atom,andrewleverette/atom,FoldingText/atom,kdheepak89/atom,Klozz/atom,johnhaley81/atom,anuwat121/atom,ali/atom,codex8/atom,githubteacher/atom,Sangaroonaom/atom,AdrianVovk/substance-ide,Rodjana/atom,n-riesco/atom,transcranial/atom,kjav/atom,001szymon/atom,matthewclendening/atom,bolinfest/atom,crazyquark/atom,ivoadf/atom,PKRoma/atom,mnquintana/atom,dsandstrom/atom,boomwaiza/atom,oggy/atom,constanzaurzua/atom,panuchart/atom,hellendag/atom,gisenberg/atom,pombredanne/atom,ReddTea/atom,chfritz/atom,G-Baby/atom,isghe/atom,stinsonga/atom,ReddTea/atom,lovesnow/atom,n-riesco/atom,Ju2ender/atom,john-kelly/atom,hpham04/atom,Hasimir/atom,Shekharrajak/atom,kittens/atom,rmartin/atom,h0dgep0dge/atom,woss/atom,MjAbuz/atom,jjz/atom,rookie125/atom,fedorov/atom,abe33/atom,ppamorim/atom,pkdevbox/atom,rsvip/aTom,ppamorim/atom,dsandstrom/atom,Locke23rus/atom,nvoron23/atom,vcarrera/atom,Jandersolutions/atom,ilovezy/atom,001szymon/atom,ironbox360/atom,dkfiresky/atom,targeter21/atom,qskycolor/atom,DiogoXRP/atom,ralphtheninja/atom,boomwaiza/atom,G-Baby/atom,qiujuer/atom,palita01/atom,ardeshirj/atom,kittens/atom,davideg/atom,dsandstrom/atom,ReddTea/atom,kaicataldo/atom,pombredanne/atom,bryonwinger/atom,Abdillah/atom,nvoron23/atom,kittens/atom,svanharmelen/atom,splodingsocks/atom,devoncarew/atom,dsandstrom/atom,Huaraz2/atom,deepfox/atom,mnquintana/atom,chfritz/atom,0x73/atom,john-kelly/atom,helber/atom,FIT-CSE2410-A-Bombs/atom,gzzhanghao/atom,john-kelly/atom,nucked/atom,acontreras89/atom,kc8wxm/atom,splodingsocks/atom,decaffeinate-examples/atom,kevinrenaers/atom,githubteacher/atom,sotayamashita/atom,rjattrill/atom,tanin47/atom,kittens/atom,champagnez/atom,ali/atom,mostafaeweda/atom,Jandersoft/atom,liuxiong332/atom,mrodalgaard/atom,vhutheesing/atom,tony612/atom,g2p/atom,devoncarew/atom,jacekkopecky/atom,me6iaton/atom,Austen-G/BlockBuilder,CraZySacX/atom,toqz/atom,h0dgep0dge/atom,chfritz/atom,lpommers/atom,Andrey-Pavlov/atom,ilovezy/atom,dkfiresky/atom,gzzhanghao/atom,andrewleverette/atom,john-kelly/atom,ashneo76/atom,hakatashi/atom,burodepeper/atom,FIT-CSE2410-A-Bombs/atom,sotayamashita/atom,ashneo76/atom,rxkit/atom,jtrose2/atom,nucked/atom,vinodpanicker/atom,vjeux/atom,tmunro/atom,brettle/atom,pkdevbox/atom,abcP9110/atom,deoxilix/atom,Jandersoft/atom,Shekharrajak/atom,omarhuanca/atom,omarhuanca/atom,tmunro/atom,jacekkopecky/atom,Neron-X5/atom,einarmagnus/atom,hharchani/atom,Mokolea/atom,liuxiong332/atom,charleswhchan/atom,paulcbetts/atom,devmario/atom,FoldingText/atom,transcranial/atom,RobinTec/atom,lpommers/atom,codex8/atom,scippio/atom,anuwat121/atom,alexandergmann/atom,AlisaKiatkongkumthon/atom,darwin/atom,lisonma/atom,florianb/atom,AdrianVovk/substance-ide,harshdattani/atom,ykeisuke/atom,stuartquin/atom,CraZySacX/atom,amine7536/atom,mdumrauf/atom,fedorov/atom,lisonma/atom,constanzaurzua/atom,Jdesk/atom,bradgearon/atom,devmario/atom,daxlab/atom,h0dgep0dge/atom,davideg/atom,acontreras89/atom,yalexx/atom,MjAbuz/atom,yomybaby/atom,einarmagnus/atom,me6iaton/atom,ObviouslyGreen/atom,matthewclendening/atom,stinsonga/atom,dannyflax/atom,jeremyramin/atom,ilovezy/atom,RobinTec/atom,niklabh/atom,devoncarew/atom,beni55/atom,NunoEdgarGub1/atom,kc8wxm/atom,t9md/atom,dijs/atom,scv119/atom,ReddTea/atom,jacekkopecky/atom,jeremyramin/atom,h0dgep0dge/atom,oggy/atom,paulcbetts/atom,deoxilix/atom,crazyquark/atom,tony612/atom,execjosh/atom,paulcbetts/atom,Andrey-Pavlov/atom,daxlab/atom,mrodalgaard/atom,yamhon/atom,hpham04/atom,bolinfest/atom,mostafaeweda/atom,ralphtheninja/atom,russlescai/atom,mertkahyaoglu/atom,gontadu/atom,brumm/atom,russlescai/atom,ali/atom,constanzaurzua/atom,jjz/atom,Austen-G/BlockBuilder,mertkahyaoglu/atom,tjkr/atom,vhutheesing/atom,toqz/atom,hagb4rd/atom,phord/atom,dsandstrom/atom,me6iaton/atom,scv119/atom,russlescai/atom,efatsi/atom,0x73/atom,ilovezy/atom,helber/atom,kaicataldo/atom,Sangaroonaom/atom,mnquintana/atom,jacekkopecky/atom,ardeshirj/atom,gontadu/atom,fredericksilva/atom,deoxilix/atom,rjattrill/atom,Rodjana/atom,execjosh/atom,kandros/atom,qskycolor/atom,hakatashi/atom,Dennis1978/atom,dannyflax/atom,tisu2tisu/atom,avdg/atom,burodepeper/atom,Ju2ender/atom,palita01/atom,yangchenghu/atom,mnquintana/atom,anuwat121/atom,matthewclendening/atom,Arcanemagus/atom,chengky/atom,bcoe/atom,seedtigo/atom,gabrielPeart/atom,tjkr/atom,atom/atom,Shekharrajak/atom,phord/atom,ali/atom,prembasumatary/atom,gisenberg/atom,ObviouslyGreen/atom,Neron-X5/atom,hagb4rd/atom,Jonekee/atom,n-riesco/atom,elkingtonmcb/atom,alfredxing/atom,Mokolea/atom,erikhakansson/atom,Abdillah/atom,dijs/atom,ezeoleaf/atom,omarhuanca/atom,crazyquark/atom,bencolon/atom,Andrey-Pavlov/atom,lovesnow/atom,tjkr/atom,transcranial/atom,PKRoma/atom,vcarrera/atom,toqz/atom,basarat/atom,jacekkopecky/atom,Jandersolutions/atom,YunchengLiao/atom,bsmr-x-script/atom,SlimeQ/atom,AlisaKiatkongkumthon/atom,folpindo/atom,florianb/atom,harshdattani/atom,rlugojr/atom,Hasimir/atom,acontreras89/atom,daxlab/atom,ezeoleaf/atom,stuartquin/atom,Neron-X5/atom,devoncarew/atom,rjattrill/atom,dkfiresky/atom,bencolon/atom,lovesnow/atom,rlugojr/atom,jtrose2/atom,jjz/atom,brumm/atom,omarhuanca/atom,ppamorim/atom,bryonwinger/atom,deepfox/atom,KENJU/atom,champagnez/atom,qiujuer/atom,NunoEdgarGub1/atom,yomybaby/atom,amine7536/atom,deepfox/atom,bsmr-x-script/atom,yalexx/atom,basarat/atom,champagnez/atom,mertkahyaoglu/atom,ykeisuke/atom,jtrose2/atom,AlbertoBarrago/atom,Rychard/atom,jlord/atom,florianb/atom,qskycolor/atom,sebmck/atom,ralphtheninja/atom,kjav/atom,gontadu/atom,yomybaby/atom,DiogoXRP/atom,einarmagnus/atom,kaicataldo/atom,001szymon/atom,woss/atom,sillvan/atom,Huaraz2/atom,mostafaeweda/atom,hagb4rd/atom,johnhaley81/atom,Klozz/atom,darwin/atom,sillvan/atom,elkingtonmcb/atom,Jdesk/atom,jeremyramin/atom,hagb4rd/atom,amine7536/atom,charleswhchan/atom,davideg/atom,fscherwi/atom,alexandergmann/atom,Ingramz/atom,vinodpanicker/atom,batjko/atom,RuiDGoncalves/atom,Locke23rus/atom,brumm/atom,wiggzz/atom,AlexxNica/atom,sxgao3001/atom,einarmagnus/atom,acontreras89/atom,darwin/atom,cyzn/atom,fedorov/atom,alexandergmann/atom,NunoEdgarGub1/atom,Neron-X5/atom,gisenberg/atom,pombredanne/atom,rsvip/aTom,hagb4rd/atom,atom/atom,bradgearon/atom,jordanbtucker/atom,avdg/atom,AlbertoBarrago/atom,chengky/atom,tisu2tisu/atom,ivoadf/atom,oggy/atom,NunoEdgarGub1/atom,liuderchi/atom,FoldingText/atom,nrodriguez13/atom,lisonma/atom,hellendag/atom,Abdillah/atom,FoldingText/atom,devmario/atom,medovob/atom,Arcanemagus/atom,decaffeinate-examples/atom,johnrizzo1/atom,jtrose2/atom,mdumrauf/atom,scippio/atom,KENJU/atom,fedorov/atom,ivoadf/atom,Arcanemagus/atom,beni55/atom,sotayamashita/atom,scippio/atom,batjko/atom,g2p/atom,Jdesk/atom,toqz/atom,charleswhchan/atom,ardeshirj/atom,AlexxNica/atom,Austen-G/BlockBuilder,synaptek/atom,efatsi/atom,hharchani/atom,isghe/atom,AdrianVovk/substance-ide,bencolon/atom,gzzhanghao/atom,abcP9110/atom,yalexx/atom,GHackAnonymous/atom,ReddTea/atom,nvoron23/atom,jjz/atom,scv119/atom,folpindo/atom,ironbox360/atom,Jandersoft/atom,Austen-G/BlockBuilder,svanharmelen/atom,wiggzz/atom,crazyquark/atom,splodingsocks/atom,hpham04/atom,yomybaby/atom,hharchani/atom,ppamorim/atom,jtrose2/atom,medovob/atom,SlimeQ/atom,hharchani/atom,cyzn/atom,0x73/atom,xream/atom,Ju2ender/atom,targeter21/atom,qiujuer/atom,mertkahyaoglu/atom,tmunro/atom,xream/atom,pengshp/atom,vjeux/atom,Rychard/atom,abcP9110/atom,MjAbuz/atom,hpham04/atom,Andrey-Pavlov/atom,me6iaton/atom,nrodriguez13/atom,wiggzz/atom,ilovezy/atom,vinodpanicker/atom,abcP9110/atom,mrodalgaard/atom,vinodpanicker/atom,KENJU/atom,ppamorim/atom,FoldingText/atom,florianb/atom,hellendag/atom,lovesnow/atom,Jandersolutions/atom,originye/atom,russlescai/atom,rxkit/atom,isghe/atom,GHackAnonymous/atom,yomybaby/atom,vjeux/atom,sekcheong/atom,mostafaeweda/atom,erikhakansson/atom,einarmagnus/atom,synaptek/atom,BogusCurry/atom,palita01/atom,fscherwi/atom,bryonwinger/atom,kjav/atom,Jandersoft/atom,lisonma/atom,kdheepak89/atom,n-riesco/atom,fang-yufeng/atom,me-benni/atom,dkfiresky/atom,YunchengLiao/atom,omarhuanca/atom,abe33/atom,liuxiong332/atom,bcoe/atom,AlexxNica/atom,batjko/atom,qskycolor/atom,vcarrera/atom,abe33/atom,GHackAnonymous/atom,johnrizzo1/atom,qskycolor/atom,cyzn/atom,fang-yufeng/atom,boomwaiza/atom,medovob/atom,fredericksilva/atom,nvoron23/atom,devmario/atom,Hasimir/atom,Galactix/atom,paulcbetts/atom,Ju2ender/atom,fang-yufeng/atom,me6iaton/atom,fscherwi/atom,amine7536/atom,Jonekee/atom,0x73/atom,Abdillah/atom,decaffeinate-examples/atom,jlord/atom,mnquintana/atom,folpindo/atom,me-benni/atom,Dennis1978/atom,GHackAnonymous/atom,vhutheesing/atom,erikhakansson/atom,Galactix/atom,gabrielPeart/atom,ezeoleaf/atom,SlimeQ/atom,beni55/atom,tony612/atom,seedtigo/atom,hakatashi/atom,ykeisuke/atom,YunchengLiao/atom,Neron-X5/atom,stinsonga/atom,isghe/atom,me-benni/atom,prembasumatary/atom,sillvan/atom,DiogoXRP/atom,MjAbuz/atom,jlord/atom,chengky/atom,andrewleverette/atom,rxkit/atom,davideg/atom,fang-yufeng/atom,RuiDGoncalves/atom,kandros/atom,targeter21/atom,sillvan/atom,Galactix/atom,sebmck/atom,hakatashi/atom,bradgearon/atom,kc8wxm/atom,harshdattani/atom,charleswhchan/atom,stinsonga/atom,Andrey-Pavlov/atom,panuchart/atom,lovesnow/atom,FoldingText/atom,vjeux/atom,rmartin/atom,Jdesk/atom,liuxiong332/atom,rsvip/aTom,kdheepak89/atom,prembasumatary/atom,nvoron23/atom,efatsi/atom,dijs/atom,SlimeQ/atom,woss/atom,basarat/atom,fredericksilva/atom,deepfox/atom,kc8wxm/atom,mdumrauf/atom,svanharmelen/atom,Sangaroonaom/atom,rmartin/atom,rmartin/atom,Shekharrajak/atom,hharchani/atom,chengky/atom,basarat/atom,ali/atom,yamhon/atom,helber/atom,johnhaley81/atom,synaptek/atom,davideg/atom,Dennis1978/atom,Jandersolutions/atom,splodingsocks/atom,john-kelly/atom,RobinTec/atom,bolinfest/atom,devoncarew/atom,mertkahyaoglu/atom,n-riesco/atom,jlord/atom,codex8/atom,RuiDGoncalves/atom,Huaraz2/atom,Abdillah/atom,kc8wxm/atom,bcoe/atom,Locke23rus/atom,isghe/atom,Rychard/atom,GHackAnonymous/atom,rmartin/atom,liuxiong332/atom,seedtigo/atom,YunchengLiao/atom,Ju2ender/atom,pombredanne/atom,rookie125/atom,scv119/atom,rsvip/aTom,johnrizzo1/atom,t9md/atom,matthewclendening/atom,sxgao3001/atom,gisenberg/atom,liuderchi/atom,dannyflax/atom,Galactix/atom,lpommers/atom,stuartquin/atom,nrodriguez13/atom,codex8/atom,sebmck/atom,pombredanne/atom,SlimeQ/atom,avdg/atom,tanin47/atom,abcP9110/atom,amine7536/atom,BogusCurry/atom,fredericksilva/atom,githubteacher/atom,Jonekee/atom,fang-yufeng/atom,sekcheong/atom,Austen-G/BlockBuilder,panuchart/atom,elkingtonmcb/atom,xream/atom,phord/atom,Hasimir/atom,batjko/atom,prembasumatary/atom,decaffeinate-examples/atom,liuderchi/atom,MjAbuz/atom,bj7/atom,vjeux/atom,woss/atom,kjav/atom,charleswhchan/atom,matthewclendening/atom,G-Baby/atom,pengshp/atom,sekcheong/atom,PKRoma/atom,sekcheong/atom,liuderchi/atom,bcoe/atom
coffeescript
## Code Before: Peer = require './peer' Guid = require 'guid' module.exports = createPeer: -> id = Guid.create().toString() new Peer(id, host: 'ec2-54-218-51-127.us-west-2.compute.amazonaws.com', port: 8080) connectDocument: (doc, connection) -> nextOutputEventId = 1 outputListener = (event) -> event.id = nextOutputEventId++ console.log 'sending event', event.id, event connection.send(event) doc.outputEvents.on('changed', outputListener) queuedEvents = [] nextInputEventId = 1 handleInputEvent = (event) -> console.log 'received event', event.id, event doc.handleInputEvent(event) nextInputEventId = event.id + 1 flushQueuedEvents = -> loop eventHandled = false for event, index in queuedEvents when event.id is nextInputEventId handleInputEvent(event) queuedEvents.splice(index, 1) eventHandled = true break break unless eventHandled connection.on 'data', (event) -> if event.id is nextInputEventId handleInputEvent(event) flushQueuedEvents() else console.log 'enqueing event', event.id, event queuedEvents.push(event) connection.on 'close', -> doc.outputEvents.removeListener('changed', outputListener) connection.on 'error', (error) -> console.error 'connection error', error.stack ? error ## Instruction: Use PeerServer :cloud: instead of EC2 ## Code After: Peer = require './peer' Guid = require 'guid' module.exports = createPeer: -> id = Guid.create().toString() new Peer(id, key: '0njqmaln320dlsor') connectDocument: (doc, connection) -> nextOutputEventId = 1 outputListener = (event) -> event.id = nextOutputEventId++ console.log 'sending event', event.id, event connection.send(event) doc.outputEvents.on('changed', outputListener) queuedEvents = [] nextInputEventId = 1 handleInputEvent = (event) -> console.log 'received event', event.id, event doc.handleInputEvent(event) nextInputEventId = event.id + 1 flushQueuedEvents = -> loop eventHandled = false for event, index in queuedEvents when event.id is nextInputEventId handleInputEvent(event) queuedEvents.splice(index, 1) eventHandled = true break break unless eventHandled connection.on 'data', (event) -> if event.id is nextInputEventId handleInputEvent(event) flushQueuedEvents() else console.log 'enqueing event', event.id, event queuedEvents.push(event) connection.on 'close', -> doc.outputEvents.removeListener('changed', outputListener) connection.on 'error', (error) -> console.error 'connection error', error.stack ? error
60679fa6c82d5b858d9323bfeff41612c6b8b7b3
lib/parser.js
lib/parser.js
var sax = require('sax') var parser = {} parser.stream = function () { return sax.createStream({ trim: true, normalize: true, lowercase: true }) } parser.capture = function (stream) { return new Promise(function (resolve, reject) { var frames = [{}] stream.on('opentagstart', (node) => frames.push({})) stream.on('attribute', (node) => frames[frames.length - 1][node.name] = node.value) stream.on('text', (text) => text.trim().length && (frames[frames.length - 1] = text.trim())) stream.on('closetag', (name) => frames[frames.length - 2][name] = [] .concat(frames[frames.length - 2][name] || []) .concat(frames.pop())) stream.on('end', () => resolve(frames.pop())) }) } module.exports = parser
var sax = require('sax') var parser = {} parser.stream = function () { return sax.createStream({ trim: true, normalize: true, lowercase: true }) } parser.capture = function (stream) { return new Promise(function (resolve, reject) { var frames = [{}] stream.on('opentagstart', (node) => frames.push({})) stream.on('attribute', (node) => frames[frames.length - 1][node.name] = node.value) stream.on('text', (text) => text.trim().length && (frames[frames.length - 1] = text.trim())) stream.on('closetag', (name) => frames[frames.length - 2][name] = [] .concat(frames[frames.length - 2][name] || []) .concat(frames.pop())) stream.on('end', () => resolve(frames.pop())) stream.on('error', reject) }) } module.exports = parser
Throw an error if the XML is invalid.
Throw an error if the XML is invalid.
JavaScript
mpl-2.0
Schoonology/boardgamegeek
javascript
## Code Before: var sax = require('sax') var parser = {} parser.stream = function () { return sax.createStream({ trim: true, normalize: true, lowercase: true }) } parser.capture = function (stream) { return new Promise(function (resolve, reject) { var frames = [{}] stream.on('opentagstart', (node) => frames.push({})) stream.on('attribute', (node) => frames[frames.length - 1][node.name] = node.value) stream.on('text', (text) => text.trim().length && (frames[frames.length - 1] = text.trim())) stream.on('closetag', (name) => frames[frames.length - 2][name] = [] .concat(frames[frames.length - 2][name] || []) .concat(frames.pop())) stream.on('end', () => resolve(frames.pop())) }) } module.exports = parser ## Instruction: Throw an error if the XML is invalid. ## Code After: var sax = require('sax') var parser = {} parser.stream = function () { return sax.createStream({ trim: true, normalize: true, lowercase: true }) } parser.capture = function (stream) { return new Promise(function (resolve, reject) { var frames = [{}] stream.on('opentagstart', (node) => frames.push({})) stream.on('attribute', (node) => frames[frames.length - 1][node.name] = node.value) stream.on('text', (text) => text.trim().length && (frames[frames.length - 1] = text.trim())) stream.on('closetag', (name) => frames[frames.length - 2][name] = [] .concat(frames[frames.length - 2][name] || []) .concat(frames.pop())) stream.on('end', () => resolve(frames.pop())) stream.on('error', reject) }) } module.exports = parser
be22adbf134224dc99a82b97ae9e1e39766a0718
models/_query/BbiiMemberQuery.php
models/_query/BbiiMemberQuery.php
<?php namespace frontend\modules\bbii\models\_query; use yii\db\ActiveQuery; /** * Created to replace Yii1's scope concept. Yii2 uses query classes * * @since 0.0.5 */ class BbiiMemberQuery extends ActiveQuery { public function find() { return $this; } public function findAll() { return $this; } // custom query methods public function present() { return $this->andWhere([ 'last_visit > \''.date('Y-m-d H:i:s', time() - 900).'\'' ])->orderBy('last_visit DESC'); } public function show() { return $this->andWhere(['show_online' => 1]); } public function newest() { return $this->orderBy('first_visit DESC')->limit(1); } public function moderator() { return $this->andWhere(['moderator' => 1]); } }
<?php namespace frontend\modules\bbii\models\_query; use yii\db\ActiveQuery; /** * Created to replace Yii1's scope concept. Yii2 uses query classes * * @since 0.0.5 */ class BbiiMemberQuery extends ActiveQuery { public function find() { return $this; } public function findAll() { return $this; } // custom query methods public function present() { return $this->andWhere( 'last_visit > \''.date('Y-m-d H:i:s', time() - 900).'\'' )->orderBy('last_visit DESC'); } public function show() { return $this->andWhere(['show_online' => 1]); } public function newest() { return $this->orderBy('first_visit DESC')->limit(1); } public function moderator() { return $this->andWhere(['moderator' => 1]); } public function hidden() { return true; } }
FIX query class for Member MDL
FIX query class for Member MDL
PHP
bsd-2-clause
sourcetoad/bbii2,sourcetoad/bbii2
php
## Code Before: <?php namespace frontend\modules\bbii\models\_query; use yii\db\ActiveQuery; /** * Created to replace Yii1's scope concept. Yii2 uses query classes * * @since 0.0.5 */ class BbiiMemberQuery extends ActiveQuery { public function find() { return $this; } public function findAll() { return $this; } // custom query methods public function present() { return $this->andWhere([ 'last_visit > \''.date('Y-m-d H:i:s', time() - 900).'\'' ])->orderBy('last_visit DESC'); } public function show() { return $this->andWhere(['show_online' => 1]); } public function newest() { return $this->orderBy('first_visit DESC')->limit(1); } public function moderator() { return $this->andWhere(['moderator' => 1]); } } ## Instruction: FIX query class for Member MDL ## Code After: <?php namespace frontend\modules\bbii\models\_query; use yii\db\ActiveQuery; /** * Created to replace Yii1's scope concept. Yii2 uses query classes * * @since 0.0.5 */ class BbiiMemberQuery extends ActiveQuery { public function find() { return $this; } public function findAll() { return $this; } // custom query methods public function present() { return $this->andWhere( 'last_visit > \''.date('Y-m-d H:i:s', time() - 900).'\'' )->orderBy('last_visit DESC'); } public function show() { return $this->andWhere(['show_online' => 1]); } public function newest() { return $this->orderBy('first_visit DESC')->limit(1); } public function moderator() { return $this->andWhere(['moderator' => 1]); } public function hidden() { return true; } }
6024fd00e7a56fe027a33768b6867fe51337ee53
NanoProxyDbFunctions.js
NanoProxyDbFunctions.js
var NanoProxyDbFunctions = function(nano, prefix) { this.nano = nano; this.prefix = prefix; }; NanoProxyDbFunctions.prototype.create = function(name, callback) { return this.nano.db.create(prefixName.call(this, name), callback); }; function prefixName(name) { return [this.prefix, name].join("_"); } NanoProxyDbFunctions.prototype.get = function(name, callback) { }; NanoProxyDbFunctions.prototype.destroy = function(name, callback) { }; NanoProxyDbFunctions.prototype.list = function(callback) { }; NanoProxyDbFunctions.prototype.compact = function(name, designname, callback) { }; NanoProxyDbFunctions.prototype.replicate = function(source, target, opts, callback) { }; NanoProxyDbFunctions.prototype.changes = function(name, params, callback) { }; NanoProxyDbFunctions.prototype.follow = function(name, params, callback) { }; NanoProxyDbFunctions.prototype.use = function(name) { return this.nano.use([this.prefix, name].join("_")); }; module.exports = NanoProxyDbFunctions;
var NanoProxyDbFunctions = function(nano, prefix) { this.nano = nano; this.prefix = prefix; }; NanoProxyDbFunctions.prototype.create = function(name, callback) { return this.nano.db.create(prefixName.call(this, name), callback); }; function prefixName(name) { return [this.prefix, name].join("_"); } NanoProxyDbFunctions.prototype.get = function(name, callback) { }; NanoProxyDbFunctions.prototype.destroy = function(name, callback) { }; NanoProxyDbFunctions.prototype.list = function(callback) { }; NanoProxyDbFunctions.prototype.compact = function(name, designname, callback) { }; NanoProxyDbFunctions.prototype.replicate = function(source, target, opts, callback) { }; NanoProxyDbFunctions.prototype.changes = function(name, params, callback) { }; NanoProxyDbFunctions.prototype.follow = function(name, params, callback) { }; NanoProxyDbFunctions.prototype.use = function(name) { return this.nano.use(prefixName.call(this, name)); }; module.exports = NanoProxyDbFunctions;
Use prefixName abstraction in nano.use
Use prefixName abstraction in nano.use
JavaScript
isc
cube-io/prefix-nano
javascript
## Code Before: var NanoProxyDbFunctions = function(nano, prefix) { this.nano = nano; this.prefix = prefix; }; NanoProxyDbFunctions.prototype.create = function(name, callback) { return this.nano.db.create(prefixName.call(this, name), callback); }; function prefixName(name) { return [this.prefix, name].join("_"); } NanoProxyDbFunctions.prototype.get = function(name, callback) { }; NanoProxyDbFunctions.prototype.destroy = function(name, callback) { }; NanoProxyDbFunctions.prototype.list = function(callback) { }; NanoProxyDbFunctions.prototype.compact = function(name, designname, callback) { }; NanoProxyDbFunctions.prototype.replicate = function(source, target, opts, callback) { }; NanoProxyDbFunctions.prototype.changes = function(name, params, callback) { }; NanoProxyDbFunctions.prototype.follow = function(name, params, callback) { }; NanoProxyDbFunctions.prototype.use = function(name) { return this.nano.use([this.prefix, name].join("_")); }; module.exports = NanoProxyDbFunctions; ## Instruction: Use prefixName abstraction in nano.use ## Code After: var NanoProxyDbFunctions = function(nano, prefix) { this.nano = nano; this.prefix = prefix; }; NanoProxyDbFunctions.prototype.create = function(name, callback) { return this.nano.db.create(prefixName.call(this, name), callback); }; function prefixName(name) { return [this.prefix, name].join("_"); } NanoProxyDbFunctions.prototype.get = function(name, callback) { }; NanoProxyDbFunctions.prototype.destroy = function(name, callback) { }; NanoProxyDbFunctions.prototype.list = function(callback) { }; NanoProxyDbFunctions.prototype.compact = function(name, designname, callback) { }; NanoProxyDbFunctions.prototype.replicate = function(source, target, opts, callback) { }; NanoProxyDbFunctions.prototype.changes = function(name, params, callback) { }; NanoProxyDbFunctions.prototype.follow = function(name, params, callback) { }; NanoProxyDbFunctions.prototype.use = function(name) { return this.nano.use(prefixName.call(this, name)); }; module.exports = NanoProxyDbFunctions;
e09b563883b3663f8a619ede638ac651e2f84d55
.travis.yml
.travis.yml
language: php php: - 5.4 - 5.5 - 5.6 - nightly - hhvm - hhvm-nightly branches: only: - master - /^\d+\.\d+$/ matrix: include: - php: 5.5 env: SYMFONY_VERSION=2.3.* - php: 5.5 env: SYMFONY_VERSION=2.4.* - php: 5.5 env: SYMFONY_VERSION=2.6.* - php: 5.5 env: SYMFONY_VERSION='2.7.*@dev' allow_failures: - php: nightly - php: hhvm-nightly before_script: - composer self-update - sh -c 'if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/symfony=$SYMFONY_VERSION; fi;' - composer update --prefer-dist script: - mkdir -p build/logs - phpunit --coverage-clover build/logs/clover.xml after_success:   - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then php vendor/bin/coveralls -v --config .coveralls.yml; fi;' notifications: email: pierstoval@gmail.com
language: php php: - 5.4 - 5.5 - 5.6 - nightly - hhvm - hhvm-nightly branches: only: - master - /^\d+\.\d+$/ matrix: include: - php: 5.5 env: SYMFONY_VERSION=2.3.* - php: 5.5 env: SYMFONY_VERSION=2.4.* - php: 5.5 env: SYMFONY_VERSION=2.6.* - php: 5.5 env: SYMFONY_VERSION='2.7.*@dev' allow_failures: - php: nightly - php: hhvm-nightly before_script: - composer self-update - sh -c 'if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/symfony=$SYMFONY_VERSION; fi;' - composer update --prefer-dist script: - mkdir -p build/logs - phpunit --coverage-clover build/logs/clover.xml after_success: | sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" -a "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then php vendor/bin/coveralls -v --config .coveralls.yml; fi;' notifications: email: pierstoval@gmail.com
Change the after_success script to be more correct
Change the after_success script to be more correct
YAML
mit
Orbitale/CmsBundle,Orbitale/CmsBundle
yaml
## Code Before: language: php php: - 5.4 - 5.5 - 5.6 - nightly - hhvm - hhvm-nightly branches: only: - master - /^\d+\.\d+$/ matrix: include: - php: 5.5 env: SYMFONY_VERSION=2.3.* - php: 5.5 env: SYMFONY_VERSION=2.4.* - php: 5.5 env: SYMFONY_VERSION=2.6.* - php: 5.5 env: SYMFONY_VERSION='2.7.*@dev' allow_failures: - php: nightly - php: hhvm-nightly before_script: - composer self-update - sh -c 'if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/symfony=$SYMFONY_VERSION; fi;' - composer update --prefer-dist script: - mkdir -p build/logs - phpunit --coverage-clover build/logs/clover.xml after_success:   - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then php vendor/bin/coveralls -v --config .coveralls.yml; fi;' notifications: email: pierstoval@gmail.com ## Instruction: Change the after_success script to be more correct ## Code After: language: php php: - 5.4 - 5.5 - 5.6 - nightly - hhvm - hhvm-nightly branches: only: - master - /^\d+\.\d+$/ matrix: include: - php: 5.5 env: SYMFONY_VERSION=2.3.* - php: 5.5 env: SYMFONY_VERSION=2.4.* - php: 5.5 env: SYMFONY_VERSION=2.6.* - php: 5.5 env: SYMFONY_VERSION='2.7.*@dev' allow_failures: - php: nightly - php: hhvm-nightly before_script: - composer self-update - sh -c 'if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/symfony=$SYMFONY_VERSION; fi;' - composer update --prefer-dist script: - mkdir -p build/logs - phpunit --coverage-clover build/logs/clover.xml after_success: | sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" -a "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then php vendor/bin/coveralls -v --config .coveralls.yml; fi;' notifications: email: pierstoval@gmail.com
c1ff52c1c4a416fc250edaca8fdfbe7a744d5b0c
packages/zmarkdown/config/sanitize/index.js
packages/zmarkdown/config/sanitize/index.js
const gh = require('hast-util-sanitize/lib/github') const katex = require('./katex') const merge = require('deepmerge') module.exports = merge.all([gh, katex, { tagNames: ['span', 'abbr', 'figure', 'figcaption', 'iframe'], attributes: { a: ['ariaHidden', 'class', 'className'], div: ['id', 'class', 'className'], span: ['id', 'data-count', 'class', 'className'], h1: ['ariaHidden'], h2: ['ariaHidden'], h3: ['ariaHidden'], abbr: ['title'], img: ['class'], code: ['className'], th: ['colspan', 'colSpan', 'rowSpan', 'rowspan'], td: ['colspan', 'colSpan', 'rowSpan', 'rowspan'], iframe: ['allowfullscreen', 'frameborder', 'height', 'src', 'width'], }, protocols: { href: ['ftp', 'dav', 'sftp', 'magnet', 'tftp', 'view-source'], src: ['ftp', 'dav', 'sftp', 'tftp'], }, clobberPrefix: '', clobber: [], }])
const gh = require('hast-util-sanitize/lib/github') const katex = require('./katex') const merge = require('deepmerge') module.exports = merge.all([gh, katex, { tagNames: ['span', 'abbr', 'figure', 'figcaption', 'iframe'], attributes: { a: ['ariaHidden', 'class', 'className'], abbr: ['title'], code: ['class', 'className'], details: ['class', 'className'], div: ['id', 'class', 'className'], h1: ['ariaHidden'], h2: ['ariaHidden'], h3: ['ariaHidden'], iframe: ['allowfullscreen', 'frameborder', 'height', 'src', 'width'], img: ['class', 'className'], span: ['id', 'data-count', 'class', 'className'], summary: ['class', 'className'], th: ['colspan', 'colSpan', 'rowSpan', 'rowspan'], td: ['colspan', 'colSpan', 'rowSpan', 'rowspan'], }, protocols: { href: ['ftp', 'dav', 'sftp', 'magnet', 'tftp', 'view-source'], src: ['ftp', 'dav', 'sftp', 'tftp'], }, clobberPrefix: '', clobber: [], }])
Allow using details for custom-blocks
[zmarkdown] Allow using details for custom-blocks
JavaScript
mit
zestedesavoir/zmarkdown,zestedesavoir/zmarkdown,zestedesavoir/zmarkdown
javascript
## Code Before: const gh = require('hast-util-sanitize/lib/github') const katex = require('./katex') const merge = require('deepmerge') module.exports = merge.all([gh, katex, { tagNames: ['span', 'abbr', 'figure', 'figcaption', 'iframe'], attributes: { a: ['ariaHidden', 'class', 'className'], div: ['id', 'class', 'className'], span: ['id', 'data-count', 'class', 'className'], h1: ['ariaHidden'], h2: ['ariaHidden'], h3: ['ariaHidden'], abbr: ['title'], img: ['class'], code: ['className'], th: ['colspan', 'colSpan', 'rowSpan', 'rowspan'], td: ['colspan', 'colSpan', 'rowSpan', 'rowspan'], iframe: ['allowfullscreen', 'frameborder', 'height', 'src', 'width'], }, protocols: { href: ['ftp', 'dav', 'sftp', 'magnet', 'tftp', 'view-source'], src: ['ftp', 'dav', 'sftp', 'tftp'], }, clobberPrefix: '', clobber: [], }]) ## Instruction: [zmarkdown] Allow using details for custom-blocks ## Code After: const gh = require('hast-util-sanitize/lib/github') const katex = require('./katex') const merge = require('deepmerge') module.exports = merge.all([gh, katex, { tagNames: ['span', 'abbr', 'figure', 'figcaption', 'iframe'], attributes: { a: ['ariaHidden', 'class', 'className'], abbr: ['title'], code: ['class', 'className'], details: ['class', 'className'], div: ['id', 'class', 'className'], h1: ['ariaHidden'], h2: ['ariaHidden'], h3: ['ariaHidden'], iframe: ['allowfullscreen', 'frameborder', 'height', 'src', 'width'], img: ['class', 'className'], span: ['id', 'data-count', 'class', 'className'], summary: ['class', 'className'], th: ['colspan', 'colSpan', 'rowSpan', 'rowspan'], td: ['colspan', 'colSpan', 'rowSpan', 'rowspan'], }, protocols: { href: ['ftp', 'dav', 'sftp', 'magnet', 'tftp', 'view-source'], src: ['ftp', 'dav', 'sftp', 'tftp'], }, clobberPrefix: '', clobber: [], }])
79c0a4679ca03fb50fb1a641073358214a32cb6b
docs/package.json
docs/package.json
{ "scripts": { "start": "gatsby develop --prefix-paths" }, "dependencies": { "gatsby": "2.3.14", "gatsby-theme-apollo-docs": "0.2.47" } }
{ "scripts": { "start": "gatsby develop" }, "dependencies": { "gatsby": "2.3.14", "gatsby-theme-apollo-docs": "0.2.47" } }
Remove --prefix-paths option in development
Remove --prefix-paths option in development
JSON
mit
apollographql/apollo-android,apollostack/apollo-android,apollographql/apollo-android,apollographql/apollo-android,apollostack/apollo-android,apollostack/apollo-android
json
## Code Before: { "scripts": { "start": "gatsby develop --prefix-paths" }, "dependencies": { "gatsby": "2.3.14", "gatsby-theme-apollo-docs": "0.2.47" } } ## Instruction: Remove --prefix-paths option in development ## Code After: { "scripts": { "start": "gatsby develop" }, "dependencies": { "gatsby": "2.3.14", "gatsby-theme-apollo-docs": "0.2.47" } }
932aba59fb6ed88e22afcf4183ea73a69321ab16
resources/chat-client/client.js
resources/chat-client/client.js
var CHAT_SERVER = "http://localhost:7000" var DEFAULT_USERNAME = "Guest"; $(document).ready(function(){ var socket = io.connect(CHAT_SERVER); socket.on('welcome', showGreetings); socket.on('message', showIncomingMessage); socket.on('info', showSystemInfo); addWaterMark(); sendButtonOnClick(); changeButtonOnClick(); function showGreetings(msg){ $("#title").text(msg['greetings']); } function showIncomingMessage(msg){ $("#messages").append("<div class='in-message'>" + msg['msgOwner'] + ": " + msg['msgContent'] + "</div>"); } function addWaterMark(){ $("#outgoing-message").watermark("Enter your message here"); } function sendButtonOnClick(){ $("#send").click(function(){ var msg = $("#outgoing-message").val(); showOutgoingMessage(msg); socket.emit('message', msg); }); } function showOutgoingMessage(msg){ $("#messages").append("<div class='out-message'>Me: " + msg + "</div>"); } function showSystemInfo(msg){ $("#messages").append("<div class='info-message'>" + msg['msgOwner'] + ": " + msg['msgContent'] + "</div>"); } function changeButtonOnClick(){ $("#change").click(function(){ var username = $("#username").val(); if(!username) username = DEFAULT_USERNAME; registerUsername(username); }); } function registerUsername(username){ socket.emit('user-join', username); } });
var CHAT_SERVER = "http://localhost:7000" var DEFAULT_USERNAME = "Guest"; $(document).ready(function(){ var socket = io.connect(CHAT_SERVER); socket.on('welcome', showGreetings); socket.on('message', showIncomingMessage); socket.on('info', showSystemInfo); addWaterMark(); sendButtonOnClick(); changeButtonOnClick(); function showGreetings(msg){ $("#title").text(msg['greetings']); } function showIncomingMessage(msg){ $("#messages").append("<div class='in-message'>" + msg['msgOwner'] + ": " + msg['msgContent'] + "</div>"); } function addWaterMark(){ $("#outgoing-message").watermark("Enter your message here"); } function sendButtonOnClick(){ $("#send").click(function(){ var msg = $("#outgoing-message").val(); showOutgoingMessage(msg); $("#outgoing-message").val(''); socket.emit('message', msg); }); } function showOutgoingMessage(msg){ $("#messages").append("<div class='out-message'>Me: " + msg + "</div>"); } function showSystemInfo(msg){ $("#messages").append("<div class='info-message'>" + msg['msgOwner'] + ": " + msg['msgContent'] + "</div>"); } function changeButtonOnClick(){ $("#change").click(function(){ var username = $("#username").val(); if(!username) username = DEFAULT_USERNAME; registerUsername(username); }); } function registerUsername(username){ socket.emit('user-join', username); } });
Clear message textbox after message is sent.
Clear message textbox after message is sent.
JavaScript
mit
ihcsim/nodejs-tutorial,ihcsim/node-tutorial,ihcsim/nodejs-tutorial
javascript
## Code Before: var CHAT_SERVER = "http://localhost:7000" var DEFAULT_USERNAME = "Guest"; $(document).ready(function(){ var socket = io.connect(CHAT_SERVER); socket.on('welcome', showGreetings); socket.on('message', showIncomingMessage); socket.on('info', showSystemInfo); addWaterMark(); sendButtonOnClick(); changeButtonOnClick(); function showGreetings(msg){ $("#title").text(msg['greetings']); } function showIncomingMessage(msg){ $("#messages").append("<div class='in-message'>" + msg['msgOwner'] + ": " + msg['msgContent'] + "</div>"); } function addWaterMark(){ $("#outgoing-message").watermark("Enter your message here"); } function sendButtonOnClick(){ $("#send").click(function(){ var msg = $("#outgoing-message").val(); showOutgoingMessage(msg); socket.emit('message', msg); }); } function showOutgoingMessage(msg){ $("#messages").append("<div class='out-message'>Me: " + msg + "</div>"); } function showSystemInfo(msg){ $("#messages").append("<div class='info-message'>" + msg['msgOwner'] + ": " + msg['msgContent'] + "</div>"); } function changeButtonOnClick(){ $("#change").click(function(){ var username = $("#username").val(); if(!username) username = DEFAULT_USERNAME; registerUsername(username); }); } function registerUsername(username){ socket.emit('user-join', username); } }); ## Instruction: Clear message textbox after message is sent. ## Code After: var CHAT_SERVER = "http://localhost:7000" var DEFAULT_USERNAME = "Guest"; $(document).ready(function(){ var socket = io.connect(CHAT_SERVER); socket.on('welcome', showGreetings); socket.on('message', showIncomingMessage); socket.on('info', showSystemInfo); addWaterMark(); sendButtonOnClick(); changeButtonOnClick(); function showGreetings(msg){ $("#title").text(msg['greetings']); } function showIncomingMessage(msg){ $("#messages").append("<div class='in-message'>" + msg['msgOwner'] + ": " + msg['msgContent'] + "</div>"); } function addWaterMark(){ $("#outgoing-message").watermark("Enter your message here"); } function sendButtonOnClick(){ $("#send").click(function(){ var msg = $("#outgoing-message").val(); showOutgoingMessage(msg); $("#outgoing-message").val(''); socket.emit('message', msg); }); } function showOutgoingMessage(msg){ $("#messages").append("<div class='out-message'>Me: " + msg + "</div>"); } function showSystemInfo(msg){ $("#messages").append("<div class='info-message'>" + msg['msgOwner'] + ": " + msg['msgContent'] + "</div>"); } function changeButtonOnClick(){ $("#change").click(function(){ var username = $("#username").val(); if(!username) username = DEFAULT_USERNAME; registerUsername(username); }); } function registerUsername(username){ socket.emit('user-join', username); } });
4731e9f537e2f38bdabf086d9cd3fe4abec35b6d
client/app/bundles/HelloWorld/components/admin_dashboard/admin_dashboard_top.jsx
client/app/bundles/HelloWorld/components/admin_dashboard/admin_dashboard_top.jsx
import React from 'react' export default React.createClass({ render: function () { return ( <div className="admin-dashboard-top"> <div className="row"> <div className="col-xs-12 col-md-7"> <a href="mailto:ryan@quill.org?subject=Bulk Upload Teachers via CSV&body=Please attach your CSV file to this email."> <button className="button-green">Bulk Upload Teachers via CSV</button> </a> </div> <div className="col-xs-12 col-md-5 representative"> <div className='row'> <div className='col-xs-12'> <h4 className='representative-header'>Your Personal Quill Premium Representative</h4> </div> </div> <div className="row"> <div className="col-xs-3"> <div className='thumb-elliot' /> </div> <div className="col-xs-9"> <h3>Elliot Mandel</h3> <p>{"As your Quill Representative, I'm here to help!"}</p> <div className='representative-contact'> <p>646-820-7136</p> <p> <a className='green-link' href="mailto:elliot@quill.org">elliot@quill.org</a> </p> </div> </div> </div> </div> </div> </div> ) } })
import React from 'react' export default React.createClass({ render: function () { return ( <div className="admin-dashboard-top"> <div className="row"> <div className="col-xs-12 col-md-7"> <a href="mailto:ryan@quill.org?subject=Bulk Upload Teachers via CSV&body=Please attach your CSV file to this email."> <button className="button-green">Bulk Upload Teachers via CSV</button> </a> </div> <div className="col-xs-12 col-md-5 representative"> <div className='row'> <div className='col-xs-12'> <h4 className='representative-header'>Your Personal Quill Premium Representative</h4> </div> </div> <div className="row"> <div className="col-xs-3"> <div className='thumb-hannah' /> </div> <div className="col-xs-9"> <h3>Hannah Monk</h3> <p>{"As your Quill representative, I'm here to help!"}</p> <div className='representative-contact'> <p>646-442-1095</p> <p> <a className='green-link' href="mailto:hannah@quill.org">hannah@quill.org</a> </p> </div> </div> </div> </div> </div> </div> ) } })
Update admin dashboard with Hannah
Update admin dashboard with Hannah Replaced elliot with hannah
JSX
agpl-3.0
empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core
jsx
## Code Before: import React from 'react' export default React.createClass({ render: function () { return ( <div className="admin-dashboard-top"> <div className="row"> <div className="col-xs-12 col-md-7"> <a href="mailto:ryan@quill.org?subject=Bulk Upload Teachers via CSV&body=Please attach your CSV file to this email."> <button className="button-green">Bulk Upload Teachers via CSV</button> </a> </div> <div className="col-xs-12 col-md-5 representative"> <div className='row'> <div className='col-xs-12'> <h4 className='representative-header'>Your Personal Quill Premium Representative</h4> </div> </div> <div className="row"> <div className="col-xs-3"> <div className='thumb-elliot' /> </div> <div className="col-xs-9"> <h3>Elliot Mandel</h3> <p>{"As your Quill Representative, I'm here to help!"}</p> <div className='representative-contact'> <p>646-820-7136</p> <p> <a className='green-link' href="mailto:elliot@quill.org">elliot@quill.org</a> </p> </div> </div> </div> </div> </div> </div> ) } }) ## Instruction: Update admin dashboard with Hannah Replaced elliot with hannah ## Code After: import React from 'react' export default React.createClass({ render: function () { return ( <div className="admin-dashboard-top"> <div className="row"> <div className="col-xs-12 col-md-7"> <a href="mailto:ryan@quill.org?subject=Bulk Upload Teachers via CSV&body=Please attach your CSV file to this email."> <button className="button-green">Bulk Upload Teachers via CSV</button> </a> </div> <div className="col-xs-12 col-md-5 representative"> <div className='row'> <div className='col-xs-12'> <h4 className='representative-header'>Your Personal Quill Premium Representative</h4> </div> </div> <div className="row"> <div className="col-xs-3"> <div className='thumb-hannah' /> </div> <div className="col-xs-9"> <h3>Hannah Monk</h3> <p>{"As your Quill representative, I'm here to help!"}</p> <div className='representative-contact'> <p>646-442-1095</p> <p> <a className='green-link' href="mailto:hannah@quill.org">hannah@quill.org</a> </p> </div> </div> </div> </div> </div> </div> ) } })
668a644272051f9aa76c53c49be853859ac75ad9
app/views/groups/show.html.erb
app/views/groups/show.html.erb
<% add_body_classes "map" %> <% page_heading "Group" %> <div id="inner"> <div id="title"> <h1><%= @group.name %></h1> <h2> TerraLing </h2> </div> <div id="intro"> <%- if @group.description.present? -%> <p><%= @group.description %></p> <% end %> <p> <%- @group.info_attribute_names.each do |attr_name| -%> <span class="strong"><%= attr_name.titleize %>:</span> <%= @group.send(attr_name) %> <br /> <%- end -%> </p> <p> <% if can? :update, @group %> <%= link_to 'Edit', edit_group_path(@group) %> | <% end %> <%= link_to 'Groups', groups_path %> </p> </div> </div>
<% add_body_classes "map" %> <% page_heading "Group" %> <div id="inner"> <div id="title"> <h1><%= @group.name %></h1> <h2> TerraLing </h2> </div> <div id="intro"> <%- if @group.description.present? -%> <p><%= @group.description %></p> <% end %> <p> <%- @group.info_attribute_names.each do |attr_name| -%> <span class="strong"><%= attr_name.titleize %>:</span> <%= @group.send(attr_name) %> <br /> <%- end -%> </p> <p> <% if can? :update, @group %> <%= link_to 'Edit', edit_group_path(@group) %> | <% end %> <%= link_to 'Search this group', [:new, current_group, :search] %> | <%= link_to 'All groups', groups_path %> </p> </div> </div>
Add search link to group home
Add search link to group home
HTML+ERB
mit
linguisticexplorer/Linguistic-Explorer,linguisticexplorer/Linguistic-Explorer,linguisticexplorer/Linguistic-Explorer
html+erb
## Code Before: <% add_body_classes "map" %> <% page_heading "Group" %> <div id="inner"> <div id="title"> <h1><%= @group.name %></h1> <h2> TerraLing </h2> </div> <div id="intro"> <%- if @group.description.present? -%> <p><%= @group.description %></p> <% end %> <p> <%- @group.info_attribute_names.each do |attr_name| -%> <span class="strong"><%= attr_name.titleize %>:</span> <%= @group.send(attr_name) %> <br /> <%- end -%> </p> <p> <% if can? :update, @group %> <%= link_to 'Edit', edit_group_path(@group) %> | <% end %> <%= link_to 'Groups', groups_path %> </p> </div> </div> ## Instruction: Add search link to group home ## Code After: <% add_body_classes "map" %> <% page_heading "Group" %> <div id="inner"> <div id="title"> <h1><%= @group.name %></h1> <h2> TerraLing </h2> </div> <div id="intro"> <%- if @group.description.present? -%> <p><%= @group.description %></p> <% end %> <p> <%- @group.info_attribute_names.each do |attr_name| -%> <span class="strong"><%= attr_name.titleize %>:</span> <%= @group.send(attr_name) %> <br /> <%- end -%> </p> <p> <% if can? :update, @group %> <%= link_to 'Edit', edit_group_path(@group) %> | <% end %> <%= link_to 'Search this group', [:new, current_group, :search] %> | <%= link_to 'All groups', groups_path %> </p> </div> </div>
d00ce63fc62d7a977c8ba9aac97a75725201202e
modules/govuk/templates/sidekiq_monitoring_nginx_config.conf.erb
modules/govuk/templates/sidekiq_monitoring_nginx_config.conf.erb
server { server_name <%= @full_domain %>; listen localhost:80; proxy_connect_timeout 1s; proxy_read_timeout 15s; access_log /var/log/nginx/<%= @full_domain %>-access.log timed_combined; access_log /var/log/nginx/<%= @full_domain %>-json.event.access.log json_event; error_log /var/log/nginx/<%= @full_domain %>-error.log; location / { try_files $uri/index.html $uri.html $uri @app; } location /publisher { proxy_pass http://localhost:3079; } location /signon { proxy_pass http://localhost:3080; } location /whitehall { proxy_pass http://localhost:3081; } location /transition { proxy_pass http://localhost:3086; } root /data/vhost/<%= @full_domain %>/current/public; }
server { server_name <%= @full_domain %>; listen localhost:80; proxy_connect_timeout 1s; proxy_read_timeout 15s; access_log /var/log/nginx/<%= @full_domain %>-access.log timed_combined; access_log /var/log/nginx/<%= @full_domain %>-json.event.access.log json_event; error_log /var/log/nginx/<%= @full_domain %>-error.log; location / { try_files $uri/index.html $uri.html $uri @app; } location /publisher { proxy_pass http://localhost:3079; } location /signon { proxy_pass http://localhost:3080; } location /whitehall { proxy_pass http://localhost:3081; } location /transition { proxy_pass http://localhost:3086; } location /email-alert-api { proxy_pass http://localhost:3089; } root /data/vhost/<%= @full_domain %>/current/public; }
Add a path for email-alert-api sidekiq monitoring
Add a path for email-alert-api sidekiq monitoring To allow monitoring of the email-alert-api add a path to the nginx vhost https://www.pivotaltracker.com/story/show/82469592
HTML+ERB
mit
alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet
html+erb
## Code Before: server { server_name <%= @full_domain %>; listen localhost:80; proxy_connect_timeout 1s; proxy_read_timeout 15s; access_log /var/log/nginx/<%= @full_domain %>-access.log timed_combined; access_log /var/log/nginx/<%= @full_domain %>-json.event.access.log json_event; error_log /var/log/nginx/<%= @full_domain %>-error.log; location / { try_files $uri/index.html $uri.html $uri @app; } location /publisher { proxy_pass http://localhost:3079; } location /signon { proxy_pass http://localhost:3080; } location /whitehall { proxy_pass http://localhost:3081; } location /transition { proxy_pass http://localhost:3086; } root /data/vhost/<%= @full_domain %>/current/public; } ## Instruction: Add a path for email-alert-api sidekiq monitoring To allow monitoring of the email-alert-api add a path to the nginx vhost https://www.pivotaltracker.com/story/show/82469592 ## Code After: server { server_name <%= @full_domain %>; listen localhost:80; proxy_connect_timeout 1s; proxy_read_timeout 15s; access_log /var/log/nginx/<%= @full_domain %>-access.log timed_combined; access_log /var/log/nginx/<%= @full_domain %>-json.event.access.log json_event; error_log /var/log/nginx/<%= @full_domain %>-error.log; location / { try_files $uri/index.html $uri.html $uri @app; } location /publisher { proxy_pass http://localhost:3079; } location /signon { proxy_pass http://localhost:3080; } location /whitehall { proxy_pass http://localhost:3081; } location /transition { proxy_pass http://localhost:3086; } location /email-alert-api { proxy_pass http://localhost:3089; } root /data/vhost/<%= @full_domain %>/current/public; }
8dc959a5c8d07783c6af578624d81a2244c1c979
arch/roles/base/tasks/pacman.yml
arch/roles/base/tasks/pacman.yml
--- - name: install makepkg configuration become: true template: src: makepkg.conf.j2 dest: /etc/makepkg.conf owner: root group: root mode: 0644 - name: install pacman configuration become: true template: src: pacman.conf.j2 dest: /etc/pacman.conf owner: root group: root mode: 0644 - name: install extra pacman-related packages become: true pacman: name: - expac - asp
--- - name: install makepkg configuration become: true template: src: makepkg.conf.j2 dest: /etc/makepkg.conf owner: root group: root mode: 0644 - name: install pacman configuration become: true template: src: pacman.conf.j2 dest: /etc/pacman.conf owner: root group: root mode: 0644 - name: install extra pacman-related packages become: true pacman: name: - expac - asp - devtools - namcap - pacutils - pkgfile - aurpublish
Add more packaging related packages
Add more packaging related packages
YAML
mpl-2.0
mfinelli/arch-install
yaml
## Code Before: --- - name: install makepkg configuration become: true template: src: makepkg.conf.j2 dest: /etc/makepkg.conf owner: root group: root mode: 0644 - name: install pacman configuration become: true template: src: pacman.conf.j2 dest: /etc/pacman.conf owner: root group: root mode: 0644 - name: install extra pacman-related packages become: true pacman: name: - expac - asp ## Instruction: Add more packaging related packages ## Code After: --- - name: install makepkg configuration become: true template: src: makepkg.conf.j2 dest: /etc/makepkg.conf owner: root group: root mode: 0644 - name: install pacman configuration become: true template: src: pacman.conf.j2 dest: /etc/pacman.conf owner: root group: root mode: 0644 - name: install extra pacman-related packages become: true pacman: name: - expac - asp - devtools - namcap - pacutils - pkgfile - aurpublish
f853e82a555fa9d4cd654e300ae9c12e13cc0d6d
templates/CarouselSlide.ss
templates/CarouselSlide.ss
<div class="slick-carousel-slide"> $Image <% if $Content %> <div class="slick-carousel-slide-content"> $Content </div> <% end_if %> </div>
<div class="slick-carousel-slide" style="background-image: url('$Image.Link.XML');"> <% if $Content %> <div class="slick-carousel-slide-content"> $Content </div> <% end_if %> </div>
Implement the slide image as a background image instead of a separate <img> element.
Implement the slide image as a background image instead of a separate <img> element.
Scheme
mit
Taitava/silverstripe-slickcarousel,Taitava/silverstripe-slickcarousel
scheme
## Code Before: <div class="slick-carousel-slide"> $Image <% if $Content %> <div class="slick-carousel-slide-content"> $Content </div> <% end_if %> </div> ## Instruction: Implement the slide image as a background image instead of a separate <img> element. ## Code After: <div class="slick-carousel-slide" style="background-image: url('$Image.Link.XML');"> <% if $Content %> <div class="slick-carousel-slide-content"> $Content </div> <% end_if %> </div>
3816849e62724eace5fa06bee9006a7f56933bad
.travis.yml
.travis.yml
language: ruby rvm: - 2.2.1 before_install: gem install bundler -v 1.10.6
language: ruby rvm: - 2.0.0 - 2.1.0 - 2.2.0 - 2.2.1 - ruby-head before_install: gem install bundler -v 1.10.6 addons: code_climate: repo_token: aaa2bcd71ac641474a13caabe294beeb26abcc7c4dd82f3395a7b9193bb20d02
Test on a few Ruby versions & notify code_climate
Test on a few Ruby versions & notify code_climate
YAML
mit
rob-murray/five-star,rob-murray/five-star
yaml
## Code Before: language: ruby rvm: - 2.2.1 before_install: gem install bundler -v 1.10.6 ## Instruction: Test on a few Ruby versions & notify code_climate ## Code After: language: ruby rvm: - 2.0.0 - 2.1.0 - 2.2.0 - 2.2.1 - ruby-head before_install: gem install bundler -v 1.10.6 addons: code_climate: repo_token: aaa2bcd71ac641474a13caabe294beeb26abcc7c4dd82f3395a7b9193bb20d02
54a3f902d061a4c6f17a551f0f3a4b49d2df96d3
lib/hamlit/block/script_compiler_extension.rb
lib/hamlit/block/script_compiler_extension.rb
module Hamlit module Block # Suppress block's internal rendering result and pass it to [:capture, ...]. module ScriptCompilerExtension def compile_script_assign(var, node, &block) if node.children.empty? super else [:multi, [:block, "#{var} = #{node.value[:text]}", [:multi, [:newline], [:capture, var, yield(node)], ], ], ] end end end end end
module Hamlit module Block # Suppress block's internal rendering result and pass it to [:capture, ...]. module ScriptCompilerExtension def compile_script_assign(var, node, &block) if node.children.empty? super else [:multi, [:block, "#{var} = #{node.value[:text]}", [:multi, [:newline], [:capture, @identity.generate, yield(node)], ], ], ] end end end end end
Use another local variable inside block
Use another local variable inside block
Ruby
mit
hamlit/hamlit-block,hamlit/hamlit-block
ruby
## Code Before: module Hamlit module Block # Suppress block's internal rendering result and pass it to [:capture, ...]. module ScriptCompilerExtension def compile_script_assign(var, node, &block) if node.children.empty? super else [:multi, [:block, "#{var} = #{node.value[:text]}", [:multi, [:newline], [:capture, var, yield(node)], ], ], ] end end end end end ## Instruction: Use another local variable inside block ## Code After: module Hamlit module Block # Suppress block's internal rendering result and pass it to [:capture, ...]. module ScriptCompilerExtension def compile_script_assign(var, node, &block) if node.children.empty? super else [:multi, [:block, "#{var} = #{node.value[:text]}", [:multi, [:newline], [:capture, @identity.generate, yield(node)], ], ], ] end end end end end
3595402d65685ce014504d2cad30ca32623f2248
src/IP2LocLite/Commands/DownloadCsvCommand.php
src/IP2LocLite/Commands/DownloadCsvCommand.php
<?php namespace NemC\IP2LocLite\Commands; use Illuminate\Console\Command, NemC\IP2LocLite\Services\IP2LocLiteService, NemC\IP2LocLite\Exceptions\NotLoggedInResponseException, NemC\IP2LocLite\Exceptions\UnsupportedDatabaseCommandException; class DownloadCsvCommand extends Command { protected $name = 'ip2loclite:download-csv'; protected $description = 'Login to IP2Location user panel and download required csv'; protected $ip2LocLite; public function __construct(IP2LocLiteService $IP2LocLiteService) { parent::__construct(); $this->ip2LocLite = $IP2LocLiteService; } public function fire() { $database = Config::get('ip2loc-lite.database'); try { $this->ip2LocLite->isSupportedDatabase($database); } catch (UnsupportedDatabaseCommandException $e) { $this->error('Free IP2Location database "' . $database . '"" is not supported by IP2LocLite at this point'); return false; } try { $this->ip2LocLite->login(); } catch (NotLoggedInResponseException $e) { $this->error('Could not log you in with user authentication details provided'); return false; } $this->ip2LocLite->downloadCsv($database); $this->info('Latest version of IP2Location database ' . $database . ' has been downloaded'); } }
<?php namespace NemC\IP2LocLite\Commands; use Illuminate\Console\Config, Illuminate\Console\Command, NemC\IP2LocLite\Services\IP2LocLiteService, NemC\IP2LocLite\Exceptions\NotLoggedInResponseException, NemC\IP2LocLite\Exceptions\UnsupportedDatabaseCommandException; class DownloadCsvCommand extends Command { protected $name = 'ip2loclite:download-csv'; protected $description = 'Login to IP2Location user panel and download required csv'; protected $ip2LocLite; public function __construct(IP2LocLiteService $IP2LocLiteService) { parent::__construct(); $this->ip2LocLite = $IP2LocLiteService; } public function fire() { $database = Config::get('ip2loc-lite.database'); try { $this->ip2LocLite->isSupportedDatabase($database); } catch (UnsupportedDatabaseCommandException $e) { $this->error('Free IP2Location database "' . $database . '"" is not supported by IP2LocLite at this point'); return false; } try { $this->ip2LocLite->login(); } catch (NotLoggedInResponseException $e) { $this->error('Could not log you in with user authentication details provided'); return false; } $this->ip2LocLite->downloadCsv($database); $this->info('Latest version of IP2Location database ' . $database . ' has been downloaded'); } }
Fix Config loading in DownloadCsv
Fix Config loading in DownloadCsv
PHP
mit
nem-c/ip2loc-lite
php
## Code Before: <?php namespace NemC\IP2LocLite\Commands; use Illuminate\Console\Command, NemC\IP2LocLite\Services\IP2LocLiteService, NemC\IP2LocLite\Exceptions\NotLoggedInResponseException, NemC\IP2LocLite\Exceptions\UnsupportedDatabaseCommandException; class DownloadCsvCommand extends Command { protected $name = 'ip2loclite:download-csv'; protected $description = 'Login to IP2Location user panel and download required csv'; protected $ip2LocLite; public function __construct(IP2LocLiteService $IP2LocLiteService) { parent::__construct(); $this->ip2LocLite = $IP2LocLiteService; } public function fire() { $database = Config::get('ip2loc-lite.database'); try { $this->ip2LocLite->isSupportedDatabase($database); } catch (UnsupportedDatabaseCommandException $e) { $this->error('Free IP2Location database "' . $database . '"" is not supported by IP2LocLite at this point'); return false; } try { $this->ip2LocLite->login(); } catch (NotLoggedInResponseException $e) { $this->error('Could not log you in with user authentication details provided'); return false; } $this->ip2LocLite->downloadCsv($database); $this->info('Latest version of IP2Location database ' . $database . ' has been downloaded'); } } ## Instruction: Fix Config loading in DownloadCsv ## Code After: <?php namespace NemC\IP2LocLite\Commands; use Illuminate\Console\Config, Illuminate\Console\Command, NemC\IP2LocLite\Services\IP2LocLiteService, NemC\IP2LocLite\Exceptions\NotLoggedInResponseException, NemC\IP2LocLite\Exceptions\UnsupportedDatabaseCommandException; class DownloadCsvCommand extends Command { protected $name = 'ip2loclite:download-csv'; protected $description = 'Login to IP2Location user panel and download required csv'; protected $ip2LocLite; public function __construct(IP2LocLiteService $IP2LocLiteService) { parent::__construct(); $this->ip2LocLite = $IP2LocLiteService; } public function fire() { $database = Config::get('ip2loc-lite.database'); try { $this->ip2LocLite->isSupportedDatabase($database); } catch (UnsupportedDatabaseCommandException $e) { $this->error('Free IP2Location database "' . $database . '"" is not supported by IP2LocLite at this point'); return false; } try { $this->ip2LocLite->login(); } catch (NotLoggedInResponseException $e) { $this->error('Could not log you in with user authentication details provided'); return false; } $this->ip2LocLite->downloadCsv($database); $this->info('Latest version of IP2Location database ' . $database . ' has been downloaded'); } }
8f51331a6440350f34fc127501ecf2824a97a215
petridish/src/main/java/org/nusco/narjillos/views/utilities/PetriDishState.java
petridish/src/main/java/org/nusco/narjillos/views/utilities/PetriDishState.java
package org.nusco.narjillos.views.utilities; public class PetriDishState { private volatile Light light = Light.ON; private volatile Speed speed = Speed.REALTIME; public Light getLight() { return light; } public Speed getSpeed() { return speed; } public void toggleLight() { if (light == Light.INFRARED) this.light = Light.ON; else if (light == Light.ON) { this.light = Light.OFF; this.speed = Speed.HIGH; } else { this.light = Light.ON; this.speed = Speed.REALTIME; } } public void toggleInfrared() { if (light == Light.OFF) { this.light = Light.INFRARED; this.speed = Speed.REALTIME; } else if (light == Light.INFRARED) this.light = Light.ON; else this.light = Light.INFRARED; } public void toggleSpeed() { if (speed == Speed.REALTIME) this.speed = Speed.HIGH; else this.speed = Speed.REALTIME; } }
package org.nusco.narjillos.views.utilities; public class PetriDishState { private volatile Light light = Light.ON; private volatile Speed speed = Speed.REALTIME; public Light getLight() { return light; } public Speed getSpeed() { return speed; } public void toggleLight() { switch (light) { case INFRARED: this.light = Light.ON; break; case ON: this.light = Light.OFF; this.speed = Speed.HIGH; break; case OFF: this.light = Light.ON; this.speed = Speed.REALTIME; break; } } public void toggleInfrared() { switch (light) { case INFRARED: this.light = Light.ON; break; case ON: this.light = Light.INFRARED; break; case OFF: this.light = Light.INFRARED; this.speed = Speed.REALTIME; break; } } public void toggleSpeed() { switch (speed) { case REALTIME: this.speed = Speed.HIGH; break; case HIGH: this.speed = Speed.REALTIME; break; } } }
Refactor Petri Dish state machine
Refactor Petri Dish state machine
Java
mit
colinrubbert/narjillos,mixolidia/narjillos,nusco/narjillos,mixolidia/narjillos,colinrubbert/narjillos
java
## Code Before: package org.nusco.narjillos.views.utilities; public class PetriDishState { private volatile Light light = Light.ON; private volatile Speed speed = Speed.REALTIME; public Light getLight() { return light; } public Speed getSpeed() { return speed; } public void toggleLight() { if (light == Light.INFRARED) this.light = Light.ON; else if (light == Light.ON) { this.light = Light.OFF; this.speed = Speed.HIGH; } else { this.light = Light.ON; this.speed = Speed.REALTIME; } } public void toggleInfrared() { if (light == Light.OFF) { this.light = Light.INFRARED; this.speed = Speed.REALTIME; } else if (light == Light.INFRARED) this.light = Light.ON; else this.light = Light.INFRARED; } public void toggleSpeed() { if (speed == Speed.REALTIME) this.speed = Speed.HIGH; else this.speed = Speed.REALTIME; } } ## Instruction: Refactor Petri Dish state machine ## Code After: package org.nusco.narjillos.views.utilities; public class PetriDishState { private volatile Light light = Light.ON; private volatile Speed speed = Speed.REALTIME; public Light getLight() { return light; } public Speed getSpeed() { return speed; } public void toggleLight() { switch (light) { case INFRARED: this.light = Light.ON; break; case ON: this.light = Light.OFF; this.speed = Speed.HIGH; break; case OFF: this.light = Light.ON; this.speed = Speed.REALTIME; break; } } public void toggleInfrared() { switch (light) { case INFRARED: this.light = Light.ON; break; case ON: this.light = Light.INFRARED; break; case OFF: this.light = Light.INFRARED; this.speed = Speed.REALTIME; break; } } public void toggleSpeed() { switch (speed) { case REALTIME: this.speed = Speed.HIGH; break; case HIGH: this.speed = Speed.REALTIME; break; } } }
4e18c203b7f61c29ed241335a73748a987c7d796
src/components/Echarts/index.js
src/components/Echarts/index.js
import React, { Component } from 'react'; import { WebView, View, StyleSheet } from 'react-native'; import renderChart from './renderChart'; import echarts from './echarts.min'; export default class App extends Component { componentWillReceiveProps(nextProps) { if(nextProps.option !== this.props.option) { this.refs.chart.reload(); } } render() { return ( <View style={{flex: 1, height: this.props.height || 400,}}> <WebView ref="chart" scrollEnabled = {false} injectedJavaScript = {renderChart(this.props)} style={{ height: this.props.height || 400, backgroundColor: this.props.backgroundColor || 'transparent' }} scalesPageToFit={true} source={require('./tpl.html')} onMessage={event => this.props.onPress ? this.props.onPress(JSON.parse(event.nativeEvent.data)) : null} /> </View> ); } }
import React, { Component } from 'react'; import { WebView, View, StyleSheet, Platform } from 'react-native'; import renderChart from './renderChart'; import echarts from './echarts.min'; export default class App extends Component { componentWillReceiveProps(nextProps) { if(nextProps.option !== this.props.option) { this.refs.chart.reload(); } } render() { return ( <View style={{flex: 1, height: this.props.height || 400,}}> <WebView ref="chart" scrollEnabled = {false} injectedJavaScript = {renderChart(this.props)} style={{ height: this.props.height || 400, backgroundColor: this.props.backgroundColor || 'transparent' }} scalesPageToFit={Platform.OS !== 'ios'} source={require('./tpl.html')} onMessage={event => this.props.onPress ? this.props.onPress(JSON.parse(event.nativeEvent.data)) : null} /> </View> ); } }
Fix echarts overflow on Android
Fix echarts overflow on Android
JavaScript
mit
somonus/react-native-echarts,somonus/react-native-echarts,somonus/react-native-echarts,somonus/react-native-echarts
javascript
## Code Before: import React, { Component } from 'react'; import { WebView, View, StyleSheet } from 'react-native'; import renderChart from './renderChart'; import echarts from './echarts.min'; export default class App extends Component { componentWillReceiveProps(nextProps) { if(nextProps.option !== this.props.option) { this.refs.chart.reload(); } } render() { return ( <View style={{flex: 1, height: this.props.height || 400,}}> <WebView ref="chart" scrollEnabled = {false} injectedJavaScript = {renderChart(this.props)} style={{ height: this.props.height || 400, backgroundColor: this.props.backgroundColor || 'transparent' }} scalesPageToFit={true} source={require('./tpl.html')} onMessage={event => this.props.onPress ? this.props.onPress(JSON.parse(event.nativeEvent.data)) : null} /> </View> ); } } ## Instruction: Fix echarts overflow on Android ## Code After: import React, { Component } from 'react'; import { WebView, View, StyleSheet, Platform } from 'react-native'; import renderChart from './renderChart'; import echarts from './echarts.min'; export default class App extends Component { componentWillReceiveProps(nextProps) { if(nextProps.option !== this.props.option) { this.refs.chart.reload(); } } render() { return ( <View style={{flex: 1, height: this.props.height || 400,}}> <WebView ref="chart" scrollEnabled = {false} injectedJavaScript = {renderChart(this.props)} style={{ height: this.props.height || 400, backgroundColor: this.props.backgroundColor || 'transparent' }} scalesPageToFit={Platform.OS !== 'ios'} source={require('./tpl.html')} onMessage={event => this.props.onPress ? this.props.onPress(JSON.parse(event.nativeEvent.data)) : null} /> </View> ); } }
6d8a682a4a47a38017289ecd5ea9505a5ebe47bf
spec/warden/jwt_auth/hooks_spec.rb
spec/warden/jwt_auth/hooks_spec.rb
require 'spec_helper' require 'rack/test' describe Warden::JWTAuth::Hooks do include_context 'configuration' include_context 'middleware' include_context 'fixtures' context 'with user set' do let(:app) { warden_app(dummy_app) } # :reek:UtilityFunction def token(request) request.env['warden-jwt_auth.token'] end context 'when method and path match and scope is known ' do it 'codes a token and adds it to env' do login_as user, scope: :user post '/sign_in' expect(token(last_request)).not_to be_nil end end context 'when scope is unknown' do it 'does nothing' do login_as user, scope: :unknown post '/sign_in' expect(token(last_request)).to be_nil end end context 'when path does not match' do it 'does nothing' do login_as user, scope: :user post '/' expect(token(last_request)).to be_nil end end context 'when method does not match' do it 'does nothing' do login_as user, scope: :user get '/sign_in' expect(token(last_request)).to be_nil end end end end
require 'spec_helper' require 'rack/test' describe Warden::JWTAuth::Hooks do include_context 'configuration' include_context 'middleware' include_context 'fixtures' context 'with user set' do let(:app) { warden_app(dummy_app) } # :reek:UtilityFunction def token(request) request.env['warden-jwt_auth.token'] end context 'when method and path match and scope is known ' do before do login_as user, scope: :user post '/sign_in' end it 'codes a token and adds it to env' do expect(token(last_request)).not_to be_nil end it 'adds user info to the token' do payload = Warden::JWTAuth::TokenDecoder.new.call(token(last_request)) expect(payload['sub']).to eq(user.jwt_subject) end end context 'when scope is unknown' do it 'does nothing' do login_as user, scope: :unknown post '/sign_in' expect(token(last_request)).to be_nil end end context 'when path does not match' do it 'does nothing' do login_as user, scope: :user post '/' expect(token(last_request)).to be_nil end end context 'when method does not match' do it 'does nothing' do login_as user, scope: :user get '/sign_in' expect(token(last_request)).to be_nil end end end end
Test hook provides user when generating the token
Test hook provides user when generating the token
Ruby
mit
waiting-for-dev/warden-jwt_auth,waiting-for-dev/warden-jwt_auth
ruby
## Code Before: require 'spec_helper' require 'rack/test' describe Warden::JWTAuth::Hooks do include_context 'configuration' include_context 'middleware' include_context 'fixtures' context 'with user set' do let(:app) { warden_app(dummy_app) } # :reek:UtilityFunction def token(request) request.env['warden-jwt_auth.token'] end context 'when method and path match and scope is known ' do it 'codes a token and adds it to env' do login_as user, scope: :user post '/sign_in' expect(token(last_request)).not_to be_nil end end context 'when scope is unknown' do it 'does nothing' do login_as user, scope: :unknown post '/sign_in' expect(token(last_request)).to be_nil end end context 'when path does not match' do it 'does nothing' do login_as user, scope: :user post '/' expect(token(last_request)).to be_nil end end context 'when method does not match' do it 'does nothing' do login_as user, scope: :user get '/sign_in' expect(token(last_request)).to be_nil end end end end ## Instruction: Test hook provides user when generating the token ## Code After: require 'spec_helper' require 'rack/test' describe Warden::JWTAuth::Hooks do include_context 'configuration' include_context 'middleware' include_context 'fixtures' context 'with user set' do let(:app) { warden_app(dummy_app) } # :reek:UtilityFunction def token(request) request.env['warden-jwt_auth.token'] end context 'when method and path match and scope is known ' do before do login_as user, scope: :user post '/sign_in' end it 'codes a token and adds it to env' do expect(token(last_request)).not_to be_nil end it 'adds user info to the token' do payload = Warden::JWTAuth::TokenDecoder.new.call(token(last_request)) expect(payload['sub']).to eq(user.jwt_subject) end end context 'when scope is unknown' do it 'does nothing' do login_as user, scope: :unknown post '/sign_in' expect(token(last_request)).to be_nil end end context 'when path does not match' do it 'does nothing' do login_as user, scope: :user post '/' expect(token(last_request)).to be_nil end end context 'when method does not match' do it 'does nothing' do login_as user, scope: :user get '/sign_in' expect(token(last_request)).to be_nil end end end end
13d5ba1e887e0c9520c7f30b08a740fc7529427c
src/main/java/com/wyverngame/rmi/api/method/GetBattleRanksMethod.java
src/main/java/com/wyverngame/rmi/api/method/GetBattleRanksMethod.java
package com.wyverngame.rmi.api.method; import java.rmi.RemoteException; import java.util.Map; import com.wyverngame.rmi.api.RMIClient; import com.wyverngame.rmi.api.http.Request; import com.wyverngame.rmi.api.response.BattleRanksResponse; public final class GetBattleRanksMethod extends Method<BattleRanksResponse> { @Override public BattleRanksResponse process(RMIClient client, Request request) throws RemoteException { int limit = Integer.parseInt(request.getOrDefault("limit", Integer.toString(Integer.MAX_VALUE))); Map<String, Integer> ranks = client.getWebInterface().getBattleRanks(limit); return new BattleRanksResponse(ranks); } }
package com.wyverngame.rmi.api.method; import java.rmi.RemoteException; import java.util.Map; import com.wyverngame.rmi.api.RMIClient; import com.wyverngame.rmi.api.http.Request; import com.wyverngame.rmi.api.response.BattleRanksResponse; public final class GetBattleRanksMethod extends Method<BattleRanksResponse> { @Override public BattleRanksResponse process(RMIClient client, Request request) throws RemoteException { int limit = Integer.parseInt(request.getOrDefault("limit", Integer.toString(10))); Map<String, Integer> ranks = client.getWebInterface().getBattleRanks(limit); return new BattleRanksResponse(ranks); } }
Update battle ranks cap to 10.
Update battle ranks cap to 10.
Java
mit
jonathanedgecombe/wu-json-rmi-api
java
## Code Before: package com.wyverngame.rmi.api.method; import java.rmi.RemoteException; import java.util.Map; import com.wyverngame.rmi.api.RMIClient; import com.wyverngame.rmi.api.http.Request; import com.wyverngame.rmi.api.response.BattleRanksResponse; public final class GetBattleRanksMethod extends Method<BattleRanksResponse> { @Override public BattleRanksResponse process(RMIClient client, Request request) throws RemoteException { int limit = Integer.parseInt(request.getOrDefault("limit", Integer.toString(Integer.MAX_VALUE))); Map<String, Integer> ranks = client.getWebInterface().getBattleRanks(limit); return new BattleRanksResponse(ranks); } } ## Instruction: Update battle ranks cap to 10. ## Code After: package com.wyverngame.rmi.api.method; import java.rmi.RemoteException; import java.util.Map; import com.wyverngame.rmi.api.RMIClient; import com.wyverngame.rmi.api.http.Request; import com.wyverngame.rmi.api.response.BattleRanksResponse; public final class GetBattleRanksMethod extends Method<BattleRanksResponse> { @Override public BattleRanksResponse process(RMIClient client, Request request) throws RemoteException { int limit = Integer.parseInt(request.getOrDefault("limit", Integer.toString(10))); Map<String, Integer> ranks = client.getWebInterface().getBattleRanks(limit); return new BattleRanksResponse(ranks); } }
2cb41daee524d01ee3324fd7996ff49a0bb40822
src/main/java/sg/ncl/testbed_interface/JpaConfig.java
src/main/java/sg/ncl/testbed_interface/JpaConfig.java
package sg.ncl.testbed_interface; import org.springframework.context.annotation.Configuration; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import org.springframework.transaction.annotation.EnableTransactionManagement; /** * @author Christopher Zhong */ @Configuration @EnableJpaRepositories @EnableTransactionManagement public class JpaConfig { }
package sg.ncl.testbed_interface; import org.springframework.context.annotation.Configuration; import org.springframework.data.jpa.repository.config.EnableJpaAuditing; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import org.springframework.transaction.annotation.EnableTransactionManagement; /** * @author Christopher Zhong */ @Configuration @EnableJpaRepositories @EnableJpaAuditing @EnableTransactionManagement public class JpaConfig { }
Enable auditing of entities (DEV-15)
Enable auditing of entities (DEV-15)
Java
apache-2.0
nus-ncl/services-in-one,nus-ncl/services-in-one
java
## Code Before: package sg.ncl.testbed_interface; import org.springframework.context.annotation.Configuration; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import org.springframework.transaction.annotation.EnableTransactionManagement; /** * @author Christopher Zhong */ @Configuration @EnableJpaRepositories @EnableTransactionManagement public class JpaConfig { } ## Instruction: Enable auditing of entities (DEV-15) ## Code After: package sg.ncl.testbed_interface; import org.springframework.context.annotation.Configuration; import org.springframework.data.jpa.repository.config.EnableJpaAuditing; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import org.springframework.transaction.annotation.EnableTransactionManagement; /** * @author Christopher Zhong */ @Configuration @EnableJpaRepositories @EnableJpaAuditing @EnableTransactionManagement public class JpaConfig { }
08489ea2c1596a067b482878ff4450db43c08612
conf.py
conf.py
import os on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if not on_rtd: # only import and set the theme if we're building docs locally import sphinx_rtd_theme html_theme = 'sphinx_rtd_theme' html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # otherwise, readthedocs.org uses their theme by default, so no need to specify it project = 'FIWARE-Stream-Oriented-GE'
import os on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if not on_rtd: # only import and set the theme if we're building docs locally import sphinx_rtd_theme html_theme = 'sphinx_rtd_theme' html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # otherwise, readthedocs.org uses their theme by default, so no need to specify it project = 'FIWARE-Stream-Oriented-GE' html_theme_options = { 'cssfiles': ['https://fiware.org/style/fiware_readthedocs.css'] }
Add custom CSS style to FIWARE doc
Add custom CSS style to FIWARE doc Change-Id: I74293d488e0cd762ad023b94879ee618a4016110
Python
apache-2.0
Kurento/doc-kurento,SanMi86/doc-kurento,SanMi86/doc-kurento,SanMi86/doc-kurento,Kurento/doc-kurento,Kurento/doc-kurento,SanMi86/doc-kurento
python
## Code Before: import os on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if not on_rtd: # only import and set the theme if we're building docs locally import sphinx_rtd_theme html_theme = 'sphinx_rtd_theme' html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # otherwise, readthedocs.org uses their theme by default, so no need to specify it project = 'FIWARE-Stream-Oriented-GE' ## Instruction: Add custom CSS style to FIWARE doc Change-Id: I74293d488e0cd762ad023b94879ee618a4016110 ## Code After: import os on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if not on_rtd: # only import and set the theme if we're building docs locally import sphinx_rtd_theme html_theme = 'sphinx_rtd_theme' html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # otherwise, readthedocs.org uses their theme by default, so no need to specify it project = 'FIWARE-Stream-Oriented-GE' html_theme_options = { 'cssfiles': ['https://fiware.org/style/fiware_readthedocs.css'] }
b7f408d7c6b6b9f80350dd3d24b55fb7ce71c30b
controllers/bot.php
controllers/bot.php
<?php class BotController extends AuthenticatedController { public function update( $boturl = '' ) { $this->requireLogin(); require_once 'models/grader/bot.php'; if ( empty( $boturl ) ) { go( 'bot', 'update', [ 'boturl_empty' => true ] ); } if ( !filter_var( $boturl, FILTER_VALIDATE_URL ) ) { go( 'bot', 'update', [ 'boturl_invalid' => true ] ); } $user = $_SESSION[ 'user' ]; try { $user->setBoturl( $boturl ); } catch ( ModelValidationException $e ) { go( 'bot', 'update', [ 'bot_fail' => true, 'errorid' => $e->error ] ); } go( 'bot', 'update' ); } public function updateView( $boturl_empty, $boturl_invalid, $bot_fail, $errorid = false ) { require_once 'models/error.php'; $this->requireLogin(); if ( $errorid !== false ) { $error = new Error( $errorid ); if ( $error->user->id !== $_SESSION[ 'user' ]->id ) { throw new HTTPUnauthorizedException(); } } $user = $_SESSION[ 'user' ]; require_once 'models/grader/bot.php'; require_once 'views/bot/update.php'; } } ?>
<?php class BotController extends AuthenticatedController { public function update( $boturl = '' ) { $this->requireLogin(); require_once 'models/grader/bot.php'; if ( empty( $boturl ) ) { go( 'bot', 'update', [ 'boturl_empty' => true ] ); } if ( !filter_var( $boturl, FILTER_VALIDATE_URL ) ) { go( 'bot', 'update', [ 'boturl_invalid' => true ] ); } $user = $_SESSION[ 'user' ]; try { $user->setBoturl( $boturl ); } catch ( ModelValidationException $e ) { go( 'bot', 'update', [ 'bot_fail' => true, 'errorid' => $e->error ] ); } go( 'bot', 'update' ); } public function updateView( $boturl_empty, $boturl_invalid, $bot_fail, $errorid = false ) { require_once 'models/error.php'; $this->requireLogin(); $user = $_SESSION[ 'user' ]; if ( $errorid !== false ) { $error = new Error( $errorid ); if ( $error->user->id !== $user->id ) { throw new HTTPUnauthorizedException(); } } require_once 'models/grader/bot.php'; require_once 'views/bot/update.php'; } } ?>
Define user earlier so it can be used more
Define user earlier so it can be used more
PHP
mit
dionyziz/endofcodes,VitSalis/endofcodes,dionyziz/endofcodes,VitSalis/endofcodes,dionyziz/endofcodes,VitSalis/endofcodes,VitSalis/endofcodes
php
## Code Before: <?php class BotController extends AuthenticatedController { public function update( $boturl = '' ) { $this->requireLogin(); require_once 'models/grader/bot.php'; if ( empty( $boturl ) ) { go( 'bot', 'update', [ 'boturl_empty' => true ] ); } if ( !filter_var( $boturl, FILTER_VALIDATE_URL ) ) { go( 'bot', 'update', [ 'boturl_invalid' => true ] ); } $user = $_SESSION[ 'user' ]; try { $user->setBoturl( $boturl ); } catch ( ModelValidationException $e ) { go( 'bot', 'update', [ 'bot_fail' => true, 'errorid' => $e->error ] ); } go( 'bot', 'update' ); } public function updateView( $boturl_empty, $boturl_invalid, $bot_fail, $errorid = false ) { require_once 'models/error.php'; $this->requireLogin(); if ( $errorid !== false ) { $error = new Error( $errorid ); if ( $error->user->id !== $_SESSION[ 'user' ]->id ) { throw new HTTPUnauthorizedException(); } } $user = $_SESSION[ 'user' ]; require_once 'models/grader/bot.php'; require_once 'views/bot/update.php'; } } ?> ## Instruction: Define user earlier so it can be used more ## Code After: <?php class BotController extends AuthenticatedController { public function update( $boturl = '' ) { $this->requireLogin(); require_once 'models/grader/bot.php'; if ( empty( $boturl ) ) { go( 'bot', 'update', [ 'boturl_empty' => true ] ); } if ( !filter_var( $boturl, FILTER_VALIDATE_URL ) ) { go( 'bot', 'update', [ 'boturl_invalid' => true ] ); } $user = $_SESSION[ 'user' ]; try { $user->setBoturl( $boturl ); } catch ( ModelValidationException $e ) { go( 'bot', 'update', [ 'bot_fail' => true, 'errorid' => $e->error ] ); } go( 'bot', 'update' ); } public function updateView( $boturl_empty, $boturl_invalid, $bot_fail, $errorid = false ) { require_once 'models/error.php'; $this->requireLogin(); $user = $_SESSION[ 'user' ]; if ( $errorid !== false ) { $error = new Error( $errorid ); if ( $error->user->id !== $user->id ) { throw new HTTPUnauthorizedException(); } } require_once 'models/grader/bot.php'; require_once 'views/bot/update.php'; } } ?>
374022f12d1d9ee211787e550ef9dd250ce461d4
src/app/user/shared/user.service.spec.ts
src/app/user/shared/user.service.spec.ts
import { inject, TestBed } from '@angular/core/testing'; import { UserService } from './user.service'; import { User } from './user'; import { Observable, of } from 'rxjs'; import { HttpClient } from '@angular/common/http'; import { ProgressService } from '../../shared/providers/progress.service'; import { NotificationService } from '../../shared/providers/notification.service'; import { MaterialConfigModule } from '../../routing/material-config.module'; describe('UserService', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [MaterialConfigModule], providers: [ NotificationService, ProgressService, UserService, { provide: HttpClient, useValue: new HttpClient(null) } ] }); }); it('should be created', inject([UserService], (service: UserService) => { expect(service).toBeTruthy(); })); it('should return a user named myusername', inject( [UserService, HttpClient], (service: UserService, http: HttpClient) => { const httpSpy = spyOn(http, 'get').and.callFake(function(_url, _options) { return of({ userName: 'myusername', userGroups: ['test-group'] }); }); const authenticatedUserObservable: Observable<User> = service.getUserObservable(); authenticatedUserObservable.subscribe(authenticatedUser => { expect(authenticatedUser.actAs).toBe('myusername'); expect(authenticatedUser.userName).toBe('myusername'); expect(authenticatedUser.userGroups).toEqual(['test-group']); }); } )); });
import { inject, TestBed, async } from '@angular/core/testing'; import { UserService } from './user.service'; import { User } from './user'; import { Observable, of } from 'rxjs'; import { HttpClient } from '@angular/common/http'; import { ProgressService } from '../../shared/providers/progress.service'; import { NotificationService } from '../../shared/providers/notification.service'; import { MaterialConfigModule } from '../../routing/material-config.module'; describe('UserService', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [MaterialConfigModule], providers: [ NotificationService, ProgressService, UserService, { provide: HttpClient, useValue: new HttpClient(null) } ] }); }); it('should be created', inject([UserService], (service: UserService) => { expect(service).toBeTruthy(); })); it('should return a user named myusername', async( inject([UserService, HttpClient], (service: UserService, http: HttpClient) => { const httpSpy = spyOn(http, 'get').and.callFake(function(_url, _options) { return of({ userName: 'myusername', userGroups: ['test-group'] }); }); const authenticatedUserObservable: Observable<User> = service.getUserObservable(); authenticatedUserObservable.subscribe(authenticatedUser => { expect(authenticatedUser.actAs).toBe('myusername'); expect(authenticatedUser.userName).toBe('myusername'); expect(authenticatedUser.userGroups).toEqual(['test-group']); }); }) )); });
Fix UserService test to use async to properly verify after an observable resolves.
Fix UserService test to use async to properly verify after an observable resolves.
TypeScript
apache-2.0
uw-it-edm/content-services-ui,uw-it-edm/content-services-ui,uw-it-edm/content-services-ui
typescript
## Code Before: import { inject, TestBed } from '@angular/core/testing'; import { UserService } from './user.service'; import { User } from './user'; import { Observable, of } from 'rxjs'; import { HttpClient } from '@angular/common/http'; import { ProgressService } from '../../shared/providers/progress.service'; import { NotificationService } from '../../shared/providers/notification.service'; import { MaterialConfigModule } from '../../routing/material-config.module'; describe('UserService', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [MaterialConfigModule], providers: [ NotificationService, ProgressService, UserService, { provide: HttpClient, useValue: new HttpClient(null) } ] }); }); it('should be created', inject([UserService], (service: UserService) => { expect(service).toBeTruthy(); })); it('should return a user named myusername', inject( [UserService, HttpClient], (service: UserService, http: HttpClient) => { const httpSpy = spyOn(http, 'get').and.callFake(function(_url, _options) { return of({ userName: 'myusername', userGroups: ['test-group'] }); }); const authenticatedUserObservable: Observable<User> = service.getUserObservable(); authenticatedUserObservable.subscribe(authenticatedUser => { expect(authenticatedUser.actAs).toBe('myusername'); expect(authenticatedUser.userName).toBe('myusername'); expect(authenticatedUser.userGroups).toEqual(['test-group']); }); } )); }); ## Instruction: Fix UserService test to use async to properly verify after an observable resolves. ## Code After: import { inject, TestBed, async } from '@angular/core/testing'; import { UserService } from './user.service'; import { User } from './user'; import { Observable, of } from 'rxjs'; import { HttpClient } from '@angular/common/http'; import { ProgressService } from '../../shared/providers/progress.service'; import { NotificationService } from '../../shared/providers/notification.service'; import { MaterialConfigModule } from '../../routing/material-config.module'; describe('UserService', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [MaterialConfigModule], providers: [ NotificationService, ProgressService, UserService, { provide: HttpClient, useValue: new HttpClient(null) } ] }); }); it('should be created', inject([UserService], (service: UserService) => { expect(service).toBeTruthy(); })); it('should return a user named myusername', async( inject([UserService, HttpClient], (service: UserService, http: HttpClient) => { const httpSpy = spyOn(http, 'get').and.callFake(function(_url, _options) { return of({ userName: 'myusername', userGroups: ['test-group'] }); }); const authenticatedUserObservable: Observable<User> = service.getUserObservable(); authenticatedUserObservable.subscribe(authenticatedUser => { expect(authenticatedUser.actAs).toBe('myusername'); expect(authenticatedUser.userName).toBe('myusername'); expect(authenticatedUser.userGroups).toEqual(['test-group']); }); }) )); });
b358de8ea463833e5ed66e1072cb268e10e3709d
lib/Pakket/ConfigReader/TOML.pm
lib/Pakket/ConfigReader/TOML.pm
package Pakket::ConfigReader::TOML; # ABSTRACT: A TOML config reader use Moose; use TOML::Parser; use Types::Path::Tiny qw< Path >; with qw< Pakket::Role::ConfigReader >; has filename => ( is => 'ro', isa => Path, coerce => 1, required => 1, ); sub read_config { my $self = shift; my $config_file = $self->filename; -r $config_file or die "Config file '$config_file' does not exist or unreadable"; my $config; eval { $config = TOML::Parser->new( strict_mode => 1 ) ->parse_file($config_file); 1; } or do { my $err = $@ || 'Unknown error'; die "Cannot read $config_file: $err"; }; return $config; } __PACKAGE__->meta->make_immutable; no Moose; 1;
package Pakket::ConfigReader::TOML; # ABSTRACT: A TOML config reader use Moose; use TOML::Parser; use Types::Path::Tiny qw< Path >; use Carp qw< croak >; with qw< Pakket::Role::ConfigReader >; has filename => ( is => 'ro', isa => Path, coerce => 1, required => 1, ); sub read_config { my $self = shift; my $config_file = $self->filename; -r $config_file or croak("Config file '$config_file' does not exist or unreadable"); my $config; eval { $config = TOML::Parser->new( strict_mode => 1 ) ->parse_file($config_file); 1; } or do { my $err = $@ || 'Unknown error'; croak("Cannot read $config_file: $err"); }; return $config; } __PACKAGE__->meta->make_immutable; no Moose; 1;
Use Carp::croak() instead of die()
Use Carp::croak() instead of die()
Perl
mit
xsawyerx/pkt,xsawyerx/pakket,xsawyerx/pakket
perl
## Code Before: package Pakket::ConfigReader::TOML; # ABSTRACT: A TOML config reader use Moose; use TOML::Parser; use Types::Path::Tiny qw< Path >; with qw< Pakket::Role::ConfigReader >; has filename => ( is => 'ro', isa => Path, coerce => 1, required => 1, ); sub read_config { my $self = shift; my $config_file = $self->filename; -r $config_file or die "Config file '$config_file' does not exist or unreadable"; my $config; eval { $config = TOML::Parser->new( strict_mode => 1 ) ->parse_file($config_file); 1; } or do { my $err = $@ || 'Unknown error'; die "Cannot read $config_file: $err"; }; return $config; } __PACKAGE__->meta->make_immutable; no Moose; 1; ## Instruction: Use Carp::croak() instead of die() ## Code After: package Pakket::ConfigReader::TOML; # ABSTRACT: A TOML config reader use Moose; use TOML::Parser; use Types::Path::Tiny qw< Path >; use Carp qw< croak >; with qw< Pakket::Role::ConfigReader >; has filename => ( is => 'ro', isa => Path, coerce => 1, required => 1, ); sub read_config { my $self = shift; my $config_file = $self->filename; -r $config_file or croak("Config file '$config_file' does not exist or unreadable"); my $config; eval { $config = TOML::Parser->new( strict_mode => 1 ) ->parse_file($config_file); 1; } or do { my $err = $@ || 'Unknown error'; croak("Cannot read $config_file: $err"); }; return $config; } __PACKAGE__->meta->make_immutable; no Moose; 1;
fa6e787d64c5f110e34b640ea62380287e3c69e1
core/app/views/spree/order_mailer/cancel_email.text.erb
core/app/views/spree/order_mailer/cancel_email.text.erb
Dear Customer, Your order has been CANCELED. Please retain this cancellation information for your records. ============================================================ Order Summary [CANCELED] ============================================================ <% @order.line_items.each do |item| %> <%= item.variant.sku %> <%= item.variant.product.name %> <%= variant_options(item.variant) %> (<%= item.quantity %>) @ <%= number_to_currency item.price %> = <%= number_to_currency(item.price * item.quantity) %> <% end %> ============================================================ Subtotal: <%= number_to_currency @order.item_total %> <% @order.adjustments.eligible.each do |adjustment| %> <%= "#{adjustment.label}: #{number_to_currency adjustment.amount}"%> <% end %> Order Total: <%= number_to_currency @order.total %>
Dear Customer, Your order has been CANCELED. Please retain this cancellation information for your records. ============================================================ Order Summary [CANCELED] ============================================================ <% @order.line_items.each do |item| %> <%= item.variant.sku %> <%= raw(item.variant.product.name) %> <%= raw(item.variant.options_text) -%> (<%=item.quantity%>) @ <%= number_to_currency item.price %> = <%= number_to_currency(item.price * item.quantity) %> <% end %> ============================================================ Subtotal: <%= number_to_currency @order.item_total %> <% @order.adjustments.eligible.each do |adjustment| %> <%= raw(adjustment.label) %> <%= number_to_currency(adjustment.amount) %> <% end %> Order Total: <%= number_to_currency(@order.total) %>
Make cancel email match changes in confirm email made by Radar in 5bef374
Make cancel email match changes in confirm email made by Radar in 5bef374 Fixes #1621
HTML+ERB
bsd-3-clause
jspizziri/spree,edgward/spree,sunny2601/spree,dotandbo/spree,lyzxsc/spree,gautamsawhney/spree,wolfieorama/spree,maybii/spree,degica/spree,vmatekole/spree,dandanwei/spree,richardnuno/solidus,project-eutopia/spree,piousbox/spree,joanblake/spree,tesserakt/clean_spree,grzlus/spree,CJMrozek/spree,yomishra/pce,mleglise/spree,bjornlinder/Spree,siddharth28/spree,progsri/spree,maybii/spree,zamiang/spree,archSeer/spree,jeffboulet/spree,kewaunited/spree,edgward/spree,grzlus/solidus,trigrass2/spree,gregoryrikson/spree-sample,StemboltHQ/spree,kitwalker12/spree,assembledbrands/spree,calvinl/spree,orenf/spree,tomash/spree,delphsoft/spree-store-ballchair,hoanghiep90/spree,lsirivong/solidus,PhoenixTeam/spree_phoenix,net2b/spree,athal7/solidus,pulkit21/spree,dandanwei/spree,rbngzlv/spree,vinayvinsol/spree,alejandromangione/spree,jimblesm/spree,groundctrl/spree,kitwalker12/spree,mindvolt/spree,builtbybuffalo/spree,watg/spree,reinaris/spree,cutefrank/spree,imella/spree,wolfieorama/spree,xuewenfei/solidus,vinsol/spree,alejandromangione/spree,APohio/spree,adaddeo/spree,pervino/solidus,miyazawatomoka/spree,jordan-brough/spree,pulkit21/spree,moneyspyder/spree,alepore/spree,carlesjove/spree,Kagetsuki/spree,vinsol/spree,welitonfreitas/spree,Senjai/solidus,ahmetabdi/spree,carlesjove/spree,lsirivong/spree,hifly/spree,jimblesm/spree,jasonfb/spree,FadliKun/spree,jsurdilla/solidus,azranel/spree,alvinjean/spree,camelmasa/spree,rajeevriitm/spree,trigrass2/spree,shaywood2/spree,pjmj777/spree,kewaunited/spree,derekluo/spree,NerdsvilleCEO/spree,Ropeney/spree,codesavvy/sandbox,TrialGuides/spree,Senjai/solidus,DarkoP/spree,gregoryrikson/spree-sample,dafontaine/spree,madetech/spree,alejandromangione/spree,Ropeney/spree,delphsoft/spree-store-ballchair,camelmasa/spree,tancnle/spree,kewaunited/spree,CiscoCloud/spree,patdec/spree,edgward/spree,FadliKun/spree,Machpowersystems/spree_mach,jspizziri/spree,karlitxo/spree,karlitxo/spree,carlesjove/spree,derekluo/spree,mindvolt/spree,surfdome/spree,grzlus/solidus,scottcrawford03/solidus,DynamoMTL/spree,hifly/spree,shaywood2/spree,locomotivapro/spree,PhoenixTeam/spree_phoenix,beni55/spree,TrialGuides/spree,jsurdilla/solidus,Senjai/spree,fahidnasir/spree,jaspreet21anand/spree,assembledbrands/spree,Mayvenn/spree,lsirivong/solidus,ujai/spree,maybii/spree,cutefrank/spree,volpejoaquin/spree,azranel/spree,reidblomquist/spree,ujai/spree,tomash/spree,odk211/spree,sliaquat/spree,nooysters/spree,zaeznet/spree,APohio/spree,KMikhaylovCTG/spree,volpejoaquin/spree,berkes/spree,watg/spree,jparr/spree,bjornlinder/Spree,judaro13/spree-fork,xuewenfei/solidus,groundctrl/spree,tomash/spree,judaro13/spree-fork,JuandGirald/spree,odk211/spree,pervino/spree,vulk/spree,thogg4/spree,archSeer/spree,keatonrow/spree,yiqing95/spree,Kagetsuki/spree,tomash/spree,beni55/spree,Engeltj/spree,RatioClothing/spree,DynamoMTL/spree,rbngzlv/spree,alvinjean/spree,ayb/spree,jsurdilla/solidus,Engeltj/spree,biagidp/spree,ramkumar-kr/spree,richardnuno/solidus,lyzxsc/spree,HealthWave/spree,agient/agientstorefront,shekibobo/spree,freerunningtech/spree,azclick/spree,tancnle/spree,knuepwebdev/FloatTubeRodHolders,Lostmyname/spree,Mayvenn/spree,caiqinghua/spree,CiscoCloud/spree,nooysters/spree,Migweld/spree,CiscoCloud/spree,vcavallo/spree,bonobos/solidus,progsri/spree,orenf/spree,jhawthorn/spree,yomishra/pce,dandanwei/spree,Kagetsuki/spree,shaywood2/spree,shekibobo/spree,JuandGirald/spree,reidblomquist/spree,DarkoP/spree,jordan-brough/solidus,jeffboulet/spree,dotandbo/spree,quentinuys/spree,grzlus/spree,archSeer/spree,Boomkat/spree,calvinl/spree,surfdome/spree,grzlus/solidus,Boomkat/spree,NerdsvilleCEO/spree,devilcoders/solidus,welitonfreitas/spree,pervino/solidus,mindvolt/spree,vmatekole/spree,zamiang/spree,azranel/spree,vinsol/spree,quentinuys/spree,derekluo/spree,thogg4/spree,JuandGirald/spree,agient/agientstorefront,dafontaine/spree,Nevensoft/spree,Senjai/solidus,bonobos/solidus,omarsar/spree,quentinuys/spree,cutefrank/spree,net2b/spree,sfcgeorge/spree,dotandbo/spree,pervino/solidus,delphsoft/spree-store-ballchair,patdec/spree,athal7/solidus,degica/spree,Antdesk/karpal-spree,Boomkat/spree,hoanghiep90/spree,devilcoders/solidus,lsirivong/spree,caiqinghua/spree,Machpowersystems/spree_mach,zaeznet/spree,zaeznet/spree,imella/spree,scottcrawford03/solidus,fahidnasir/spree,azclick/spree,moneyspyder/spree,SadTreeFriends/spree,sunny2601/spree,gregoryrikson/spree-sample,TrialGuides/spree,fahidnasir/spree,yushine/spree,HealthWave/spree,forkata/solidus,robodisco/spree,Arpsara/solidus,shaywood2/spree,bricesanchez/spree,rakibulislam/spree,devilcoders/solidus,rajeevriitm/spree,kewaunited/spree,agient/agientstorefront,sfcgeorge/spree,Nevensoft/spree,tancnle/spree,vulk/spree,derekluo/spree,vinsol/spree,keatonrow/spree,bonobos/solidus,locomotivapro/spree,fahidnasir/spree,tesserakt/clean_spree,softr8/spree,ahmetabdi/spree,keatonrow/spree,CJMrozek/spree,woboinc/spree,siddharth28/spree,PhoenixTeam/spree_phoenix,alvinjean/spree,APohio/spree,net2b/spree,jordan-brough/solidus,urimikhli/spree,brchristian/spree,thogg4/spree,jimblesm/spree,athal7/solidus,alepore/spree,hifly/spree,watg/spree,APohio/spree,Hawaiideveloper/shoppingcart,berkes/spree,builtbybuffalo/spree,LBRapid/spree,nooysters/spree,keatonrow/spree,pjmj777/spree,Hates/spree,assembledbrands/spree,yushine/spree,progsri/spree,camelmasa/spree,moneyspyder/spree,volpejoaquin/spree,dandanwei/spree,biagidp/spree,rbngzlv/spree,jparr/spree,scottcrawford03/solidus,codesavvy/sandbox,karlitxo/spree,yiqing95/spree,TrialGuides/spree,net2b/spree,brchristian/spree,Arpsara/solidus,miyazawatomoka/spree,priyank-gupta/spree,Boomkat/spree,LBRapid/spree,ckk-scratch/solidus,pjmj777/spree,yiqing95/spree,ayb/spree,DynamoMTL/spree,caiqinghua/spree,Nevensoft/spree,Antdesk/karpal-spree,ckk-scratch/solidus,carlesjove/spree,zaeznet/spree,camelmasa/spree,priyank-gupta/spree,nooysters/spree,njerrywerry/spree,tailic/spree,NerdsvilleCEO/spree,orenf/spree,judaro13/spree-fork,calvinl/spree,KMikhaylovCTG/spree,Kagetsuki/spree,shioyama/spree,Ropeney/spree,AgilTec/spree,radarseesradar/spree,volpejoaquin/spree,njerrywerry/spree,hoanghiep90/spree,azranel/spree,raow/spree,Lostmyname/spree,calvinl/spree,project-eutopia/spree,jparr/spree,gautamsawhney/spree,Lostmyname/spree,codesavvy/sandbox,knuepwebdev/FloatTubeRodHolders,alvinjean/spree,azclick/spree,rakibulislam/spree,vcavallo/spree,pervino/spree,useiichi/spree,odk211/spree,freerunningtech/spree,Hawaiideveloper/shoppingcart,Antdesk/karpal-spree,Engeltj/spree,useiichi/spree,orenf/spree,sunny2601/spree,scottcrawford03/solidus,archSeer/spree,CJMrozek/spree,welitonfreitas/spree,yomishra/pce,vulk/spree,adaddeo/spree,ayb/spree,raow/spree,DynamoMTL/spree,vmatekole/spree,jhawthorn/spree,edgward/spree,jordan-brough/solidus,Hates/spree,Senjai/solidus,sideci-sample/sideci-sample-spree,kitwalker12/spree,lsirivong/spree,mindvolt/spree,groundctrl/spree,reinaris/spree,DarkoP/spree,shekibobo/spree,jordan-brough/spree,SadTreeFriends/spree,JuandGirald/spree,biagidp/spree,progsri/spree,madetech/spree,trigrass2/spree,robodisco/spree,raow/spree,odk211/spree,piousbox/spree,quentinuys/spree,rakibulislam/spree,grzlus/spree,vmatekole/spree,gregoryrikson/spree-sample,berkes/spree,rajeevriitm/spree,reinaris/spree,FadliKun/spree,forkata/solidus,brchristian/spree,abhishekjain16/spree,joanblake/spree,priyank-gupta/spree,ahmetabdi/spree,LBRapid/spree,jsurdilla/solidus,jaspreet21anand/spree,surfdome/spree,abhishekjain16/spree,dafontaine/spree,reidblomquist/spree,beni55/spree,RatioClothing/spree,priyank-gupta/spree,pervino/spree,njerrywerry/spree,lsirivong/solidus,ramkumar-kr/spree,mleglise/spree,CiscoCloud/spree,tesserakt/clean_spree,jasonfb/spree,alejandromangione/spree,radarseesradar/spree,TimurTarasenko/spree,reinaris/spree,NerdsvilleCEO/spree,ramkumar-kr/spree,wolfieorama/spree,radarseesradar/spree,JDutil/spree,Hawaiideveloper/shoppingcart,reidblomquist/spree,lzcabrera/spree-1-3-stable,TimurTarasenko/spree,Machpowersystems/spree_mach,useiichi/spree,piousbox/spree,shioyama/spree,woboinc/spree,azclick/spree,jparr/spree,omarsar/spree,patdec/spree,jeffboulet/spree,tailic/spree,zamiang/spree,JDutil/spree,ahmetabdi/spree,StemboltHQ/spree,njerrywerry/spree,devilcoders/solidus,caiqinghua/spree,ujai/spree,vcavallo/spree,jordan-brough/solidus,bjornlinder/Spree,knuepwebdev/FloatTubeRodHolders,vulk/spree,Hates/spree,softr8/spree,karlitxo/spree,DarkoP/spree,grzlus/spree,ayb/spree,HealthWave/spree,Ropeney/spree,patdec/spree,jasonfb/spree,Nevensoft/spree,StemboltHQ/spree,omarsar/spree,sfcgeorge/spree,Arpsara/solidus,madetech/spree,miyazawatomoka/spree,jspizziri/spree,groundctrl/spree,berkes/spree,surfdome/spree,shioyama/spree,woboinc/spree,joanblake/spree,radarseesradar/spree,yiqing95/spree,tailic/spree,thogg4/spree,AgilTec/spree,FadliKun/spree,lsirivong/solidus,beni55/spree,tancnle/spree,siddharth28/spree,vinayvinsol/spree,jimblesm/spree,PhoenixTeam/spree_phoenix,lsirivong/spree,urimikhli/spree,sunny2601/spree,xuewenfei/solidus,richardnuno/solidus,trigrass2/spree,hoanghiep90/spree,imella/spree,maybii/spree,piousbox/spree,ramkumar-kr/spree,grzlus/solidus,yushine/spree,pulkit21/spree,JDutil/spree,bricesanchez/spree,lyzxsc/spree,alepore/spree,zamiang/spree,Migweld/spree,mleglise/spree,bricesanchez/spree,lyzxsc/spree,joanblake/spree,vinayvinsol/spree,jeffboulet/spree,vcavallo/spree,wolfieorama/spree,abhishekjain16/spree,xuewenfei/solidus,cutefrank/spree,AgilTec/spree,hifly/spree,siddharth28/spree,yushine/spree,ckk-scratch/solidus,builtbybuffalo/spree,gautamsawhney/spree,Mayvenn/spree,firman/spree,forkata/solidus,jaspreet21anand/spree,dafontaine/spree,abhishekjain16/spree,sliaquat/spree,project-eutopia/spree,jspizziri/spree,Migweld/spree,rakibulislam/spree,rbngzlv/spree,Arpsara/solidus,moneyspyder/spree,KMikhaylovCTG/spree,TimurTarasenko/spree,sideci-sample/sideci-sample-spree,shekibobo/spree,bonobos/solidus,omarsar/spree,useiichi/spree,firman/spree,pervino/spree,Lostmyname/spree,adaddeo/spree,robodisco/spree,JDutil/spree,forkata/solidus,pulkit21/spree,richardnuno/solidus,jaspreet21anand/spree,gautamsawhney/spree,miyazawatomoka/spree,SadTreeFriends/spree,athal7/solidus,lzcabrera/spree-1-3-stable,codesavvy/sandbox,dotandbo/spree,project-eutopia/spree,adaddeo/spree,brchristian/spree,TimurTarasenko/spree,urimikhli/spree,rajeevriitm/spree,pervino/solidus,welitonfreitas/spree,firman/spree,Migweld/spree,tesserakt/clean_spree,RatioClothing/spree,jordan-brough/spree,AgilTec/spree,KMikhaylovCTG/spree,mleglise/spree,locomotivapro/spree,madetech/spree,softr8/spree,Hates/spree,jhawthorn/spree,Hawaiideveloper/shoppingcart,freerunningtech/spree,softr8/spree,builtbybuffalo/spree,robodisco/spree,sfcgeorge/spree,lzcabrera/spree-1-3-stable,sliaquat/spree,jasonfb/spree,CJMrozek/spree,agient/agientstorefront,Senjai/spree,ckk-scratch/solidus,SadTreeFriends/spree,firman/spree,delphsoft/spree-store-ballchair,Engeltj/spree,Mayvenn/spree,sliaquat/spree,Senjai/spree,raow/spree,sideci-sample/sideci-sample-spree,locomotivapro/spree,degica/spree,vinayvinsol/spree
html+erb
## Code Before: Dear Customer, Your order has been CANCELED. Please retain this cancellation information for your records. ============================================================ Order Summary [CANCELED] ============================================================ <% @order.line_items.each do |item| %> <%= item.variant.sku %> <%= item.variant.product.name %> <%= variant_options(item.variant) %> (<%= item.quantity %>) @ <%= number_to_currency item.price %> = <%= number_to_currency(item.price * item.quantity) %> <% end %> ============================================================ Subtotal: <%= number_to_currency @order.item_total %> <% @order.adjustments.eligible.each do |adjustment| %> <%= "#{adjustment.label}: #{number_to_currency adjustment.amount}"%> <% end %> Order Total: <%= number_to_currency @order.total %> ## Instruction: Make cancel email match changes in confirm email made by Radar in 5bef374 Fixes #1621 ## Code After: Dear Customer, Your order has been CANCELED. Please retain this cancellation information for your records. ============================================================ Order Summary [CANCELED] ============================================================ <% @order.line_items.each do |item| %> <%= item.variant.sku %> <%= raw(item.variant.product.name) %> <%= raw(item.variant.options_text) -%> (<%=item.quantity%>) @ <%= number_to_currency item.price %> = <%= number_to_currency(item.price * item.quantity) %> <% end %> ============================================================ Subtotal: <%= number_to_currency @order.item_total %> <% @order.adjustments.eligible.each do |adjustment| %> <%= raw(adjustment.label) %> <%= number_to_currency(adjustment.amount) %> <% end %> Order Total: <%= number_to_currency(@order.total) %>
fa00133c08477f7f40a35c012919016cba173fb2
meta-resin-ts/recipes-bsp/u-boot/u-boot-script-ts/resin_sdboot.txt
meta-resin-ts/recipes-bsp/u-boot/u-boot-script-ts/resin_sdboot.txt
setenv uimage /uImage setenv bootargs root=/dev/mmcblk1p2 rootwait rw console=ttymxc0,115200 enable_wait_mode=off if load mmc 0:1 ${fdtaddr} /imx6${cpu}-ts4900-${baseboardid}.dtb; then echo $baseboardid detected; else echo Booting default device tree; load mmc 0:1 ${fdtaddr} /imx6${cpu}-ts4900.dtb; fi; load mmc 0:1 ${loadaddr} /ts4900-fpga.bin; ice40 ${loadaddr} ${filesize}; load mmc 0:1 ${loadaddr} ${uimage};; bootm ${loadaddr} - ${fdtaddr};
setenv uimage /boot/uImage setenv bootargs root=/dev/mmcblk1p2 rootwait rw console=ttymxc0,115200 enable_wait_mode=off if load mmc 0:1 ${fdtaddr} /boot/imx6${cpu}-ts4900-${baseboardid}.dtb; then echo $baseboardid detected; else echo Booting default device tree; load mmc 0:1 ${fdtaddr} /boot/imx6${cpu}-ts4900.dtb; fi; load mmc 0:1 ${loadaddr} /boot/ts4900-fpga.bin; ice40 ${loadaddr} ${filesize}; load mmc 0:1 ${loadaddr} ${uimage};; bootm ${loadaddr} - ${fdtaddr};
Update file location for the boot script
u-boot-script-ts: Update file location for the boot script Signed-off-by: Theodor Gherzan <be3f40ffe21d83aefcbc279c996fd6bca5445244@resin.io>
Text
apache-2.0
resin-os/meta-resin,resin-os/meta-resin,resin-os/meta-resin,resin-os/meta-resin
text
## Code Before: setenv uimage /uImage setenv bootargs root=/dev/mmcblk1p2 rootwait rw console=ttymxc0,115200 enable_wait_mode=off if load mmc 0:1 ${fdtaddr} /imx6${cpu}-ts4900-${baseboardid}.dtb; then echo $baseboardid detected; else echo Booting default device tree; load mmc 0:1 ${fdtaddr} /imx6${cpu}-ts4900.dtb; fi; load mmc 0:1 ${loadaddr} /ts4900-fpga.bin; ice40 ${loadaddr} ${filesize}; load mmc 0:1 ${loadaddr} ${uimage};; bootm ${loadaddr} - ${fdtaddr}; ## Instruction: u-boot-script-ts: Update file location for the boot script Signed-off-by: Theodor Gherzan <be3f40ffe21d83aefcbc279c996fd6bca5445244@resin.io> ## Code After: setenv uimage /boot/uImage setenv bootargs root=/dev/mmcblk1p2 rootwait rw console=ttymxc0,115200 enable_wait_mode=off if load mmc 0:1 ${fdtaddr} /boot/imx6${cpu}-ts4900-${baseboardid}.dtb; then echo $baseboardid detected; else echo Booting default device tree; load mmc 0:1 ${fdtaddr} /boot/imx6${cpu}-ts4900.dtb; fi; load mmc 0:1 ${loadaddr} /boot/ts4900-fpga.bin; ice40 ${loadaddr} ${filesize}; load mmc 0:1 ${loadaddr} ${uimage};; bootm ${loadaddr} - ${fdtaddr};
996e3b524bad849509d1375928f575399c292b51
config.ru
config.ru
require 'application' use Rack::Session::Cookie use Rack::ShowExceptions run Application
require 'application' use Rack::Session::Cookie use Rack::ShowExceptions use Rack::Static, :urls => [ '/favicon.ico', '/css' ], :root => "public" run Application
Use the Rack::Static middleware for serving the static public folder.
Use the Rack::Static middleware for serving the static public folder.
Ruby
mit
eddanger/sinatra-template
ruby
## Code Before: require 'application' use Rack::Session::Cookie use Rack::ShowExceptions run Application ## Instruction: Use the Rack::Static middleware for serving the static public folder. ## Code After: require 'application' use Rack::Session::Cookie use Rack::ShowExceptions use Rack::Static, :urls => [ '/favicon.ico', '/css' ], :root => "public" run Application
1ebc81d8ee9473c52780c50040afba89ac7fa8f0
src/common/me/nallar/exception/ThreadStuckError.java
src/common/me/nallar/exception/ThreadStuckError.java
package me.nallar.exception; /** * Thrown via Thread.stop() to try to resolve a deadlock, should be caught in Thread.run(), and thread should attempt to resume working. */ public class ThreadStuckError extends Error { public ThreadStuckError() { super(); } public ThreadStuckError(final String message) { super(message); } public ThreadStuckError(final String message, final Throwable cause) { super(message, cause); } public ThreadStuckError(final Throwable cause) { super(cause); } protected ThreadStuckError(final String message, final Throwable cause, final boolean enableSuppression, final boolean writableStackTrace) { super(message, cause, enableSuppression, writableStackTrace); } }
package me.nallar.exception; /** * Thrown via Thread.stop() to try to resolve a deadlock, should be caught in Thread.run(), and thread should attempt to resume working. */ public class ThreadStuckError extends Error { public ThreadStuckError() { super(); } public ThreadStuckError(final String message) { super(message); } public ThreadStuckError(final String message, final Throwable cause) { super(message, cause); } public ThreadStuckError(final Throwable cause) { super(cause); } }
Remove JDK 7 only constructor
Remove JDK 7 only constructor Signed-off-by: Ross Allan <ca2c77e14df1e7ee673215c1ef658354e220f471@gmail.com>
Java
mit
nallar/TickThreading
java
## Code Before: package me.nallar.exception; /** * Thrown via Thread.stop() to try to resolve a deadlock, should be caught in Thread.run(), and thread should attempt to resume working. */ public class ThreadStuckError extends Error { public ThreadStuckError() { super(); } public ThreadStuckError(final String message) { super(message); } public ThreadStuckError(final String message, final Throwable cause) { super(message, cause); } public ThreadStuckError(final Throwable cause) { super(cause); } protected ThreadStuckError(final String message, final Throwable cause, final boolean enableSuppression, final boolean writableStackTrace) { super(message, cause, enableSuppression, writableStackTrace); } } ## Instruction: Remove JDK 7 only constructor Signed-off-by: Ross Allan <ca2c77e14df1e7ee673215c1ef658354e220f471@gmail.com> ## Code After: package me.nallar.exception; /** * Thrown via Thread.stop() to try to resolve a deadlock, should be caught in Thread.run(), and thread should attempt to resume working. */ public class ThreadStuckError extends Error { public ThreadStuckError() { super(); } public ThreadStuckError(final String message) { super(message); } public ThreadStuckError(final String message, final Throwable cause) { super(message, cause); } public ThreadStuckError(final Throwable cause) { super(cause); } }
17a94591d5df4a77153888b2cb71a494233d39a7
lib/settings/allowed_phone_numbers.js
lib/settings/allowed_phone_numbers.js
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 'use strict' module.exports = (config, Settings, log) => { class AllowedPhoneNumbers extends Settings { constructor(phoneNumbers) { super('allowedPhoneNumbers') this.setAll(phoneNumbers) } isAllowed(phoneNumber) { return phoneNumber in this.phoneNumbers } setAll(phoneNumbers) { this.phoneNumbers = {} phoneNumbers.forEach((phoneNumber) => { this.phoneNumbers[phoneNumber] = true }) return Object.keys(this.phoneNumbers) } validate(phoneNumbers) { if (!Array.isArray(phoneNumbers)) { log.error({ op: 'allowedPhoneNumbers.validate.invalid', data: phoneNumbers }) throw new Settings.Missing('invalid allowedPhoneNumbers from memcache') } return phoneNumbers } toJSON() { return Object.keys(this.phoneNumbers) } } return new AllowedPhoneNumbers(config.allowedPhoneNumbers || []) }
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 'use strict' module.exports = (config, Settings, log) => { class AllowedPhoneNumbers extends Settings { constructor(phoneNumbers) { super('allowedPhoneNumbers') this.setAll(phoneNumbers) } isAllowed(phoneNumber) { return this.phoneNumbers.has(phoneNumber) } setAll(phoneNumbers) { this.phoneNumbers = new Set(phoneNumbers) } validate(phoneNumbers) { if (!Array.isArray(phoneNumbers)) { log.error({ op: 'allowedPhoneNumbers.validate.invalid', data: phoneNumbers }) throw new Settings.Missing('invalid allowedPhoneNumbers from memcache') } return phoneNumbers } toJSON() { return Array.from(this.phoneNumbers) } } return new AllowedPhoneNumbers(config.allowedPhoneNumbers || []) }
Store allowed phone numbers in a Set
chore(sms): Store allowed phone numbers in a Set
JavaScript
mpl-2.0
mozilla/fxa-customs-server,mozilla/fxa-customs-server
javascript
## Code Before: /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 'use strict' module.exports = (config, Settings, log) => { class AllowedPhoneNumbers extends Settings { constructor(phoneNumbers) { super('allowedPhoneNumbers') this.setAll(phoneNumbers) } isAllowed(phoneNumber) { return phoneNumber in this.phoneNumbers } setAll(phoneNumbers) { this.phoneNumbers = {} phoneNumbers.forEach((phoneNumber) => { this.phoneNumbers[phoneNumber] = true }) return Object.keys(this.phoneNumbers) } validate(phoneNumbers) { if (!Array.isArray(phoneNumbers)) { log.error({ op: 'allowedPhoneNumbers.validate.invalid', data: phoneNumbers }) throw new Settings.Missing('invalid allowedPhoneNumbers from memcache') } return phoneNumbers } toJSON() { return Object.keys(this.phoneNumbers) } } return new AllowedPhoneNumbers(config.allowedPhoneNumbers || []) } ## Instruction: chore(sms): Store allowed phone numbers in a Set ## Code After: /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 'use strict' module.exports = (config, Settings, log) => { class AllowedPhoneNumbers extends Settings { constructor(phoneNumbers) { super('allowedPhoneNumbers') this.setAll(phoneNumbers) } isAllowed(phoneNumber) { return this.phoneNumbers.has(phoneNumber) } setAll(phoneNumbers) { this.phoneNumbers = new Set(phoneNumbers) } validate(phoneNumbers) { if (!Array.isArray(phoneNumbers)) { log.error({ op: 'allowedPhoneNumbers.validate.invalid', data: phoneNumbers }) throw new Settings.Missing('invalid allowedPhoneNumbers from memcache') } return phoneNumbers } toJSON() { return Array.from(this.phoneNumbers) } } return new AllowedPhoneNumbers(config.allowedPhoneNumbers || []) }
7e96f42ead976f5e2935933e2c0aae167ac4c88c
part-responsive-svg.php
part-responsive-svg.php
<?php /** * The default template for displaying content. Used for both single and index/archive/search. * * @subpackage cerulean * @since cerulean 4.0 */ global $responsive_svg; ?> <?php if (!empty(get_field_img($responsive_svg['img_field']))){ ?> <?php $path = get_attached_file(get_field($responsive_svg['img_field']) ); $file = file_get_contents($path); preg_match('/viewBox="[0-9\s]+"/i', $file, $viewbox); $viewbox = explode(' ', $viewbox[0]) ; $ratio = floor($viewbox[3] / $viewbox[2] *10000) /100; //var_dump($ratio); $file = preg_replace('/<svg.+(viewBox="[0-9\s]+").+>/i', '<svg version="1.1" preserveAspectRatio="xMinYMin meet" class="u-svg__content" $1>', $file); ?> <div class="u-svg <?php echo $responsive_svg['class_svg-container'];?>" <?php echo $responsive_svg['attr_svg-container'];?> style="padding-bottom:<?php echo $ratio; ?>%"> <?php echo $file; ?> </div> <?php } ?>
<?php /** * The default template for displaying content. Used for both single and index/archive/search. * * @subpackage cerulean * @since cerulean 4.0 */ global $responsive_svg; ?> <?php if (!empty(get_field($responsive_svg['img_field'],$responsive_svg['post_id']))){ ?> <?php $path = get_attached_file(get_field($responsive_svg['img_field'],$responsive_svg['post_id']) ); $file = file_get_contents($path); preg_match('/viewBox="[0-9\s]+"/i', $file, $viewbox); $viewbox = explode(' ', $viewbox[0]) ; $ratio = floor($viewbox[3] / $viewbox[2] *10000) /100; //var_dump($ratio); $file = preg_replace('/<svg.+(viewBox="[0-9\s]+").+>/i', '<svg version="1.1" preserveAspectRatio="xMinYMin meet" class="u-svg__content" $1>', $file); ?> <div class="u-svg <?php echo $responsive_svg['class_svg-container'];?>" <?php echo $responsive_svg['attr_svg-container'];?> style="padding-bottom:<?php echo $ratio; ?>%"> <?php echo $file; ?> </div> <?php } ?>
Support for post id/opions page in responsive svg
Support for post id/opions page in responsive svg
PHP
mit
studioup/cerulean,studioup/cerulean,studioup/cerulean,studioup/cerulean,studioup/cerulean
php
## Code Before: <?php /** * The default template for displaying content. Used for both single and index/archive/search. * * @subpackage cerulean * @since cerulean 4.0 */ global $responsive_svg; ?> <?php if (!empty(get_field_img($responsive_svg['img_field']))){ ?> <?php $path = get_attached_file(get_field($responsive_svg['img_field']) ); $file = file_get_contents($path); preg_match('/viewBox="[0-9\s]+"/i', $file, $viewbox); $viewbox = explode(' ', $viewbox[0]) ; $ratio = floor($viewbox[3] / $viewbox[2] *10000) /100; //var_dump($ratio); $file = preg_replace('/<svg.+(viewBox="[0-9\s]+").+>/i', '<svg version="1.1" preserveAspectRatio="xMinYMin meet" class="u-svg__content" $1>', $file); ?> <div class="u-svg <?php echo $responsive_svg['class_svg-container'];?>" <?php echo $responsive_svg['attr_svg-container'];?> style="padding-bottom:<?php echo $ratio; ?>%"> <?php echo $file; ?> </div> <?php } ?> ## Instruction: Support for post id/opions page in responsive svg ## Code After: <?php /** * The default template for displaying content. Used for both single and index/archive/search. * * @subpackage cerulean * @since cerulean 4.0 */ global $responsive_svg; ?> <?php if (!empty(get_field($responsive_svg['img_field'],$responsive_svg['post_id']))){ ?> <?php $path = get_attached_file(get_field($responsive_svg['img_field'],$responsive_svg['post_id']) ); $file = file_get_contents($path); preg_match('/viewBox="[0-9\s]+"/i', $file, $viewbox); $viewbox = explode(' ', $viewbox[0]) ; $ratio = floor($viewbox[3] / $viewbox[2] *10000) /100; //var_dump($ratio); $file = preg_replace('/<svg.+(viewBox="[0-9\s]+").+>/i', '<svg version="1.1" preserveAspectRatio="xMinYMin meet" class="u-svg__content" $1>', $file); ?> <div class="u-svg <?php echo $responsive_svg['class_svg-container'];?>" <?php echo $responsive_svg['attr_svg-container'];?> style="padding-bottom:<?php echo $ratio; ?>%"> <?php echo $file; ?> </div> <?php } ?>
f784fdcb82a284c2909026e3309160d5a82c9452
_posts/faq/2014-09-10-access-to-other-repositories-fails-during-build.md
_posts/faq/2014-09-10-access-to-other-repositories-fails-during-build.md
--- title: Access to other repositories fails during build layout: page tags: - faq - build error - ssh key - github - bitbucket categories: - faq --- Some builds require access to other private repositories for example to use as a dependency. Every project on the Codeship gets an SSH Key you can use to give us access to other private GitHub or Bitbucket repositories. You can find the SSH Key in your project configuration on the general page. By default we only add the SSH key to the repository you've set up. If you need to give access to more repositories you can either add it to your own user account or create a new GitHub user account you add the SSH key to. You can then add this new user to the repositories you want to give us access to them. This way you don't need to give us access to all of your repositories. GitHub calls it a machine user and you can read more about it in their [documentation](https://help.github.com/articles/managing-deploy-keys). By adding the SSH key to your own account we then have access to all of your repositories. An ssh key can only be added once to GitHub or Bitbucket, so make sure you remove it from the deployment keys of your GitHub repository first. **Typical error messages are:** ```shell remote: Repository not found ``` ```shell fatal: Could not read from remote repository ``` ```shell Permission denied (publickey). ```
--- title: Access to other repositories fails during build layout: page tags: - faq - build error - ssh key - github - bitbucket categories: - faq --- Some builds require access to other private repositories for example to use as a dependency. Codeship creates a SSH key pair for each project when you first configure it. You can view the public key on the _General_ page of your project settings and it gets automatically added as a deploy key to your GitHub or BitBucket repository. If you need access to other (private) repositories besides this main repository, you need to follow these steps: 1. Remove the Codeship deploy key from the main repository 2. Create a [machine user](https://developer.github.com/guides/managing-deploy-keys/#machine-users) 3. Add the public key from your projects _General_ settings page to the machine user (this is the key that was previously added as a deploy key) 4. Add the machine user to both projects Even though we reference only GitHub above, the procedure is the same when your project is hosted on BitBucket. As an alternative you can also add the key to your personal GitHub / BitBucket user account instead of a machine user. Keep in mind that this will allow the project to access any repository which you are allowed to access on those services. ## Typical error messages for this error ```shell remote: Repository not found ``` ```shell fatal: Could not read from remote repository ``` ```shell Permission denied (publickey). ```
Update article on accessing remote repositories
Update article on accessing remote repositories
Markdown
mit
codeship/documentation,mlocher/documentation,codeship/documentation,mlocher/documentation,codeship/documentation,codeship/documentation,mlocher/documentation,mlocher/documentation
markdown
## Code Before: --- title: Access to other repositories fails during build layout: page tags: - faq - build error - ssh key - github - bitbucket categories: - faq --- Some builds require access to other private repositories for example to use as a dependency. Every project on the Codeship gets an SSH Key you can use to give us access to other private GitHub or Bitbucket repositories. You can find the SSH Key in your project configuration on the general page. By default we only add the SSH key to the repository you've set up. If you need to give access to more repositories you can either add it to your own user account or create a new GitHub user account you add the SSH key to. You can then add this new user to the repositories you want to give us access to them. This way you don't need to give us access to all of your repositories. GitHub calls it a machine user and you can read more about it in their [documentation](https://help.github.com/articles/managing-deploy-keys). By adding the SSH key to your own account we then have access to all of your repositories. An ssh key can only be added once to GitHub or Bitbucket, so make sure you remove it from the deployment keys of your GitHub repository first. **Typical error messages are:** ```shell remote: Repository not found ``` ```shell fatal: Could not read from remote repository ``` ```shell Permission denied (publickey). ``` ## Instruction: Update article on accessing remote repositories ## Code After: --- title: Access to other repositories fails during build layout: page tags: - faq - build error - ssh key - github - bitbucket categories: - faq --- Some builds require access to other private repositories for example to use as a dependency. Codeship creates a SSH key pair for each project when you first configure it. You can view the public key on the _General_ page of your project settings and it gets automatically added as a deploy key to your GitHub or BitBucket repository. If you need access to other (private) repositories besides this main repository, you need to follow these steps: 1. Remove the Codeship deploy key from the main repository 2. Create a [machine user](https://developer.github.com/guides/managing-deploy-keys/#machine-users) 3. Add the public key from your projects _General_ settings page to the machine user (this is the key that was previously added as a deploy key) 4. Add the machine user to both projects Even though we reference only GitHub above, the procedure is the same when your project is hosted on BitBucket. As an alternative you can also add the key to your personal GitHub / BitBucket user account instead of a machine user. Keep in mind that this will allow the project to access any repository which you are allowed to access on those services. ## Typical error messages for this error ```shell remote: Repository not found ``` ```shell fatal: Could not read from remote repository ``` ```shell Permission denied (publickey). ```
0b4716822f6aa77075919b9b31956751d8fd8523
.emacs.d/lisp/pjs-stardica.el
.emacs.d/lisp/pjs-stardica.el
;;; pjs-stardica.el --- Stardica code and config -*- lexical-binding: t; -*- ;;; Commentary: ;;; Code: (require 'pjs) (setq pjs-inhibit-clojure-align-on-save 't) (setq pjs-inhibit-cleanup-on-save 't) (setq default-directory "~/") (require 'org) (require 'projectile) (setq projectile-project-root-files nil) (add-to-list 'org-agenda-files "~/clubhouse/clubhouse.org" t) (remove-hook 'prog-mode-hook 'whitespace-mode) (use-package clubhouse-backend :load-path "~/src/backend/elisp" :hook (clojure-mode . clubhouse-backend-font-lock) :bind (("C-c C-r" . clubhouse-backend-goto-defresource))) (provide 'pjs-stardica) ;;; pjs-stardica.el ends here
;;; pjs-stardica.el --- Stardica code and config -*- lexical-binding: t; -*- ;;; Commentary: ;;; Code: (require 'pjs) (setq pjs-inhibit-clojure-align-on-save 't) (setq pjs-inhibit-cleanup-on-save 't) (setq default-directory "~/") (require 'org) (require 'projectile) (setq projectile-project-root-files nil) (add-to-list 'org-agenda-files "~/clubhouse/clubhouse.org" t) (remove-hook 'prog-mode-hook 'whitespace-mode) (use-package clubhouse-backend :load-path "~/src/backend/elisp" :if (file-exists-p "~/src/backend/elisp") :hook (clojure-mode . clubhouse-backend-font-lock) :commands (clubhouse-backend-jack-in-dev-system) :bind (("C-c C-r" . clubhouse-backend-goto-defresource))) (provide 'pjs-stardica) ;;; pjs-stardica.el ends here
Add dev-system jack-in as command
Add dev-system jack-in as command
Emacs Lisp
apache-2.0
pjstadig/dotfiles,pjstadig/dotfiles
emacs-lisp
## Code Before: ;;; pjs-stardica.el --- Stardica code and config -*- lexical-binding: t; -*- ;;; Commentary: ;;; Code: (require 'pjs) (setq pjs-inhibit-clojure-align-on-save 't) (setq pjs-inhibit-cleanup-on-save 't) (setq default-directory "~/") (require 'org) (require 'projectile) (setq projectile-project-root-files nil) (add-to-list 'org-agenda-files "~/clubhouse/clubhouse.org" t) (remove-hook 'prog-mode-hook 'whitespace-mode) (use-package clubhouse-backend :load-path "~/src/backend/elisp" :hook (clojure-mode . clubhouse-backend-font-lock) :bind (("C-c C-r" . clubhouse-backend-goto-defresource))) (provide 'pjs-stardica) ;;; pjs-stardica.el ends here ## Instruction: Add dev-system jack-in as command ## Code After: ;;; pjs-stardica.el --- Stardica code and config -*- lexical-binding: t; -*- ;;; Commentary: ;;; Code: (require 'pjs) (setq pjs-inhibit-clojure-align-on-save 't) (setq pjs-inhibit-cleanup-on-save 't) (setq default-directory "~/") (require 'org) (require 'projectile) (setq projectile-project-root-files nil) (add-to-list 'org-agenda-files "~/clubhouse/clubhouse.org" t) (remove-hook 'prog-mode-hook 'whitespace-mode) (use-package clubhouse-backend :load-path "~/src/backend/elisp" :if (file-exists-p "~/src/backend/elisp") :hook (clojure-mode . clubhouse-backend-font-lock) :commands (clubhouse-backend-jack-in-dev-system) :bind (("C-c C-r" . clubhouse-backend-goto-defresource))) (provide 'pjs-stardica) ;;; pjs-stardica.el ends here
206cacc3948677eefae567aa39dbf233370d045b
app/models/rglossa/corpus_text.rb
app/models/rglossa/corpus_text.rb
module Rglossa class CorpusText < ActiveRecord::Base has_and_belongs_to_many :metadata_values, join_table: 'rglossa_corpus_texts_metadata_values', foreign_key: 'rglossa_corpus_text_id', association_foreign_key: 'rglossa_metadata_value_id' class << self # Returns all corpus texts that are associated with the metadata values # that have the given database ids def matching_metadata(metadata_value_ids) CorpusText .select('startpos, endpos').uniq .joins('INNER JOIN rglossa_corpus_texts_metadata_values j ON ' + 'j.rglossa_corpus_text_id = rglossa_corpus_texts.id') .where(j: { rglossa_metadata_value_id: metadata_value_ids }) end end end end
module Rglossa class CorpusText < ActiveRecord::Base has_and_belongs_to_many :metadata_values, join_table: 'rglossa_corpus_texts_metadata_values', foreign_key: 'rglossa_corpus_text_id', association_foreign_key: 'rglossa_metadata_value_id' class << self def by_tid(tid) joins('INNER JOIN rglossa_corpus_texts_metadata_values j ON ' + 'j.rglossa_corpus_text_id = rglossa_corpus_texts.id') .joins('INNER JOIN rglossa_metadata_values v ON j.rglossa_metadata_value_id = v.id') .joins('INNER JOIN rglossa_metadata_categories c ON v.metadata_category_id = c.id') .where(c: {short_name: 'tid'}, v: { text_value: tid }) end # Returns all corpus texts that are associated with the metadata values # that have the given database ids def matching_metadata(metadata_value_ids) select('startpos, endpos').uniq .joins('INNER JOIN rglossa_corpus_texts_metadata_values j ON ' + 'j.rglossa_corpus_text_id = rglossa_corpus_texts.id') .where(j: { rglossa_metadata_value_id: metadata_value_ids }) end end end end
Add CorpusText.by_tid to easily find a text by its text id
Add CorpusText.by_tid to easily find a text by its text id
Ruby
mit
textlab/rglossa,textlab/glossa,textlab/glossa,textlab/rglossa,textlab/rglossa,textlab/rglossa,textlab/glossa,textlab/glossa,textlab/glossa,textlab/rglossa
ruby
## Code Before: module Rglossa class CorpusText < ActiveRecord::Base has_and_belongs_to_many :metadata_values, join_table: 'rglossa_corpus_texts_metadata_values', foreign_key: 'rglossa_corpus_text_id', association_foreign_key: 'rglossa_metadata_value_id' class << self # Returns all corpus texts that are associated with the metadata values # that have the given database ids def matching_metadata(metadata_value_ids) CorpusText .select('startpos, endpos').uniq .joins('INNER JOIN rglossa_corpus_texts_metadata_values j ON ' + 'j.rglossa_corpus_text_id = rglossa_corpus_texts.id') .where(j: { rglossa_metadata_value_id: metadata_value_ids }) end end end end ## Instruction: Add CorpusText.by_tid to easily find a text by its text id ## Code After: module Rglossa class CorpusText < ActiveRecord::Base has_and_belongs_to_many :metadata_values, join_table: 'rglossa_corpus_texts_metadata_values', foreign_key: 'rglossa_corpus_text_id', association_foreign_key: 'rglossa_metadata_value_id' class << self def by_tid(tid) joins('INNER JOIN rglossa_corpus_texts_metadata_values j ON ' + 'j.rglossa_corpus_text_id = rglossa_corpus_texts.id') .joins('INNER JOIN rglossa_metadata_values v ON j.rglossa_metadata_value_id = v.id') .joins('INNER JOIN rglossa_metadata_categories c ON v.metadata_category_id = c.id') .where(c: {short_name: 'tid'}, v: { text_value: tid }) end # Returns all corpus texts that are associated with the metadata values # that have the given database ids def matching_metadata(metadata_value_ids) select('startpos, endpos').uniq .joins('INNER JOIN rglossa_corpus_texts_metadata_values j ON ' + 'j.rglossa_corpus_text_id = rglossa_corpus_texts.id') .where(j: { rglossa_metadata_value_id: metadata_value_ids }) end end end end
ce24b8afbd77ad4fadc7d5846401afd0bfa5d61d
app/assets/stylesheets/review_queues.scss
app/assets/stylesheets/review_queues.scss
// Place all the styles related to the ReviewQueues controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ .top-filters { margin: 1.5em 0; } /* Keep the "Skip" button on review pages in the same location with or with or without an NAA button. */ body.review-queues .review-item .panel-default .panel-body a.btn[href*="response=fp"] + a.btn[href*="response=skip"] { margin-left: 57px; }
// Place all the styles related to the ReviewQueues controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ .top-filters { margin: 1.5em 0; } /* Keep the "Skip" button on review pages in the same location with or without an NAA button. */ body.review-queues .review-item .panel-default .panel-body { a.btn[href*="response=fp"] + a.btn[href*="response=skip"] { margin-left: 92px; } /*Colors and icons for review buttons*/ .btn.btn-primary.review-submit-link[href*="response=tp"] { background-color: #006800; border-color: #005800; } .btn.btn-primary.review-submit-link[href*="response=fp"] { background-color: #b00000; border-color: #a00000; } .btn.btn-primary.review-submit-link[href*="response=naa"] { background-color: #724E40; border-color: #623E30; } .btn.btn-primary.review-submit-link[href*="response=tp"]::after { content: "(\2713\2009)"; margin-left: 5px; } .btn.btn-primary.review-submit-link[href*="response=fp"]::after { content: "(\2717\200A)"; margin-left: 5px; } .btn.btn-primary.review-submit-link[href*="response=naa"]::after { content: "(\\1f4a9\\200A)"; margin-left: 5px; } }
Add colors and icons to review queue buttons
Add colors and icons to review queue buttons
SCSS
cc0-1.0
Charcoal-SE/metasmoke,Charcoal-SE/metasmoke,Charcoal-SE/metasmoke,Charcoal-SE/metasmoke
scss
## Code Before: // Place all the styles related to the ReviewQueues controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ .top-filters { margin: 1.5em 0; } /* Keep the "Skip" button on review pages in the same location with or with or without an NAA button. */ body.review-queues .review-item .panel-default .panel-body a.btn[href*="response=fp"] + a.btn[href*="response=skip"] { margin-left: 57px; } ## Instruction: Add colors and icons to review queue buttons ## Code After: // Place all the styles related to the ReviewQueues controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ .top-filters { margin: 1.5em 0; } /* Keep the "Skip" button on review pages in the same location with or without an NAA button. */ body.review-queues .review-item .panel-default .panel-body { a.btn[href*="response=fp"] + a.btn[href*="response=skip"] { margin-left: 92px; } /*Colors and icons for review buttons*/ .btn.btn-primary.review-submit-link[href*="response=tp"] { background-color: #006800; border-color: #005800; } .btn.btn-primary.review-submit-link[href*="response=fp"] { background-color: #b00000; border-color: #a00000; } .btn.btn-primary.review-submit-link[href*="response=naa"] { background-color: #724E40; border-color: #623E30; } .btn.btn-primary.review-submit-link[href*="response=tp"]::after { content: "(\2713\2009)"; margin-left: 5px; } .btn.btn-primary.review-submit-link[href*="response=fp"]::after { content: "(\2717\200A)"; margin-left: 5px; } .btn.btn-primary.review-submit-link[href*="response=naa"]::after { content: "(\\1f4a9\\200A)"; margin-left: 5px; } }
faeb378dba770d6a9b37b5a629006ec804942b0c
us_ignite/templates/hubs/object_list.html
us_ignite/templates/hubs/object_list.html
{% extends "base.html" %} {% block title %}Ignite communities - {{ block.super }}{% endblock title %} {% block content %} <h1>Ignite communities</h1> {% for object in object_list %} <div> <h2><a href="{{ object.get_absolute_url }}">{{ object.name }}</a></h2> <p>{{ object.summary }}</p> </div> {% endfor%} {% endblock content %}
{% extends "base.html" %} {% block title %}Ignite communities - {{ block.super }}{% endblock title %} {% block content %} <h1>Ignite communities</h1> <p> <a href="{% url 'hub_application'%}">Apply to be an Ignite Community.</a> </p> {% for object in object_list %} <div> <h2><a href="{{ object.get_absolute_url }}">{{ object.name }}</a></h2> <p>{{ object.summary }}</p> </div> {% endfor%} {% endblock content %}
Add register community link in the hub detail page.
Add register community link in the hub detail page.
HTML
bsd-3-clause
us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite
html
## Code Before: {% extends "base.html" %} {% block title %}Ignite communities - {{ block.super }}{% endblock title %} {% block content %} <h1>Ignite communities</h1> {% for object in object_list %} <div> <h2><a href="{{ object.get_absolute_url }}">{{ object.name }}</a></h2> <p>{{ object.summary }}</p> </div> {% endfor%} {% endblock content %} ## Instruction: Add register community link in the hub detail page. ## Code After: {% extends "base.html" %} {% block title %}Ignite communities - {{ block.super }}{% endblock title %} {% block content %} <h1>Ignite communities</h1> <p> <a href="{% url 'hub_application'%}">Apply to be an Ignite Community.</a> </p> {% for object in object_list %} <div> <h2><a href="{{ object.get_absolute_url }}">{{ object.name }}</a></h2> <p>{{ object.summary }}</p> </div> {% endfor%} {% endblock content %}
1a3db115de722a24780009683f36011e036e9086
tests/test_completion.py
tests/test_completion.py
import os import subprocess import sys from pathlib import Path import typer from typer.testing import CliRunner from first_steps import tutorial001 as mod runner = CliRunner() app = typer.Typer() app.command()(mod.main) def test_show_completion(): result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --show-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in result.stdout def test_install_completion(): bash_completion_path: Path = Path.home() / ".bash_completion" text = "" if bash_completion_path.is_file(): text = bash_completion_path.read_text() result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --install-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) new_text = bash_completion_path.read_text() assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in new_text bash_completion_path.write_text(text)
import os import subprocess import sys from pathlib import Path import typer from typer.testing import CliRunner from first_steps import tutorial001 as mod runner = CliRunner() app = typer.Typer() app.command()(mod.main) def test_show_completion(): result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --show-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in result.stdout def test_install_completion(): bash_completion_path: Path = Path.home() / ".bash_completion" text = "" if bash_completion_path.is_file(): text = bash_completion_path.read_text() result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --install-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) new_text = bash_completion_path.read_text() bash_completion_path.write_text(text) assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in new_text assert "completion installed in" in result.stdout assert "Completion will take effect once you restart the terminal." in result.stdout
Update completion tests, checking for printed message
:white_check_mark: Update completion tests, checking for printed message
Python
mit
tiangolo/typer,tiangolo/typer
python
## Code Before: import os import subprocess import sys from pathlib import Path import typer from typer.testing import CliRunner from first_steps import tutorial001 as mod runner = CliRunner() app = typer.Typer() app.command()(mod.main) def test_show_completion(): result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --show-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in result.stdout def test_install_completion(): bash_completion_path: Path = Path.home() / ".bash_completion" text = "" if bash_completion_path.is_file(): text = bash_completion_path.read_text() result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --install-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) new_text = bash_completion_path.read_text() assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in new_text bash_completion_path.write_text(text) ## Instruction: :white_check_mark: Update completion tests, checking for printed message ## Code After: import os import subprocess import sys from pathlib import Path import typer from typer.testing import CliRunner from first_steps import tutorial001 as mod runner = CliRunner() app = typer.Typer() app.command()(mod.main) def test_show_completion(): result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --show-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in result.stdout def test_install_completion(): bash_completion_path: Path = Path.home() / ".bash_completion" text = "" if bash_completion_path.is_file(): text = bash_completion_path.read_text() result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --install-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) new_text = bash_completion_path.read_text() bash_completion_path.write_text(text) assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in new_text assert "completion installed in" in result.stdout assert "Completion will take effect once you restart the terminal." in result.stdout
94f644dda0b76812bea019e7ca66ac3862c514ab
quality.rb
quality.rb
require 'json' require 'net/http' require 'uri' if ARGV.length < 1 puts "Usage: #{$PROGRAM_NAME} [POD_NAME]" exit 1 end uri = URI.parse("https://cocoadocs-api-cocoapods-org.herokuapp.com/pods/#{ARGV[0]}/stats") quality = Net::HTTP.get_response(uri).body if quality[0] != '[' puts quality exit 1 end quality = JSON.parse(quality) uri = URI.parse("http://metrics.cocoapods.org/api/v1/pods/#{ARGV[0]}.json") metrics = JSON.parse(Net::HTTP.get_response(uri).body) quality.each do |metric| if (metric['modifier'] > 0 && !metric['applies_for_pod']) || (metric['modifier'] < 0 && metric['applies_for_pod']) puts "🚫 #{metric['title']}: #{metric['description']}" end end puts "\nCurrent quality estimate: #{metrics['cocoadocs']['quality_estimate']}"
require 'json' require 'net/http' require 'uri' if ARGV.length < 1 puts "Usage: #{$PROGRAM_NAME} [POD_NAME]" exit 1 end uri = URI.parse("https://cocoadocs-api-cocoapods-org.herokuapp.com/pods/#{ARGV[0]}/stats") quality = Net::HTTP.get_response(uri).body if quality[0] != '{' puts quality exit 1 end quality = JSON.parse(quality)['metrics'] uri = URI.parse("http://metrics.cocoapods.org/api/v1/pods/#{ARGV[0]}.json") metrics = JSON.parse(Net::HTTP.get_response(uri).body) quality.each do |metric| if (metric['modifier'] > 0 && !metric['applies_for_pod']) || (metric['modifier'] < 0 && metric['applies_for_pod']) puts "🚫 #{metric['title']}: #{metric['description']}" end end puts "\nCurrent quality estimate: #{metrics['cocoadocs']['quality_estimate']}"
Update for newer version of CD API.
Update for newer version of CD API.
Ruby
mit
neonichu/pod-utils
ruby
## Code Before: require 'json' require 'net/http' require 'uri' if ARGV.length < 1 puts "Usage: #{$PROGRAM_NAME} [POD_NAME]" exit 1 end uri = URI.parse("https://cocoadocs-api-cocoapods-org.herokuapp.com/pods/#{ARGV[0]}/stats") quality = Net::HTTP.get_response(uri).body if quality[0] != '[' puts quality exit 1 end quality = JSON.parse(quality) uri = URI.parse("http://metrics.cocoapods.org/api/v1/pods/#{ARGV[0]}.json") metrics = JSON.parse(Net::HTTP.get_response(uri).body) quality.each do |metric| if (metric['modifier'] > 0 && !metric['applies_for_pod']) || (metric['modifier'] < 0 && metric['applies_for_pod']) puts "🚫 #{metric['title']}: #{metric['description']}" end end puts "\nCurrent quality estimate: #{metrics['cocoadocs']['quality_estimate']}" ## Instruction: Update for newer version of CD API. ## Code After: require 'json' require 'net/http' require 'uri' if ARGV.length < 1 puts "Usage: #{$PROGRAM_NAME} [POD_NAME]" exit 1 end uri = URI.parse("https://cocoadocs-api-cocoapods-org.herokuapp.com/pods/#{ARGV[0]}/stats") quality = Net::HTTP.get_response(uri).body if quality[0] != '{' puts quality exit 1 end quality = JSON.parse(quality)['metrics'] uri = URI.parse("http://metrics.cocoapods.org/api/v1/pods/#{ARGV[0]}.json") metrics = JSON.parse(Net::HTTP.get_response(uri).body) quality.each do |metric| if (metric['modifier'] > 0 && !metric['applies_for_pod']) || (metric['modifier'] < 0 && metric['applies_for_pod']) puts "🚫 #{metric['title']}: #{metric['description']}" end end puts "\nCurrent quality estimate: #{metrics['cocoadocs']['quality_estimate']}"
27fe53b384b7c126875f83828d55d6978299d3e0
scripts/build.sh
scripts/build.sh
ORIGIN_ROOT="." DIST_ROOT="$ORIGIN_ROOT/dist" # clean up rm -Rf $DIST_ROOT; # create build directory (structure) mkdir -p $DIST_ROOT; # copy assets cp -r $ORIGIN_ROOT/katas $DIST_ROOT; cp $ORIGIN_ROOT/CNAME $DIST_ROOT/CNAME; cp $ORIGIN_ROOT/html/proxy.html $DIST_ROOT/; # replace place holder KATAS_SERVICE_DOMAIN with env var, so it can be different in dev/prod mode sed -i '' "s/\${TDDBIN_ROOT_DOMAIN}/$TDDBIN_ROOT_DOMAIN/g" $DIST_ROOT/proxy.html
ORIGIN_ROOT="." DIST_ROOT="$ORIGIN_ROOT/dist" # clean up rm -Rf $DIST_ROOT; # create build directory (structure) mkdir -p $DIST_ROOT; # copy assets cp -r $ORIGIN_ROOT/katas $DIST_ROOT; cp $ORIGIN_ROOT/CNAME $DIST_ROOT/CNAME; cp $ORIGIN_ROOT/html/proxy.html $DIST_ROOT/; # replace place holder KATAS_SERVICE_DOMAIN with env var, so it can be different in dev/prod mode if [[ $OSTYPE == darwin* ]]; then sed -i '' "s/\${TDDBIN_ROOT_DOMAIN}/$TDDBIN_ROOT_DOMAIN/g" $DIST_ROOT/proxy.html else sed -i "s/\${TDDBIN_ROOT_DOMAIN}/$TDDBIN_ROOT_DOMAIN/g" $DIST_ROOT/proxy.html fi;
Make `sed` command work on linux too (on travis).
Make `sed` command work on linux too (on travis).
Shell
mit
rafaelrocha/katas,tddbin/katas,ehpc/katas,JonathanPrince/katas,cmisenas/katas,rafaelrocha/katas,ehpc/katas,rafaelrocha/katas,cmisenas/katas,cmisenas/katas,Semigradsky/katas,tddbin/katas,Semigradsky/katas,Semigradsky/katas,JonathanPrince/katas,ehpc/katas,tddbin/katas,JonathanPrince/katas
shell
## Code Before: ORIGIN_ROOT="." DIST_ROOT="$ORIGIN_ROOT/dist" # clean up rm -Rf $DIST_ROOT; # create build directory (structure) mkdir -p $DIST_ROOT; # copy assets cp -r $ORIGIN_ROOT/katas $DIST_ROOT; cp $ORIGIN_ROOT/CNAME $DIST_ROOT/CNAME; cp $ORIGIN_ROOT/html/proxy.html $DIST_ROOT/; # replace place holder KATAS_SERVICE_DOMAIN with env var, so it can be different in dev/prod mode sed -i '' "s/\${TDDBIN_ROOT_DOMAIN}/$TDDBIN_ROOT_DOMAIN/g" $DIST_ROOT/proxy.html ## Instruction: Make `sed` command work on linux too (on travis). ## Code After: ORIGIN_ROOT="." DIST_ROOT="$ORIGIN_ROOT/dist" # clean up rm -Rf $DIST_ROOT; # create build directory (structure) mkdir -p $DIST_ROOT; # copy assets cp -r $ORIGIN_ROOT/katas $DIST_ROOT; cp $ORIGIN_ROOT/CNAME $DIST_ROOT/CNAME; cp $ORIGIN_ROOT/html/proxy.html $DIST_ROOT/; # replace place holder KATAS_SERVICE_DOMAIN with env var, so it can be different in dev/prod mode if [[ $OSTYPE == darwin* ]]; then sed -i '' "s/\${TDDBIN_ROOT_DOMAIN}/$TDDBIN_ROOT_DOMAIN/g" $DIST_ROOT/proxy.html else sed -i "s/\${TDDBIN_ROOT_DOMAIN}/$TDDBIN_ROOT_DOMAIN/g" $DIST_ROOT/proxy.html fi;
689befdc942dbc6f25b84e5d781b4af8329c1045
nassau-soupbintcp-gateway/README.md
nassau-soupbintcp-gateway/README.md
Nassau SoupBinTCP Gateway ========================= Nassau SoupBinTCP Gateway bridges the NASDAQ MoldUDP64 1.00 protocol to the NASDAQ SoupBinTCP 3.00 protocol. Usage ----- Run Nassau SoupBinTCP Gateway with Java: java -jar <executable> <configuration-file> When started, the gateway starts listening for SoupBinTCP sessions initiated by clients. License ------- Nassau SoupBinTCP Gateway is released under the Apache License, Version 2.0.
Nassau SoupBinTCP Gateway ========================= Nassau SoupBinTCP Gateway bridges the NASDAQ MoldUDP64 1.00 protocol to the NASDAQ SoupBinTCP 3.00 protocol. Usage ----- Run Nassau SoupBinTCP Gateway with Java: java -jar <executable> <configuration-file> When started, the gateway starts listening for SoupBinTCP sessions initiated by clients. License ------- Released under the Apache License, Version 2.0.
Tweak documentation for SoupBinTCP gateway
Tweak documentation for SoupBinTCP gateway
Markdown
apache-2.0
pmcs/nassau,paritytrading/nassau,paritytrading/nassau,pmcs/nassau
markdown
## Code Before: Nassau SoupBinTCP Gateway ========================= Nassau SoupBinTCP Gateway bridges the NASDAQ MoldUDP64 1.00 protocol to the NASDAQ SoupBinTCP 3.00 protocol. Usage ----- Run Nassau SoupBinTCP Gateway with Java: java -jar <executable> <configuration-file> When started, the gateway starts listening for SoupBinTCP sessions initiated by clients. License ------- Nassau SoupBinTCP Gateway is released under the Apache License, Version 2.0. ## Instruction: Tweak documentation for SoupBinTCP gateway ## Code After: Nassau SoupBinTCP Gateway ========================= Nassau SoupBinTCP Gateway bridges the NASDAQ MoldUDP64 1.00 protocol to the NASDAQ SoupBinTCP 3.00 protocol. Usage ----- Run Nassau SoupBinTCP Gateway with Java: java -jar <executable> <configuration-file> When started, the gateway starts listening for SoupBinTCP sessions initiated by clients. License ------- Released under the Apache License, Version 2.0.
5c0e4c64b8423c6bf7b288cc12b9f83c14777e28
exercises/simple-linked-list/src/Example.hs
exercises/simple-linked-list/src/Example.hs
module LinkedList ( LinkedList , fromList, toList, reverseLinkedList , datum, next, isNil, nil, new) where data LinkedList a = Nil | Cons { datum :: a , next :: LinkedList a } new :: a -> LinkedList a -> LinkedList a new = Cons nil :: LinkedList a nil = Nil fromList :: [a] -> LinkedList a fromList [] = Nil fromList (x:xs) = Cons x $ fromList xs toList :: LinkedList a -> [a] toList Nil = [] toList (Cons x xs) = x : toList xs reverseLinkedList :: LinkedList a -> LinkedList a reverseLinkedList = go Nil where go acc Nil = acc go acc (Cons x xs) = (go $! Cons x acc) xs isNil :: LinkedList a -> Bool isNil Nil = True isNil _ = False
module LinkedList ( LinkedList , fromList, toList, reverseLinkedList , datum, next, isNil, nil, new) where data LinkedList a = Nil | Cons { datum :: a , next :: LinkedList a } new :: a -> LinkedList a -> LinkedList a new = Cons nil :: LinkedList a nil = Nil fromList :: [a] -> LinkedList a fromList = foldr Cons Nil toList :: LinkedList a -> [a] toList Nil = [] toList (Cons x xs) = x : toList xs reverseLinkedList :: LinkedList a -> LinkedList a reverseLinkedList = go Nil where go acc Nil = acc go acc (Cons x xs) = (go $! Cons x acc) xs isNil :: LinkedList a -> Bool isNil Nil = True isNil _ = False
Improve code base on HLint's suggestions.
simple-linked-list: Improve code base on HLint's suggestions.
Haskell
mit
exercism/xhaskell
haskell
## Code Before: module LinkedList ( LinkedList , fromList, toList, reverseLinkedList , datum, next, isNil, nil, new) where data LinkedList a = Nil | Cons { datum :: a , next :: LinkedList a } new :: a -> LinkedList a -> LinkedList a new = Cons nil :: LinkedList a nil = Nil fromList :: [a] -> LinkedList a fromList [] = Nil fromList (x:xs) = Cons x $ fromList xs toList :: LinkedList a -> [a] toList Nil = [] toList (Cons x xs) = x : toList xs reverseLinkedList :: LinkedList a -> LinkedList a reverseLinkedList = go Nil where go acc Nil = acc go acc (Cons x xs) = (go $! Cons x acc) xs isNil :: LinkedList a -> Bool isNil Nil = True isNil _ = False ## Instruction: simple-linked-list: Improve code base on HLint's suggestions. ## Code After: module LinkedList ( LinkedList , fromList, toList, reverseLinkedList , datum, next, isNil, nil, new) where data LinkedList a = Nil | Cons { datum :: a , next :: LinkedList a } new :: a -> LinkedList a -> LinkedList a new = Cons nil :: LinkedList a nil = Nil fromList :: [a] -> LinkedList a fromList = foldr Cons Nil toList :: LinkedList a -> [a] toList Nil = [] toList (Cons x xs) = x : toList xs reverseLinkedList :: LinkedList a -> LinkedList a reverseLinkedList = go Nil where go acc Nil = acc go acc (Cons x xs) = (go $! Cons x acc) xs isNil :: LinkedList a -> Bool isNil Nil = True isNil _ = False
fcd79fcf0a2858e78b9a73856cffd6a395b5d623
scripts/200-railo.sh
scripts/200-railo.sh
railo="http://www.getrailo.org/railo/remote/download42/$RAILO_VERSION/custom/all/railo-$RAILO_VERSION-jars.tar.gz" railo_folder="railo-$RAILO_VERSION-jars" echo "Installing Railo" echo "Downloading Railo " $RAILO_VERSION mkdir /opt/railo mkdir /opt/railo/config mkdir /opt/railo/config/server mkdir /opt/railo/config/web curl -o /opt/railo/railo.tar.gz $railo tar -xzf /opt/railo/railo.tar.gz -C /opt/railo ln -s /opt/railo/$railo_folder /opt/railo/current
railo="http://www.getrailo.org/railo/remote/download42/$RAILO_VERSION/custom/all/railo-$RAILO_VERSION-jars.tar.gz" railo_folder="railo-$RAILO_VERSION-jars" echo "Installing Railo" echo "Downloading Railo " $RAILO_VERSION mkdir /opt/railo mkdir /opt/railo/config mkdir /opt/railo/config/server mkdir /opt/railo/config/web curl -o /opt/railo/railo.tar.gz $railo if [ -f "/opt/railo/railo.tar.gz" ]; then echo "Download Complete" else echo "Download of Railo Failed Exiting..." exit 1 fi tar -xzf /opt/railo/railo.tar.gz -C /opt/railo ln -s /opt/railo/$railo_folder /opt/railo/current
Exit if railo download fails
Exit if railo download fails
Shell
apache-2.0
foundeo/ubuntu-nginx-railo,foundeo/ubuntu-nginx-lucee,paulklinkenberg/ubuntu-nginx-lucee
shell
## Code Before: railo="http://www.getrailo.org/railo/remote/download42/$RAILO_VERSION/custom/all/railo-$RAILO_VERSION-jars.tar.gz" railo_folder="railo-$RAILO_VERSION-jars" echo "Installing Railo" echo "Downloading Railo " $RAILO_VERSION mkdir /opt/railo mkdir /opt/railo/config mkdir /opt/railo/config/server mkdir /opt/railo/config/web curl -o /opt/railo/railo.tar.gz $railo tar -xzf /opt/railo/railo.tar.gz -C /opt/railo ln -s /opt/railo/$railo_folder /opt/railo/current ## Instruction: Exit if railo download fails ## Code After: railo="http://www.getrailo.org/railo/remote/download42/$RAILO_VERSION/custom/all/railo-$RAILO_VERSION-jars.tar.gz" railo_folder="railo-$RAILO_VERSION-jars" echo "Installing Railo" echo "Downloading Railo " $RAILO_VERSION mkdir /opt/railo mkdir /opt/railo/config mkdir /opt/railo/config/server mkdir /opt/railo/config/web curl -o /opt/railo/railo.tar.gz $railo if [ -f "/opt/railo/railo.tar.gz" ]; then echo "Download Complete" else echo "Download of Railo Failed Exiting..." exit 1 fi tar -xzf /opt/railo/railo.tar.gz -C /opt/railo ln -s /opt/railo/$railo_folder /opt/railo/current
830d297be687b319400cfc797527d969458ee0e8
dashboard/client/dashboard.js
dashboard/client/dashboard.js
import { ReactiveVar } from 'meteor/reactive-var' import { Template } from 'meteor/templating'; Template.dashboard.onCreated(function () { // Get reference to template instance const templateInstance = this; // Create reactive variable for Elasticsearch host templateInstance.elasticsearchHost = new ReactiveVar(); // Handle changes to Elasticsearch host templateInstance.autorun(function () { // Get value of Elasticsearch host const host = templateInstance.elasticsearchHost.get(); if (host) { Meteor.call('getElasticsearchData', host); } }); }); Template.dashboard.events({ 'submit #elasticsearch-host' (event, templateInstance) { // prevent default form action event.preventDefault(); // Get Elasticsearch host from form const host = event.target.host.value; // Update Elasticsearch host reactive variable templateInstance.elasticsearchHost.set(host); } });
import { ReactiveVar } from 'meteor/reactive-var' import { Template } from 'meteor/templating'; Template.dashboard.onCreated(function () { // Get reference to template instance const templateInstance = this; // Create reactive variable for Elasticsearch host templateInstance.elasticsearchHost = new ReactiveVar(); // Create reactive variable for Elasticsearch data templateInstance.elasticsearchData = new ReactiveVar(); // Handle changes to Elasticsearch host templateInstance.autorun(function () { // Get value of Elasticsearch host const host = templateInstance.elasticsearchHost.get(); if (host) { Meteor.call('getElasticsearchData', host, function (error, result) { if (error) { throw Meteor.Error('error', error) } else { // Update Elasticsearch data reactive variable templateInstance.elasticsearchData.set(result); } }); } }); }); Template.dashboard.events({ 'submit #elasticsearch-host' (event, templateInstance) { // prevent default form action event.preventDefault(); // Get Elasticsearch host from form const host = event.target.host.value; // Update Elasticsearch host reactive variable templateInstance.elasticsearchHost.set(host); } });
Use getElasticsearchData method / reactive variable
Use getElasticsearchData method / reactive variable
JavaScript
mit
apinf/api-umbrella-dashboard,apinf/api-umbrella-dashboard
javascript
## Code Before: import { ReactiveVar } from 'meteor/reactive-var' import { Template } from 'meteor/templating'; Template.dashboard.onCreated(function () { // Get reference to template instance const templateInstance = this; // Create reactive variable for Elasticsearch host templateInstance.elasticsearchHost = new ReactiveVar(); // Handle changes to Elasticsearch host templateInstance.autorun(function () { // Get value of Elasticsearch host const host = templateInstance.elasticsearchHost.get(); if (host) { Meteor.call('getElasticsearchData', host); } }); }); Template.dashboard.events({ 'submit #elasticsearch-host' (event, templateInstance) { // prevent default form action event.preventDefault(); // Get Elasticsearch host from form const host = event.target.host.value; // Update Elasticsearch host reactive variable templateInstance.elasticsearchHost.set(host); } }); ## Instruction: Use getElasticsearchData method / reactive variable ## Code After: import { ReactiveVar } from 'meteor/reactive-var' import { Template } from 'meteor/templating'; Template.dashboard.onCreated(function () { // Get reference to template instance const templateInstance = this; // Create reactive variable for Elasticsearch host templateInstance.elasticsearchHost = new ReactiveVar(); // Create reactive variable for Elasticsearch data templateInstance.elasticsearchData = new ReactiveVar(); // Handle changes to Elasticsearch host templateInstance.autorun(function () { // Get value of Elasticsearch host const host = templateInstance.elasticsearchHost.get(); if (host) { Meteor.call('getElasticsearchData', host, function (error, result) { if (error) { throw Meteor.Error('error', error) } else { // Update Elasticsearch data reactive variable templateInstance.elasticsearchData.set(result); } }); } }); }); Template.dashboard.events({ 'submit #elasticsearch-host' (event, templateInstance) { // prevent default form action event.preventDefault(); // Get Elasticsearch host from form const host = event.target.host.value; // Update Elasticsearch host reactive variable templateInstance.elasticsearchHost.set(host); } });
5d014ab97e0b91865dbd5f5471e2d202280cc0a2
src/Monticello-Tests/MCDirectoryRepositoryTest.class.st
src/Monticello-Tests/MCDirectoryRepositoryTest.class.st
Class { #name : #MCDirectoryRepositoryTest, #superclass : #MCRepositoryTest, #instVars : [ 'directory' ], #category : #'Monticello-Tests-Repository' } { #category : #actions } MCDirectoryRepositoryTest >> addVersion: aVersion [ | file | file := (directory / aVersion fileName) asFileReference binaryWriteStream. aVersion fileOutOn: file. file close. ] { #category : #accessing } MCDirectoryRepositoryTest >> directory [ directory ifNil: [directory := 'mctest' asFileReference. directory ensureCreateDirectory]. ^ directory ] { #category : #running } MCDirectoryRepositoryTest >> setUp [ super setUp. repository := MCDirectoryRepository new directory: self directory ] { #category : #running } MCDirectoryRepositoryTest >> tearDown [ self directory ensureDeleteAll. super tearDown ]
Class { #name : #MCDirectoryRepositoryTest, #superclass : #MCRepositoryTest, #instVars : [ 'directory' ], #category : #'Monticello-Tests-Repository' } { #category : #actions } MCDirectoryRepositoryTest >> addVersion: aVersion [ (directory / aVersion fileName) asFileReference binaryWriteStreamDo: [ :stream | aVersion fileOutOn: stream ] ] { #category : #accessing } MCDirectoryRepositoryTest >> directory [ directory ifNil: [directory := 'mctest' asFileReference. directory ensureCreateDirectory]. ^ directory ] { #category : #running } MCDirectoryRepositoryTest >> setUp [ super setUp. repository := MCDirectoryRepository new directory: self directory ] { #category : #running } MCDirectoryRepositoryTest >> tearDown [ self directory ensureDeleteAll. super tearDown ]
Make sure write streams are closed
Make sure write streams are closed
Smalltalk
mit
estebanlm/pharo,estebanlm/pharo,estebanlm/pharo
smalltalk
## Code Before: Class { #name : #MCDirectoryRepositoryTest, #superclass : #MCRepositoryTest, #instVars : [ 'directory' ], #category : #'Monticello-Tests-Repository' } { #category : #actions } MCDirectoryRepositoryTest >> addVersion: aVersion [ | file | file := (directory / aVersion fileName) asFileReference binaryWriteStream. aVersion fileOutOn: file. file close. ] { #category : #accessing } MCDirectoryRepositoryTest >> directory [ directory ifNil: [directory := 'mctest' asFileReference. directory ensureCreateDirectory]. ^ directory ] { #category : #running } MCDirectoryRepositoryTest >> setUp [ super setUp. repository := MCDirectoryRepository new directory: self directory ] { #category : #running } MCDirectoryRepositoryTest >> tearDown [ self directory ensureDeleteAll. super tearDown ] ## Instruction: Make sure write streams are closed ## Code After: Class { #name : #MCDirectoryRepositoryTest, #superclass : #MCRepositoryTest, #instVars : [ 'directory' ], #category : #'Monticello-Tests-Repository' } { #category : #actions } MCDirectoryRepositoryTest >> addVersion: aVersion [ (directory / aVersion fileName) asFileReference binaryWriteStreamDo: [ :stream | aVersion fileOutOn: stream ] ] { #category : #accessing } MCDirectoryRepositoryTest >> directory [ directory ifNil: [directory := 'mctest' asFileReference. directory ensureCreateDirectory]. ^ directory ] { #category : #running } MCDirectoryRepositoryTest >> setUp [ super setUp. repository := MCDirectoryRepository new directory: self directory ] { #category : #running } MCDirectoryRepositoryTest >> tearDown [ self directory ensureDeleteAll. super tearDown ]
bcf466f5509aafa0ed14c27950418195d4d0fcc5
Casks/adobe-air.rb
Casks/adobe-air.rb
class AdobeAir < Cask url 'http://airdownload.adobe.com/air/mac/download/3.9/AdobeAIR.dmg' homepage 'https://get.adobe.com/air/' version '3.9' sha1 '69863ef58dca864c9b9016b512ea79e5d1429498' caskroom_only true after_install do system "sudo #{destination_path}/Adobe\\ AIR\\ Installer.app/Contents/MacOS/Adobe\\ AIR\\ Installer -silent" end uninstall :script => { :executable => 'Adobe AIR Installer.app/Contents/MacOS/Adobe AIR Installer', :args => %w[-uninstall] } end
class AdobeAir < Cask url 'http://airdownload.adobe.com/air/mac/download/4.0/AdobeAIR.dmg' homepage 'https://get.adobe.com/air/' version '4.0' sha1 'f319c2c603ff39e596c1c78c257980cf4fb0d0ef' caskroom_only true after_install do system "sudo #{destination_path}/Adobe\\ AIR\\ Installer.app/Contents/MacOS/Adobe\\ AIR\\ Installer -silent" end uninstall :script => { :executable => 'Adobe AIR Installer.app/Contents/MacOS/Adobe AIR Installer', :args => %w[-uninstall] } end
Update Adobe Air to 4.0
Update Adobe Air to 4.0
Ruby
bsd-2-clause
sanyer/homebrew-cask,Ephemera/homebrew-cask,lvicentesanchez/homebrew-cask,zeusdeux/homebrew-cask,sosedoff/homebrew-cask,otzy007/homebrew-cask,jeanregisser/homebrew-cask,mgryszko/homebrew-cask,dspeckhard/homebrew-cask,Cottser/homebrew-cask,jaredsampson/homebrew-cask,forevergenin/homebrew-cask,norio-nomura/homebrew-cask,yutarody/homebrew-cask,epmatsw/homebrew-cask,hswong3i/homebrew-cask,fkrone/homebrew-cask,larseggert/homebrew-cask,stonehippo/homebrew-cask,huanzhang/homebrew-cask,troyxmccall/homebrew-cask,alloy/homebrew-cask,thomanq/homebrew-cask,afdnlw/homebrew-cask,Keloran/homebrew-cask,mrmachine/homebrew-cask,mishari/homebrew-cask,sirodoht/homebrew-cask,JacopKane/homebrew-cask,sparrc/homebrew-cask,boydj/homebrew-cask,adelinofaria/homebrew-cask,tyage/homebrew-cask,n0ts/homebrew-cask,sohtsuka/homebrew-cask,rkJun/homebrew-cask,rcuza/homebrew-cask,mingzhi22/homebrew-cask,koenrh/homebrew-cask,joshka/homebrew-cask,boecko/homebrew-cask,13k/homebrew-cask,jtriley/homebrew-cask,askl56/homebrew-cask,neverfox/homebrew-cask,josa42/homebrew-cask,sanchezm/homebrew-cask,kkdd/homebrew-cask,michelegera/homebrew-cask,gustavoavellar/homebrew-cask,jspahrsummers/homebrew-cask,wolflee/homebrew-cask,elseym/homebrew-cask,j13k/homebrew-cask,deizel/homebrew-cask,pinut/homebrew-cask,ianyh/homebrew-cask,exherb/homebrew-cask,ajbw/homebrew-cask,klane/homebrew-cask,deanmorin/homebrew-cask,jedahan/homebrew-cask,sparrc/homebrew-cask,andrewdisley/homebrew-cask,nivanchikov/homebrew-cask,RJHsiao/homebrew-cask,perfide/homebrew-cask,elyscape/homebrew-cask,nivanchikov/homebrew-cask,leipert/homebrew-cask,tjt263/homebrew-cask,FredLackeyOfficial/homebrew-cask,xalep/homebrew-cask,tjt263/homebrew-cask,flada-auxv/homebrew-cask,singingwolfboy/homebrew-cask,diguage/homebrew-cask,johnste/homebrew-cask,nrlquaker/homebrew-cask,stevehedrick/homebrew-cask,0xadada/homebrew-cask,sysbot/homebrew-cask,bdhess/homebrew-cask,andyli/homebrew-cask,gyugyu/homebrew-cask,danielbayley/homebrew-cask,zerrot/homebrew-cask,giannitm/homebrew-cask,riyad/homebrew-cask,moogar0880/homebrew-cask,mahori/homebrew-cask,coneman/homebrew-cask,vigosan/homebrew-cask,guylabs/homebrew-cask,schneidmaster/homebrew-cask,MircoT/homebrew-cask,samshadwell/homebrew-cask,ddm/homebrew-cask,shanonvl/homebrew-cask,qnm/homebrew-cask,ywfwj2008/homebrew-cask,antogg/homebrew-cask,danielgomezrico/homebrew-cask,m3nu/homebrew-cask,haha1903/homebrew-cask,devmynd/homebrew-cask,MerelyAPseudonym/homebrew-cask,jaredsampson/homebrew-cask,athrunsun/homebrew-cask,Labutin/homebrew-cask,tan9/homebrew-cask,greg5green/homebrew-cask,sosedoff/homebrew-cask,seanorama/homebrew-cask,gurghet/homebrew-cask,bcaceiro/homebrew-cask,kevinoconnor7/homebrew-cask,tjnycum/homebrew-cask,MicTech/homebrew-cask,chino/homebrew-cask,jonathanwiesel/homebrew-cask,zerrot/homebrew-cask,esebastian/homebrew-cask,JosephViolago/homebrew-cask,yuhki50/homebrew-cask,kTitan/homebrew-cask,jrwesolo/homebrew-cask,Bombenleger/homebrew-cask,pacav69/homebrew-cask,gyndav/homebrew-cask,alebcay/homebrew-cask,decrement/homebrew-cask,a-x-/homebrew-cask,amatos/homebrew-cask,d/homebrew-cask,elnappo/homebrew-cask,MatzFan/homebrew-cask,boecko/homebrew-cask,mwean/homebrew-cask,wKovacs64/homebrew-cask,JikkuJose/homebrew-cask,a1russell/homebrew-cask,ctrevino/homebrew-cask,a-x-/homebrew-cask,lauantai/homebrew-cask,AnastasiaSulyagina/homebrew-cask,ch3n2k/homebrew-cask,nathanielvarona/homebrew-cask,supriyantomaftuh/homebrew-cask,aguynamedryan/homebrew-cask,chrisRidgers/homebrew-cask,mrmachine/homebrew-cask,mchlrmrz/homebrew-cask,bric3/homebrew-cask,ldong/homebrew-cask,elyscape/homebrew-cask,wKovacs64/homebrew-cask,ayohrling/homebrew-cask,markthetech/homebrew-cask,kesara/homebrew-cask,Labutin/homebrew-cask,zchee/homebrew-cask,rednoah/homebrew-cask,paulbreslin/homebrew-cask,johntrandall/homebrew-cask,retrography/homebrew-cask,wmorin/homebrew-cask,Cottser/homebrew-cask,carlmod/homebrew-cask,jellyfishcoder/homebrew-cask,inz/homebrew-cask,miku/homebrew-cask,slnovak/homebrew-cask,tonyseek/homebrew-cask,miccal/homebrew-cask,mattrobenolt/homebrew-cask,LaurentFough/homebrew-cask,jgarber623/homebrew-cask,andyli/homebrew-cask,maxnordlund/homebrew-cask,johnjelinek/homebrew-cask,wayou/homebrew-cask,kongslund/homebrew-cask,rogeriopradoj/homebrew-cask,fwiesel/homebrew-cask,chadcatlett/caskroom-homebrew-cask,kamilboratynski/homebrew-cask,reitermarkus/homebrew-cask,johan/homebrew-cask,ebraminio/homebrew-cask,tedbundyjr/homebrew-cask,reitermarkus/homebrew-cask,jasmas/homebrew-cask,mfpierre/homebrew-cask,opsdev-ws/homebrew-cask,malob/homebrew-cask,JoelLarson/homebrew-cask,Amorymeltzer/homebrew-cask,alebcay/homebrew-cask,reelsense/homebrew-cask,stevenmaguire/homebrew-cask,sideci-sample/sideci-sample-homebrew-cask,mahori/homebrew-cask,adriweb/homebrew-cask,gyndav/homebrew-cask,a1russell/homebrew-cask,Amorymeltzer/homebrew-cask,Philosoft/homebrew-cask,Ibuprofen/homebrew-cask,mfpierre/homebrew-cask,bcomnes/homebrew-cask,ahvigil/homebrew-cask,enriclluelles/homebrew-cask,delphinus35/homebrew-cask,andersonba/homebrew-cask,dictcp/homebrew-cask,KosherBacon/homebrew-cask,neverfox/homebrew-cask,yuhki50/homebrew-cask,faun/homebrew-cask,uetchy/homebrew-cask,joaocc/homebrew-cask,bdhess/homebrew-cask,julionc/homebrew-cask,csmith-palantir/homebrew-cask,mathbunnyru/homebrew-cask,zchee/homebrew-cask,nysthee/homebrew-cask,dlackty/homebrew-cask,syscrusher/homebrew-cask,jedahan/homebrew-cask,wayou/homebrew-cask,kingthorin/homebrew-cask,vuquoctuan/homebrew-cask,joshka/homebrew-cask,ky0615/homebrew-cask-1,rubenerd/homebrew-cask,julienlavergne/homebrew-cask,buo/homebrew-cask,franklouwers/homebrew-cask,Ephemera/homebrew-cask,Saklad5/homebrew-cask,reitermarkus/homebrew-cask,n8henrie/homebrew-cask,onlynone/homebrew-cask,mkozjak/homebrew-cask,wizonesolutions/homebrew-cask,renard/homebrew-cask,atsuyim/homebrew-cask,imgarylai/homebrew-cask,cohei/homebrew-cask,nshemonsky/homebrew-cask,adriweb/homebrew-cask,cblecker/homebrew-cask,jpmat296/homebrew-cask,michelegera/homebrew-cask,taherio/homebrew-cask,MichaelPei/homebrew-cask,bosr/homebrew-cask,mishari/homebrew-cask,jangalinski/homebrew-cask,patresi/homebrew-cask,forevergenin/homebrew-cask,n8henrie/homebrew-cask,a1russell/homebrew-cask,jacobbednarz/homebrew-cask,sscotth/homebrew-cask,gerrypower/homebrew-cask,jacobbednarz/homebrew-cask,dunn/homebrew-cask,akiomik/homebrew-cask,alexg0/homebrew-cask,tmoreira2020/homebrew,bchatard/homebrew-cask,garborg/homebrew-cask,jiashuw/homebrew-cask,sjackman/homebrew-cask,sanyer/homebrew-cask,rajiv/homebrew-cask,brianshumate/homebrew-cask,mlocher/homebrew-cask,ahundt/homebrew-cask,Gasol/homebrew-cask,kronicd/homebrew-cask,ldong/homebrew-cask,jalaziz/homebrew-cask,huanzhang/homebrew-cask,vigosan/homebrew-cask,kesara/homebrew-cask,guerrero/homebrew-cask,djakarta-trap/homebrew-myCask,troyxmccall/homebrew-cask,wizonesolutions/homebrew-cask,kronicd/homebrew-cask,deizel/homebrew-cask,johndbritton/homebrew-cask,cedwardsmedia/homebrew-cask,lieuwex/homebrew-cask,guylabs/homebrew-cask,jmeridth/homebrew-cask,jalaziz/homebrew-cask,moonboots/homebrew-cask,sideci-sample/sideci-sample-homebrew-cask,enriclluelles/homebrew-cask,RickWong/homebrew-cask,gguillotte/homebrew-cask,josa42/homebrew-cask,robbiethegeek/homebrew-cask,JacopKane/homebrew-cask,remko/homebrew-cask,CameronGarrett/homebrew-cask,My2ndAngelic/homebrew-cask,lolgear/homebrew-cask,y00rb/homebrew-cask,qnm/homebrew-cask,MicTech/homebrew-cask,vmrob/homebrew-cask,mindriot101/homebrew-cask,inta/homebrew-cask,pgr0ss/homebrew-cask,FranklinChen/homebrew-cask,victorpopkov/homebrew-cask,mlocher/homebrew-cask,gyugyu/homebrew-cask,kirikiriyamama/homebrew-cask,yurikoles/homebrew-cask,qbmiller/homebrew-cask,morsdyce/homebrew-cask,linc01n/homebrew-cask,jeanregisser/homebrew-cask,ch3n2k/homebrew-cask,mwean/homebrew-cask,scottsuch/homebrew-cask,petmoo/homebrew-cask,Ephemera/homebrew-cask,ahbeng/homebrew-cask,neil-ca-moore/homebrew-cask,robertgzr/homebrew-cask,donbobka/homebrew-cask,squid314/homebrew-cask,nelsonjchen/homebrew-cask,MisumiRize/homebrew-cask,jppelteret/homebrew-cask,ericbn/homebrew-cask,paulbreslin/homebrew-cask,wuman/homebrew-cask,lolgear/homebrew-cask,spruceb/homebrew-cask,Fedalto/homebrew-cask,valepert/homebrew-cask,samdoran/homebrew-cask,thehunmonkgroup/homebrew-cask,decrement/homebrew-cask,ianyh/homebrew-cask,Ngrd/homebrew-cask,scribblemaniac/homebrew-cask,shoichiaizawa/homebrew-cask,kostasdizas/homebrew-cask,usami-k/homebrew-cask,toonetown/homebrew-cask,kievechua/homebrew-cask,dcondrey/homebrew-cask,delphinus35/homebrew-cask,nrlquaker/homebrew-cask,mokagio/homebrew-cask,ftiff/homebrew-cask,mjgardner/homebrew-cask,moimikey/homebrew-cask,3van/homebrew-cask,ingorichter/homebrew-cask,jellyfishcoder/homebrew-cask,dcondrey/homebrew-cask,johndbritton/homebrew-cask,nicholsn/homebrew-cask,cedwardsmedia/homebrew-cask,andyshinn/homebrew-cask,rickychilcott/homebrew-cask,iamso/homebrew-cask,ksylvan/homebrew-cask,englishm/homebrew-cask,coneman/homebrew-cask,artdevjs/homebrew-cask,jasmas/homebrew-cask,mjdescy/homebrew-cask,BahtiyarB/homebrew-cask,mwilmer/homebrew-cask,lcasey001/homebrew-cask,gmkey/homebrew-cask,ky0615/homebrew-cask-1,christer155/homebrew-cask,dvdoliveira/homebrew-cask,sachin21/homebrew-cask,wmorin/homebrew-cask,JosephViolago/homebrew-cask,zmwangx/homebrew-cask,jpodlech/homebrew-cask,hristozov/homebrew-cask,lcasey001/homebrew-cask,barravi/homebrew-cask,rajiv/homebrew-cask,underyx/homebrew-cask,asins/homebrew-cask,miguelfrde/homebrew-cask,Hywan/homebrew-cask,ericbn/homebrew-cask,axodys/homebrew-cask,nicolas-brousse/homebrew-cask,giannitm/homebrew-cask,anbotero/homebrew-cask,mokagio/homebrew-cask,janlugt/homebrew-cask,elnappo/homebrew-cask,Saklad5/homebrew-cask,jgarber623/homebrew-cask,jspahrsummers/homebrew-cask,royalwang/homebrew-cask,johnjelinek/homebrew-cask,nathanielvarona/homebrew-cask,zorosteven/homebrew-cask,hovancik/homebrew-cask,Ibuprofen/homebrew-cask,arranubels/homebrew-cask,jangalinski/homebrew-cask,daften/homebrew-cask,MatzFan/homebrew-cask,moimikey/homebrew-cask,englishm/homebrew-cask,mathbunnyru/homebrew-cask,andersonba/homebrew-cask,malob/homebrew-cask,gwaldo/homebrew-cask,Ketouem/homebrew-cask,feniix/homebrew-cask,astorije/homebrew-cask,afh/homebrew-cask,AnastasiaSulyagina/homebrew-cask,slack4u/homebrew-cask,esebastian/homebrew-cask,ninjahoahong/homebrew-cask,crmne/homebrew-cask,renaudguerin/homebrew-cask,barravi/homebrew-cask,genewoo/homebrew-cask,freeslugs/homebrew-cask,albertico/homebrew-cask,atsuyim/homebrew-cask,xyb/homebrew-cask,ftiff/homebrew-cask,mAAdhaTTah/homebrew-cask,kamilboratynski/homebrew-cask,catap/homebrew-cask,dlackty/homebrew-cask,adelinofaria/homebrew-cask,mazehall/homebrew-cask,cclauss/homebrew-cask,ericbn/homebrew-cask,malford/homebrew-cask,caskroom/homebrew-cask,scottsuch/homebrew-cask,Philosoft/homebrew-cask,lukasbestle/homebrew-cask,SamiHiltunen/homebrew-cask,winkelsdorf/homebrew-cask,ywfwj2008/homebrew-cask,hakamadare/homebrew-cask,gerrymiller/homebrew-cask,bkono/homebrew-cask,xcezx/homebrew-cask,skatsuta/homebrew-cask,mahori/homebrew-cask,ayohrling/homebrew-cask,wmorin/homebrew-cask,ajbw/homebrew-cask,akiomik/homebrew-cask,bsiddiqui/homebrew-cask,ponychicken/homebrew-customcask,tangestani/homebrew-cask,m3nu/homebrew-cask,santoshsahoo/homebrew-cask,reelsense/homebrew-cask,spruceb/homebrew-cask,otaran/homebrew-cask,otaran/homebrew-cask,sebcode/homebrew-cask,jayshao/homebrew-cask,wuman/homebrew-cask,taherio/homebrew-cask,sanchezm/homebrew-cask,nightscape/homebrew-cask,MichaelPei/homebrew-cask,okket/homebrew-cask,jacobdam/homebrew-cask,robertgzr/homebrew-cask,zhuzihhhh/homebrew-cask,hakamadare/homebrew-cask,yurikoles/homebrew-cask,thomanq/homebrew-cask,mikem/homebrew-cask,kuno/homebrew-cask,hanxue/caskroom,nickpellant/homebrew-cask,alebcay/homebrew-cask,jacobdam/homebrew-cask,gyndav/homebrew-cask,guerrero/homebrew-cask,sachin21/homebrew-cask,caskroom/homebrew-cask,tedbundyjr/homebrew-cask,fharbe/homebrew-cask,L2G/homebrew-cask,hackhandslabs/homebrew-cask,nightscape/homebrew-cask,casidiablo/homebrew-cask,FredLackeyOfficial/homebrew-cask,doits/homebrew-cask,tangestani/homebrew-cask,mwek/homebrew-cask,jeroenseegers/homebrew-cask,hvisage/homebrew-cask,githubutilities/homebrew-cask,kTitan/homebrew-cask,paour/homebrew-cask,colindunn/homebrew-cask,askl56/homebrew-cask,Whoaa512/homebrew-cask,johan/homebrew-cask,chuanxd/homebrew-cask,stigkj/homebrew-caskroom-cask,napaxton/homebrew-cask,kevyau/homebrew-cask,Hywan/homebrew-cask,hswong3i/homebrew-cask,cblecker/homebrew-cask,Nitecon/homebrew-cask,squid314/homebrew-cask,usami-k/homebrew-cask,kassi/homebrew-cask,JosephViolago/homebrew-cask,jpodlech/homebrew-cask,shanonvl/homebrew-cask,diogodamiani/homebrew-cask,patresi/homebrew-cask,phpwutz/homebrew-cask,elseym/homebrew-cask,tan9/homebrew-cask,tranc99/homebrew-cask,xight/homebrew-cask,vin047/homebrew-cask,miccal/homebrew-cask,shonjir/homebrew-cask,lieuwex/homebrew-cask,ohammersmith/homebrew-cask,BahtiyarB/homebrew-cask,thii/homebrew-cask,stonehippo/homebrew-cask,ponychicken/homebrew-customcask,malob/homebrew-cask,rogeriopradoj/homebrew-cask,illusionfield/homebrew-cask,fanquake/homebrew-cask,Whoaa512/homebrew-cask,markhuber/homebrew-cask,mauricerkelly/homebrew-cask,dlovitch/homebrew-cask,alexg0/homebrew-cask,franklouwers/homebrew-cask,MoOx/homebrew-cask,ptb/homebrew-cask,dustinblackman/homebrew-cask,mwek/homebrew-cask,nickpellant/homebrew-cask,tmoreira2020/homebrew,hyuna917/homebrew-cask,hackhandslabs/homebrew-cask,coeligena/homebrew-customized,paulombcosta/homebrew-cask,SentinelWarren/homebrew-cask,xakraz/homebrew-cask,csmith-palantir/homebrew-cask,13k/homebrew-cask,samnung/homebrew-cask,tsparber/homebrew-cask,tyage/homebrew-cask,ingorichter/homebrew-cask,tolbkni/homebrew-cask,deanmorin/homebrew-cask,andyshinn/homebrew-cask,winkelsdorf/homebrew-cask,gregkare/homebrew-cask,mingzhi22/homebrew-cask,prime8/homebrew-cask,yurrriq/homebrew-cask,nathancahill/homebrew-cask,corbt/homebrew-cask,BenjaminHCCarr/homebrew-cask,adrianchia/homebrew-cask,theoriginalgri/homebrew-cask,ahbeng/homebrew-cask,blogabe/homebrew-cask,FranklinChen/homebrew-cask,helloIAmPau/homebrew-cask,j13k/homebrew-cask,andrewdisley/homebrew-cask,tarwich/homebrew-cask,kei-yamazaki/homebrew-cask,dwkns/homebrew-cask,epardee/homebrew-cask,hvisage/homebrew-cask,nysthee/homebrew-cask,thehunmonkgroup/homebrew-cask,lantrix/homebrew-cask,blainesch/homebrew-cask,sohtsuka/homebrew-cask,gguillotte/homebrew-cask,ohammersmith/homebrew-cask,scribblemaniac/homebrew-cask,goxberry/homebrew-cask,retrography/homebrew-cask,alexg0/homebrew-cask,cprecioso/homebrew-cask,andrewschleifer/homebrew-cask,leonmachadowilcox/homebrew-cask,josa42/homebrew-cask,tdsmith/homebrew-cask,kuno/homebrew-cask,hellosky806/homebrew-cask,mazehall/homebrew-cask,christer155/homebrew-cask,leipert/homebrew-cask,morsdyce/homebrew-cask,arronmabrey/homebrew-cask,danielbayley/homebrew-cask,SentinelWarren/homebrew-cask,janlugt/homebrew-cask,dezon/homebrew-cask,tsparber/homebrew-cask,riyad/homebrew-cask,xtian/homebrew-cask,seanzxx/homebrew-cask,gilesdring/homebrew-cask,johntrandall/homebrew-cask,danielbayley/homebrew-cask,alloy/homebrew-cask,kryhear/homebrew-cask,freeslugs/homebrew-cask,skyyuan/homebrew-cask,epardee/homebrew-cask,mhubig/homebrew-cask,dwihn0r/homebrew-cask,aktau/homebrew-cask,nicholsn/homebrew-cask,Ketouem/homebrew-cask,antogg/homebrew-cask,johnste/homebrew-cask,bgandon/homebrew-cask,chrisfinazzo/homebrew-cask,dlovitch/homebrew-cask,norio-nomura/homebrew-cask,imgarylai/homebrew-cask,flaviocamilo/homebrew-cask,adrianchia/homebrew-cask,fly19890211/homebrew-cask,julionc/homebrew-cask,gerrymiller/homebrew-cask,dictcp/homebrew-cask,slnovak/homebrew-cask,dieterdemeyer/homebrew-cask,gibsjose/homebrew-cask,cohei/homebrew-cask,farmerchris/homebrew-cask,vmrob/homebrew-cask,djmonta/homebrew-cask,uetchy/homebrew-cask,segiddins/homebrew-cask,paour/homebrew-cask,ctrevino/homebrew-cask,onlynone/homebrew-cask,bosr/homebrew-cask,bcaceiro/homebrew-cask,cfillion/homebrew-cask,jbeagley52/homebrew-cask,yurikoles/homebrew-cask,arronmabrey/homebrew-cask,6uclz1/homebrew-cask,kievechua/homebrew-cask,skatsuta/homebrew-cask,ptb/homebrew-cask,petmoo/homebrew-cask,illusionfield/homebrew-cask,codeurge/homebrew-cask,buo/homebrew-cask,hanxue/caskroom,gord1anknot/homebrew-cask,jeroenj/homebrew-cask,lifepillar/homebrew-cask,RogerThiede/homebrew-cask,psibre/homebrew-cask,Fedalto/homebrew-cask,AdamCmiel/homebrew-cask,ksato9700/homebrew-cask,yutarody/homebrew-cask,kevinoconnor7/homebrew-cask,asins/homebrew-cask,gwaldo/homebrew-cask,Nitecon/homebrew-cask,puffdad/homebrew-cask,mhubig/homebrew-cask,mchlrmrz/homebrew-cask,seanzxx/homebrew-cask,shishi/homebrew-cask,jiashuw/homebrew-cask,robbiethegeek/homebrew-cask,chadcatlett/caskroom-homebrew-cask,cliffcotino/homebrew-cask,kirikiriyamama/homebrew-cask,af/homebrew-cask,kassi/homebrew-cask,blainesch/homebrew-cask,JoelLarson/homebrew-cask,mAAdhaTTah/homebrew-cask,schneidmaster/homebrew-cask,stevehedrick/homebrew-cask,mchlrmrz/homebrew-cask,0xadada/homebrew-cask,AndreTheHunter/homebrew-cask,uetchy/homebrew-cask,wastrachan/homebrew-cask,rajiv/homebrew-cask,d/homebrew-cask,iAmGhost/homebrew-cask,deiga/homebrew-cask,dspeckhard/homebrew-cask,optikfluffel/homebrew-cask,syscrusher/homebrew-cask,ashishb/homebrew-cask,jamesmlees/homebrew-cask,lukeadams/homebrew-cask,aktau/homebrew-cask,mattrobenolt/homebrew-cask,tedski/homebrew-cask,KosherBacon/homebrew-cask,tdsmith/homebrew-cask,stephenwade/homebrew-cask,royalwang/homebrew-cask,aki77/homebrew-cask,joschi/homebrew-cask,thii/homebrew-cask,scw/homebrew-cask,MerelyAPseudonym/homebrew-cask,andrewschleifer/homebrew-cask,nathancahill/homebrew-cask,xcezx/homebrew-cask,coeligena/homebrew-customized,mikem/homebrew-cask,shoichiaizawa/homebrew-cask,markthetech/homebrew-cask,m3nu/homebrew-cask,remko/homebrew-cask,koenrh/homebrew-cask,retbrown/homebrew-cask,bkono/homebrew-cask,xight/homebrew-cask,MisumiRize/homebrew-cask,bgandon/homebrew-cask,kiliankoe/homebrew-cask,zeusdeux/homebrew-cask,arranubels/homebrew-cask,miccal/homebrew-cask,sjackman/homebrew-cask,dictcp/homebrew-cask,fharbe/homebrew-cask,antogg/homebrew-cask,samdoran/homebrew-cask,3van/homebrew-cask,tranc99/homebrew-cask,larseggert/homebrew-cask,neverfox/homebrew-cask,LaurentFough/homebrew-cask,jawshooah/homebrew-cask,githubutilities/homebrew-cask,tjnycum/homebrew-cask,jeroenj/homebrew-cask,carlmod/homebrew-cask,mariusbutuc/homebrew-cask,ninjahoahong/homebrew-cask,nanoxd/homebrew-cask,fazo96/homebrew-cask,mjgardner/homebrew-cask,artdevjs/homebrew-cask,yurrriq/homebrew-cask,gabrielizaias/homebrew-cask,jmeridth/homebrew-cask,markhuber/homebrew-cask,cprecioso/homebrew-cask,ksato9700/homebrew-cask,wesen/homebrew-cask,anbotero/homebrew-cask,xalep/homebrew-cask,gord1anknot/homebrew-cask,hellosky806/homebrew-cask,lifepillar/homebrew-cask,lauantai/homebrew-cask,catap/homebrew-cask,nathanielvarona/homebrew-cask,n0ts/homebrew-cask,Dremora/homebrew-cask,nelsonjchen/homebrew-cask,lalyos/homebrew-cask,dunn/homebrew-cask,kpearson/homebrew-cask,jgarber623/homebrew-cask,rednoah/homebrew-cask,nrlquaker/homebrew-cask,paulombcosta/homebrew-cask,phpwutz/homebrew-cask,stevenmaguire/homebrew-cask,mkozjak/homebrew-cask,cobyism/homebrew-cask,bric3/homebrew-cask,y00rb/homebrew-cask,valepert/homebrew-cask,lvicentesanchez/homebrew-cask,shonjir/homebrew-cask,mattrobenolt/homebrew-cask,gurghet/homebrew-cask,zorosteven/homebrew-cask,dieterdemeyer/homebrew-cask,lumaxis/homebrew-cask,imgarylai/homebrew-cask,deiga/homebrew-cask,winkelsdorf/homebrew-cask,rickychilcott/homebrew-cask,pinut/homebrew-cask,samshadwell/homebrew-cask,dezon/homebrew-cask,djakarta-trap/homebrew-myCask,joschi/homebrew-cask,codeurge/homebrew-cask,claui/homebrew-cask,jonathanwiesel/homebrew-cask,bendoerr/homebrew-cask,chrisfinazzo/homebrew-cask,jtriley/homebrew-cask,kteru/homebrew-cask,xyb/homebrew-cask,crmne/homebrew-cask,lalyos/homebrew-cask,pkq/homebrew-cask,dwihn0r/homebrew-cask,mjdescy/homebrew-cask,scottsuch/homebrew-cask,daften/homebrew-cask,sysbot/homebrew-cask,asbachb/homebrew-cask,unasuke/homebrew-cask,hristozov/homebrew-cask,blogabe/homebrew-cask,jbeagley52/homebrew-cask,gustavoavellar/homebrew-cask,yutarody/homebrew-cask,fwiesel/homebrew-cask,sanyer/homebrew-cask,AdamCmiel/homebrew-cask,epmatsw/homebrew-cask,kolomiichenko/homebrew-cask,kteru/homebrew-cask,BenjaminHCCarr/homebrew-cask,linc01n/homebrew-cask,shonjir/homebrew-cask,rhendric/homebrew-cask,lumaxis/homebrew-cask,CameronGarrett/homebrew-cask,axodys/homebrew-cask,tangestani/homebrew-cask,af/homebrew-cask,dvdoliveira/homebrew-cask,kolomiichenko/homebrew-cask,williamboman/homebrew-cask,sscotth/homebrew-cask,zhuzihhhh/homebrew-cask,blogabe/homebrew-cask,gabrielizaias/homebrew-cask,dwkns/homebrew-cask,cclauss/homebrew-cask,MircoT/homebrew-cask,tolbkni/homebrew-cask,mgryszko/homebrew-cask,danielgomezrico/homebrew-cask,RJHsiao/homebrew-cask,fanquake/homebrew-cask,hovancik/homebrew-cask,psibre/homebrew-cask,AndreTheHunter/homebrew-cask,pablote/homebrew-cask,morganestes/homebrew-cask,sscotth/homebrew-cask,timsutton/homebrew-cask,tedski/homebrew-cask,muan/homebrew-cask,victorpopkov/homebrew-cask,jamesmlees/homebrew-cask,cblecker/homebrew-cask,FinalDes/homebrew-cask,ahundt/homebrew-cask,singingwolfboy/homebrew-cask,prime8/homebrew-cask,flaviocamilo/homebrew-cask,0rax/homebrew-cask,jconley/homebrew-cask,ebraminio/homebrew-cask,pkq/homebrew-cask,chrisfinazzo/homebrew-cask,devmynd/homebrew-cask,andrewdisley/homebrew-cask,optikfluffel/homebrew-cask,inta/homebrew-cask,joaocc/homebrew-cask,tonyseek/homebrew-cask,xiongchiamiov/homebrew-cask,miguelfrde/homebrew-cask,shishi/homebrew-cask,chuanxd/homebrew-cask,kingthorin/homebrew-cask,rhendric/homebrew-cask,moonboots/homebrew-cask,slack4u/homebrew-cask,gerrypower/homebrew-cask,jeroenseegers/homebrew-cask,BenjaminHCCarr/homebrew-cask,frapposelli/homebrew-cask,chrisRidgers/homebrew-cask,opsdev-ws/homebrew-cask,klane/homebrew-cask,morganestes/homebrew-cask,muan/homebrew-cask,sebcode/homebrew-cask,Dremora/homebrew-cask,jconley/homebrew-cask,moogar0880/homebrew-cask,malford/homebrew-cask,esebastian/homebrew-cask,unasuke/homebrew-cask,kostasdizas/homebrew-cask,ahvigil/homebrew-cask,joaoponceleao/homebrew-cask,MoOx/homebrew-cask,bendoerr/homebrew-cask,segiddins/homebrew-cask,SamiHiltunen/homebrew-cask,bchatard/homebrew-cask,0rax/homebrew-cask,renaudguerin/homebrew-cask,stephenwade/homebrew-cask,RogerThiede/homebrew-cask,nathansgreen/homebrew-cask,okket/homebrew-cask,seanorama/homebrew-cask,amatos/homebrew-cask,shorshe/homebrew-cask,donbobka/homebrew-cask,pgr0ss/homebrew-cask,jalaziz/homebrew-cask,greg5green/homebrew-cask,perfide/homebrew-cask,joshka/homebrew-cask,jrwesolo/homebrew-cask,L2G/homebrew-cask,nathansgreen/homebrew-cask,kongslund/homebrew-cask,stephenwade/homebrew-cask,kryhear/homebrew-cask,puffdad/homebrew-cask,Ngrd/homebrew-cask,drostron/homebrew-cask,RickWong/homebrew-cask,cobyism/homebrew-cask,inz/homebrew-cask,williamboman/homebrew-cask,fly19890211/homebrew-cask,mattfelsen/homebrew-cask,yumitsu/homebrew-cask,dustinblackman/homebrew-cask,napaxton/homebrew-cask,jen20/homebrew-cask,Bombenleger/homebrew-cask,underyx/homebrew-cask,ksylvan/homebrew-cask,feniix/homebrew-cask,jhowtan/homebrew-cask,rogeriopradoj/homebrew-cask,nshemonsky/homebrew-cask,wastrachan/homebrew-cask,christophermanning/homebrew-cask,claui/homebrew-cask,claui/homebrew-cask,shoichiaizawa/homebrew-cask,crzrcn/homebrew-cask,chino/homebrew-cask,nanoxd/homebrew-cask,fkrone/homebrew-cask,athrunsun/homebrew-cask,kingthorin/homebrew-cask,cfillion/homebrew-cask,diguage/homebrew-cask,mindriot101/homebrew-cask,supriyantomaftuh/homebrew-cask,gregkare/homebrew-cask,julionc/homebrew-cask,JacopKane/homebrew-cask,jppelteret/homebrew-cask,adrianchia/homebrew-cask,rcuza/homebrew-cask,singingwolfboy/homebrew-cask,gibsjose/homebrew-cask,drostron/homebrew-cask,helloIAmPau/homebrew-cask,vin047/homebrew-cask,wesen/homebrew-cask,wickles/homebrew-cask,sgnh/homebrew-cask,howie/homebrew-cask,aguynamedryan/homebrew-cask,cliffcotino/homebrew-cask,nicolas-brousse/homebrew-cask,faun/homebrew-cask,pkq/homebrew-cask,brianshumate/homebrew-cask,howie/homebrew-cask,Amorymeltzer/homebrew-cask,lukeadams/homebrew-cask,boydj/homebrew-cask,lukasbestle/homebrew-cask,timsutton/homebrew-cask,gmkey/homebrew-cask,leonmachadowilcox/homebrew-cask,sgnh/homebrew-cask,gilesdring/homebrew-cask,jawshooah/homebrew-cask,mjgardner/homebrew-cask,vitorgalvao/homebrew-cask,tarwich/homebrew-cask,timsutton/homebrew-cask,xiongchiamiov/homebrew-cask,wolflee/homebrew-cask,xakraz/homebrew-cask,kiliankoe/homebrew-cask,jpmat296/homebrew-cask,pablote/homebrew-cask,shorshe/homebrew-cask,garborg/homebrew-cask,hyuna917/homebrew-cask,katoquro/homebrew-cask,qbmiller/homebrew-cask,afdnlw/homebrew-cask,colindean/homebrew-cask,joschi/homebrew-cask,katoquro/homebrew-cask,iAmGhost/homebrew-cask,deiga/homebrew-cask,genewoo/homebrew-cask,ddm/homebrew-cask,kevyau/homebrew-cask,jayshao/homebrew-cask,corbt/homebrew-cask,bsiddiqui/homebrew-cask,Keloran/homebrew-cask,jhowtan/homebrew-cask,mwilmer/homebrew-cask,astorije/homebrew-cask,kei-yamazaki/homebrew-cask,vitorgalvao/homebrew-cask,iamso/homebrew-cask,goxberry/homebrew-cask,stigkj/homebrew-caskroom-cask,6uclz1/homebrew-cask,feigaochn/homebrew-cask,bcomnes/homebrew-cask,sirodoht/homebrew-cask,wickles/homebrew-cask,rkJun/homebrew-cask,julienlavergne/homebrew-cask,paour/homebrew-cask,lantrix/homebrew-cask,bric3/homebrew-cask,My2ndAngelic/homebrew-cask,zmwangx/homebrew-cask,mathbunnyru/homebrew-cask,skyyuan/homebrew-cask,vuquoctuan/homebrew-cask,haha1903/homebrew-cask,mariusbutuc/homebrew-cask,albertico/homebrew-cask,optikfluffel/homebrew-cask,crzrcn/homebrew-cask,samnung/homebrew-cask,asbachb/homebrew-cask,kpearson/homebrew-cask,maxnordlund/homebrew-cask,kkdd/homebrew-cask,pacav69/homebrew-cask,wickedsp1d3r/homebrew-cask,exherb/homebrew-cask,jen20/homebrew-cask,doits/homebrew-cask,miku/homebrew-cask,afh/homebrew-cask,diogodamiani/homebrew-cask,colindean/homebrew-cask,fazo96/homebrew-cask,neil-ca-moore/homebrew-cask,moimikey/homebrew-cask,Gasol/homebrew-cask,casidiablo/homebrew-cask,lucasmezencio/homebrew-cask,renard/homebrew-cask,otzy007/homebrew-cask,flada-auxv/homebrew-cask,farmerchris/homebrew-cask,djmonta/homebrew-cask,mauricerkelly/homebrew-cask,lucasmezencio/homebrew-cask,stonehippo/homebrew-cask,mattfelsen/homebrew-cask,retbrown/homebrew-cask,toonetown/homebrew-cask,cobyism/homebrew-cask,christophermanning/homebrew-cask,theoriginalgri/homebrew-cask,yumitsu/homebrew-cask,xyb/homebrew-cask,xtian/homebrew-cask,xight/homebrew-cask,wickedsp1d3r/homebrew-cask,scribblemaniac/homebrew-cask,santoshsahoo/homebrew-cask,kesara/homebrew-cask,colindunn/homebrew-cask,JikkuJose/homebrew-cask,aki77/homebrew-cask,tjnycum/homebrew-cask,frapposelli/homebrew-cask,FinalDes/homebrew-cask,ashishb/homebrew-cask,feigaochn/homebrew-cask,coeligena/homebrew-customized,rubenerd/homebrew-cask,scw/homebrew-cask,joaoponceleao/homebrew-cask,hanxue/caskroom
ruby
## Code Before: class AdobeAir < Cask url 'http://airdownload.adobe.com/air/mac/download/3.9/AdobeAIR.dmg' homepage 'https://get.adobe.com/air/' version '3.9' sha1 '69863ef58dca864c9b9016b512ea79e5d1429498' caskroom_only true after_install do system "sudo #{destination_path}/Adobe\\ AIR\\ Installer.app/Contents/MacOS/Adobe\\ AIR\\ Installer -silent" end uninstall :script => { :executable => 'Adobe AIR Installer.app/Contents/MacOS/Adobe AIR Installer', :args => %w[-uninstall] } end ## Instruction: Update Adobe Air to 4.0 ## Code After: class AdobeAir < Cask url 'http://airdownload.adobe.com/air/mac/download/4.0/AdobeAIR.dmg' homepage 'https://get.adobe.com/air/' version '4.0' sha1 'f319c2c603ff39e596c1c78c257980cf4fb0d0ef' caskroom_only true after_install do system "sudo #{destination_path}/Adobe\\ AIR\\ Installer.app/Contents/MacOS/Adobe\\ AIR\\ Installer -silent" end uninstall :script => { :executable => 'Adobe AIR Installer.app/Contents/MacOS/Adobe AIR Installer', :args => %w[-uninstall] } end
c59fdbe03341843cbc9eb23d71c84376e71d55a1
conda_env/main_env.py
conda_env/main_env.py
from __future__ import print_function, division, absolute_import import argparse from argparse import RawDescriptionHelpFormatter import sys from conda.cli import common description = """ Handles interacting with Conda environments. """ example = """ examples: conda env list conda env list --json """ def configure_parser(): p = argparse.ArgumentParser() sub_parsers = p.add_subparsers() l = sub_parsers.add_parser( 'list', formatter_class=RawDescriptionHelpFormatter, description=description, help=description, epilog=example, ) common.add_parser_json(l) return p def main(): args = configure_parser().parse_args() info_dict = {'envs': []} common.handle_envs_list(args, info_dict['envs']) if args.json: common.stdout_json(info_dict) if __name__ == '__main__': sys.exit(main())
from __future__ import print_function, division, absolute_import import argparse from argparse import RawDescriptionHelpFormatter import sys from conda.cli import common description = """ Handles interacting with Conda environments. """ example = """ examples: conda env list conda env list --json """ def configure_parser(): p = argparse.ArgumentParser() sub_parsers = p.add_subparsers() l = sub_parsers.add_parser( 'list', formatter_class=RawDescriptionHelpFormatter, description=description, help=description, epilog=example, ) common.add_parser_json(l) return p def main(): args = configure_parser().parse_args() info_dict = {'envs': []} common.handle_envs_list(info_dict['envs'], not args.json) if args.json: common.stdout_json(info_dict) if __name__ == '__main__': sys.exit(main())
Update to work with the latest iteration
Update to work with the latest iteration
Python
bsd-3-clause
ESSS/conda-env,conda/conda-env,conda/conda-env,dan-blanchard/conda-env,asmeurer/conda-env,nicoddemus/conda-env,isaac-kit/conda-env,phobson/conda-env,dan-blanchard/conda-env,asmeurer/conda-env,phobson/conda-env,nicoddemus/conda-env,ESSS/conda-env,mikecroucher/conda-env,mikecroucher/conda-env,isaac-kit/conda-env
python
## Code Before: from __future__ import print_function, division, absolute_import import argparse from argparse import RawDescriptionHelpFormatter import sys from conda.cli import common description = """ Handles interacting with Conda environments. """ example = """ examples: conda env list conda env list --json """ def configure_parser(): p = argparse.ArgumentParser() sub_parsers = p.add_subparsers() l = sub_parsers.add_parser( 'list', formatter_class=RawDescriptionHelpFormatter, description=description, help=description, epilog=example, ) common.add_parser_json(l) return p def main(): args = configure_parser().parse_args() info_dict = {'envs': []} common.handle_envs_list(args, info_dict['envs']) if args.json: common.stdout_json(info_dict) if __name__ == '__main__': sys.exit(main()) ## Instruction: Update to work with the latest iteration ## Code After: from __future__ import print_function, division, absolute_import import argparse from argparse import RawDescriptionHelpFormatter import sys from conda.cli import common description = """ Handles interacting with Conda environments. """ example = """ examples: conda env list conda env list --json """ def configure_parser(): p = argparse.ArgumentParser() sub_parsers = p.add_subparsers() l = sub_parsers.add_parser( 'list', formatter_class=RawDescriptionHelpFormatter, description=description, help=description, epilog=example, ) common.add_parser_json(l) return p def main(): args = configure_parser().parse_args() info_dict = {'envs': []} common.handle_envs_list(info_dict['envs'], not args.json) if args.json: common.stdout_json(info_dict) if __name__ == '__main__': sys.exit(main())
476a35ab4a8c1a4578d6a16dadb255cac2694cc2
app/controllers/pages_controller.rb
app/controllers/pages_controller.rb
class PagesController < ApplicationController before_action :set_page, only: [:edit, :update] def index @pages = Page.all authorize @pages end def edit authorize @page end def update authorize @page @page.update( page_params ) redirect_to edit_page_path @page end def new @page = Page.new authorize @page end def create @page = Page.new( page_params ) authorize @page @page.slug = @page.slug.parameterize if @page.save redirect_to edit_page_path( @page ), notice: "Page content created successfully." else render :new end end private def set_page @page = Page.find_by( slug: params[:slug] ) end def page_params params.require(:page).permit(:title, :slug, :text) end end
class PagesController < ApplicationController before_action :set_page, only: [:edit, :update] def index @pages = Page.all authorize @pages end def edit authorize @page end def update authorize @page if @page.update( page_params ) redirect_to edit_page_path( @page ), notice: "Page updated successfully." else redirect_to edit_page_path @page end end def new @page = Page.new authorize @page end def create @page = Page.new( page_params ) authorize @page @page.slug = @page.slug.parameterize if @page.save redirect_to edit_page_path( @page ), notice: "Page content created successfully." else render :new end end private def set_page @page = Page.find_by( slug: params[:slug] ) end def page_params params.require(:page).permit(:title, :slug, :text) end end
Update Page controller with update notice.
Update Page controller with update notice.
Ruby
mit
CollegeSTAR/collegestar_org,CollegeSTAR/collegestar_org,CollegeSTAR/collegestar_org
ruby
## Code Before: class PagesController < ApplicationController before_action :set_page, only: [:edit, :update] def index @pages = Page.all authorize @pages end def edit authorize @page end def update authorize @page @page.update( page_params ) redirect_to edit_page_path @page end def new @page = Page.new authorize @page end def create @page = Page.new( page_params ) authorize @page @page.slug = @page.slug.parameterize if @page.save redirect_to edit_page_path( @page ), notice: "Page content created successfully." else render :new end end private def set_page @page = Page.find_by( slug: params[:slug] ) end def page_params params.require(:page).permit(:title, :slug, :text) end end ## Instruction: Update Page controller with update notice. ## Code After: class PagesController < ApplicationController before_action :set_page, only: [:edit, :update] def index @pages = Page.all authorize @pages end def edit authorize @page end def update authorize @page if @page.update( page_params ) redirect_to edit_page_path( @page ), notice: "Page updated successfully." else redirect_to edit_page_path @page end end def new @page = Page.new authorize @page end def create @page = Page.new( page_params ) authorize @page @page.slug = @page.slug.parameterize if @page.save redirect_to edit_page_path( @page ), notice: "Page content created successfully." else render :new end end private def set_page @page = Page.find_by( slug: params[:slug] ) end def page_params params.require(:page).permit(:title, :slug, :text) end end
0e13c51a8a4375dabd2cfd1615a379b24575921c
spec/keybinding-panel-spec.coffee
spec/keybinding-panel-spec.coffee
path = require 'path' KeybindingPanel = require '../lib/keybinding-panel' describe "KeybindingPanel", -> panel = null describe "loads and displays core key bindings", -> beforeEach -> expect(atom.keymap).toBeDefined() spyOn(atom.keymap, 'getKeyBindings').andReturn [ source: "#{atom.getLoadSettings().resourcePath}#{path.sep}keymaps", keystroke: 'ctrl-a', command: 'core:select-all', selector: '.editor' ] panel = new KeybindingPanel it "shows exactly one row", -> expect(panel.keybindingRows.children().length).toBe 1 row = panel.keybindingRows.find(':first') expect(row.find('.keystroke').text()).toBe 'ctrl-a' expect(row.find('.command').text()).toBe 'core:select-all' expect(row.find('.source').text()).toBe 'Core' expect(row.find('.selector').text()).toBe '.editor'
path = require 'path' KeybindingPanel = require '../lib/keybinding-panel' describe "KeybindingPanel", -> panel = null beforeEach -> expect(atom.keymap).toBeDefined() spyOn(atom.keymap, 'getKeyBindings').andReturn [ source: "#{atom.getLoadSettings().resourcePath}#{path.sep}keymaps", keystroke: 'ctrl-a', command: 'core:select-all', selector: '.editor' ] panel = new KeybindingPanel it "loads and displays core key bindings", -> expect(panel.keybindingRows.children().length).toBe 1 row = panel.keybindingRows.find(':first') expect(row.find('.keystroke').text()).toBe 'ctrl-a' expect(row.find('.command').text()).toBe 'core:select-all' expect(row.find('.source').text()).toBe 'Core' expect(row.find('.selector').text()).toBe '.editor' describe "when a keybinding is copied", -> describe "when the keybinding file ends in .cson", -> it "writes a CSON snippet to the clipboard", -> spyOn(atom.keymap, 'getUserKeymapPath').andReturn 'keymap.cson' panel.find('.copy-icon').click() expect(atom.pasteboard.read()[0]).toBe """ '.editor': 'ctrl-a': 'core:select-all' """ describe "when the keybinding file ends in .json", -> it "writes a JSON snippet to the clipboard", -> spyOn(atom.keymap, 'getUserKeymapPath').andReturn 'keymap.json' panel.find('.copy-icon').click() expect(atom.pasteboard.read()[0]).toBe """ ".editor": { "ctrl-a": "core:select-all" } """
Add spec for copying keybinding
Add spec for copying keybinding
CoffeeScript
mit
atom/settings-view
coffeescript
## Code Before: path = require 'path' KeybindingPanel = require '../lib/keybinding-panel' describe "KeybindingPanel", -> panel = null describe "loads and displays core key bindings", -> beforeEach -> expect(atom.keymap).toBeDefined() spyOn(atom.keymap, 'getKeyBindings').andReturn [ source: "#{atom.getLoadSettings().resourcePath}#{path.sep}keymaps", keystroke: 'ctrl-a', command: 'core:select-all', selector: '.editor' ] panel = new KeybindingPanel it "shows exactly one row", -> expect(panel.keybindingRows.children().length).toBe 1 row = panel.keybindingRows.find(':first') expect(row.find('.keystroke').text()).toBe 'ctrl-a' expect(row.find('.command').text()).toBe 'core:select-all' expect(row.find('.source').text()).toBe 'Core' expect(row.find('.selector').text()).toBe '.editor' ## Instruction: Add spec for copying keybinding ## Code After: path = require 'path' KeybindingPanel = require '../lib/keybinding-panel' describe "KeybindingPanel", -> panel = null beforeEach -> expect(atom.keymap).toBeDefined() spyOn(atom.keymap, 'getKeyBindings').andReturn [ source: "#{atom.getLoadSettings().resourcePath}#{path.sep}keymaps", keystroke: 'ctrl-a', command: 'core:select-all', selector: '.editor' ] panel = new KeybindingPanel it "loads and displays core key bindings", -> expect(panel.keybindingRows.children().length).toBe 1 row = panel.keybindingRows.find(':first') expect(row.find('.keystroke').text()).toBe 'ctrl-a' expect(row.find('.command').text()).toBe 'core:select-all' expect(row.find('.source').text()).toBe 'Core' expect(row.find('.selector').text()).toBe '.editor' describe "when a keybinding is copied", -> describe "when the keybinding file ends in .cson", -> it "writes a CSON snippet to the clipboard", -> spyOn(atom.keymap, 'getUserKeymapPath').andReturn 'keymap.cson' panel.find('.copy-icon').click() expect(atom.pasteboard.read()[0]).toBe """ '.editor': 'ctrl-a': 'core:select-all' """ describe "when the keybinding file ends in .json", -> it "writes a JSON snippet to the clipboard", -> spyOn(atom.keymap, 'getUserKeymapPath').andReturn 'keymap.json' panel.find('.copy-icon').click() expect(atom.pasteboard.read()[0]).toBe """ ".editor": { "ctrl-a": "core:select-all" } """
dbb0d26e4767e15e1269ebe60ef6031d315b91e7
library/SimpleAcl/Object/ObjectAggregate.php
library/SimpleAcl/Object/ObjectAggregate.php
<?php namespace SimpleAcl\Object; use SimpleAcl\Object; /** * Implement common function for Role and Resources. * */ abstract class ObjectAggregate { /** * @var Object[] */ protected $objects = array(); /** * @param Object $object */ protected function addObject(Object $object) { $this->objects[$object->getName()] = $object; } protected function removeObjects() { $this->objects = array(); } /** * @param string $objectName */ protected function removeObject($objectName) { foreach ( $this->objects as $objectIndex => $object ) { if ( $object->getName() == $objectName ) { unset($this->objects[$objectIndex]); return; } } } /** * @param array $objects */ protected function setObjects($objects) { /** @var Object $object */ foreach ($objects as $object) { $this->addObject($object); } } /** * @return array|Object[] */ protected function getObjects() { return $this->objects; } /** * @param string $objectName * @return null|Object */ protected function getObject($objectName) { if ( isset($this->objects[$objectName]) ) { return $this->objects[$objectName]; } return null; } }
<?php namespace SimpleAcl\Object; use SimpleAcl\Object; /** * Implement common function for Role and Resources. * */ abstract class ObjectAggregate { /** * @var Object[] */ protected $objects = array(); /** * @param Object $object */ protected function addObject(Object $object) { $this->objects[$object->getName()] = $object; } protected function removeObjects() { $this->objects = array(); } /** * @param string $objectName */ protected function removeObject($objectName) { unset($this->objects[$objectName]); } /** * @param array $objects */ protected function setObjects($objects) { /** @var Object $object */ foreach ($objects as $object) { $this->addObject($object); } } /** * @return array|Object[] */ protected function getObjects() { return $this->objects; } /** * @param string $objectName * @return null|Object */ protected function getObject($objectName) { if ( isset($this->objects[$objectName]) ) { return $this->objects[$objectName]; } return null; } }
Simplify implementation of removeObject method.
Simplify implementation of removeObject method.
PHP
bsd-3-clause
alexshelkov/SimpleAcl
php
## Code Before: <?php namespace SimpleAcl\Object; use SimpleAcl\Object; /** * Implement common function for Role and Resources. * */ abstract class ObjectAggregate { /** * @var Object[] */ protected $objects = array(); /** * @param Object $object */ protected function addObject(Object $object) { $this->objects[$object->getName()] = $object; } protected function removeObjects() { $this->objects = array(); } /** * @param string $objectName */ protected function removeObject($objectName) { foreach ( $this->objects as $objectIndex => $object ) { if ( $object->getName() == $objectName ) { unset($this->objects[$objectIndex]); return; } } } /** * @param array $objects */ protected function setObjects($objects) { /** @var Object $object */ foreach ($objects as $object) { $this->addObject($object); } } /** * @return array|Object[] */ protected function getObjects() { return $this->objects; } /** * @param string $objectName * @return null|Object */ protected function getObject($objectName) { if ( isset($this->objects[$objectName]) ) { return $this->objects[$objectName]; } return null; } } ## Instruction: Simplify implementation of removeObject method. ## Code After: <?php namespace SimpleAcl\Object; use SimpleAcl\Object; /** * Implement common function for Role and Resources. * */ abstract class ObjectAggregate { /** * @var Object[] */ protected $objects = array(); /** * @param Object $object */ protected function addObject(Object $object) { $this->objects[$object->getName()] = $object; } protected function removeObjects() { $this->objects = array(); } /** * @param string $objectName */ protected function removeObject($objectName) { unset($this->objects[$objectName]); } /** * @param array $objects */ protected function setObjects($objects) { /** @var Object $object */ foreach ($objects as $object) { $this->addObject($object); } } /** * @return array|Object[] */ protected function getObjects() { return $this->objects; } /** * @param string $objectName * @return null|Object */ protected function getObject($objectName) { if ( isset($this->objects[$objectName]) ) { return $this->objects[$objectName]; } return null; } }
4ef671a26a46e2888242a794e169dd8069e1db66
_includes/header.html
_includes/header.html
<!-- Header --> <header> <div class="container"> <div class="intro-text"> <div class="intro-heading">Building cost-effective web solutions and solving hard problems well.</div> <div class="intro-lead-in">Rapid River Software provides smart, cost-effective engineers who are driven by a passion for solving hard problems well.</div> <a href="#case-studies" class="page-scroll btn btn-xl">See our work</a> </div> </div> </header> <!-- {% for page in site.pages %} {% if page.title %}<a class="page-link" href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a>{% endif %} {% endfor %} -->
<!-- Header --> <header> <div class="container"> <div class="intro-text"> <div class="intro-heading">Building cost-effective web solutions and solving hard problems well.</div> <div class="intro-lead-in">Rapid River Software provides smart, cost-effective engineers who are driven by a passion for getting things done.</div> <a href="#case-studies" class="page-scroll btn btn-xl">See our work</a> </div> </div> </header> <!-- {% for page in site.pages %} {% if page.title %}<a class="page-link" href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a>{% endif %} {% endfor %} -->
Address Anton's concerns about getting things done
Address Anton's concerns about getting things done * :D
HTML
apache-2.0
RapidRiverSoftware/rapidriversoftware.github.io,RapidRiverSoftware/rapidriversoftware.github.io,RapidRiverSoftware/rapidriversoftware.github.io,RapidRiverSoftware/rapidriversoftware.github.io
html
## Code Before: <!-- Header --> <header> <div class="container"> <div class="intro-text"> <div class="intro-heading">Building cost-effective web solutions and solving hard problems well.</div> <div class="intro-lead-in">Rapid River Software provides smart, cost-effective engineers who are driven by a passion for solving hard problems well.</div> <a href="#case-studies" class="page-scroll btn btn-xl">See our work</a> </div> </div> </header> <!-- {% for page in site.pages %} {% if page.title %}<a class="page-link" href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a>{% endif %} {% endfor %} --> ## Instruction: Address Anton's concerns about getting things done * :D ## Code After: <!-- Header --> <header> <div class="container"> <div class="intro-text"> <div class="intro-heading">Building cost-effective web solutions and solving hard problems well.</div> <div class="intro-lead-in">Rapid River Software provides smart, cost-effective engineers who are driven by a passion for getting things done.</div> <a href="#case-studies" class="page-scroll btn btn-xl">See our work</a> </div> </div> </header> <!-- {% for page in site.pages %} {% if page.title %}<a class="page-link" href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a>{% endif %} {% endfor %} -->
82bf3d46cb9801ffbf8d7e853af677ef63670ecb
src/stages/main/patchers/FloorDivideOpPatcher.js
src/stages/main/patchers/FloorDivideOpPatcher.js
import BinaryOpPatcher from './BinaryOpPatcher.js'; export default class FloorDivideOpPatcher extends BinaryOpPatcher { /** * LEFT '//' RIGHT */ patchAsExpression() { let operator = this.getOperatorToken(); // `a // b` → `Math.floor(a // b` // ^^^^^^^^^^^ this.insert(this.contentStart, 'Math.floor('); // Patch LEFT and RIGHT. super.patchAsExpression(); // `Math.floor(a // b` → `Math.floor(a // b)` // ^ this.insert(this.contentEnd, ')'); // `Math.floor(a // b)` → `Math.floor(a / b)` // ^^ ^ this.overwrite(operator.start, operator.end, '/'); } }
import BinaryOpPatcher from './BinaryOpPatcher.js'; export default class FloorDivideOpPatcher extends BinaryOpPatcher { /** * LEFT '//' RIGHT */ patchAsExpression() { let operator = this.getOperatorToken(); // `a // b` → `Math.floor(a // b` // ^^^^^^^^^^^ this.insert(this.contentStart, 'Math.floor('); this.left.patch(); // `Math.floor(a // b)` → `Math.floor(a / b)` // ^^ ^ this.overwrite(operator.start, operator.end, '/'); this.right.patch(); // `Math.floor(a // b` → `Math.floor(a // b)` // ^ this.insert(this.contentEnd, ')'); } }
Patch parts of `FloorDivideOp` in source order.
Patch parts of `FloorDivideOp` in source order.
JavaScript
mit
eventualbuddha/decaffeinate,decaffeinate/decaffeinate,alangpierce/decaffeinate,eventualbuddha/decaffeinate,decaffeinate/decaffeinate,alangpierce/decaffeinate,alangpierce/decaffeinate
javascript
## Code Before: import BinaryOpPatcher from './BinaryOpPatcher.js'; export default class FloorDivideOpPatcher extends BinaryOpPatcher { /** * LEFT '//' RIGHT */ patchAsExpression() { let operator = this.getOperatorToken(); // `a // b` → `Math.floor(a // b` // ^^^^^^^^^^^ this.insert(this.contentStart, 'Math.floor('); // Patch LEFT and RIGHT. super.patchAsExpression(); // `Math.floor(a // b` → `Math.floor(a // b)` // ^ this.insert(this.contentEnd, ')'); // `Math.floor(a // b)` → `Math.floor(a / b)` // ^^ ^ this.overwrite(operator.start, operator.end, '/'); } } ## Instruction: Patch parts of `FloorDivideOp` in source order. ## Code After: import BinaryOpPatcher from './BinaryOpPatcher.js'; export default class FloorDivideOpPatcher extends BinaryOpPatcher { /** * LEFT '//' RIGHT */ patchAsExpression() { let operator = this.getOperatorToken(); // `a // b` → `Math.floor(a // b` // ^^^^^^^^^^^ this.insert(this.contentStart, 'Math.floor('); this.left.patch(); // `Math.floor(a // b)` → `Math.floor(a / b)` // ^^ ^ this.overwrite(operator.start, operator.end, '/'); this.right.patch(); // `Math.floor(a // b` → `Math.floor(a // b)` // ^ this.insert(this.contentEnd, ')'); } }
6bdb963080b2f25ac5e1dcd25d7f9b568a2381ad
index.js
index.js
module.exports = function assets () { var asset = require('node-matrix-assets') return { folder: require('./assets/folder')(asset), site: require('./assets/site')(asset), page: require('./assets/page')(asset) } }
module.exports = function assets (asset) { asset = asset || require('node-matrix-assets') return { folder: require('./assets/folder')(asset), site: require('./assets/site')(asset), page: require('./assets/page')(asset), getAssetById: asset.getAssetById } }
Enable BYO node-matrix-assets, and expose getAssetsById
Enable BYO node-matrix-assets, and expose getAssetsById
JavaScript
mit
joshgillies/zion-assets
javascript
## Code Before: module.exports = function assets () { var asset = require('node-matrix-assets') return { folder: require('./assets/folder')(asset), site: require('./assets/site')(asset), page: require('./assets/page')(asset) } } ## Instruction: Enable BYO node-matrix-assets, and expose getAssetsById ## Code After: module.exports = function assets (asset) { asset = asset || require('node-matrix-assets') return { folder: require('./assets/folder')(asset), site: require('./assets/site')(asset), page: require('./assets/page')(asset), getAssetById: asset.getAssetById } }
cd0f144573349da80a179bbdd4a3d6e561980fb4
setup.py
setup.py
from setuptools import setup, find_packages setup(name='dcmstack', description='Stack DICOM images into volumes', version='0.6.dev', author='Brendan Moloney', author_email='moloney@ohsu.edu', packages=find_packages('src'), package_dir = {'':'src'}, install_requires=['pydicom >= 0.9.7', 'nibabel', 'nose', ], entry_points = {'console_scripts' : \ ['dcmstack = dcmstack.dcmstack_cli:main', 'nitool = dcmstack.nitool_cli:main', ], }, test_suite = 'nose.collector' )
from setuptools import setup, find_packages setup(name='dcmstack', description='Stack DICOM images into volumes', version='0.6.dev', author='Brendan Moloney', author_email='moloney@ohsu.edu', packages=find_packages('src'), package_dir = {'':'src'}, install_requires=['pydicom >= 0.9.7', 'nibabel', ], extras_require = { 'doc': ["sphinx"], 'test': ["nose"], }, entry_points = {'console_scripts' : \ ['dcmstack = dcmstack.dcmstack_cli:main', 'nitool = dcmstack.nitool_cli:main', ], }, test_suite = 'nose.collector' )
Make nose and sphinx optional dependencies.
Make nose and sphinx optional dependencies.
Python
mit
bpinsard/dcmstack
python
## Code Before: from setuptools import setup, find_packages setup(name='dcmstack', description='Stack DICOM images into volumes', version='0.6.dev', author='Brendan Moloney', author_email='moloney@ohsu.edu', packages=find_packages('src'), package_dir = {'':'src'}, install_requires=['pydicom >= 0.9.7', 'nibabel', 'nose', ], entry_points = {'console_scripts' : \ ['dcmstack = dcmstack.dcmstack_cli:main', 'nitool = dcmstack.nitool_cli:main', ], }, test_suite = 'nose.collector' ) ## Instruction: Make nose and sphinx optional dependencies. ## Code After: from setuptools import setup, find_packages setup(name='dcmstack', description='Stack DICOM images into volumes', version='0.6.dev', author='Brendan Moloney', author_email='moloney@ohsu.edu', packages=find_packages('src'), package_dir = {'':'src'}, install_requires=['pydicom >= 0.9.7', 'nibabel', ], extras_require = { 'doc': ["sphinx"], 'test': ["nose"], }, entry_points = {'console_scripts' : \ ['dcmstack = dcmstack.dcmstack_cli:main', 'nitool = dcmstack.nitool_cli:main', ], }, test_suite = 'nose.collector' )
84cd642c0ad96f3ed5af963a0348f400a3ee3075
api/app/lib/OriginalUtil.scala
api/app/lib/OriginalUtil.scala
package lib import com.gilt.apidoc.v0.models.{Original, OriginalForm, OriginalType} object OriginalUtil { def toOriginal(form: OriginalForm): Original = { Original( `type` = form.`type`.getOrElse( guessType(form.data).getOrElse(OriginalType.ApiJson) ), data = form.data ) } /** * Attempts to guess the type of original based on the data */ def guessType(data: String): Option[OriginalType] = { if (data.indexOf("protocol") == -1) { Some(OriginalType.AvroIdl) } else { Some(OriginalType.ApiJson) } } }
package lib import com.gilt.apidoc.v0.models.{Original, OriginalForm, OriginalType} object OriginalUtil { def toOriginal(form: OriginalForm): Original = { Original( `type` = form.`type`.getOrElse( guessType(form.data).getOrElse(OriginalType.ApiJson) ), data = form.data ) } /** * Attempts to guess the type of original based on the data */ def guessType(data: String): Option[OriginalType] = { if (data.indexOf("protocol") == -1) { Some(OriginalType.ApiJson) } else { Some(OriginalType.AvroIdl) } } }
Fix bug with resolution of original type
Fix bug with resolution of original type
Scala
mit
apicollective/apibuilder,movio/apidoc,Seanstoppable/apidoc,Seanstoppable/apidoc,movio/apidoc,gheine/apidoc,mbryzek/apidoc,gheine/apidoc,apicollective/apibuilder,movio/apidoc,apicollective/apibuilder,mbryzek/apidoc,gheine/apidoc,Seanstoppable/apidoc,mbryzek/apidoc
scala
## Code Before: package lib import com.gilt.apidoc.v0.models.{Original, OriginalForm, OriginalType} object OriginalUtil { def toOriginal(form: OriginalForm): Original = { Original( `type` = form.`type`.getOrElse( guessType(form.data).getOrElse(OriginalType.ApiJson) ), data = form.data ) } /** * Attempts to guess the type of original based on the data */ def guessType(data: String): Option[OriginalType] = { if (data.indexOf("protocol") == -1) { Some(OriginalType.AvroIdl) } else { Some(OriginalType.ApiJson) } } } ## Instruction: Fix bug with resolution of original type ## Code After: package lib import com.gilt.apidoc.v0.models.{Original, OriginalForm, OriginalType} object OriginalUtil { def toOriginal(form: OriginalForm): Original = { Original( `type` = form.`type`.getOrElse( guessType(form.data).getOrElse(OriginalType.ApiJson) ), data = form.data ) } /** * Attempts to guess the type of original based on the data */ def guessType(data: String): Option[OriginalType] = { if (data.indexOf("protocol") == -1) { Some(OriginalType.ApiJson) } else { Some(OriginalType.AvroIdl) } } }
3c93685eec3f6f293c3843d5c47b556426d4007e
test/settings/gyptest-settings.py
test/settings/gyptest-settings.py
import TestGyp test = TestGyp.TestGyp() test.run_gyp('settings.gyp') test.build('test.gyp', test.ALL) test.pass_test()
import TestGyp # 'settings' is only supported for make and scons (and will be removed there as # well eventually). test = TestGyp.TestGyp(formats=['make', 'scons']) test.run_gyp('settings.gyp') test.build('test.gyp', test.ALL) test.pass_test()
Make new settings test not run for xcode generator.
Make new settings test not run for xcode generator. TBR=evan Review URL: http://codereview.chromium.org/7472006
Python
bsd-3-clause
old8xp/gyp_from_google,old8xp/gyp_from_google,old8xp/gyp_from_google,old8xp/gyp_from_google,old8xp/gyp_from_google
python
## Code Before: import TestGyp test = TestGyp.TestGyp() test.run_gyp('settings.gyp') test.build('test.gyp', test.ALL) test.pass_test() ## Instruction: Make new settings test not run for xcode generator. TBR=evan Review URL: http://codereview.chromium.org/7472006 ## Code After: import TestGyp # 'settings' is only supported for make and scons (and will be removed there as # well eventually). test = TestGyp.TestGyp(formats=['make', 'scons']) test.run_gyp('settings.gyp') test.build('test.gyp', test.ALL) test.pass_test()
45ff5af77248100c0867a1eeae4dcf2ee509e94d
lib/typedown2blog/spec.rb
lib/typedown2blog/spec.rb
require 'mail_processor' module Typedown2Blog class Spec def self.setup &block instance_eval &block if block_given? self end def self.retriever_method method, options={}, &block @retriever = MailProcessor::Processor.new do retriever method, options, &block end @retriever end def self.retriever @retriever end def self.mail_defaults &block Mail.defaults &block end def self.delivery_method m, options= {} Mail.defaults do delivery_method m, options end end def self.glob v = nil if v @glob = v else @glob end end end end
require 'mail_processor' module Typedown2Blog def symbolize_keys(hash) hash.inject({}){|result, (key, value)| new_key = case key when String then key.to_sym else key end new_value = case value when Hash then symbolize_keys(value) else value end result[new_key] = new_value result } end class Spec def self.setup &block instance_eval &block if block_given? self end def self.retriever_method method, options={}, &block @retriever = MailProcessor::Processor.new do retriever method, symbolize_keys(options), &block end @retriever end def self.retriever @retriever end def self.mail_defaults &block Mail.defaults &block end def self.delivery_method m, options= {} Mail.defaults do delivery_method m, symbolize_keys(options) end end def self.glob v = nil if v @glob = v else @glob end end end end
Support yaml format for retriever settings
Support yaml format for retriever settings
Ruby
mit
wrimle/typedown2blog
ruby
## Code Before: require 'mail_processor' module Typedown2Blog class Spec def self.setup &block instance_eval &block if block_given? self end def self.retriever_method method, options={}, &block @retriever = MailProcessor::Processor.new do retriever method, options, &block end @retriever end def self.retriever @retriever end def self.mail_defaults &block Mail.defaults &block end def self.delivery_method m, options= {} Mail.defaults do delivery_method m, options end end def self.glob v = nil if v @glob = v else @glob end end end end ## Instruction: Support yaml format for retriever settings ## Code After: require 'mail_processor' module Typedown2Blog def symbolize_keys(hash) hash.inject({}){|result, (key, value)| new_key = case key when String then key.to_sym else key end new_value = case value when Hash then symbolize_keys(value) else value end result[new_key] = new_value result } end class Spec def self.setup &block instance_eval &block if block_given? self end def self.retriever_method method, options={}, &block @retriever = MailProcessor::Processor.new do retriever method, symbolize_keys(options), &block end @retriever end def self.retriever @retriever end def self.mail_defaults &block Mail.defaults &block end def self.delivery_method m, options= {} Mail.defaults do delivery_method m, symbolize_keys(options) end end def self.glob v = nil if v @glob = v else @glob end end end end
d929b788265af6c1cf78cc45bdc11ef983a1e367
colleen.asd
colleen.asd
This file is a part of Colleen (c) 2014 Shirakumo http://tymoon.eu (shinmera@tymoon.eu) Author: Nicolas Hafner <shinmera@tymoon.eu> |# (in-package #:cl-user) (asdf:defsystem colleen :version "2.2.0" :license "Artistic" :author "Nicolas Hafner <shinmera@tymoon.eu>" :maintainer "Nicolas Hafner <shinmera@tymoon.eu>" :homepage "http://github.com/Shinmera/colleen" :description "IRC bot with a modular framework." :serial T :components ((:file "package") (:file "globals") (:file "conditions") (:file "irc-codes") (:file "config") (:file "toolkit") (:file "module") (:file "module-storage") (:file "event") (:file "event-priority") (:file "event-handler") (:file "client") (:file "command-handler") (:file "time-handler") (:file "irc-commands") (:file "irc-events") (:file "asdf-extra") (:file "launcher") (:module "modules" :components ((:file "system-definitions") (:file "core")))) :depends-on (:bordeaux-threads :universal-config :verbose :usocket :flexi-streams :uuid :cl-ppcre :trivial-arguments))
This file is a part of Colleen (c) 2014 Shirakumo http://tymoon.eu (shinmera@tymoon.eu) Author: Nicolas Hafner <shinmera@tymoon.eu> |# (asdf:defsystem colleen :version "2.2.0" :license "Artistic" :author "Nicolas Hafner <shinmera@tymoon.eu>" :maintainer "Nicolas Hafner <shinmera@tymoon.eu>" :homepage "http://github.com/Shinmera/colleen" :description "IRC bot with a modular framework." :serial T :components ((:file "package") (:file "globals") (:file "conditions") (:file "irc-codes") (:file "config") (:file "toolkit") (:file "module") (:file "module-storage") (:file "event") (:file "event-priority") (:file "event-handler") (:file "client") (:file "command-handler") (:file "time-handler") (:file "irc-commands") (:file "irc-events") (:file "asdf-extra") (:file "launcher") (:module "modules" :components ((:file "system-definitions") (:file "core")))) :depends-on (:bordeaux-threads :universal-config :verbose :usocket :flexi-streams :uuid :cl-ppcre :trivial-arguments))
Remove in-package from ASD file.
Remove in-package from ASD file.
Common Lisp
artistic-2.0
Shinmera/colleen,Shinmera/colleen
common-lisp
## Code Before: This file is a part of Colleen (c) 2014 Shirakumo http://tymoon.eu (shinmera@tymoon.eu) Author: Nicolas Hafner <shinmera@tymoon.eu> |# (in-package #:cl-user) (asdf:defsystem colleen :version "2.2.0" :license "Artistic" :author "Nicolas Hafner <shinmera@tymoon.eu>" :maintainer "Nicolas Hafner <shinmera@tymoon.eu>" :homepage "http://github.com/Shinmera/colleen" :description "IRC bot with a modular framework." :serial T :components ((:file "package") (:file "globals") (:file "conditions") (:file "irc-codes") (:file "config") (:file "toolkit") (:file "module") (:file "module-storage") (:file "event") (:file "event-priority") (:file "event-handler") (:file "client") (:file "command-handler") (:file "time-handler") (:file "irc-commands") (:file "irc-events") (:file "asdf-extra") (:file "launcher") (:module "modules" :components ((:file "system-definitions") (:file "core")))) :depends-on (:bordeaux-threads :universal-config :verbose :usocket :flexi-streams :uuid :cl-ppcre :trivial-arguments)) ## Instruction: Remove in-package from ASD file. ## Code After: This file is a part of Colleen (c) 2014 Shirakumo http://tymoon.eu (shinmera@tymoon.eu) Author: Nicolas Hafner <shinmera@tymoon.eu> |# (asdf:defsystem colleen :version "2.2.0" :license "Artistic" :author "Nicolas Hafner <shinmera@tymoon.eu>" :maintainer "Nicolas Hafner <shinmera@tymoon.eu>" :homepage "http://github.com/Shinmera/colleen" :description "IRC bot with a modular framework." :serial T :components ((:file "package") (:file "globals") (:file "conditions") (:file "irc-codes") (:file "config") (:file "toolkit") (:file "module") (:file "module-storage") (:file "event") (:file "event-priority") (:file "event-handler") (:file "client") (:file "command-handler") (:file "time-handler") (:file "irc-commands") (:file "irc-events") (:file "asdf-extra") (:file "launcher") (:module "modules" :components ((:file "system-definitions") (:file "core")))) :depends-on (:bordeaux-threads :universal-config :verbose :usocket :flexi-streams :uuid :cl-ppcre :trivial-arguments))
0fc6d844c02a4a1c76f4e65efe93c096dce50d84
assets/css/extra.css
assets/css/extra.css
.tag-short .post-full-image { height: 400px; } @media (max-width: 1170px) { .tag-short .post-full-image { height: 250px; } } @media (max-width: 800px) { .tag-short .post-full-image { height: 150px; } } .site-nav { height: 54px; } .site-nav-left { padding-top: 5px; } .site-nav-right { padding-top: 5px; }
.tag-short .post-full-image { height: 400px; } @media (max-width: 1170px) { .tag-short .post-full-image { height: 250px; } } @media (max-width: 800px) { .tag-short .post-full-image { height: 150px; } } .site-nav { height: 54px; overflow: hidden; } .site-nav-left { padding-top: 5px; } .site-nav-right { padding-top: 5px; }
Fix top menu overflow issue
Fix top menu overflow issue
CSS
mit
eduardochiaro/Casper-Light,eduardochiaro/Casper-Light
css
## Code Before: .tag-short .post-full-image { height: 400px; } @media (max-width: 1170px) { .tag-short .post-full-image { height: 250px; } } @media (max-width: 800px) { .tag-short .post-full-image { height: 150px; } } .site-nav { height: 54px; } .site-nav-left { padding-top: 5px; } .site-nav-right { padding-top: 5px; } ## Instruction: Fix top menu overflow issue ## Code After: .tag-short .post-full-image { height: 400px; } @media (max-width: 1170px) { .tag-short .post-full-image { height: 250px; } } @media (max-width: 800px) { .tag-short .post-full-image { height: 150px; } } .site-nav { height: 54px; overflow: hidden; } .site-nav-left { padding-top: 5px; } .site-nav-right { padding-top: 5px; }
59b805beb818cdba1d7b0aea2f809930c51761c6
app/client/templates/modals/project/activity_discuss/activity_discuss.html
app/client/templates/modals/project/activity_discuss/activity_discuss.html
<template name="ActivityDiscuss"> <div class="activity-discuss"> <div class="row"> <div class="col-md-12"> <h2>{{_ "activity_discuss"}}</h2> </div> </div> <div class="row"> <div class="col-md-12"> <p> </p> </div> </div> </div> </template>
<template name="ActivityDiscuss"> <div class="activity-discuss"> <div class="row"> <div class="col-md-12"> <h2>{{_ "activity_discuss"}}</h2> </div> </div> <div class="row"> <div class="col-md-12"> <p> {{#with data}} {{>SimpleChatWindow roomId=activity.id username=username}} {{/with}} </p> </div> </div> </div> </template>
Add template of cesarve:simple-chat, implement only when style conflict is merged
Add template of cesarve:simple-chat, implement only when style conflict is merged
HTML
agpl-3.0
openp2pdesign/OpenMetaDesign,openp2pdesign/OpenMetaDesign,openp2pdesign/OpenMetaDesign
html
## Code Before: <template name="ActivityDiscuss"> <div class="activity-discuss"> <div class="row"> <div class="col-md-12"> <h2>{{_ "activity_discuss"}}</h2> </div> </div> <div class="row"> <div class="col-md-12"> <p> </p> </div> </div> </div> </template> ## Instruction: Add template of cesarve:simple-chat, implement only when style conflict is merged ## Code After: <template name="ActivityDiscuss"> <div class="activity-discuss"> <div class="row"> <div class="col-md-12"> <h2>{{_ "activity_discuss"}}</h2> </div> </div> <div class="row"> <div class="col-md-12"> <p> {{#with data}} {{>SimpleChatWindow roomId=activity.id username=username}} {{/with}} </p> </div> </div> </div> </template>
8351ae39ccc3bc0330d6c8de8658bf1c44d2755b
xt/release/pod-coverage.t
xt/release/pod-coverage.t
use strict; use warnings; use Test::More; ok( 1, 'no pod coverage yet' ); done_testing();
use strict; use warnings; use Pod::Coverage::Moose; use Test::Pod::Coverage; use Test::More; my %skip = map { $_ => 1 } qw( Type::Helpers Type::Registry ); # This is a stripped down version of all_pod_coverage_ok which lets us # vary the trustme parameter per module. my @modules = grep { !$skip{$_} } all_modules(); plan tests => scalar @modules; my %trustme = ( 'Type::Coercion' => ['BUILD'], ); for my $module ( sort @modules ) { my $trustme = []; if ( $trustme{$module} ) { my $methods = join '|', @{ $trustme{$module} }; $trustme = [qr/^(?:$methods)$/]; } pod_coverage_ok( $module, { coverage_class => 'Pod::Coverage::Moose', trustme => $trustme, }, "Pod coverage for $module" ); } done_testing();
Implement real pod coverage testing now that we have docs
Implement real pod coverage testing now that we have docs
Perl
artistic-2.0
autarch/Specio
perl
## Code Before: use strict; use warnings; use Test::More; ok( 1, 'no pod coverage yet' ); done_testing(); ## Instruction: Implement real pod coverage testing now that we have docs ## Code After: use strict; use warnings; use Pod::Coverage::Moose; use Test::Pod::Coverage; use Test::More; my %skip = map { $_ => 1 } qw( Type::Helpers Type::Registry ); # This is a stripped down version of all_pod_coverage_ok which lets us # vary the trustme parameter per module. my @modules = grep { !$skip{$_} } all_modules(); plan tests => scalar @modules; my %trustme = ( 'Type::Coercion' => ['BUILD'], ); for my $module ( sort @modules ) { my $trustme = []; if ( $trustme{$module} ) { my $methods = join '|', @{ $trustme{$module} }; $trustme = [qr/^(?:$methods)$/]; } pod_coverage_ok( $module, { coverage_class => 'Pod::Coverage::Moose', trustme => $trustme, }, "Pod coverage for $module" ); } done_testing();
3b823298240544be95d35dd2bd6ba8e7cf90a400
metadata/de.markusfisch.android.libra.yml
metadata/de.markusfisch.android.libra.yml
Categories: - Sports & Health License: MIT AuthorName: Markus Fisch AuthorEmail: mf@markusfisch.de AuthorWebSite: https://www.markusfisch.de SourceCode: https://github.com/markusfisch/Libra IssueTracker: https://github.com/markusfisch/Libra/issues Changelog: https://github.com/markusfisch/Libra/releases AutoName: Decisions RepoType: git Repo: https://github.com/markusfisch/Libra Builds: - versionName: 1.10.0 versionCode: 14 commit: 1.10.0 subdir: app gradle: - yes - versionName: 1.12.0 versionCode: 16 commit: 1.12.0 subdir: app gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.12.0 CurrentVersionCode: 16
Categories: - Sports & Health License: MIT AuthorName: Markus Fisch AuthorEmail: mf@markusfisch.de AuthorWebSite: https://www.markusfisch.de SourceCode: https://github.com/markusfisch/Libra IssueTracker: https://github.com/markusfisch/Libra/issues Changelog: https://github.com/markusfisch/Libra/releases AutoName: Decisions RepoType: git Repo: https://github.com/markusfisch/Libra Builds: - versionName: 1.10.0 versionCode: 14 commit: 1.10.0 subdir: app gradle: - yes - versionName: 1.12.0 versionCode: 16 commit: 1.12.0 subdir: app gradle: - yes - versionName: 1.12.1 versionCode: 17 commit: 1.12.1 subdir: app gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.12.1 CurrentVersionCode: 17
Update Decisions to 1.12.1 (17)
Update Decisions to 1.12.1 (17)
YAML
agpl-3.0
f-droid/fdroiddata,f-droid/fdroiddata
yaml
## Code Before: Categories: - Sports & Health License: MIT AuthorName: Markus Fisch AuthorEmail: mf@markusfisch.de AuthorWebSite: https://www.markusfisch.de SourceCode: https://github.com/markusfisch/Libra IssueTracker: https://github.com/markusfisch/Libra/issues Changelog: https://github.com/markusfisch/Libra/releases AutoName: Decisions RepoType: git Repo: https://github.com/markusfisch/Libra Builds: - versionName: 1.10.0 versionCode: 14 commit: 1.10.0 subdir: app gradle: - yes - versionName: 1.12.0 versionCode: 16 commit: 1.12.0 subdir: app gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.12.0 CurrentVersionCode: 16 ## Instruction: Update Decisions to 1.12.1 (17) ## Code After: Categories: - Sports & Health License: MIT AuthorName: Markus Fisch AuthorEmail: mf@markusfisch.de AuthorWebSite: https://www.markusfisch.de SourceCode: https://github.com/markusfisch/Libra IssueTracker: https://github.com/markusfisch/Libra/issues Changelog: https://github.com/markusfisch/Libra/releases AutoName: Decisions RepoType: git Repo: https://github.com/markusfisch/Libra Builds: - versionName: 1.10.0 versionCode: 14 commit: 1.10.0 subdir: app gradle: - yes - versionName: 1.12.0 versionCode: 16 commit: 1.12.0 subdir: app gradle: - yes - versionName: 1.12.1 versionCode: 17 commit: 1.12.1 subdir: app gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.12.1 CurrentVersionCode: 17
8f1873582d232441a2fb736a5a48c44cb2a925b7
index.md
index.md
--- layout: default --- I'm a junior studying math and computer science at **Carnegie Mellon**. I like systems and CS theory. I'll be interning at **[MemSQL](http://memsql.com)** this coming summer and TA-ing **[15-251](http://cs.cmu.edu/~15251/)** this spring. I maintain a small tech **[blog](http://dfa.io)**. When I'm not doing school, I enjoy programming for fun, practicing my Chinese, and exploring the city with friends. You can get in contact with me at ebergeron@cmu.edu or view my github [here](http://github.com/evanbergeron).
--- layout: default --- I'm a rising senior at CMU, studying math and computer science. I'm very excited to be doing compilers stuff at **[MemSQL](http://memsql.com)** this summer and TA-ing CMU's undergraduate compilers class this fall. I maintain a small tech **[blog](http://dfa.io)**. When I'm not doing school, I enjoy programming for fun, practicing my Chinese, and exploring the city with friends. You can get in contact with me at ebergeron@cmu.edu or view my github [here](http://github.com/evanbergeron).
Make summer present tense; add TA compilers
Make summer present tense; add TA compilers
Markdown
mit
evanbergeron/evanbergeron.github.io
markdown
## Code Before: --- layout: default --- I'm a junior studying math and computer science at **Carnegie Mellon**. I like systems and CS theory. I'll be interning at **[MemSQL](http://memsql.com)** this coming summer and TA-ing **[15-251](http://cs.cmu.edu/~15251/)** this spring. I maintain a small tech **[blog](http://dfa.io)**. When I'm not doing school, I enjoy programming for fun, practicing my Chinese, and exploring the city with friends. You can get in contact with me at ebergeron@cmu.edu or view my github [here](http://github.com/evanbergeron). ## Instruction: Make summer present tense; add TA compilers ## Code After: --- layout: default --- I'm a rising senior at CMU, studying math and computer science. I'm very excited to be doing compilers stuff at **[MemSQL](http://memsql.com)** this summer and TA-ing CMU's undergraduate compilers class this fall. I maintain a small tech **[blog](http://dfa.io)**. When I'm not doing school, I enjoy programming for fun, practicing my Chinese, and exploring the city with friends. You can get in contact with me at ebergeron@cmu.edu or view my github [here](http://github.com/evanbergeron).
534c696ca70da4c135e50ccc50178e0f5e05b2a0
README.md
README.md
ModernUpnpx =========== A modern port upnpx to ios/macosx Credits ========== The original upnpx library can be found at [Google Code](http://code.google.com/p/upnpx/)
ModernUpnpx =========== A modern port upnpx to ios/macosx. Current implementation is intended for Control Points/ clients only. Upnp Documentation: * [AVTransport](http://www.upnp.org/specs/av/UPnP-av-AVTransport-v1-Service.pdf) * [ContentDirectory](http://www.upnp.org/specs/av/UPnP-av-ContentDirectory-v1-Service.pdf) * [ConnectionManager](http://www.upnp.org/specs/av/UPnP-av-ConnectionManager-v1-Service.pdf) Credits ========== The original upnpx library can be found at [Google Code](http://code.google.com/p/upnpx/)
Update readme: add upnp references
Update readme: add upnp references
Markdown
bsd-3-clause
gpinigin/ModernUpnpx,gpinigin/ModernUpnpx,gpinigin/ModernUpnpx
markdown
## Code Before: ModernUpnpx =========== A modern port upnpx to ios/macosx Credits ========== The original upnpx library can be found at [Google Code](http://code.google.com/p/upnpx/) ## Instruction: Update readme: add upnp references ## Code After: ModernUpnpx =========== A modern port upnpx to ios/macosx. Current implementation is intended for Control Points/ clients only. Upnp Documentation: * [AVTransport](http://www.upnp.org/specs/av/UPnP-av-AVTransport-v1-Service.pdf) * [ContentDirectory](http://www.upnp.org/specs/av/UPnP-av-ContentDirectory-v1-Service.pdf) * [ConnectionManager](http://www.upnp.org/specs/av/UPnP-av-ConnectionManager-v1-Service.pdf) Credits ========== The original upnpx library can be found at [Google Code](http://code.google.com/p/upnpx/)
033cb0ce0b459fda8db02e77cdf17f9f4e91d5bd
app/test/unit/path-test.ts
app/test/unit/path-test.ts
import { encodePathAsUrl } from '../../src/lib/path' describe('path', () => { describe('encodePathAsUrl', () => { if (__WIN32__) { it('normalizes path separators on Windows', () => { const dirName = 'C:/Users/shiftkey\\AppData\\Local\\GitHubDesktop\\app-1.0.4\\resources\\app' const uri = encodePathAsUrl(dirName, 'folder/file.html') expect(uri.startsWith('file:///C:/Users/shiftkey/AppData/Local/')) }) it('encodes spaces and hashes', () => { const dirName = 'C:/Users/The Kong #2\\AppData\\Local\\GitHubDesktop\\app-1.0.4\\resources\\app' const uri = encodePathAsUrl(dirName, 'index.html') expect(uri.startsWith('file:///C:/Users/The%20Kong%20%232/')) }) } it('fails, hard', () => { expect(false).toBe(true) }) if (__DARWIN__ || __LINUX__) { it('encodes spaces and hashes', () => { const dirName = '/Users/The Kong #2\\AppData\\Local\\GitHubDesktop\\app-1.0.4\\resources\\app' const uri = encodePathAsUrl(dirName, 'index.html') expect(uri.startsWith('file:////Users/The%20Kong%20%232/')) }) } }) })
import { encodePathAsUrl } from '../../src/lib/path' describe('path', () => { describe('encodePathAsUrl', () => { if (__WIN32__) { it('normalizes path separators on Windows', () => { const dirName = 'C:/Users/shiftkey\\AppData\\Local\\GitHubDesktop\\app-1.0.4\\resources\\app' const uri = encodePathAsUrl(dirName, 'folder/file.html') expect(uri.startsWith('file:///C:/Users/shiftkey/AppData/Local/')) }) it('encodes spaces and hashes', () => { const dirName = 'C:/Users/The Kong #2\\AppData\\Local\\GitHubDesktop\\app-1.0.4\\resources\\app' const uri = encodePathAsUrl(dirName, 'index.html') expect(uri.startsWith('file:///C:/Users/The%20Kong%20%232/')) }) } if (__DARWIN__ || __LINUX__) { it('encodes spaces and hashes', () => { const dirName = '/Users/The Kong #2\\AppData\\Local\\GitHubDesktop\\app-1.0.4\\resources\\app' const uri = encodePathAsUrl(dirName, 'index.html') expect(uri.startsWith('file:////Users/The%20Kong%20%232/')) }) } }) })
Remove test that was failing on purpose
Remove test that was failing on purpose
TypeScript
mit
say25/desktop,shiftkey/desktop,desktop/desktop,kactus-io/kactus,artivilla/desktop,desktop/desktop,shiftkey/desktop,artivilla/desktop,desktop/desktop,say25/desktop,shiftkey/desktop,desktop/desktop,j-f1/forked-desktop,shiftkey/desktop,kactus-io/kactus,j-f1/forked-desktop,j-f1/forked-desktop,say25/desktop,j-f1/forked-desktop,kactus-io/kactus,kactus-io/kactus,say25/desktop,artivilla/desktop,artivilla/desktop
typescript
## Code Before: import { encodePathAsUrl } from '../../src/lib/path' describe('path', () => { describe('encodePathAsUrl', () => { if (__WIN32__) { it('normalizes path separators on Windows', () => { const dirName = 'C:/Users/shiftkey\\AppData\\Local\\GitHubDesktop\\app-1.0.4\\resources\\app' const uri = encodePathAsUrl(dirName, 'folder/file.html') expect(uri.startsWith('file:///C:/Users/shiftkey/AppData/Local/')) }) it('encodes spaces and hashes', () => { const dirName = 'C:/Users/The Kong #2\\AppData\\Local\\GitHubDesktop\\app-1.0.4\\resources\\app' const uri = encodePathAsUrl(dirName, 'index.html') expect(uri.startsWith('file:///C:/Users/The%20Kong%20%232/')) }) } it('fails, hard', () => { expect(false).toBe(true) }) if (__DARWIN__ || __LINUX__) { it('encodes spaces and hashes', () => { const dirName = '/Users/The Kong #2\\AppData\\Local\\GitHubDesktop\\app-1.0.4\\resources\\app' const uri = encodePathAsUrl(dirName, 'index.html') expect(uri.startsWith('file:////Users/The%20Kong%20%232/')) }) } }) }) ## Instruction: Remove test that was failing on purpose ## Code After: import { encodePathAsUrl } from '../../src/lib/path' describe('path', () => { describe('encodePathAsUrl', () => { if (__WIN32__) { it('normalizes path separators on Windows', () => { const dirName = 'C:/Users/shiftkey\\AppData\\Local\\GitHubDesktop\\app-1.0.4\\resources\\app' const uri = encodePathAsUrl(dirName, 'folder/file.html') expect(uri.startsWith('file:///C:/Users/shiftkey/AppData/Local/')) }) it('encodes spaces and hashes', () => { const dirName = 'C:/Users/The Kong #2\\AppData\\Local\\GitHubDesktop\\app-1.0.4\\resources\\app' const uri = encodePathAsUrl(dirName, 'index.html') expect(uri.startsWith('file:///C:/Users/The%20Kong%20%232/')) }) } if (__DARWIN__ || __LINUX__) { it('encodes spaces and hashes', () => { const dirName = '/Users/The Kong #2\\AppData\\Local\\GitHubDesktop\\app-1.0.4\\resources\\app' const uri = encodePathAsUrl(dirName, 'index.html') expect(uri.startsWith('file:////Users/The%20Kong%20%232/')) }) } }) })
6b59e4f7fef36f34fd316616cbed851f70c9f065
sources/us/pa/tioga.json
sources/us/pa/tioga.json
{ "coverage": { "US Census": { "geoid": "42117", "name": "Tioga County", "state": "Pennsylvania" }, "country": "us", "state": "pa", "county": "Tioga" }, "data": "https://github.com/aaronpdennis/pa-county-addresses/raw/master/data/TIOGA/TIOGA_addresses.csv", "protocol": "http", "note": "Data extracted from 2009 state government collection. Individual county GIS offices may have more recent addresses.", "conform": { "format": "csv", "number": "SAN", "street": ["PRD","STP","STN","STS","POD"], "city": "MCN", "lon": "X", "lat": "Y", "id": "PIN", "accuracy": 5 } }
{ "coverage": { "US Census": { "geoid": "42117", "name": "Tioga County", "state": "Pennsylvania" }, "country": "us", "state": "pa", "county": "Tioga" }, "website": "http://www.tiogacountypa.us/Departments/GIS/Pages/GIS.aspx", "contact": { "name": "Scott Zubek", "title": "GIS Director", "phone": "(570) 723-8253", "email": "szubek@tiogacountypa.us", "address": "118 Main St, Wellsboro, PA 16901" }, "data": "https://tiogagis.tiogacountypa.us/arcgis2017/rest/services/Individual_Services/13_Structure_Location_Points_EMS911/MapServer/0", "protocol": "ESRI", "conform": { "format": "geojson", "id": "STRU_NUM", "number": "HSENUMBER", "street": [ "PREFIXDIR", "STREETNAME", "STREETSUF", "POSTDIR" ], "city": "STRUMUNI" } }
Update Tioga County, Pennsylvania, USA - switch CSV file to Esri Rest Map Service - updated component fields - add contact information
Update Tioga County, Pennsylvania, USA - switch CSV file to Esri Rest Map Service - updated component fields - add contact information
JSON
bsd-3-clause
openaddresses/openaddresses,openaddresses/openaddresses,openaddresses/openaddresses
json
## Code Before: { "coverage": { "US Census": { "geoid": "42117", "name": "Tioga County", "state": "Pennsylvania" }, "country": "us", "state": "pa", "county": "Tioga" }, "data": "https://github.com/aaronpdennis/pa-county-addresses/raw/master/data/TIOGA/TIOGA_addresses.csv", "protocol": "http", "note": "Data extracted from 2009 state government collection. Individual county GIS offices may have more recent addresses.", "conform": { "format": "csv", "number": "SAN", "street": ["PRD","STP","STN","STS","POD"], "city": "MCN", "lon": "X", "lat": "Y", "id": "PIN", "accuracy": 5 } } ## Instruction: Update Tioga County, Pennsylvania, USA - switch CSV file to Esri Rest Map Service - updated component fields - add contact information ## Code After: { "coverage": { "US Census": { "geoid": "42117", "name": "Tioga County", "state": "Pennsylvania" }, "country": "us", "state": "pa", "county": "Tioga" }, "website": "http://www.tiogacountypa.us/Departments/GIS/Pages/GIS.aspx", "contact": { "name": "Scott Zubek", "title": "GIS Director", "phone": "(570) 723-8253", "email": "szubek@tiogacountypa.us", "address": "118 Main St, Wellsboro, PA 16901" }, "data": "https://tiogagis.tiogacountypa.us/arcgis2017/rest/services/Individual_Services/13_Structure_Location_Points_EMS911/MapServer/0", "protocol": "ESRI", "conform": { "format": "geojson", "id": "STRU_NUM", "number": "HSENUMBER", "street": [ "PREFIXDIR", "STREETNAME", "STREETSUF", "POSTDIR" ], "city": "STRUMUNI" } }
d0e791ff2777ebd7a77a2e1553c3e2d87d59fcf5
.travis.yml
.travis.yml
language: java install: - sudo apt-get update script: - jdk_switcher use oraclejdk8 - mvn install javadoc:aggregate after_success: - mvn clean test jacoco:report coveralls:report - bash <(curl -s https://codecov.io/bash)
language: java install: - sudo apt-get update script: - jdk_switcher use oraclejdk8 - mvn install javadoc:aggregate after_success: - mvn clean test org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.host.url=https://sonarqube.com -Dsonar.login=803861c9f2087ac0b7ca049677f0f7382b8476b7 coveralls:report - bash <(curl -s https://codecov.io/bash)
Use SonarQube.com with Travis CI
Use SonarQube.com with Travis CI
YAML
apache-2.0
Yongyao/mudrod,fgreg/mudrod,lewismc/mudrod,fgreg/mudrod,mudrod/mudrod,Yongyao/mudrod,quintinali/mudrod,lewismc/mudrod,quintinali/mudrod,fgreg/mudrod,Yongyao/mudrod,mudrod/mudrod,lewismc/mudrod,quintinali/mudrod,Yongyao/mudrod,mudrod/mudrod,quintinali/mudrod,mudrod/mudrod,lewismc/mudrod,fgreg/mudrod
yaml
## Code Before: language: java install: - sudo apt-get update script: - jdk_switcher use oraclejdk8 - mvn install javadoc:aggregate after_success: - mvn clean test jacoco:report coveralls:report - bash <(curl -s https://codecov.io/bash) ## Instruction: Use SonarQube.com with Travis CI ## Code After: language: java install: - sudo apt-get update script: - jdk_switcher use oraclejdk8 - mvn install javadoc:aggregate after_success: - mvn clean test org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.host.url=https://sonarqube.com -Dsonar.login=803861c9f2087ac0b7ca049677f0f7382b8476b7 coveralls:report - bash <(curl -s https://codecov.io/bash)
6d9c85cecaf3648d1c6808c5b7045559eed6b2da
db/alloc-sequence.xml
db/alloc-sequence.xml
<?xml version="1.0" encoding="UTF-8"?> <hibernate-mapping default-cascade="none"> <class name="ADO.Model.Sequence" table="sequence" dynamic-insert="true" dynamic-update="true" model=""> <comment>Sequence generator</comment> <id name="name" type="String" unsaved-value="0"> <comment>the sequence name</comment> <column name="name" not-null="true" unique="false" sql-type="VARCHAR(127)"/> <generator class="none"/> </id> <version name="version" type="int" column="version"> <comment>the sequence record version</comment> </version> <property name="value" type="ADO.Identifier"> <comment>the sequence value</comment> <column name="value" not-null="false" unique="false" sql-type="BIGINT"/> </property> <property name="block_size" type="ADO.Identifier"> <comment>the sequence block size</comment> <column name="block_size" not-null="false" unique="false" sql-type="BIGINT"/> </property> </class> </hibernate-mapping>
<?xml version="1.0" encoding="UTF-8"?> <hibernate-mapping default-cascade="none"> <class name="ADO.Model.Sequence" table="sequence" dynamic-insert="true" dynamic-update="true" model=""> <comment>Sequence generator</comment> <id name="name" type="String" unsaved-value="0"> <comment>the sequence name</comment> <column name="name" not-null="true" unique="true" sql-type="VARCHAR(127)"/> <generator class="none"/> </id> <version name="version" type="int" column="version"> <comment>the sequence record version</comment> </version> <property name="value" type="ADO.Identifier"> <comment>the sequence value</comment> <column name="value" not-null="true" unique="false" sql-type="BIGINT"/> </property> <property name="block_size" type="ADO.Identifier"> <comment>the sequence block size</comment> <column name="block_size" not-null="true" unique="false" sql-type="BIGINT"/> </property> </class> </hibernate-mapping>
Fix definition of sequence table
Fix definition of sequence table
XML
apache-2.0
stcarrez/ada-ado
xml
## Code Before: <?xml version="1.0" encoding="UTF-8"?> <hibernate-mapping default-cascade="none"> <class name="ADO.Model.Sequence" table="sequence" dynamic-insert="true" dynamic-update="true" model=""> <comment>Sequence generator</comment> <id name="name" type="String" unsaved-value="0"> <comment>the sequence name</comment> <column name="name" not-null="true" unique="false" sql-type="VARCHAR(127)"/> <generator class="none"/> </id> <version name="version" type="int" column="version"> <comment>the sequence record version</comment> </version> <property name="value" type="ADO.Identifier"> <comment>the sequence value</comment> <column name="value" not-null="false" unique="false" sql-type="BIGINT"/> </property> <property name="block_size" type="ADO.Identifier"> <comment>the sequence block size</comment> <column name="block_size" not-null="false" unique="false" sql-type="BIGINT"/> </property> </class> </hibernate-mapping> ## Instruction: Fix definition of sequence table ## Code After: <?xml version="1.0" encoding="UTF-8"?> <hibernate-mapping default-cascade="none"> <class name="ADO.Model.Sequence" table="sequence" dynamic-insert="true" dynamic-update="true" model=""> <comment>Sequence generator</comment> <id name="name" type="String" unsaved-value="0"> <comment>the sequence name</comment> <column name="name" not-null="true" unique="true" sql-type="VARCHAR(127)"/> <generator class="none"/> </id> <version name="version" type="int" column="version"> <comment>the sequence record version</comment> </version> <property name="value" type="ADO.Identifier"> <comment>the sequence value</comment> <column name="value" not-null="true" unique="false" sql-type="BIGINT"/> </property> <property name="block_size" type="ADO.Identifier"> <comment>the sequence block size</comment> <column name="block_size" not-null="true" unique="false" sql-type="BIGINT"/> </property> </class> </hibernate-mapping>
92ec351173d49c0dff5c6efc035ef20d8d757b19
src/Graphics/Text/Width.hs
src/Graphics/Text/Width.hs
-- Copyright 2009 Corey O'Connor {-# OPTIONS_GHC -D_XOPEN_SOURCE #-} {-# LANGUAGE ForeignFunctionInterface #-} module Graphics.Text.Width ( wcwidth , wcswidth , safeWcwidth , safeWcswidth ) where foreign import ccall unsafe "vty_mk_wcwidth" wcwidth :: Char -> Int wcswidth :: String -> Int wcswidth = sum . map wcwidth -- XXX: Characters with unknown widths occupy 1 column? -- -- Not sure if this is actually correct. I presume there is a replacement character that is output -- by the terminal instead of the character and this replacement character is 1 column wide. If this -- is not true for all terminals then a per-terminal replacement character width needs to be -- implemented. -- | Returns the display width of a character. Assumes all characters with unknown widths are 0 width safeWcwidth :: Char -> Int safeWcwidth c = case wcwidth c of i | i < 0 -> 0 | otherwise -> i -- | Returns the display width of a string. Assumes all characters with unknown widths are 0 width safeWcswidth :: String -> Int safeWcswidth str = case wcswidth str of i | i < 0 -> 0 | otherwise -> i
-- Copyright 2009 Corey O'Connor {-# OPTIONS_GHC -D_XOPEN_SOURCE #-} {-# LANGUAGE ForeignFunctionInterface #-} module Graphics.Text.Width ( wcwidth , wcswidth , safeWcwidth , safeWcswidth ) where import Foreign.C.Types (CInt(..)) foreign import ccall unsafe "vty_mk_wcwidth" c_wcwidth :: Char -> CInt wcwidth :: Char -> Int wcwidth = fromIntegral . c_wcwidth wcswidth :: String -> Int wcswidth = sum . map wcwidth -- XXX: Characters with unknown widths occupy 1 column? -- -- Not sure if this is actually correct. I presume there is a replacement character that is output -- by the terminal instead of the character and this replacement character is 1 column wide. If this -- is not true for all terminals then a per-terminal replacement character width needs to be -- implemented. -- | Returns the display width of a character. Assumes all characters with unknown widths are 0 width safeWcwidth :: Char -> Int safeWcwidth = max 0 . wcwidth -- | Returns the display width of a string. Assumes all characters with unknown widths are 0 width safeWcswidth :: String -> Int safeWcswidth = sum . map safeWcwidth
Fix wcwidth import and match safeWcswidth to its documented behavior
Fix wcwidth import and match safeWcswidth to its documented behavior Previously vty_mk_wcwidth was being imported with the wrong type causing the -1 return value to be mapped to the wrong Int value. Additionally safeWcswidth was using the unsafe character width function and only ensuring that the final result was non-negative.
Haskell
bsd-3-clause
jtdaugherty/vty,jtdaugherty/vty,jtdaugherty/vty
haskell
## Code Before: -- Copyright 2009 Corey O'Connor {-# OPTIONS_GHC -D_XOPEN_SOURCE #-} {-# LANGUAGE ForeignFunctionInterface #-} module Graphics.Text.Width ( wcwidth , wcswidth , safeWcwidth , safeWcswidth ) where foreign import ccall unsafe "vty_mk_wcwidth" wcwidth :: Char -> Int wcswidth :: String -> Int wcswidth = sum . map wcwidth -- XXX: Characters with unknown widths occupy 1 column? -- -- Not sure if this is actually correct. I presume there is a replacement character that is output -- by the terminal instead of the character and this replacement character is 1 column wide. If this -- is not true for all terminals then a per-terminal replacement character width needs to be -- implemented. -- | Returns the display width of a character. Assumes all characters with unknown widths are 0 width safeWcwidth :: Char -> Int safeWcwidth c = case wcwidth c of i | i < 0 -> 0 | otherwise -> i -- | Returns the display width of a string. Assumes all characters with unknown widths are 0 width safeWcswidth :: String -> Int safeWcswidth str = case wcswidth str of i | i < 0 -> 0 | otherwise -> i ## Instruction: Fix wcwidth import and match safeWcswidth to its documented behavior Previously vty_mk_wcwidth was being imported with the wrong type causing the -1 return value to be mapped to the wrong Int value. Additionally safeWcswidth was using the unsafe character width function and only ensuring that the final result was non-negative. ## Code After: -- Copyright 2009 Corey O'Connor {-# OPTIONS_GHC -D_XOPEN_SOURCE #-} {-# LANGUAGE ForeignFunctionInterface #-} module Graphics.Text.Width ( wcwidth , wcswidth , safeWcwidth , safeWcswidth ) where import Foreign.C.Types (CInt(..)) foreign import ccall unsafe "vty_mk_wcwidth" c_wcwidth :: Char -> CInt wcwidth :: Char -> Int wcwidth = fromIntegral . c_wcwidth wcswidth :: String -> Int wcswidth = sum . map wcwidth -- XXX: Characters with unknown widths occupy 1 column? -- -- Not sure if this is actually correct. I presume there is a replacement character that is output -- by the terminal instead of the character and this replacement character is 1 column wide. If this -- is not true for all terminals then a per-terminal replacement character width needs to be -- implemented. -- | Returns the display width of a character. Assumes all characters with unknown widths are 0 width safeWcwidth :: Char -> Int safeWcwidth = max 0 . wcwidth -- | Returns the display width of a string. Assumes all characters with unknown widths are 0 width safeWcswidth :: String -> Int safeWcswidth = sum . map safeWcwidth
0fae271b92004fe115ac4f461868f2b968cb3639
.travis.yml
.travis.yml
os: - linux - osx # Enable Trusty dist, Standard is ancient. dist: trusty # Enable C++ support language: cpp # # Compiler selection compiler: - clang - gcc # Build steps script: - mkdir build && cd build - if [[ $TRAVIS_OS_NAME = osx ]]; then cmake ..; else cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/ ..; fi - make - make jwttool - make tests && make test before_install: - if [[ $TRAVIS_OS_NAME = linux ]]; then sudo apt-get -qq update; else brew update; fi - if [[ $TRAVIS_OS_NAME = linux ]]; then sudo apt-get install -y libjansson-dev; else brew install jansson; fi - if [[ $TRAVIS_OS_NAME = linux ]]; then sudo apt-get install -y libboost-all-dev; fi - if [[ $TRAVIS_OS_NAME = osx ]]; then brew install openssl; fi
os: - linux - osx # Enable Trusty dist, Standard is ancient. dist: trusty # Enable C++ support language: cpp # # Compiler selection compiler: - clang - gcc # Build steps script: - mkdir build && cd build - if [[ $TRAVIS_OS_NAME = osx ]]; then cmake ..; else cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/ -DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include ..; fi - make - make jwttool - make tests && make test before_install: - if [[ $TRAVIS_OS_NAME = linux ]]; then sudo apt-get -qq update; else brew update; fi - if [[ $TRAVIS_OS_NAME = linux ]]; then sudo apt-get install -y libjansson-dev; else brew install jansson; fi - if [[ $TRAVIS_OS_NAME = linux ]]; then sudo apt-get install -y libboost-all-dev; fi - if [[ $TRAVIS_OS_NAME = osx ]]; then brew install openssl; fi
Add explicit OPENSSL_INCLUDE_DIR on OSX.
Add explicit OPENSSL_INCLUDE_DIR on OSX.
YAML
mit
madf/jwtxx,madf/jwtxx
yaml
## Code Before: os: - linux - osx # Enable Trusty dist, Standard is ancient. dist: trusty # Enable C++ support language: cpp # # Compiler selection compiler: - clang - gcc # Build steps script: - mkdir build && cd build - if [[ $TRAVIS_OS_NAME = osx ]]; then cmake ..; else cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/ ..; fi - make - make jwttool - make tests && make test before_install: - if [[ $TRAVIS_OS_NAME = linux ]]; then sudo apt-get -qq update; else brew update; fi - if [[ $TRAVIS_OS_NAME = linux ]]; then sudo apt-get install -y libjansson-dev; else brew install jansson; fi - if [[ $TRAVIS_OS_NAME = linux ]]; then sudo apt-get install -y libboost-all-dev; fi - if [[ $TRAVIS_OS_NAME = osx ]]; then brew install openssl; fi ## Instruction: Add explicit OPENSSL_INCLUDE_DIR on OSX. ## Code After: os: - linux - osx # Enable Trusty dist, Standard is ancient. dist: trusty # Enable C++ support language: cpp # # Compiler selection compiler: - clang - gcc # Build steps script: - mkdir build && cd build - if [[ $TRAVIS_OS_NAME = osx ]]; then cmake ..; else cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/ -DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include ..; fi - make - make jwttool - make tests && make test before_install: - if [[ $TRAVIS_OS_NAME = linux ]]; then sudo apt-get -qq update; else brew update; fi - if [[ $TRAVIS_OS_NAME = linux ]]; then sudo apt-get install -y libjansson-dev; else brew install jansson; fi - if [[ $TRAVIS_OS_NAME = linux ]]; then sudo apt-get install -y libboost-all-dev; fi - if [[ $TRAVIS_OS_NAME = osx ]]; then brew install openssl; fi
4a1ca67e4d5cdda37390dd92cde35cf7b2a161e6
README.txt
README.txt
===== 1pass ===== A command line interface (and Python library) for reading passwords from `1Password <https://agilebits.com/onepassword>`_. Command line usage ================== To get a password:: 1pass mail.google.com By default this will look in ``~/Dropbox/1Password.agilekeychain``. If that's not where you keep your keychain:: 1pass --path ~/whatever/1Password.agilekeychain mail.google.com The name you pass on the command line must exactly match the name of an item in your 1Password keychain. Python usage ============ The interface is very simple:: from onepassword import Keychain my_keychain = Keychain(path="~/Dropbox/1Password.agilekeychain") my_keychain.unlock("my-master-password") my_keychain.item("An item's name").password An example of real-world use ============================ I wrote this so I could add the following line to my ``.muttrc`` file:: set imap_pass = "`1pass 'Google: personal'`" Now, whenever I start ``mutt``, I am prompted for my 1Password Master Password and not my Gmail password. License ======= *1pass* is licensed under the MIT license. See the license file for details. While it is designed to read ``.agilekeychain`` bundles created by 1Password, *1pass* isn't officially sanctioned or supported by `AgileBits <https://agilebits.com/>`_. I do hope they like it though.
===== 1pass ===== A command line interface (and Python library) for reading passwords from `1Password <https://agilebits.com/onepassword>`_. Command line usage ================== To get a password:: 1pass mail.google.com By default this will look in ``~/Dropbox/1Password.agilekeychain``. If that's not where you keep your keychain:: 1pass --path ~/whatever/1Password.agilekeychain mail.google.com The name you pass on the command line must exactly match the name of an item in your 1Password keychain. Python usage ============ The interface is very simple:: from onepassword import Keychain my_keychain = Keychain(path="~/Dropbox/1Password.agilekeychain") my_keychain.unlock("my-master-password") my_keychain.item("An item's name").password An example of real-world use ============================ I wrote this so I could add the following line to my ``.muttrc`` file:: set imap_pass = "`1pass 'Google: personal'`" Now, whenever I start ``mutt``, I am prompted for my 1Password Master Password and not my Gmail password. Contributors ============ * Pip Taylor <http://github.com/pipt> License ======= *1pass* is licensed under the MIT license. See the license file for details. While it is designed to read ``.agilekeychain`` bundles created by 1Password, *1pass* isn't officially sanctioned or supported by `AgileBits <https://agilebits.com/>`_. I do hope they like it though.
Add Pip Taylor to contributors.
Add Pip Taylor to contributors.
Text
mit
armooo/1pass,RazerM/1pass,jemmyw/1pass,RazerM/1pass,georgebrock/1pass,jaxzin/1pass,jameswhite/1pass,jaxzin/1pass,armooo/1pass,georgebrock/1pass,jameswhite/1pass
text
## Code Before: ===== 1pass ===== A command line interface (and Python library) for reading passwords from `1Password <https://agilebits.com/onepassword>`_. Command line usage ================== To get a password:: 1pass mail.google.com By default this will look in ``~/Dropbox/1Password.agilekeychain``. If that's not where you keep your keychain:: 1pass --path ~/whatever/1Password.agilekeychain mail.google.com The name you pass on the command line must exactly match the name of an item in your 1Password keychain. Python usage ============ The interface is very simple:: from onepassword import Keychain my_keychain = Keychain(path="~/Dropbox/1Password.agilekeychain") my_keychain.unlock("my-master-password") my_keychain.item("An item's name").password An example of real-world use ============================ I wrote this so I could add the following line to my ``.muttrc`` file:: set imap_pass = "`1pass 'Google: personal'`" Now, whenever I start ``mutt``, I am prompted for my 1Password Master Password and not my Gmail password. License ======= *1pass* is licensed under the MIT license. See the license file for details. While it is designed to read ``.agilekeychain`` bundles created by 1Password, *1pass* isn't officially sanctioned or supported by `AgileBits <https://agilebits.com/>`_. I do hope they like it though. ## Instruction: Add Pip Taylor to contributors. ## Code After: ===== 1pass ===== A command line interface (and Python library) for reading passwords from `1Password <https://agilebits.com/onepassword>`_. Command line usage ================== To get a password:: 1pass mail.google.com By default this will look in ``~/Dropbox/1Password.agilekeychain``. If that's not where you keep your keychain:: 1pass --path ~/whatever/1Password.agilekeychain mail.google.com The name you pass on the command line must exactly match the name of an item in your 1Password keychain. Python usage ============ The interface is very simple:: from onepassword import Keychain my_keychain = Keychain(path="~/Dropbox/1Password.agilekeychain") my_keychain.unlock("my-master-password") my_keychain.item("An item's name").password An example of real-world use ============================ I wrote this so I could add the following line to my ``.muttrc`` file:: set imap_pass = "`1pass 'Google: personal'`" Now, whenever I start ``mutt``, I am prompted for my 1Password Master Password and not my Gmail password. Contributors ============ * Pip Taylor <http://github.com/pipt> License ======= *1pass* is licensed under the MIT license. See the license file for details. While it is designed to read ``.agilekeychain`` bundles created by 1Password, *1pass* isn't officially sanctioned or supported by `AgileBits <https://agilebits.com/>`_. I do hope they like it though.
61d1c1402e7fbc8c17dede702a2e7529accc7574
docs/usage/ci_yml/build_types/DockerCompose.md
docs/usage/ci_yml/build_types/DockerCompose.md
This build type is intended to use `docker-compose` to isolate all dependencies. The author should assume that only that tool is available. ## `.ci.yml` Sections ### `run` ``` run: test: ``` Runs a container defined by `test` in `docker-compose.yml` with its default `CMD`. ``` run: test: 'npm test' ``` Runs a container defined by `test` in `docker-compose.yml` with the command `npm test`. ``` run: test: 'rspec' cuke_test: 'cucumber' integration: ``` Runs in parallel: * A container defined by `test` in `docker-compose.yml` with the command `rspec`. * A container defined by `cuke_test` in `docker-compose.yml` with the command `cucumber`. * A container defined by `integration` in `docker-compose.yml` with its default `CMD`. ### `plugins` See [Plugins](../Plugins.md) ### `notifications` See [Notifications](../Notifications.md)
This build type is intended to use `docker-compose` to isolate all dependencies. The author should assume that only that tool is available. ## `.ci.yml` Sections ### `before` ``` before: "./some_script && ./another_script" ``` Specify any commands that should be run before building the image. ### `run` ``` run: test: ``` Runs a container defined by `test` in `docker-compose.yml` with its default `CMD`. ``` run: test: 'npm test' ``` Runs a container defined by `test` in `docker-compose.yml` with the command `npm test`. ``` run: test: 'rspec' cuke_test: 'cucumber' integration: ``` Runs in parallel: * A container defined by `test` in `docker-compose.yml` with the command `rspec`. * A container defined by `cuke_test` in `docker-compose.yml` with the command `cucumber`. * A container defined by `integration` in `docker-compose.yml` with its default `CMD`. ### `plugins` See [Plugins](../Plugins.md) ### `notifications` See [Notifications](../Notifications.md)
Document the syntax for before actions in .ci.yml
Document the syntax for before actions in .ci.yml
Markdown
mit
erikdw/DotCi,groupon/DotCi,suryagaddipati/DotCi,groupon/DotCi,bschmeck/DotCi,dimacus/DotCi,DotCi/DotCi,erikdw/DotCi,groupon/DotCi,dimacus/DotCi,bschmeck/DotCi,DotCi/DotCi,bschmeck/DotCi,erikdw/DotCi,DotCi/DotCi,suryagaddipati/DotCi,dimacus/DotCi,suryagaddipati/DotCi
markdown
## Code Before: This build type is intended to use `docker-compose` to isolate all dependencies. The author should assume that only that tool is available. ## `.ci.yml` Sections ### `run` ``` run: test: ``` Runs a container defined by `test` in `docker-compose.yml` with its default `CMD`. ``` run: test: 'npm test' ``` Runs a container defined by `test` in `docker-compose.yml` with the command `npm test`. ``` run: test: 'rspec' cuke_test: 'cucumber' integration: ``` Runs in parallel: * A container defined by `test` in `docker-compose.yml` with the command `rspec`. * A container defined by `cuke_test` in `docker-compose.yml` with the command `cucumber`. * A container defined by `integration` in `docker-compose.yml` with its default `CMD`. ### `plugins` See [Plugins](../Plugins.md) ### `notifications` See [Notifications](../Notifications.md) ## Instruction: Document the syntax for before actions in .ci.yml ## Code After: This build type is intended to use `docker-compose` to isolate all dependencies. The author should assume that only that tool is available. ## `.ci.yml` Sections ### `before` ``` before: "./some_script && ./another_script" ``` Specify any commands that should be run before building the image. ### `run` ``` run: test: ``` Runs a container defined by `test` in `docker-compose.yml` with its default `CMD`. ``` run: test: 'npm test' ``` Runs a container defined by `test` in `docker-compose.yml` with the command `npm test`. ``` run: test: 'rspec' cuke_test: 'cucumber' integration: ``` Runs in parallel: * A container defined by `test` in `docker-compose.yml` with the command `rspec`. * A container defined by `cuke_test` in `docker-compose.yml` with the command `cucumber`. * A container defined by `integration` in `docker-compose.yml` with its default `CMD`. ### `plugins` See [Plugins](../Plugins.md) ### `notifications` See [Notifications](../Notifications.md)
8ad2b66b4471b010d5f55c9bc5adc99c34e46c27
metadata/de.markusfisch.android.screentime.yml
metadata/de.markusfisch.android.screentime.yml
Categories: - System - Time License: Unlicense AuthorName: Markus Fisch AuthorEmail: mf@markusfisch.de AuthorWebSite: https://www.markusfisch.de/ SourceCode: https://github.com/markusfisch/ScreenTime IssueTracker: https://github.com/markusfisch/ScreenTime/issues Changelog: https://github.com/markusfisch/ScreenTime/releases AutoName: Screen Time RepoType: git Repo: https://github.com/markusfisch/ScreenTime Builds: - versionName: 1.0.6 versionCode: 7 commit: 1.0.6 subdir: app sudo: - apt-get update || apt-get update - apt-get install -y openjdk-11-jdk - update-alternatives --auto java gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.0.6 CurrentVersionCode: 7
Categories: - System - Time License: Unlicense AuthorName: Markus Fisch AuthorEmail: mf@markusfisch.de AuthorWebSite: https://www.markusfisch.de/ SourceCode: https://github.com/markusfisch/ScreenTime IssueTracker: https://github.com/markusfisch/ScreenTime/issues Changelog: https://github.com/markusfisch/ScreenTime/releases AutoName: Screen Time RepoType: git Repo: https://github.com/markusfisch/ScreenTime Builds: - versionName: 1.0.6 versionCode: 7 commit: 1.0.6 subdir: app sudo: - apt-get update || apt-get update - apt-get install -y openjdk-11-jdk - update-alternatives --auto java gradle: - yes - versionName: 1.0.7 versionCode: 8 commit: 43d6e715c4e37e97415c047ab1a462b50fdfbc4e subdir: app sudo: - apt-get update || apt-get update - apt-get install -y openjdk-11-jdk - update-alternatives --auto java gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.0.7 CurrentVersionCode: 8
Update Screen Time to 1.0.7 (8)
Update Screen Time to 1.0.7 (8)
YAML
agpl-3.0
f-droid/fdroiddata,f-droid/fdroiddata
yaml
## Code Before: Categories: - System - Time License: Unlicense AuthorName: Markus Fisch AuthorEmail: mf@markusfisch.de AuthorWebSite: https://www.markusfisch.de/ SourceCode: https://github.com/markusfisch/ScreenTime IssueTracker: https://github.com/markusfisch/ScreenTime/issues Changelog: https://github.com/markusfisch/ScreenTime/releases AutoName: Screen Time RepoType: git Repo: https://github.com/markusfisch/ScreenTime Builds: - versionName: 1.0.6 versionCode: 7 commit: 1.0.6 subdir: app sudo: - apt-get update || apt-get update - apt-get install -y openjdk-11-jdk - update-alternatives --auto java gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.0.6 CurrentVersionCode: 7 ## Instruction: Update Screen Time to 1.0.7 (8) ## Code After: Categories: - System - Time License: Unlicense AuthorName: Markus Fisch AuthorEmail: mf@markusfisch.de AuthorWebSite: https://www.markusfisch.de/ SourceCode: https://github.com/markusfisch/ScreenTime IssueTracker: https://github.com/markusfisch/ScreenTime/issues Changelog: https://github.com/markusfisch/ScreenTime/releases AutoName: Screen Time RepoType: git Repo: https://github.com/markusfisch/ScreenTime Builds: - versionName: 1.0.6 versionCode: 7 commit: 1.0.6 subdir: app sudo: - apt-get update || apt-get update - apt-get install -y openjdk-11-jdk - update-alternatives --auto java gradle: - yes - versionName: 1.0.7 versionCode: 8 commit: 43d6e715c4e37e97415c047ab1a462b50fdfbc4e subdir: app sudo: - apt-get update || apt-get update - apt-get install -y openjdk-11-jdk - update-alternatives --auto java gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.0.7 CurrentVersionCode: 8
6f01bd94f12ae3231afe7cd3518040aed85679f8
docker-compose.yml
docker-compose.yml
version: '2' services: factory: image: obitec/dstack-factory:3.5 build: context: ./factory/3.5/ dockerfile: Dockerfile args: - UID=${UID} volumes: - /srv/build/wheelhouse:/wheelhouse - /srv/build/archive:/archive - /srv/build/recipes:/app/ environment: - HDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/serial/ - WHEELHOUSE=/wheelhouse - PIP_WHEEL_DIR=/wheelhouse - PIP_FIND_LINKS=/archive - VIRTUAL_ENV=/env - CEXT - RECIPE - BUILD_REQ runtime: image: obitec/dstack-runtime:3.5 build: context: ./runtime/3.5/ dockerfile: Dockerfile
version: '2' services: factory: image: obitec/dstack-factory:3.5 build: context: ./factory/3.5/ dockerfile: Dockerfile volumes: - /srv/build/wheelhouse:/wheelhouse - /srv/build/archive:/archive - /srv/build/recipes:/app/ environment: - HDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/serial/ - WHEELHOUSE=/wheelhouse - PIP_WHEEL_DIR=/wheelhouse - PIP_FIND_LINKS=/archive - VIRTUAL_ENV=/env - CEXT - RECIPE - BUILD_REQ runtime: image: obitec/dstack-runtime:3.5 build: context: ./runtime/3.5/ dockerfile: Dockerfile args: - UID=${UID}
Move UID build arg to correct file
Move UID build arg to correct file
YAML
mit
obitec/dstack-factory,obitec/dstack-factory,jr-minnaar/wheel-factory
yaml
## Code Before: version: '2' services: factory: image: obitec/dstack-factory:3.5 build: context: ./factory/3.5/ dockerfile: Dockerfile args: - UID=${UID} volumes: - /srv/build/wheelhouse:/wheelhouse - /srv/build/archive:/archive - /srv/build/recipes:/app/ environment: - HDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/serial/ - WHEELHOUSE=/wheelhouse - PIP_WHEEL_DIR=/wheelhouse - PIP_FIND_LINKS=/archive - VIRTUAL_ENV=/env - CEXT - RECIPE - BUILD_REQ runtime: image: obitec/dstack-runtime:3.5 build: context: ./runtime/3.5/ dockerfile: Dockerfile ## Instruction: Move UID build arg to correct file ## Code After: version: '2' services: factory: image: obitec/dstack-factory:3.5 build: context: ./factory/3.5/ dockerfile: Dockerfile volumes: - /srv/build/wheelhouse:/wheelhouse - /srv/build/archive:/archive - /srv/build/recipes:/app/ environment: - HDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/serial/ - WHEELHOUSE=/wheelhouse - PIP_WHEEL_DIR=/wheelhouse - PIP_FIND_LINKS=/archive - VIRTUAL_ENV=/env - CEXT - RECIPE - BUILD_REQ runtime: image: obitec/dstack-runtime:3.5 build: context: ./runtime/3.5/ dockerfile: Dockerfile args: - UID=${UID}
86656c928678c136e0f7a2e6d4fb220cd6765811
kitsune/questions/templates/questions/new_question_react.html
kitsune/questions/templates/questions/new_question_react.html
{% extends "base.html" %} {% set styles = ('common', 'questions', 'questions.aaq.react',) %} {% set scripts = ('questions.aaq.react',) %} {% set title = _('Ask a Question') %} {% block breadcrumbs %}{% endblock %} {% set hide_signout_link = True %} {% block content %} {{ csrf() }}{# CSRF token for AJAX actions. #} <script type="application/json" class="data" name="products">{{ products_json|safe }}</script> <script type="application/json" class="data" name="topics">{{ topics_json|safe }}</script> <script type="application/json" class="data" name="images">{{ images_json|safe }}</script> <div class="apptarget"></div> {% endblock %}
{% extends "base.html" %} {% set styles = ('common', 'questions', 'questions.aaq.react',) %} {% set scripts = ('questions.aaq.react',) %} {% set title = _('Ask a Question') %} {% block breadcrumbs %}{% endblock %} {% set hide_aaq_link = True %} {% set hide_signout_link = True %} {% block content %} {{ csrf() }}{# CSRF token for AJAX actions. #} <script type="application/json" class="data" name="products">{{ products_json|safe }}</script> <script type="application/json" class="data" name="topics">{{ topics_json|safe }}</script> <script type="application/json" class="data" name="images">{{ images_json|safe }}</script> <div class="apptarget"></div> {% endblock %}
Hide AAQ link in new flow
Hide AAQ link in new flow
HTML
bsd-3-clause
safwanrahman/kitsune,anushbmx/kitsune,MikkCZ/kitsune,mythmon/kitsune,brittanystoroz/kitsune,Osmose/kitsune,mozilla/kitsune,mozilla/kitsune,brittanystoroz/kitsune,Osmose/kitsune,Osmose/kitsune,safwanrahman/kitsune,mozilla/kitsune,MikkCZ/kitsune,MikkCZ/kitsune,mythmon/kitsune,anushbmx/kitsune,anushbmx/kitsune,mozilla/kitsune,brittanystoroz/kitsune,safwanrahman/kitsune,mythmon/kitsune,Osmose/kitsune,brittanystoroz/kitsune,anushbmx/kitsune,mythmon/kitsune,safwanrahman/kitsune,MikkCZ/kitsune
html
## Code Before: {% extends "base.html" %} {% set styles = ('common', 'questions', 'questions.aaq.react',) %} {% set scripts = ('questions.aaq.react',) %} {% set title = _('Ask a Question') %} {% block breadcrumbs %}{% endblock %} {% set hide_signout_link = True %} {% block content %} {{ csrf() }}{# CSRF token for AJAX actions. #} <script type="application/json" class="data" name="products">{{ products_json|safe }}</script> <script type="application/json" class="data" name="topics">{{ topics_json|safe }}</script> <script type="application/json" class="data" name="images">{{ images_json|safe }}</script> <div class="apptarget"></div> {% endblock %} ## Instruction: Hide AAQ link in new flow ## Code After: {% extends "base.html" %} {% set styles = ('common', 'questions', 'questions.aaq.react',) %} {% set scripts = ('questions.aaq.react',) %} {% set title = _('Ask a Question') %} {% block breadcrumbs %}{% endblock %} {% set hide_aaq_link = True %} {% set hide_signout_link = True %} {% block content %} {{ csrf() }}{# CSRF token for AJAX actions. #} <script type="application/json" class="data" name="products">{{ products_json|safe }}</script> <script type="application/json" class="data" name="topics">{{ topics_json|safe }}</script> <script type="application/json" class="data" name="images">{{ images_json|safe }}</script> <div class="apptarget"></div> {% endblock %}
c986b1929c490de9a971833c9bd16b6d3672cc13
input/NumberInput.qml
input/NumberInput.qml
///number input BaseInput { property float max; ///< maximum number value property float min; ///< minimum number value property float step; ///< number step value property float value; ///< number value horizontalAlignment: BaseInput.AlignHCenter; width: 50; height: 25; type: "number"; onMinChanged: { this.element.dom.min = value; } onMaxChanged: { this.element.dom.max = value; } onStepChanged: { this.element.dom.step = value; } onValueChanged: { this.element.dom.value = value; } constructor: { this.element.on("input", function() { var currentValue = this.element.dom.value this.value = currentValue <= this.max && currentValue >= this.min ? currentValue : (currentValue > this.max ? this.max : this.min) }.bind(this)) } }
///number input BaseInput { property float max; ///< maximum number value property float min; ///< minimum number value property float step; ///< number step value property float value; ///< number value horizontalAlignment: BaseInput.AlignHCenter; width: 50; height: 25; type: "number"; onMinChanged: { this.element.dom.min = value; } onMaxChanged: { this.element.dom.max = value; } onStepChanged: { this.element.dom.step = value; } onValueChanged: { this.element.dom.value = value; } constructor: { this.element.on("input", function() { this.value = this.element.dom.value }.bind(this)) } }
Fix init value setting: remove useless min max checking
Fix init value setting: remove useless min max checking
QML
mit
pureqml/controls
qml
## Code Before: ///number input BaseInput { property float max; ///< maximum number value property float min; ///< minimum number value property float step; ///< number step value property float value; ///< number value horizontalAlignment: BaseInput.AlignHCenter; width: 50; height: 25; type: "number"; onMinChanged: { this.element.dom.min = value; } onMaxChanged: { this.element.dom.max = value; } onStepChanged: { this.element.dom.step = value; } onValueChanged: { this.element.dom.value = value; } constructor: { this.element.on("input", function() { var currentValue = this.element.dom.value this.value = currentValue <= this.max && currentValue >= this.min ? currentValue : (currentValue > this.max ? this.max : this.min) }.bind(this)) } } ## Instruction: Fix init value setting: remove useless min max checking ## Code After: ///number input BaseInput { property float max; ///< maximum number value property float min; ///< minimum number value property float step; ///< number step value property float value; ///< number value horizontalAlignment: BaseInput.AlignHCenter; width: 50; height: 25; type: "number"; onMinChanged: { this.element.dom.min = value; } onMaxChanged: { this.element.dom.max = value; } onStepChanged: { this.element.dom.step = value; } onValueChanged: { this.element.dom.value = value; } constructor: { this.element.on("input", function() { this.value = this.element.dom.value }.bind(this)) } }
2fd27002a8a0cc1ccb454f778742def116d287d6
.travis.yml
.travis.yml
sudo: false rvm: - 2.2.8 - 2.3.5 - 2.4.2 branches: only: - master cache: bundler bundler_args: --jobs 7 script: bundle exec rake
sudo: false rvm: - 2.2.9 - 2.3.6 - 2.4.3 - 2.5.0 branches: only: - master cache: bundler bundler_args: --jobs 7 script: bundle exec rake
Test on all the latest Ruby releases
Test on all the latest Ruby releases Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
YAML
apache-2.0
curiositycasualty/chef-sugar
yaml
## Code Before: sudo: false rvm: - 2.2.8 - 2.3.5 - 2.4.2 branches: only: - master cache: bundler bundler_args: --jobs 7 script: bundle exec rake ## Instruction: Test on all the latest Ruby releases Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io> ## Code After: sudo: false rvm: - 2.2.9 - 2.3.6 - 2.4.3 - 2.5.0 branches: only: - master cache: bundler bundler_args: --jobs 7 script: bundle exec rake
cb4cab186d70cca58eaf76f160c2d460c18cfc17
client/src/main/java/replicant/spy/DataLoaderMessageProcessEvent.java
client/src/main/java/replicant/spy/DataLoaderMessageProcessEvent.java
package replicant.spy; import arez.spy.SerializableEvent; import java.util.Map; import java.util.Objects; import javax.annotation.Nonnull; import org.realityforge.replicant.client.transport.DataLoadStatus; /** * Notification when an DataLoader generated an error processing a message from the datasource. */ public final class DataLoaderMessageProcessEvent implements SerializableEvent { @Nonnull private final Class<?> _systemType; @Nonnull private final DataLoadStatus _dataLoadStatus; public DataLoaderMessageProcessEvent( @Nonnull final Class<?> systemType, @Nonnull final DataLoadStatus dataLoadStatus ) { _systemType = Objects.requireNonNull( systemType ); _dataLoadStatus = Objects.requireNonNull( dataLoadStatus ); } @Nonnull public Class<?> getSystemType() { return _systemType; } @Nonnull public DataLoadStatus getDataLoadStatus() { return _dataLoadStatus; } /** * {@inheritDoc} */ @Override public void toMap( @Nonnull final Map<String, Object> map ) { map.put( "type", "DataLoader.MessageProcess" ); map.put( "systemType", getSystemType().getSimpleName() ); } }
package replicant.spy; import arez.spy.SerializableEvent; import java.util.Map; import java.util.Objects; import javax.annotation.Nonnull; import org.realityforge.replicant.client.transport.DataLoadStatus; /** * Notification when an DataLoader generated an error processing a message from the datasource. */ public final class DataLoaderMessageProcessEvent implements SerializableEvent { @Nonnull private final Class<?> _systemType; @Nonnull private final DataLoadStatus _dataLoadStatus; public DataLoaderMessageProcessEvent( @Nonnull final Class<?> systemType, @Nonnull final DataLoadStatus dataLoadStatus ) { _systemType = Objects.requireNonNull( systemType ); _dataLoadStatus = Objects.requireNonNull( dataLoadStatus ); } @Nonnull public Class<?> getSystemType() { return _systemType; } @Nonnull public DataLoadStatus getDataLoadStatus() { return _dataLoadStatus; } /** * {@inheritDoc} */ @Override public void toMap( @Nonnull final Map<String, Object> map ) { map.put( "type", "DataLoader.MessageProcess" ); map.put( "systemType", getSystemType().getSimpleName() ); final DataLoadStatus status = getDataLoadStatus(); map.put( "sequence", status.getSequence() ); map.put( "requestId", status.getRequestID() ); map.put( "channelAddCount", status.getChannelAddCount() ); map.put( "channelRemoveCount", status.getChannelRemoveCount() ); map.put( "channelUpdateCount", status.getChannelUpdateCount() ); map.put( "entityUpdateCount", status.getEntityUpdateCount() ); map.put( "entityRemoveCount", status.getEntityRemoveCount() ); map.put( "entityLinkCount", status.getEntityLinkCount() ); } }
Add aditional information to serialization
Add aditional information to serialization
Java
apache-2.0
realityforge/replicant,realityforge/replicant
java
## Code Before: package replicant.spy; import arez.spy.SerializableEvent; import java.util.Map; import java.util.Objects; import javax.annotation.Nonnull; import org.realityforge.replicant.client.transport.DataLoadStatus; /** * Notification when an DataLoader generated an error processing a message from the datasource. */ public final class DataLoaderMessageProcessEvent implements SerializableEvent { @Nonnull private final Class<?> _systemType; @Nonnull private final DataLoadStatus _dataLoadStatus; public DataLoaderMessageProcessEvent( @Nonnull final Class<?> systemType, @Nonnull final DataLoadStatus dataLoadStatus ) { _systemType = Objects.requireNonNull( systemType ); _dataLoadStatus = Objects.requireNonNull( dataLoadStatus ); } @Nonnull public Class<?> getSystemType() { return _systemType; } @Nonnull public DataLoadStatus getDataLoadStatus() { return _dataLoadStatus; } /** * {@inheritDoc} */ @Override public void toMap( @Nonnull final Map<String, Object> map ) { map.put( "type", "DataLoader.MessageProcess" ); map.put( "systemType", getSystemType().getSimpleName() ); } } ## Instruction: Add aditional information to serialization ## Code After: package replicant.spy; import arez.spy.SerializableEvent; import java.util.Map; import java.util.Objects; import javax.annotation.Nonnull; import org.realityforge.replicant.client.transport.DataLoadStatus; /** * Notification when an DataLoader generated an error processing a message from the datasource. */ public final class DataLoaderMessageProcessEvent implements SerializableEvent { @Nonnull private final Class<?> _systemType; @Nonnull private final DataLoadStatus _dataLoadStatus; public DataLoaderMessageProcessEvent( @Nonnull final Class<?> systemType, @Nonnull final DataLoadStatus dataLoadStatus ) { _systemType = Objects.requireNonNull( systemType ); _dataLoadStatus = Objects.requireNonNull( dataLoadStatus ); } @Nonnull public Class<?> getSystemType() { return _systemType; } @Nonnull public DataLoadStatus getDataLoadStatus() { return _dataLoadStatus; } /** * {@inheritDoc} */ @Override public void toMap( @Nonnull final Map<String, Object> map ) { map.put( "type", "DataLoader.MessageProcess" ); map.put( "systemType", getSystemType().getSimpleName() ); final DataLoadStatus status = getDataLoadStatus(); map.put( "sequence", status.getSequence() ); map.put( "requestId", status.getRequestID() ); map.put( "channelAddCount", status.getChannelAddCount() ); map.put( "channelRemoveCount", status.getChannelRemoveCount() ); map.put( "channelUpdateCount", status.getChannelUpdateCount() ); map.put( "entityUpdateCount", status.getEntityUpdateCount() ); map.put( "entityRemoveCount", status.getEntityRemoveCount() ); map.put( "entityLinkCount", status.getEntityLinkCount() ); } }
d4192ed9867831da48d3de0f9aee862f9068252e
README.md
README.md
Provide the ability to have an IBM Streams application easily interact with IoTF, either in Bluemix (Streaming Analytics Service) or on-premises (IBM Streams). ## Internet of Things Foundation The IBM [Internet of Things Foundation](https://internetofthings.ibmcloud.com/) (IoTF) service lets your IBM Streams applications communicate with and consume data collected by your connected devices, sensors, and gateways. IoTF provides a model around devices where devices produce events (for example, sensor data) and subscribe to commands (for example, control instructions, such as reduce maximum rpm for an engine). Streams applications can use this toolkit to connect to IoTF to provide real time analytics against all the events from potentially thousands of devices, including sending commands to specific devices based upon the analytics.
[http://ibmstreams.github.io/streamsx.iotf/](User Documentation) ## Connectivity with IBM Internet of Things Foundation Provide the ability to have an IBM Streams application easily interact with IoTF, either in Bluemix (Streaming Analytics Service) or on-premises (IBM Streams). ## Internet of Things Foundation The IBM [Internet of Things Foundation](https://internetofthings.ibmcloud.com/) (IoTF) service lets your IBM Streams applications communicate with and consume data collected by your connected devices, sensors, and gateways. IoTF provides a model around devices where devices produce events (for example, sensor data) and subscribe to commands (for example, control instructions, such as reduce maximum rpm for an engine). Streams applications can use this toolkit to connect to IoTF to provide real time analytics against all the events from potentially thousands of devices, including sending commands to specific devices based upon the analytics.
Add link to github pages
Add link to github pages
Markdown
apache-2.0
ddebrunner/streamsx.iot,ddebrunner/streamsx.iot
markdown
## Code Before: Provide the ability to have an IBM Streams application easily interact with IoTF, either in Bluemix (Streaming Analytics Service) or on-premises (IBM Streams). ## Internet of Things Foundation The IBM [Internet of Things Foundation](https://internetofthings.ibmcloud.com/) (IoTF) service lets your IBM Streams applications communicate with and consume data collected by your connected devices, sensors, and gateways. IoTF provides a model around devices where devices produce events (for example, sensor data) and subscribe to commands (for example, control instructions, such as reduce maximum rpm for an engine). Streams applications can use this toolkit to connect to IoTF to provide real time analytics against all the events from potentially thousands of devices, including sending commands to specific devices based upon the analytics. ## Instruction: Add link to github pages ## Code After: [http://ibmstreams.github.io/streamsx.iotf/](User Documentation) ## Connectivity with IBM Internet of Things Foundation Provide the ability to have an IBM Streams application easily interact with IoTF, either in Bluemix (Streaming Analytics Service) or on-premises (IBM Streams). ## Internet of Things Foundation The IBM [Internet of Things Foundation](https://internetofthings.ibmcloud.com/) (IoTF) service lets your IBM Streams applications communicate with and consume data collected by your connected devices, sensors, and gateways. IoTF provides a model around devices where devices produce events (for example, sensor data) and subscribe to commands (for example, control instructions, such as reduce maximum rpm for an engine). Streams applications can use this toolkit to connect to IoTF to provide real time analytics against all the events from potentially thousands of devices, including sending commands to specific devices based upon the analytics.
0c665c9998bf7d7619184d073cdf832b30a1d8af
test/special/subLanguages.js
test/special/subLanguages.js
'use strict'; var fs = require('fs'); var utility = require('../utility'); describe('sub-languages', function() { before(function() { this.block = document.querySelector('#sublanguages'); }); it('should highlight XML with PHP and JavaScript', function() { var filename = utility.buildPath('expect', 'sublanguages.txt'), expected = fs.readFileSync(filename, 'utf-8'), actual = this.block.innerHTML; actual.should.equal(expected); }); });
'use strict'; var fs = require('fs'); var utility = require('../utility'); describe('sub-languages', function() { before(function() { this.block = document.querySelector('#sublanguages'); }); it('should highlight XML with PHP and JavaScript', function(done) { var filename = utility.buildPath('expect', 'sublanguages.txt'), actual = this.block.innerHTML; fs.readFile(filename, 'utf-8', utility.handleExpectedFile(actual, done)); }); });
Change sub languages to asynchronous testing
Change sub languages to asynchronous testing
JavaScript
bsd-3-clause
SibuStephen/highlight.js,isagalaev/highlight.js,0x7fffffff/highlight.js,yxxme/highlight.js,tenbits/highlight.js,aurusov/highlight.js,tenbits/highlight.js,jean/highlight.js,STRML/highlight.js,snegovick/highlight.js,snegovick/highlight.js,MakeNowJust/highlight.js,tenbits/highlight.js,weiyibin/highlight.js,martijnrusschen/highlight.js,Sannis/highlight.js,SibuStephen/highlight.js,krig/highlight.js,alex-zhang/highlight.js,isagalaev/highlight.js,devmario/highlight.js,Ankirama/highlight.js,alex-zhang/highlight.js,ysbaddaden/highlight.js,brennced/highlight.js,christoffer/highlight.js,teambition/highlight.js,robconery/highlight.js,christoffer/highlight.js,ysbaddaden/highlight.js,zachaysan/highlight.js,SibuStephen/highlight.js,sourrust/highlight.js,aristidesstaffieri/highlight.js,dublebuble/highlight.js,abhishekgahlot/highlight.js,CausalityLtd/highlight.js,1st1/highlight.js,palmin/highlight.js,daimor/highlight.js,kba/highlight.js,bluepichu/highlight.js,Delermando/highlight.js,VoldemarLeGrand/highlight.js,robconery/highlight.js,palmin/highlight.js,yxxme/highlight.js,liang42hao/highlight.js,Amrit01/highlight.js,kevinrodbe/highlight.js,ehornbostel/highlight.js,zachaysan/highlight.js,ponylang/highlight.js,Amrit01/highlight.js,CausalityLtd/highlight.js,Ajunboys/highlight.js,liang42hao/highlight.js,highlightjs/highlight.js,Ajunboys/highlight.js,jean/highlight.js,0x7fffffff/highlight.js,kba/highlight.js,teambition/highlight.js,Sannis/highlight.js,aurusov/highlight.js,ilovezy/highlight.js,lizhil/highlight.js,dublebuble/highlight.js,axter/highlight.js,J2TeaM/highlight.js,VoldemarLeGrand/highlight.js,martijnrusschen/highlight.js,alex-zhang/highlight.js,lizhil/highlight.js,delebash/highlight.js,taoger/highlight.js,kevinrodbe/highlight.js,adam-lynch/highlight.js,kayyyy/highlight.js,xing-zhi/highlight.js,carlokok/highlight.js,VoldemarLeGrand/highlight.js,ehornbostel/highlight.js,ilovezy/highlight.js,adjohnson916/highlight.js,dYale/highlight.js,dx285/highlight.js,lizhil/highlight.js,sourrust/highlight.js,brennced/highlight.js,adjohnson916/highlight.js,bluepichu/highlight.js,abhishekgahlot/highlight.js,dx285/highlight.js,StanislawSwierc/highlight.js,aurusov/highlight.js,0x7fffffff/highlight.js,delebash/highlight.js,highlightjs/highlight.js,adam-lynch/highlight.js,axter/highlight.js,kayyyy/highlight.js,J2TeaM/highlight.js,Ankirama/highlight.js,delebash/highlight.js,MakeNowJust/highlight.js,brennced/highlight.js,devmario/highlight.js,taoger/highlight.js,liang42hao/highlight.js,ysbaddaden/highlight.js,ponylang/highlight.js,adjohnson916/highlight.js,Sannis/highlight.js,kayyyy/highlight.js,snegovick/highlight.js,aristidesstaffieri/highlight.js,lead-auth/highlight.js,christoffer/highlight.js,highlightjs/highlight.js,bluepichu/highlight.js,cicorias/highlight.js,dx285/highlight.js,xing-zhi/highlight.js,robconery/highlight.js,xing-zhi/highlight.js,axter/highlight.js,dbkaplun/highlight.js,palmin/highlight.js,Delermando/highlight.js,carlokok/highlight.js,ponylang/highlight.js,yxxme/highlight.js,aristidesstaffieri/highlight.js,devmario/highlight.js,jean/highlight.js,abhishekgahlot/highlight.js,adam-lynch/highlight.js,cicorias/highlight.js,weiyibin/highlight.js,dbkaplun/highlight.js,Ajunboys/highlight.js,sourrust/highlight.js,weiyibin/highlight.js,daimor/highlight.js,teambition/highlight.js,CausalityLtd/highlight.js,dbkaplun/highlight.js,Delermando/highlight.js,kba/highlight.js,Amrit01/highlight.js,carlokok/highlight.js,MakeNowJust/highlight.js,taoger/highlight.js,1st1/highlight.js,dYale/highlight.js,kevinrodbe/highlight.js,carlokok/highlight.js,daimor/highlight.js,cicorias/highlight.js,krig/highlight.js,J2TeaM/highlight.js,StanislawSwierc/highlight.js,dYale/highlight.js,Ankirama/highlight.js,1st1/highlight.js,ilovezy/highlight.js,krig/highlight.js,martijnrusschen/highlight.js,ehornbostel/highlight.js,dublebuble/highlight.js,highlightjs/highlight.js,zachaysan/highlight.js,STRML/highlight.js,STRML/highlight.js
javascript
## Code Before: 'use strict'; var fs = require('fs'); var utility = require('../utility'); describe('sub-languages', function() { before(function() { this.block = document.querySelector('#sublanguages'); }); it('should highlight XML with PHP and JavaScript', function() { var filename = utility.buildPath('expect', 'sublanguages.txt'), expected = fs.readFileSync(filename, 'utf-8'), actual = this.block.innerHTML; actual.should.equal(expected); }); }); ## Instruction: Change sub languages to asynchronous testing ## Code After: 'use strict'; var fs = require('fs'); var utility = require('../utility'); describe('sub-languages', function() { before(function() { this.block = document.querySelector('#sublanguages'); }); it('should highlight XML with PHP and JavaScript', function(done) { var filename = utility.buildPath('expect', 'sublanguages.txt'), actual = this.block.innerHTML; fs.readFile(filename, 'utf-8', utility.handleExpectedFile(actual, done)); }); });
b44b0f68a2dd00df1ec074cf39a66ce81cd0dae2
nowplaying.py
nowplaying.py
from termcolor import colored from appscript import * from track import Track def main(): print(get_song()) def get_song(): itunes_open = bool(app('System Events').processes[its.name == 'iTunes'].count()) if itunes_open: # check if application open itunes = app('iTunes') if itunes.player_state.get() == k.playing: # check if song playing track = Track(itunes.current_track.get()) return track if __name__ == '__main__': main()
from termcolor import colored from appscript import * from track import Track def main(): print(get_song()) def get_song(): itunes_open = bool(app('System Events').processes[its.name == 'iTunes'].count()) if itunes_open: # check if application open itunes = app('iTunes') if itunes.player_state.get() == k.playing: # check if song playing track = Track(itunes.current_track.get()) return track else: return colored('No song currently playing.', 'red') else: return colored('iTunes not open.', 'red') if __name__ == '__main__': main()
Update error output for app not open/song not playing
Update error output for app not open/song not playing
Python
mit
kshvmdn/nowplaying
python
## Code Before: from termcolor import colored from appscript import * from track import Track def main(): print(get_song()) def get_song(): itunes_open = bool(app('System Events').processes[its.name == 'iTunes'].count()) if itunes_open: # check if application open itunes = app('iTunes') if itunes.player_state.get() == k.playing: # check if song playing track = Track(itunes.current_track.get()) return track if __name__ == '__main__': main() ## Instruction: Update error output for app not open/song not playing ## Code After: from termcolor import colored from appscript import * from track import Track def main(): print(get_song()) def get_song(): itunes_open = bool(app('System Events').processes[its.name == 'iTunes'].count()) if itunes_open: # check if application open itunes = app('iTunes') if itunes.player_state.get() == k.playing: # check if song playing track = Track(itunes.current_track.get()) return track else: return colored('No song currently playing.', 'red') else: return colored('iTunes not open.', 'red') if __name__ == '__main__': main()
2e4f19423113465f3b5b71509fd51b8826a163ad
requirements.txt
requirements.txt
configparser>=3.5.0 coverage eth_abi>=1.0.0 eth-account>=0.1.0a2 ethereum>=2.3.2 eth-hash>=0.1.0 eth-keyfile>=0.5.1 eth-keys>=0.2.0b3 eth-rlp>=0.1.0 eth-tester>=0.1.0b21 eth-utils>=1.0.1 jinja2>=2.9 mock persistent>=4.2.0 plyvel py-flags py-solc pytest>=3.6.0 pytest-cov pytest_mock requests rlp>=1.0.1 transaction>=2.2.1 z3-solver>=4.5
configparser>=3.5.0 coverage eth_abi>=1.0.0 eth-account>=0.1.0a2 ethereum>=2.3.2 eth-hash>=0.1.0 eth-keyfile>=0.5.1 eth-keys>=0.2.0b3 eth-rlp>=0.1.0 eth-tester>=0.1.0b21 eth-typing<2.0.0,>=1.3.0 eth-utils>=1.0.1 jinja2>=2.9 mock persistent>=4.2.0 plyvel py-flags py-solc pytest>=3.6.0 pytest-cov pytest_mock requests rlp>=1.0.1 transaction>=2.2.1 z3-solver>=4.5
Set eth-typing version number as required by eth-utils
Set eth-typing version number as required by eth-utils
Text
mit
b-mueller/mythril,b-mueller/mythril,b-mueller/mythril,b-mueller/mythril
text
## Code Before: configparser>=3.5.0 coverage eth_abi>=1.0.0 eth-account>=0.1.0a2 ethereum>=2.3.2 eth-hash>=0.1.0 eth-keyfile>=0.5.1 eth-keys>=0.2.0b3 eth-rlp>=0.1.0 eth-tester>=0.1.0b21 eth-utils>=1.0.1 jinja2>=2.9 mock persistent>=4.2.0 plyvel py-flags py-solc pytest>=3.6.0 pytest-cov pytest_mock requests rlp>=1.0.1 transaction>=2.2.1 z3-solver>=4.5 ## Instruction: Set eth-typing version number as required by eth-utils ## Code After: configparser>=3.5.0 coverage eth_abi>=1.0.0 eth-account>=0.1.0a2 ethereum>=2.3.2 eth-hash>=0.1.0 eth-keyfile>=0.5.1 eth-keys>=0.2.0b3 eth-rlp>=0.1.0 eth-tester>=0.1.0b21 eth-typing<2.0.0,>=1.3.0 eth-utils>=1.0.1 jinja2>=2.9 mock persistent>=4.2.0 plyvel py-flags py-solc pytest>=3.6.0 pytest-cov pytest_mock requests rlp>=1.0.1 transaction>=2.2.1 z3-solver>=4.5
11bd5f9466b50389d28a665772cbb1b1b28d086e
cpp/directory_entry.cc
cpp/directory_entry.cc
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ppapi/cpp/directory_entry.h" #include "ppapi/cpp/module.h" namespace pp { DirectoryEntry::DirectoryEntry() { memset(&data_, 0, sizeof(data_)); } DirectoryEntry::DirectoryEntry(const DirectoryEntry& other) { data_.file_ref = other.data_.file_ref; data_.file_type = other.data_.file_type; if (data_.file_ref) Module::Get()->core().AddRefResource(data_.file_ref); } DirectoryEntry::~DirectoryEntry() { if (data_.file_ref) Module::Get()->core().ReleaseResource(data_.file_ref); } DirectoryEntry& DirectoryEntry::operator=(const DirectoryEntry& other) { DirectoryEntry copy(other); swap(copy); return *this; } void DirectoryEntry::swap(DirectoryEntry& other) { std::swap(data_.file_ref, other.data_.file_ref); std::swap(data_.file_type, other.data_.file_type); } } // namespace pp
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ppapi/cpp/directory_entry.h" #include <string.h> #include "ppapi/cpp/module.h" namespace pp { DirectoryEntry::DirectoryEntry() { memset(&data_, 0, sizeof(data_)); } DirectoryEntry::DirectoryEntry(const DirectoryEntry& other) { data_.file_ref = other.data_.file_ref; data_.file_type = other.data_.file_type; if (data_.file_ref) Module::Get()->core().AddRefResource(data_.file_ref); } DirectoryEntry::~DirectoryEntry() { if (data_.file_ref) Module::Get()->core().ReleaseResource(data_.file_ref); } DirectoryEntry& DirectoryEntry::operator=(const DirectoryEntry& other) { DirectoryEntry copy(other); swap(copy); return *this; } void DirectoryEntry::swap(DirectoryEntry& other) { std::swap(data_.file_ref, other.data_.file_ref); std::swap(data_.file_type, other.data_.file_type); } } // namespace pp
Fix the linux build by adding a string.h include.
Fix the linux build by adding a string.h include. TBR=brettw BUG=none TEST=none Review URL: http://codereview.chromium.org/2836024
C++
bsd-3-clause
tonyjoule/ppapi,rise-worlds/ppapi,huqingyu/ppapi,siweilvxing/ppapi,ruder/ppapi,huochetou999/ppapi,xinghaizhou/ppapi,xinghaizhou/ppapi,ruder/ppapi,chenfeng8742/ppapi,YachaoLiu/ppapi,qwop/ppapi,thdtjsdn/ppapi,huochetou999/ppapi,phisixersai/ppapi,stefanie924/ppapi,JustRight/ppapi,stefanie924/ppapi,gwobay/ppapi,rise-worlds/ppapi,c1soju96/ppapi,ruder/ppapi,lag945/ppapi,c1soju96/ppapi,HAfsari/ppapi,qwop/ppapi,dingdayong/ppapi,chenfeng8742/ppapi,xuesongzhu/ppapi,thdtjsdn/ppapi,dingdayong/ppapi,gwobay/ppapi,siweilvxing/ppapi,YachaoLiu/ppapi,c1soju96/ppapi,HAfsari/ppapi,nanox/ppapi,whitewolfm/ppapi,JustRight/ppapi,stefanie924/ppapi,CharlesHuimin/ppapi,tiaolong/ppapi,xuesongzhu/ppapi,nanox/ppapi,phisixersai/ppapi,xuesongzhu/ppapi,xiaozihui/ppapi,HAfsari/ppapi,chenfeng8742/ppapi,fubaydullaev/ppapi,lag945/ppapi,Xelemsta/ppapi,tonyjoule/ppapi,tiaolong/ppapi,phisixersai/ppapi,xinghaizhou/ppapi,xuesongzhu/ppapi,huochetou999/ppapi,HAfsari/ppapi,phisixersai/ppapi,lag945/ppapi,huqingyu/ppapi,CharlesHuimin/ppapi,Xelemsta/ppapi,JustRight/ppapi,lag945/ppapi,YachaoLiu/ppapi,thdtjsdn/ppapi,tonyjoule/ppapi,thdtjsdn/ppapi,fubaydullaev/ppapi,fubaydullaev/ppapi,tonyjoule/ppapi,gwobay/ppapi,siweilvxing/ppapi,c1soju96/ppapi,cacpssl/ppapi,fubaydullaev/ppapi,siweilvxing/ppapi,gwobay/ppapi,huochetou999/ppapi,dingdayong/ppapi,ruder/ppapi,lag945/ppapi,rise-worlds/ppapi,gwobay/ppapi,xiaozihui/ppapi,whitewolfm/ppapi,xiaozihui/ppapi,cacpssl/ppapi,fubaydullaev/ppapi,tiaolong/ppapi,cacpssl/ppapi,CharlesHuimin/ppapi,huochetou999/ppapi,YachaoLiu/ppapi,huqingyu/ppapi,whitewolfm/ppapi,YachaoLiu/ppapi,qwop/ppapi,dralves/ppapi,JustRight/ppapi,JustRight/ppapi,dralves/ppapi,thdtjsdn/ppapi,siweilvxing/ppapi,CharlesHuimin/ppapi,rise-worlds/ppapi,xiaozihui/ppapi,whitewolfm/ppapi,xinghaizhou/ppapi,dralves/ppapi,dingdayong/ppapi,huqingyu/ppapi,nanox/ppapi,ruder/ppapi,chenfeng8742/ppapi,xiaozihui/ppapi,stefanie924/ppapi,Xelemsta/ppapi,qwop/ppapi,HAfsari/ppapi,nanox/ppapi,qwop/ppapi,tiaolong/ppapi,xuesongzhu/ppapi,rise-worlds/ppapi,c1soju96/ppapi,xinghaizhou/ppapi,dralves/ppapi,dingdayong/ppapi,tiaolong/ppapi,whitewolfm/ppapi,tonyjoule/ppapi,stefanie924/ppapi,Xelemsta/ppapi,Xelemsta/ppapi,huqingyu/ppapi,cacpssl/ppapi,CharlesHuimin/ppapi,cacpssl/ppapi,dralves/ppapi,phisixersai/ppapi,nanox/ppapi,chenfeng8742/ppapi
c++
## Code Before: // Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ppapi/cpp/directory_entry.h" #include "ppapi/cpp/module.h" namespace pp { DirectoryEntry::DirectoryEntry() { memset(&data_, 0, sizeof(data_)); } DirectoryEntry::DirectoryEntry(const DirectoryEntry& other) { data_.file_ref = other.data_.file_ref; data_.file_type = other.data_.file_type; if (data_.file_ref) Module::Get()->core().AddRefResource(data_.file_ref); } DirectoryEntry::~DirectoryEntry() { if (data_.file_ref) Module::Get()->core().ReleaseResource(data_.file_ref); } DirectoryEntry& DirectoryEntry::operator=(const DirectoryEntry& other) { DirectoryEntry copy(other); swap(copy); return *this; } void DirectoryEntry::swap(DirectoryEntry& other) { std::swap(data_.file_ref, other.data_.file_ref); std::swap(data_.file_type, other.data_.file_type); } } // namespace pp ## Instruction: Fix the linux build by adding a string.h include. TBR=brettw BUG=none TEST=none Review URL: http://codereview.chromium.org/2836024 ## Code After: // Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ppapi/cpp/directory_entry.h" #include <string.h> #include "ppapi/cpp/module.h" namespace pp { DirectoryEntry::DirectoryEntry() { memset(&data_, 0, sizeof(data_)); } DirectoryEntry::DirectoryEntry(const DirectoryEntry& other) { data_.file_ref = other.data_.file_ref; data_.file_type = other.data_.file_type; if (data_.file_ref) Module::Get()->core().AddRefResource(data_.file_ref); } DirectoryEntry::~DirectoryEntry() { if (data_.file_ref) Module::Get()->core().ReleaseResource(data_.file_ref); } DirectoryEntry& DirectoryEntry::operator=(const DirectoryEntry& other) { DirectoryEntry copy(other); swap(copy); return *this; } void DirectoryEntry::swap(DirectoryEntry& other) { std::swap(data_.file_ref, other.data_.file_ref); std::swap(data_.file_type, other.data_.file_type); } } // namespace pp
ae35255f125951281a9c95be1544fa3741d01877
projections/projection.css
projections/projection.css
body{ color: #ffffff; text-shadow: -1px -1px 0 #A6F031, 1px -1px 0 #A6F031, -1px 1px 0 #A6F031, 1px 1px 0 #A6F031;; } .view{ border: 2px solid black; background: rgba(9, 150, 42, 0.98); position: center; text-align: center; max-width: 100%; padding: auto; } .speakers-review{ margin-top: 22%; } .speakers-questions, .chosen-questions{ margin-bottom: 22%; margin-top:22%; } .pledges{ margin-bottom: 22%; } .rate{ overflow-wrap: all; }
body{ color: #ffffff; text-shadow: -1px -1px 0 #A6F031, 1px -1px 0 #A6F031, -1px 1px 0 #A6F031, 1px 1px 0 #A6F031;; } .view{ border: 2px solid black; background: rgba(9, 150, 42, 0.98); position: center; text-align: center; max-width: 100%; padding: auto; } .speakers-review{ margin-top: 22%; } .speakers-questions{ margin-bottom: 22%; margin-top:22%; } .pledges{ margin-bottom: 22%; } .rate{ overflow-wrap: all; }
Revert CSS changes to avoid conflict
Revert CSS changes to avoid conflict
CSS
mit
NHS-App/Speak-Up,NHS-App/Speak-Up
css
## Code Before: body{ color: #ffffff; text-shadow: -1px -1px 0 #A6F031, 1px -1px 0 #A6F031, -1px 1px 0 #A6F031, 1px 1px 0 #A6F031;; } .view{ border: 2px solid black; background: rgba(9, 150, 42, 0.98); position: center; text-align: center; max-width: 100%; padding: auto; } .speakers-review{ margin-top: 22%; } .speakers-questions, .chosen-questions{ margin-bottom: 22%; margin-top:22%; } .pledges{ margin-bottom: 22%; } .rate{ overflow-wrap: all; } ## Instruction: Revert CSS changes to avoid conflict ## Code After: body{ color: #ffffff; text-shadow: -1px -1px 0 #A6F031, 1px -1px 0 #A6F031, -1px 1px 0 #A6F031, 1px 1px 0 #A6F031;; } .view{ border: 2px solid black; background: rgba(9, 150, 42, 0.98); position: center; text-align: center; max-width: 100%; padding: auto; } .speakers-review{ margin-top: 22%; } .speakers-questions{ margin-bottom: 22%; margin-top:22%; } .pledges{ margin-bottom: 22%; } .rate{ overflow-wrap: all; }
bb9f83722ca678129ffafeacac9d8efbd238fcf8
app/views/georgia/pages/_new.html.erb
app/views/georgia/pages/_new.html.erb
<div id='new_page' class="modal hide fade"> <%= simple_form_for @page, as: :page, url: url_for( controller: controller_name, action: nil), remote: true, html: {class: 'form-vertical'} do |f| %> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <h3>New <%= instance_name.titleize %></h3> </div> <div class="modal-body"> <%= f.simple_fields_for :contents do |c| %> <%= c.input :locale, as: :hidden %> <%= c.input :title, autofocus: true %> <% end -%> </div> <div class="modal-footer"> <%= link_to 'Cancel', '#', class: 'btn', data: {dismiss: 'modal'} %> <%= f.submit 'Create', class: 'btn btn-primary' %> </div> <% end -%> </div>
<div id='new_page' class="modal hide fade"> <%= simple_form_for @page, as: :page, remote: true, html: {class: 'form-vertical'} do |f| %> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <h3>New <%= instance_name.titleize %></h3> </div> <div class="modal-body"> <%= f.simple_fields_for :contents do |c| %> <%= c.input :locale, as: :hidden %> <%= c.input :title, autofocus: true %> <% end -%> </div> <div class="modal-footer"> <%= link_to 'Cancel', '#', class: 'btn', data: {dismiss: 'modal'} %> <%= f.submit 'Create', class: 'btn btn-primary' %> </div> <% end -%> </div>
Fix new page form url issue
Fix new page form url issue
HTML+ERB
mit
georgia-cms/georgia,georgia-cms/georgia,georgia-cms/georgia
html+erb
## Code Before: <div id='new_page' class="modal hide fade"> <%= simple_form_for @page, as: :page, url: url_for( controller: controller_name, action: nil), remote: true, html: {class: 'form-vertical'} do |f| %> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <h3>New <%= instance_name.titleize %></h3> </div> <div class="modal-body"> <%= f.simple_fields_for :contents do |c| %> <%= c.input :locale, as: :hidden %> <%= c.input :title, autofocus: true %> <% end -%> </div> <div class="modal-footer"> <%= link_to 'Cancel', '#', class: 'btn', data: {dismiss: 'modal'} %> <%= f.submit 'Create', class: 'btn btn-primary' %> </div> <% end -%> </div> ## Instruction: Fix new page form url issue ## Code After: <div id='new_page' class="modal hide fade"> <%= simple_form_for @page, as: :page, remote: true, html: {class: 'form-vertical'} do |f| %> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <h3>New <%= instance_name.titleize %></h3> </div> <div class="modal-body"> <%= f.simple_fields_for :contents do |c| %> <%= c.input :locale, as: :hidden %> <%= c.input :title, autofocus: true %> <% end -%> </div> <div class="modal-footer"> <%= link_to 'Cancel', '#', class: 'btn', data: {dismiss: 'modal'} %> <%= f.submit 'Create', class: 'btn btn-primary' %> </div> <% end -%> </div>
7f5002a4a4c7534913dfc456604e2c1cb838cc84
spec/models/user_spec.rb
spec/models/user_spec.rb
require 'rails_helper' RSpec.describe User, type: :model do pending "add some examples to (or delete) #{__FILE__}" end
require 'rails_helper' RSpec.describe User, type: :model do it "is invalid without name" do name = User.new(name: "mech") expect(name).to be_valid end it "is invalid without email" do email = User.new(name: "mech@gmail.com") expect(email).to be_valid end end
Add test to user spec
Add test to user spec
Ruby
mit
ishan-amura/pull-it-together,ishan-amura/pull-it-together,ishan-amura/pull-it-together
ruby
## Code Before: require 'rails_helper' RSpec.describe User, type: :model do pending "add some examples to (or delete) #{__FILE__}" end ## Instruction: Add test to user spec ## Code After: require 'rails_helper' RSpec.describe User, type: :model do it "is invalid without name" do name = User.new(name: "mech") expect(name).to be_valid end it "is invalid without email" do email = User.new(name: "mech@gmail.com") expect(email).to be_valid end end