commit
stringlengths
40
40
old_file
stringlengths
4
184
new_file
stringlengths
4
184
old_contents
stringlengths
1
3.6k
new_contents
stringlengths
5
3.38k
subject
stringlengths
15
778
message
stringlengths
16
6.74k
lang
stringclasses
201 values
license
stringclasses
13 values
repos
stringlengths
6
116k
config
stringclasses
201 values
content
stringlengths
137
7.24k
diff
stringlengths
26
5.55k
diff_length
int64
1
123
relative_diff_length
float64
0.01
89
n_lines_added
int64
0
108
n_lines_deleted
int64
0
106
08dd9742287fb76efaef689cb139ff5e87ca3530
src/Components/Card/Card.js
src/Components/Card/Card.js
import React from 'react'; import PropTypes from 'prop-types'; import Button from '../Button/Button'; const Card = ( { nounObject } ) => { const mappedNounObject = Object.keys( nounObject ).map( key => { return ( <dt className="card-definition-term"> {key} </dt> <dd className="card-definition-definition"> {nounObject[key]} </dd> ) }); return ( <div className="card"> <section className="card-header"> <h3 className="card-title">{nounObject[name]}</h3> <Button /> </section> <dl className="card-definition-list"> {mappedNounObject} </dl> </div> ) } export default Card;
import React from 'react'; import PropTypes from 'prop-types'; import Button from '../Button/Button'; const Card = ( { nounObject } ) => { const mappedNounObject = Object.keys( nounObject ).map( key => { return ([ <dt className="card-definition-term">{key}</dt>, <dd>{nounObject[key]}</dd> ]) }); return ( <div className="card"> <section className="card-header"> <h3 className="card-title">{nounObject[name]}</h3> <Button /> </section> <dl className="card-definition-list"> {mappedNounObject} </dl> </div> ) } export default Card;
Return an array of rather than div
Return an array of rather than div
JavaScript
mit
AdamMescher/SWAPIbox,AdamMescher/SWAPIbox
javascript
## Code Before: import React from 'react'; import PropTypes from 'prop-types'; import Button from '../Button/Button'; const Card = ( { nounObject } ) => { const mappedNounObject = Object.keys( nounObject ).map( key => { return ( <dt className="card-definition-term"> {key} </dt> <dd className="card-definition-definition"> {nounObject[key]} </dd> ) }); return ( <div className="card"> <section className="card-header"> <h3 className="card-title">{nounObject[name]}</h3> <Button /> </section> <dl className="card-definition-list"> {mappedNounObject} </dl> </div> ) } export default Card; ## Instruction: Return an array of rather than div ## Code After: import React from 'react'; import PropTypes from 'prop-types'; import Button from '../Button/Button'; const Card = ( { nounObject } ) => { const mappedNounObject = Object.keys( nounObject ).map( key => { return ([ <dt className="card-definition-term">{key}</dt>, <dd>{nounObject[key]}</dd> ]) }); return ( <div className="card"> <section className="card-header"> <h3 className="card-title">{nounObject[name]}</h3> <Button /> </section> <dl className="card-definition-list"> {mappedNounObject} </dl> </div> ) } export default Card;
import React from 'react'; import PropTypes from 'prop-types'; import Button from '../Button/Button'; const Card = ( { nounObject } ) => { const mappedNounObject = Object.keys( nounObject ).map( key => { - return ( + return ([ ? + - <dt className="card-definition-term"> + <dt className="card-definition-term">{key}</dt>, ? ++ +++++++++++ - {key} - </dt> - <dd className="card-definition-definition"> - {nounObject[key]} + <dd>{nounObject[key]}</dd> ? ++++ +++++ - </dd> - ) + ]) ? + }); return ( <div className="card"> <section className="card-header"> <h3 className="card-title">{nounObject[name]}</h3> <Button /> </section> <dl className="card-definition-list"> {mappedNounObject} </dl> </div> ) } export default Card;
12
0.4
4
8
4dfc510c2330481d17394531188ac52d60d01644
CHANGELOG.md
CHANGELOG.md
- Created a changelog ### Changed - Excluded some files from npm package - Updated some package metadata Changes in versions 2.0.0 and below can be found in [Helmet's changelog](https://github.com/helmetjs/helmet/blob/master/CHANGELOG.md).
- Added TypeScript type definitions. See [#17](https://github.com/helmetjs/nocache/issues/17) and [helmetjs/helmet#188](https://github.com/helmetjs/helmet/issues/188) - Created a changelog ### Changed - Excluded some files from npm package - Updated some package metadata Changes in versions 2.0.0 and below can be found in [Helmet's changelog](https://github.com/helmetjs/helmet/blob/master/CHANGELOG.md).
Add entry about TypeScript to changelog
Add entry about TypeScript to changelog
Markdown
mit
helmetjs/nocache
markdown
## Code Before: - Created a changelog ### Changed - Excluded some files from npm package - Updated some package metadata Changes in versions 2.0.0 and below can be found in [Helmet's changelog](https://github.com/helmetjs/helmet/blob/master/CHANGELOG.md). ## Instruction: Add entry about TypeScript to changelog ## Code After: - Added TypeScript type definitions. See [#17](https://github.com/helmetjs/nocache/issues/17) and [helmetjs/helmet#188](https://github.com/helmetjs/helmet/issues/188) - Created a changelog ### Changed - Excluded some files from npm package - Updated some package metadata Changes in versions 2.0.0 and below can be found in [Helmet's changelog](https://github.com/helmetjs/helmet/blob/master/CHANGELOG.md).
+ - Added TypeScript type definitions. See [#17](https://github.com/helmetjs/nocache/issues/17) and [helmetjs/helmet#188](https://github.com/helmetjs/helmet/issues/188) - Created a changelog ### Changed - Excluded some files from npm package - Updated some package metadata Changes in versions 2.0.0 and below can be found in [Helmet's changelog](https://github.com/helmetjs/helmet/blob/master/CHANGELOG.md).
1
0.142857
1
0
9c89b403737203104685e63a4d39f716a2a6eb0e
resources/assets/components/PagingButtons/index.js
resources/assets/components/PagingButtons/index.js
import React from 'react'; import './paging-buttons.scss'; class PagingButtons extends React.Component { render() { const prev = this.props.prev; const next = this.props.next; return ( <div className="container__block"> <a href={prev} onClick={e => this.props.onPaginate(prev, e)} disabled={prev}>{prev ? "< previous" : null}</a> <div className="next-page"> <a href={next} onClick={e => this.props.onPaginate(next, e)}>{next ? "next >" : null}</a> </div> </div> ) } } export default PagingButtons;
import React from 'react'; import PropTypes from 'prop-types'; import './paging-buttons.scss'; class PagingButtons extends React.Component { render() { const prev = this.props.prev; const next = this.props.next; return ( <div className="container__block"> <a href={prev} onClick={e => this.props.onPaginate(prev, e)} disabled={prev}>{prev ? "< previous" : null}</a> <div className="next-page"> <a href={next} onClick={e => this.props.onPaginate(next, e)}>{next ? "next >" : null}</a> </div> </div> ) } } PagingButtons.propTypes = { next: PropTypes.string.isRequired, onPaginate: PropTypes.func.isRequired, prev: PropTypes.string.isRequired, }; export default PagingButtons;
Add proptype validation to PagingButtons component
Add proptype validation to PagingButtons component
JavaScript
mit
DoSomething/rogue,DoSomething/rogue,DoSomething/rogue
javascript
## Code Before: import React from 'react'; import './paging-buttons.scss'; class PagingButtons extends React.Component { render() { const prev = this.props.prev; const next = this.props.next; return ( <div className="container__block"> <a href={prev} onClick={e => this.props.onPaginate(prev, e)} disabled={prev}>{prev ? "< previous" : null}</a> <div className="next-page"> <a href={next} onClick={e => this.props.onPaginate(next, e)}>{next ? "next >" : null}</a> </div> </div> ) } } export default PagingButtons; ## Instruction: Add proptype validation to PagingButtons component ## Code After: import React from 'react'; import PropTypes from 'prop-types'; import './paging-buttons.scss'; class PagingButtons extends React.Component { render() { const prev = this.props.prev; const next = this.props.next; return ( <div className="container__block"> <a href={prev} onClick={e => this.props.onPaginate(prev, e)} disabled={prev}>{prev ? "< previous" : null}</a> <div className="next-page"> <a href={next} onClick={e => this.props.onPaginate(next, e)}>{next ? "next >" : null}</a> </div> </div> ) } } PagingButtons.propTypes = { next: PropTypes.string.isRequired, onPaginate: PropTypes.func.isRequired, prev: PropTypes.string.isRequired, }; export default PagingButtons;
import React from 'react'; + import PropTypes from 'prop-types'; + import './paging-buttons.scss'; class PagingButtons extends React.Component { render() { const prev = this.props.prev; const next = this.props.next; return ( <div className="container__block"> <a href={prev} onClick={e => this.props.onPaginate(prev, e)} disabled={prev}>{prev ? "< previous" : null}</a> <div className="next-page"> <a href={next} onClick={e => this.props.onPaginate(next, e)}>{next ? "next >" : null}</a> </div> </div> ) } } + PagingButtons.propTypes = { + next: PropTypes.string.isRequired, + onPaginate: PropTypes.func.isRequired, + prev: PropTypes.string.isRequired, + }; + export default PagingButtons;
8
0.4
8
0
3a312dc4134d28d8c8fb0020444a1bbf1277a4cb
lib/automatic_timestamps/models.py
lib/automatic_timestamps/models.py
from django.db import models import datetime class TimestampModel(models.Model): """ Extend the default Django model to add timestamps to all objects. """ class Meta: abstract = True # Timestamps! created_at = models.DateTimeField() updated_at = models.DateTimeField() def save(self): """ Override the save method to automatically set the created_at and updated_at fields with current date info. """ if self.created_at == None: self.created_at = datetime.datetime.now() self.updated_at = datetime.datetime.now() super(TimestampModel, self).save()
from django.db import models import datetime class TimestampModel(models.Model): """ Extend the default Django model to add timestamps to all objects. """ class Meta: abstract = True # Timestamps! created_at = models.DateTimeField() updated_at = models.DateTimeField() def save(self, *args, **kwargs): """ Override the save method to automatically set the created_at and updated_at fields with current date info. """ if self.created_at == None: self.created_at = datetime.datetime.now() self.updated_at = datetime.datetime.now() super(TimestampModel, self).save()
Add *args/**kwargs to save() as per the Django docs
Add *args/**kwargs to save() as per the Django docs
Python
mit
tofumatt/quotes,tofumatt/quotes
python
## Code Before: from django.db import models import datetime class TimestampModel(models.Model): """ Extend the default Django model to add timestamps to all objects. """ class Meta: abstract = True # Timestamps! created_at = models.DateTimeField() updated_at = models.DateTimeField() def save(self): """ Override the save method to automatically set the created_at and updated_at fields with current date info. """ if self.created_at == None: self.created_at = datetime.datetime.now() self.updated_at = datetime.datetime.now() super(TimestampModel, self).save() ## Instruction: Add *args/**kwargs to save() as per the Django docs ## Code After: from django.db import models import datetime class TimestampModel(models.Model): """ Extend the default Django model to add timestamps to all objects. """ class Meta: abstract = True # Timestamps! created_at = models.DateTimeField() updated_at = models.DateTimeField() def save(self, *args, **kwargs): """ Override the save method to automatically set the created_at and updated_at fields with current date info. """ if self.created_at == None: self.created_at = datetime.datetime.now() self.updated_at = datetime.datetime.now() super(TimestampModel, self).save()
from django.db import models import datetime class TimestampModel(models.Model): """ Extend the default Django model to add timestamps to all objects. """ class Meta: abstract = True # Timestamps! created_at = models.DateTimeField() updated_at = models.DateTimeField() - def save(self): + def save(self, *args, **kwargs): """ Override the save method to automatically set the created_at and updated_at fields with current date info. """ if self.created_at == None: self.created_at = datetime.datetime.now() self.updated_at = datetime.datetime.now() super(TimestampModel, self).save()
2
0.074074
1
1
c7050ddb968651cb4bce2055063fb49921d5dbe9
composer.json
composer.json
{ "name": "doctrine/key-value-store", "require": { "doctrine/common": "*" }, "suggest": { "riak/riak-client": "dev-master" }, "require-dev": { "riak/riak-client": "dev-master" }, "description": "Simple Key-Value Store Abstraction Layer that maps to PHP objects, allowing for many backends.", "license": "MIT", "autoload": { "psr-0": { "Doctrine\\KeyValueStore\\": "lib/" } } }
{ "name": "doctrine/key-value-store", "require": { "doctrine/common": "*" }, "suggest": { "riak/riak-client": "to use the Riak storage" }, "require-dev": { "riak/riak-client": "dev-master" }, "description": "Simple Key-Value Store Abstraction Layer that maps to PHP objects, allowing for many backends.", "license": "MIT", "autoload": { "psr-0": { "Doctrine\\KeyValueStore\\": "lib/" } } }
Replace version constraint in suggest section
Replace version constraint in suggest section
JSON
mit
doctrine/KeyValueStore,kevinyien/KeyValueStore,nicktacular/KeyValueStore,nicktacular/KeyValueStore,doctrine/KeyValueStore
json
## Code Before: { "name": "doctrine/key-value-store", "require": { "doctrine/common": "*" }, "suggest": { "riak/riak-client": "dev-master" }, "require-dev": { "riak/riak-client": "dev-master" }, "description": "Simple Key-Value Store Abstraction Layer that maps to PHP objects, allowing for many backends.", "license": "MIT", "autoload": { "psr-0": { "Doctrine\\KeyValueStore\\": "lib/" } } } ## Instruction: Replace version constraint in suggest section ## Code After: { "name": "doctrine/key-value-store", "require": { "doctrine/common": "*" }, "suggest": { "riak/riak-client": "to use the Riak storage" }, "require-dev": { "riak/riak-client": "dev-master" }, "description": "Simple Key-Value Store Abstraction Layer that maps to PHP objects, allowing for many backends.", "license": "MIT", "autoload": { "psr-0": { "Doctrine\\KeyValueStore\\": "lib/" } } }
{ "name": "doctrine/key-value-store", "require": { "doctrine/common": "*" }, "suggest": { - "riak/riak-client": "dev-master" ? ^ ^^^ - + "riak/riak-client": "to use the Riak storage" ? ^^^^^ ^^^^^^^ ++ ++++ }, "require-dev": { "riak/riak-client": "dev-master" }, "description": "Simple Key-Value Store Abstraction Layer that maps to PHP objects, allowing for many backends.", "license": "MIT", "autoload": { "psr-0": { "Doctrine\\KeyValueStore\\": "lib/" } } }
2
0.105263
1
1
5b5aae50a05e77444092747e67b15fbf7296e730
lib/harbor/consoles/pry.rb
lib/harbor/consoles/pry.rb
require "singleton" class Harbor module Consoles module Pry def self.start require "pry" ::Object.new.pry end end end end
require "singleton" class Harbor module Consoles module Pry def self.start require "pry" ::Pry.start end end end end
Use Pry.start for firing it up so that autoloading works properly
Use Pry.start for firing it up so that autoloading works properly
Ruby
mit
sam/harbor,sam/harbor
ruby
## Code Before: require "singleton" class Harbor module Consoles module Pry def self.start require "pry" ::Object.new.pry end end end end ## Instruction: Use Pry.start for firing it up so that autoloading works properly ## Code After: require "singleton" class Harbor module Consoles module Pry def self.start require "pry" ::Pry.start end end end end
require "singleton" class Harbor module Consoles module Pry def self.start require "pry" - ::Object.new.pry + ::Pry.start end end end end
2
0.142857
1
1
6244f5b65eb4fa94b55ad33078880f7577a85238
src/main/resources/lua/server_to_players.lua
src/main/resources/lua/server_to_players.lua
-- This script needs all active proxies available specified as args. local insert = table.insert local call = redis.call local serverToData = {} for _, proxy in ipairs(ARGV) do local players = call("SMEMBERS", "proxy:" .. proxy .. ":usersOnline") for _, player in ipairs(players) do local server = call("HGET", "player:" .. player, "server") if server then local map = serverToData[server] if not map then serverToData[server] = {} map = serverToData[server] end insert(map, player) end end end -- Redis can't map a Lua table back, so we have to send it as JSON. return cjson.encode(serverToData)
-- This script needs all active proxies available specified as args. local insert = table.insert local call = redis.call local serverToData = {} for _, proxy in ipairs(ARGV) do local players = call("SMEMBERS", "proxy:" .. proxy .. ":usersOnline") for _, player in ipairs(players) do local server = call("HGET", "player:" .. player, "server") if server then local map = serverToData[server] if not map then serverToData[server] = {} map = serverToData[server] end insert(map, player) end end end -- Redis can't map Lua associative tables back, so we have to send it as JSON. return cjson.encode(serverToData)
Clarify that Redis does allow tables to be sent back, but not associative ones.
Clarify that Redis does allow tables to be sent back, but not associative ones.
Lua
unknown
minecrafter/RedisBungee,thechunknetwork/RedisBungee
lua
## Code Before: -- This script needs all active proxies available specified as args. local insert = table.insert local call = redis.call local serverToData = {} for _, proxy in ipairs(ARGV) do local players = call("SMEMBERS", "proxy:" .. proxy .. ":usersOnline") for _, player in ipairs(players) do local server = call("HGET", "player:" .. player, "server") if server then local map = serverToData[server] if not map then serverToData[server] = {} map = serverToData[server] end insert(map, player) end end end -- Redis can't map a Lua table back, so we have to send it as JSON. return cjson.encode(serverToData) ## Instruction: Clarify that Redis does allow tables to be sent back, but not associative ones. ## Code After: -- This script needs all active proxies available specified as args. local insert = table.insert local call = redis.call local serverToData = {} for _, proxy in ipairs(ARGV) do local players = call("SMEMBERS", "proxy:" .. proxy .. ":usersOnline") for _, player in ipairs(players) do local server = call("HGET", "player:" .. player, "server") if server then local map = serverToData[server] if not map then serverToData[server] = {} map = serverToData[server] end insert(map, player) end end end -- Redis can't map Lua associative tables back, so we have to send it as JSON. return cjson.encode(serverToData)
-- This script needs all active proxies available specified as args. local insert = table.insert local call = redis.call local serverToData = {} for _, proxy in ipairs(ARGV) do local players = call("SMEMBERS", "proxy:" .. proxy .. ":usersOnline") for _, player in ipairs(players) do local server = call("HGET", "player:" .. player, "server") if server then local map = serverToData[server] if not map then serverToData[server] = {} map = serverToData[server] end insert(map, player) end end end - -- Redis can't map a Lua table back, so we have to send it as JSON. ? -- + -- Redis can't map Lua associative tables back, so we have to send it as JSON. ? ++++++++++++ + return cjson.encode(serverToData)
2
0.086957
1
1
acb08be2f81db98c46de1c580f84966ade191559
lib/dry/types/coercions/json.rb
lib/dry/types/coercions/json.rb
require 'date' require 'bigdecimal' require 'bigdecimal/util' require 'time' module Dry module Types module Coercions module JSON def self.to_nil(input) input unless input.is_a?(String) && input == '' end def self.to_date(input) Date.parse(input) rescue ArgumentError input end def self.to_date_time(input) DateTime.parse(input) rescue ArgumentError input end def self.to_time(input) Time.parse(input) rescue ArgumentError input end def self.to_decimal(input) if input.is_a?(String) && input == '' nil else input.to_d end end end end end end
require 'date' require 'bigdecimal' require 'bigdecimal/util' require 'time' module Dry module Types module Coercions module JSON def self.to_nil(input) input unless ''.eql?(input) end def self.to_date(input) Date.parse(input) rescue ArgumentError input end def self.to_date_time(input) DateTime.parse(input) rescue ArgumentError input end def self.to_time(input) Time.parse(input) rescue ArgumentError input end def self.to_decimal(input) if input.is_a?(String) && input == '' nil else input.to_d end end end end end end
Refactor `JSON.to_nil` to use `eql?`
Refactor `JSON.to_nil` to use `eql?` The check input.is_a?(String) && input == '' is equivalent to ''.eql?(input) since `eql?` does not permit coercion
Ruby
mit
dryrb/dry-types,dryrb/dry-data,dryrb/dry-data,dryrb/dry-types
ruby
## Code Before: require 'date' require 'bigdecimal' require 'bigdecimal/util' require 'time' module Dry module Types module Coercions module JSON def self.to_nil(input) input unless input.is_a?(String) && input == '' end def self.to_date(input) Date.parse(input) rescue ArgumentError input end def self.to_date_time(input) DateTime.parse(input) rescue ArgumentError input end def self.to_time(input) Time.parse(input) rescue ArgumentError input end def self.to_decimal(input) if input.is_a?(String) && input == '' nil else input.to_d end end end end end end ## Instruction: Refactor `JSON.to_nil` to use `eql?` The check input.is_a?(String) && input == '' is equivalent to ''.eql?(input) since `eql?` does not permit coercion ## Code After: require 'date' require 'bigdecimal' require 'bigdecimal/util' require 'time' module Dry module Types module Coercions module JSON def self.to_nil(input) input unless ''.eql?(input) end def self.to_date(input) Date.parse(input) rescue ArgumentError input end def self.to_date_time(input) DateTime.parse(input) rescue ArgumentError input end def self.to_time(input) Time.parse(input) rescue ArgumentError input end def self.to_decimal(input) if input.is_a?(String) && input == '' nil else input.to_d end end end end end end
require 'date' require 'bigdecimal' require 'bigdecimal/util' require 'time' module Dry module Types module Coercions module JSON def self.to_nil(input) - input unless input.is_a?(String) && input == '' + input unless ''.eql?(input) end def self.to_date(input) Date.parse(input) rescue ArgumentError input end def self.to_date_time(input) DateTime.parse(input) rescue ArgumentError input end def self.to_time(input) Time.parse(input) rescue ArgumentError input end def self.to_decimal(input) if input.is_a?(String) && input == '' nil else input.to_d end end end end end end
2
0.047619
1
1
698ac0cd6495ea7e2d568e21a3bebec9bc0ee93a
playbooks/roles/tools_jenkins/meta/main.yml
playbooks/roles/tools_jenkins/meta/main.yml
--- dependencies: - common - edxapp_common - browsers - role: jenkins_master jenkins_plugins: "{{ jenkins_tools_plugins }}" jenkins_version: "{{ jenkins_tools_version }}" jenkins_deb_url: "https://pkg.jenkins.io/debian-stable/binary/jenkins_{{ jenkins_version }}_all.deb" jenkins_custom_plugins: [] jenkins_bundled_plugins: "{{ jenkins_tools_bundled_plugins }}" jenkins_debian_pkgs: "{{ jenkins_tools_debian_pkgs }}"
--- dependencies: - common - edxapp_common - browsers - role: jenkins_master jenkins_plugins: "{{ jenkins_tools_plugins }}" jenkins_version: "{{ jenkins_tools_version }}" jenkins_deb_url: "https://pkg.jenkins.io/debian-stable/binary/jenkins_{{ jenkins_version }}_all.deb" jenkins_custom_plugins: [] jenkins_bundled_plugins: "{{ jenkins_tools_bundled_plugins }}" jenkins_debian_pkgs: "{{ jenkins_tools_debian_pkgs }}" # Needed to be able to build docker images. Used by Docker Image Builder Jobs. - role: docker-tools docker_users: - jenkins
Install docker on tools jenkins.
Install docker on tools jenkins.
YAML
agpl-3.0
EDUlib/configuration,michaelsteiner19/open-edx-configuration,mitodl/configuration,EDUlib/configuration,appsembler/configuration,gsehub/configuration,michaelsteiner19/open-edx-configuration,Stanford-Online/configuration,appsembler/configuration,mitodl/configuration,proversity-org/configuration,Stanford-Online/configuration,hastexo/edx-configuration,stvstnfrd/configuration,gsehub/configuration,michaelsteiner19/open-edx-configuration,mitodl/configuration,proversity-org/configuration,EDUlib/configuration,proversity-org/configuration,Stanford-Online/configuration,EDUlib/configuration,stvstnfrd/configuration,rue89-tech/configuration,proversity-org/configuration,rue89-tech/configuration,rue89-tech/configuration,mitodl/configuration,hks-epod/configuration,arbrandes/edx-configuration,edx/configuration,hastexo/edx-configuration,michaelsteiner19/open-edx-configuration,proversity-org/configuration,Stanford-Online/configuration,hks-epod/configuration,hastexo/edx-configuration,hastexo/edx-configuration,rue89-tech/configuration,arbrandes/edx-configuration,edx/configuration,appsembler/configuration,edx/configuration,gsehub/configuration,rue89-tech/configuration,hks-epod/configuration,hks-epod/configuration,stvstnfrd/configuration,arbrandes/edx-configuration,stvstnfrd/configuration,EDUlib/configuration,gsehub/configuration,edx/configuration,hastexo/edx-configuration,gsehub/configuration,hks-epod/configuration,appsembler/configuration,stvstnfrd/configuration,arbrandes/edx-configuration,arbrandes/edx-configuration,Stanford-Online/configuration
yaml
## Code Before: --- dependencies: - common - edxapp_common - browsers - role: jenkins_master jenkins_plugins: "{{ jenkins_tools_plugins }}" jenkins_version: "{{ jenkins_tools_version }}" jenkins_deb_url: "https://pkg.jenkins.io/debian-stable/binary/jenkins_{{ jenkins_version }}_all.deb" jenkins_custom_plugins: [] jenkins_bundled_plugins: "{{ jenkins_tools_bundled_plugins }}" jenkins_debian_pkgs: "{{ jenkins_tools_debian_pkgs }}" ## Instruction: Install docker on tools jenkins. ## Code After: --- dependencies: - common - edxapp_common - browsers - role: jenkins_master jenkins_plugins: "{{ jenkins_tools_plugins }}" jenkins_version: "{{ jenkins_tools_version }}" jenkins_deb_url: "https://pkg.jenkins.io/debian-stable/binary/jenkins_{{ jenkins_version }}_all.deb" jenkins_custom_plugins: [] jenkins_bundled_plugins: "{{ jenkins_tools_bundled_plugins }}" jenkins_debian_pkgs: "{{ jenkins_tools_debian_pkgs }}" # Needed to be able to build docker images. Used by Docker Image Builder Jobs. - role: docker-tools docker_users: - jenkins
--- dependencies: - common - edxapp_common - browsers - role: jenkins_master jenkins_plugins: "{{ jenkins_tools_plugins }}" jenkins_version: "{{ jenkins_tools_version }}" jenkins_deb_url: "https://pkg.jenkins.io/debian-stable/binary/jenkins_{{ jenkins_version }}_all.deb" jenkins_custom_plugins: [] jenkins_bundled_plugins: "{{ jenkins_tools_bundled_plugins }}" jenkins_debian_pkgs: "{{ jenkins_tools_debian_pkgs }}" + # Needed to be able to build docker images. Used by Docker Image Builder Jobs. + - role: docker-tools + docker_users: + - jenkins
4
0.333333
4
0
7e427da521eb2f1d6e3c9b58ae12c206e6a1b8d6
.travis.yml
.travis.yml
language: ruby cache: bundler sudo: required dist: trusty rvm: - 2.4.1 services: mongodb addons: apt: sources: - ubuntu-sdk-team packages: - libqt5webkit5-dev - qtdeclarative5-dev script: xvfb-run bundle exec rake env: global: - METRICS_API_USERNAME="username" - METRICS_API_PASSWORD="password" - METRICS_API_TITLE='ODI Metrics' - METRICS_API_DESCRIPTION='This API contains a list of all metrics collected by the Open Data Institute since 2013' - METRICS_API_LICENSE_NAME='Creative Commons Attribution-ShareAlike' - METRICS_API_LICENSE_URL='https://creativecommons.org/licenses/by-sa/4.0/' - METRICS_API_PUBLISHER_NAME='Open Data Institute' - METRICS_API_PUBLISHER_URL='http://theodi.org' - METRICS_API_CERTIFICATE_URL='https://certificates.theodi.org/en/datasets/213482/certificate'
language: ruby cache: bundler sudo: required dist: trusty rvm: - 2.4.1 services: mongodb addons: apt: sources: - ubuntu-sdk-team packages: - libqt5webkit5-dev - qtdeclarative5-dev - cmake script: xvfb-run bundle exec rake env: global: - METRICS_API_USERNAME="username" - METRICS_API_PASSWORD="password" - METRICS_API_TITLE='ODI Metrics' - METRICS_API_DESCRIPTION='This API contains a list of all metrics collected by the Open Data Institute since 2013' - METRICS_API_LICENSE_NAME='Creative Commons Attribution-ShareAlike' - METRICS_API_LICENSE_URL='https://creativecommons.org/licenses/by-sa/4.0/' - METRICS_API_PUBLISHER_NAME='Open Data Institute' - METRICS_API_PUBLISHER_URL='http://theodi.org' - METRICS_API_CERTIFICATE_URL='https://certificates.theodi.org/en/datasets/213482/certificate'
Include cmake to resolve heroku build fail
Include cmake to resolve heroku build fail
YAML
mit
theodi/bothan,theodi/bothan,theodi/bothan,theodi/metrics-api,theodi/metrics-api,theodi/bothan,theodi/metrics-api
yaml
## Code Before: language: ruby cache: bundler sudo: required dist: trusty rvm: - 2.4.1 services: mongodb addons: apt: sources: - ubuntu-sdk-team packages: - libqt5webkit5-dev - qtdeclarative5-dev script: xvfb-run bundle exec rake env: global: - METRICS_API_USERNAME="username" - METRICS_API_PASSWORD="password" - METRICS_API_TITLE='ODI Metrics' - METRICS_API_DESCRIPTION='This API contains a list of all metrics collected by the Open Data Institute since 2013' - METRICS_API_LICENSE_NAME='Creative Commons Attribution-ShareAlike' - METRICS_API_LICENSE_URL='https://creativecommons.org/licenses/by-sa/4.0/' - METRICS_API_PUBLISHER_NAME='Open Data Institute' - METRICS_API_PUBLISHER_URL='http://theodi.org' - METRICS_API_CERTIFICATE_URL='https://certificates.theodi.org/en/datasets/213482/certificate' ## Instruction: Include cmake to resolve heroku build fail ## Code After: language: ruby cache: bundler sudo: required dist: trusty rvm: - 2.4.1 services: mongodb addons: apt: sources: - ubuntu-sdk-team packages: - libqt5webkit5-dev - qtdeclarative5-dev - cmake script: xvfb-run bundle exec rake env: global: - METRICS_API_USERNAME="username" - METRICS_API_PASSWORD="password" - METRICS_API_TITLE='ODI Metrics' - METRICS_API_DESCRIPTION='This API contains a list of all metrics collected by the Open Data Institute since 2013' - METRICS_API_LICENSE_NAME='Creative Commons Attribution-ShareAlike' - METRICS_API_LICENSE_URL='https://creativecommons.org/licenses/by-sa/4.0/' - METRICS_API_PUBLISHER_NAME='Open Data Institute' - METRICS_API_PUBLISHER_URL='http://theodi.org' - METRICS_API_CERTIFICATE_URL='https://certificates.theodi.org/en/datasets/213482/certificate'
language: ruby cache: bundler sudo: required dist: trusty rvm: - 2.4.1 services: mongodb addons: apt: sources: - ubuntu-sdk-team packages: - libqt5webkit5-dev - qtdeclarative5-dev + - cmake script: xvfb-run bundle exec rake env: global: - METRICS_API_USERNAME="username" - METRICS_API_PASSWORD="password" - METRICS_API_TITLE='ODI Metrics' - METRICS_API_DESCRIPTION='This API contains a list of all metrics collected by the Open Data Institute since 2013' - METRICS_API_LICENSE_NAME='Creative Commons Attribution-ShareAlike' - METRICS_API_LICENSE_URL='https://creativecommons.org/licenses/by-sa/4.0/' - METRICS_API_PUBLISHER_NAME='Open Data Institute' - METRICS_API_PUBLISHER_URL='http://theodi.org' - METRICS_API_CERTIFICATE_URL='https://certificates.theodi.org/en/datasets/213482/certificate'
1
0.038462
1
0
9100e8f0bb53a9afb19437b456a11d2077dd0054
.github/helper/install_dependencies.sh
.github/helper/install_dependencies.sh
set -e # Check for merge conflicts before proceeding python -m compileall -f "${GITHUB_WORKSPACE}" if grep -lr --exclude-dir=node_modules "^<<<<<<< " "${GITHUB_WORKSPACE}" then echo "Found merge conflicts" exit 1 fi # install wkhtmltopdf wget -O /tmp/wkhtmltox.tar.xz https://github.com/frappe/wkhtmltopdf/raw/master/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz tar -xf /tmp/wkhtmltox.tar.xz -C /tmp sudo mv /tmp/wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf sudo chmod o+x /usr/local/bin/wkhtmltopdf # install cups sudo apt-get install libcups2-dev # install redis sudo apt-get install redis-server
set -e # Check for merge conflicts before proceeding python -m compileall -f "${GITHUB_WORKSPACE}" if grep -lr --exclude-dir=node_modules "^<<<<<<< " "${GITHUB_WORKSPACE}" then echo "Found merge conflicts" exit 1 fi # install wkhtmltopdf wget -O /tmp/wkhtmltox.tar.xz https://github.com/frappe/wkhtmltopdf/raw/master/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz tar -xf /tmp/wkhtmltox.tar.xz -C /tmp sudo mv /tmp/wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf sudo chmod o+x /usr/local/bin/wkhtmltopdf # install cups sudo apt-get install libcups2-dev # install redis sudo apt-get install redis-server # install redis sudo apt-get install libmariadb-dev
Install system dependency - libmariadb-dev
ci: Install system dependency - libmariadb-dev
Shell
mit
frappe/frappe,StrellaGroup/frappe,StrellaGroup/frappe,StrellaGroup/frappe,frappe/frappe,frappe/frappe
shell
## Code Before: set -e # Check for merge conflicts before proceeding python -m compileall -f "${GITHUB_WORKSPACE}" if grep -lr --exclude-dir=node_modules "^<<<<<<< " "${GITHUB_WORKSPACE}" then echo "Found merge conflicts" exit 1 fi # install wkhtmltopdf wget -O /tmp/wkhtmltox.tar.xz https://github.com/frappe/wkhtmltopdf/raw/master/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz tar -xf /tmp/wkhtmltox.tar.xz -C /tmp sudo mv /tmp/wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf sudo chmod o+x /usr/local/bin/wkhtmltopdf # install cups sudo apt-get install libcups2-dev # install redis sudo apt-get install redis-server ## Instruction: ci: Install system dependency - libmariadb-dev ## Code After: set -e # Check for merge conflicts before proceeding python -m compileall -f "${GITHUB_WORKSPACE}" if grep -lr --exclude-dir=node_modules "^<<<<<<< " "${GITHUB_WORKSPACE}" then echo "Found merge conflicts" exit 1 fi # install wkhtmltopdf wget -O /tmp/wkhtmltox.tar.xz https://github.com/frappe/wkhtmltopdf/raw/master/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz tar -xf /tmp/wkhtmltox.tar.xz -C /tmp sudo mv /tmp/wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf sudo chmod o+x /usr/local/bin/wkhtmltopdf # install cups sudo apt-get install libcups2-dev # install redis sudo apt-get install redis-server # install redis sudo apt-get install libmariadb-dev
set -e # Check for merge conflicts before proceeding python -m compileall -f "${GITHUB_WORKSPACE}" if grep -lr --exclude-dir=node_modules "^<<<<<<< " "${GITHUB_WORKSPACE}" then echo "Found merge conflicts" exit 1 fi # install wkhtmltopdf wget -O /tmp/wkhtmltox.tar.xz https://github.com/frappe/wkhtmltopdf/raw/master/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz tar -xf /tmp/wkhtmltox.tar.xz -C /tmp sudo mv /tmp/wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf sudo chmod o+x /usr/local/bin/wkhtmltopdf # install cups sudo apt-get install libcups2-dev # install redis sudo apt-get install redis-server + # install redis + sudo apt-get install libmariadb-dev
2
0.090909
2
0
d7243798c2b20771ee68fe4a9ce18321c7e79cb7
README.md
README.md
A lightweight library that has no external dependencies and simplifies the creation and registration of JMX MBeans by providing some annotations that you can easily add to your classes. Let's take a look at the following class: ```java @ManagedBean public class Statistics { public int counter; @ManagedAttribute public int getCounter() { return this.counter; } public void setCounter(int counter) { this.counter = counter; } @ManagedOperation public void resetCounter() { this.counter = 0; } } ``` As you can see the class is annotated with `net.gescobar.jmx.annotation.ManagedBean`, the `getCounter()` method with `net.gescobar.jmx.annotation.ManagedAttribute` and the `resetCounter()` method with `net.gescobar.jmx.annotation.ManagedOperation`. We can now register the JMX MBean in one single line of code: ```java Management.register(new Statistics(), "org.test:type=Statistics"); ``` This will create a DynamicMBean from the object and will register it in the default MBeanServer that is retrieved using `ManagementFactory.getPlatformMBeanServer()` method. That's it. Enjoy!
[![Build Status](https://buildhive.cloudbees.com/job/germanescobar/job/jmx-annotations/badge/icon)](https://buildhive.cloudbees.com/job/germanescobar/job/jmx-annotations/) A lightweight library that has no external dependencies and simplifies the creation and registration of JMX MBeans by providing some annotations that you can easily add to your classes. Let's take a look at the following class: ```java @ManagedBean public class Statistics { public int counter; @ManagedAttribute public int getCounter() { return this.counter; } public void setCounter(int counter) { this.counter = counter; } @ManagedOperation public void resetCounter() { this.counter = 0; } } ``` As you can see the class is annotated with `net.gescobar.jmx.annotation.ManagedBean`, the `getCounter()` method with `net.gescobar.jmx.annotation.ManagedAttribute` and the `resetCounter()` method with `net.gescobar.jmx.annotation.ManagedOperation`. We can now register the JMX MBean in one single line of code: ```java Management.register(new Statistics(), "org.test:type=Statistics"); ``` This will create a DynamicMBean from the object and will register it in the default MBeanServer that is retrieved using `ManagementFactory.getPlatformMBeanServer()` method. That's it. Enjoy!
Add the BuildHive project status.
Add the BuildHive project status.
Markdown
mit
germanescobar/jmx-annotations,bvarner/jmx-annotations
markdown
## Code Before: A lightweight library that has no external dependencies and simplifies the creation and registration of JMX MBeans by providing some annotations that you can easily add to your classes. Let's take a look at the following class: ```java @ManagedBean public class Statistics { public int counter; @ManagedAttribute public int getCounter() { return this.counter; } public void setCounter(int counter) { this.counter = counter; } @ManagedOperation public void resetCounter() { this.counter = 0; } } ``` As you can see the class is annotated with `net.gescobar.jmx.annotation.ManagedBean`, the `getCounter()` method with `net.gescobar.jmx.annotation.ManagedAttribute` and the `resetCounter()` method with `net.gescobar.jmx.annotation.ManagedOperation`. We can now register the JMX MBean in one single line of code: ```java Management.register(new Statistics(), "org.test:type=Statistics"); ``` This will create a DynamicMBean from the object and will register it in the default MBeanServer that is retrieved using `ManagementFactory.getPlatformMBeanServer()` method. That's it. Enjoy! ## Instruction: Add the BuildHive project status. ## Code After: [![Build Status](https://buildhive.cloudbees.com/job/germanescobar/job/jmx-annotations/badge/icon)](https://buildhive.cloudbees.com/job/germanescobar/job/jmx-annotations/) A lightweight library that has no external dependencies and simplifies the creation and registration of JMX MBeans by providing some annotations that you can easily add to your classes. Let's take a look at the following class: ```java @ManagedBean public class Statistics { public int counter; @ManagedAttribute public int getCounter() { return this.counter; } public void setCounter(int counter) { this.counter = counter; } @ManagedOperation public void resetCounter() { this.counter = 0; } } ``` As you can see the class is annotated with `net.gescobar.jmx.annotation.ManagedBean`, the `getCounter()` method with `net.gescobar.jmx.annotation.ManagedAttribute` and the `resetCounter()` method with `net.gescobar.jmx.annotation.ManagedOperation`. We can now register the JMX MBean in one single line of code: ```java Management.register(new Statistics(), "org.test:type=Statistics"); ``` This will create a DynamicMBean from the object and will register it in the default MBeanServer that is retrieved using `ManagementFactory.getPlatformMBeanServer()` method. That's it. Enjoy!
+ + [![Build Status](https://buildhive.cloudbees.com/job/germanescobar/job/jmx-annotations/badge/icon)](https://buildhive.cloudbees.com/job/germanescobar/job/jmx-annotations/) A lightweight library that has no external dependencies and simplifies the creation and registration of JMX MBeans by providing some annotations that you can easily add to your classes. Let's take a look at the following class: ```java @ManagedBean public class Statistics { public int counter; @ManagedAttribute public int getCounter() { return this.counter; } public void setCounter(int counter) { this.counter = counter; } @ManagedOperation public void resetCounter() { this.counter = 0; } } ``` As you can see the class is annotated with `net.gescobar.jmx.annotation.ManagedBean`, the `getCounter()` method with `net.gescobar.jmx.annotation.ManagedAttribute` and the `resetCounter()` method with `net.gescobar.jmx.annotation.ManagedOperation`. We can now register the JMX MBean in one single line of code: ```java Management.register(new Statistics(), "org.test:type=Statistics"); ``` This will create a DynamicMBean from the object and will register it in the default MBeanServer that is retrieved using `ManagementFactory.getPlatformMBeanServer()` method. That's it. Enjoy!
2
0.054054
2
0
ffa6c12920f08e0984a9a49ae412bbf7a19134d7
sh/loader.sh
sh/loader.sh
umask 022 source_rc_files () { local rc for rc in "$@"; do [[ -f "$rc" ]] && [[ -r "$rc" ]] && source "$rc" done } # different semantics than the typical pathmunge() add_to_path () { local after=false dir if [[ "$1" == "--after" ]]; then after=true; shift; fi for dir in "$@"; do if [[ -d "$dir" ]]; then if $after; then PATH="$PATH:" PATH="${PATH//$dir:/}$dir"; else PATH=":$PATH" PATH="$dir${PATH//:$dir/}"; fi fi done } shrc_dir=$HOME/run_control/sh # Setup terminal first. source_rc_files $shrc_dir/term.sh # Build $PATH. # Instead of adding /opt/*/bin to $PATH # consider symlinking those scripts into ~/usr/bin # to keep the $PATH shorter so less searching is required. # Locally compiled (without sudo). add_to_path $HOME/usr/bin # Homebrew. add_to_path $HOME/homebrew/bin # Get (unprefixed) GNU utils to override BSD utils. add_to_path $HOME/homebrew/opt/coreutils/libexec/gnubin # Personal scripts. add_to_path $HOME/bin # Get everything else. source_rc_files $shrc_dir/sh.d/*.sh ~/.shrc.local $EXTRA_SHRC unset shrc_dir
umask 022 source_rc_files () { local rc for rc in "$@"; do [[ -f "$rc" ]] && [[ -r "$rc" ]] && source "$rc" done } # different semantics than the typical pathmunge() add_to_path () { local after=false dir if [[ "$1" == "--after" ]]; then after=true; shift; fi for dir in "$@"; do if [[ -d "$dir" ]]; then if $after; then PATH="$PATH:" PATH="${PATH//$dir:/}$dir"; else PATH=":$PATH" PATH="$dir${PATH//:$dir/}"; fi fi done } shrc_dir=$HOME/run_control/sh # Build $PATH. # Instead of adding /opt/*/bin to $PATH # consider symlinking those scripts into ~/usr/bin # to keep the $PATH shorter so less searching is required. # Locally compiled (without sudo). add_to_path $HOME/usr/bin # Homebrew. add_to_path $HOME/homebrew/bin # Get (unprefixed) GNU utils to override BSD utils. add_to_path $HOME/homebrew/opt/coreutils/libexec/gnubin # Personal scripts. add_to_path $HOME/bin # Setup terminal first. source_rc_files $shrc_dir/term.sh # Get everything else. source_rc_files $shrc_dir/sh.d/*.sh ~/.shrc.local $EXTRA_SHRC unset shrc_dir
Build PATH before determining term settings
Build PATH before determining term settings for when (e.g.) tmux is built locally
Shell
mit
rwstauner/run_control,rwstauner/run_control,rwstauner/run_control,rwstauner/run_control,rwstauner/run_control
shell
## Code Before: umask 022 source_rc_files () { local rc for rc in "$@"; do [[ -f "$rc" ]] && [[ -r "$rc" ]] && source "$rc" done } # different semantics than the typical pathmunge() add_to_path () { local after=false dir if [[ "$1" == "--after" ]]; then after=true; shift; fi for dir in "$@"; do if [[ -d "$dir" ]]; then if $after; then PATH="$PATH:" PATH="${PATH//$dir:/}$dir"; else PATH=":$PATH" PATH="$dir${PATH//:$dir/}"; fi fi done } shrc_dir=$HOME/run_control/sh # Setup terminal first. source_rc_files $shrc_dir/term.sh # Build $PATH. # Instead of adding /opt/*/bin to $PATH # consider symlinking those scripts into ~/usr/bin # to keep the $PATH shorter so less searching is required. # Locally compiled (without sudo). add_to_path $HOME/usr/bin # Homebrew. add_to_path $HOME/homebrew/bin # Get (unprefixed) GNU utils to override BSD utils. add_to_path $HOME/homebrew/opt/coreutils/libexec/gnubin # Personal scripts. add_to_path $HOME/bin # Get everything else. source_rc_files $shrc_dir/sh.d/*.sh ~/.shrc.local $EXTRA_SHRC unset shrc_dir ## Instruction: Build PATH before determining term settings for when (e.g.) tmux is built locally ## Code After: umask 022 source_rc_files () { local rc for rc in "$@"; do [[ -f "$rc" ]] && [[ -r "$rc" ]] && source "$rc" done } # different semantics than the typical pathmunge() add_to_path () { local after=false dir if [[ "$1" == "--after" ]]; then after=true; shift; fi for dir in "$@"; do if [[ -d "$dir" ]]; then if $after; then PATH="$PATH:" PATH="${PATH//$dir:/}$dir"; else PATH=":$PATH" PATH="$dir${PATH//:$dir/}"; fi fi done } shrc_dir=$HOME/run_control/sh # Build $PATH. # Instead of adding /opt/*/bin to $PATH # consider symlinking those scripts into ~/usr/bin # to keep the $PATH shorter so less searching is required. # Locally compiled (without sudo). add_to_path $HOME/usr/bin # Homebrew. add_to_path $HOME/homebrew/bin # Get (unprefixed) GNU utils to override BSD utils. add_to_path $HOME/homebrew/opt/coreutils/libexec/gnubin # Personal scripts. add_to_path $HOME/bin # Setup terminal first. source_rc_files $shrc_dir/term.sh # Get everything else. source_rc_files $shrc_dir/sh.d/*.sh ~/.shrc.local $EXTRA_SHRC unset shrc_dir
umask 022 source_rc_files () { local rc for rc in "$@"; do [[ -f "$rc" ]] && [[ -r "$rc" ]] && source "$rc" done } # different semantics than the typical pathmunge() add_to_path () { local after=false dir if [[ "$1" == "--after" ]]; then after=true; shift; fi for dir in "$@"; do if [[ -d "$dir" ]]; then if $after; then PATH="$PATH:" PATH="${PATH//$dir:/}$dir"; else PATH=":$PATH" PATH="$dir${PATH//:$dir/}"; fi fi done } shrc_dir=$HOME/run_control/sh - # Setup terminal first. - source_rc_files $shrc_dir/term.sh - # Build $PATH. # Instead of adding /opt/*/bin to $PATH # consider symlinking those scripts into ~/usr/bin # to keep the $PATH shorter so less searching is required. # Locally compiled (without sudo). add_to_path $HOME/usr/bin # Homebrew. add_to_path $HOME/homebrew/bin # Get (unprefixed) GNU utils to override BSD utils. add_to_path $HOME/homebrew/opt/coreutils/libexec/gnubin # Personal scripts. add_to_path $HOME/bin + # Setup terminal first. + source_rc_files $shrc_dir/term.sh + # Get everything else. source_rc_files $shrc_dir/sh.d/*.sh ~/.shrc.local $EXTRA_SHRC unset shrc_dir
6
0.113208
3
3
2baf48a5a4360247156400a29fdee25141ceb328
app/assets/javascripts/rich_editable_element.js.coffee
app/assets/javascripts/rich_editable_element.js.coffee
window.Tahi ||= {} class Tahi.RichEditableElement constructor: (@element) -> @instance = CKEDITOR.inline @element, extraPlugins: 'sharedspace' removePlugins: 'floatingspace,resize' sharedSpaces: top: 'toolbar' toolbar: [ [ 'Styles', 'Format', 'FontSize' ] [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote', 'Table' ] [ 'PasteFromWord' ], [ 'Link', 'Unlink', 'Anchor' ] [ 'Find', 'Replace', '-', 'Scayt' ] ] @placeholderText = @element.attributes['placeholder'].value @setPlaceholder() @instance.on 'focus', => @clearPlaceholder() @instance.on 'blur', => @setPlaceholder() setPlaceholder: -> text = $($.parseHTML(@instance.getData())).text().trim() if text == '' || text == @placeholderText @instance.element.addClass 'placeholder' @instance.setData @placeholderText clearPlaceholder: -> text = $($.parseHTML(@instance.getData())).text().trim() if text == @placeholderText @instance.element.removeClass 'placeholder' @instance.setData ''
window.Tahi ||= {} class Tahi.RichEditableElement constructor: (@element) -> @instance = CKEDITOR.inline @element, extraPlugins: 'sharedspace' removePlugins: 'floatingspace,resize' sharedSpaces: top: 'toolbar' toolbar: [ [ 'Format' ] [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Table' ] [ 'PasteFromWord' ], [ 'Link', 'Unlink' ] [ 'Find', 'Replace', '-', 'Scayt' ] ] @placeholderText = @element.attributes['placeholder'].value @setPlaceholder() @instance.on 'focus', => @clearPlaceholder() @instance.on 'blur', => @setPlaceholder() setPlaceholder: -> text = $($.parseHTML(@instance.getData())).text().trim() if text == '' || text == @placeholderText @instance.element.addClass 'placeholder' @instance.setData @placeholderText clearPlaceholder: -> text = $($.parseHTML(@instance.getData())).text().trim() if text == @placeholderText @instance.element.removeClass 'placeholder' @instance.setData ''
Remove items from the CKEDITOR toolbar
Remove items from the CKEDITOR toolbar [Finishes #61435398]
CoffeeScript
mit
johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi
coffeescript
## Code Before: window.Tahi ||= {} class Tahi.RichEditableElement constructor: (@element) -> @instance = CKEDITOR.inline @element, extraPlugins: 'sharedspace' removePlugins: 'floatingspace,resize' sharedSpaces: top: 'toolbar' toolbar: [ [ 'Styles', 'Format', 'FontSize' ] [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote', 'Table' ] [ 'PasteFromWord' ], [ 'Link', 'Unlink', 'Anchor' ] [ 'Find', 'Replace', '-', 'Scayt' ] ] @placeholderText = @element.attributes['placeholder'].value @setPlaceholder() @instance.on 'focus', => @clearPlaceholder() @instance.on 'blur', => @setPlaceholder() setPlaceholder: -> text = $($.parseHTML(@instance.getData())).text().trim() if text == '' || text == @placeholderText @instance.element.addClass 'placeholder' @instance.setData @placeholderText clearPlaceholder: -> text = $($.parseHTML(@instance.getData())).text().trim() if text == @placeholderText @instance.element.removeClass 'placeholder' @instance.setData '' ## Instruction: Remove items from the CKEDITOR toolbar [Finishes #61435398] ## Code After: window.Tahi ||= {} class Tahi.RichEditableElement constructor: (@element) -> @instance = CKEDITOR.inline @element, extraPlugins: 'sharedspace' removePlugins: 'floatingspace,resize' sharedSpaces: top: 'toolbar' toolbar: [ [ 'Format' ] [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Table' ] [ 'PasteFromWord' ], [ 'Link', 'Unlink' ] [ 'Find', 'Replace', '-', 'Scayt' ] ] @placeholderText = @element.attributes['placeholder'].value @setPlaceholder() @instance.on 'focus', => @clearPlaceholder() @instance.on 'blur', => @setPlaceholder() setPlaceholder: -> text = $($.parseHTML(@instance.getData())).text().trim() if text == '' || text == @placeholderText @instance.element.addClass 'placeholder' @instance.setData @placeholderText clearPlaceholder: -> text = $($.parseHTML(@instance.getData())).text().trim() if text == @placeholderText @instance.element.removeClass 'placeholder' @instance.setData ''
window.Tahi ||= {} class Tahi.RichEditableElement constructor: (@element) -> @instance = CKEDITOR.inline @element, extraPlugins: 'sharedspace' removePlugins: 'floatingspace,resize' sharedSpaces: top: 'toolbar' toolbar: [ - [ 'Styles', 'Format', 'FontSize' ] + [ 'Format' ] [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] - [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote', 'Table' ] ? -------------- + [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Table' ] [ 'PasteFromWord' ], - [ 'Link', 'Unlink', 'Anchor' ] ? ---------- + [ 'Link', 'Unlink' ] [ 'Find', 'Replace', '-', 'Scayt' ] ] @placeholderText = @element.attributes['placeholder'].value @setPlaceholder() @instance.on 'focus', => @clearPlaceholder() @instance.on 'blur', => @setPlaceholder() setPlaceholder: -> text = $($.parseHTML(@instance.getData())).text().trim() if text == '' || text == @placeholderText @instance.element.addClass 'placeholder' @instance.setData @placeholderText clearPlaceholder: -> text = $($.parseHTML(@instance.getData())).text().trim() if text == @placeholderText @instance.element.removeClass 'placeholder' @instance.setData ''
6
0.176471
3
3
76c44154ca1bc2eeb4e24cc820338c36960b1b5c
caniuse/test/test_caniuse.py
caniuse/test/test_caniuse.py
from __future__ import absolute_import import pytest from caniuse.main import check def test_package_name_has_been_used(): assert 'Sorry' in check('requests') assert 'Sorry' in check('flask') assert 'Sorry' in check('pip') def test_package_name_has_not_been_used(): assert 'Congratulation' in check('this_package_name_has_not_been_used') assert 'Congratulation' in check('you_will_never_use_this_package_name') assert 'Congratulation' in check('I_suck_and_my_tests_are_order_dependent')
from __future__ import absolute_import import pytest from click.testing import CliRunner from caniuse.main import check from caniuse.cli import cli class TestAPI(): def test_package_name_has_been_used(self): assert 'Sorry' in check('requests') assert 'Sorry' in check('flask') assert 'Sorry' in check('pip') def test_package_name_has_not_been_used(self): assert 'Congratulation' in check('this_package_name_has_not_been_used') assert 'Congratulation' in \ check('you_will_never_use_this_package_name') assert 'Congratulation' in \ check('I_suck_and_my_tests_are_order_dependent') class TestCLI(): def test_package_name_has_been_used(self): runner = CliRunner() result_one = runner.invoke(cli, ['requests']) assert 'Sorry' in result_one.output result_two = runner.invoke(cli, ['flask']) assert 'Sorry' in result_two.output result_three = runner.invoke(cli, ['pip']) assert 'Sorry' in result_three.output def test_package_name_has_not_been_used(self): runner = CliRunner() result_one = runner.invoke( cli, ['this_package_name_has_not_been_used']) assert 'Congratulation' in result_one.output result_two = runner.invoke( cli, ['you_will_never_use_this_package_name']) assert 'Congratulation' in result_two.output result_three = runner.invoke( cli, ['I_suck_and_my_tests_are_order_dependent']) assert 'Congratulation' in result_three.output
Add tests for cli.py to improve code coverage
Add tests for cli.py to improve code coverage
Python
mit
lord63/caniuse
python
## Code Before: from __future__ import absolute_import import pytest from caniuse.main import check def test_package_name_has_been_used(): assert 'Sorry' in check('requests') assert 'Sorry' in check('flask') assert 'Sorry' in check('pip') def test_package_name_has_not_been_used(): assert 'Congratulation' in check('this_package_name_has_not_been_used') assert 'Congratulation' in check('you_will_never_use_this_package_name') assert 'Congratulation' in check('I_suck_and_my_tests_are_order_dependent') ## Instruction: Add tests for cli.py to improve code coverage ## Code After: from __future__ import absolute_import import pytest from click.testing import CliRunner from caniuse.main import check from caniuse.cli import cli class TestAPI(): def test_package_name_has_been_used(self): assert 'Sorry' in check('requests') assert 'Sorry' in check('flask') assert 'Sorry' in check('pip') def test_package_name_has_not_been_used(self): assert 'Congratulation' in check('this_package_name_has_not_been_used') assert 'Congratulation' in \ check('you_will_never_use_this_package_name') assert 'Congratulation' in \ check('I_suck_and_my_tests_are_order_dependent') class TestCLI(): def test_package_name_has_been_used(self): runner = CliRunner() result_one = runner.invoke(cli, ['requests']) assert 'Sorry' in result_one.output result_two = runner.invoke(cli, ['flask']) assert 'Sorry' in result_two.output result_three = runner.invoke(cli, ['pip']) assert 'Sorry' in result_three.output def test_package_name_has_not_been_used(self): runner = CliRunner() result_one = runner.invoke( cli, ['this_package_name_has_not_been_used']) assert 'Congratulation' in result_one.output result_two = runner.invoke( cli, ['you_will_never_use_this_package_name']) assert 'Congratulation' in result_two.output result_three = runner.invoke( cli, ['I_suck_and_my_tests_are_order_dependent']) assert 'Congratulation' in result_three.output
from __future__ import absolute_import import pytest + from click.testing import CliRunner from caniuse.main import check + from caniuse.cli import cli + class TestAPI(): - def test_package_name_has_been_used(): + def test_package_name_has_been_used(self): ? ++++ ++++ - assert 'Sorry' in check('requests') + assert 'Sorry' in check('requests') ? ++++ - assert 'Sorry' in check('flask') + assert 'Sorry' in check('flask') ? ++++ - assert 'Sorry' in check('pip') + assert 'Sorry' in check('pip') ? ++++ + + def test_package_name_has_not_been_used(self): + assert 'Congratulation' in check('this_package_name_has_not_been_used') + assert 'Congratulation' in \ + check('you_will_never_use_this_package_name') + assert 'Congratulation' in \ + check('I_suck_and_my_tests_are_order_dependent') + class TestCLI(): + def test_package_name_has_been_used(self): + runner = CliRunner() + result_one = runner.invoke(cli, ['requests']) + assert 'Sorry' in result_one.output + + result_two = runner.invoke(cli, ['flask']) + assert 'Sorry' in result_two.output + + result_three = runner.invoke(cli, ['pip']) + assert 'Sorry' in result_three.output + - def test_package_name_has_not_been_used(): + def test_package_name_has_not_been_used(self): ? ++++ ++++ - assert 'Congratulation' in check('this_package_name_has_not_been_used') - assert 'Congratulation' in check('you_will_never_use_this_package_name') - assert 'Congratulation' in check('I_suck_and_my_tests_are_order_dependent') + runner = CliRunner() + result_one = runner.invoke( + cli, ['this_package_name_has_not_been_used']) + assert 'Congratulation' in result_one.output + + result_two = runner.invoke( + cli, ['you_will_never_use_this_package_name']) + assert 'Congratulation' in result_two.output + + result_three = runner.invoke( + cli, ['I_suck_and_my_tests_are_order_dependent']) + assert 'Congratulation' in result_three.output
47
2.611111
39
8
0a463ae89468b03bfe31f630115a3661cedb9e73
examples/dc_GetServerDescriptor-simple.php
examples/dc_GetServerDescriptor-simple.php
<?php require_once 'common.php'; use Dapphp\TorUtils\DirectoryClient; $client = new DirectoryClient(); //$client->setPreferredServer('1.2.3.4:80'); // Optional server to always use first for directory lookups try { $descriptor = $client->getServerDescriptor('79E169B25E4C7CE99584F6ED06F379478F23E2B8'); } catch (\Exception $ex) { echo "Request to directory failed: " . $ex->getMessage() . "\n"; exit; } echo sprintf("%-19s %40s\n", $descriptor->nickname, $descriptor->fingerprint); echo sprintf("Running %s\n", $descriptor->platform); echo sprintf("Online for %s\n", uptimeToString($descriptor->getCurrentUptime(), false)); echo sprintf("OR Address: %s:%s", $descriptor->ip_address, $descriptor->or_port); if ($descriptor->or_address) { foreach ($descriptor->or_address as $address) { echo ", $address"; } } echo "\n"; echo sprintf("Exit Policy:\n Accept:\n %s\n Reject:\n %s\n", implode("\n ", $descriptor->exit_policy4['accept']), implode("\n ", $descriptor->exit_policy4['reject']) );
<?php require_once 'common.php'; use Dapphp\TorUtils\DirectoryClient; $client = new DirectoryClient(); //$client->setPreferredServer('1.2.3.4:80'); // Optional server to always use first for directory lookups try { $descriptor = $client->getServerDescriptor('81C55D403A82BF6E7C3FBDBD41D102B7088900D9'); } catch (\Exception $ex) { echo "Request to directory failed: " . $ex->getMessage() . "\n"; exit; } echo sprintf("%-19s %40s\n", $descriptor->nickname, $descriptor->fingerprint); echo sprintf("Running %s\n", $descriptor->platform); echo sprintf("Online for %s\n", uptimeToString($descriptor->getCurrentUptime(), false)); echo sprintf("OR Address: %s:%s", $descriptor->ip_address, $descriptor->or_port); if ($descriptor->or_address) { foreach ($descriptor->or_address as $address) { echo ", $address"; } } echo "\n"; echo sprintf("Exit Policy:\n Accept:\n %s\n Reject:\n %s\n", implode("\n ", $descriptor->exit_policy4['accept']), implode("\n ", $descriptor->exit_policy4['reject']) );
Update example with working relay
Update example with working relay
PHP
bsd-3-clause
dapphp/TorUtils
php
## Code Before: <?php require_once 'common.php'; use Dapphp\TorUtils\DirectoryClient; $client = new DirectoryClient(); //$client->setPreferredServer('1.2.3.4:80'); // Optional server to always use first for directory lookups try { $descriptor = $client->getServerDescriptor('79E169B25E4C7CE99584F6ED06F379478F23E2B8'); } catch (\Exception $ex) { echo "Request to directory failed: " . $ex->getMessage() . "\n"; exit; } echo sprintf("%-19s %40s\n", $descriptor->nickname, $descriptor->fingerprint); echo sprintf("Running %s\n", $descriptor->platform); echo sprintf("Online for %s\n", uptimeToString($descriptor->getCurrentUptime(), false)); echo sprintf("OR Address: %s:%s", $descriptor->ip_address, $descriptor->or_port); if ($descriptor->or_address) { foreach ($descriptor->or_address as $address) { echo ", $address"; } } echo "\n"; echo sprintf("Exit Policy:\n Accept:\n %s\n Reject:\n %s\n", implode("\n ", $descriptor->exit_policy4['accept']), implode("\n ", $descriptor->exit_policy4['reject']) ); ## Instruction: Update example with working relay ## Code After: <?php require_once 'common.php'; use Dapphp\TorUtils\DirectoryClient; $client = new DirectoryClient(); //$client->setPreferredServer('1.2.3.4:80'); // Optional server to always use first for directory lookups try { $descriptor = $client->getServerDescriptor('81C55D403A82BF6E7C3FBDBD41D102B7088900D9'); } catch (\Exception $ex) { echo "Request to directory failed: " . $ex->getMessage() . "\n"; exit; } echo sprintf("%-19s %40s\n", $descriptor->nickname, $descriptor->fingerprint); echo sprintf("Running %s\n", $descriptor->platform); echo sprintf("Online for %s\n", uptimeToString($descriptor->getCurrentUptime(), false)); echo sprintf("OR Address: %s:%s", $descriptor->ip_address, $descriptor->or_port); if ($descriptor->or_address) { foreach ($descriptor->or_address as $address) { echo ", $address"; } } echo "\n"; echo sprintf("Exit Policy:\n Accept:\n %s\n Reject:\n %s\n", implode("\n ", $descriptor->exit_policy4['accept']), implode("\n ", $descriptor->exit_policy4['reject']) );
<?php require_once 'common.php'; use Dapphp\TorUtils\DirectoryClient; $client = new DirectoryClient(); //$client->setPreferredServer('1.2.3.4:80'); // Optional server to always use first for directory lookups try { - $descriptor = $client->getServerDescriptor('79E169B25E4C7CE99584F6ED06F379478F23E2B8'); + $descriptor = $client->getServerDescriptor('81C55D403A82BF6E7C3FBDBD41D102B7088900D9'); } catch (\Exception $ex) { echo "Request to directory failed: " . $ex->getMessage() . "\n"; exit; } echo sprintf("%-19s %40s\n", $descriptor->nickname, $descriptor->fingerprint); echo sprintf("Running %s\n", $descriptor->platform); echo sprintf("Online for %s\n", uptimeToString($descriptor->getCurrentUptime(), false)); echo sprintf("OR Address: %s:%s", $descriptor->ip_address, $descriptor->or_port); if ($descriptor->or_address) { foreach ($descriptor->or_address as $address) { echo ", $address"; } } echo "\n"; echo sprintf("Exit Policy:\n Accept:\n %s\n Reject:\n %s\n", implode("\n ", $descriptor->exit_policy4['accept']), implode("\n ", $descriptor->exit_policy4['reject']) );
2
0.0625
1
1
795f9ebf2e3ac06d5a22c2cfb1cdc1df2c0dcc15
difffiles.sh
difffiles.sh
if [ $1 ] && [ $2 ]; then cmd="diff --suppress-blank-empty --suppress-common-lines --ignore-all-space" if [[ $3 == *"-u"* ]]; then cme=" --unified=0" fi cmf=" $1 $2 | grep -vE '^Only|^---|^\+\+\+|@@\s' | sed 's/^diff.* /\nFILE: /g'" echo Issuing Command: \`$cmd $cme $cmf\' eval $cmd $cme $cmf | GREP_COLOR="0;32" egrep --color=always '^<.*|^\+.*|$' \ | GREP_COLOR="0;31" egrep --color=always '^>.*|^\-.*|$' else echo 'Usage: ./this <dir1> <dir2> [opts]' echo ' -u' echo ' unified diff, rather than split into columns' fi
if [[ $1 == *"-h"* ]]; then echo 'Usage: ./this <dir1> <dir2> [opts]' echo ' -u' echo ' unified diff, rather than split into columns' exit 0 elif [ -z $1 ] || [ -z $2 ]; then here=${HOME} there=${HOME}/env else here=$1 there=$2 fi cmd="diff --suppress-blank-empty --suppress-common-lines --ignore-all-space" if [[ $3 == *"-u"* ]]; then cme=" --unified=0" fi # finally: cmf=" $here $there | grep -vE '^Only|^---|^\+\+\+|@@\s' | sed 's/^diff.* /\nFILE: /g'" echo Issuing Command: \`$cmd $cme $cmf\' eval $cmd $cme $cmf | GREP_COLOR="0;32" egrep --color=always '^<.*|^\+.*|$' \ | GREP_COLOR="0;31" egrep --color=always '^>.*|^\-.*|$'
Update directory diff script to set defaults
Update directory diff script to set defaults While here, add help/usage text parameter
Shell
mit
jm-janzen/scripts,jm-janzen/scripts,jm-janzen/scripts
shell
## Code Before: if [ $1 ] && [ $2 ]; then cmd="diff --suppress-blank-empty --suppress-common-lines --ignore-all-space" if [[ $3 == *"-u"* ]]; then cme=" --unified=0" fi cmf=" $1 $2 | grep -vE '^Only|^---|^\+\+\+|@@\s' | sed 's/^diff.* /\nFILE: /g'" echo Issuing Command: \`$cmd $cme $cmf\' eval $cmd $cme $cmf | GREP_COLOR="0;32" egrep --color=always '^<.*|^\+.*|$' \ | GREP_COLOR="0;31" egrep --color=always '^>.*|^\-.*|$' else echo 'Usage: ./this <dir1> <dir2> [opts]' echo ' -u' echo ' unified diff, rather than split into columns' fi ## Instruction: Update directory diff script to set defaults While here, add help/usage text parameter ## Code After: if [[ $1 == *"-h"* ]]; then echo 'Usage: ./this <dir1> <dir2> [opts]' echo ' -u' echo ' unified diff, rather than split into columns' exit 0 elif [ -z $1 ] || [ -z $2 ]; then here=${HOME} there=${HOME}/env else here=$1 there=$2 fi cmd="diff --suppress-blank-empty --suppress-common-lines --ignore-all-space" if [[ $3 == *"-u"* ]]; then cme=" --unified=0" fi # finally: cmf=" $here $there | grep -vE '^Only|^---|^\+\+\+|@@\s' | sed 's/^diff.* /\nFILE: /g'" echo Issuing Command: \`$cmd $cme $cmf\' eval $cmd $cme $cmf | GREP_COLOR="0;32" egrep --color=always '^<.*|^\+.*|$' \ | GREP_COLOR="0;31" egrep --color=always '^>.*|^\-.*|$'
- if [ $1 ] && [ $2 ]; then - - cmd="diff --suppress-blank-empty --suppress-common-lines --ignore-all-space" - - if [[ $3 == *"-u"* ]]; then ? ---- ^ ^ + if [[ $1 == *"-h"* ]]; then ? ^ ^ - cme=" --unified=0" - fi - - cmf=" $1 $2 | grep -vE '^Only|^---|^\+\+\+|@@\s' | sed 's/^diff.* /\nFILE: /g'" - echo Issuing Command: \`$cmd $cme $cmf\' - eval $cmd $cme $cmf | GREP_COLOR="0;32" egrep --color=always '^<.*|^\+.*|$' \ - | GREP_COLOR="0;31" egrep --color=always '^>.*|^\-.*|$' - else echo 'Usage: ./this <dir1> <dir2> [opts]' echo ' -u' echo ' unified diff, rather than split into columns' + exit 0 + elif [ -z $1 ] || [ -z $2 ]; then + here=${HOME} + there=${HOME}/env + else + here=$1 + there=$2 fi + cmd="diff --suppress-blank-empty --suppress-common-lines --ignore-all-space" + + if [[ $3 == *"-u"* ]]; then + cme=" --unified=0" + fi + + # finally: + + cmf=" $here $there | grep -vE '^Only|^---|^\+\+\+|@@\s' | sed 's/^diff.* /\nFILE: /g'" + echo Issuing Command: \`$cmd $cme $cmf\' + eval $cmd $cme $cmf | GREP_COLOR="0;32" egrep --color=always '^<.*|^\+.*|$' \ + | GREP_COLOR="0;31" egrep --color=always '^>.*|^\-.*|$'
33
1.736842
20
13
1c5194a9b8390a3113fd59502cd5fd33e2bd7271
README.md
README.md
Getting started: # Android * cordova add android * cordova plugin add ../cordova-plugin-video-thumbnailer ## Usage If using the Cordova CLI (or plugman) to install the plugin, there will be a javascript variable available for you to use called 'thumbnailer'. You will usually call a create method with a file:// path to a video or image. Thumbnail from an image: `thumbnailer.createImageThumbnail(path, callback);` Thumbnail from a video: `thumbnailer.createVideoThumbnail(path, callback);`
Android only (for the time) # Getting started on Android * cordova add android * cordova plugin add ../cordova-plugin-video-thumbnailer ## Usage If using the Cordova CLI (or plugman) to install the plugin, there will be a javascript variable available for you to use called 'thumbnailer'. You will usually call a create method with a file:// path to a video or image. Thumbnail from an image: `thumbnailer.createImageThumbnail(path, callback);` Thumbnail from a video: `thumbnailer.createVideoThumbnail(path, callback);`
Fix for android only message
Fix for android only message
Markdown
apache-2.0
jbavari/cordova-plugin-video-thumbnailer,jbavari/cordova-plugin-video-thumbnailer
markdown
## Code Before: Getting started: # Android * cordova add android * cordova plugin add ../cordova-plugin-video-thumbnailer ## Usage If using the Cordova CLI (or plugman) to install the plugin, there will be a javascript variable available for you to use called 'thumbnailer'. You will usually call a create method with a file:// path to a video or image. Thumbnail from an image: `thumbnailer.createImageThumbnail(path, callback);` Thumbnail from a video: `thumbnailer.createVideoThumbnail(path, callback);` ## Instruction: Fix for android only message ## Code After: Android only (for the time) # Getting started on Android * cordova add android * cordova plugin add ../cordova-plugin-video-thumbnailer ## Usage If using the Cordova CLI (or plugman) to install the plugin, there will be a javascript variable available for you to use called 'thumbnailer'. You will usually call a create method with a file:// path to a video or image. Thumbnail from an image: `thumbnailer.createImageThumbnail(path, callback);` Thumbnail from a video: `thumbnailer.createVideoThumbnail(path, callback);`
- Getting started: - # Android + Android only (for the time) + + # Getting started on Android * cordova add android * cordova plugin add ../cordova-plugin-video-thumbnailer - ## Usage If using the Cordova CLI (or plugman) to install the plugin, there will be a javascript variable available for you to use called 'thumbnailer'. You will usually call a create method with a file:// path to a video or image. Thumbnail from an image: `thumbnailer.createImageThumbnail(path, callback);` Thumbnail from a video: `thumbnailer.createVideoThumbnail(path, callback);`
6
0.315789
3
3
3350b0f5a4ab526d2703a0b904b1b9d7db9f6779
StudyBox_iOS/AppInfoScreen.swift
StudyBox_iOS/AppInfoScreen.swift
// // AppInfoScreen.swift // StudyBox_iOS // // Created by Kacper Cz on 28.05.2016. // Copyright © 2016 BLStream. All rights reserved. // import UIKit class AppInfoScreen: StudyBoxViewController, UITextViewDelegate { @IBOutlet weak var infoTextView: UITextView! private var navbarHeight: CGFloat { return self.navigationController?.navigationBar.frame.height ?? 0 } override func viewDidLoad() { super.viewDidLoad() self.title = "O programie" infoTextView.contentInset.top = -navbarHeight - 20 //because of status bar } }
// // AppInfoScreen.swift // StudyBox_iOS // // Created by Kacper Cz on 28.05.2016. // Copyright © 2016 BLStream. All rights reserved. // import UIKit class AppInfoScreen: StudyBoxViewController, UITextViewDelegate { @IBOutlet weak var infoTextView: UITextView! private var navbarHeight: CGFloat { return self.navigationController?.navigationBar.frame.height ?? 0 } override func viewDidLoad() { super.viewDidLoad() self.title = "O programie" infoTextView.contentInset.top = -navbarHeight - UIApplication.sharedApplication().statusBarFrame.height } }
Replace constant with native status bar height
Replace constant with native status bar height
Swift
apache-2.0
blstream/StudyBox_iOS,blstream/StudyBox_iOS,blstream/StudyBox_iOS
swift
## Code Before: // // AppInfoScreen.swift // StudyBox_iOS // // Created by Kacper Cz on 28.05.2016. // Copyright © 2016 BLStream. All rights reserved. // import UIKit class AppInfoScreen: StudyBoxViewController, UITextViewDelegate { @IBOutlet weak var infoTextView: UITextView! private var navbarHeight: CGFloat { return self.navigationController?.navigationBar.frame.height ?? 0 } override func viewDidLoad() { super.viewDidLoad() self.title = "O programie" infoTextView.contentInset.top = -navbarHeight - 20 //because of status bar } } ## Instruction: Replace constant with native status bar height ## Code After: // // AppInfoScreen.swift // StudyBox_iOS // // Created by Kacper Cz on 28.05.2016. // Copyright © 2016 BLStream. All rights reserved. // import UIKit class AppInfoScreen: StudyBoxViewController, UITextViewDelegate { @IBOutlet weak var infoTextView: UITextView! private var navbarHeight: CGFloat { return self.navigationController?.navigationBar.frame.height ?? 0 } override func viewDidLoad() { super.viewDidLoad() self.title = "O programie" infoTextView.contentInset.top = -navbarHeight - UIApplication.sharedApplication().statusBarFrame.height } }
// // AppInfoScreen.swift // StudyBox_iOS // // Created by Kacper Cz on 28.05.2016. // Copyright © 2016 BLStream. All rights reserved. // import UIKit class AppInfoScreen: StudyBoxViewController, UITextViewDelegate { @IBOutlet weak var infoTextView: UITextView! private var navbarHeight: CGFloat { return self.navigationController?.navigationBar.frame.height ?? 0 } override func viewDidLoad() { super.viewDidLoad() self.title = "O programie" - infoTextView.contentInset.top = -navbarHeight - 20 //because of status bar + infoTextView.contentInset.top = -navbarHeight - UIApplication.sharedApplication().statusBarFrame.height } }
2
0.083333
1
1
0d2079b1dcb97708dc55c32d9e2c1a0f12595875
salt/runners/launchd.py
salt/runners/launchd.py
''' Manage launchd plist files ''' # Import python libs import os import sys def write_launchd_plist(program): ''' Write a launchd plist for managing salt-master or salt-minion CLI Example: .. code-block:: bash salt-run launchd.write_launchd_plist salt-master ''' plist_sample_text = """ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>org.saltstack.{program}</string> <key>ProgramArguments</key> <array> <string>{python}</string> <string>{script}</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist> """.strip() supported_programs = ['salt-master', 'salt-minion'] if program not in supported_programs: sys.stderr.write("Supported programs: %r\n" % supported_programs) sys.exit(-1) sys.stdout.write( plist_sample_text.format( program=program, python=sys.executable, script=os.path.join(os.path.dirname(sys.executable), program) ) )
''' Manage launchd plist files ''' # Import python libs import os import sys def write_launchd_plist(program): ''' Write a launchd plist for managing salt-master or salt-minion CLI Example: .. code-block:: bash salt-run launchd.write_launchd_plist salt-master ''' plist_sample_text = ''' <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>org.saltstack.{program}</string> <key>ProgramArguments</key> <array> <string>{python}</string> <string>{script}</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist> '''.strip() supported_programs = ['salt-master', 'salt-minion'] if program not in supported_programs: sys.stderr.write('Supported programs: {0!r}\n'.format(supported_programs)) sys.exit(-1) sys.stdout.write( plist_sample_text.format( program=program, python=sys.executable, script=os.path.join(os.path.dirname(sys.executable), program) ) )
Replace string substitution with string formatting
Replace string substitution with string formatting
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
python
## Code Before: ''' Manage launchd plist files ''' # Import python libs import os import sys def write_launchd_plist(program): ''' Write a launchd plist for managing salt-master or salt-minion CLI Example: .. code-block:: bash salt-run launchd.write_launchd_plist salt-master ''' plist_sample_text = """ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>org.saltstack.{program}</string> <key>ProgramArguments</key> <array> <string>{python}</string> <string>{script}</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist> """.strip() supported_programs = ['salt-master', 'salt-minion'] if program not in supported_programs: sys.stderr.write("Supported programs: %r\n" % supported_programs) sys.exit(-1) sys.stdout.write( plist_sample_text.format( program=program, python=sys.executable, script=os.path.join(os.path.dirname(sys.executable), program) ) ) ## Instruction: Replace string substitution with string formatting ## Code After: ''' Manage launchd plist files ''' # Import python libs import os import sys def write_launchd_plist(program): ''' Write a launchd plist for managing salt-master or salt-minion CLI Example: .. code-block:: bash salt-run launchd.write_launchd_plist salt-master ''' plist_sample_text = ''' <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>org.saltstack.{program}</string> <key>ProgramArguments</key> <array> <string>{python}</string> <string>{script}</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist> '''.strip() supported_programs = ['salt-master', 'salt-minion'] if program not in supported_programs: sys.stderr.write('Supported programs: {0!r}\n'.format(supported_programs)) sys.exit(-1) sys.stdout.write( plist_sample_text.format( program=program, python=sys.executable, script=os.path.join(os.path.dirname(sys.executable), program) ) )
''' Manage launchd plist files ''' # Import python libs import os import sys def write_launchd_plist(program): ''' Write a launchd plist for managing salt-master or salt-minion CLI Example: .. code-block:: bash salt-run launchd.write_launchd_plist salt-master ''' - plist_sample_text = """ ? ^^^ + plist_sample_text = ''' ? ^^^ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>org.saltstack.{program}</string> <key>ProgramArguments</key> <array> <string>{python}</string> <string>{script}</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist> - """.strip() ? ^^^ + '''.strip() ? ^^^ supported_programs = ['salt-master', 'salt-minion'] if program not in supported_programs: - sys.stderr.write("Supported programs: %r\n" % supported_programs) ? ^ ^ ^^^^ + sys.stderr.write('Supported programs: {0!r}\n'.format(supported_programs)) ? ^ ^^^ + ^^^^^^^^^ + sys.exit(-1) sys.stdout.write( plist_sample_text.format( program=program, python=sys.executable, script=os.path.join(os.path.dirname(sys.executable), program) ) )
6
0.115385
3
3
d7b225dddbe5497d6af12eb2280544e8518ea6aa
lib/pakyow/console/editors/relation_editor.rb
lib/pakyow/console/editors/relation_editor.rb
Pakyow::Console.editor :relation do |_, related_datum, attribute, datum, datum_type| view = Pakyow::Presenter::ViewContext.new(presenter.store(:console).partial('console/editors', :relation).dup, self) editor = view.scope(:editor)[0] editor.scoped_as = :datum if attribute[:name] == datum_type.name # disallow self-referential relationships view.component(:modal).remove else view.component(:modal).attrs.href = router.group(:data).path(:show, data_id: attribute[:name]) end related_class = attribute[:extras][:class] related_name = attribute[:extras][:relationship] || attribute[:name] object_id = datum ? datum[:id] : nil editor.mutate( :list_relations, with: data(:datum).for_relation(related_class, related_name, datum_type.model, object_id) ).subscribe view.instance_variable_get(:@view) end
Pakyow::Console.editor :relation do |_, related_datum, attribute, datum, datum_type| view = Pakyow::Presenter::ViewContext.new(presenter.store(:console).partial('console/editors', :relation).dup, self) editor = view.scope(:editor)[0] editor.scoped_as = :datum view.component(:modal).with do |view| # disallow self-referential relationships if attribute[:name] == datum_type.name view.remove else view.attrs.href = router.group(:data).path(:show, data_id: attribute[:name]) end end related_class = attribute[:extras][:class] related_name = attribute[:extras][:relationship] || attribute[:name] object_id = datum ? datum[:id] : nil editor.mutate( :list_relations, with: data(:datum).for_relation(related_class, related_name, datum_type.model, object_id) ).subscribe view.instance_variable_get(:@view) end
Refactor relation editor view logic
Refactor relation editor view logic Turns out that accepting the view as an argument to `with` allows the block to be evaluated in the current context such that global helpers like `router` are available.
Ruby
mit
metabahn/console,metabahn/console,metabahn/console
ruby
## Code Before: Pakyow::Console.editor :relation do |_, related_datum, attribute, datum, datum_type| view = Pakyow::Presenter::ViewContext.new(presenter.store(:console).partial('console/editors', :relation).dup, self) editor = view.scope(:editor)[0] editor.scoped_as = :datum if attribute[:name] == datum_type.name # disallow self-referential relationships view.component(:modal).remove else view.component(:modal).attrs.href = router.group(:data).path(:show, data_id: attribute[:name]) end related_class = attribute[:extras][:class] related_name = attribute[:extras][:relationship] || attribute[:name] object_id = datum ? datum[:id] : nil editor.mutate( :list_relations, with: data(:datum).for_relation(related_class, related_name, datum_type.model, object_id) ).subscribe view.instance_variable_get(:@view) end ## Instruction: Refactor relation editor view logic Turns out that accepting the view as an argument to `with` allows the block to be evaluated in the current context such that global helpers like `router` are available. ## Code After: Pakyow::Console.editor :relation do |_, related_datum, attribute, datum, datum_type| view = Pakyow::Presenter::ViewContext.new(presenter.store(:console).partial('console/editors', :relation).dup, self) editor = view.scope(:editor)[0] editor.scoped_as = :datum view.component(:modal).with do |view| # disallow self-referential relationships if attribute[:name] == datum_type.name view.remove else view.attrs.href = router.group(:data).path(:show, data_id: attribute[:name]) end end related_class = attribute[:extras][:class] related_name = attribute[:extras][:relationship] || attribute[:name] object_id = datum ? datum[:id] : nil editor.mutate( :list_relations, with: data(:datum).for_relation(related_class, related_name, datum_type.model, object_id) ).subscribe view.instance_variable_get(:@view) end
Pakyow::Console.editor :relation do |_, related_datum, attribute, datum, datum_type| view = Pakyow::Presenter::ViewContext.new(presenter.store(:console).partial('console/editors', :relation).dup, self) editor = view.scope(:editor)[0] editor.scoped_as = :datum - if attribute[:name] == datum_type.name + view.component(:modal).with do |view| # disallow self-referential relationships - view.component(:modal).remove + if attribute[:name] == datum_type.name + view.remove - else + else ? ++ - view.component(:modal).attrs.href = router.group(:data).path(:show, data_id: attribute[:name]) ? ------------------ + view.attrs.href = router.group(:data).path(:show, data_id: attribute[:name]) ? ++ + end end related_class = attribute[:extras][:class] related_name = attribute[:extras][:relationship] || attribute[:name] object_id = datum ? datum[:id] : nil editor.mutate( :list_relations, with: data(:datum).for_relation(related_class, related_name, datum_type.model, object_id) ).subscribe view.instance_variable_get(:@view) end
10
0.434783
6
4
60097f04f4f477b7cb692ded4fb66734537a8dec
sass/generals.scss
sass/generals.scss
%icono-stroke{ border: $U2 solid; } %stickCenterV{ @include stickCenterV; } %stickCenterH{ @include stickCenterH; } %stickCenter{ @include stickCenter; } .spin[class*="spin"]{ animation: loading-spinner 2s infinite linear; } @keyframes loading-spinner { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
%icono-stroke{ border: $U2 solid; } %stickCenterV{ @include stickCenterV; } %stickCenterH{ @include stickCenterH; } %stickCenter{ @include stickCenter; } .spin{ animation: loading-spinner 2s infinite linear; &.step{ animation: loading-spinner 0.5s steps(8, end) infinite; } } @keyframes loading-spinner { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
Add .spin.step class to SCSS (already exists in LESS/Stylus)
Add .spin.step class to SCSS (already exists in LESS/Stylus)
SCSS
mit
saeedalipoor/icono,saeedalipoor/icono
scss
## Code Before: %icono-stroke{ border: $U2 solid; } %stickCenterV{ @include stickCenterV; } %stickCenterH{ @include stickCenterH; } %stickCenter{ @include stickCenter; } .spin[class*="spin"]{ animation: loading-spinner 2s infinite linear; } @keyframes loading-spinner { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } ## Instruction: Add .spin.step class to SCSS (already exists in LESS/Stylus) ## Code After: %icono-stroke{ border: $U2 solid; } %stickCenterV{ @include stickCenterV; } %stickCenterH{ @include stickCenterH; } %stickCenter{ @include stickCenter; } .spin{ animation: loading-spinner 2s infinite linear; &.step{ animation: loading-spinner 0.5s steps(8, end) infinite; } } @keyframes loading-spinner { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
%icono-stroke{ border: $U2 solid; } %stickCenterV{ @include stickCenterV; } %stickCenterH{ @include stickCenterH; } %stickCenter{ @include stickCenter; } - .spin[class*="spin"]{ + .spin{ animation: loading-spinner 2s infinite linear; + &.step{ + animation: loading-spinner 0.5s steps(8, end) infinite; + } } @keyframes loading-spinner { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
5
0.217391
4
1
f917cf273c0394f08a6075ec928675a732bb6c26
cmake_modules/FindOpenMP3.cmake
cmake_modules/FindOpenMP3.cmake
find_package(OpenMP) if (OPENMP_FOUND) set(CMAKE_REQUIRED_FLAGS ${OpenMP_CXX_FLAGS}) set(mybody "#include <omp.h> int main() { #pragma omp taskwait return 0; }") check_cxx_source_compiles("${mybody}" OpenMP3) set(CMAKE_REQUIRED_FLAGS ) if ("${OpenMP3}" MATCHES "1") message(STATUS "OpenMP 3 is supported and will be used") else() message(STATUS "OpenMP 3 not supported - will not be used") set(OpenMP_CXX_FLAGS "" CACHE STRING "OpenMP flags" FORCE) set(OPENMP_FOUND FALSE) endif() endif()
find_package(OpenMP) if (OPENMP_FOUND) set(CMAKE_REQUIRED_FLAGS ${OpenMP_CXX_FLAGS}) set(mybody "#include <omp.h> int main() { omp_sched_t kind; int chunk_size; omp_get_schedule(&kind, &chunk_size); return chunk_size; }") check_cxx_source_compiles("${mybody}" OpenMP3) set(CMAKE_REQUIRED_FLAGS ) if ("${OpenMP3}" MATCHES "1") message(STATUS "OpenMP 3 is supported and will be used") else() message(STATUS "OpenMP 3 not supported - will not be used") set(OpenMP_CXX_FLAGS "" CACHE STRING "OpenMP flags" FORCE) set(OPENMP_FOUND FALSE) endif() endif()
Add a better test for OpenMP 3
Add a better test for OpenMP 3 Our previous test for OpenMP 3 used a pragma that was only present in OpenMP 3 (not 2). However, this didn't work because most compilers simply ignore unknown pragmas. Replace with a call to a function that's only present in OpenMP 3, so that compilation will decisively fail. This should fix the Mac 10.6 build, which was including OpenMP support even though the gcc version in OS X 10.6 only supports OpenMP 2.5. As an aside, recent cmake versions extract the OpenMP vesion number, which would simplify this test in the future once we can require a new enough cmake.
CMake
apache-2.0
salilab/rmf,salilab/rmf,salilab/rmf,salilab/rmf
cmake
## Code Before: find_package(OpenMP) if (OPENMP_FOUND) set(CMAKE_REQUIRED_FLAGS ${OpenMP_CXX_FLAGS}) set(mybody "#include <omp.h> int main() { #pragma omp taskwait return 0; }") check_cxx_source_compiles("${mybody}" OpenMP3) set(CMAKE_REQUIRED_FLAGS ) if ("${OpenMP3}" MATCHES "1") message(STATUS "OpenMP 3 is supported and will be used") else() message(STATUS "OpenMP 3 not supported - will not be used") set(OpenMP_CXX_FLAGS "" CACHE STRING "OpenMP flags" FORCE) set(OPENMP_FOUND FALSE) endif() endif() ## Instruction: Add a better test for OpenMP 3 Our previous test for OpenMP 3 used a pragma that was only present in OpenMP 3 (not 2). However, this didn't work because most compilers simply ignore unknown pragmas. Replace with a call to a function that's only present in OpenMP 3, so that compilation will decisively fail. This should fix the Mac 10.6 build, which was including OpenMP support even though the gcc version in OS X 10.6 only supports OpenMP 2.5. As an aside, recent cmake versions extract the OpenMP vesion number, which would simplify this test in the future once we can require a new enough cmake. ## Code After: find_package(OpenMP) if (OPENMP_FOUND) set(CMAKE_REQUIRED_FLAGS ${OpenMP_CXX_FLAGS}) set(mybody "#include <omp.h> int main() { omp_sched_t kind; int chunk_size; omp_get_schedule(&kind, &chunk_size); return chunk_size; }") check_cxx_source_compiles("${mybody}" OpenMP3) set(CMAKE_REQUIRED_FLAGS ) if ("${OpenMP3}" MATCHES "1") message(STATUS "OpenMP 3 is supported and will be used") else() message(STATUS "OpenMP 3 not supported - will not be used") set(OpenMP_CXX_FLAGS "" CACHE STRING "OpenMP flags" FORCE) set(OPENMP_FOUND FALSE) endif() endif()
find_package(OpenMP) if (OPENMP_FOUND) set(CMAKE_REQUIRED_FLAGS ${OpenMP_CXX_FLAGS}) set(mybody "#include <omp.h> int main() { - #pragma omp taskwait - return 0; + omp_sched_t kind; + int chunk_size; + omp_get_schedule(&kind, &chunk_size); + return chunk_size; }") check_cxx_source_compiles("${mybody}" OpenMP3) set(CMAKE_REQUIRED_FLAGS ) if ("${OpenMP3}" MATCHES "1") message(STATUS "OpenMP 3 is supported and will be used") else() message(STATUS "OpenMP 3 not supported - will not be used") set(OpenMP_CXX_FLAGS "" CACHE STRING "OpenMP flags" FORCE) set(OPENMP_FOUND FALSE) endif() endif()
6
0.315789
4
2
bcca91dc90beff40de5e12b081613456cec9d93a
templates/registration/activate.html
templates/registration/activate.html
{% extends "base.html" %} {% load i18n %} {% block head_title %}{% trans "Account activation" %}{% endblock %} {% block base_content %}{% url auth_login as auth_login_url %} <div class="content-page generic container_12"> <div class="grid_12 content-block"> <h1><span>{% trans "Account activation" %}</span></h1> <h2>{% trans "Oops, something unexpected happened with your account activation" %}</h2> <p>{% trans "Try these steps to get started" %}:</p> <ul> <li>{% trans "Try logging in with your email address and password. You may have already activated your account." %}</li> <li>{% trans "Carefully copy and paste the activation link from the email into your browser instead of clicking on it." %}</li> <li>{% blocktrans %}Still stuck? Email us at <a href="mailto:{{ storybase_contact_email }}">{{storybase_contact_email}}</a> and we'll get you sorted out.{% endblocktrans %}</li> </ul> </div> </div> {% endblock %}
{% extends "base.html" %} {% load i18n %} {% block head_title %}{% trans "Account activation" %}{% endblock %} {% block base_content %}{% url auth_login as auth_login_url %} <div class="content-page generic container_12"> <div class="grid_12 content-block"> <h1><span>{% trans "Account activation" %}</span></h1> <h2>{% trans "Oops, something unexpected happened with your account activation" %}</h2> <p>{% trans "Try these steps to get started" %}:</p> <ul> <li>{% blocktrans %}Try <a href="{{ auth_login_url }}" title="Log In">logging in</a> with your email address and password. You may have already activated your account.{% endblocktrans %}</li> <li>{% trans "Carefully copy and paste the activation link from the email into your browser instead of clicking on it." %}</li> <li>{% blocktrans %}Still stuck? Email us at <a href="mailto:{{ storybase_contact_email }}">{{storybase_contact_email}}</a> and we'll get you sorted out.{% endblocktrans %}</li> </ul> </div> </div> {% endblock %}
Connect login link on activation failure page
Connect login link on activation failure page This got accidently removed in 8e032a4b74d20249050103ec4f1c5438ba626e3a Addresses #836
HTML
mit
denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase
html
## Code Before: {% extends "base.html" %} {% load i18n %} {% block head_title %}{% trans "Account activation" %}{% endblock %} {% block base_content %}{% url auth_login as auth_login_url %} <div class="content-page generic container_12"> <div class="grid_12 content-block"> <h1><span>{% trans "Account activation" %}</span></h1> <h2>{% trans "Oops, something unexpected happened with your account activation" %}</h2> <p>{% trans "Try these steps to get started" %}:</p> <ul> <li>{% trans "Try logging in with your email address and password. You may have already activated your account." %}</li> <li>{% trans "Carefully copy and paste the activation link from the email into your browser instead of clicking on it." %}</li> <li>{% blocktrans %}Still stuck? Email us at <a href="mailto:{{ storybase_contact_email }}">{{storybase_contact_email}}</a> and we'll get you sorted out.{% endblocktrans %}</li> </ul> </div> </div> {% endblock %} ## Instruction: Connect login link on activation failure page This got accidently removed in 8e032a4b74d20249050103ec4f1c5438ba626e3a Addresses #836 ## Code After: {% extends "base.html" %} {% load i18n %} {% block head_title %}{% trans "Account activation" %}{% endblock %} {% block base_content %}{% url auth_login as auth_login_url %} <div class="content-page generic container_12"> <div class="grid_12 content-block"> <h1><span>{% trans "Account activation" %}</span></h1> <h2>{% trans "Oops, something unexpected happened with your account activation" %}</h2> <p>{% trans "Try these steps to get started" %}:</p> <ul> <li>{% blocktrans %}Try <a href="{{ auth_login_url }}" title="Log In">logging in</a> with your email address and password. You may have already activated your account.{% endblocktrans %}</li> <li>{% trans "Carefully copy and paste the activation link from the email into your browser instead of clicking on it." %}</li> <li>{% blocktrans %}Still stuck? Email us at <a href="mailto:{{ storybase_contact_email }}">{{storybase_contact_email}}</a> and we'll get you sorted out.{% endblocktrans %}</li> </ul> </div> </div> {% endblock %}
{% extends "base.html" %} {% load i18n %} {% block head_title %}{% trans "Account activation" %}{% endblock %} {% block base_content %}{% url auth_login as auth_login_url %} <div class="content-page generic container_12"> <div class="grid_12 content-block"> <h1><span>{% trans "Account activation" %}</span></h1> <h2>{% trans "Oops, something unexpected happened with your account activation" %}</h2> <p>{% trans "Try these steps to get started" %}:</p> <ul> - <li>{% trans "Try logging in with your email address and password. You may have already activated your account." %}</li> ? ^ ^ + <li>{% blocktrans %}Try <a href="{{ auth_login_url }}" title="Log In">logging in</a> with your email address and password. You may have already activated your account.{% endblocktrans %}</li> ? +++++ ^^ ++++++++++++++++++++++++++++++++++++++++++++++ ++++ ^^^^^^^^^^^^^^^^ <li>{% trans "Carefully copy and paste the activation link from the email into your browser instead of clicking on it." %}</li> <li>{% blocktrans %}Still stuck? Email us at <a href="mailto:{{ storybase_contact_email }}">{{storybase_contact_email}}</a> and we'll get you sorted out.{% endblocktrans %}</li> </ul> </div> </div> {% endblock %}
2
0.090909
1
1
796ff7b19078c854df1c93743e9c15699da236c3
plugins/guests/windows/cap/change_host_name.rb
plugins/guests/windows/cap/change_host_name.rb
require "log4r" module VagrantPlugins module GuestWindows module Cap module ChangeHostName def self.change_host_name(machine, name) change_host_name_and_wait(machine, name, machine.config.vm.graceful_halt_timeout) end def self.change_host_name_and_wait(machine, name, sleep_timeout) # If the configured name matches the current name, then bail # We cannot use %ComputerName% because it truncates at 15 chars return if machine.communicate.test("if ([System.Net.Dns]::GetHostName() -eq '#{name}') { exit 0 } exit 1") @logger = Log4r::Logger.new("vagrant::windows::change_host_name") # Rename and reboot host if rename succeeded script = <<-EOH $computer = Get-WmiObject -Class Win32_ComputerSystem $retval = $computer.rename("#{name}").returnvalue exit $retval EOH machine.communicate.execute( script, error_class: Errors::RenameComputerFailed, error_key: :rename_computer_failed) machine.guest.capability(:reboot) end end end end end
require "log4r" module VagrantPlugins module GuestWindows module Cap module ChangeHostName def self.change_host_name(machine, name) change_host_name_and_wait(machine, name, machine.config.vm.graceful_halt_timeout) end def self.change_host_name_and_wait(machine, name, sleep_timeout) # If the configured name matches the current name, then bail # We cannot use %ComputerName% because it truncates at 15 chars return if machine.communicate.test("if ([System.Net.Dns]::GetHostName() -eq '#{name}') { exit 0 } exit 1") # Rename and reboot host if rename succeeded script = <<-EOH $computer = Get-WmiObject -Class Win32_ComputerSystem $retval = $computer.rename("#{name}").returnvalue exit $retval EOH machine.communicate.execute( script, error_class: Errors::RenameComputerFailed, error_key: :rename_computer_failed) machine.guest.capability(:reboot) end end end end end
Remove logger from windows hostname cap
Remove logger from windows hostname cap
Ruby
mit
gitebra/vagrant,marxarelli/vagrant,gitebra/vagrant,chrisroberts/vagrant,chrisroberts/vagrant,mitchellh/vagrant,sni/vagrant,marxarelli/vagrant,chrisroberts/vagrant,bryson/vagrant,mitchellh/vagrant,sni/vagrant,chrisroberts/vagrant,gitebra/vagrant,sni/vagrant,gitebra/vagrant,bryson/vagrant,marxarelli/vagrant,bryson/vagrant,marxarelli/vagrant,bryson/vagrant,mitchellh/vagrant,sni/vagrant,mitchellh/vagrant
ruby
## Code Before: require "log4r" module VagrantPlugins module GuestWindows module Cap module ChangeHostName def self.change_host_name(machine, name) change_host_name_and_wait(machine, name, machine.config.vm.graceful_halt_timeout) end def self.change_host_name_and_wait(machine, name, sleep_timeout) # If the configured name matches the current name, then bail # We cannot use %ComputerName% because it truncates at 15 chars return if machine.communicate.test("if ([System.Net.Dns]::GetHostName() -eq '#{name}') { exit 0 } exit 1") @logger = Log4r::Logger.new("vagrant::windows::change_host_name") # Rename and reboot host if rename succeeded script = <<-EOH $computer = Get-WmiObject -Class Win32_ComputerSystem $retval = $computer.rename("#{name}").returnvalue exit $retval EOH machine.communicate.execute( script, error_class: Errors::RenameComputerFailed, error_key: :rename_computer_failed) machine.guest.capability(:reboot) end end end end end ## Instruction: Remove logger from windows hostname cap ## Code After: require "log4r" module VagrantPlugins module GuestWindows module Cap module ChangeHostName def self.change_host_name(machine, name) change_host_name_and_wait(machine, name, machine.config.vm.graceful_halt_timeout) end def self.change_host_name_and_wait(machine, name, sleep_timeout) # If the configured name matches the current name, then bail # We cannot use %ComputerName% because it truncates at 15 chars return if machine.communicate.test("if ([System.Net.Dns]::GetHostName() -eq '#{name}') { exit 0 } exit 1") # Rename and reboot host if rename succeeded script = <<-EOH $computer = Get-WmiObject -Class Win32_ComputerSystem $retval = $computer.rename("#{name}").returnvalue exit $retval EOH machine.communicate.execute( script, error_class: Errors::RenameComputerFailed, error_key: :rename_computer_failed) machine.guest.capability(:reboot) end end end end end
require "log4r" module VagrantPlugins module GuestWindows module Cap module ChangeHostName def self.change_host_name(machine, name) change_host_name_and_wait(machine, name, machine.config.vm.graceful_halt_timeout) end def self.change_host_name_and_wait(machine, name, sleep_timeout) # If the configured name matches the current name, then bail # We cannot use %ComputerName% because it truncates at 15 chars return if machine.communicate.test("if ([System.Net.Dns]::GetHostName() -eq '#{name}') { exit 0 } exit 1") - @logger = Log4r::Logger.new("vagrant::windows::change_host_name") # Rename and reboot host if rename succeeded script = <<-EOH $computer = Get-WmiObject -Class Win32_ComputerSystem $retval = $computer.rename("#{name}").returnvalue exit $retval EOH machine.communicate.execute( script, error_class: Errors::RenameComputerFailed, error_key: :rename_computer_failed) machine.guest.capability(:reboot) end end end end end
1
0.029412
0
1
4e8756b7978aedb9d7b0bb3f9ac9abd4606841c3
test/html/pipeline/syntax_highlight_filter_test.rb
test/html/pipeline/syntax_highlight_filter_test.rb
require "test_helper" SyntaxHighlightFilter = HTML::Pipeline::SyntaxHighlightFilter class HTML::Pipeline::SyntaxHighlightFilterTest < Test::Unit::TestCase def test_highlight_default filter = SyntaxHighlightFilter.new \ "<pre>hello</pre>", :highlight => "coffeescript" doc = filter.call assert_not_empty doc.css ".highlight-coffeescript" end def test_highlight_default_will_not_override filter = SyntaxHighlightFilter.new \ "<pre lang='c'>hello</pre>", :highlight => "coffeescript" doc = filter.call assert_empty doc.css ".highlight-coffeescript" assert_not_empty doc.css ".highlight-c" end end
require "test_helper" SyntaxHighlightFilter = HTML::Pipeline::SyntaxHighlightFilter class HTML::Pipeline::SyntaxHighlightFilterTest < Test::Unit::TestCase def test_highlight_default filter = SyntaxHighlightFilter.new \ "<pre>hello</pre>", :highlight => "coffeescript" doc = filter.call assert !doc.css(".highlight-coffeescript").empty? end def test_highlight_default_will_not_override filter = SyntaxHighlightFilter.new \ "<pre lang='c'>hello</pre>", :highlight => "coffeescript" doc = filter.call assert doc.css(".highlight-coffeescript").empty? assert !doc.css(".highlight-c").empty? end end
Simplify tests for older test/unit
Simplify tests for older test/unit
Ruby
mit
terracatta/html-pipeline,jch/html-pipeline,kbrock/html-pipeline,terracatta/html-pipeline,moskvax/html-pipeline,jch/html-pipeline,github/html-pipeline,charliesome/html-pipeline,kbrock/html-pipeline,gjtorikian/html-pipeline,gjtorikian/html-pipeline,github/html-pipeline,moskvax/html-pipeline
ruby
## Code Before: require "test_helper" SyntaxHighlightFilter = HTML::Pipeline::SyntaxHighlightFilter class HTML::Pipeline::SyntaxHighlightFilterTest < Test::Unit::TestCase def test_highlight_default filter = SyntaxHighlightFilter.new \ "<pre>hello</pre>", :highlight => "coffeescript" doc = filter.call assert_not_empty doc.css ".highlight-coffeescript" end def test_highlight_default_will_not_override filter = SyntaxHighlightFilter.new \ "<pre lang='c'>hello</pre>", :highlight => "coffeescript" doc = filter.call assert_empty doc.css ".highlight-coffeescript" assert_not_empty doc.css ".highlight-c" end end ## Instruction: Simplify tests for older test/unit ## Code After: require "test_helper" SyntaxHighlightFilter = HTML::Pipeline::SyntaxHighlightFilter class HTML::Pipeline::SyntaxHighlightFilterTest < Test::Unit::TestCase def test_highlight_default filter = SyntaxHighlightFilter.new \ "<pre>hello</pre>", :highlight => "coffeescript" doc = filter.call assert !doc.css(".highlight-coffeescript").empty? end def test_highlight_default_will_not_override filter = SyntaxHighlightFilter.new \ "<pre lang='c'>hello</pre>", :highlight => "coffeescript" doc = filter.call assert doc.css(".highlight-coffeescript").empty? assert !doc.css(".highlight-c").empty? end end
require "test_helper" SyntaxHighlightFilter = HTML::Pipeline::SyntaxHighlightFilter class HTML::Pipeline::SyntaxHighlightFilterTest < Test::Unit::TestCase def test_highlight_default filter = SyntaxHighlightFilter.new \ "<pre>hello</pre>", :highlight => "coffeescript" doc = filter.call - assert_not_empty doc.css ".highlight-coffeescript" ? ---------- ^ + assert !doc.css(".highlight-coffeescript").empty? ? + ^ ++++++++ end def test_highlight_default_will_not_override filter = SyntaxHighlightFilter.new \ "<pre lang='c'>hello</pre>", :highlight => "coffeescript" doc = filter.call - assert_empty doc.css ".highlight-coffeescript" ? ------ ^ + assert doc.css(".highlight-coffeescript").empty? ? ^ ++++++++ - assert_not_empty doc.css ".highlight-c" ? ---------- ^ + assert !doc.css(".highlight-c").empty? ? + ^ ++++++++ end end
6
0.272727
3
3
90e480a7d58027ff6b3e5431d1f35409ac3012b0
lib/libvirt.rb
lib/libvirt.rb
require 'ffi' require 'libvirt/connection' require 'libvirt/domain' module Libvirt extend FFI::Library ffi_lib 'libvirt.so.0' attach_function :version, [ :string ], :int # A version in Libvirt's representation class Version attr_reader :version, :type def initialize(type, version) @type = type @version = version end def major version / 1000000 end def minor version % 1000000 / 1000 end def release version % 1000 end def to_s "#{major}.#{minor}.#{release}" end end end
require 'ffi' require 'libvirt/connection' require 'libvirt/domain' module Libvirt def version(type="Xen") library_version = MemoryPointer.new type_version = MemoryPointer.new result = FFI::Libvirt.virGetVersion(library_version, type, type_version) raise ArgumentError, "Failed get version for #{type} connection" if result < 0 [library_version.read_ulong, type_version.read_ulong] ensure library_version.free type_version.free end module_function :version # # # A version in Libvirt's representation # class Version # attr_reader :version, :type # # def initialize(type, version) # @type = type # @version = version # end # # def major # version / 1000000 # end # # def minor # version % 1000000 / 1000 # end # # def release # version % 1000 # end # # def to_s # "#{major}.#{minor}.#{release}" # end # end end
Implement version method for Libvirt module
Implement version method for Libvirt module
Ruby
mit
scalaxy/ruby-libvirt
ruby
## Code Before: require 'ffi' require 'libvirt/connection' require 'libvirt/domain' module Libvirt extend FFI::Library ffi_lib 'libvirt.so.0' attach_function :version, [ :string ], :int # A version in Libvirt's representation class Version attr_reader :version, :type def initialize(type, version) @type = type @version = version end def major version / 1000000 end def minor version % 1000000 / 1000 end def release version % 1000 end def to_s "#{major}.#{minor}.#{release}" end end end ## Instruction: Implement version method for Libvirt module ## Code After: require 'ffi' require 'libvirt/connection' require 'libvirt/domain' module Libvirt def version(type="Xen") library_version = MemoryPointer.new type_version = MemoryPointer.new result = FFI::Libvirt.virGetVersion(library_version, type, type_version) raise ArgumentError, "Failed get version for #{type} connection" if result < 0 [library_version.read_ulong, type_version.read_ulong] ensure library_version.free type_version.free end module_function :version # # # A version in Libvirt's representation # class Version # attr_reader :version, :type # # def initialize(type, version) # @type = type # @version = version # end # # def major # version / 1000000 # end # # def minor # version % 1000000 / 1000 # end # # def release # version % 1000 # end # # def to_s # "#{major}.#{minor}.#{release}" # end # end end
require 'ffi' require 'libvirt/connection' require 'libvirt/domain' module Libvirt - extend FFI::Library - ffi_lib 'libvirt.so.0' + def version(type="Xen") + library_version = MemoryPointer.new + type_version = MemoryPointer.new + result = FFI::Libvirt.virGetVersion(library_version, type, type_version) + raise ArgumentError, "Failed get version for #{type} connection" if result < 0 - attach_function :version, [ :string ], :int - - # A version in Libvirt's representation - class Version - attr_reader :version, :type + [library_version.read_ulong, type_version.read_ulong] + ensure + library_version.free + type_version.free - def initialize(type, version) - @type = type - @version = version - end - - def major - version / 1000000 - end - - def minor - version % 1000000 / 1000 - end - - def release - version % 1000 - end - - def to_s - "#{major}.#{minor}.#{release}" - end end + module_function :version + # + # # A version in Libvirt's representation + # class Version + # attr_reader :version, :type + # + # def initialize(type, version) + # @type = type + # @version = version + # end + # + # def major + # version / 1000000 + # end + # + # def minor + # version % 1000000 / 1000 + # end + # + # def release + # version % 1000 + # end + # + # def to_s + # "#{major}.#{minor}.#{release}" + # end + # end end
63
1.702703
36
27
8d49efd14d88b11efff308bed7992c4834aeebd9
about.html
about.html
--- layout: null section-type: default title: About --- ## About Lorem ipsum dolor sit amet, eam sint magna vivendo ex, et intellegam delicatissimi usu. Purto corpora adipisci eos cu, qui quaestio vulputate ei, an dico dicant eruditi eum. Ut omnium commodo eligendi duo, eu minim consul delicatissimi vim. Te sit errem docendi, saepe expetenda delicatissimi eum et. Ex pri cetero blandit scriptorem, et mel libris tamquam.
--- layout: null section-type: default title: About --- ## About Timeline Jekyll Theme is available on [Github](https://github.com/kirbyt/timeline-jekyll-theme). Lorem ipsum dolor sit amet, eam sint magna vivendo ex, et intellegam delicatissimi usu. Purto corpora adipisci eos cu, qui quaestio vulputate ei, an dico dicant eruditi eum. Ut omnium commodo eligendi duo, eu minim consul delicatissimi vim. Te sit errem docendi, saepe expetenda delicatissimi eum et. Ex pri cetero blandit scriptorem, et mel libris tamquam.
Add link to the github site.
Add link to the github site.
HTML
apache-2.0
kirbyt/timeline-jekyll-theme,huangxok/timeline-jekyll-theme,honnet/honnet.github.io,honnet/honnet.github.io,nquirk/site,hiraksarkar/hiraksarkar.github.io,eduardozulian/timeline-jekyll-theme,eduardozulian/timeline-jekyll-theme,hiraksarkar/hiraksarkar.github.io,nquirk/site,huangxok/timeline-jekyll-theme,kirbyt/timeline-jekyll-theme,nquirk/timelinesite,nquirk/site,hiraksarkar/hiraksarkar.github.io,hiraksarkar/hiraksarkar.github.io,hiraksarkar/hiraksarkar.github.io,it950/test,nquirk/timelinesite,nquirk/timelinesite,nquirk/site,it950/test
html
## Code Before: --- layout: null section-type: default title: About --- ## About Lorem ipsum dolor sit amet, eam sint magna vivendo ex, et intellegam delicatissimi usu. Purto corpora adipisci eos cu, qui quaestio vulputate ei, an dico dicant eruditi eum. Ut omnium commodo eligendi duo, eu minim consul delicatissimi vim. Te sit errem docendi, saepe expetenda delicatissimi eum et. Ex pri cetero blandit scriptorem, et mel libris tamquam. ## Instruction: Add link to the github site. ## Code After: --- layout: null section-type: default title: About --- ## About Timeline Jekyll Theme is available on [Github](https://github.com/kirbyt/timeline-jekyll-theme). Lorem ipsum dolor sit amet, eam sint magna vivendo ex, et intellegam delicatissimi usu. Purto corpora adipisci eos cu, qui quaestio vulputate ei, an dico dicant eruditi eum. Ut omnium commodo eligendi duo, eu minim consul delicatissimi vim. Te sit errem docendi, saepe expetenda delicatissimi eum et. Ex pri cetero blandit scriptorem, et mel libris tamquam.
--- layout: null section-type: default title: About --- ## About + Timeline Jekyll Theme is available on [Github](https://github.com/kirbyt/timeline-jekyll-theme). + Lorem ipsum dolor sit amet, eam sint magna vivendo ex, et intellegam delicatissimi usu. Purto corpora adipisci eos cu, qui quaestio vulputate ei, an dico dicant eruditi eum. Ut omnium commodo eligendi duo, eu minim consul delicatissimi vim. Te sit errem docendi, saepe expetenda delicatissimi eum et. Ex pri cetero blandit scriptorem, et mel libris tamquam.
2
0.25
2
0
49376da1a5eba8d250f5a3ba8375bca9551863ca
pyproject.toml
pyproject.toml
[build-system] requires = ["setuptools"] build-backend = "setuptools.build_meta" [tool.black] line-length = 100 target-version = ["py36"] [tool.isort] profile = "black" line_length = 100 combine_as_imports = true include_trailing_comma = true
[build-system] requires = ["setuptools"] build-backend = "setuptools.build_meta" [tool.black] line-length = 100 target-version = ["py36"] [tool.isort] profile = "black" line_length = 100 combine_as_imports = true include_trailing_comma = true [tool.mypy] ignore_missing_imports = true exclude = [ # Exclude the stub operation file so the actual operation.py gets type checked # by default with mypy. There are extra tests (see check-operation-stub-typing.sh) # that cover this file specifically. "operation.pyi", ]
Exclude operation stub file in default mypy runs
Exclude operation stub file in default mypy runs
TOML
mit
Fizzadar/pyinfra,Fizzadar/pyinfra
toml
## Code Before: [build-system] requires = ["setuptools"] build-backend = "setuptools.build_meta" [tool.black] line-length = 100 target-version = ["py36"] [tool.isort] profile = "black" line_length = 100 combine_as_imports = true include_trailing_comma = true ## Instruction: Exclude operation stub file in default mypy runs ## Code After: [build-system] requires = ["setuptools"] build-backend = "setuptools.build_meta" [tool.black] line-length = 100 target-version = ["py36"] [tool.isort] profile = "black" line_length = 100 combine_as_imports = true include_trailing_comma = true [tool.mypy] ignore_missing_imports = true exclude = [ # Exclude the stub operation file so the actual operation.py gets type checked # by default with mypy. There are extra tests (see check-operation-stub-typing.sh) # that cover this file specifically. "operation.pyi", ]
[build-system] requires = ["setuptools"] build-backend = "setuptools.build_meta" [tool.black] line-length = 100 target-version = ["py36"] [tool.isort] profile = "black" line_length = 100 combine_as_imports = true include_trailing_comma = true + + [tool.mypy] + ignore_missing_imports = true + exclude = [ + # Exclude the stub operation file so the actual operation.py gets type checked + # by default with mypy. There are extra tests (see check-operation-stub-typing.sh) + # that cover this file specifically. + "operation.pyi", + ]
9
0.692308
9
0
83b71307513bf50110030b26497a5ae6d69e4bf8
.travis.yml
.travis.yml
sudo: false language: node_js node_js: - 8 - 7 cache: apt: true yarn: true directories: - node_modules - app/node_modules addons: apt: packages: - icnsutils - graphicsmagick - xz-utils - xorriso install: - yarn - cd app && yarn && cd .. - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16" before_script: - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start & - sleep 3 script: - node --version - yarn lint - yarn package - yarn test - yarn test-e2e
sudo: false language: node_js node_js: - 8 - 7 cache: apt: true yarn: true directories: - node_modules - app/node_modules addons: apt: packages: - icnsutils - graphicsmagick - xz-utils - xorriso install: - yarn - cd app && yarn && cd .. - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16" before_script: - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start & - sleep 3 script: - yarn lint - yarn package - yarn test - yarn test-e2e
Drop duplicate node version output for Travis builds
enhance(ci): Drop duplicate node version output for Travis builds node, nvm, npm versions are output a bit higher up in the log
YAML
mit
LN-Zap/zap-desktop,LN-Zap/zap-desktop,LN-Zap/zap-desktop
yaml
## Code Before: sudo: false language: node_js node_js: - 8 - 7 cache: apt: true yarn: true directories: - node_modules - app/node_modules addons: apt: packages: - icnsutils - graphicsmagick - xz-utils - xorriso install: - yarn - cd app && yarn && cd .. - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16" before_script: - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start & - sleep 3 script: - node --version - yarn lint - yarn package - yarn test - yarn test-e2e ## Instruction: enhance(ci): Drop duplicate node version output for Travis builds node, nvm, npm versions are output a bit higher up in the log ## Code After: sudo: false language: node_js node_js: - 8 - 7 cache: apt: true yarn: true directories: - node_modules - app/node_modules addons: apt: packages: - icnsutils - graphicsmagick - xz-utils - xorriso install: - yarn - cd app && yarn && cd .. - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16" before_script: - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start & - sleep 3 script: - yarn lint - yarn package - yarn test - yarn test-e2e
sudo: false language: node_js node_js: - 8 - 7 cache: apt: true yarn: true directories: - node_modules - app/node_modules addons: apt: packages: - icnsutils - graphicsmagick - xz-utils - xorriso install: - yarn - cd app && yarn && cd .. - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16" before_script: - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start & - sleep 3 script: - - node --version - yarn lint - yarn package - yarn test - yarn test-e2e
1
0.025641
0
1
1993daa08d4d836869ee9eff10020d49d547c533
src/app/core/local-storage/local-storage.service.ts
src/app/core/local-storage/local-storage.service.ts
import { Injectable } from '@angular/core' declare const jIO: any declare const RSVP: any @Injectable() export class LocalStorageService { private instance: any constructor() { this.instance = jIO.createJIO({ type: 'query', sub_storage: { type: 'uuid', sub_storage: { type: 'indexeddb', database: 'mute' } } }) } get (name: string): Promise<any> { return this.instance.get(name) } put (name: string, object: any): Promise<string> { return this.instance.put(name, object) } }
import { Injectable } from '@angular/core' import { AbstractStorageService } from '../AbstractStorageService' declare const jIO: any @Injectable() export class LocalStorageService extends AbstractStorageService { private instance: any readonly name: string = 'Local Storage' constructor() { super() this.instance = jIO.createJIO({ type: 'query', sub_storage: { type: 'uuid', sub_storage: { type: 'indexeddb', database: 'mute' } } }) } get (name: string): Promise<any> { return this.instance.get(name) } put (name: string, object: any): Promise<string> { return this.instance.put(name, object) } isReachable (): Promise<boolean> { return Promise.resolve(true) } getDocuments (): Promise<any[]> { const docs = [ { id: 'id1', title: 'title1' }, { id: 'id2', title: 'title2' }, { id: 'id3', title: 'title3' }, ] return Promise.resolve(docs) } }
Edit LocalStorageService to extend AbstractStorageService
feat(localStorage): Edit LocalStorageService to extend AbstractStorageService
TypeScript
agpl-3.0
coast-team/mute,coast-team/mute,oster/mute,oster/mute,coast-team/mute,oster/mute,coast-team/mute
typescript
## Code Before: import { Injectable } from '@angular/core' declare const jIO: any declare const RSVP: any @Injectable() export class LocalStorageService { private instance: any constructor() { this.instance = jIO.createJIO({ type: 'query', sub_storage: { type: 'uuid', sub_storage: { type: 'indexeddb', database: 'mute' } } }) } get (name: string): Promise<any> { return this.instance.get(name) } put (name: string, object: any): Promise<string> { return this.instance.put(name, object) } } ## Instruction: feat(localStorage): Edit LocalStorageService to extend AbstractStorageService ## Code After: import { Injectable } from '@angular/core' import { AbstractStorageService } from '../AbstractStorageService' declare const jIO: any @Injectable() export class LocalStorageService extends AbstractStorageService { private instance: any readonly name: string = 'Local Storage' constructor() { super() this.instance = jIO.createJIO({ type: 'query', sub_storage: { type: 'uuid', sub_storage: { type: 'indexeddb', database: 'mute' } } }) } get (name: string): Promise<any> { return this.instance.get(name) } put (name: string, object: any): Promise<string> { return this.instance.put(name, object) } isReachable (): Promise<boolean> { return Promise.resolve(true) } getDocuments (): Promise<any[]> { const docs = [ { id: 'id1', title: 'title1' }, { id: 'id2', title: 'title2' }, { id: 'id3', title: 'title3' }, ] return Promise.resolve(docs) } }
import { Injectable } from '@angular/core' + import { AbstractStorageService } from '../AbstractStorageService' + declare const jIO: any - declare const RSVP: any @Injectable() - export class LocalStorageService { + export class LocalStorageService extends AbstractStorageService { private instance: any + readonly name: string = 'Local Storage' constructor() { + super() this.instance = jIO.createJIO({ type: 'query', sub_storage: { type: 'uuid', sub_storage: { type: 'indexeddb', database: 'mute' } } }) } get (name: string): Promise<any> { return this.instance.get(name) } put (name: string, object: any): Promise<string> { return this.instance.put(name, object) } + isReachable (): Promise<boolean> { + return Promise.resolve(true) + } + + getDocuments (): Promise<any[]> { + const docs = [ + { + id: 'id1', + title: 'title1' + }, + { + id: 'id2', + title: 'title2' + }, + { + id: 'id3', + title: 'title3' + }, + ] + return Promise.resolve(docs) + } + }
29
0.90625
27
2
8e8d7947a4a4bb3ce0ebaa92e61c9d0b00dabfa6
src/main/java/com/github/solairerove/woodstock/domain/Task.java
src/main/java/com/github/solairerove/woodstock/domain/Task.java
package com.github.solairerove.woodstock.domain; import lombok.Data; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Document; import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; /** * Created by krivitski-no on 10/1/16. */ @Data @Document public class Task implements Serializable { @Id private String id; private String question; private Boolean enable; private Boolean correct; private Collection<? extends Ticket> tickets = new ArrayList<>(); public Task() { } public Task(String question, Collection<? extends Ticket> tickets) { this.question = question; this.enable = true; this.correct = false; this.tickets = tickets; } public Task(String question, Boolean enable, Boolean correct, Collection<? extends Ticket> tickets) { this.question = question; this.enable = enable; this.correct = correct; this.tickets = tickets; } }
package com.github.solairerove.woodstock.domain; import lombok.Data; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Document; import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; /** * Created by krivitski-no on 10/1/16. */ @Data @Document public class Task implements Serializable { @Id private String id; private String question; private Boolean enable; private Boolean correct; private Collection<? extends Ticket> tickets = new ArrayList<>(); public Task() { } public Task(String question, Collection<? extends Ticket> tickets) { this.question = question; this.enable = Boolean.TRUE; this.correct = Boolean.FALSE; this.tickets = tickets; } public Task(String question, Boolean enable, Boolean correct, Collection<? extends Ticket> tickets) { this.question = question; this.enable = enable; this.correct = correct; this.tickets = tickets; } }
Change primitive to object in task model
Change primitive to object in task model
Java
apache-2.0
solairerove/woodstock,solairerove/woodstock,solairerove/woodstock
java
## Code Before: package com.github.solairerove.woodstock.domain; import lombok.Data; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Document; import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; /** * Created by krivitski-no on 10/1/16. */ @Data @Document public class Task implements Serializable { @Id private String id; private String question; private Boolean enable; private Boolean correct; private Collection<? extends Ticket> tickets = new ArrayList<>(); public Task() { } public Task(String question, Collection<? extends Ticket> tickets) { this.question = question; this.enable = true; this.correct = false; this.tickets = tickets; } public Task(String question, Boolean enable, Boolean correct, Collection<? extends Ticket> tickets) { this.question = question; this.enable = enable; this.correct = correct; this.tickets = tickets; } } ## Instruction: Change primitive to object in task model ## Code After: package com.github.solairerove.woodstock.domain; import lombok.Data; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Document; import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; /** * Created by krivitski-no on 10/1/16. */ @Data @Document public class Task implements Serializable { @Id private String id; private String question; private Boolean enable; private Boolean correct; private Collection<? extends Ticket> tickets = new ArrayList<>(); public Task() { } public Task(String question, Collection<? extends Ticket> tickets) { this.question = question; this.enable = Boolean.TRUE; this.correct = Boolean.FALSE; this.tickets = tickets; } public Task(String question, Boolean enable, Boolean correct, Collection<? extends Ticket> tickets) { this.question = question; this.enable = enable; this.correct = correct; this.tickets = tickets; } }
package com.github.solairerove.woodstock.domain; import lombok.Data; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Document; import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; /** * Created by krivitski-no on 10/1/16. */ @Data @Document public class Task implements Serializable { @Id private String id; private String question; private Boolean enable; private Boolean correct; private Collection<? extends Ticket> tickets = new ArrayList<>(); public Task() { } public Task(String question, Collection<? extends Ticket> tickets) { this.question = question; - this.enable = true; ? ^^^ + this.enable = Boolean.TRUE; ? ^^^^ +++++++ - this.correct = false; ? ^ ^^^ + this.correct = Boolean.FALSE; ? ^^^^^ ^^^^^^^ this.tickets = tickets; } public Task(String question, Boolean enable, Boolean correct, Collection<? extends Ticket> tickets) { this.question = question; this.enable = enable; this.correct = correct; this.tickets = tickets; } }
4
0.095238
2
2
5d4bcf1bad78154e70bc8c942a70c59e621543fe
tests/specs/module/test.html
tests/specs/module/test.html
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=0"> <title>test</title> <script src="../../../dist/sea.js"></script> </head> <body> <div id="out"></div> <script> seajs.use('../../test', function(test) { test.run([ 'anonymous', 'anywhere', 'cache', 'chain', 'circular', 'define', 'dependencies', 'duplicate-load', 'singleton', 'exports', 'jsonp', 'load-css', 'math', 'method', 'multi-load', 'multi-versions', 'override', 'public-api', 'require-async', 'transitive', // Place `path-resolve` at last because 404 case in it, otherwise it will // affect the following spec in old browsers such as Firefox 5.0 'path-resolve' ]) }) </script> </body> </html>
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=0"> <title>test</title> <script src="../../../dist/sea.js"></script> </head> <body> <div id="out"></div> <script> seajs.use('../../test', function(test) { test.run([ // The simplest example 'math', 'anonymous', 'anywhere', 'cache', 'chain', 'circular', 'define', 'dependencies', 'duplicate-load', 'singleton', 'exports', 'jsonp', 'load-css', 'method', 'multi-load', 'multi-versions', 'override', 'public-api', 'require-async', 'transitive', // Place `path-resolve` at last because 404 case in it, otherwise it will // affect the following spec in old browsers such as Firefox 5.0 'path-resolve' ]) }) </script> </body> </html>
Update the order of specs
Update the order of specs
HTML
mit
judastree/seajs,zwh6611/seajs,eleanors/SeaJS,twoubt/seajs,mosoft521/seajs,Lyfme/seajs,jishichang/seajs,baiduoduo/seajs,lee-my/seajs,AlvinWei1024/seajs,liupeng110112/seajs,MrZhengliang/seajs,longze/seajs,kaijiemo/seajs,twoubt/seajs,LzhElite/seajs,MrZhengliang/seajs,yern/seajs,yuhualingfeng/seajs,lee-my/seajs,wenber/seajs,13693100472/seajs,Lyfme/seajs,sheldonzf/seajs,angelLYK/seajs,coolyhx/seajs,tonny-zhang/seajs,lianggaolin/seajs,lovelykobe/seajs,treejames/seajs,liupeng110112/seajs,miusuncle/seajs,PUSEN/seajs,Gatsbyy/seajs,LzhElite/seajs,zaoli/seajs,coolyhx/seajs,zaoli/seajs,imcys/seajs,PUSEN/seajs,imcys/seajs,AlvinWei1024/seajs,miusuncle/seajs,lianggaolin/seajs,wenber/seajs,Gatsbyy/seajs,zaoli/seajs,kuier/seajs,JeffLi1993/seajs,ysxlinux/seajs,13693100472/seajs,evilemon/seajs,chinakids/seajs,jishichang/seajs,kaijiemo/seajs,seajs/seajs,lee-my/seajs,angelLYK/seajs,seajs/seajs,Gatsbyy/seajs,tonny-zhang/seajs,evilemon/seajs,angelLYK/seajs,yern/seajs,zwh6611/seajs,jishichang/seajs,baiduoduo/seajs,yuhualingfeng/seajs,hbdrawn/seajs,tonny-zhang/seajs,kuier/seajs,moccen/seajs,Lyfme/seajs,liupeng110112/seajs,FrankElean/SeaJS,wenber/seajs,sheldonzf/seajs,miusuncle/seajs,coolyhx/seajs,kuier/seajs,moccen/seajs,longze/seajs,treejames/seajs,chinakids/seajs,121595113/seajs,judastree/seajs,twoubt/seajs,AlvinWei1024/seajs,FrankElean/SeaJS,uestcNaldo/seajs,treejames/seajs,lovelykobe/seajs,121595113/seajs,seajs/seajs,zwh6611/seajs,eleanors/SeaJS,uestcNaldo/seajs,evilemon/seajs,lianggaolin/seajs,FrankElean/SeaJS,mosoft521/seajs,judastree/seajs,JeffLi1993/seajs,kaijiemo/seajs,baiduoduo/seajs,moccen/seajs,ysxlinux/seajs,MrZhengliang/seajs,hbdrawn/seajs,yern/seajs,imcys/seajs,eleanors/SeaJS,uestcNaldo/seajs,PUSEN/seajs,JeffLi1993/seajs,sheldonzf/seajs,ysxlinux/seajs,yuhualingfeng/seajs,longze/seajs,mosoft521/seajs,LzhElite/seajs,lovelykobe/seajs
html
## Code Before: <!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=0"> <title>test</title> <script src="../../../dist/sea.js"></script> </head> <body> <div id="out"></div> <script> seajs.use('../../test', function(test) { test.run([ 'anonymous', 'anywhere', 'cache', 'chain', 'circular', 'define', 'dependencies', 'duplicate-load', 'singleton', 'exports', 'jsonp', 'load-css', 'math', 'method', 'multi-load', 'multi-versions', 'override', 'public-api', 'require-async', 'transitive', // Place `path-resolve` at last because 404 case in it, otherwise it will // affect the following spec in old browsers such as Firefox 5.0 'path-resolve' ]) }) </script> </body> </html> ## Instruction: Update the order of specs ## Code After: <!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=0"> <title>test</title> <script src="../../../dist/sea.js"></script> </head> <body> <div id="out"></div> <script> seajs.use('../../test', function(test) { test.run([ // The simplest example 'math', 'anonymous', 'anywhere', 'cache', 'chain', 'circular', 'define', 'dependencies', 'duplicate-load', 'singleton', 'exports', 'jsonp', 'load-css', 'method', 'multi-load', 'multi-versions', 'override', 'public-api', 'require-async', 'transitive', // Place `path-resolve` at last because 404 case in it, otherwise it will // affect the following spec in old browsers such as Firefox 5.0 'path-resolve' ]) }) </script> </body> </html>
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=0"> <title>test</title> <script src="../../../dist/sea.js"></script> </head> <body> <div id="out"></div> <script> seajs.use('../../test', function(test) { test.run([ + // The simplest example + 'math', + 'anonymous', 'anywhere', 'cache', 'chain', 'circular', 'define', 'dependencies', 'duplicate-load', 'singleton', 'exports', 'jsonp', 'load-css', - 'math', 'method', 'multi-load', 'multi-versions', 'override', 'public-api', 'require-async', 'transitive', // Place `path-resolve` at last because 404 case in it, otherwise it will // affect the following spec in old browsers such as Firefox 5.0 'path-resolve' ]) }) </script> </body> </html>
4
0.095238
3
1
82a65e3dfe99006ec6afae4dc3da62f6d3dc4eac
applications/console/src/ManageWallet/TransferFundsConsoleResponder.php
applications/console/src/ManageWallet/TransferFundsConsoleResponder.php
<?php /** * PHP version 7.1 * * This source file is subject to the license that is bundled with this package in the file LICENSE. */ namespace Ewallet\ManageWallet; use Ewallet\Memberships\{MemberId, MembersRepository}; use Symfony\Component\Console\Input\InputInterface; class TransferFundsConsoleResponder implements TransferFundsResponder { /** @var InputInterface */ private $input; /** @var MembersRepository */ private $members; /** @var TransferFundsConsole */ private $console; public function __construct( InputInterface $input, MembersRepository $members, TransferFundsConsole $console ) { $this->input = $input; $this->members = $members; $this->console = $console; } /** * @param string[] $messages * @param string[] $values */ public function respondToInvalidTransferInput(array $messages, array $values) { $this->console->printError($messages); } public function respondToEnterTransferInformation(MemberId $senderId) { $this->console->printRecipients($this->members->excluding($senderId)); $this->input->setArgument('recipientId', $this->console->promptRecipientId()); $this->input->setArgument('amount', $this->console->promptAmountToTransfer()); } public function respondToTransferCompleted(TransferFundsSummary $summary) { $this->console->printSummary($summary); } }
<?php /** * PHP version 7.1 * * This source file is subject to the license that is bundled with this package in the file LICENSE. */ namespace Ewallet\ManageWallet; use Ewallet\Memberships\{MemberId, MembersRepository}; use Symfony\Component\Console\Input\InputInterface; class TransferFundsConsoleResponder implements TransferFundsResponder { /** @var InputInterface */ private $input; /** @var MembersRepository */ private $members; /** @var TransferFundsConsole */ private $console; public function __construct( InputInterface $input, MembersRepository $members, TransferFundsConsole $console ) { $this->input = $input; $this->members = $members; $this->console = $console; } /** * @param string[] $messages * @param string[] $values */ public function respondToInvalidTransferInput(array $messages, array $values): void { $this->console->printError($messages); } public function respondToEnterTransferInformation(MemberId $senderId): void { $this->console->printRecipients($this->members->excluding($senderId)); $this->input->setArgument('recipientId', $this->console->promptRecipientId()); $this->input->setArgument('amount', $this->console->promptAmountToTransfer()); } public function respondToTransferCompleted(TransferFundsSummary $summary): void { $this->console->printSummary($summary); } }
Add missing void return types in console responder.
Add missing void return types in console responder.
PHP
mit
MontealegreLuis/php-testing-tools,MontealegreLuis/php-testing-tools
php
## Code Before: <?php /** * PHP version 7.1 * * This source file is subject to the license that is bundled with this package in the file LICENSE. */ namespace Ewallet\ManageWallet; use Ewallet\Memberships\{MemberId, MembersRepository}; use Symfony\Component\Console\Input\InputInterface; class TransferFundsConsoleResponder implements TransferFundsResponder { /** @var InputInterface */ private $input; /** @var MembersRepository */ private $members; /** @var TransferFundsConsole */ private $console; public function __construct( InputInterface $input, MembersRepository $members, TransferFundsConsole $console ) { $this->input = $input; $this->members = $members; $this->console = $console; } /** * @param string[] $messages * @param string[] $values */ public function respondToInvalidTransferInput(array $messages, array $values) { $this->console->printError($messages); } public function respondToEnterTransferInformation(MemberId $senderId) { $this->console->printRecipients($this->members->excluding($senderId)); $this->input->setArgument('recipientId', $this->console->promptRecipientId()); $this->input->setArgument('amount', $this->console->promptAmountToTransfer()); } public function respondToTransferCompleted(TransferFundsSummary $summary) { $this->console->printSummary($summary); } } ## Instruction: Add missing void return types in console responder. ## Code After: <?php /** * PHP version 7.1 * * This source file is subject to the license that is bundled with this package in the file LICENSE. */ namespace Ewallet\ManageWallet; use Ewallet\Memberships\{MemberId, MembersRepository}; use Symfony\Component\Console\Input\InputInterface; class TransferFundsConsoleResponder implements TransferFundsResponder { /** @var InputInterface */ private $input; /** @var MembersRepository */ private $members; /** @var TransferFundsConsole */ private $console; public function __construct( InputInterface $input, MembersRepository $members, TransferFundsConsole $console ) { $this->input = $input; $this->members = $members; $this->console = $console; } /** * @param string[] $messages * @param string[] $values */ public function respondToInvalidTransferInput(array $messages, array $values): void { $this->console->printError($messages); } public function respondToEnterTransferInformation(MemberId $senderId): void { $this->console->printRecipients($this->members->excluding($senderId)); $this->input->setArgument('recipientId', $this->console->promptRecipientId()); $this->input->setArgument('amount', $this->console->promptAmountToTransfer()); } public function respondToTransferCompleted(TransferFundsSummary $summary): void { $this->console->printSummary($summary); } }
<?php /** * PHP version 7.1 * * This source file is subject to the license that is bundled with this package in the file LICENSE. */ namespace Ewallet\ManageWallet; use Ewallet\Memberships\{MemberId, MembersRepository}; use Symfony\Component\Console\Input\InputInterface; class TransferFundsConsoleResponder implements TransferFundsResponder { /** @var InputInterface */ private $input; /** @var MembersRepository */ private $members; /** @var TransferFundsConsole */ private $console; public function __construct( InputInterface $input, MembersRepository $members, TransferFundsConsole $console ) { $this->input = $input; $this->members = $members; $this->console = $console; } /** * @param string[] $messages * @param string[] $values */ - public function respondToInvalidTransferInput(array $messages, array $values) + public function respondToInvalidTransferInput(array $messages, array $values): void ? ++++++ { $this->console->printError($messages); } - public function respondToEnterTransferInformation(MemberId $senderId) + public function respondToEnterTransferInformation(MemberId $senderId): void ? ++++++ { $this->console->printRecipients($this->members->excluding($senderId)); $this->input->setArgument('recipientId', $this->console->promptRecipientId()); $this->input->setArgument('amount', $this->console->promptAmountToTransfer()); } - public function respondToTransferCompleted(TransferFundsSummary $summary) + public function respondToTransferCompleted(TransferFundsSummary $summary): void ? ++++++ { $this->console->printSummary($summary); } }
6
0.111111
3
3
8abc948f142d31de43de899ada875d55e14b53f9
src/endpoints/http/collections/export/lib/parser.js
src/endpoints/http/collections/export/lib/parser.js
import stream from 'stream'; import csvWriter from 'csv-write-stream'; class json extends stream.Transform { constructor() { super({ objectMode: true }); } _transform(data, encoding, cb) { data = JSON.stringify(data); this.push(data); cb(); } } export default { bson: collection => Promise.resolve(collection), json: collection => { const parserJson = new json(); parserJson.filename = collection.filename; return Promise.resolve(collection.pipe(parserJson)); }, csv: collection => { const writer = csvWriter(); writer.filename = collection.filename; return Promise.resolve(collection.pipe(writer)); } };
import stream from 'stream'; import csvWriter from 'csv-write-stream'; class json extends stream.Transform { constructor() { super({ objectMode: true }); } _transform(data, encoding, cb) { data = `${JSON.stringify(data)}\r\n`; this.push(data); cb(); } } export default { bson: collection => Promise.resolve(collection), json: collection => { const parserJson = new json(); parserJson.filename = collection.filename; return Promise.resolve(collection.pipe(parserJson)); }, csv: collection => { const writer = csvWriter(); writer.filename = collection.filename; return Promise.resolve(collection.pipe(writer)); } };
Fix JSON string formatting to allow mongoimport
Fix JSON string formatting to allow mongoimport
JavaScript
mit
feedhenry/fh-dataman,feedhenry/fh-dataman,feedhenry/fh-dataman
javascript
## Code Before: import stream from 'stream'; import csvWriter from 'csv-write-stream'; class json extends stream.Transform { constructor() { super({ objectMode: true }); } _transform(data, encoding, cb) { data = JSON.stringify(data); this.push(data); cb(); } } export default { bson: collection => Promise.resolve(collection), json: collection => { const parserJson = new json(); parserJson.filename = collection.filename; return Promise.resolve(collection.pipe(parserJson)); }, csv: collection => { const writer = csvWriter(); writer.filename = collection.filename; return Promise.resolve(collection.pipe(writer)); } }; ## Instruction: Fix JSON string formatting to allow mongoimport ## Code After: import stream from 'stream'; import csvWriter from 'csv-write-stream'; class json extends stream.Transform { constructor() { super({ objectMode: true }); } _transform(data, encoding, cb) { data = `${JSON.stringify(data)}\r\n`; this.push(data); cb(); } } export default { bson: collection => Promise.resolve(collection), json: collection => { const parserJson = new json(); parserJson.filename = collection.filename; return Promise.resolve(collection.pipe(parserJson)); }, csv: collection => { const writer = csvWriter(); writer.filename = collection.filename; return Promise.resolve(collection.pipe(writer)); } };
import stream from 'stream'; import csvWriter from 'csv-write-stream'; class json extends stream.Transform { constructor() { super({ objectMode: true }); } _transform(data, encoding, cb) { - data = JSON.stringify(data); + data = `${JSON.stringify(data)}\r\n`; ? +++ ++++++ this.push(data); cb(); } } export default { bson: collection => Promise.resolve(collection), json: collection => { const parserJson = new json(); parserJson.filename = collection.filename; return Promise.resolve(collection.pipe(parserJson)); }, csv: collection => { const writer = csvWriter(); writer.filename = collection.filename; return Promise.resolve(collection.pipe(writer)); } };
2
0.071429
1
1
cd0ace89a46cecd313f1e7d8352041b077894219
vscode/.config/Code/User/keybindings.json
vscode/.config/Code/User/keybindings.json
// Place your key bindings in this file to overwrite the defaults [ { "key": "ctrl+7", "command": "editor.action.commentLine", "when": "editorTextFocus && !editorReadonly" } ]
// Place your key bindings in this file to overwrite the defaults [ { "key": "ctrl+7", "command": "editor.action.commentLine", "when": "editorTextFocus && !editorReadonly" }, { "key": "ctrl+shift+k", "command": "workbench.action.terminal.clear", "when": "terminalFocus" } ]
Allow clearing integrated terminal in Linux
Allow clearing integrated terminal in Linux
JSON
mit
belaustegui/dotfiles
json
## Code Before: // Place your key bindings in this file to overwrite the defaults [ { "key": "ctrl+7", "command": "editor.action.commentLine", "when": "editorTextFocus && !editorReadonly" } ] ## Instruction: Allow clearing integrated terminal in Linux ## Code After: // Place your key bindings in this file to overwrite the defaults [ { "key": "ctrl+7", "command": "editor.action.commentLine", "when": "editorTextFocus && !editorReadonly" }, { "key": "ctrl+shift+k", "command": "workbench.action.terminal.clear", "when": "terminalFocus" } ]
// Place your key bindings in this file to overwrite the defaults [ { "key": "ctrl+7", "command": "editor.action.commentLine", "when": "editorTextFocus && !editorReadonly" + }, + { + "key": "ctrl+shift+k", + "command": "workbench.action.terminal.clear", + "when": "terminalFocus" } ]
5
0.625
5
0
901a444a8b3be74eeefea1615a1d282f648ceeb7
themes/modern/components/category/block_small.php
themes/modern/components/category/block_small.php
<?php $comments = $article->getNumValidatedComments(); ?> <div class="article-block section <?php echo $article->getCategory()->getCat(); ?>"> <div class="small"<?php if($equalizer): ?> data-equalizer-watch="<?php echo $equalizer; ?>"<?php endif; ?>> <div class="article-title"><a href="<?php echo $article->getUrl(); ?>"><?php echo $article->getTitle(); ?></a></div> <span class="article-time"><span class="glyphicons glyphicons-clock"></span><?php echo Utility::getRelativeTime($article->getPublished()); ?></span> <?php if($comments > 0): ?><span class="article-inline-comments"><span class="glyphicons glyphicons-comments"></span>&nbsp;<?php echo $comments; ?></span><?php endif; ?> </div> </div>
<?php $comments = $article->getNumValidatedComments(); ?> <div class="article-block section <?php echo $article->getCategory()->getCat(); ?>"> <div class="small"<?php if($equalizer): ?> data-equalizer-watch="<?php echo $equalizer; ?>"<?php endif; ?>> <div class="article-title"><a href="<?php echo $article->getUrl(); ?>"><?php echo $article->getTitle(); ?></a></div> <span class="article-time"><span class="glyphicons glyphicons-clock"></span><?php echo Utility::getRelativeTime($article->getPublished()); ?></span> <?php if($comments > 0): ?><span class="article-inline-comments"><a href="<?php echo $article->getUrl(); ?>#commentHeader"><span class="glyphicons glyphicons-comments"></span>&nbsp;<?php echo $comments; ?></a></span><?php endif; ?> </div> </div>
Make small article block comment links clickable
Make small article block comment links clickable
PHP
mit
FelixOnline/FelixOnline,FelixOnline/FelixOnline,FelixOnline/FelixOnline
php
## Code Before: <?php $comments = $article->getNumValidatedComments(); ?> <div class="article-block section <?php echo $article->getCategory()->getCat(); ?>"> <div class="small"<?php if($equalizer): ?> data-equalizer-watch="<?php echo $equalizer; ?>"<?php endif; ?>> <div class="article-title"><a href="<?php echo $article->getUrl(); ?>"><?php echo $article->getTitle(); ?></a></div> <span class="article-time"><span class="glyphicons glyphicons-clock"></span><?php echo Utility::getRelativeTime($article->getPublished()); ?></span> <?php if($comments > 0): ?><span class="article-inline-comments"><span class="glyphicons glyphicons-comments"></span>&nbsp;<?php echo $comments; ?></span><?php endif; ?> </div> </div> ## Instruction: Make small article block comment links clickable ## Code After: <?php $comments = $article->getNumValidatedComments(); ?> <div class="article-block section <?php echo $article->getCategory()->getCat(); ?>"> <div class="small"<?php if($equalizer): ?> data-equalizer-watch="<?php echo $equalizer; ?>"<?php endif; ?>> <div class="article-title"><a href="<?php echo $article->getUrl(); ?>"><?php echo $article->getTitle(); ?></a></div> <span class="article-time"><span class="glyphicons glyphicons-clock"></span><?php echo Utility::getRelativeTime($article->getPublished()); ?></span> <?php if($comments > 0): ?><span class="article-inline-comments"><a href="<?php echo $article->getUrl(); ?>#commentHeader"><span class="glyphicons glyphicons-comments"></span>&nbsp;<?php echo $comments; ?></a></span><?php endif; ?> </div> </div>
<?php $comments = $article->getNumValidatedComments(); ?> <div class="article-block section <?php echo $article->getCategory()->getCat(); ?>"> <div class="small"<?php if($equalizer): ?> data-equalizer-watch="<?php echo $equalizer; ?>"<?php endif; ?>> <div class="article-title"><a href="<?php echo $article->getUrl(); ?>"><?php echo $article->getTitle(); ?></a></div> <span class="article-time"><span class="glyphicons glyphicons-clock"></span><?php echo Utility::getRelativeTime($article->getPublished()); ?></span> - <?php if($comments > 0): ?><span class="article-inline-comments"><span class="glyphicons glyphicons-comments"></span>&nbsp;<?php echo $comments; ?></span><?php endif; ?> ? ^^^^^^^^^^ + <?php if($comments > 0): ?><span class="article-inline-comments"><a href="<?php echo $article->getUrl(); ?>#commentHeader"><span class="glyphicons glyphicons-comments"></span>&nbsp;<?php echo $comments; ?></a></span><?php endif; ?> ? ^^^^^^ +++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++ ++++ </div> </div>
2
0.25
1
1
87032942dc93ea8ae228f5600947cf8b1f8118a9
views/layouts/login.mustache
views/layouts/login.mustache
{{> header}} <!-- Custom styles for this template --> <link rel="stylesheet" href="/css/signin.css"> <body> <div class="container-fluid"> <form class="form-signin" id="formLogin"> <h2 class="form-signin-heading">Please sign in</h2> <div id="formAlert" class="alert alert-danger hide"> <a class="close">×</a> <strong>Unauthorized</strong> Bad username or password </div> <label for="inputUsername" class="sr-only">Email address</label> <input type="text" id="inputUsername" class="form-control" placeholder="Username / Email Address" required autofocus> <label for="inputPassword" class="sr-only">Password</label> <input type="password" id="inputPassword" class="form-control" placeholder="Password" required> <!-- <div class="checkbox"> <label> <input type="checkbox" value="remember-me"> Remember me </label> </div> --> <button type="button" class="btn btn-lg btn-primary btn-block" onclick="submitForm()">Sign in</button> <br><br> <a id="link-register" href="/registration">Not registered? Click here.</a> </form> </div> </body> {{> footer-login}}
{{> header}} <!-- Custom styles for this template --> <link rel="stylesheet" href="/css/signin.css"> <body hidden> <div class="container-fluid"> <div id="myModal" class="modal fade" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">&times;</button> <h4 class="modal-title">You have been registered.</h4> </div> </div> </div> </div> <form id="formLogin" class="form-signin"> <h2 class="form-signin-heading">Please sign in</h2> <label for="inputUsername" class="sr-only">Email address</label> <input type="text" id="inputUsername" class="form-control" placeholder="Username / Email Address" required autofocus> <label for="inputPassword" class="sr-only">Password</label> <input type="password" id="inputPassword" class="form-control" placeholder="Password" required> <button type="button" class="btn btn-lg btn-primary btn-block" onclick="submitForm()">Sign in</button> <br> <div id="formUnauthorized" class="alert alert-danger hidden"> <a id="closeUnauthorized" class="close" aria-label="unauthorized-close">&times;</a> <strong>Error</strong> Bad username or password </div> <br> <a id="link-register" href="/registration">Not registered? Click here.</a> </form> </div> </body> {{> footer-login}}
Add modal for registered and error message for unauthorized
Add modal for registered and error message for unauthorized
HTML+Django
mit
identityclash/hapi-login-test,identityclash/hapi-login-test
html+django
## Code Before: {{> header}} <!-- Custom styles for this template --> <link rel="stylesheet" href="/css/signin.css"> <body> <div class="container-fluid"> <form class="form-signin" id="formLogin"> <h2 class="form-signin-heading">Please sign in</h2> <div id="formAlert" class="alert alert-danger hide"> <a class="close">×</a> <strong>Unauthorized</strong> Bad username or password </div> <label for="inputUsername" class="sr-only">Email address</label> <input type="text" id="inputUsername" class="form-control" placeholder="Username / Email Address" required autofocus> <label for="inputPassword" class="sr-only">Password</label> <input type="password" id="inputPassword" class="form-control" placeholder="Password" required> <!-- <div class="checkbox"> <label> <input type="checkbox" value="remember-me"> Remember me </label> </div> --> <button type="button" class="btn btn-lg btn-primary btn-block" onclick="submitForm()">Sign in</button> <br><br> <a id="link-register" href="/registration">Not registered? Click here.</a> </form> </div> </body> {{> footer-login}} ## Instruction: Add modal for registered and error message for unauthorized ## Code After: {{> header}} <!-- Custom styles for this template --> <link rel="stylesheet" href="/css/signin.css"> <body hidden> <div class="container-fluid"> <div id="myModal" class="modal fade" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">&times;</button> <h4 class="modal-title">You have been registered.</h4> </div> </div> </div> </div> <form id="formLogin" class="form-signin"> <h2 class="form-signin-heading">Please sign in</h2> <label for="inputUsername" class="sr-only">Email address</label> <input type="text" id="inputUsername" class="form-control" placeholder="Username / Email Address" required autofocus> <label for="inputPassword" class="sr-only">Password</label> <input type="password" id="inputPassword" class="form-control" placeholder="Password" required> <button type="button" class="btn btn-lg btn-primary btn-block" onclick="submitForm()">Sign in</button> <br> <div id="formUnauthorized" class="alert alert-danger hidden"> <a id="closeUnauthorized" class="close" aria-label="unauthorized-close">&times;</a> <strong>Error</strong> Bad username or password </div> <br> <a id="link-register" href="/registration">Not registered? Click here.</a> </form> </div> </body> {{> footer-login}}
{{> header}} <!-- Custom styles for this template --> <link rel="stylesheet" href="/css/signin.css"> - <body> + <body hidden> <div class="container-fluid"> - <form class="form-signin" id="formLogin"> + + <div id="myModal" class="modal fade" role="dialog"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal">&times;</button> + <h4 class="modal-title">You have been registered.</h4> + </div> + </div> + </div> + </div> + + <form id="formLogin" class="form-signin"> + <h2 class="form-signin-heading">Please sign in</h2> - - <div id="formAlert" class="alert alert-danger hide"> - <a class="close">×</a> - <strong>Unauthorized</strong> Bad username or password - </div> <label for="inputUsername" class="sr-only">Email address</label> <input type="text" id="inputUsername" class="form-control" placeholder="Username / Email Address" required autofocus> <label for="inputPassword" class="sr-only">Password</label> <input type="password" id="inputPassword" class="form-control" placeholder="Password" required> - <!-- - <div class="checkbox"> - <label> - <input type="checkbox" value="remember-me"> Remember me - </label> - </div> - --> - <button type="button" class="btn btn-lg btn-primary btn-block" onclick="submitForm()">Sign in</button> - <br><br> ? ---- + <br> + + <div id="formUnauthorized" class="alert alert-danger hidden"> + <a id="closeUnauthorized" class="close" aria-label="unauthorized-close">&times;</a> + <strong>Error</strong> Bad username or password + </div> + + <br> <a id="link-register" href="/registration">Not registered? Click here.</a> </form> </div> </body> {{> footer-login}}
39
0.975
23
16
8f92ef2da838402b7ced0447d93f758a9312c837
README.md
README.md
[![Build Status](https://travis-ci.org/wearearima/java-web-templates.svg?branch=master)](https://travis-ci.org/wearearima/java-web-templates) [![SonarQube.com Quality Gate status](https://sonarqube.com/api/badges/gate?key=eu.arima%3Ajava-web-templates%3Amaster)](https://sonarqube.com/overview?id=eu.arima%3Ajava-web-templates%3Amaster)
[![Build Status](https://travis-ci.org/wearearima/java-web-templates.svg?branch=master)](https://travis-ci.org/wearearima/java-web-templates) [![SonarQube.com Quality Gate status](https://sonarqube.com/api/badges/gate?key=eu.arima%3Ajava-web-templates)](https://sonarqube.com/overview?id=eu.arima%3Ajava-web-templates)
Remove branch name in sonarqube url
Remove branch name in sonarqube url
Markdown
apache-2.0
wearearima/java-web-templates,wearearima/java-web-templates,wearearima/java-web-templates
markdown
## Code Before: [![Build Status](https://travis-ci.org/wearearima/java-web-templates.svg?branch=master)](https://travis-ci.org/wearearima/java-web-templates) [![SonarQube.com Quality Gate status](https://sonarqube.com/api/badges/gate?key=eu.arima%3Ajava-web-templates%3Amaster)](https://sonarqube.com/overview?id=eu.arima%3Ajava-web-templates%3Amaster) ## Instruction: Remove branch name in sonarqube url ## Code After: [![Build Status](https://travis-ci.org/wearearima/java-web-templates.svg?branch=master)](https://travis-ci.org/wearearima/java-web-templates) [![SonarQube.com Quality Gate status](https://sonarqube.com/api/badges/gate?key=eu.arima%3Ajava-web-templates)](https://sonarqube.com/overview?id=eu.arima%3Ajava-web-templates)
[![Build Status](https://travis-ci.org/wearearima/java-web-templates.svg?branch=master)](https://travis-ci.org/wearearima/java-web-templates) - [![SonarQube.com Quality Gate status](https://sonarqube.com/api/badges/gate?key=eu.arima%3Ajava-web-templates%3Amaster)](https://sonarqube.com/overview?id=eu.arima%3Ajava-web-templates%3Amaster) ? --------- --------- + [![SonarQube.com Quality Gate status](https://sonarqube.com/api/badges/gate?key=eu.arima%3Ajava-web-templates)](https://sonarqube.com/overview?id=eu.arima%3Ajava-web-templates)
2
0.666667
1
1
967960f99f985e67c03f53a5f7526f272b04f0de
src/TapaViewBuilder.php
src/TapaViewBuilder.php
<?php namespace Drupal\display_modes_example; use Drupal\Core\Entity\EntityViewBuilder; /** * Class TapaViewBuilder * * Render controller for Tapas. */ class TapaViewBuilder extends EntityViewBuilder { /** * {@inheritdoc} */ public function buildComponents(array &$build, array $entities, array $displays, $view_mode) { parent::buildComponents($build, $entities, $displays, $view_mode); foreach ($entities as $id => $entity) { $bundle = $entity->bundle(); $display = $displays[$bundle]; if ($display->getComponent('common_text')) { $build[$id]['common_text'] = [ '#theme' => 'common_text', '#text' => t('Taste this and other awesome Tapas at this DrupalCamp Es!!! '), ]; } } } }
<?php namespace Drupal\display_modes_example; use Drupal\Core\Entity\EntityViewBuilder; /** * Class TapaViewBuilder * * Render controller for Tapas. */ class TapaViewBuilder extends EntityViewBuilder { /** * {@inheritdoc} */ public function buildComponents(array &$build, array $entities, array $displays, $view_mode) { parent::buildComponents($build, $entities, $displays, $view_mode); foreach ($entities as $id => $entity) { $bundle = $entity->bundle(); $display = $displays[$bundle]; if ($display->getComponent('common_text')) { $build[$id]['common_text'] = [ '#theme' => 'common_text', '#text' => t('Taste this and other awesome Tapas!!! '), ]; } } } }
Generalize the common view text
Generalize the common view text
PHP
apache-2.0
jlbellido/display_modes_example,jlbellido/display_modes_example
php
## Code Before: <?php namespace Drupal\display_modes_example; use Drupal\Core\Entity\EntityViewBuilder; /** * Class TapaViewBuilder * * Render controller for Tapas. */ class TapaViewBuilder extends EntityViewBuilder { /** * {@inheritdoc} */ public function buildComponents(array &$build, array $entities, array $displays, $view_mode) { parent::buildComponents($build, $entities, $displays, $view_mode); foreach ($entities as $id => $entity) { $bundle = $entity->bundle(); $display = $displays[$bundle]; if ($display->getComponent('common_text')) { $build[$id]['common_text'] = [ '#theme' => 'common_text', '#text' => t('Taste this and other awesome Tapas at this DrupalCamp Es!!! '), ]; } } } } ## Instruction: Generalize the common view text ## Code After: <?php namespace Drupal\display_modes_example; use Drupal\Core\Entity\EntityViewBuilder; /** * Class TapaViewBuilder * * Render controller for Tapas. */ class TapaViewBuilder extends EntityViewBuilder { /** * {@inheritdoc} */ public function buildComponents(array &$build, array $entities, array $displays, $view_mode) { parent::buildComponents($build, $entities, $displays, $view_mode); foreach ($entities as $id => $entity) { $bundle = $entity->bundle(); $display = $displays[$bundle]; if ($display->getComponent('common_text')) { $build[$id]['common_text'] = [ '#theme' => 'common_text', '#text' => t('Taste this and other awesome Tapas!!! '), ]; } } } }
<?php namespace Drupal\display_modes_example; use Drupal\Core\Entity\EntityViewBuilder; /** * Class TapaViewBuilder * * Render controller for Tapas. */ class TapaViewBuilder extends EntityViewBuilder { /** * {@inheritdoc} */ public function buildComponents(array &$build, array $entities, array $displays, $view_mode) { parent::buildComponents($build, $entities, $displays, $view_mode); foreach ($entities as $id => $entity) { $bundle = $entity->bundle(); $display = $displays[$bundle]; if ($display->getComponent('common_text')) { $build[$id]['common_text'] = [ '#theme' => 'common_text', - '#text' => t('Taste this and other awesome Tapas at this DrupalCamp Es!!! '), ? ---------------------- + '#text' => t('Taste this and other awesome Tapas!!! '), ]; } } } }
2
0.0625
1
1
59a09e502f7a7995f3a181b42e29973576f7b0f1
src/main/java/player/TDPlayerEngine.java
src/main/java/player/TDPlayerEngine.java
package main.java.player; import jgame.platform.JGEngine; public class TDPlayerEngine extends JGEngine { public TDPlayerEngine() { super(); initEngineComponent(960, 640); } @Override public void initCanvas() { setCanvasSettings(15, 10, 32, 32, null, null, null); } @Override public void initGame() { setFrameRate(35, 2); } public void doFrame() { } }
package main.java.player; import jgame.JGColor; import jgame.JGPoint; import jgame.platform.JGEngine; import main.java.engine.Model; public class TDPlayerEngine extends JGEngine { private Model model; public TDPlayerEngine() { super(); initEngineComponent(960, 640); } @Override public void initCanvas() { setCanvasSettings(15, 10, 32, 32, null, JGColor.black, null); } @Override public void initGame() { setFrameRate(45, 1); this.model = new Model(); model.setEngine(this); model.addNewPlayer(); model.loadMap("testmap.json"); defineMedia("/main/resources/media.tbl"); model.setTemporaryWaveSchema(); } @Override public void paintFrame() { highlightMouseoverTile(); displayGameStats(); } private void highlightMouseoverTile() { JGPoint mousePos = getMousePos(); int curXTilePos = mousePos.x/tileWidth() * tileWidth(); int curYTilePos = mousePos.y/tileHeight() * tileHeight(); this.drawRect(curXTilePos, curYTilePos, tileWidth(), tileHeight(), false, false, 1.0, JGColor.yellow); } private void displayGameStats() { this.drawString("Score: "+model.getScore(), 50, 25, -1); this.drawString("Lives left: "+model.getPlayerLife(), 50, 50, -1); this.drawString("Money: "+model.getMoney(), 50, 75, -1); this.drawString("Game clock: "+model.getGameClock(), 50, 100, -1); } @Override public void doFrame() { super.doFrame(); model.updateGameClockByFrame(); if (getMouseButton(1)) { model.placeTower(getMouseX(), getMouseY()); } if (model.getGameClock() % 100 == 0) model.spawnNextWave(); moveObjects(); // model.spawnMonster(100, 150); } }
Make player talk to engine
Make player talk to engine
Java
mit
sdh31/tower_defense,jordanly/oogasalad_OOGALoompas,dennis-park/OOGALoompas,kevinkdo/oogasalad_OOGALoompas,codylieu/oogasalad_OOGALoompas,dianwen/oogasalad_TowerDefense,garysheng/tower-defense-game-engine
java
## Code Before: package main.java.player; import jgame.platform.JGEngine; public class TDPlayerEngine extends JGEngine { public TDPlayerEngine() { super(); initEngineComponent(960, 640); } @Override public void initCanvas() { setCanvasSettings(15, 10, 32, 32, null, null, null); } @Override public void initGame() { setFrameRate(35, 2); } public void doFrame() { } } ## Instruction: Make player talk to engine ## Code After: package main.java.player; import jgame.JGColor; import jgame.JGPoint; import jgame.platform.JGEngine; import main.java.engine.Model; public class TDPlayerEngine extends JGEngine { private Model model; public TDPlayerEngine() { super(); initEngineComponent(960, 640); } @Override public void initCanvas() { setCanvasSettings(15, 10, 32, 32, null, JGColor.black, null); } @Override public void initGame() { setFrameRate(45, 1); this.model = new Model(); model.setEngine(this); model.addNewPlayer(); model.loadMap("testmap.json"); defineMedia("/main/resources/media.tbl"); model.setTemporaryWaveSchema(); } @Override public void paintFrame() { highlightMouseoverTile(); displayGameStats(); } private void highlightMouseoverTile() { JGPoint mousePos = getMousePos(); int curXTilePos = mousePos.x/tileWidth() * tileWidth(); int curYTilePos = mousePos.y/tileHeight() * tileHeight(); this.drawRect(curXTilePos, curYTilePos, tileWidth(), tileHeight(), false, false, 1.0, JGColor.yellow); } private void displayGameStats() { this.drawString("Score: "+model.getScore(), 50, 25, -1); this.drawString("Lives left: "+model.getPlayerLife(), 50, 50, -1); this.drawString("Money: "+model.getMoney(), 50, 75, -1); this.drawString("Game clock: "+model.getGameClock(), 50, 100, -1); } @Override public void doFrame() { super.doFrame(); model.updateGameClockByFrame(); if (getMouseButton(1)) { model.placeTower(getMouseX(), getMouseY()); } if (model.getGameClock() % 100 == 0) model.spawnNextWave(); moveObjects(); // model.spawnMonster(100, 150); } }
package main.java.player; + import jgame.JGColor; + import jgame.JGPoint; import jgame.platform.JGEngine; + import main.java.engine.Model; public class TDPlayerEngine extends JGEngine { + private Model model; public TDPlayerEngine() { super(); initEngineComponent(960, 640); } @Override public void initCanvas() { - setCanvasSettings(15, 10, 32, 32, null, null, null); ? ^^ + setCanvasSettings(15, 10, 32, 32, null, JGColor.black, null); ? ^^^^ ++++ +++ } @Override public void initGame() { - setFrameRate(35, 2); ? ^ ^ + setFrameRate(45, 1); ? ^ ^ + this.model = new Model(); + model.setEngine(this); + model.addNewPlayer(); + model.loadMap("testmap.json"); + defineMedia("/main/resources/media.tbl"); + model.setTemporaryWaveSchema(); } + + @Override + public void paintFrame() { + highlightMouseoverTile(); + displayGameStats(); + } + private void highlightMouseoverTile() { + JGPoint mousePos = getMousePos(); + int curXTilePos = mousePos.x/tileWidth() * tileWidth(); + int curYTilePos = mousePos.y/tileHeight() * tileHeight(); + + this.drawRect(curXTilePos, curYTilePos, tileWidth(), tileHeight(), false, false, 1.0, JGColor.yellow); + } + + private void displayGameStats() { + this.drawString("Score: "+model.getScore(), 50, 25, -1); + this.drawString("Lives left: "+model.getPlayerLife(), 50, 50, -1); + this.drawString("Money: "+model.getMoney(), 50, 75, -1); + this.drawString("Game clock: "+model.getGameClock(), 50, 100, -1); + } + + @Override - public void doFrame() { ? ^ + public void doFrame() { ? ^^^^ - - } + super.doFrame(); + model.updateGameClockByFrame(); + if (getMouseButton(1)) { + model.placeTower(getMouseX(), getMouseY()); + } + if (model.getGameClock() % 100 == 0) + model.spawnNextWave(); + moveObjects(); + // model.spawnMonster(100, 150); + } }
50
2
45
5
b8ba3f6bf4a7f81ad47c72b0d0e90be1a03f5753
deps/cmocka/make.sh
deps/cmocka/make.sh
set -e PKGNAME=cmocka-1.1.3.tar.xz if [ -d include ]; then echo "cmocka: already built" else ( echo "wget cmocka $PKGNAME" wget http://cmocka.org/files/1.1/$PKGNAME echo "cmocka: build" rm -rf include lib build tar xvf $PKGNAME mv `basename $PKGNAME .tar.xz` build ( cd build; mkdir tmp-build ( cd tmp-build cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`pwd`/../out -DWITH_STATIC_LIB=ON make make install ) ) mv build/out/include . mkdir lib if [ -f build/out/lib64/libcmocka-static.a ]; then cp build/out/lib64/libcmocka-static.a lib/libcmocka.a elif [ -f build/out/lib/libcmocka-static.a ]; then cp build/out/lib/libcmocka-static.a lib/libcmocka.a else echo "cmocka: static library not found!" exit 1 fi echo "cmocka: done" ) fi
set -e PKGNAME=cmocka-1.1.3.tar.xz if [ -d include ]; then echo "cmocka: already built" else ( echo "wget cmocka $PKGNAME" curl -L http://cmocka.org/files/1.1/$PKGNAME > $PKGNAME echo "cmocka: build" rm -rf include lib build tar xvf $PKGNAME mv `basename $PKGNAME .tar.xz` build ( cd build; mkdir tmp-build ( cd tmp-build cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`pwd`/../out -DWITH_STATIC_LIB=ON make make install ) ) mv build/out/include . mkdir lib if [ -f build/out/lib64/libcmocka-static.a ]; then cp build/out/lib64/libcmocka-static.a lib/libcmocka.a elif [ -f build/out/lib/libcmocka-static.a ]; then cp build/out/lib/libcmocka-static.a lib/libcmocka.a else echo "cmocka: static library not found!" exit 1 fi echo "cmocka: done" ) fi
Use curl instead of wget
Use curl instead of wget
Shell
mit
pdobrowo/libcs2,pdobrowo/libcs2,pdobrowo/libcs2
shell
## Code Before: set -e PKGNAME=cmocka-1.1.3.tar.xz if [ -d include ]; then echo "cmocka: already built" else ( echo "wget cmocka $PKGNAME" wget http://cmocka.org/files/1.1/$PKGNAME echo "cmocka: build" rm -rf include lib build tar xvf $PKGNAME mv `basename $PKGNAME .tar.xz` build ( cd build; mkdir tmp-build ( cd tmp-build cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`pwd`/../out -DWITH_STATIC_LIB=ON make make install ) ) mv build/out/include . mkdir lib if [ -f build/out/lib64/libcmocka-static.a ]; then cp build/out/lib64/libcmocka-static.a lib/libcmocka.a elif [ -f build/out/lib/libcmocka-static.a ]; then cp build/out/lib/libcmocka-static.a lib/libcmocka.a else echo "cmocka: static library not found!" exit 1 fi echo "cmocka: done" ) fi ## Instruction: Use curl instead of wget ## Code After: set -e PKGNAME=cmocka-1.1.3.tar.xz if [ -d include ]; then echo "cmocka: already built" else ( echo "wget cmocka $PKGNAME" curl -L http://cmocka.org/files/1.1/$PKGNAME > $PKGNAME echo "cmocka: build" rm -rf include lib build tar xvf $PKGNAME mv `basename $PKGNAME .tar.xz` build ( cd build; mkdir tmp-build ( cd tmp-build cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`pwd`/../out -DWITH_STATIC_LIB=ON make make install ) ) mv build/out/include . mkdir lib if [ -f build/out/lib64/libcmocka-static.a ]; then cp build/out/lib64/libcmocka-static.a lib/libcmocka.a elif [ -f build/out/lib/libcmocka-static.a ]; then cp build/out/lib/libcmocka-static.a lib/libcmocka.a else echo "cmocka: static library not found!" exit 1 fi echo "cmocka: done" ) fi
set -e PKGNAME=cmocka-1.1.3.tar.xz if [ -d include ]; then echo "cmocka: already built" else ( echo "wget cmocka $PKGNAME" - wget http://cmocka.org/files/1.1/$PKGNAME ? ^^^^ + curl -L http://cmocka.org/files/1.1/$PKGNAME > $PKGNAME ? ^^^^^^^ +++++++++++ echo "cmocka: build" rm -rf include lib build tar xvf $PKGNAME mv `basename $PKGNAME .tar.xz` build ( cd build; mkdir tmp-build ( cd tmp-build cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`pwd`/../out -DWITH_STATIC_LIB=ON make make install ) ) mv build/out/include . mkdir lib if [ -f build/out/lib64/libcmocka-static.a ]; then cp build/out/lib64/libcmocka-static.a lib/libcmocka.a elif [ -f build/out/lib/libcmocka-static.a ]; then cp build/out/lib/libcmocka-static.a lib/libcmocka.a else echo "cmocka: static library not found!" exit 1 fi echo "cmocka: done" ) fi
2
0.051282
1
1
fea8b3ce5a95430370e0215a8fc0b8e25f95e452
.travis.yml
.travis.yml
language: node_js node_js: - '0.12' - '4' - '5' deploy: provider: heroku api_key: "4dacafd2-7064-4c78-b2fb-122b9a122a5a" app: tox-mi24-bootstrap on: tags: true
language: node_js node_js: - '0.12' - '4' - '5' deploy: provider: heroku api_key: $HEROKU_TOKEN app: tox-mi24-bootstrap on: tags: true
Replace apikey with a placeholder!
Replace apikey with a placeholder!
YAML
mit
dasrick/mi24-bootstrap
yaml
## Code Before: language: node_js node_js: - '0.12' - '4' - '5' deploy: provider: heroku api_key: "4dacafd2-7064-4c78-b2fb-122b9a122a5a" app: tox-mi24-bootstrap on: tags: true ## Instruction: Replace apikey with a placeholder! ## Code After: language: node_js node_js: - '0.12' - '4' - '5' deploy: provider: heroku api_key: $HEROKU_TOKEN app: tox-mi24-bootstrap on: tags: true
language: node_js node_js: - '0.12' - '4' - '5' deploy: provider: heroku - api_key: "4dacafd2-7064-4c78-b2fb-122b9a122a5a" + api_key: $HEROKU_TOKEN app: tox-mi24-bootstrap on: tags: true
2
0.153846
1
1
7de4a86f5a6ef4f192b574afa8ab11ff5076e3cd
contracts/NonceCompareOpSingleton.sol
contracts/NonceCompareOpSingleton.sol
import "./NonceCompareOp.sol"; contract NonceCompareOpSingleton { NonceCompareOp nonceCompareOp; event CreateNonceCompareOp(address indexed nonceCompareOp); function getNonceCompareOp() returns (NonceCompareOp) { if (address(nonceCompareOp) == 0) { nonceCompareOp = new NonceCompareOp(); } CreatedNonceCompareOp(nonceCompareOp); return nonceCompareOp; } }
import "./NonceCompareOp.sol"; contract NonceCompareOpSingleton { NonceCompareOp nonceCompareOp; function getNonceCompareOp() returns (NonceCompareOp) { if (address(nonceCompareOp) == 0) { nonceCompareOp = new NonceCompareOp(); } return nonceCompareOp; } }
Revert "Added event to ease the ui side of things"
Revert "Added event to ease the ui side of things" This reverts commit 34c457170b8bce8e09cd6c829d963c7aaadfc3b3. An event shouldn't be necessary for this contract.
Solidity
mit
ledgerlabs/toy-state-channels,ledgerlabs/toy-state-channels
solidity
## Code Before: import "./NonceCompareOp.sol"; contract NonceCompareOpSingleton { NonceCompareOp nonceCompareOp; event CreateNonceCompareOp(address indexed nonceCompareOp); function getNonceCompareOp() returns (NonceCompareOp) { if (address(nonceCompareOp) == 0) { nonceCompareOp = new NonceCompareOp(); } CreatedNonceCompareOp(nonceCompareOp); return nonceCompareOp; } } ## Instruction: Revert "Added event to ease the ui side of things" This reverts commit 34c457170b8bce8e09cd6c829d963c7aaadfc3b3. An event shouldn't be necessary for this contract. ## Code After: import "./NonceCompareOp.sol"; contract NonceCompareOpSingleton { NonceCompareOp nonceCompareOp; function getNonceCompareOp() returns (NonceCompareOp) { if (address(nonceCompareOp) == 0) { nonceCompareOp = new NonceCompareOp(); } return nonceCompareOp; } }
import "./NonceCompareOp.sol"; contract NonceCompareOpSingleton { NonceCompareOp nonceCompareOp; - - event CreateNonceCompareOp(address indexed nonceCompareOp); function getNonceCompareOp() returns (NonceCompareOp) { if (address(nonceCompareOp) == 0) { nonceCompareOp = new NonceCompareOp(); } - CreatedNonceCompareOp(nonceCompareOp); return nonceCompareOp; } }
3
0.2
0
3
98c229e16ecac59435a6a93144fd78f69a08ca24
src/Pippin/Transport/cURLTransport.php
src/Pippin/Transport/cURLTransport.php
<?php namespace Pippin\Transport; use Psr\Http\Message\RequestInterface; use RuntimeException; class cURLTransport implements TransportInterface { private $curl; public function __construct() { if (!extension_loaded('curl')) { throw new RuntimeException('The cURL extension must be installed to use the cURLTransport class.'); } $this->curl = curl_init(); curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, 1); curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($this->curl, CURLOPT_FORBID_REUSE, 1); curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true); } public function request(RequestInterface $request) { curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, $request->getMethod()); curl_setopt($this->curl, CURLOPT_HTTPHEADER, $request->getHeaders()); curl_setopt($this->curl, CURLOPT_URL, (string)$request->getUri()); $stream = $request->getStream(); if (!is_null($stream)) { curl_setopt($this->curl, CURLOPT_POSTFIELDS, (string)$stream); } return curl_exec($this->curl); } }
<?php namespace Pippin\Transport; use Psr\Http\Message\RequestInterface; use RuntimeException; class cURLTransport implements TransportInterface { private $curl; public function __construct() { if (!extension_loaded('curl')) { throw new RuntimeException('The cURL extension must be installed to use the cURLTransport class.'); } $this->curl = curl_init(); curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, 1); curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($this->curl, CURLOPT_FORBID_REUSE, 1); curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true); } public function request(RequestInterface $request) { curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, $request->getMethod()); curl_setopt($this->curl, CURLOPT_HTTPHEADER, $request->getHeaders()); curl_setopt($this->curl, CURLOPT_URL, (string)$request->getUri()); $body = $request->getBody(); if (!is_null($body)) { curl_setopt($this->curl, CURLOPT_POSTFIELDS, (string)$body); } return curl_exec($this->curl); } }
Use correct method, and rename variable.
Use correct method, and rename variable.
PHP
mit
grantjbutler/pippin
php
## Code Before: <?php namespace Pippin\Transport; use Psr\Http\Message\RequestInterface; use RuntimeException; class cURLTransport implements TransportInterface { private $curl; public function __construct() { if (!extension_loaded('curl')) { throw new RuntimeException('The cURL extension must be installed to use the cURLTransport class.'); } $this->curl = curl_init(); curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, 1); curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($this->curl, CURLOPT_FORBID_REUSE, 1); curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true); } public function request(RequestInterface $request) { curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, $request->getMethod()); curl_setopt($this->curl, CURLOPT_HTTPHEADER, $request->getHeaders()); curl_setopt($this->curl, CURLOPT_URL, (string)$request->getUri()); $stream = $request->getStream(); if (!is_null($stream)) { curl_setopt($this->curl, CURLOPT_POSTFIELDS, (string)$stream); } return curl_exec($this->curl); } } ## Instruction: Use correct method, and rename variable. ## Code After: <?php namespace Pippin\Transport; use Psr\Http\Message\RequestInterface; use RuntimeException; class cURLTransport implements TransportInterface { private $curl; public function __construct() { if (!extension_loaded('curl')) { throw new RuntimeException('The cURL extension must be installed to use the cURLTransport class.'); } $this->curl = curl_init(); curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, 1); curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($this->curl, CURLOPT_FORBID_REUSE, 1); curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true); } public function request(RequestInterface $request) { curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, $request->getMethod()); curl_setopt($this->curl, CURLOPT_HTTPHEADER, $request->getHeaders()); curl_setopt($this->curl, CURLOPT_URL, (string)$request->getUri()); $body = $request->getBody(); if (!is_null($body)) { curl_setopt($this->curl, CURLOPT_POSTFIELDS, (string)$body); } return curl_exec($this->curl); } }
<?php namespace Pippin\Transport; use Psr\Http\Message\RequestInterface; use RuntimeException; class cURLTransport implements TransportInterface { private $curl; public function __construct() { if (!extension_loaded('curl')) { throw new RuntimeException('The cURL extension must be installed to use the cURLTransport class.'); } $this->curl = curl_init(); curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, 1); curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($this->curl, CURLOPT_FORBID_REUSE, 1); curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true); } public function request(RequestInterface $request) { curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, $request->getMethod()); curl_setopt($this->curl, CURLOPT_HTTPHEADER, $request->getHeaders()); curl_setopt($this->curl, CURLOPT_URL, (string)$request->getUri()); - $stream = $request->getStream(); + $body = $request->getBody(); - if (!is_null($stream)) { ? ^^^^^^ + if (!is_null($body)) { ? ^^^^ - curl_setopt($this->curl, CURLOPT_POSTFIELDS, (string)$stream); ? ^^^^^^ + curl_setopt($this->curl, CURLOPT_POSTFIELDS, (string)$body); ? ^^^^ } return curl_exec($this->curl); } }
6
0.153846
3
3
208e3642efb54d529abf94661a0545eeb94e1c5d
lib/file_data/formats/mpeg4/box_stream.rb
lib/file_data/formats/mpeg4/box_stream.rb
require_relative 'box' module FileData class BoxStream def initialize(stream) @stream = stream end def boxes Enumerator.new do |e| cur_pos = 0 until @stream.eof? @stream.seek cur_pos box = FileData::Box.new box.read(@stream) e.yield box cur_pos += box.size end end.lazy end end class BoxSubStream def initialize(stream, parent_box) @stream = stream @parent_box = parent_box end def boxes initial_pos = @stream.pos Enumerator.new do |e| cur_pos = @stream.pos until cur_pos >= initial_pos + @parent_box.size @stream.seek cur_pos box = FileData::Box.new box.read(@stream) e.yield box cur_pos += box.size end end.lazy end end end
require_relative 'box' module FileData class BoxStream def initialize(stream) @stream = stream @initial_pos = @stream.pos end def should_stop(pos) @stream.eof? end def boxes Enumerator.new do |e| cur_pos = @initial_pos until should_stop(@stream.pos) @stream.seek cur_pos box = FileData::Box.new box.read(@stream) e.yield box cur_pos += box.size end end.lazy end end class BoxSubStream < BoxStream def initialize(stream, parent_box) super(stream) @parent_box = parent_box end def should_stop(pos) pos >= @initial_pos + @parent_box.size end end end
Remove some of the duplication in BoxStream and BoxSubStream by using inheritance
Remove some of the duplication in BoxStream and BoxSubStream by using inheritance
Ruby
mit
ScottHaney/file_data
ruby
## Code Before: require_relative 'box' module FileData class BoxStream def initialize(stream) @stream = stream end def boxes Enumerator.new do |e| cur_pos = 0 until @stream.eof? @stream.seek cur_pos box = FileData::Box.new box.read(@stream) e.yield box cur_pos += box.size end end.lazy end end class BoxSubStream def initialize(stream, parent_box) @stream = stream @parent_box = parent_box end def boxes initial_pos = @stream.pos Enumerator.new do |e| cur_pos = @stream.pos until cur_pos >= initial_pos + @parent_box.size @stream.seek cur_pos box = FileData::Box.new box.read(@stream) e.yield box cur_pos += box.size end end.lazy end end end ## Instruction: Remove some of the duplication in BoxStream and BoxSubStream by using inheritance ## Code After: require_relative 'box' module FileData class BoxStream def initialize(stream) @stream = stream @initial_pos = @stream.pos end def should_stop(pos) @stream.eof? end def boxes Enumerator.new do |e| cur_pos = @initial_pos until should_stop(@stream.pos) @stream.seek cur_pos box = FileData::Box.new box.read(@stream) e.yield box cur_pos += box.size end end.lazy end end class BoxSubStream < BoxStream def initialize(stream, parent_box) super(stream) @parent_box = parent_box end def should_stop(pos) pos >= @initial_pos + @parent_box.size end end end
require_relative 'box' module FileData class BoxStream def initialize(stream) @stream = stream + @initial_pos = @stream.pos + end + + def should_stop(pos) + @stream.eof? end def boxes Enumerator.new do |e| - cur_pos = 0 - until @stream.eof? + cur_pos = @initial_pos + until should_stop(@stream.pos) @stream.seek cur_pos box = FileData::Box.new box.read(@stream) e.yield box cur_pos += box.size end end.lazy end end - class BoxSubStream + class BoxSubStream < BoxStream ? ++++++++++++ def initialize(stream, parent_box) - @stream = stream + super(stream) @parent_box = parent_box end + def should_stop(pos) - def boxes - initial_pos = @stream.pos - Enumerator.new do |e| - cur_pos = @stream.pos - until cur_pos >= initial_pos + @parent_box.size ? ------------ + pos >= @initial_pos + @parent_box.size ? + - @stream.seek cur_pos - - box = FileData::Box.new - box.read(@stream) - - e.yield box - cur_pos += box.size - end - end.lazy end end end
29
0.617021
11
18
c2a69c18085d4f9ee932465e143fe051037d98db
util/output_pipe.py
util/output_pipe.py
import sys import re from xc_exception import TestFailureError from colors import Colors from meta_line import MetaLine from line import Line class OutputPipe: meta_lines = [] verbose = True pretty = True unacceptable_output = [] # unacceptable_output is usful for failing based on command output, rather than # exitcode def __init__(self, verbose = True, pretty = True, unacceptable_output=[]): self.verbose = verbose self.pretty = pretty self.unacceptable_output = unacceptable_output def put_line(self, line): m_line = MetaLine(line) self.meta_lines.append(m_line) if self.verbose: if self.pretty: output = m_line.str() else: output = line sys.stdout.write(output) for uo in self.unacceptable_output: if re.compile(uo).match(line): raise TestFailureError(line)
import sys import re from xc_exception import TestFailureError from colors import Colors from meta_line import MetaLine from line import Line class OutputPipe: meta_lines = [] verbose = True pretty = True unacceptable_output = [] # unacceptable_output is usful for failing based on command output, rather than # exitcode def __init__(self, verbose = True, pretty = True, unacceptable_output=[]): self.verbose = verbose self.pretty = pretty self.unacceptable_output = unacceptable_output self.meta_lines = [] def put_line(self, line): m_line = MetaLine(line) self.meta_lines.append(m_line) if self.verbose: if self.pretty: output = m_line.str() else: output = line sys.stdout.write(output) for uo in self.unacceptable_output: if re.compile(uo).match(line): raise TestFailureError(line)
Fix bug where previous instances would populate the new OutputPipe
Fix bug where previous instances would populate the new OutputPipe
Python
mit
JBarberU/strawberry_py
python
## Code Before: import sys import re from xc_exception import TestFailureError from colors import Colors from meta_line import MetaLine from line import Line class OutputPipe: meta_lines = [] verbose = True pretty = True unacceptable_output = [] # unacceptable_output is usful for failing based on command output, rather than # exitcode def __init__(self, verbose = True, pretty = True, unacceptable_output=[]): self.verbose = verbose self.pretty = pretty self.unacceptable_output = unacceptable_output def put_line(self, line): m_line = MetaLine(line) self.meta_lines.append(m_line) if self.verbose: if self.pretty: output = m_line.str() else: output = line sys.stdout.write(output) for uo in self.unacceptable_output: if re.compile(uo).match(line): raise TestFailureError(line) ## Instruction: Fix bug where previous instances would populate the new OutputPipe ## Code After: import sys import re from xc_exception import TestFailureError from colors import Colors from meta_line import MetaLine from line import Line class OutputPipe: meta_lines = [] verbose = True pretty = True unacceptable_output = [] # unacceptable_output is usful for failing based on command output, rather than # exitcode def __init__(self, verbose = True, pretty = True, unacceptable_output=[]): self.verbose = verbose self.pretty = pretty self.unacceptable_output = unacceptable_output self.meta_lines = [] def put_line(self, line): m_line = MetaLine(line) self.meta_lines.append(m_line) if self.verbose: if self.pretty: output = m_line.str() else: output = line sys.stdout.write(output) for uo in self.unacceptable_output: if re.compile(uo).match(line): raise TestFailureError(line)
import sys import re from xc_exception import TestFailureError from colors import Colors from meta_line import MetaLine from line import Line class OutputPipe: meta_lines = [] verbose = True pretty = True unacceptable_output = [] # unacceptable_output is usful for failing based on command output, rather than # exitcode def __init__(self, verbose = True, pretty = True, unacceptable_output=[]): self.verbose = verbose self.pretty = pretty self.unacceptable_output = unacceptable_output + self.meta_lines = [] def put_line(self, line): m_line = MetaLine(line) self.meta_lines.append(m_line) if self.verbose: if self.pretty: output = m_line.str() else: output = line sys.stdout.write(output) for uo in self.unacceptable_output: if re.compile(uo).match(line): raise TestFailureError(line)
1
0.027778
1
0
f7a1d1b3bf719871afd04f5c56d6248bc7f21e31
src/Resources/config/services.yml
src/Resources/config/services.yml
services: ### QPush Registry uecode_qpush.registry: class: Uecode\Bundle\QPushBundle\Provider\ProviderRegistry uecode_qpush: alias: uecode_qpush.registry ### QPush Default File Cache uecode_qpush.file_cache: class: Doctrine\Common\Cache\PhpFileCache arguments: ['%kernel.cache_dir%/qpush', qpush.php] public: false ### QPush Event Listeners uecode_qpush.request_listener: class: Uecode\Bundle\QPushBundle\EventListener\RequestListener arguments: - '@event_dispatcher' tags: - { name: kernel.event_listener, event: kernel.request, priority: '%uecode_qpush.request_listener.priority%' } ### QPush Commands uecode_qpush.build_command: class: Uecode\Bundle\QPushBundle\Command\QueueBuildCommand tags: - { name: console.command } uecode_qpush.destroy_command: class: Uecode\Bundle\QPushBundle\Command\QueueDestroyCommand tags: - { name: console.command } uecode_qpush.publish_command: class: Uecode\Bundle\QPushBundle\Command\QueuePublishCommand tags: - { name: console.command } uecode_qpush.receive_command: class: Uecode\Bundle\QPushBundle\Command\QueueReceiveCommand tags: - { name: console.command }
services: ### QPush Registry uecode_qpush.registry: class: Uecode\Bundle\QPushBundle\Provider\ProviderRegistry uecode_qpush: alias: uecode_qpush.registry public: true ### QPush Default File Cache uecode_qpush.file_cache: class: Doctrine\Common\Cache\PhpFileCache arguments: ['%kernel.cache_dir%/qpush', qpush.php] public: false ### QPush Event Listeners uecode_qpush.request_listener: class: Uecode\Bundle\QPushBundle\EventListener\RequestListener arguments: - '@event_dispatcher' tags: - { name: kernel.event_listener, event: kernel.request, priority: '%uecode_qpush.request_listener.priority%' } ### QPush Commands uecode_qpush.build_command: class: Uecode\Bundle\QPushBundle\Command\QueueBuildCommand tags: - { name: console.command } uecode_qpush.destroy_command: class: Uecode\Bundle\QPushBundle\Command\QueueDestroyCommand tags: - { name: console.command } uecode_qpush.publish_command: class: Uecode\Bundle\QPushBundle\Command\QueuePublishCommand tags: - { name: console.command } uecode_qpush.receive_command: class: Uecode\Bundle\QPushBundle\Command\QueueReceiveCommand tags: - { name: console.command }
Fix the service visibility for Symfony 4
Fix the service visibility for Symfony 4
YAML
apache-2.0
uecode/qpush-bundle
yaml
## Code Before: services: ### QPush Registry uecode_qpush.registry: class: Uecode\Bundle\QPushBundle\Provider\ProviderRegistry uecode_qpush: alias: uecode_qpush.registry ### QPush Default File Cache uecode_qpush.file_cache: class: Doctrine\Common\Cache\PhpFileCache arguments: ['%kernel.cache_dir%/qpush', qpush.php] public: false ### QPush Event Listeners uecode_qpush.request_listener: class: Uecode\Bundle\QPushBundle\EventListener\RequestListener arguments: - '@event_dispatcher' tags: - { name: kernel.event_listener, event: kernel.request, priority: '%uecode_qpush.request_listener.priority%' } ### QPush Commands uecode_qpush.build_command: class: Uecode\Bundle\QPushBundle\Command\QueueBuildCommand tags: - { name: console.command } uecode_qpush.destroy_command: class: Uecode\Bundle\QPushBundle\Command\QueueDestroyCommand tags: - { name: console.command } uecode_qpush.publish_command: class: Uecode\Bundle\QPushBundle\Command\QueuePublishCommand tags: - { name: console.command } uecode_qpush.receive_command: class: Uecode\Bundle\QPushBundle\Command\QueueReceiveCommand tags: - { name: console.command } ## Instruction: Fix the service visibility for Symfony 4 ## Code After: services: ### QPush Registry uecode_qpush.registry: class: Uecode\Bundle\QPushBundle\Provider\ProviderRegistry uecode_qpush: alias: uecode_qpush.registry public: true ### QPush Default File Cache uecode_qpush.file_cache: class: Doctrine\Common\Cache\PhpFileCache arguments: ['%kernel.cache_dir%/qpush', qpush.php] public: false ### QPush Event Listeners uecode_qpush.request_listener: class: Uecode\Bundle\QPushBundle\EventListener\RequestListener arguments: - '@event_dispatcher' tags: - { name: kernel.event_listener, event: kernel.request, priority: '%uecode_qpush.request_listener.priority%' } ### QPush Commands uecode_qpush.build_command: class: Uecode\Bundle\QPushBundle\Command\QueueBuildCommand tags: - { name: console.command } uecode_qpush.destroy_command: class: Uecode\Bundle\QPushBundle\Command\QueueDestroyCommand tags: - { name: console.command } uecode_qpush.publish_command: class: Uecode\Bundle\QPushBundle\Command\QueuePublishCommand tags: - { name: console.command } uecode_qpush.receive_command: class: Uecode\Bundle\QPushBundle\Command\QueueReceiveCommand tags: - { name: console.command }
services: ### QPush Registry uecode_qpush.registry: class: Uecode\Bundle\QPushBundle\Provider\ProviderRegistry uecode_qpush: alias: uecode_qpush.registry + public: true ### QPush Default File Cache uecode_qpush.file_cache: class: Doctrine\Common\Cache\PhpFileCache arguments: ['%kernel.cache_dir%/qpush', qpush.php] public: false ### QPush Event Listeners uecode_qpush.request_listener: class: Uecode\Bundle\QPushBundle\EventListener\RequestListener arguments: - '@event_dispatcher' tags: - { name: kernel.event_listener, event: kernel.request, priority: '%uecode_qpush.request_listener.priority%' } ### QPush Commands uecode_qpush.build_command: class: Uecode\Bundle\QPushBundle\Command\QueueBuildCommand tags: - { name: console.command } uecode_qpush.destroy_command: class: Uecode\Bundle\QPushBundle\Command\QueueDestroyCommand tags: - { name: console.command } uecode_qpush.publish_command: class: Uecode\Bundle\QPushBundle\Command\QueuePublishCommand tags: - { name: console.command } uecode_qpush.receive_command: class: Uecode\Bundle\QPushBundle\Command\QueueReceiveCommand tags: - { name: console.command }
1
0.02439
1
0
27d797cec0072b5de3cda557edd99a4da81508f2
modules/rkhunter/templates/rkhunter-passive-check.erb
modules/rkhunter/templates/rkhunter-passive-check.erb
. /etc/default/rkhunter OUTPUT=`/usr/bin/nice -n 19 /usr/bin/rkhunter --cronjob --report-warnings-only` if [ "$OUTPUT" == "" ]; then OUTPUT="No warnings found" fi CODE=$? # Force everything that isn't OK to be a WARNING if [ $CODE -gt 0 ]; then CODE=1 fi printf "<%= @fqdn %>\trkhunter warnings\t$CODE\t$OUTPUT\n" | /usr/sbin/send_nsca -H alert.cluster >/dev/null exit $?
. /etc/default/rkhunter OUTPUT=`/usr/bin/nice -n 19 /usr/bin/rkhunter --cronjob --report-warnings-only` CODE=$? if [ "$OUTPUT" == "" ]; then OUTPUT="No warnings found" fi # Force everything that isn't OK to be a WARNING if [ $CODE -gt 0 ]; then CODE=1 fi printf "<%= @fqdn %>\trkhunter warnings\t$CODE\t$OUTPUT\n" | /usr/sbin/send_nsca -H alert.cluster >/dev/null exit $?
Fix exit code check for rkhunter passive alert
Fix exit code check for rkhunter passive alert The variable `$CODE` was being assigned later than it should have been to check the result of the rkhunter run. This means that we ended up in the state where rkhunter exited with a non-zero exit code because it found something which it considered a warning, but the Icinga alert had a code of zero (OK).
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: . /etc/default/rkhunter OUTPUT=`/usr/bin/nice -n 19 /usr/bin/rkhunter --cronjob --report-warnings-only` if [ "$OUTPUT" == "" ]; then OUTPUT="No warnings found" fi CODE=$? # Force everything that isn't OK to be a WARNING if [ $CODE -gt 0 ]; then CODE=1 fi printf "<%= @fqdn %>\trkhunter warnings\t$CODE\t$OUTPUT\n" | /usr/sbin/send_nsca -H alert.cluster >/dev/null exit $? ## Instruction: Fix exit code check for rkhunter passive alert The variable `$CODE` was being assigned later than it should have been to check the result of the rkhunter run. This means that we ended up in the state where rkhunter exited with a non-zero exit code because it found something which it considered a warning, but the Icinga alert had a code of zero (OK). ## Code After: . /etc/default/rkhunter OUTPUT=`/usr/bin/nice -n 19 /usr/bin/rkhunter --cronjob --report-warnings-only` CODE=$? if [ "$OUTPUT" == "" ]; then OUTPUT="No warnings found" fi # Force everything that isn't OK to be a WARNING if [ $CODE -gt 0 ]; then CODE=1 fi printf "<%= @fqdn %>\trkhunter warnings\t$CODE\t$OUTPUT\n" | /usr/sbin/send_nsca -H alert.cluster >/dev/null exit $?
. /etc/default/rkhunter OUTPUT=`/usr/bin/nice -n 19 /usr/bin/rkhunter --cronjob --report-warnings-only` + CODE=$? if [ "$OUTPUT" == "" ]; then OUTPUT="No warnings found" fi - CODE=$? # Force everything that isn't OK to be a WARNING if [ $CODE -gt 0 ]; then CODE=1 fi printf "<%= @fqdn %>\trkhunter warnings\t$CODE\t$OUTPUT\n" | /usr/sbin/send_nsca -H alert.cluster >/dev/null exit $?
2
0.166667
1
1
b3ff5edd458909c5ff083f837805388462f498ab
NASAProject/src/com/example/nasaproject/MainActivity.java
NASAProject/src/com/example/nasaproject/MainActivity.java
package com.example.nasaproject; import android.app.Activity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; public class MainActivity extends Activity { private TextView title; private TextView date; private ImageView image; private TextView description; private Button buttonRefresh; private Button buttonSetWallpaper; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); initializeUI(); } private void initializeUI(){ title = (TextView) findViewById(R.id.imageTitle); date = (TextView) findViewById(R.id.imageDate); image = (ImageView) findViewById(R.id.imageDisplay); description = (TextView) findViewById(R.id.imageDesc); buttonRefresh = (Button) findViewById(R.id.button_refresh); buttonSetWallpaper = (Button) findViewById(R.id.button_setAsWallpaper); } }
package com.example.nasaproject; import android.app.Activity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; public class MainActivity extends Activity { private TextView title; private TextView date; private ImageView image; private TextView description; private Button buttonRefresh; private Button buttonSetWallpaper; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); initializeUI(); initilizeOnClickListener(); } private void initilizeOnClickListener() { buttonRefresh.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Toast.makeText(MainActivity.this, "Refresh Button Is Pressed ", Toast.LENGTH_LONG).show(); } }); buttonSetWallpaper.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Toast.makeText(MainActivity.this, "SetAsWallpaper Button Is Pressed ", Toast.LENGTH_LONG).show(); } }); } private void initializeUI(){ title = (TextView) findViewById(R.id.imageTitle); date = (TextView) findViewById(R.id.imageDate); image = (ImageView) findViewById(R.id.imageDisplay); description = (TextView) findViewById(R.id.imageDesc); buttonRefresh = (Button) findViewById(R.id.button_refresh); buttonSetWallpaper = (Button) findViewById(R.id.button_setAsWallpaper); } }
Set onClickListener on both buttons
Set onClickListener on both buttons
Java
mit
EduTechLabs/NASAImageOfTheDay
java
## Code Before: package com.example.nasaproject; import android.app.Activity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; public class MainActivity extends Activity { private TextView title; private TextView date; private ImageView image; private TextView description; private Button buttonRefresh; private Button buttonSetWallpaper; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); initializeUI(); } private void initializeUI(){ title = (TextView) findViewById(R.id.imageTitle); date = (TextView) findViewById(R.id.imageDate); image = (ImageView) findViewById(R.id.imageDisplay); description = (TextView) findViewById(R.id.imageDesc); buttonRefresh = (Button) findViewById(R.id.button_refresh); buttonSetWallpaper = (Button) findViewById(R.id.button_setAsWallpaper); } } ## Instruction: Set onClickListener on both buttons ## Code After: package com.example.nasaproject; import android.app.Activity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; public class MainActivity extends Activity { private TextView title; private TextView date; private ImageView image; private TextView description; private Button buttonRefresh; private Button buttonSetWallpaper; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); initializeUI(); initilizeOnClickListener(); } private void initilizeOnClickListener() { buttonRefresh.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Toast.makeText(MainActivity.this, "Refresh Button Is Pressed ", Toast.LENGTH_LONG).show(); } }); buttonSetWallpaper.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Toast.makeText(MainActivity.this, "SetAsWallpaper Button Is Pressed ", Toast.LENGTH_LONG).show(); } }); } private void initializeUI(){ title = (TextView) findViewById(R.id.imageTitle); date = (TextView) findViewById(R.id.imageDate); image = (ImageView) findViewById(R.id.imageDisplay); description = (TextView) findViewById(R.id.imageDesc); buttonRefresh = (Button) findViewById(R.id.button_refresh); buttonSetWallpaper = (Button) findViewById(R.id.button_setAsWallpaper); } }
package com.example.nasaproject; import android.app.Activity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; + import android.view.View; + import android.view.View.OnClickListener; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; + import android.widget.Toast; public class MainActivity extends Activity { + private TextView title; private TextView date; private ImageView image; private TextView description; private Button buttonRefresh; private Button buttonSetWallpaper; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); + initializeUI(); + + initilizeOnClickListener(); } + private void initilizeOnClickListener() { + buttonRefresh.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View v) { + Toast.makeText(MainActivity.this, "Refresh Button Is Pressed ", Toast.LENGTH_LONG).show(); + } + }); + buttonSetWallpaper.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View v) { + Toast.makeText(MainActivity.this, "SetAsWallpaper Button Is Pressed ", Toast.LENGTH_LONG).show(); + } + }); + + } + - private void initializeUI(){ ? ^^^^ + private void initializeUI(){ ? ^ title = (TextView) findViewById(R.id.imageTitle); date = (TextView) findViewById(R.id.imageDate); image = (ImageView) findViewById(R.id.imageDisplay); description = (TextView) findViewById(R.id.imageDesc); buttonRefresh = (Button) findViewById(R.id.button_refresh); buttonSetWallpaper = (Button) findViewById(R.id.button_setAsWallpaper); } }
27
0.658537
26
1
6bae1f4b44874299dd7a54abde25c5224479bb8b
brightray/browser/browser_main_parts.cc
brightray/browser/browser_main_parts.cc
// Copyright (c) 2012 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-CHROMIUM file. #include "browser/browser_main_parts.h" #include "browser/browser_context.h" #include "browser/web_ui_controller_factory.h" #include "net/proxy/proxy_resolver_v8.h" namespace brightray { BrowserMainParts::BrowserMainParts() { } BrowserMainParts::~BrowserMainParts() { } void BrowserMainParts::PreMainMessageLoopRun() { browser_context_.reset(CreateBrowserContext()); browser_context_->Initialize(); web_ui_controller_factory_.reset( new WebUIControllerFactory(browser_context_.get())); content::WebUIControllerFactory::RegisterFactory( web_ui_controller_factory_.get()); } void BrowserMainParts::PostMainMessageLoopRun() { browser_context_.reset(); } int BrowserMainParts::PreCreateThreads() { #if defined(OS_WIN) net::ProxyResolverV8::CreateIsolate(); #else net::ProxyResolverV8::RememberDefaultIsolate(); #endif return 0; } BrowserContext* BrowserMainParts::CreateBrowserContext() { return new BrowserContext; } } // namespace brightray
// Copyright (c) 2012 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-CHROMIUM file. #include "browser/browser_main_parts.h" #include "browser/browser_context.h" #include "browser/web_ui_controller_factory.h" #include "net/proxy/proxy_resolver_v8.h" #include "ui/gfx/screen.h" #include "ui/views/widget/desktop_aura/desktop_screen.h" namespace brightray { BrowserMainParts::BrowserMainParts() { } BrowserMainParts::~BrowserMainParts() { } void BrowserMainParts::PreMainMessageLoopRun() { browser_context_.reset(CreateBrowserContext()); browser_context_->Initialize(); web_ui_controller_factory_.reset( new WebUIControllerFactory(browser_context_.get())); content::WebUIControllerFactory::RegisterFactory( web_ui_controller_factory_.get()); #if defined(OS_WIN) gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen()); #endif } void BrowserMainParts::PostMainMessageLoopRun() { browser_context_.reset(); } int BrowserMainParts::PreCreateThreads() { #if defined(OS_WIN) net::ProxyResolverV8::CreateIsolate(); #else net::ProxyResolverV8::RememberDefaultIsolate(); #endif return 0; } BrowserContext* BrowserMainParts::CreateBrowserContext() { return new BrowserContext; } } // namespace brightray
Set up a native screen on Windows
Set up a native screen on Windows This is needed to prevent a crash inside aura::WindowTreeHost::InitCompositor.
C++
mit
electron/electron,tonyganch/electron,miniak/electron,Floato/electron,shiftkey/electron,shiftkey/electron,gerhardberger/electron,gerhardberger/electron,seanchas116/electron,renaesop/electron,wan-qy/electron,bpasero/electron,renaesop/electron,seanchas116/electron,the-ress/electron,shiftkey/electron,the-ress/electron,gerhardberger/electron,rajatsingla28/electron,shiftkey/electron,biblerule/UMCTelnetHub,rajatsingla28/electron,the-ress/electron,bpasero/electron,renaesop/electron,wan-qy/electron,tonyganch/electron,renaesop/electron,biblerule/UMCTelnetHub,Floato/electron,electron/electron,electron/electron,Floato/electron,the-ress/electron,seanchas116/electron,miniak/electron,rajatsingla28/electron,biblerule/UMCTelnetHub,gerhardberger/electron,rreimann/electron,electron/electron,miniak/electron,tonyganch/electron,Floato/electron,electron/electron,tonyganch/electron,electron/electron,tonyganch/electron,thomsonreuters/electron,gerhardberger/electron,renaesop/electron,rajatsingla28/electron,tonyganch/electron,the-ress/electron,wan-qy/electron,bpasero/electron,electron/electron,Floato/electron,the-ress/electron,miniak/electron,wan-qy/electron,wan-qy/electron,thomsonreuters/electron,rreimann/electron,thomsonreuters/electron,gerhardberger/electron,miniak/electron,rreimann/electron,bpasero/electron,renaesop/electron,seanchas116/electron,seanchas116/electron,rreimann/electron,rreimann/electron,gerhardberger/electron,wan-qy/electron,biblerule/UMCTelnetHub,bpasero/electron,biblerule/UMCTelnetHub,rreimann/electron,miniak/electron,Floato/electron,thomsonreuters/electron,shiftkey/electron,bpasero/electron,the-ress/electron,shiftkey/electron,rajatsingla28/electron,rajatsingla28/electron,bpasero/electron,biblerule/UMCTelnetHub,thomsonreuters/electron,thomsonreuters/electron,seanchas116/electron
c++
## Code Before: // Copyright (c) 2012 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-CHROMIUM file. #include "browser/browser_main_parts.h" #include "browser/browser_context.h" #include "browser/web_ui_controller_factory.h" #include "net/proxy/proxy_resolver_v8.h" namespace brightray { BrowserMainParts::BrowserMainParts() { } BrowserMainParts::~BrowserMainParts() { } void BrowserMainParts::PreMainMessageLoopRun() { browser_context_.reset(CreateBrowserContext()); browser_context_->Initialize(); web_ui_controller_factory_.reset( new WebUIControllerFactory(browser_context_.get())); content::WebUIControllerFactory::RegisterFactory( web_ui_controller_factory_.get()); } void BrowserMainParts::PostMainMessageLoopRun() { browser_context_.reset(); } int BrowserMainParts::PreCreateThreads() { #if defined(OS_WIN) net::ProxyResolverV8::CreateIsolate(); #else net::ProxyResolverV8::RememberDefaultIsolate(); #endif return 0; } BrowserContext* BrowserMainParts::CreateBrowserContext() { return new BrowserContext; } } // namespace brightray ## Instruction: Set up a native screen on Windows This is needed to prevent a crash inside aura::WindowTreeHost::InitCompositor. ## Code After: // Copyright (c) 2012 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-CHROMIUM file. #include "browser/browser_main_parts.h" #include "browser/browser_context.h" #include "browser/web_ui_controller_factory.h" #include "net/proxy/proxy_resolver_v8.h" #include "ui/gfx/screen.h" #include "ui/views/widget/desktop_aura/desktop_screen.h" namespace brightray { BrowserMainParts::BrowserMainParts() { } BrowserMainParts::~BrowserMainParts() { } void BrowserMainParts::PreMainMessageLoopRun() { browser_context_.reset(CreateBrowserContext()); browser_context_->Initialize(); web_ui_controller_factory_.reset( new WebUIControllerFactory(browser_context_.get())); content::WebUIControllerFactory::RegisterFactory( web_ui_controller_factory_.get()); #if defined(OS_WIN) gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen()); #endif } void BrowserMainParts::PostMainMessageLoopRun() { browser_context_.reset(); } int BrowserMainParts::PreCreateThreads() { #if defined(OS_WIN) net::ProxyResolverV8::CreateIsolate(); #else net::ProxyResolverV8::RememberDefaultIsolate(); #endif return 0; } BrowserContext* BrowserMainParts::CreateBrowserContext() { return new BrowserContext; } } // namespace brightray
// Copyright (c) 2012 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-CHROMIUM file. #include "browser/browser_main_parts.h" #include "browser/browser_context.h" #include "browser/web_ui_controller_factory.h" #include "net/proxy/proxy_resolver_v8.h" + #include "ui/gfx/screen.h" + #include "ui/views/widget/desktop_aura/desktop_screen.h" namespace brightray { BrowserMainParts::BrowserMainParts() { } BrowserMainParts::~BrowserMainParts() { } void BrowserMainParts::PreMainMessageLoopRun() { browser_context_.reset(CreateBrowserContext()); browser_context_->Initialize(); web_ui_controller_factory_.reset( new WebUIControllerFactory(browser_context_.get())); content::WebUIControllerFactory::RegisterFactory( web_ui_controller_factory_.get()); + + #if defined(OS_WIN) + gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen()); + #endif } void BrowserMainParts::PostMainMessageLoopRun() { browser_context_.reset(); } int BrowserMainParts::PreCreateThreads() { #if defined(OS_WIN) net::ProxyResolverV8::CreateIsolate(); #else net::ProxyResolverV8::RememberDefaultIsolate(); #endif return 0; } BrowserContext* BrowserMainParts::CreateBrowserContext() { return new BrowserContext; } } // namespace brightray
6
0.130435
6
0
41b99795f727772d11dd48cb3bbc8c2f6b885ad5
src/main/java/info/u_team/u_team_core/util/registry/EntityTypeDeferredRegister.java
src/main/java/info/u_team/u_team_core/util/registry/EntityTypeDeferredRegister.java
package info.u_team.u_team_core.util.registry; import java.util.function.Supplier; import net.minecraft.entity.*; import net.minecraft.entity.EntityType.Builder; import net.minecraftforge.fml.RegistryObject; import net.minecraftforge.registries.ForgeRegistries; public class EntityTypeDeferredRegister { public static EntityTypeDeferredRegister create(String modid) { return new EntityTypeDeferredRegister(modid); } private final CommonDeferredRegister<EntityType<?>> register; protected EntityTypeDeferredRegister(String modid) { register = CommonDeferredRegister.create(ForgeRegistries.ENTITIES, modid); } public <E extends Entity, B extends Builder<E>> RegistryObject<EntityType<E>> register(String name, Supplier<? extends B> supplier) { return register.register(name, () -> supplier.get().build(register.getModid() + ":" + name)); } }
package info.u_team.u_team_core.util.registry; import java.util.function.Supplier; import net.minecraft.entity.*; import net.minecraft.entity.EntityType.Builder; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.fml.RegistryObject; import net.minecraftforge.registries.ForgeRegistries; public class EntityTypeDeferredRegister { public static EntityTypeDeferredRegister create(String modid) { return new EntityTypeDeferredRegister(modid); } private final CommonDeferredRegister<EntityType<?>> register; protected EntityTypeDeferredRegister(String modid) { register = CommonDeferredRegister.create(ForgeRegistries.ENTITIES, modid); } public <E extends Entity, B extends Builder<E>> RegistryObject<EntityType<E>> register(String name, Supplier<? extends B> supplier) { return register.register(name, () -> supplier.get().build(register.getModid() + ":" + name)); } public void register(IEventBus bus) { register.register(bus); } public CommonDeferredRegister<EntityType<?>> getRegister() { return register; } }
Add a register method and a getRegister Method
Add a register method and a getRegister Method
Java
apache-2.0
MC-U-Team/U-Team-Core,MC-U-Team/U-Team-Core
java
## Code Before: package info.u_team.u_team_core.util.registry; import java.util.function.Supplier; import net.minecraft.entity.*; import net.minecraft.entity.EntityType.Builder; import net.minecraftforge.fml.RegistryObject; import net.minecraftforge.registries.ForgeRegistries; public class EntityTypeDeferredRegister { public static EntityTypeDeferredRegister create(String modid) { return new EntityTypeDeferredRegister(modid); } private final CommonDeferredRegister<EntityType<?>> register; protected EntityTypeDeferredRegister(String modid) { register = CommonDeferredRegister.create(ForgeRegistries.ENTITIES, modid); } public <E extends Entity, B extends Builder<E>> RegistryObject<EntityType<E>> register(String name, Supplier<? extends B> supplier) { return register.register(name, () -> supplier.get().build(register.getModid() + ":" + name)); } } ## Instruction: Add a register method and a getRegister Method ## Code After: package info.u_team.u_team_core.util.registry; import java.util.function.Supplier; import net.minecraft.entity.*; import net.minecraft.entity.EntityType.Builder; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.fml.RegistryObject; import net.minecraftforge.registries.ForgeRegistries; public class EntityTypeDeferredRegister { public static EntityTypeDeferredRegister create(String modid) { return new EntityTypeDeferredRegister(modid); } private final CommonDeferredRegister<EntityType<?>> register; protected EntityTypeDeferredRegister(String modid) { register = CommonDeferredRegister.create(ForgeRegistries.ENTITIES, modid); } public <E extends Entity, B extends Builder<E>> RegistryObject<EntityType<E>> register(String name, Supplier<? extends B> supplier) { return register.register(name, () -> supplier.get().build(register.getModid() + ":" + name)); } public void register(IEventBus bus) { register.register(bus); } public CommonDeferredRegister<EntityType<?>> getRegister() { return register; } }
package info.u_team.u_team_core.util.registry; import java.util.function.Supplier; import net.minecraft.entity.*; import net.minecraft.entity.EntityType.Builder; + import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.fml.RegistryObject; import net.minecraftforge.registries.ForgeRegistries; public class EntityTypeDeferredRegister { public static EntityTypeDeferredRegister create(String modid) { return new EntityTypeDeferredRegister(modid); } private final CommonDeferredRegister<EntityType<?>> register; protected EntityTypeDeferredRegister(String modid) { register = CommonDeferredRegister.create(ForgeRegistries.ENTITIES, modid); } public <E extends Entity, B extends Builder<E>> RegistryObject<EntityType<E>> register(String name, Supplier<? extends B> supplier) { return register.register(name, () -> supplier.get().build(register.getModid() + ":" + name)); } + public void register(IEventBus bus) { + register.register(bus); + } + + public CommonDeferredRegister<EntityType<?>> getRegister() { + return register; + } + }
9
0.346154
9
0
2c159fa94d59a3790ce658a388609bedfb791f34
src/test/runTests.ts
src/test/runTests.ts
import * as path from 'path'; import { runTests } from 'vscode-test'; (async function main() { // The folder containing the Extension Manifest package.json // Passed to `--extensionDevelopmentPath` const extensionDevelopmentPath = process.cwd(); // The path to test runner // Passed to --extensionTestsPath const extensionTestsPath = path.join(__dirname, './suite'); // The path to the workspace file const workspace = path.resolve('test-fixtures', 'test.code-workspace'); // Download VS Code, unzip it and run the integration test await runTests({ extensionDevelopmentPath, extensionTestsPath, launchArgs: [workspace] }); })().catch(err => console.log(err));
import * as path from 'path'; import { runTests } from 'vscode-test'; (async function main() { // The folder containing the Extension Manifest package.json // Passed to `--extensionDevelopmentPath` const extensionDevelopmentPath = process.cwd(); // The path to test runner // Passed to --extensionTestsPath const extensionTestsPath = path.join(__dirname, './suite'); // The path to the workspace file const workspace = path.resolve('test-fixtures', 'test.code-workspace'); // Download VS Code, unzip it and run the integration test await runTests({ extensionDevelopmentPath, extensionTestsPath, launchArgs: [workspace, "--disable-extensions"] }); })().catch(err => console.log(err));
Disable other extensions when running tests
Disable other extensions when running tests
TypeScript
mit
esbenp/prettier-vscode
typescript
## Code Before: import * as path from 'path'; import { runTests } from 'vscode-test'; (async function main() { // The folder containing the Extension Manifest package.json // Passed to `--extensionDevelopmentPath` const extensionDevelopmentPath = process.cwd(); // The path to test runner // Passed to --extensionTestsPath const extensionTestsPath = path.join(__dirname, './suite'); // The path to the workspace file const workspace = path.resolve('test-fixtures', 'test.code-workspace'); // Download VS Code, unzip it and run the integration test await runTests({ extensionDevelopmentPath, extensionTestsPath, launchArgs: [workspace] }); })().catch(err => console.log(err)); ## Instruction: Disable other extensions when running tests ## Code After: import * as path from 'path'; import { runTests } from 'vscode-test'; (async function main() { // The folder containing the Extension Manifest package.json // Passed to `--extensionDevelopmentPath` const extensionDevelopmentPath = process.cwd(); // The path to test runner // Passed to --extensionTestsPath const extensionTestsPath = path.join(__dirname, './suite'); // The path to the workspace file const workspace = path.resolve('test-fixtures', 'test.code-workspace'); // Download VS Code, unzip it and run the integration test await runTests({ extensionDevelopmentPath, extensionTestsPath, launchArgs: [workspace, "--disable-extensions"] }); })().catch(err => console.log(err));
import * as path from 'path'; import { runTests } from 'vscode-test'; (async function main() { // The folder containing the Extension Manifest package.json // Passed to `--extensionDevelopmentPath` const extensionDevelopmentPath = process.cwd(); // The path to test runner // Passed to --extensionTestsPath const extensionTestsPath = path.join(__dirname, './suite'); // The path to the workspace file const workspace = path.resolve('test-fixtures', 'test.code-workspace'); // Download VS Code, unzip it and run the integration test await runTests({ extensionDevelopmentPath, extensionTestsPath, - launchArgs: [workspace] + launchArgs: [workspace, "--disable-extensions"] }); })().catch(err => console.log(err));
2
0.090909
1
1
b6eca5a50677143a650a8d538a9bffd7c22e3cb4
app/static/components/application/application.ts
app/static/components/application/application.ts
import {Component} from "@angular/core"; @Component({ selector: 'application-component', templateUrl: '/static/components/application/application.html', styles: [ `#navbar_botom {margin-bottom: 0; border-radius: 0;}`, `#buffer {height: 70px}` ] }) export class ApplicationComponent { }
import {Component} from "@angular/core"; @Component({ selector: 'application-component', templateUrl: '/static/components/application/application.html', styles: [ `#navbar_botom {margin-bottom: 0; border-radius: 0; position: fixed; bottom: 0; left: 0; right: 0;}`, `#buffer {height: 70px}` ] }) export class ApplicationComponent { }
Make navbar footer really stick to bottom
Make navbar footer really stick to bottom
TypeScript
mit
pbraunstein/trackercise,pbraunstein/trackercise,pbraunstein/trackercise,pbraunstein/trackercise,pbraunstein/trackercise
typescript
## Code Before: import {Component} from "@angular/core"; @Component({ selector: 'application-component', templateUrl: '/static/components/application/application.html', styles: [ `#navbar_botom {margin-bottom: 0; border-radius: 0;}`, `#buffer {height: 70px}` ] }) export class ApplicationComponent { } ## Instruction: Make navbar footer really stick to bottom ## Code After: import {Component} from "@angular/core"; @Component({ selector: 'application-component', templateUrl: '/static/components/application/application.html', styles: [ `#navbar_botom {margin-bottom: 0; border-radius: 0; position: fixed; bottom: 0; left: 0; right: 0;}`, `#buffer {height: 70px}` ] }) export class ApplicationComponent { }
import {Component} from "@angular/core"; @Component({ selector: 'application-component', templateUrl: '/static/components/application/application.html', styles: [ - `#navbar_botom {margin-bottom: 0; border-radius: 0;}`, + `#navbar_botom {margin-bottom: 0; border-radius: 0; position: fixed; bottom: 0; left: 0; right: 0;}`, `#buffer {height: 70px}` ] }) export class ApplicationComponent { }
2
0.181818
1
1
1e2195cff3bd653d15480e04c0365dadf1d3a1ef
src/schemas/authUser.js
src/schemas/authUser.js
/* eslint-disable no-param-reassign */ /* eslint-disable fp/no-mutation */ import { schema } from 'normalizr'; import moment from 'moment'; import { decodeUnicode } from './../utils/base64'; const options = { assignEntity(output, key, value, input) { const { access_token } = input; const data = JSON.parse(decodeUnicode(access_token.split('.')[1])); output.exp = moment.unix(data.exp).format(); }, idAttribute({ access_token }) { const data = JSON.parse(decodeUnicode(access_token.split('.')[1])); return data.identity; }, }; const user = new schema.Entity('authUser', {}, options); export default user;
/* eslint-disable no-param-reassign */ /* eslint-disable fp/no-mutation */ import { schema } from 'normalizr'; import moment from 'moment'; import { decodeUnicode } from './../utils/base64'; const options = { processStrategy(input) { const { access_token } = input; const data = JSON.parse(decodeUnicode(access_token.split('.')[1])); const exp = moment.unix(data.exp).format(); return { access_token, exp }; }, idAttribute({ access_token }) { const data = JSON.parse(decodeUnicode(access_token.split('.')[1])); return data.identity; }, }; const user = new schema.Entity('authUser', {}, options); export default user;
Fix log in (normalizr update issue)
Fix log in (normalizr update issue)
JavaScript
agpl-3.0
heutagogy/heutagogy-frontend,heutagogy/heutagogy-frontend,heutagogy/heutagogy-frontend
javascript
## Code Before: /* eslint-disable no-param-reassign */ /* eslint-disable fp/no-mutation */ import { schema } from 'normalizr'; import moment from 'moment'; import { decodeUnicode } from './../utils/base64'; const options = { assignEntity(output, key, value, input) { const { access_token } = input; const data = JSON.parse(decodeUnicode(access_token.split('.')[1])); output.exp = moment.unix(data.exp).format(); }, idAttribute({ access_token }) { const data = JSON.parse(decodeUnicode(access_token.split('.')[1])); return data.identity; }, }; const user = new schema.Entity('authUser', {}, options); export default user; ## Instruction: Fix log in (normalizr update issue) ## Code After: /* eslint-disable no-param-reassign */ /* eslint-disable fp/no-mutation */ import { schema } from 'normalizr'; import moment from 'moment'; import { decodeUnicode } from './../utils/base64'; const options = { processStrategy(input) { const { access_token } = input; const data = JSON.parse(decodeUnicode(access_token.split('.')[1])); const exp = moment.unix(data.exp).format(); return { access_token, exp }; }, idAttribute({ access_token }) { const data = JSON.parse(decodeUnicode(access_token.split('.')[1])); return data.identity; }, }; const user = new schema.Entity('authUser', {}, options); export default user;
/* eslint-disable no-param-reassign */ /* eslint-disable fp/no-mutation */ import { schema } from 'normalizr'; import moment from 'moment'; import { decodeUnicode } from './../utils/base64'; const options = { - assignEntity(output, key, value, input) { + processStrategy(input) { const { access_token } = input; const data = JSON.parse(decodeUnicode(access_token.split('.')[1])); + const exp = moment.unix(data.exp).format(); - output.exp = moment.unix(data.exp).format(); + return { access_token, exp }; }, idAttribute({ access_token }) { const data = JSON.parse(decodeUnicode(access_token.split('.')[1])); return data.identity; }, }; const user = new schema.Entity('authUser', {}, options); export default user;
5
0.208333
3
2
de592de13ad872c5b64abd73e4c43cea50195f16
app/views/shopping_shared/_header.html.haml
app/views/shopping_shared/_header.html.haml
- distributor = @order.andand.distributor || current_distributor %navigation %distributor.details.row .small-12.medium-12.large-8.columns #distributor_title - if distributor.logo? %img.left{src: distributor.logo.url(:thumb)} %h3 = distributor.name %location= distributor.address.city = yield :ordercycle_sidebar
- distributor = @order.andand.distributor || current_distributor %navigation %distributor.details.row .small-12.medium-12.large-8.columns #distributor_title - if distributor.logo? %img.left{src: distributor.logo.url(:thumb)} = render DistributorTitleComponent.new(name: distributor.name) %location= distributor.address.city = yield :ordercycle_sidebar
Use the first view component DistributorTitleComponent for a shopfront
Use the first view component DistributorTitleComponent for a shopfront
Haml
agpl-3.0
mkllnk/openfoodnetwork,Matt-Yorkley/openfoodnetwork,lin-d-hop/openfoodnetwork,Matt-Yorkley/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,Matt-Yorkley/openfoodnetwork,lin-d-hop/openfoodnetwork,mkllnk/openfoodnetwork,Matt-Yorkley/openfoodnetwork,openfoodfoundation/openfoodnetwork,mkllnk/openfoodnetwork,openfoodfoundation/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,mkllnk/openfoodnetwork
haml
## Code Before: - distributor = @order.andand.distributor || current_distributor %navigation %distributor.details.row .small-12.medium-12.large-8.columns #distributor_title - if distributor.logo? %img.left{src: distributor.logo.url(:thumb)} %h3 = distributor.name %location= distributor.address.city = yield :ordercycle_sidebar ## Instruction: Use the first view component DistributorTitleComponent for a shopfront ## Code After: - distributor = @order.andand.distributor || current_distributor %navigation %distributor.details.row .small-12.medium-12.large-8.columns #distributor_title - if distributor.logo? %img.left{src: distributor.logo.url(:thumb)} = render DistributorTitleComponent.new(name: distributor.name) %location= distributor.address.city = yield :ordercycle_sidebar
- distributor = @order.andand.distributor || current_distributor %navigation %distributor.details.row .small-12.medium-12.large-8.columns #distributor_title - if distributor.logo? %img.left{src: distributor.logo.url(:thumb)} + = render DistributorTitleComponent.new(name: distributor.name) - %h3 - = distributor.name %location= distributor.address.city = yield :ordercycle_sidebar
3
0.230769
1
2
cb38c339b20b38847a9dcdc17541198a54e2ce13
roles/ranger/tasks/main.yml
roles/ranger/tasks/main.yml
--- - name: Install ranger become: true package: name: ranger state: installed - name: Symlink rifle config file: src: "{{ role_path }}/files/rifle.conf" dest: "~/.config/ranger/rifle.conf" state: link
--- - name: Install ranger become: true package: name: ranger state: installed - name: Create ranger config directory file: path: "~/.config/ranger" state: directory - name: Symlink rifle config file: src: "{{ role_path }}/files/rifle.conf" dest: "~/.config/ranger/rifle.conf" state: link
Fix ranger role config directory
Fix ranger role config directory Adds a task that creates the config directory for ranger. This is required for the config task.
YAML
mit
JohnAZoidberg/dotfiles,JohnAZoidberg/dotfiles
yaml
## Code Before: --- - name: Install ranger become: true package: name: ranger state: installed - name: Symlink rifle config file: src: "{{ role_path }}/files/rifle.conf" dest: "~/.config/ranger/rifle.conf" state: link ## Instruction: Fix ranger role config directory Adds a task that creates the config directory for ranger. This is required for the config task. ## Code After: --- - name: Install ranger become: true package: name: ranger state: installed - name: Create ranger config directory file: path: "~/.config/ranger" state: directory - name: Symlink rifle config file: src: "{{ role_path }}/files/rifle.conf" dest: "~/.config/ranger/rifle.conf" state: link
--- - name: Install ranger become: true package: name: ranger state: installed + - name: Create ranger config directory + file: + path: "~/.config/ranger" + state: directory + - name: Symlink rifle config file: src: "{{ role_path }}/files/rifle.conf" dest: "~/.config/ranger/rifle.conf" state: link
5
0.416667
5
0
a6874f70379ed5ec6c63d3e449b635dfae0cd7e7
et-de.php
et-de.php
<?php $empty_check = implode('', $_POST); if (empty($empty_check)) { echo header('Location: et-lo.php'); } else { // $_POST['row'] is in the format: delrowX // where X is the row we want to delete. $drow = (int)substr($_POST['row'], 6); $db_lines = file('et_db.txt'); unset($db_lines[$drow]); $fdb = fopen('et_db.txt', 'w'); fwrite($fdb, join('',$db_lines)); } ?>
<?php include 'config.php'; include 'db.php'; $empty_check = implode('', $_POST); if (empty($empty_check)) { echo header('Location: et-lo.php'); } else { // $_POST['row'] is in the format: delrowX // where X is the row we want to delete. $row = (int)substr($_POST['row'], 6); $fdb = new FlatFileDB($db_filename, $table_sep, $cell_sep); $fdb->deleteRow($loans_table, $row); } ?>
Delete row with new DB format works
Delete row with new DB format works
PHP
bsd-3-clause
ryanakca/ET,ryanakca/ET
php
## Code Before: <?php $empty_check = implode('', $_POST); if (empty($empty_check)) { echo header('Location: et-lo.php'); } else { // $_POST['row'] is in the format: delrowX // where X is the row we want to delete. $drow = (int)substr($_POST['row'], 6); $db_lines = file('et_db.txt'); unset($db_lines[$drow]); $fdb = fopen('et_db.txt', 'w'); fwrite($fdb, join('',$db_lines)); } ?> ## Instruction: Delete row with new DB format works ## Code After: <?php include 'config.php'; include 'db.php'; $empty_check = implode('', $_POST); if (empty($empty_check)) { echo header('Location: et-lo.php'); } else { // $_POST['row'] is in the format: delrowX // where X is the row we want to delete. $row = (int)substr($_POST['row'], 6); $fdb = new FlatFileDB($db_filename, $table_sep, $cell_sep); $fdb->deleteRow($loans_table, $row); } ?>
<?php + + include 'config.php'; + include 'db.php'; $empty_check = implode('', $_POST); if (empty($empty_check)) { echo header('Location: et-lo.php'); } else { // $_POST['row'] is in the format: delrowX // where X is the row we want to delete. - $drow = (int)substr($_POST['row'], 6); ? - + $row = (int)substr($_POST['row'], 6); - $db_lines = file('et_db.txt'); + $fdb = new FlatFileDB($db_filename, $table_sep, $cell_sep); + $fdb->deleteRow($loans_table, $row); - unset($db_lines[$drow]); - $fdb = fopen('et_db.txt', 'w'); - fwrite($fdb, join('',$db_lines)); } ?>
11
0.611111
6
5
a60af3c242e5be9136d38e7a937ea810da4ba608
config/amazon_s3.yml
config/amazon_s3.yml
development: bucket_name: stumpwise-development access_key_id: AKIAJGRQI2SK2FQTNSGQ secret_access_key: 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 #distribution_domain: XXXX.cloudfront.net test: bucket_name: stumpwise-test access_key_id: AKIAJGRQI2SK2FQTNSGQ secret_access_key: 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 #distribution_domain: XXXX.cloudfront.net production: bucket_name: assets.stumpwise.com access_key_id: AKIAJGRQI2SK2FQTNSGQ secret_access_key: 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 #distribution_domain: XXXX.cloudfront.net
development: bucket_name: stumpwise-development access_key_id: AKIAJGRQI2SK2FQTNSGQ secret_access_key: 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 #distribution_domain: XXXX.cloudfront.net test: bucket_name: stumpwise-test access_key_id: AKIAJGRQI2SK2FQTNSGQ secret_access_key: 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 #distribution_domain: XXXX.cloudfront.net staging: bucket_name: assets.stumpwise-staging.info access_key_id: AKIAJGRQI2SK2FQTNSGQ secret_access_key: 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 #distribution_domain: XXXX.cloudfront.net production: bucket_name: assets.stumpwise.com access_key_id: AKIAJGRQI2SK2FQTNSGQ secret_access_key: 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 #distribution_domain: XXXX.cloudfront.net
Add the staging environment S3 config
Add the staging environment S3 config
YAML
mit
marclove/stumpwise,marclove/stumpwise
yaml
## Code Before: development: bucket_name: stumpwise-development access_key_id: AKIAJGRQI2SK2FQTNSGQ secret_access_key: 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 #distribution_domain: XXXX.cloudfront.net test: bucket_name: stumpwise-test access_key_id: AKIAJGRQI2SK2FQTNSGQ secret_access_key: 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 #distribution_domain: XXXX.cloudfront.net production: bucket_name: assets.stumpwise.com access_key_id: AKIAJGRQI2SK2FQTNSGQ secret_access_key: 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 #distribution_domain: XXXX.cloudfront.net ## Instruction: Add the staging environment S3 config ## Code After: development: bucket_name: stumpwise-development access_key_id: AKIAJGRQI2SK2FQTNSGQ secret_access_key: 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 #distribution_domain: XXXX.cloudfront.net test: bucket_name: stumpwise-test access_key_id: AKIAJGRQI2SK2FQTNSGQ secret_access_key: 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 #distribution_domain: XXXX.cloudfront.net staging: bucket_name: assets.stumpwise-staging.info access_key_id: AKIAJGRQI2SK2FQTNSGQ secret_access_key: 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 #distribution_domain: XXXX.cloudfront.net production: bucket_name: assets.stumpwise.com access_key_id: AKIAJGRQI2SK2FQTNSGQ secret_access_key: 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 #distribution_domain: XXXX.cloudfront.net
development: bucket_name: stumpwise-development access_key_id: AKIAJGRQI2SK2FQTNSGQ secret_access_key: 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 #distribution_domain: XXXX.cloudfront.net test: bucket_name: stumpwise-test access_key_id: AKIAJGRQI2SK2FQTNSGQ secret_access_key: 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 #distribution_domain: XXXX.cloudfront.net + staging: + bucket_name: assets.stumpwise-staging.info + access_key_id: AKIAJGRQI2SK2FQTNSGQ + secret_access_key: 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 + #distribution_domain: XXXX.cloudfront.net + production: bucket_name: assets.stumpwise.com access_key_id: AKIAJGRQI2SK2FQTNSGQ secret_access_key: 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 #distribution_domain: XXXX.cloudfront.net
6
0.352941
6
0
f1c275d5ddf02655b43664fb4e8af4e40e510197
Cargo.toml
Cargo.toml
[package] name = "grapple" version = "0.3.1" authors = ["Dave Allie <dave@daveallie.com>"] [profile.release] panic = "abort" lto = true codegen-units = 1 incremental = false [dependencies] reqwest = "~0.8.0" url = "~1.7" base64 = "~0.9.2" md5 = "~0.3.8" lazy_static = "~1.1" pbr = "~1.0.1" [dependencies.clap] version = "~2.32" features = ["yaml"] [dependencies.uuid] version = "~0.6.5" features = ["v4"] [features] default = []
[package] name = "grapple" version = "0.3.1" authors = ["Dave Allie <dave@daveallie.com>"] description = "Interruptible, download accelerator, with Basic and Digest Authentication support." documentation = "https://github.com/daveallie/grapple" homepage = "https://github.com/daveallie/grapple" repository = "https://github.com/daveallie/grapple" readme = "README.md" license = "MIT" keywords = ["download", "accelerator"] exclude = [ ".idea/*", "docs/*", ] [badges] travis-ci = { repository = "daveallie/grapple" } [profile.release] panic = "abort" lto = true codegen-units = 1 incremental = false [dependencies] reqwest = "~0.8.0" url = "~1.7" base64 = "~0.9.2" md5 = "~0.3.8" lazy_static = "~1.1" pbr = "~1.0.1" [dependencies.clap] version = "~2.32" features = ["yaml"] [dependencies.uuid] version = "~0.6.5" features = ["v4"] [features] default = []
Add manifest information for crates.io
Add manifest information for crates.io
TOML
mit
daveallie/grapple,daveallie/grapple,daveallie/grapple,daveallie/grapple
toml
## Code Before: [package] name = "grapple" version = "0.3.1" authors = ["Dave Allie <dave@daveallie.com>"] [profile.release] panic = "abort" lto = true codegen-units = 1 incremental = false [dependencies] reqwest = "~0.8.0" url = "~1.7" base64 = "~0.9.2" md5 = "~0.3.8" lazy_static = "~1.1" pbr = "~1.0.1" [dependencies.clap] version = "~2.32" features = ["yaml"] [dependencies.uuid] version = "~0.6.5" features = ["v4"] [features] default = [] ## Instruction: Add manifest information for crates.io ## Code After: [package] name = "grapple" version = "0.3.1" authors = ["Dave Allie <dave@daveallie.com>"] description = "Interruptible, download accelerator, with Basic and Digest Authentication support." documentation = "https://github.com/daveallie/grapple" homepage = "https://github.com/daveallie/grapple" repository = "https://github.com/daveallie/grapple" readme = "README.md" license = "MIT" keywords = ["download", "accelerator"] exclude = [ ".idea/*", "docs/*", ] [badges] travis-ci = { repository = "daveallie/grapple" } [profile.release] panic = "abort" lto = true codegen-units = 1 incremental = false [dependencies] reqwest = "~0.8.0" url = "~1.7" base64 = "~0.9.2" md5 = "~0.3.8" lazy_static = "~1.1" pbr = "~1.0.1" [dependencies.clap] version = "~2.32" features = ["yaml"] [dependencies.uuid] version = "~0.6.5" features = ["v4"] [features] default = []
[package] name = "grapple" version = "0.3.1" authors = ["Dave Allie <dave@daveallie.com>"] + description = "Interruptible, download accelerator, with Basic and Digest Authentication support." + documentation = "https://github.com/daveallie/grapple" + homepage = "https://github.com/daveallie/grapple" + repository = "https://github.com/daveallie/grapple" + readme = "README.md" + license = "MIT" + keywords = ["download", "accelerator"] + exclude = [ + ".idea/*", + "docs/*", + ] + + [badges] + travis-ci = { repository = "daveallie/grapple" } [profile.release] panic = "abort" lto = true codegen-units = 1 incremental = false [dependencies] reqwest = "~0.8.0" url = "~1.7" base64 = "~0.9.2" md5 = "~0.3.8" lazy_static = "~1.1" pbr = "~1.0.1" [dependencies.clap] version = "~2.32" features = ["yaml"] [dependencies.uuid] version = "~0.6.5" features = ["v4"] [features] default = []
14
0.482759
14
0
c39d828243e5e00b997c703e6ed41912ea7da6c5
packages/@sanity/base/src/preview/PreviewMaterializer.js
packages/@sanity/base/src/preview/PreviewMaterializer.js
import React, {PropTypes} from 'react' import observeForPreview from './observeForPreview' import shallowEquals from 'shallow-equals' export default class PreviewMaterializer extends React.PureComponent { static propTypes = { value: PropTypes.any.isRequired, type: PropTypes.shape({ preview: PropTypes.shape({ select: PropTypes.object.isRequired, prepare: PropTypes.func }).isRequired }), children: PropTypes.func }; state = { loading: false, error: null, result: null } componentWillMount() { const {type, value} = this.props this.materialize(value, type) } componentWillUnmount() { this.unsubscribe() } unsubscribe() { if (this.subscription) { this.subscription.unsubscribe() } } componentWillReceiveProps(nextProps) { if (!shallowEquals(nextProps.value, this.props.value)) { this.materialize(nextProps.value, nextProps.type) } } materialize(value, type) { this.unsubscribe() this.subscription = observeForPreview(value, type) .subscribe(res => { this.setState({result: res}) }) } render() { const {result, loading, error} = this.state if (loading) { return <div>Loading…</div> } if (error) { return <div>Error: {error.message}</div> } if (!result) { return <div /> } return this.props.children(result) } }
import React, {PropTypes} from 'react' import observeForPreview from './observeForPreview' import shallowEquals from 'shallow-equals' export default class PreviewMaterializer extends React.PureComponent { static propTypes = { value: PropTypes.any.isRequired, type: PropTypes.shape({ preview: PropTypes.shape({ select: PropTypes.object.isRequired, prepare: PropTypes.func }).isRequired }), children: PropTypes.func }; state = { loading: false, error: null, result: null } componentWillMount() { const {type, value} = this.props this.materialize(value, type) } componentWillUnmount() { this.unsubscribe() } unsubscribe() { if (this.subscription) { this.subscription.unsubscribe() this.subscription = null } } componentWillReceiveProps(nextProps) { if (!shallowEquals(nextProps.value, this.props.value)) { this.materialize(nextProps.value, nextProps.type) } } materialize(value, type) { this.unsubscribe() this.subscription = observeForPreview(value, type) .subscribe(res => { this.setState({result: res}) }) } render() { const {result, loading, error} = this.state if (loading) { return <div>Loading…</div> } if (error) { return <div>Error: {error.message}</div> } if (!result) { return <div /> } return this.props.children(result) } }
Set subscription to null after unsubscribe
[preview] Set subscription to null after unsubscribe
JavaScript
mit
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
javascript
## Code Before: import React, {PropTypes} from 'react' import observeForPreview from './observeForPreview' import shallowEquals from 'shallow-equals' export default class PreviewMaterializer extends React.PureComponent { static propTypes = { value: PropTypes.any.isRequired, type: PropTypes.shape({ preview: PropTypes.shape({ select: PropTypes.object.isRequired, prepare: PropTypes.func }).isRequired }), children: PropTypes.func }; state = { loading: false, error: null, result: null } componentWillMount() { const {type, value} = this.props this.materialize(value, type) } componentWillUnmount() { this.unsubscribe() } unsubscribe() { if (this.subscription) { this.subscription.unsubscribe() } } componentWillReceiveProps(nextProps) { if (!shallowEquals(nextProps.value, this.props.value)) { this.materialize(nextProps.value, nextProps.type) } } materialize(value, type) { this.unsubscribe() this.subscription = observeForPreview(value, type) .subscribe(res => { this.setState({result: res}) }) } render() { const {result, loading, error} = this.state if (loading) { return <div>Loading…</div> } if (error) { return <div>Error: {error.message}</div> } if (!result) { return <div /> } return this.props.children(result) } } ## Instruction: [preview] Set subscription to null after unsubscribe ## Code After: import React, {PropTypes} from 'react' import observeForPreview from './observeForPreview' import shallowEquals from 'shallow-equals' export default class PreviewMaterializer extends React.PureComponent { static propTypes = { value: PropTypes.any.isRequired, type: PropTypes.shape({ preview: PropTypes.shape({ select: PropTypes.object.isRequired, prepare: PropTypes.func }).isRequired }), children: PropTypes.func }; state = { loading: false, error: null, result: null } componentWillMount() { const {type, value} = this.props this.materialize(value, type) } componentWillUnmount() { this.unsubscribe() } unsubscribe() { if (this.subscription) { this.subscription.unsubscribe() this.subscription = null } } componentWillReceiveProps(nextProps) { if (!shallowEquals(nextProps.value, this.props.value)) { this.materialize(nextProps.value, nextProps.type) } } materialize(value, type) { this.unsubscribe() this.subscription = observeForPreview(value, type) .subscribe(res => { this.setState({result: res}) }) } render() { const {result, loading, error} = this.state if (loading) { return <div>Loading…</div> } if (error) { return <div>Error: {error.message}</div> } if (!result) { return <div /> } return this.props.children(result) } }
import React, {PropTypes} from 'react' import observeForPreview from './observeForPreview' import shallowEquals from 'shallow-equals' export default class PreviewMaterializer extends React.PureComponent { static propTypes = { value: PropTypes.any.isRequired, type: PropTypes.shape({ preview: PropTypes.shape({ select: PropTypes.object.isRequired, prepare: PropTypes.func }).isRequired }), children: PropTypes.func }; state = { loading: false, error: null, result: null } componentWillMount() { const {type, value} = this.props this.materialize(value, type) } componentWillUnmount() { this.unsubscribe() } unsubscribe() { if (this.subscription) { this.subscription.unsubscribe() + this.subscription = null } } componentWillReceiveProps(nextProps) { if (!shallowEquals(nextProps.value, this.props.value)) { this.materialize(nextProps.value, nextProps.type) } } materialize(value, type) { this.unsubscribe() this.subscription = observeForPreview(value, type) .subscribe(res => { this.setState({result: res}) }) } render() { const {result, loading, error} = this.state if (loading) { return <div>Loading…</div> } if (error) { return <div>Error: {error.message}</div> } if (!result) { return <div /> } return this.props.children(result) } }
1
0.015385
1
0
6db8dcc25b8e3728e5d6ab6edd1c8d3b4a7a2949
conf_site/templates/symposion/proposals/_proposal_row.html
conf_site/templates/symposion/proposals/_proposal_row.html
<tr> <td> <a href="{% url "proposal_detail" proposal.pk %}">{{ proposal.title }}</a> </td> <td>{{ proposal.kind.name }}</td> <td> {% if proposal.cancelled %} <span class="label label-danger">Cancelled</span> {% else %} {% if request.user == proposal.speaker.user %} {% if proposal.result.status == "accepted" %} <span class="label label-success">Accepted</span> {% else %} <span class="label label-default">Submitted</span> {% endif %} {% else %} <span class="label label-default">Associated</span> {% endif %} {% endif %} </td> <td> {% if not proposal.cancelled %} {% if request.user == proposal.speaker.user and proposal.can_edit %} <a href="{% url "proposal_edit" proposal.pk %}" class="btn btn-xs"><i class="fa fa-pencil"></i> Edit</a> <a href="{% url "proposal_speaker_manage" proposal.id %}" class="btn btn-xs"><i class="fa fa-user"></i> Manage Additional Speakers</a> {% endif %} {% endif %} </td> </tr>
<tr id="proposal-{{ proposal.pk }}"> <td class="proposal-title"> <a href="{% url "proposal_detail" proposal.pk %}">{{ proposal.title }}</a> </td> <td class="proposal-kind">{{ proposal.kind.name }}</td> <td class="proposal-result-status"> {% if proposal.cancelled %} <span class="label label-danger">Cancelled</span> {% else %} {% if request.user == proposal.speaker.user %} {% if proposal.result.status == "accepted" %} <span class="label label-success">Accepted</span> {% else %} <span class="label label-default">Submitted</span> {% endif %} {% else %} <span class="label label-default">Associated</span> {% endif %} {% endif %} </td> <td> {% if not proposal.cancelled %} {% if request.user == proposal.speaker.user and proposal.can_edit %} <a href="{% url "proposal_edit" proposal.pk %}" class="btn btn-xs"><i class="fa fa-pencil"></i> Edit</a> <a href="{% url "proposal_speaker_manage" proposal.id %}" class="btn btn-xs"><i class="fa fa-user"></i> Manage Additional Speakers</a> {% endif %} {% endif %} </td> </tr>
Make proposal rows a bit more semantic.
Make proposal rows a bit more semantic. This makes it slightly easier to find individual proposals and associated metadata (e.g. an individual proposal's status).
HTML
mit
pydata/conf_site,pydata/conf_site,pydata/conf_site
html
## Code Before: <tr> <td> <a href="{% url "proposal_detail" proposal.pk %}">{{ proposal.title }}</a> </td> <td>{{ proposal.kind.name }}</td> <td> {% if proposal.cancelled %} <span class="label label-danger">Cancelled</span> {% else %} {% if request.user == proposal.speaker.user %} {% if proposal.result.status == "accepted" %} <span class="label label-success">Accepted</span> {% else %} <span class="label label-default">Submitted</span> {% endif %} {% else %} <span class="label label-default">Associated</span> {% endif %} {% endif %} </td> <td> {% if not proposal.cancelled %} {% if request.user == proposal.speaker.user and proposal.can_edit %} <a href="{% url "proposal_edit" proposal.pk %}" class="btn btn-xs"><i class="fa fa-pencil"></i> Edit</a> <a href="{% url "proposal_speaker_manage" proposal.id %}" class="btn btn-xs"><i class="fa fa-user"></i> Manage Additional Speakers</a> {% endif %} {% endif %} </td> </tr> ## Instruction: Make proposal rows a bit more semantic. This makes it slightly easier to find individual proposals and associated metadata (e.g. an individual proposal's status). ## Code After: <tr id="proposal-{{ proposal.pk }}"> <td class="proposal-title"> <a href="{% url "proposal_detail" proposal.pk %}">{{ proposal.title }}</a> </td> <td class="proposal-kind">{{ proposal.kind.name }}</td> <td class="proposal-result-status"> {% if proposal.cancelled %} <span class="label label-danger">Cancelled</span> {% else %} {% if request.user == proposal.speaker.user %} {% if proposal.result.status == "accepted" %} <span class="label label-success">Accepted</span> {% else %} <span class="label label-default">Submitted</span> {% endif %} {% else %} <span class="label label-default">Associated</span> {% endif %} {% endif %} </td> <td> {% if not proposal.cancelled %} {% if request.user == proposal.speaker.user and proposal.can_edit %} <a href="{% url "proposal_edit" proposal.pk %}" class="btn btn-xs"><i class="fa fa-pencil"></i> Edit</a> <a href="{% url "proposal_speaker_manage" proposal.id %}" class="btn btn-xs"><i class="fa fa-user"></i> Manage Additional Speakers</a> {% endif %} {% endif %} </td> </tr>
- <tr> - <td> + <tr id="proposal-{{ proposal.pk }}"> + <td class="proposal-title"> <a href="{% url "proposal_detail" proposal.pk %}">{{ proposal.title }}</a> </td> - <td>{{ proposal.kind.name }}</td> + <td class="proposal-kind">{{ proposal.kind.name }}</td> ? ++++++++++++++++++++++ - <td> + <td class="proposal-result-status"> {% if proposal.cancelled %} <span class="label label-danger">Cancelled</span> {% else %} {% if request.user == proposal.speaker.user %} {% if proposal.result.status == "accepted" %} <span class="label label-success">Accepted</span> {% else %} <span class="label label-default">Submitted</span> {% endif %} {% else %} <span class="label label-default">Associated</span> {% endif %} {% endif %} </td> <td> {% if not proposal.cancelled %} {% if request.user == proposal.speaker.user and proposal.can_edit %} <a href="{% url "proposal_edit" proposal.pk %}" class="btn btn-xs"><i class="fa fa-pencil"></i> Edit</a> <a href="{% url "proposal_speaker_manage" proposal.id %}" class="btn btn-xs"><i class="fa fa-user"></i> Manage Additional Speakers</a> {% endif %} {% endif %} </td> </tr>
8
0.25
4
4
5e671fe98093cf506ce1cb134c335cabd934ad84
aioredis/locks.py
aioredis/locks.py
from asyncio.locks import Lock as _Lock from asyncio import coroutine from asyncio import futures from .util import create_future # Fixes an issue with all Python versions that leaves pending waiters # without being awakened when the first waiter is canceled. # Code adapted from the PR https://github.com/python/cpython/pull/1031 # Waiting once it is merged to make a proper condition to relay on # the stdlib implementation or this one patched class Lock(_Lock): @coroutine def acquire(self): """Acquire a lock. This method blocks until the lock is unlocked, then sets it to locked and returns True. """ if not self._locked and all(w.cancelled() for w in self._waiters): self._locked = True return True fut = create_future(self._loop) self._waiters.append(fut) try: yield from fut self._locked = True return True except futures.CancelledError: if not self._locked: # pragma: no cover self._wake_up_first() raise finally: self._waiters.remove(fut) def _wake_up_first(self): """Wake up the first waiter who isn't cancelled.""" for fut in self._waiters: if not fut.done(): fut.set_result(True)
from asyncio.locks import Lock as _Lock from asyncio import coroutine from asyncio import futures from .util import create_future # Fixes an issue with all Python versions that leaves pending waiters # without being awakened when the first waiter is canceled. # Code adapted from the PR https://github.com/python/cpython/pull/1031 # Waiting once it is merged to make a proper condition to relay on # the stdlib implementation or this one patched class Lock(_Lock): @coroutine def acquire(self): """Acquire a lock. This method blocks until the lock is unlocked, then sets it to locked and returns True. """ if not self._locked and all(w.cancelled() for w in self._waiters): self._locked = True return True fut = create_future(self._loop) self._waiters.append(fut) try: yield from fut self._locked = True return True except futures.CancelledError: if not self._locked: # pragma: no cover self._wake_up_first() raise finally: self._waiters.remove(fut) def _wake_up_first(self): """Wake up the first waiter who isn't cancelled.""" for fut in self._waiters: if not fut.done(): fut.set_result(True) break
Fix critical bug with patched Lock
Fix critical bug with patched Lock
Python
mit
aio-libs/aioredis,aio-libs/aioredis,ymap/aioredis
python
## Code Before: from asyncio.locks import Lock as _Lock from asyncio import coroutine from asyncio import futures from .util import create_future # Fixes an issue with all Python versions that leaves pending waiters # without being awakened when the first waiter is canceled. # Code adapted from the PR https://github.com/python/cpython/pull/1031 # Waiting once it is merged to make a proper condition to relay on # the stdlib implementation or this one patched class Lock(_Lock): @coroutine def acquire(self): """Acquire a lock. This method blocks until the lock is unlocked, then sets it to locked and returns True. """ if not self._locked and all(w.cancelled() for w in self._waiters): self._locked = True return True fut = create_future(self._loop) self._waiters.append(fut) try: yield from fut self._locked = True return True except futures.CancelledError: if not self._locked: # pragma: no cover self._wake_up_first() raise finally: self._waiters.remove(fut) def _wake_up_first(self): """Wake up the first waiter who isn't cancelled.""" for fut in self._waiters: if not fut.done(): fut.set_result(True) ## Instruction: Fix critical bug with patched Lock ## Code After: from asyncio.locks import Lock as _Lock from asyncio import coroutine from asyncio import futures from .util import create_future # Fixes an issue with all Python versions that leaves pending waiters # without being awakened when the first waiter is canceled. # Code adapted from the PR https://github.com/python/cpython/pull/1031 # Waiting once it is merged to make a proper condition to relay on # the stdlib implementation or this one patched class Lock(_Lock): @coroutine def acquire(self): """Acquire a lock. This method blocks until the lock is unlocked, then sets it to locked and returns True. """ if not self._locked and all(w.cancelled() for w in self._waiters): self._locked = True return True fut = create_future(self._loop) self._waiters.append(fut) try: yield from fut self._locked = True return True except futures.CancelledError: if not self._locked: # pragma: no cover self._wake_up_first() raise finally: self._waiters.remove(fut) def _wake_up_first(self): """Wake up the first waiter who isn't cancelled.""" for fut in self._waiters: if not fut.done(): fut.set_result(True) break
from asyncio.locks import Lock as _Lock from asyncio import coroutine from asyncio import futures from .util import create_future # Fixes an issue with all Python versions that leaves pending waiters # without being awakened when the first waiter is canceled. # Code adapted from the PR https://github.com/python/cpython/pull/1031 # Waiting once it is merged to make a proper condition to relay on # the stdlib implementation or this one patched class Lock(_Lock): @coroutine def acquire(self): """Acquire a lock. This method blocks until the lock is unlocked, then sets it to locked and returns True. """ if not self._locked and all(w.cancelled() for w in self._waiters): self._locked = True return True fut = create_future(self._loop) self._waiters.append(fut) try: yield from fut self._locked = True return True except futures.CancelledError: if not self._locked: # pragma: no cover self._wake_up_first() raise finally: self._waiters.remove(fut) def _wake_up_first(self): """Wake up the first waiter who isn't cancelled.""" for fut in self._waiters: if not fut.done(): fut.set_result(True) + break
1
0.023256
1
0
7e3e13d388460c80e9c198c5bb4c1cf5abb3aa04
README.md
README.md
Gerrit web-based plugin manager
Gerrit web-based plugin manager To enable this plugin, `plugins.allowRemoteAdmin = true` is required in gerrit.config. Also note that the use of this plugin is restricted to Gerrit administrators.
Document that plugins.allowRemoteAdmin option must be enabled
Document that plugins.allowRemoteAdmin option must be enabled Also mention, that currently only the members of the administrator group allowed to use this plugin. Change-Id: I97e4f8fb9aba5424589441ae58cbb4575fb075a3
Markdown
apache-2.0
GerritCodeReview/plugins_plugin-manager,GerritCodeReview/plugins_plugin-manager,GerritCodeReview/plugins_plugin-manager
markdown
## Code Before: Gerrit web-based plugin manager ## Instruction: Document that plugins.allowRemoteAdmin option must be enabled Also mention, that currently only the members of the administrator group allowed to use this plugin. Change-Id: I97e4f8fb9aba5424589441ae58cbb4575fb075a3 ## Code After: Gerrit web-based plugin manager To enable this plugin, `plugins.allowRemoteAdmin = true` is required in gerrit.config. Also note that the use of this plugin is restricted to Gerrit administrators.
Gerrit web-based plugin manager + + To enable this plugin, `plugins.allowRemoteAdmin = true` is required in + gerrit.config. + + Also note that the use of this plugin is restricted to Gerrit administrators.
5
5
5
0
d9fb5647a4d6c6d138a7990de4bf2957a876d83b
src/styles/engine/_row.scss
src/styles/engine/_row.scss
@import '../vars'; .lu-hover-only, .lu-selection-only { display: none; } &:hover, &.lu-selected, &.lu-hovered { .lu-not-hover { display: none; } .lu-hover-only { display: block; } } /** selected state extends hover state */ &.lu-selected { z-index: 10; outline: 2px solid $lu_selected_color; .lu-selection-only { display: block; } } [data-renderer] { overflow-x: hidden; text-overflow: ellipsis; } .#{$lu_css_prefix}-grid-space { grid-column-gap: $lu_engine_grip_gap; }
@import '../vars'; .lu-hover-only, .lu-selection-only { display: none; } &:hover, &.lu-selected, &.lu-hovered { .lu-not-hover { display: none; } .lu-hover-only { display: block; padding-left: 4px; } } /** selected state extends hover state */ &.lu-selected { z-index: 10; outline: 2px solid $lu_selected_color; .lu-selection-only { display: block; } } [data-renderer] { overflow-x: hidden; text-overflow: ellipsis; } .#{$lu_css_prefix}-grid-space { grid-column-gap: $lu_engine_grip_gap; }
Add padding-left to .lu-hover-only (applies to numerical columns)
Add padding-left to .lu-hover-only (applies to numerical columns) sgratzl/taggle2#104
SCSS
bsd-3-clause
Caleydo/lineup.js,Caleydo/lineup.js,Caleydo/lineup.js,Caleydo/lineupjs,Caleydo/lineupjs
scss
## Code Before: @import '../vars'; .lu-hover-only, .lu-selection-only { display: none; } &:hover, &.lu-selected, &.lu-hovered { .lu-not-hover { display: none; } .lu-hover-only { display: block; } } /** selected state extends hover state */ &.lu-selected { z-index: 10; outline: 2px solid $lu_selected_color; .lu-selection-only { display: block; } } [data-renderer] { overflow-x: hidden; text-overflow: ellipsis; } .#{$lu_css_prefix}-grid-space { grid-column-gap: $lu_engine_grip_gap; } ## Instruction: Add padding-left to .lu-hover-only (applies to numerical columns) sgratzl/taggle2#104 ## Code After: @import '../vars'; .lu-hover-only, .lu-selection-only { display: none; } &:hover, &.lu-selected, &.lu-hovered { .lu-not-hover { display: none; } .lu-hover-only { display: block; padding-left: 4px; } } /** selected state extends hover state */ &.lu-selected { z-index: 10; outline: 2px solid $lu_selected_color; .lu-selection-only { display: block; } } [data-renderer] { overflow-x: hidden; text-overflow: ellipsis; } .#{$lu_css_prefix}-grid-space { grid-column-gap: $lu_engine_grip_gap; }
@import '../vars'; .lu-hover-only, .lu-selection-only { display: none; } &:hover, &.lu-selected, &.lu-hovered { .lu-not-hover { display: none; } .lu-hover-only { display: block; + padding-left: 4px; } } /** selected state extends hover state */ &.lu-selected { z-index: 10; outline: 2px solid $lu_selected_color; .lu-selection-only { display: block; } } [data-renderer] { overflow-x: hidden; text-overflow: ellipsis; } .#{$lu_css_prefix}-grid-space { grid-column-gap: $lu_engine_grip_gap; }
1
0.025641
1
0
aeb1af2d5f64d34676ff79711e0b73380cb2cd03
src/clj/clojure/lang/apersistent_map.clj
src/clj/clojure/lang/apersistent_map.clj
(ns clojure.lang.apersistent-map (:refer-clojure :only [bit-and defmacro defn let loop +]) (:require [clojure.lang.counted :refer [count]] [clojure.lang.hash :refer [hash]] [clojure.lang.lookup :refer [contains? get]] [clojure.lang.map-entry :refer [key val]] [clojure.lang.operators :refer [and =]] [clojure.lang.seq :refer [first next seq]])) (defmacro map-hash [-seq] `(loop [entries# ~-seq acc# 0] (if entries# (let [entry# (first entries#)] (recur (next entries#) (+ acc# (bit-and (hash (key entry#)) (hash (val entry#)))))) acc#))) (defn map-equals? [m1 m2] (if (= (count m1) (count m2)) (loop [m1-seq (seq m1)] (if m1-seq (let [first-entry (first m1-seq) k (key first-entry) v (val first-entry)] (if (and (contains? m2 k) (= v (get m2 k))) (recur (next m1-seq)) false)) true)) false))
(ns clojure.lang.apersistent-map (:refer-clojure :only [bit-and defmacro defn let loop +]) (:require [clojure.lang.counted :refer [count]] [clojure.lang.hash :refer [hash]] [clojure.lang.lookup :refer [contains? get]] [clojure.lang.map-entry :refer [key val]] [clojure.lang.operators :refer [and =]] [clojure.lang.seq :refer [first next seq]])) (defn map-hash [-seq] (loop [entries -seq acc 0] (if entries (let [entry (first entries)] (recur (next entries) (+ acc (bit-and (hash (key entry)) (hash (val entry)))))) acc))) (defn map-equals? [m1 m2] (if (= (count m1) (count m2)) (loop [m1-seq (seq m1)] (if m1-seq (let [first-entry (first m1-seq) k (key first-entry) v (val first-entry)] (if (and (contains? m2 k) (= v (get m2 k))) (recur (next m1-seq)) false)) true)) false))
Change map-hash from macro to fn
Change map-hash from macro to fn
Clojure
epl-1.0
patrickgombert/clojure.core,mylesmegyesi/clojure.core,kevinbuch/clojure.core
clojure
## Code Before: (ns clojure.lang.apersistent-map (:refer-clojure :only [bit-and defmacro defn let loop +]) (:require [clojure.lang.counted :refer [count]] [clojure.lang.hash :refer [hash]] [clojure.lang.lookup :refer [contains? get]] [clojure.lang.map-entry :refer [key val]] [clojure.lang.operators :refer [and =]] [clojure.lang.seq :refer [first next seq]])) (defmacro map-hash [-seq] `(loop [entries# ~-seq acc# 0] (if entries# (let [entry# (first entries#)] (recur (next entries#) (+ acc# (bit-and (hash (key entry#)) (hash (val entry#)))))) acc#))) (defn map-equals? [m1 m2] (if (= (count m1) (count m2)) (loop [m1-seq (seq m1)] (if m1-seq (let [first-entry (first m1-seq) k (key first-entry) v (val first-entry)] (if (and (contains? m2 k) (= v (get m2 k))) (recur (next m1-seq)) false)) true)) false)) ## Instruction: Change map-hash from macro to fn ## Code After: (ns clojure.lang.apersistent-map (:refer-clojure :only [bit-and defmacro defn let loop +]) (:require [clojure.lang.counted :refer [count]] [clojure.lang.hash :refer [hash]] [clojure.lang.lookup :refer [contains? get]] [clojure.lang.map-entry :refer [key val]] [clojure.lang.operators :refer [and =]] [clojure.lang.seq :refer [first next seq]])) (defn map-hash [-seq] (loop [entries -seq acc 0] (if entries (let [entry (first entries)] (recur (next entries) (+ acc (bit-and (hash (key entry)) (hash (val entry)))))) acc))) (defn map-equals? [m1 m2] (if (= (count m1) (count m2)) (loop [m1-seq (seq m1)] (if m1-seq (let [first-entry (first m1-seq) k (key first-entry) v (val first-entry)] (if (and (contains? m2 k) (= v (get m2 k))) (recur (next m1-seq)) false)) true)) false))
(ns clojure.lang.apersistent-map (:refer-clojure :only [bit-and defmacro defn let loop +]) (:require [clojure.lang.counted :refer [count]] [clojure.lang.hash :refer [hash]] [clojure.lang.lookup :refer [contains? get]] [clojure.lang.map-entry :refer [key val]] [clojure.lang.operators :refer [and =]] [clojure.lang.seq :refer [first next seq]])) - (defmacro map-hash [-seq] ? ^^^^^ + (defn map-hash [-seq] ? ^ - `(loop [entries# ~-seq ? - - - + (loop [entries -seq - acc# 0] ? - - + acc 0] - (if entries# ? - - + (if entries - (let [entry# (first entries#)] ? - - - + (let [entry (first entries)] - (recur ? - + (recur - (next entries#) ? - - + (next entries) - (+ acc# (bit-and (hash (key entry#)) ? - - - + (+ acc (bit-and (hash (key entry)) - (hash (val entry#)))))) ? -- - + (hash (val entry)))))) - acc#))) ? - + acc))) (defn map-equals? [m1 m2] (if (= (count m1) (count m2)) (loop [m1-seq (seq m1)] (if m1-seq (let [first-entry (first m1-seq) k (key first-entry) v (val first-entry)] (if (and (contains? m2 k) (= v (get m2 k))) (recur (next m1-seq)) false)) true)) false))
20
0.606061
10
10
aa140217dc9184c9da10131be8c48da28269de68
src/components/completers/Completer.sass
src/components/completers/Completer.sass
@import ../../styles/lib .Completer position: fixed z-index: 2 width: 100% height: rem(153) overflow-x: hidden overflow-y: auto -webkit-overflow-scrolling: touch @media(min-width: #{$break-2}) .Completer height: rem(320) max-width: rem(240)
@import ../../styles/lib .Completer +sans-typeset position: fixed z-index: 2 width: 100% height: rem(153) overflow-x: hidden overflow-y: auto -webkit-overflow-scrolling: touch @media(min-width: #{$break-2}) .Completer height: rem(320) max-width: rem(240)
Use correct font-size for completers
Use correct font-size for completers [Finishes: #114524253]
Sass
mit
ello/webapp,ello/webapp,ello/webapp
sass
## Code Before: @import ../../styles/lib .Completer position: fixed z-index: 2 width: 100% height: rem(153) overflow-x: hidden overflow-y: auto -webkit-overflow-scrolling: touch @media(min-width: #{$break-2}) .Completer height: rem(320) max-width: rem(240) ## Instruction: Use correct font-size for completers [Finishes: #114524253] ## Code After: @import ../../styles/lib .Completer +sans-typeset position: fixed z-index: 2 width: 100% height: rem(153) overflow-x: hidden overflow-y: auto -webkit-overflow-scrolling: touch @media(min-width: #{$break-2}) .Completer height: rem(320) max-width: rem(240)
@import ../../styles/lib .Completer + +sans-typeset position: fixed z-index: 2 width: 100% height: rem(153) overflow-x: hidden overflow-y: auto -webkit-overflow-scrolling: touch @media(min-width: #{$break-2}) .Completer height: rem(320) max-width: rem(240)
1
0.058824
1
0
996e72e33d541755e2ba4a97479bcaf218c6270e
src/main/java/com/forsvarir/mud/CommandProcessor.java
src/main/java/com/forsvarir/mud/CommandProcessor.java
package com.forsvarir.mud; import com.forsvarir.mud.commands.MudCommand; import com.forsvarir.mud.commands.UnknownCommand; import org.springframework.stereotype.Service; import java.util.Map; @Service public class CommandProcessor { private final SessionManager sessionManager; private final CommandTokenizer commandTokenizer; private final UnknownCommand unknownCommand; private final Map<String, MudCommand> commands; public CommandProcessor(SessionManager sessionManager, CommandTokenizer commandTokenizer, UnknownCommand unknownCommand, Map<String, MudCommand> commands) { this.sessionManager = sessionManager; this.commandTokenizer = commandTokenizer; this.unknownCommand = unknownCommand; this.commands = commands; } public void processCommand(String command, String principalName, String sessionId) { var tokens = commandTokenizer.extractTokens(command); var commandProcessor = commands.getOrDefault(tokens.getCommand() + "Command", unknownCommand); var sender = sessionManager.findPlayer(principalName, sessionId); commandProcessor.processCommand(tokens.getArguments(), sender); } }
package com.forsvarir.mud; import com.forsvarir.mud.commands.MudCommand; import com.forsvarir.mud.commands.UnknownCommand; import org.springframework.stereotype.Service; import java.util.Map; @Service public class CommandProcessor { private final SessionManager sessionManager; private final CommandTokenizer commandTokenizer; private final UnknownCommand unknownCommand; private final Map<String, MudCommand> commands; public CommandProcessor(SessionManager sessionManager, CommandTokenizer commandTokenizer, UnknownCommand unknownCommand, Map<String, MudCommand> commands) { this.sessionManager = sessionManager; this.commandTokenizer = commandTokenizer; this.unknownCommand = unknownCommand; this.commands = commands; } public void processCommand(String command, String principalName, String sessionId) { var tokens = commandTokenizer.extractTokens(command); var commandProcessor = commands.getOrDefault(calculateCommandBeanName(tokens.getCommand()), unknownCommand); var sender = sessionManager.findPlayer(principalName, sessionId); commandProcessor.processCommand(tokens.getArguments(), sender); } private String calculateCommandBeanName(String command) { return command + "Command"; } }
Make it explicit where command class name comes from
Make it explicit where command class name comes from
Java
mit
forsvarir/Mud
java
## Code Before: package com.forsvarir.mud; import com.forsvarir.mud.commands.MudCommand; import com.forsvarir.mud.commands.UnknownCommand; import org.springframework.stereotype.Service; import java.util.Map; @Service public class CommandProcessor { private final SessionManager sessionManager; private final CommandTokenizer commandTokenizer; private final UnknownCommand unknownCommand; private final Map<String, MudCommand> commands; public CommandProcessor(SessionManager sessionManager, CommandTokenizer commandTokenizer, UnknownCommand unknownCommand, Map<String, MudCommand> commands) { this.sessionManager = sessionManager; this.commandTokenizer = commandTokenizer; this.unknownCommand = unknownCommand; this.commands = commands; } public void processCommand(String command, String principalName, String sessionId) { var tokens = commandTokenizer.extractTokens(command); var commandProcessor = commands.getOrDefault(tokens.getCommand() + "Command", unknownCommand); var sender = sessionManager.findPlayer(principalName, sessionId); commandProcessor.processCommand(tokens.getArguments(), sender); } } ## Instruction: Make it explicit where command class name comes from ## Code After: package com.forsvarir.mud; import com.forsvarir.mud.commands.MudCommand; import com.forsvarir.mud.commands.UnknownCommand; import org.springframework.stereotype.Service; import java.util.Map; @Service public class CommandProcessor { private final SessionManager sessionManager; private final CommandTokenizer commandTokenizer; private final UnknownCommand unknownCommand; private final Map<String, MudCommand> commands; public CommandProcessor(SessionManager sessionManager, CommandTokenizer commandTokenizer, UnknownCommand unknownCommand, Map<String, MudCommand> commands) { this.sessionManager = sessionManager; this.commandTokenizer = commandTokenizer; this.unknownCommand = unknownCommand; this.commands = commands; } public void processCommand(String command, String principalName, String sessionId) { var tokens = commandTokenizer.extractTokens(command); var commandProcessor = commands.getOrDefault(calculateCommandBeanName(tokens.getCommand()), unknownCommand); var sender = sessionManager.findPlayer(principalName, sessionId); commandProcessor.processCommand(tokens.getArguments(), sender); } private String calculateCommandBeanName(String command) { return command + "Command"; } }
package com.forsvarir.mud; import com.forsvarir.mud.commands.MudCommand; import com.forsvarir.mud.commands.UnknownCommand; import org.springframework.stereotype.Service; import java.util.Map; @Service public class CommandProcessor { private final SessionManager sessionManager; private final CommandTokenizer commandTokenizer; private final UnknownCommand unknownCommand; private final Map<String, MudCommand> commands; public CommandProcessor(SessionManager sessionManager, CommandTokenizer commandTokenizer, UnknownCommand unknownCommand, Map<String, MudCommand> commands) { this.sessionManager = sessionManager; this.commandTokenizer = commandTokenizer; this.unknownCommand = unknownCommand; this.commands = commands; } public void processCommand(String command, String principalName, String sessionId) { var tokens = commandTokenizer.extractTokens(command); - var commandProcessor = commands.getOrDefault(tokens.getCommand() + "Command", unknownCommand); + var commandProcessor = commands.getOrDefault(calculateCommandBeanName(tokens.getCommand()), + unknownCommand); var sender = sessionManager.findPlayer(principalName, sessionId); commandProcessor.processCommand(tokens.getArguments(), sender); } + + private String calculateCommandBeanName(String command) { + return command + "Command"; + } }
7
0.21875
6
1
315c996e6e6fac57514d4faa73329060edf714dc
libechonest/src/ENAPI_utils.h
libechonest/src/ENAPI_utils.h
// // ENAPI_utils.h // libechonest // // Created by Art Gillespie on 3/15/11. art@tapsquare.com // #import "NSMutableDictionary+QueryString.h" #import "NSData+MD5.h" #import "ENAPI.h" #define CHECK_API_KEY if (nil == [ENAPI apiKey]) { @throw [NSException exceptionWithName:@"APIKeyNotSetException" reason:@"Set the API key before calling this method" userInfo:nil]; } static NSString __attribute__((unused)) * const ECHONEST_API_URL = @"http://developer.echonest.com/api/v4/";
// // ENAPI_utils.h // libechonest // // Created by Art Gillespie on 3/15/11. art@tapsquare.com // #import "NSMutableDictionary+QueryString.h" #import "NSData+MD5.h" #import "ENAPI.h" #define CHECK_API_KEY if (nil == [ENAPI apiKey]) { @throw [NSException exceptionWithName:@"APIKeyNotSetException" reason:@"Set the API key before calling this method" userInfo:nil]; } #define CHECK_OAUTH_KEYS if (nil == [ENAPI consumerKey] && nil == [ENAPI sharedSecret]) { @throw [NSException exceptionWithName:@"OAuthKeysNotSetException" reason:@"Set the consumer key & shared secret before calling this method" userInfo:nil]; } static NSString __attribute__((unused)) * const ECHONEST_API_URL = @"http://developer.echonest.com/api/v4/";
Add macro for checking OAuth keys.
Add macro for checking OAuth keys.
C
bsd-3-clause
echonest/libechonest
c
## Code Before: // // ENAPI_utils.h // libechonest // // Created by Art Gillespie on 3/15/11. art@tapsquare.com // #import "NSMutableDictionary+QueryString.h" #import "NSData+MD5.h" #import "ENAPI.h" #define CHECK_API_KEY if (nil == [ENAPI apiKey]) { @throw [NSException exceptionWithName:@"APIKeyNotSetException" reason:@"Set the API key before calling this method" userInfo:nil]; } static NSString __attribute__((unused)) * const ECHONEST_API_URL = @"http://developer.echonest.com/api/v4/"; ## Instruction: Add macro for checking OAuth keys. ## Code After: // // ENAPI_utils.h // libechonest // // Created by Art Gillespie on 3/15/11. art@tapsquare.com // #import "NSMutableDictionary+QueryString.h" #import "NSData+MD5.h" #import "ENAPI.h" #define CHECK_API_KEY if (nil == [ENAPI apiKey]) { @throw [NSException exceptionWithName:@"APIKeyNotSetException" reason:@"Set the API key before calling this method" userInfo:nil]; } #define CHECK_OAUTH_KEYS if (nil == [ENAPI consumerKey] && nil == [ENAPI sharedSecret]) { @throw [NSException exceptionWithName:@"OAuthKeysNotSetException" reason:@"Set the consumer key & shared secret before calling this method" userInfo:nil]; } static NSString __attribute__((unused)) * const ECHONEST_API_URL = @"http://developer.echonest.com/api/v4/";
// // ENAPI_utils.h // libechonest // // Created by Art Gillespie on 3/15/11. art@tapsquare.com // #import "NSMutableDictionary+QueryString.h" #import "NSData+MD5.h" #import "ENAPI.h" #define CHECK_API_KEY if (nil == [ENAPI apiKey]) { @throw [NSException exceptionWithName:@"APIKeyNotSetException" reason:@"Set the API key before calling this method" userInfo:nil]; } + #define CHECK_OAUTH_KEYS if (nil == [ENAPI consumerKey] && nil == [ENAPI sharedSecret]) { @throw [NSException exceptionWithName:@"OAuthKeysNotSetException" reason:@"Set the consumer key & shared secret before calling this method" userInfo:nil]; } + static NSString __attribute__((unused)) * const ECHONEST_API_URL = @"http://developer.echonest.com/api/v4/";
2
0.142857
2
0
483b00be4661866dc265f9104409fea2586a61c7
app/assets/stylesheets/administrate/components/_field-unit.scss
app/assets/stylesheets/administrate/components/_field-unit.scss
.field-unit { @include clearfix; @include fill-parent; align-items: baseline; margin-bottom: $base-spacing; position: relative; label { @include data-label; @include span-columns(2 of 12); text-align: right; } select, .selectize-control { background-color: $white; } input, select, .selectize-control { @include span-columns(4 of 12); } textarea { @include span-columns(6 of 12); } [type="checkbox"], [type="radio"] { width: auto; } select { appearance: none; background: image-url("administrate/dropdown.svg") no-repeat 97% 50% / 10px; } }
.field-unit { @include clearfix; @include fill-parent; align-items: baseline; margin-bottom: $base-spacing; position: relative; label { @include data-label; @include span-columns(2 of 12); text-align: right; } .selectize-control { background-color: $white; } input, select, .selectize-control { @include span-columns(4 of 12); } textarea { @include span-columns(6 of 12); } [type="checkbox"], [type="radio"] { width: auto; } }
Use default styling on select elements
Use default styling on select elements There isn't a standardized way of customizing the look and feel of select elements. It's always a bit of a hack. We are also still using default checkmark and radio buttons, so why only customize some of the default form fields? For now, let's go back to using default select and we can revisit customizing the look and feel in the future, after some CSS clean up.
SCSS
mit
BenMorganIO/administrate,TheHumanEffort/administrate,flama/administrate,thoughtbot/administrate,nburkley/administrate,micapam/administrate,TheHumanEffort/administrate,dminchev/administrate,acrogenesis-lab/administrate,dminchev/administrate,vgsantoniazzi/administrate,nando/administrate,tmecklem/administrate,thoughtbot/administrate,thoughtbot/administrate,flama/administrate,flama/administrate,vgsantoniazzi/administrate,nburkley/administrate,micapam/administrate,nando/administrate,joshua5201/administrate,joshua5201/administrate,joshua5201/administrate,micapam/administrate,acrogenesis-lab/administrate,kpheasey/administrate,kpheasey/administrate,dminchev/administrate,TheHumanEffort/administrate,tmecklem/administrate,astarix/administrate,nando/administrate,BenMorganIO/administrate,micapam/administrate,BenMorganIO/administrate,astarix/administrate,vgsantoniazzi/administrate,astarix/administrate,thoughtbot/administrate,astarix/administrate,nando/administrate,joshua5201/administrate,flama/administrate,vgsantoniazzi/administrate,dminchev/administrate,acrogenesis-lab/administrate,acrogenesis-lab/administrate,kpheasey/administrate,nburkley/administrate,BenMorganIO/administrate,tmecklem/administrate,kpheasey/administrate,tmecklem/administrate,nburkley/administrate,TheHumanEffort/administrate
scss
## Code Before: .field-unit { @include clearfix; @include fill-parent; align-items: baseline; margin-bottom: $base-spacing; position: relative; label { @include data-label; @include span-columns(2 of 12); text-align: right; } select, .selectize-control { background-color: $white; } input, select, .selectize-control { @include span-columns(4 of 12); } textarea { @include span-columns(6 of 12); } [type="checkbox"], [type="radio"] { width: auto; } select { appearance: none; background: image-url("administrate/dropdown.svg") no-repeat 97% 50% / 10px; } } ## Instruction: Use default styling on select elements There isn't a standardized way of customizing the look and feel of select elements. It's always a bit of a hack. We are also still using default checkmark and radio buttons, so why only customize some of the default form fields? For now, let's go back to using default select and we can revisit customizing the look and feel in the future, after some CSS clean up. ## Code After: .field-unit { @include clearfix; @include fill-parent; align-items: baseline; margin-bottom: $base-spacing; position: relative; label { @include data-label; @include span-columns(2 of 12); text-align: right; } .selectize-control { background-color: $white; } input, select, .selectize-control { @include span-columns(4 of 12); } textarea { @include span-columns(6 of 12); } [type="checkbox"], [type="radio"] { width: auto; } }
.field-unit { @include clearfix; @include fill-parent; align-items: baseline; margin-bottom: $base-spacing; position: relative; label { @include data-label; @include span-columns(2 of 12); text-align: right; } - select, .selectize-control { background-color: $white; } input, select, .selectize-control { @include span-columns(4 of 12); } textarea { @include span-columns(6 of 12); } [type="checkbox"], [type="radio"] { width: auto; } - - select { - appearance: none; - background: image-url("administrate/dropdown.svg") no-repeat 97% 50% / 10px; - } }
6
0.157895
0
6
20f896c4000a501cda51f429d6eeb7427626baea
src/utilities/functional/path.js
src/utilities/functional/path.js
'use strict'; const { flatten } = require('./flatten'); // Take a dot-notation path that can contain `*` and expand it to all // possible paths within `obj` // For example, `{a: [{attrB: 'b', attrC: 'c', attrD: 'd'}]}` + `a.*.*` would // result in `a.0.attrB`, `a.0.attrC` and `a.0.attrD` const expandPath = function (obj, key) { const keys = key.split('.'); const keysA = getPaths(obj, keys); return keysA; }; const getPaths = function (obj, path, parentPath = []) { // Final values if (path.length === 0) { return parentPath.join('.'); } // If the parent path has some non-existing values if (!isStructuredType(obj)) { return []; } const [childKey, ...pathA] = path; if (childKey !== '*') { return getPaths(obj[childKey], pathA, [...parentPath, childKey]); } const paths = Object.entries(obj).map(([childKeyA, child]) => getPaths(child, pathA, [...parentPath, childKeyA])); const pathsA = flatten(paths); return pathsA; }; const isStructuredType = function (obj) { return obj && typeof obj === 'object'; }; module.exports = { expandPath, };
'use strict'; const { flatten } = require('./flatten'); // Take a dot-notation path that can contain `*` and expand it to all // possible paths within `obj` // For example, `{a: [{attrB: 'b', attrC: 'c', attrD: 'd'}]}` + `a.*.*` would // result in `a.0.attrB`, `a.0.attrC` and `a.0.attrD` const expandPath = function (obj, key) { const keys = key.split('.'); const keysA = getPaths(obj, keys); const keysB = Array.isArray(keysA) ? keysA : [keysA]; return keysB; }; const getPaths = function (obj, path, parentPath = []) { // Final values if (path.length === 0) { return parentPath.join('.'); } // If the parent path has some non-existing values if (!isStructuredType(obj)) { return []; } const [childKey, ...pathA] = path; if (childKey !== '*') { return getPaths(obj[childKey], pathA, [...parentPath, childKey]); } const paths = Object.entries(obj).map(([childKeyA, child]) => getPaths(child, pathA, [...parentPath, childKeyA])); const pathsA = flatten(paths); return pathsA; }; const isStructuredType = function (obj) { return obj && typeof obj === 'object'; }; module.exports = { expandPath, };
Fix expandPath() utility when no * is used
Fix expandPath() utility when no * is used
JavaScript
apache-2.0
autoserver-org/autoserver,autoserver-org/autoserver
javascript
## Code Before: 'use strict'; const { flatten } = require('./flatten'); // Take a dot-notation path that can contain `*` and expand it to all // possible paths within `obj` // For example, `{a: [{attrB: 'b', attrC: 'c', attrD: 'd'}]}` + `a.*.*` would // result in `a.0.attrB`, `a.0.attrC` and `a.0.attrD` const expandPath = function (obj, key) { const keys = key.split('.'); const keysA = getPaths(obj, keys); return keysA; }; const getPaths = function (obj, path, parentPath = []) { // Final values if (path.length === 0) { return parentPath.join('.'); } // If the parent path has some non-existing values if (!isStructuredType(obj)) { return []; } const [childKey, ...pathA] = path; if (childKey !== '*') { return getPaths(obj[childKey], pathA, [...parentPath, childKey]); } const paths = Object.entries(obj).map(([childKeyA, child]) => getPaths(child, pathA, [...parentPath, childKeyA])); const pathsA = flatten(paths); return pathsA; }; const isStructuredType = function (obj) { return obj && typeof obj === 'object'; }; module.exports = { expandPath, }; ## Instruction: Fix expandPath() utility when no * is used ## Code After: 'use strict'; const { flatten } = require('./flatten'); // Take a dot-notation path that can contain `*` and expand it to all // possible paths within `obj` // For example, `{a: [{attrB: 'b', attrC: 'c', attrD: 'd'}]}` + `a.*.*` would // result in `a.0.attrB`, `a.0.attrC` and `a.0.attrD` const expandPath = function (obj, key) { const keys = key.split('.'); const keysA = getPaths(obj, keys); const keysB = Array.isArray(keysA) ? keysA : [keysA]; return keysB; }; const getPaths = function (obj, path, parentPath = []) { // Final values if (path.length === 0) { return parentPath.join('.'); } // If the parent path has some non-existing values if (!isStructuredType(obj)) { return []; } const [childKey, ...pathA] = path; if (childKey !== '*') { return getPaths(obj[childKey], pathA, [...parentPath, childKey]); } const paths = Object.entries(obj).map(([childKeyA, child]) => getPaths(child, pathA, [...parentPath, childKeyA])); const pathsA = flatten(paths); return pathsA; }; const isStructuredType = function (obj) { return obj && typeof obj === 'object'; }; module.exports = { expandPath, };
'use strict'; const { flatten } = require('./flatten'); // Take a dot-notation path that can contain `*` and expand it to all // possible paths within `obj` // For example, `{a: [{attrB: 'b', attrC: 'c', attrD: 'd'}]}` + `a.*.*` would // result in `a.0.attrB`, `a.0.attrC` and `a.0.attrD` const expandPath = function (obj, key) { const keys = key.split('.'); const keysA = getPaths(obj, keys); + const keysB = Array.isArray(keysA) ? keysA : [keysA]; - return keysA; ? ^ + return keysB; ? ^ }; const getPaths = function (obj, path, parentPath = []) { // Final values if (path.length === 0) { return parentPath.join('.'); } // If the parent path has some non-existing values if (!isStructuredType(obj)) { return []; } const [childKey, ...pathA] = path; if (childKey !== '*') { return getPaths(obj[childKey], pathA, [...parentPath, childKey]); } const paths = Object.entries(obj).map(([childKeyA, child]) => getPaths(child, pathA, [...parentPath, childKeyA])); const pathsA = flatten(paths); return pathsA; }; const isStructuredType = function (obj) { return obj && typeof obj === 'object'; }; module.exports = { expandPath, };
3
0.071429
2
1
b003c7962a89f34b3adbca9def45e61fedd644d4
README.md
README.md
[![Build Status](https://travis-ci.org/tomsquest/datability.svg?branch=master)](https://travis-ci.org/tomsquest/datability) Test what matter the most in your Integration test. Disable primary keys, foreigh keys, not nulls, checks... and insert only the data that matters. ## Usage Example with PostgreSQL: ``` java Connection connection = DriverManager .getConnection("jdbc:postgresql://host:port/database", "user", "pass"); // Create a test table connection.createStatement() .execute("create table mytable (notnullcolumn int not null)"); // Here the magic happens : disable those nasty constraints ! Databases .postgresql(connection) .disableNotNulls("mytable", "anothertable"); // Test that the constraint where removed connection.createStatement() .execute("insert into mytable(notnullcolumn) values (null)"); // Success ! ``` ## Databases support * [ ] PostgreSQL 9.x * [x] Multiple tables * [x] Drop not-nulls * [ ] Drop primary keys * [ ] Drop foreign keys * [ ] Drop checks ## Todo * [ ] Explain Why it matters to testing only the relevant data * [ ] Upload to Central and update readme with <dependency> * Support additional databases * [ ] MySQL * [ ] Oracle * [ ] SqlServer * Connection to the database * [ ] Using a jdbc url * [ ] Using a DataSource * [ ] Datability could close the opened connection
[![Build Status](https://travis-ci.org/tomsquest/datability.svg?branch=master)](https://travis-ci.org/tomsquest/datability) Test what matter the most in your Integration test. Disable primary keys, foreigh keys, not nulls, checks... and insert only the data that matters. ## Usage Example with PostgreSQL: ``` java Connection connection = DriverManager .getConnection("jdbc:postgresql://host:port/database", "user", "pass"); // Create a test table connection.createStatement() .execute("create table mytable (notnullcolumn int not null)"); // Here the magic happens : disable those nasty constraints ! Databases .postgresql(connection) .disableNotNulls("mytable", "anothertable"); // Test that the constraint where removed connection.createStatement() .execute("insert into mytable(notnullcolumn) values (null)"); // Success ! ``` ## Databases support * [ ] PostgreSQL 9.x * [x] Multiple tables * [x] Drop not-nulls * [ ] Drop primary keys * [ ] Drop foreign keys * [ ] Drop checks * [ ] Drop all constraints (oneliner) ## Todo * [ ] Explain Why it matters to testing only the relevant data * [ ] Upload to Central and update readme with <dependency> * Support additional databases * [ ] MySQL * [ ] Oracle * [ ] SqlServer * Connection to the database * [ ] Using a jdbc url * [ ] Using a DataSource * [ ] Datability could close the opened connection
Add todo item to drop all constraints
Add todo item to drop all constraints
Markdown
apache-2.0
tomsquest/datability
markdown
## Code Before: [![Build Status](https://travis-ci.org/tomsquest/datability.svg?branch=master)](https://travis-ci.org/tomsquest/datability) Test what matter the most in your Integration test. Disable primary keys, foreigh keys, not nulls, checks... and insert only the data that matters. ## Usage Example with PostgreSQL: ``` java Connection connection = DriverManager .getConnection("jdbc:postgresql://host:port/database", "user", "pass"); // Create a test table connection.createStatement() .execute("create table mytable (notnullcolumn int not null)"); // Here the magic happens : disable those nasty constraints ! Databases .postgresql(connection) .disableNotNulls("mytable", "anothertable"); // Test that the constraint where removed connection.createStatement() .execute("insert into mytable(notnullcolumn) values (null)"); // Success ! ``` ## Databases support * [ ] PostgreSQL 9.x * [x] Multiple tables * [x] Drop not-nulls * [ ] Drop primary keys * [ ] Drop foreign keys * [ ] Drop checks ## Todo * [ ] Explain Why it matters to testing only the relevant data * [ ] Upload to Central and update readme with <dependency> * Support additional databases * [ ] MySQL * [ ] Oracle * [ ] SqlServer * Connection to the database * [ ] Using a jdbc url * [ ] Using a DataSource * [ ] Datability could close the opened connection ## Instruction: Add todo item to drop all constraints ## Code After: [![Build Status](https://travis-ci.org/tomsquest/datability.svg?branch=master)](https://travis-ci.org/tomsquest/datability) Test what matter the most in your Integration test. Disable primary keys, foreigh keys, not nulls, checks... and insert only the data that matters. ## Usage Example with PostgreSQL: ``` java Connection connection = DriverManager .getConnection("jdbc:postgresql://host:port/database", "user", "pass"); // Create a test table connection.createStatement() .execute("create table mytable (notnullcolumn int not null)"); // Here the magic happens : disable those nasty constraints ! Databases .postgresql(connection) .disableNotNulls("mytable", "anothertable"); // Test that the constraint where removed connection.createStatement() .execute("insert into mytable(notnullcolumn) values (null)"); // Success ! ``` ## Databases support * [ ] PostgreSQL 9.x * [x] Multiple tables * [x] Drop not-nulls * [ ] Drop primary keys * [ ] Drop foreign keys * [ ] Drop checks * [ ] Drop all constraints (oneliner) ## Todo * [ ] Explain Why it matters to testing only the relevant data * [ ] Upload to Central and update readme with <dependency> * Support additional databases * [ ] MySQL * [ ] Oracle * [ ] SqlServer * Connection to the database * [ ] Using a jdbc url * [ ] Using a DataSource * [ ] Datability could close the opened connection
[![Build Status](https://travis-ci.org/tomsquest/datability.svg?branch=master)](https://travis-ci.org/tomsquest/datability) Test what matter the most in your Integration test. Disable primary keys, foreigh keys, not nulls, checks... and insert only the data that matters. ## Usage Example with PostgreSQL: ``` java Connection connection = DriverManager .getConnection("jdbc:postgresql://host:port/database", "user", "pass"); // Create a test table connection.createStatement() .execute("create table mytable (notnullcolumn int not null)"); // Here the magic happens : disable those nasty constraints ! Databases .postgresql(connection) .disableNotNulls("mytable", "anothertable"); // Test that the constraint where removed connection.createStatement() .execute("insert into mytable(notnullcolumn) values (null)"); // Success ! ``` ## Databases support * [ ] PostgreSQL 9.x * [x] Multiple tables * [x] Drop not-nulls * [ ] Drop primary keys * [ ] Drop foreign keys * [ ] Drop checks + * [ ] Drop all constraints (oneliner) ## Todo * [ ] Explain Why it matters to testing only the relevant data * [ ] Upload to Central and update readme with <dependency> * Support additional databases * [ ] MySQL * [ ] Oracle * [ ] SqlServer * Connection to the database * [ ] Using a jdbc url * [ ] Using a DataSource * [ ] Datability could close the opened connection
1
0.02
1
0
64ad5a13ee87cf02192ccdf211738fc017578eca
lib/calyx/modifiers.rb
lib/calyx/modifiers.rb
module Calyx class Modifiers def transform(name, value) if respond_to?(name) send(name, value) elsif value.respond_to?(name) value.send(name) else value end end end end
module Calyx class Modifiers # Transforms an output string by delegating to the given output function. # # If a registered modifier method is not found, then delegate to the given # string function. # # If an invalid modifier function is given, returns the raw input string. # # @param name [Symbol] # @param value [String] # @return [String] def transform(name, value) if respond_to?(name) send(name, value) elsif value.respond_to?(name) value.send(name) else value end end end end
Add method comments to `Modifiers` source
Add method comments to `Modifiers` source
Ruby
mit
maetl/calyx
ruby
## Code Before: module Calyx class Modifiers def transform(name, value) if respond_to?(name) send(name, value) elsif value.respond_to?(name) value.send(name) else value end end end end ## Instruction: Add method comments to `Modifiers` source ## Code After: module Calyx class Modifiers # Transforms an output string by delegating to the given output function. # # If a registered modifier method is not found, then delegate to the given # string function. # # If an invalid modifier function is given, returns the raw input string. # # @param name [Symbol] # @param value [String] # @return [String] def transform(name, value) if respond_to?(name) send(name, value) elsif value.respond_to?(name) value.send(name) else value end end end end
module Calyx class Modifiers + # Transforms an output string by delegating to the given output function. + # + # If a registered modifier method is not found, then delegate to the given + # string function. + # + # If an invalid modifier function is given, returns the raw input string. + # + # @param name [Symbol] + # @param value [String] + # @return [String] def transform(name, value) if respond_to?(name) send(name, value) elsif value.respond_to?(name) value.send(name) else value end end end end
10
0.769231
10
0
351d07547969b38571a9de8bf7aa5318c0031518
app/views/reports/_actions.html.haml
app/views/reports/_actions.html.haml
= form_tag report_url(@report), :class => "navbar-form navbar-right", :method => :get, :id => 'report_filter_form', :role => "form" do .form-group = select_tag(:report_filter_type, options_for_select(@asset_types, :selected => @report_filter_type), :class => "form-control", :prompt => 'Any Type...', :id => 'asset_filter') = link_to "#chart-div", :data => {:toggle => "collapse", :parent => "accordion"}, :class => "btn btn-default navbar-btn", :id => "chart-toggle" do Toggle chart :javascript $(document).ready(function() { $('#asset_filter').change(function() { $('#report_filter_form').submit(); }); });
= form_tag report_url(@report), :class => "navbar-form navbar-right", :method => :get, :id => 'report_filter_form', :role => "form" do .form-group = select_tag(:report_filter_type, options_for_select(@asset_types, :selected => @report_filter_type), :class => "form-control", :prompt => 'Any Type...', :id => 'asset_filter') :javascript $(document).ready(function() { $('#asset_filter').change(function() { $('#report_filter_form').submit(); }); });
Remove toggle chart action from report
Remove toggle chart action from report
Haml
mit
camsys/transam_core,nycdot/transam_core,nycdot/transam_core,nycdot/transam_core,camsys/transam_core,camsys/transam_core,camsys/transam_core
haml
## Code Before: = form_tag report_url(@report), :class => "navbar-form navbar-right", :method => :get, :id => 'report_filter_form', :role => "form" do .form-group = select_tag(:report_filter_type, options_for_select(@asset_types, :selected => @report_filter_type), :class => "form-control", :prompt => 'Any Type...', :id => 'asset_filter') = link_to "#chart-div", :data => {:toggle => "collapse", :parent => "accordion"}, :class => "btn btn-default navbar-btn", :id => "chart-toggle" do Toggle chart :javascript $(document).ready(function() { $('#asset_filter').change(function() { $('#report_filter_form').submit(); }); }); ## Instruction: Remove toggle chart action from report ## Code After: = form_tag report_url(@report), :class => "navbar-form navbar-right", :method => :get, :id => 'report_filter_form', :role => "form" do .form-group = select_tag(:report_filter_type, options_for_select(@asset_types, :selected => @report_filter_type), :class => "form-control", :prompt => 'Any Type...', :id => 'asset_filter') :javascript $(document).ready(function() { $('#asset_filter').change(function() { $('#report_filter_form').submit(); }); });
= form_tag report_url(@report), :class => "navbar-form navbar-right", :method => :get, :id => 'report_filter_form', :role => "form" do .form-group = select_tag(:report_filter_type, options_for_select(@asset_types, :selected => @report_filter_type), :class => "form-control", :prompt => 'Any Type...', :id => 'asset_filter') - - = link_to "#chart-div", :data => {:toggle => "collapse", :parent => "accordion"}, :class => "btn btn-default navbar-btn", :id => "chart-toggle" do - Toggle chart :javascript $(document).ready(function() { $('#asset_filter').change(function() { $('#report_filter_form').submit(); }); });
3
0.1875
0
3
20d766de4d20355303b5b423dd30bf0cd4c8ee8e
createGlyphsPDF.py
createGlyphsPDF.py
from fontTools.pens.cocoaPen import CocoaPen # Some configuration page_format = 'A4' # See http://drawbot.readthedocs.org/content/canvas/pages.html#size for other size-values my_selection = CurrentFont() # May also be CurrentFont.selection or else class RegisterGlyph(object): def __init__(self, glyph): self.glyph = glyph print 'Registered glyph:', self.glyph.name self.proportion_ratio = self.getProportionRatio() def getProportionRatio(self): xMin, yMin, xMax, yMax = self.glyph.box self.w = xMax - xMin self.h = yMax - yMin ratio = self.w/self.h return ratio def drawGlyphOnNewPage(self): newPage(page_format) self._drawGlyph() def _drawGlyph(self): pen = CocoaPen(self.glyph.getParent()) self.glyph.draw(pen) drawPath(pen.path) for g in my_selection: if len(g) > 0: # Ignore whitespace glyphs glyph = RegisterGlyph(g) glyph.drawGlyphOnNewPage()
from fontTools.pens.cocoaPen import CocoaPen # Some configuration page_format = 'A4' # See http://drawbot.readthedocs.org/content/canvas/pages.html#size for other size-values margins = (50,50,50,50) # left, top, right, bottom my_selection = CurrentFont() # May also be CurrentFont.selection or else # Init size(page_format) class RegisterGlyph(object): def __init__(self, glyph): self.glyph = glyph #print 'Registered glyph:', self.glyph.name self.proportion_ratio = self.getProportionRatio() def getProportionRatio(self): xMin, yMin, xMax, yMax = self.glyph.box self.w = xMax - xMin self.h = yMax - yMin ratio = self.w/self.h return ratio def drawGlyphOnNewPage(self): newPage() print self._drawGlyph() def _drawGlyph(self): pen = CocoaPen(self.glyph.getParent()) self.glyph.draw(pen) drawPath(pen.path) for g in my_selection: if len(g) > 0: # Ignore whitespace glyphs glyph = RegisterGlyph(g) glyph.drawGlyphOnNewPage()
Set size nonce at the beginning of the script
Set size nonce at the beginning of the script
Python
mit
AlphabetType/DrawBot-Scripts
python
## Code Before: from fontTools.pens.cocoaPen import CocoaPen # Some configuration page_format = 'A4' # See http://drawbot.readthedocs.org/content/canvas/pages.html#size for other size-values my_selection = CurrentFont() # May also be CurrentFont.selection or else class RegisterGlyph(object): def __init__(self, glyph): self.glyph = glyph print 'Registered glyph:', self.glyph.name self.proportion_ratio = self.getProportionRatio() def getProportionRatio(self): xMin, yMin, xMax, yMax = self.glyph.box self.w = xMax - xMin self.h = yMax - yMin ratio = self.w/self.h return ratio def drawGlyphOnNewPage(self): newPage(page_format) self._drawGlyph() def _drawGlyph(self): pen = CocoaPen(self.glyph.getParent()) self.glyph.draw(pen) drawPath(pen.path) for g in my_selection: if len(g) > 0: # Ignore whitespace glyphs glyph = RegisterGlyph(g) glyph.drawGlyphOnNewPage() ## Instruction: Set size nonce at the beginning of the script ## Code After: from fontTools.pens.cocoaPen import CocoaPen # Some configuration page_format = 'A4' # See http://drawbot.readthedocs.org/content/canvas/pages.html#size for other size-values margins = (50,50,50,50) # left, top, right, bottom my_selection = CurrentFont() # May also be CurrentFont.selection or else # Init size(page_format) class RegisterGlyph(object): def __init__(self, glyph): self.glyph = glyph #print 'Registered glyph:', self.glyph.name self.proportion_ratio = self.getProportionRatio() def getProportionRatio(self): xMin, yMin, xMax, yMax = self.glyph.box self.w = xMax - xMin self.h = yMax - yMin ratio = self.w/self.h return ratio def drawGlyphOnNewPage(self): newPage() print self._drawGlyph() def _drawGlyph(self): pen = CocoaPen(self.glyph.getParent()) self.glyph.draw(pen) drawPath(pen.path) for g in my_selection: if len(g) > 0: # Ignore whitespace glyphs glyph = RegisterGlyph(g) glyph.drawGlyphOnNewPage()
from fontTools.pens.cocoaPen import CocoaPen # Some configuration page_format = 'A4' # See http://drawbot.readthedocs.org/content/canvas/pages.html#size for other size-values + margins = (50,50,50,50) # left, top, right, bottom my_selection = CurrentFont() # May also be CurrentFont.selection or else + + # Init + size(page_format) class RegisterGlyph(object): def __init__(self, glyph): self.glyph = glyph - print 'Registered glyph:', self.glyph.name + #print 'Registered glyph:', self.glyph.name ? + self.proportion_ratio = self.getProportionRatio() def getProportionRatio(self): xMin, yMin, xMax, yMax = self.glyph.box self.w = xMax - xMin self.h = yMax - yMin ratio = self.w/self.h return ratio def drawGlyphOnNewPage(self): - newPage(page_format) ? ----------- + newPage() + print self._drawGlyph() def _drawGlyph(self): pen = CocoaPen(self.glyph.getParent()) self.glyph.draw(pen) drawPath(pen.path) for g in my_selection: if len(g) > 0: # Ignore whitespace glyphs glyph = RegisterGlyph(g) glyph.drawGlyphOnNewPage()
9
0.230769
7
2
6c07b6dfc7b4a3047c51d42c19e8009094802d96
core/boolean.rb
core/boolean.rb
class Boolean < `Boolean` %x{ Boolean_prototype._isBoolean = true; } def &(other) `(this == true) ? (other !== false && other !== nil) : false` end def |(other) `(this == true) ? true : (other !== false && other !== nil)` end def ^(other) `(this == true) ? (other === false || other === nil) : (other !== false && other !== nil)` end def ==(other) `(this == true) === other.valueOf()` end def class `(this == true) ? #{TrueClass} : #{FalseClass}` end alias singleton_class class def to_json `this.valueOf() ? 'true' : 'false'` end def to_s `(this == true) ? 'true' : 'false'` end end TRUE = true FALSE = false
class Boolean < `Boolean` %x{ Boolean_prototype._isBoolean = true; } def &(other) `(this == true) ? (other !== false && other !== nil) : false` end def |(other) `(this == true) ? true : (other !== false && other !== nil)` end def ^(other) `(this == true) ? (other === false || other === nil) : (other !== false && other !== nil)` end def ==(other) `(this == true) === other.valueOf()` end alias singleton_class class def to_json `this.valueOf() ? 'true' : 'false'` end def to_s `(this == true) ? 'true' : 'false'` end end TRUE = true FALSE = false
Make true/false correctly report class
Make true/false correctly report class
Ruby
mit
iliabylich/opal,suyesh/opal,wied03/opal,merongivian/opal,c42engineering/opal,suyesh/opal,domgetter/opal,jannishuebl/opal,fazibear/opal,jgaskins/opal,kachick/opal,Ajedi32/opal,Ajedi32/opal,catprintlabs/opal,opal/opal,gabrielrios/opal,Flikofbluelight747/opal,Mogztter/opal,charliesome/opal,catprintlabs/opal,gausie/opal,castwide/opal,iliabylich/opal,opal/opal,jgaskins/opal,gausie/opal,fazibear/opal,domgetter/opal,fazibear/opal,merongivian/opal,Mogztter/opal,Mogztter/opal,kachick/opal,castwide/opal,wied03/opal,bbatsov/opal,bbatsov/opal,c42engineering/opal,jgaskins/opal,gabrielrios/opal,suyesh/opal,iliabylich/opal,kachick/opal,jannishuebl/opal,merongivian/opal,bbatsov/opal,charliesome/opal,Ajedi32/opal,c42engineering/opal,Flikofbluelight747/opal,jannishuebl/opal,wied03/opal,opal/opal,gausie/opal,castwide/opal,Mogztter/opal,gabrielrios/opal,catprintlabs/opal,kachick/opal,opal/opal,Flikofbluelight747/opal
ruby
## Code Before: class Boolean < `Boolean` %x{ Boolean_prototype._isBoolean = true; } def &(other) `(this == true) ? (other !== false && other !== nil) : false` end def |(other) `(this == true) ? true : (other !== false && other !== nil)` end def ^(other) `(this == true) ? (other === false || other === nil) : (other !== false && other !== nil)` end def ==(other) `(this == true) === other.valueOf()` end def class `(this == true) ? #{TrueClass} : #{FalseClass}` end alias singleton_class class def to_json `this.valueOf() ? 'true' : 'false'` end def to_s `(this == true) ? 'true' : 'false'` end end TRUE = true FALSE = false ## Instruction: Make true/false correctly report class ## Code After: class Boolean < `Boolean` %x{ Boolean_prototype._isBoolean = true; } def &(other) `(this == true) ? (other !== false && other !== nil) : false` end def |(other) `(this == true) ? true : (other !== false && other !== nil)` end def ^(other) `(this == true) ? (other === false || other === nil) : (other !== false && other !== nil)` end def ==(other) `(this == true) === other.valueOf()` end alias singleton_class class def to_json `this.valueOf() ? 'true' : 'false'` end def to_s `(this == true) ? 'true' : 'false'` end end TRUE = true FALSE = false
class Boolean < `Boolean` %x{ Boolean_prototype._isBoolean = true; } def &(other) `(this == true) ? (other !== false && other !== nil) : false` end def |(other) `(this == true) ? true : (other !== false && other !== nil)` end def ^(other) `(this == true) ? (other === false || other === nil) : (other !== false && other !== nil)` end def ==(other) `(this == true) === other.valueOf()` end - def class - `(this == true) ? #{TrueClass} : #{FalseClass}` - end - alias singleton_class class def to_json `this.valueOf() ? 'true' : 'false'` end def to_s `(this == true) ? 'true' : 'false'` end end TRUE = true FALSE = false
4
0.105263
0
4
2e8475317d3467352a25cebae710e1a52623a2f1
app/directives/reporting-display/filter-all.html
app/directives/reporting-display/filter-all.html
<div class="panel panel-default" style="margin-right: 0px; margin-bottom: 5px; padding-right:1px;"> <style> .reportRow{ font-size: 10px; color: black; padding-left: 10px; } .reportRow a{ font-size: 11px; color: black; } /* line 263, reports/default.scss */ .nav-sidebar > .active > a { background: #fafafa; color: #333; font-weight: normal; border-left: 3px solid #428bca; } .nav-sidebar > .nactive > a { background: #fafafa; color: #333; font-weight: normal; border-left: 3px solid #ffffff; } </style> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" ng-href="all"> <div class="panel-heading" > <h4 class="panel-title" style="font-size: 13px;margin:0; white-space: nowrap; width:100%;"> {{title}} <i class="fa fa-info-circle" style="float:right;"> </i> </h4> </div> </a> </div>
<div class="panel panel-default" style="margin-right: 0px; margin-bottom: 5px; padding-right:1px;"> <style> </style> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" > <div class="panel-heading" ng-click="loadRecords('all');"> <h4 class="panel-title" style="font-size: 13px;margin:0; white-space: nowrap; width:100%;"> {{title}} <i class="fa fa-info-circle" style="float:right;"> </i> </h4> </div> </a> </div>
Fix nav for all reports filter
Fix nav for all reports filter
HTML
mit
scbd/chm.cbd.int,scbd/chm.cbd.int,scbd/chm.cbd.int
html
## Code Before: <div class="panel panel-default" style="margin-right: 0px; margin-bottom: 5px; padding-right:1px;"> <style> .reportRow{ font-size: 10px; color: black; padding-left: 10px; } .reportRow a{ font-size: 11px; color: black; } /* line 263, reports/default.scss */ .nav-sidebar > .active > a { background: #fafafa; color: #333; font-weight: normal; border-left: 3px solid #428bca; } .nav-sidebar > .nactive > a { background: #fafafa; color: #333; font-weight: normal; border-left: 3px solid #ffffff; } </style> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" ng-href="all"> <div class="panel-heading" > <h4 class="panel-title" style="font-size: 13px;margin:0; white-space: nowrap; width:100%;"> {{title}} <i class="fa fa-info-circle" style="float:right;"> </i> </h4> </div> </a> </div> ## Instruction: Fix nav for all reports filter ## Code After: <div class="panel panel-default" style="margin-right: 0px; margin-bottom: 5px; padding-right:1px;"> <style> </style> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" > <div class="panel-heading" ng-click="loadRecords('all');"> <h4 class="panel-title" style="font-size: 13px;margin:0; white-space: nowrap; width:100%;"> {{title}} <i class="fa fa-info-circle" style="float:right;"> </i> </h4> </div> </a> </div>
<div class="panel panel-default" style="margin-right: 0px; margin-bottom: 5px; padding-right:1px;"> <style> + - .reportRow{ - font-size: 10px; - color: black; - padding-left: 10px; - } - .reportRow a{ - font-size: 11px; - color: black; - } - /* line 263, reports/default.scss */ - .nav-sidebar > .active > a { - background: #fafafa; - color: #333; - font-weight: normal; - border-left: 3px solid #428bca; - } - .nav-sidebar > .nactive > a { - background: #fafafa; - color: #333; - font-weight: normal; - border-left: 3px solid #ffffff; - } </style> - <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" ng-href="all"> ? ------------- + <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" > - <div class="panel-heading" > + <div class="panel-heading" ng-click="loadRecords('all');"> <h4 class="panel-title" style="font-size: 13px;margin:0; white-space: nowrap; width:100%;"> {{title}} <i class="fa fa-info-circle" style="float:right;"> </i> </h4> </div> </a> </div>
27
0.771429
3
24
16ac7a0b3c2827a8ef708e9476725abaf01ad6ca
packages/re/reproject.yaml
packages/re/reproject.yaml
homepage: https://github.com/agrafix/reproject#readme changelog-type: '' hash: 841cd26df7163ddf7c9f32cbd408ee241e71a8924b16b3c8db4127b60cf35a59 test-bench-deps: base: ! '>=4.9 && <5' hspec: ! '>=2.2' reproject: -any maintainer: mail@athiemann.net synopsis: Define and combine "materialized" projections changelog: '' basic-deps: base: ! '>=4.9 && <5' labels: ! '>=0.3' template-haskell: ! '>=2.11' all-versions: - '0.1.0.0' author: Alexander Thiemann latest: '0.1.0.0' description-type: markdown description: ! '# reproject [![CircleCI](https://circleci.com/gh/agrafix/reproject.svg?style=svg)](https://circleci.com/gh/agrafix/reproject) Define and combine "materialized" projections ## Usage For examples see the test suite ' license-name: BSD3
homepage: https://github.com/agrafix/reproject#readme changelog-type: '' hash: 5a11b9061c13b344b58105939d1701cac2eb28aab2eedaf114150934cfe12605 test-bench-deps: base: ! '>=4.9 && <5' hspec: ! '>=2.2' reproject: -any maintainer: mail@athiemann.net synopsis: Define and combine "materialized" projections changelog: '' basic-deps: base: ! '>=4.9 && <5' template-haskell: ! '>=2.11' all-versions: - '0.1.0.0' - '0.2.0.0' author: Alexander Thiemann latest: '0.2.0.0' description-type: markdown description: ! '# reproject [![CircleCI](https://circleci.com/gh/agrafix/reproject.svg?style=svg)](https://circleci.com/gh/agrafix/reproject) Define and combine "materialized" projections ## Usage For examples see the test suite ' license-name: BSD3
Update from Hackage at 2017-06-16T00:55:49Z
Update from Hackage at 2017-06-16T00:55:49Z
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: https://github.com/agrafix/reproject#readme changelog-type: '' hash: 841cd26df7163ddf7c9f32cbd408ee241e71a8924b16b3c8db4127b60cf35a59 test-bench-deps: base: ! '>=4.9 && <5' hspec: ! '>=2.2' reproject: -any maintainer: mail@athiemann.net synopsis: Define and combine "materialized" projections changelog: '' basic-deps: base: ! '>=4.9 && <5' labels: ! '>=0.3' template-haskell: ! '>=2.11' all-versions: - '0.1.0.0' author: Alexander Thiemann latest: '0.1.0.0' description-type: markdown description: ! '# reproject [![CircleCI](https://circleci.com/gh/agrafix/reproject.svg?style=svg)](https://circleci.com/gh/agrafix/reproject) Define and combine "materialized" projections ## Usage For examples see the test suite ' license-name: BSD3 ## Instruction: Update from Hackage at 2017-06-16T00:55:49Z ## Code After: homepage: https://github.com/agrafix/reproject#readme changelog-type: '' hash: 5a11b9061c13b344b58105939d1701cac2eb28aab2eedaf114150934cfe12605 test-bench-deps: base: ! '>=4.9 && <5' hspec: ! '>=2.2' reproject: -any maintainer: mail@athiemann.net synopsis: Define and combine "materialized" projections changelog: '' basic-deps: base: ! '>=4.9 && <5' template-haskell: ! '>=2.11' all-versions: - '0.1.0.0' - '0.2.0.0' author: Alexander Thiemann latest: '0.2.0.0' description-type: markdown description: ! '# reproject [![CircleCI](https://circleci.com/gh/agrafix/reproject.svg?style=svg)](https://circleci.com/gh/agrafix/reproject) Define and combine "materialized" projections ## Usage For examples see the test suite ' license-name: BSD3
homepage: https://github.com/agrafix/reproject#readme changelog-type: '' - hash: 841cd26df7163ddf7c9f32cbd408ee241e71a8924b16b3c8db4127b60cf35a59 + hash: 5a11b9061c13b344b58105939d1701cac2eb28aab2eedaf114150934cfe12605 test-bench-deps: base: ! '>=4.9 && <5' hspec: ! '>=2.2' reproject: -any maintainer: mail@athiemann.net synopsis: Define and combine "materialized" projections changelog: '' basic-deps: base: ! '>=4.9 && <5' - labels: ! '>=0.3' template-haskell: ! '>=2.11' all-versions: - '0.1.0.0' + - '0.2.0.0' author: Alexander Thiemann - latest: '0.1.0.0' ? ^ + latest: '0.2.0.0' ? ^ description-type: markdown description: ! '# reproject [![CircleCI](https://circleci.com/gh/agrafix/reproject.svg?style=svg)](https://circleci.com/gh/agrafix/reproject) Define and combine "materialized" projections ## Usage For examples see the test suite ' license-name: BSD3
6
0.171429
3
3
2bb6cc4bf8fe0f09568d85ebce4e42ea899d5a69
website/package.json
website/package.json
{ "license": "MIT", "scripts": { "build": "webpack && docusaurus-build", "start": "concurrently \"docusaurus-start\" \"webpack -d -w\"", "svgo": "svgo --pretty --indent=2 --config=svgo.yml", "svgo-all": "find static | grep '\\.svg$' | xargs -Iz -n 1 yarn svgo z", "update-stable-docs": "rm -rf ./versioned_docs ./versions.json && docusaurus-version stable" }, "dependencies": { "clipboard": "2.0.6", "codemirror-graphql": "0.15.2", "lz-string": "1.4.4", "prop-types": "15.7.2", "react": "17.0.1", "react-dom": "17.0.1" }, "devDependencies": { "@babel/preset-react": "7.12.10", "@sandhose/prettier-animated-logo": "1.0.3", "babel-loader": "8.2.2", "concurrently": "5.3.0", "docusaurus": "1.14.6", "js-yaml": "4.0.0", "svgo": "1.3.2", "webpack": "5.15.0", "webpack-cli": "4.3.1" } }
{ "license": "MIT", "scripts": { "build": "webpack && docusaurus-build", "start": "concurrently \"docusaurus-start\" \"webpack --mode=development --watch\"", "svgo": "svgo --pretty --indent=2 --config=svgo.yml", "svgo-all": "find static | grep '\\.svg$' | xargs -Iz -n 1 yarn svgo z", "update-stable-docs": "rm -rf ./versioned_docs ./versions.json && docusaurus-version stable" }, "dependencies": { "clipboard": "2.0.6", "codemirror-graphql": "0.15.2", "lz-string": "1.4.4", "prop-types": "15.7.2", "react": "17.0.1", "react-dom": "17.0.1" }, "devDependencies": { "@babel/preset-react": "7.12.10", "@sandhose/prettier-animated-logo": "1.0.3", "babel-loader": "8.2.2", "concurrently": "5.3.0", "docusaurus": "1.14.6", "js-yaml": "4.0.0", "svgo": "1.3.2", "webpack": "5.15.0", "webpack-cli": "4.3.1" } }
Fix webpack 5 CLI args in `yarn start` in website
Fix webpack 5 CLI args in `yarn start` in website
JSON
mit
prettier/prettier,rattrayalex/prettier,jlongster/prettier,rattrayalex/prettier,rattrayalex/prettier,prettier/prettier,prettier/prettier,prettier/prettier
json
## Code Before: { "license": "MIT", "scripts": { "build": "webpack && docusaurus-build", "start": "concurrently \"docusaurus-start\" \"webpack -d -w\"", "svgo": "svgo --pretty --indent=2 --config=svgo.yml", "svgo-all": "find static | grep '\\.svg$' | xargs -Iz -n 1 yarn svgo z", "update-stable-docs": "rm -rf ./versioned_docs ./versions.json && docusaurus-version stable" }, "dependencies": { "clipboard": "2.0.6", "codemirror-graphql": "0.15.2", "lz-string": "1.4.4", "prop-types": "15.7.2", "react": "17.0.1", "react-dom": "17.0.1" }, "devDependencies": { "@babel/preset-react": "7.12.10", "@sandhose/prettier-animated-logo": "1.0.3", "babel-loader": "8.2.2", "concurrently": "5.3.0", "docusaurus": "1.14.6", "js-yaml": "4.0.0", "svgo": "1.3.2", "webpack": "5.15.0", "webpack-cli": "4.3.1" } } ## Instruction: Fix webpack 5 CLI args in `yarn start` in website ## Code After: { "license": "MIT", "scripts": { "build": "webpack && docusaurus-build", "start": "concurrently \"docusaurus-start\" \"webpack --mode=development --watch\"", "svgo": "svgo --pretty --indent=2 --config=svgo.yml", "svgo-all": "find static | grep '\\.svg$' | xargs -Iz -n 1 yarn svgo z", "update-stable-docs": "rm -rf ./versioned_docs ./versions.json && docusaurus-version stable" }, "dependencies": { "clipboard": "2.0.6", "codemirror-graphql": "0.15.2", "lz-string": "1.4.4", "prop-types": "15.7.2", "react": "17.0.1", "react-dom": "17.0.1" }, "devDependencies": { "@babel/preset-react": "7.12.10", "@sandhose/prettier-animated-logo": "1.0.3", "babel-loader": "8.2.2", "concurrently": "5.3.0", "docusaurus": "1.14.6", "js-yaml": "4.0.0", "svgo": "1.3.2", "webpack": "5.15.0", "webpack-cli": "4.3.1" } }
{ "license": "MIT", "scripts": { "build": "webpack && docusaurus-build", - "start": "concurrently \"docusaurus-start\" \"webpack -d -w\"", + "start": "concurrently \"docusaurus-start\" \"webpack --mode=development --watch\"", ? +++ +++++++++++++ + ++++ "svgo": "svgo --pretty --indent=2 --config=svgo.yml", "svgo-all": "find static | grep '\\.svg$' | xargs -Iz -n 1 yarn svgo z", "update-stable-docs": "rm -rf ./versioned_docs ./versions.json && docusaurus-version stable" }, "dependencies": { "clipboard": "2.0.6", "codemirror-graphql": "0.15.2", "lz-string": "1.4.4", "prop-types": "15.7.2", "react": "17.0.1", "react-dom": "17.0.1" }, "devDependencies": { "@babel/preset-react": "7.12.10", "@sandhose/prettier-animated-logo": "1.0.3", "babel-loader": "8.2.2", "concurrently": "5.3.0", "docusaurus": "1.14.6", "js-yaml": "4.0.0", "svgo": "1.3.2", "webpack": "5.15.0", "webpack-cli": "4.3.1" } }
2
0.068966
1
1
379ea0e439f265ff21485836a206ca0928130477
package.json
package.json
{ "name": "e2e-bridge-cli", "version": "1.1.0", "scripts": { "start": "node app.js" }, "bin": { "e2ebridge": "./app.js" }, "dependencies": { "e2e-bridge-lib": "1.1.0", "minimist": "0.0.8", "prompt": "~0.2.12" }, "author": { "name": "E2E Technologies Ltd", "email": "support@e2ebridge.com" }, "maintainers": [ { "name": "Jakub Zakrzewski", "email": "jzakrzewski@e2ebridge.ch" } ], "license": "MIT", "description": "CLI interface to E2E Bridge", "keywords": [ "cli", "e2e" ], "repository": { "type": "git", "url": "https://github.com/e2ebridge/e2e-bridge-cli.git" } }
{ "name": "e2e-bridge-cli", "version": "1.1.0", "scripts": { "start": "node app.js" }, "bin": { "e2ebridge": "./app.js" }, "dependencies": { "e2e-bridge-lib": "1.2.0", "minimist": "0.0.8", "prompt": "~0.2.12" }, "author": { "name": "Scheer E2E AG", "email": "support@e2ebridge.com" }, "maintainers": [ { "name": "Jakub Zakrzewski", "email": "jzakrzewski@e2ebridge.ch" } ], "license": "MIT", "description": "CLI interface to E2E Bridge", "keywords": [ "cli", "e2e" ], "repository": { "type": "git", "url": "https://github.com/e2ebridge/e2e-bridge-cli.git" } }
Update e2e-bridge-lib version to 1.2.0
Update e2e-bridge-lib version to 1.2.0
JSON
mit
e2ebridge/e2e-bridge-cli
json
## Code Before: { "name": "e2e-bridge-cli", "version": "1.1.0", "scripts": { "start": "node app.js" }, "bin": { "e2ebridge": "./app.js" }, "dependencies": { "e2e-bridge-lib": "1.1.0", "minimist": "0.0.8", "prompt": "~0.2.12" }, "author": { "name": "E2E Technologies Ltd", "email": "support@e2ebridge.com" }, "maintainers": [ { "name": "Jakub Zakrzewski", "email": "jzakrzewski@e2ebridge.ch" } ], "license": "MIT", "description": "CLI interface to E2E Bridge", "keywords": [ "cli", "e2e" ], "repository": { "type": "git", "url": "https://github.com/e2ebridge/e2e-bridge-cli.git" } } ## Instruction: Update e2e-bridge-lib version to 1.2.0 ## Code After: { "name": "e2e-bridge-cli", "version": "1.1.0", "scripts": { "start": "node app.js" }, "bin": { "e2ebridge": "./app.js" }, "dependencies": { "e2e-bridge-lib": "1.2.0", "minimist": "0.0.8", "prompt": "~0.2.12" }, "author": { "name": "Scheer E2E AG", "email": "support@e2ebridge.com" }, "maintainers": [ { "name": "Jakub Zakrzewski", "email": "jzakrzewski@e2ebridge.ch" } ], "license": "MIT", "description": "CLI interface to E2E Bridge", "keywords": [ "cli", "e2e" ], "repository": { "type": "git", "url": "https://github.com/e2ebridge/e2e-bridge-cli.git" } }
{ "name": "e2e-bridge-cli", "version": "1.1.0", "scripts": { "start": "node app.js" }, "bin": { "e2ebridge": "./app.js" }, "dependencies": { - "e2e-bridge-lib": "1.1.0", ? ^ + "e2e-bridge-lib": "1.2.0", ? ^ "minimist": "0.0.8", "prompt": "~0.2.12" }, "author": { - "name": "E2E Technologies Ltd", + "name": "Scheer E2E AG", "email": "support@e2ebridge.com" }, "maintainers": [ { "name": "Jakub Zakrzewski", "email": "jzakrzewski@e2ebridge.ch" } ], "license": "MIT", "description": "CLI interface to E2E Bridge", "keywords": [ "cli", "e2e" ], "repository": { "type": "git", "url": "https://github.com/e2ebridge/e2e-bridge-cli.git" } }
4
0.114286
2
2
5577ad92d2e9f7c4f40fa20be11c62dcc9a4f48c
incuna-sass/mixins/_sprites.sass
incuna-sass/mixins/_sprites.sass
$sprites-1x: sprite-map("1x/sprite-files/*.png", $layout: smart) $sprites-2x: sprite-map("2x/sprite-files/*.png", $spacing: 5px) @mixin sprite-1x background: image: sprite-url($sprites-1x) repeat: no-repeat @mixin sprite-2x @include media($hidpi) background: image: sprite-url($sprites-2x) repeat: no-repeat %sprite-1x @include sprite-1x %sprite-2x @include sprite-2x @mixin sprite($name, $use-mixin: false) @if $use-mixin @include sprite-1x @include sprite-2x @else @extend %sprite-1x @extend %sprite-2x width: image-width(sprite-file($sprites-1x, $name)) height: image-height(sprite-file($sprites-1x, $name)) background: position: sprite-position($sprites-1x, $name) @include media($hidpi) $position: sprite-position($sprites-2x, $name) background: position: round(nth($position, 1) / 2) round(nth($position, 2) / 2) @include background-size(round(image-width(sprite-path($sprites-2x)) / 2) auto)
$sprites-1x: sprite-map("1x/sprite-files/*.png", $layout: smart) $sprites-2x: sprite-map("2x/sprite-files/*.png", $spacing: 5px) @mixin sprite-1x background: image: sprite-url($sprites-1x) repeat: no-repeat @mixin sprite-2x @include media($hidpi) background: image: sprite-url($sprites-2x) repeat: no-repeat %sprite-1x @include sprite-1x %sprite-2x @include sprite-2x @mixin sprite($name, $use-mixin: false) @if $use-mixin @include sprite-1x @include sprite-2x @else @extend %sprite-1x @extend %sprite-2x width: image-width(sprite-file($sprites-1x, $name)) height: image-height(sprite-file($sprites-1x, $name)) background: position: sprite-position($sprites-1x, $name) @include media($hidpi) $position: sprite-position($sprites-2x, $name) background: position: ceil(nth($position, 1) / 2) ceil(nth($position, 2) / 2) @include background-size(ceil(image-width(sprite-path($sprites-2x)) / 2) auto)
Revert "Round 2x sprite values instead of ceiling them."
Revert "Round 2x sprite values instead of ceiling them." This reverts commit f8a714ff1cdc51bcf81bb1003d08a366573a036b.
Sass
mit
incuna/incuna-sass
sass
## Code Before: $sprites-1x: sprite-map("1x/sprite-files/*.png", $layout: smart) $sprites-2x: sprite-map("2x/sprite-files/*.png", $spacing: 5px) @mixin sprite-1x background: image: sprite-url($sprites-1x) repeat: no-repeat @mixin sprite-2x @include media($hidpi) background: image: sprite-url($sprites-2x) repeat: no-repeat %sprite-1x @include sprite-1x %sprite-2x @include sprite-2x @mixin sprite($name, $use-mixin: false) @if $use-mixin @include sprite-1x @include sprite-2x @else @extend %sprite-1x @extend %sprite-2x width: image-width(sprite-file($sprites-1x, $name)) height: image-height(sprite-file($sprites-1x, $name)) background: position: sprite-position($sprites-1x, $name) @include media($hidpi) $position: sprite-position($sprites-2x, $name) background: position: round(nth($position, 1) / 2) round(nth($position, 2) / 2) @include background-size(round(image-width(sprite-path($sprites-2x)) / 2) auto) ## Instruction: Revert "Round 2x sprite values instead of ceiling them." This reverts commit f8a714ff1cdc51bcf81bb1003d08a366573a036b. ## Code After: $sprites-1x: sprite-map("1x/sprite-files/*.png", $layout: smart) $sprites-2x: sprite-map("2x/sprite-files/*.png", $spacing: 5px) @mixin sprite-1x background: image: sprite-url($sprites-1x) repeat: no-repeat @mixin sprite-2x @include media($hidpi) background: image: sprite-url($sprites-2x) repeat: no-repeat %sprite-1x @include sprite-1x %sprite-2x @include sprite-2x @mixin sprite($name, $use-mixin: false) @if $use-mixin @include sprite-1x @include sprite-2x @else @extend %sprite-1x @extend %sprite-2x width: image-width(sprite-file($sprites-1x, $name)) height: image-height(sprite-file($sprites-1x, $name)) background: position: sprite-position($sprites-1x, $name) @include media($hidpi) $position: sprite-position($sprites-2x, $name) background: position: ceil(nth($position, 1) / 2) ceil(nth($position, 2) / 2) @include background-size(ceil(image-width(sprite-path($sprites-2x)) / 2) auto)
$sprites-1x: sprite-map("1x/sprite-files/*.png", $layout: smart) $sprites-2x: sprite-map("2x/sprite-files/*.png", $spacing: 5px) @mixin sprite-1x background: image: sprite-url($sprites-1x) repeat: no-repeat @mixin sprite-2x @include media($hidpi) background: image: sprite-url($sprites-2x) repeat: no-repeat %sprite-1x @include sprite-1x %sprite-2x @include sprite-2x @mixin sprite($name, $use-mixin: false) @if $use-mixin @include sprite-1x @include sprite-2x @else @extend %sprite-1x @extend %sprite-2x width: image-width(sprite-file($sprites-1x, $name)) height: image-height(sprite-file($sprites-1x, $name)) background: position: sprite-position($sprites-1x, $name) @include media($hidpi) $position: sprite-position($sprites-2x, $name) background: - position: round(nth($position, 1) / 2) round(nth($position, 2) / 2) ? ^^^^^ ^^^^^ + position: ceil(nth($position, 1) / 2) ceil(nth($position, 2) / 2) ? ^^^^ ^^^^ - @include background-size(round(image-width(sprite-path($sprites-2x)) / 2) auto) ? ^^^^^ + @include background-size(ceil(image-width(sprite-path($sprites-2x)) / 2) auto) ? ^^^^
4
0.111111
2
2
0bb6d7f97e151a29af8fd5af21641fe4d348ba21
src/encoded/tests/data/inserts/reference_epigenome.json
src/encoded/tests/data/inserts/reference_epigenome.json
[ { "_test": "reference epigenome", "accession": "ENCSR300EPI", "aliases": ["john-stamatoyannopoulos:RE1", "john-stamatoyannopoulos:RE2"], "award": "ENCODE2", "description": "Reference epigenome of the K562 cell line.", "lab": "bradley-bernstein", "status": "released", "submitted_by": "facilisi.tristique@potenti.vivamus", "related_datasets": [ "/experiments/ENCSR001EPI", "/experiments/ENCSR002EPI", "/experiments/ENCSR003EPI", "/experiments/ENCSR004EPI", "/experiments/ENCSR005EPI", "/experiments/ENCSR006EPI", "/experiments/ENCSR007EPI", "/experiments/ENCSR008EPI", "/experiments/ENCSR009EPI", "/experiments/ENCSR374GSQ" ], "uuid": "7ae7b199-e881-4906-b977-2b1b62de70f7" } ]
[ { "_test": "reference epigenome", "accession": "ENCSR300EPI", "award": "ENCODE2", "description": "Reference epigenome of the K562 cell line.", "lab": "bradley-bernstein", "status": "released", "submitted_by": "facilisi.tristique@potenti.vivamus", "related_datasets": [ "/experiments/ENCSR001EPI", "/experiments/ENCSR002EPI", "/experiments/ENCSR003EPI", "/experiments/ENCSR004EPI", "/experiments/ENCSR005EPI", "/experiments/ENCSR006EPI", "/experiments/ENCSR007EPI", "/experiments/ENCSR008EPI", "/experiments/ENCSR009EPI" ], "uuid": "7ae7b199-e881-4906-b977-2b1b62de70f7" } ]
Remove temporary changes to test data
Remove temporary changes to test data
JSON
mit
hms-dbmi/fourfront,hms-dbmi/fourfront,T2DREAM/t2dream-portal,ENCODE-DCC/snovault,T2DREAM/t2dream-portal,hms-dbmi/fourfront,ENCODE-DCC/encoded,ENCODE-DCC/snovault,ENCODE-DCC/snovault,T2DREAM/t2dream-portal,4dn-dcic/fourfront,4dn-dcic/fourfront,hms-dbmi/fourfront,ENCODE-DCC/encoded,4dn-dcic/fourfront,4dn-dcic/fourfront,ENCODE-DCC/snovault,T2DREAM/t2dream-portal,hms-dbmi/fourfront,ENCODE-DCC/snovault,ENCODE-DCC/encoded,ENCODE-DCC/encoded
json
## Code Before: [ { "_test": "reference epigenome", "accession": "ENCSR300EPI", "aliases": ["john-stamatoyannopoulos:RE1", "john-stamatoyannopoulos:RE2"], "award": "ENCODE2", "description": "Reference epigenome of the K562 cell line.", "lab": "bradley-bernstein", "status": "released", "submitted_by": "facilisi.tristique@potenti.vivamus", "related_datasets": [ "/experiments/ENCSR001EPI", "/experiments/ENCSR002EPI", "/experiments/ENCSR003EPI", "/experiments/ENCSR004EPI", "/experiments/ENCSR005EPI", "/experiments/ENCSR006EPI", "/experiments/ENCSR007EPI", "/experiments/ENCSR008EPI", "/experiments/ENCSR009EPI", "/experiments/ENCSR374GSQ" ], "uuid": "7ae7b199-e881-4906-b977-2b1b62de70f7" } ] ## Instruction: Remove temporary changes to test data ## Code After: [ { "_test": "reference epigenome", "accession": "ENCSR300EPI", "award": "ENCODE2", "description": "Reference epigenome of the K562 cell line.", "lab": "bradley-bernstein", "status": "released", "submitted_by": "facilisi.tristique@potenti.vivamus", "related_datasets": [ "/experiments/ENCSR001EPI", "/experiments/ENCSR002EPI", "/experiments/ENCSR003EPI", "/experiments/ENCSR004EPI", "/experiments/ENCSR005EPI", "/experiments/ENCSR006EPI", "/experiments/ENCSR007EPI", "/experiments/ENCSR008EPI", "/experiments/ENCSR009EPI" ], "uuid": "7ae7b199-e881-4906-b977-2b1b62de70f7" } ]
[ { "_test": "reference epigenome", "accession": "ENCSR300EPI", - "aliases": ["john-stamatoyannopoulos:RE1", "john-stamatoyannopoulos:RE2"], "award": "ENCODE2", "description": "Reference epigenome of the K562 cell line.", "lab": "bradley-bernstein", "status": "released", "submitted_by": "facilisi.tristique@potenti.vivamus", "related_datasets": [ "/experiments/ENCSR001EPI", "/experiments/ENCSR002EPI", "/experiments/ENCSR003EPI", "/experiments/ENCSR004EPI", "/experiments/ENCSR005EPI", "/experiments/ENCSR006EPI", "/experiments/ENCSR007EPI", "/experiments/ENCSR008EPI", - "/experiments/ENCSR009EPI", ? - + "/experiments/ENCSR009EPI" - "/experiments/ENCSR374GSQ" ], "uuid": "7ae7b199-e881-4906-b977-2b1b62de70f7" } ]
4
0.16
1
3
755ee12611927ab1c59aad87b9ae2b0fdc26101a
README.md
README.md
A tiny application to host temporary short-URLs with expiration date in-memory.
A tiny application to host temporary short-URLs with expiration date in-memory. ## Build Status Develop: [![Build Status](https://travis-ci.org/MrShoenel/node-temporary-short-urls.svg?branch=develop)](https://travis-ci.org/MrShoenel/node-temporary-short-urls) Master: [![Build Status](https://travis-ci.org/MrShoenel/node-temporary-short-urls.svg?branch=master)](https://travis-ci.org/MrShoenel/node-temporary-short-urls)
Update readme.md with build-status images
Update readme.md with build-status images
Markdown
mit
MrShoenel/node-temporary-short-urls,MrShoenel/node-temporary-short-urls
markdown
## Code Before: A tiny application to host temporary short-URLs with expiration date in-memory. ## Instruction: Update readme.md with build-status images ## Code After: A tiny application to host temporary short-URLs with expiration date in-memory. ## Build Status Develop: [![Build Status](https://travis-ci.org/MrShoenel/node-temporary-short-urls.svg?branch=develop)](https://travis-ci.org/MrShoenel/node-temporary-short-urls) Master: [![Build Status](https://travis-ci.org/MrShoenel/node-temporary-short-urls.svg?branch=master)](https://travis-ci.org/MrShoenel/node-temporary-short-urls)
A tiny application to host temporary short-URLs with expiration date in-memory. + + ## Build Status + + Develop: [![Build Status](https://travis-ci.org/MrShoenel/node-temporary-short-urls.svg?branch=develop)](https://travis-ci.org/MrShoenel/node-temporary-short-urls) + Master: [![Build Status](https://travis-ci.org/MrShoenel/node-temporary-short-urls.svg?branch=master)](https://travis-ci.org/MrShoenel/node-temporary-short-urls)
5
5
5
0
eb418ed88c57243450dfbeeac55a015d0a842f56
lib/validator/sfValidatorEmail.class.php
lib/validator/sfValidatorEmail.class.php
<?php /* * This file is part of the symfony package. * (c) Fabien Potencier <fabien.potencier@symfony-project.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * sfValidatorEmail validates emails. * * @package symfony * @subpackage validator * @author Fabien Potencier <fabien.potencier@symfony-project.com> * @version SVN: $Id$ */ class sfValidatorEmail extends sfValidatorRegex { const REGEX_EMAIL = '/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i'; /** * @see sfValidatorRegex */ protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->setOption('pattern', self::REGEX_EMAIL); } }
<?php /* * This file is part of the symfony package. * (c) Fabien Potencier <fabien.potencier@symfony-project.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * sfValidatorEmail validates emails. * * @package symfony * @subpackage validator * @author Fabien Potencier <fabien.potencier@symfony-project.com> * @version SVN: $Id$ */ class sfValidatorEmail extends sfValidatorRegex { const REGEX_EMAIL = '/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i'; /** * @see sfValidatorRegex */ protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->setOption('pattern', self::REGEX_EMAIL); $this->addOption('check_domain', false); } protected function doClean($value) { $clean = parent::doClean($value); if ($this->getOption('check_domain') && function_exists('checkdnsrr')) { $tokens = explode('@', $clean); if (!checkdnsrr($tokens[1], 'MX') && !checkdnsrr($tokens[1], 'A')) { throw new sfValidatorError($this, 'invalid', array('value' => $clean)); } } return $clean; } }
Add support for MX validation in sfValidatorEmail
Add support for MX validation in sfValidatorEmail
PHP
mit
sabaki-dev/symfony1,sabaki-dev/symfony1,sabaki-dev/symfony1
php
## Code Before: <?php /* * This file is part of the symfony package. * (c) Fabien Potencier <fabien.potencier@symfony-project.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * sfValidatorEmail validates emails. * * @package symfony * @subpackage validator * @author Fabien Potencier <fabien.potencier@symfony-project.com> * @version SVN: $Id$ */ class sfValidatorEmail extends sfValidatorRegex { const REGEX_EMAIL = '/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i'; /** * @see sfValidatorRegex */ protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->setOption('pattern', self::REGEX_EMAIL); } } ## Instruction: Add support for MX validation in sfValidatorEmail ## Code After: <?php /* * This file is part of the symfony package. * (c) Fabien Potencier <fabien.potencier@symfony-project.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * sfValidatorEmail validates emails. * * @package symfony * @subpackage validator * @author Fabien Potencier <fabien.potencier@symfony-project.com> * @version SVN: $Id$ */ class sfValidatorEmail extends sfValidatorRegex { const REGEX_EMAIL = '/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i'; /** * @see sfValidatorRegex */ protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->setOption('pattern', self::REGEX_EMAIL); $this->addOption('check_domain', false); } protected function doClean($value) { $clean = parent::doClean($value); if ($this->getOption('check_domain') && function_exists('checkdnsrr')) { $tokens = explode('@', $clean); if (!checkdnsrr($tokens[1], 'MX') && !checkdnsrr($tokens[1], 'A')) { throw new sfValidatorError($this, 'invalid', array('value' => $clean)); } } return $clean; } }
<?php /* * This file is part of the symfony package. * (c) Fabien Potencier <fabien.potencier@symfony-project.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * sfValidatorEmail validates emails. * * @package symfony * @subpackage validator * @author Fabien Potencier <fabien.potencier@symfony-project.com> * @version SVN: $Id$ */ class sfValidatorEmail extends sfValidatorRegex { const REGEX_EMAIL = '/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i'; /** * @see sfValidatorRegex */ protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->setOption('pattern', self::REGEX_EMAIL); + $this->addOption('check_domain', false); + } + + protected function doClean($value) + { + $clean = parent::doClean($value); + + if ($this->getOption('check_domain') && function_exists('checkdnsrr')) + { + $tokens = explode('@', $clean); + if (!checkdnsrr($tokens[1], 'MX') && !checkdnsrr($tokens[1], 'A')) + { + throw new sfValidatorError($this, 'invalid', array('value' => $clean)); + } + } + + return $clean; } }
17
0.53125
17
0
bd4c59e37c95e8b6b6c23ddcf5af3357a1b1de98
app/src/main/res/layout/fragment_main.xml
app/src/main/res/layout/fragment_main.xml
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/content" android:background="#99575757"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:gravity="center" android:textColor="#ff007223" android:text="@string/no_bar_selected"/> </RelativeLayout>
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/content" android:background="#99575757"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:gravity="center" android:textColor="#ff007223" android:textSize="@dimen/conversion_text" android:text="@string/no_bar_selected"/> </RelativeLayout>
Increase text size for description.
Increase text size for description.
XML
apache-2.0
jsho32/Conversion-Calculator-Android,jsho32/Conversion-Calculator-Android,jsho32/Conversion-Calculator-Android
xml
## Code Before: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/content" android:background="#99575757"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:gravity="center" android:textColor="#ff007223" android:text="@string/no_bar_selected"/> </RelativeLayout> ## Instruction: Increase text size for description. ## Code After: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/content" android:background="#99575757"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:gravity="center" android:textColor="#ff007223" android:textSize="@dimen/conversion_text" android:text="@string/no_bar_selected"/> </RelativeLayout>
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/content" android:background="#99575757"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:gravity="center" android:textColor="#ff007223" + android:textSize="@dimen/conversion_text" android:text="@string/no_bar_selected"/> </RelativeLayout>
1
0.058824
1
0
9608ea347ff5a5e898ea62b267acfaabe41ec2b8
src/main/groovy/whelk/converter/marc/MarcFrameCli.groovy
src/main/groovy/whelk/converter/marc/MarcFrameCli.groovy
package whelk.converter.marc List fpaths def cmd = "convert" if (args.length > 1) { cmd = args[0] fpaths = args[1..-1] } else { fpaths = args[0..-1] } def converter = new MarcFrameConverter() for (fpath in fpaths) { def source = converter.mapper.readValue(new File(fpath), Map) def result = null if (cmd == "revert") { result = converter.runRevert(source) } else { def extraData = null result = converter.runConvert(source, fpath, extraData) } if (fpaths.size() > 1) println "SOURCE: ${fpath}" try { println converter.mapper.writeValueAsString(result) } catch (e) { System.err.println "Error in result:" System.err.println result throw e } }
package whelk.converter.marc import whelk.component.PostgreSQLComponent import whelk.filter.LinkFinder List fpaths def cmd = "convert" if (args.length > 1) { cmd = args[0] fpaths = args[1..-1] } else { fpaths = args[0..-1] } def converter = new MarcFrameConverter() def addLinkFinder(converter) { if (converter.linkFinder) return def whelkname = "whelk_dev" def pgsql = whelkname ? new PostgreSQLComponent("jdbc:postgresql:$whelkname", "lddb"): null def linkFinder = pgsql ? new LinkFinder(pgsql) : null converter.linkFinder = linkFinder } for (fpath in fpaths) { def source = converter.mapper.readValue(new File(fpath), Map) def result = null if (cmd == "revert") { result = converter.runRevert(source) } else { def extraData = null if (source.oaipmhSetSpecs) { addLinkFinder(converter) extraData= [oaipmhSetSpecs: source.remove('oaipmhSetSpecs')] } result = converter.runConvert(source, fpath, extraData) } if (fpaths.size() > 1) println "SOURCE: ${fpath}" try { println converter.mapper.writeValueAsString(result) } catch (e) { System.err.println "Error in result:" System.err.println result throw e } }
Add support use of local LinkFinder if oaipmhSetSpecs are given in the input
Add support use of local LinkFinder if oaipmhSetSpecs are given in the input
Groovy
apache-2.0
libris/librisxl,libris/librisxl,libris/librisxl
groovy
## Code Before: package whelk.converter.marc List fpaths def cmd = "convert" if (args.length > 1) { cmd = args[0] fpaths = args[1..-1] } else { fpaths = args[0..-1] } def converter = new MarcFrameConverter() for (fpath in fpaths) { def source = converter.mapper.readValue(new File(fpath), Map) def result = null if (cmd == "revert") { result = converter.runRevert(source) } else { def extraData = null result = converter.runConvert(source, fpath, extraData) } if (fpaths.size() > 1) println "SOURCE: ${fpath}" try { println converter.mapper.writeValueAsString(result) } catch (e) { System.err.println "Error in result:" System.err.println result throw e } } ## Instruction: Add support use of local LinkFinder if oaipmhSetSpecs are given in the input ## Code After: package whelk.converter.marc import whelk.component.PostgreSQLComponent import whelk.filter.LinkFinder List fpaths def cmd = "convert" if (args.length > 1) { cmd = args[0] fpaths = args[1..-1] } else { fpaths = args[0..-1] } def converter = new MarcFrameConverter() def addLinkFinder(converter) { if (converter.linkFinder) return def whelkname = "whelk_dev" def pgsql = whelkname ? new PostgreSQLComponent("jdbc:postgresql:$whelkname", "lddb"): null def linkFinder = pgsql ? new LinkFinder(pgsql) : null converter.linkFinder = linkFinder } for (fpath in fpaths) { def source = converter.mapper.readValue(new File(fpath), Map) def result = null if (cmd == "revert") { result = converter.runRevert(source) } else { def extraData = null if (source.oaipmhSetSpecs) { addLinkFinder(converter) extraData= [oaipmhSetSpecs: source.remove('oaipmhSetSpecs')] } result = converter.runConvert(source, fpath, extraData) } if (fpaths.size() > 1) println "SOURCE: ${fpath}" try { println converter.mapper.writeValueAsString(result) } catch (e) { System.err.println "Error in result:" System.err.println result throw e } }
package whelk.converter.marc + + import whelk.component.PostgreSQLComponent + import whelk.filter.LinkFinder List fpaths def cmd = "convert" if (args.length > 1) { cmd = args[0] fpaths = args[1..-1] } else { fpaths = args[0..-1] } def converter = new MarcFrameConverter() + def addLinkFinder(converter) { + if (converter.linkFinder) + return + def whelkname = "whelk_dev" + def pgsql = whelkname ? new PostgreSQLComponent("jdbc:postgresql:$whelkname", "lddb"): null + def linkFinder = pgsql ? new LinkFinder(pgsql) : null + converter.linkFinder = linkFinder + } + for (fpath in fpaths) { def source = converter.mapper.readValue(new File(fpath), Map) def result = null if (cmd == "revert") { result = converter.runRevert(source) } else { def extraData = null + if (source.oaipmhSetSpecs) { + addLinkFinder(converter) + extraData= [oaipmhSetSpecs: source.remove('oaipmhSetSpecs')] + } result = converter.runConvert(source, fpath, extraData) } if (fpaths.size() > 1) println "SOURCE: ${fpath}" try { println converter.mapper.writeValueAsString(result) } catch (e) { System.err.println "Error in result:" System.err.println result throw e } }
16
0.470588
16
0
f9d27848d777dcbb4d4fb0f30fc4fea0377ca9dc
home/.shared_env.d/golang.sh
home/.shared_env.d/golang.sh
export GOROOT=/usr/local/opt/go/libexec # Add GOROOT bin to path PATH=$PATH:$GOROOT/bin # $GOPATH # # In order to separate go projects from whatever particular install method is # being used at any time, $GOPATH and everything related to it are set to # $HOME/.go with the intention that symlinks are created in external # directories that need to be aware of where something in $GOPATH is located. export GOPATH=$HOME/.go export GOBIN=$GOPATH/bin # Add all $GOPATH/bin directories. # # Snippet via: https://code.google.com/p/go-wiki/wiki/GOPATH PATH=$PATH:${GOPATH//://bin:}/bin export PATH
export GOPATH=$HOME/.go export GOBIN=$GOPATH/bin # Add all $GOPATH/bin directories. # # Snippet via: https://code.google.com/p/go-wiki/wiki/GOPATH PATH=$PATH:${GOPATH//://bin:}/bin export PATH
Remove `$GOROOT` from environment initialization.
Remove `$GOROOT` from environment initialization. This variable should not be needed anymore since it now only overrides the value of `go env GOROOT`, which should return the correct value for the installation.
Shell
mit
alphabetum/dotfiles,alphabetum/dotfiles,alphabetum/dotfiles,alphabetum/dotfiles
shell
## Code Before: export GOROOT=/usr/local/opt/go/libexec # Add GOROOT bin to path PATH=$PATH:$GOROOT/bin # $GOPATH # # In order to separate go projects from whatever particular install method is # being used at any time, $GOPATH and everything related to it are set to # $HOME/.go with the intention that symlinks are created in external # directories that need to be aware of where something in $GOPATH is located. export GOPATH=$HOME/.go export GOBIN=$GOPATH/bin # Add all $GOPATH/bin directories. # # Snippet via: https://code.google.com/p/go-wiki/wiki/GOPATH PATH=$PATH:${GOPATH//://bin:}/bin export PATH ## Instruction: Remove `$GOROOT` from environment initialization. This variable should not be needed anymore since it now only overrides the value of `go env GOROOT`, which should return the correct value for the installation. ## Code After: export GOPATH=$HOME/.go export GOBIN=$GOPATH/bin # Add all $GOPATH/bin directories. # # Snippet via: https://code.google.com/p/go-wiki/wiki/GOPATH PATH=$PATH:${GOPATH//://bin:}/bin export PATH
- export GOROOT=/usr/local/opt/go/libexec - # Add GOROOT bin to path - PATH=$PATH:$GOROOT/bin - - # $GOPATH - # - # In order to separate go projects from whatever particular install method is - # being used at any time, $GOPATH and everything related to it are set to - # $HOME/.go with the intention that symlinks are created in external - # directories that need to be aware of where something in $GOPATH is located. export GOPATH=$HOME/.go export GOBIN=$GOPATH/bin # Add all $GOPATH/bin directories. # # Snippet via: https://code.google.com/p/go-wiki/wiki/GOPATH PATH=$PATH:${GOPATH//://bin:}/bin export PATH
10
0.555556
0
10
f458ce59018013b751498c7e78afa635d166ba56
wp-content/themes/bullettshop/atriangle/atc-modals.php
wp-content/themes/bullettshop/atriangle/atc-modals.php
<?php function ipadPopUpScript(){ ?> jQuery("a[href$='http://bullettstoreat.wpengine.com/p/ipad-magazine-subscription/']").attr('data-reveal-id', 'ipadPopUp'); <?php } function ipadPopUpModal(){ ?> jQuery('#colophon').after('<div id="ipadPopUp" class="reveal-modal"><h2>We'+ 'are opening a new tab.</h2><p class="lead">The following link will open a'+ ' new window to the iTunes AppStore. You can subscribe to the Bullett maga'+ 'zine from there.</p><p>If you have any items in your shopping cart, they '+ 'won\'t go anywhere (as long as you don\'t close the window).</p><a href="'+ 'https://itunes.apple.com/us/app/bullett/id557294227?mt=8" class="button" '+ 'target="_blank"><\/a><a class="close-reveal-modal">&#215;<\/a><\/div>'); <?php } function PopUpModal(){ ?> <script> ipadPopUpScript(); ipadPopUpModal(); </script> <?php } add_action('wp_footer', 'PopUpModal', 33); ?>
<?php function ipadPopUpScript(){ ?> jQuery("a[href$='http://bullettstoreat.wpengine.com/p/ipad-magazine-subscription/']").attr('data-reveal-id', 'ipadPopUp'); <?php } function ipadPopUpModal(){ ?> jQuery('#colophon').after('<div id="ipadPopUp" class="reveal-modal"><h2>We'+ 'are opening a new tab.</h2><p class="lead">The following link will open a'+ ' new window to the iTunes AppStore. You can subscribe to the Bullett maga'+ 'zine from there.</p><p>If you have any items in your shopping cart, they '+ 'won\'t go anywhere (as long as you don\'t close the window).</p><a href="'+ 'https://itunes.apple.com/us/app/bullett/id557294227?mt=8" class="button" '+ 'target="_blank"><\/a><a class="close-reveal-modal">&#215;<\/a><\/div>'); <?php } function PopUpModal(){ ?> <script> <?php ipadPopUpScript(); ?> <?php ipadPopUpModal(); ?> </script> <?php } add_action('wp_footer', 'PopUpModal', 33); ?>
Add modal for ipad links
Add modal for ipad links
PHP
mit
rememberlenny/Candid-Commerce-WP-Theme,rememberlenny/Candid-Commerce-WP-Theme,rememberlenny/Candid-Commerce-WP-Theme
php
## Code Before: <?php function ipadPopUpScript(){ ?> jQuery("a[href$='http://bullettstoreat.wpengine.com/p/ipad-magazine-subscription/']").attr('data-reveal-id', 'ipadPopUp'); <?php } function ipadPopUpModal(){ ?> jQuery('#colophon').after('<div id="ipadPopUp" class="reveal-modal"><h2>We'+ 'are opening a new tab.</h2><p class="lead">The following link will open a'+ ' new window to the iTunes AppStore. You can subscribe to the Bullett maga'+ 'zine from there.</p><p>If you have any items in your shopping cart, they '+ 'won\'t go anywhere (as long as you don\'t close the window).</p><a href="'+ 'https://itunes.apple.com/us/app/bullett/id557294227?mt=8" class="button" '+ 'target="_blank"><\/a><a class="close-reveal-modal">&#215;<\/a><\/div>'); <?php } function PopUpModal(){ ?> <script> ipadPopUpScript(); ipadPopUpModal(); </script> <?php } add_action('wp_footer', 'PopUpModal', 33); ?> ## Instruction: Add modal for ipad links ## Code After: <?php function ipadPopUpScript(){ ?> jQuery("a[href$='http://bullettstoreat.wpengine.com/p/ipad-magazine-subscription/']").attr('data-reveal-id', 'ipadPopUp'); <?php } function ipadPopUpModal(){ ?> jQuery('#colophon').after('<div id="ipadPopUp" class="reveal-modal"><h2>We'+ 'are opening a new tab.</h2><p class="lead">The following link will open a'+ ' new window to the iTunes AppStore. You can subscribe to the Bullett maga'+ 'zine from there.</p><p>If you have any items in your shopping cart, they '+ 'won\'t go anywhere (as long as you don\'t close the window).</p><a href="'+ 'https://itunes.apple.com/us/app/bullett/id557294227?mt=8" class="button" '+ 'target="_blank"><\/a><a class="close-reveal-modal">&#215;<\/a><\/div>'); <?php } function PopUpModal(){ ?> <script> <?php ipadPopUpScript(); ?> <?php ipadPopUpModal(); ?> </script> <?php } add_action('wp_footer', 'PopUpModal', 33); ?>
<?php function ipadPopUpScript(){ ?> jQuery("a[href$='http://bullettstoreat.wpengine.com/p/ipad-magazine-subscription/']").attr('data-reveal-id', 'ipadPopUp'); <?php } function ipadPopUpModal(){ ?> jQuery('#colophon').after('<div id="ipadPopUp" class="reveal-modal"><h2>We'+ 'are opening a new tab.</h2><p class="lead">The following link will open a'+ ' new window to the iTunes AppStore. You can subscribe to the Bullett maga'+ 'zine from there.</p><p>If you have any items in your shopping cart, they '+ 'won\'t go anywhere (as long as you don\'t close the window).</p><a href="'+ 'https://itunes.apple.com/us/app/bullett/id557294227?mt=8" class="button" '+ 'target="_blank"><\/a><a class="close-reveal-modal">&#215;<\/a><\/div>'); <?php } function PopUpModal(){ ?> <script> - ipadPopUpScript(); + <?php ipadPopUpScript(); ?> ? ++++++ +++ - ipadPopUpModal(); + <?php ipadPopUpModal(); ?> ? ++++++ +++ </script> <?php } add_action('wp_footer', 'PopUpModal', 33); ?>
4
0.125
2
2
9893c909b08b1476865565c6002298aa31699975
resources/lang/en-SP.yml
resources/lang/en-SP.yml
cmd: config: set: invalid: config key is invalid lol ur dum list: none: no config keys!! ping: pre: pongerino!! post: 'pongerino! rtt: `{rtt:.2f}ms`' prefixes: 'prefixes r: {prefixes}' eval: long: 'result was too long lol {}' huge: 'result was huge lol' pastebin_down: 'result was so huge we broke pastebin xddd' wiki: > nede help ?visit wiki!!! {wiki} also u can ask 4 help here: {invite} talk in #support idiote about: title: woof!! description: a dumb botto by {maker.mention} (`{maker.id}`) birthday: '%B %m (created %Y)' fields: git_rev: git hash github_repo: github repo birthday: bday misc: cant_respond: i can't send messages there idiot
err: see_help: for help, `{prefix}help {cmd}` bad_arg: bad arg! {msg} {see_help} uh_oh: lol. {ex} {see_help} not_in_dm: "not in dm idiot" globally_disabled: "that command has been disabled" timeout: command took too long, try again pls! dms_disabled: idiot {mention}, enable dms so i can help u cmd: config: set: invalid: config key is invalid lol ur dum list: none: no config keys!! ping: pre: pongerino!! post: 'pongerino! rtt: `{rtt:.2f}ms`' prefixes: 'prefixes r: {prefixes}' eval: long: 'result was too long lol {}' huge: 'result was huge lol' pastebin_down: 'result was so huge we broke pastebin xddd' wiki: > nede help ?visit wiki!!! {wiki} also u can ask 4 help here: {invite} talk in #support idiote about: title: woof!! description: a dumb botto by {maker.mention} (`{maker.id}`) birthday: '%B %m (created %Y)' fields: git_rev: git hash github_repo: github repo birthday: bday misc: cant_respond: i can't send messages there idiot
Add shitpost language error keys
Add shitpost language error keys
YAML
mit
sliceofcode/dogbot,slice/dogbot,sliceofcode/dogbot,slice/dogbot,slice/dogbot
yaml
## Code Before: cmd: config: set: invalid: config key is invalid lol ur dum list: none: no config keys!! ping: pre: pongerino!! post: 'pongerino! rtt: `{rtt:.2f}ms`' prefixes: 'prefixes r: {prefixes}' eval: long: 'result was too long lol {}' huge: 'result was huge lol' pastebin_down: 'result was so huge we broke pastebin xddd' wiki: > nede help ?visit wiki!!! {wiki} also u can ask 4 help here: {invite} talk in #support idiote about: title: woof!! description: a dumb botto by {maker.mention} (`{maker.id}`) birthday: '%B %m (created %Y)' fields: git_rev: git hash github_repo: github repo birthday: bday misc: cant_respond: i can't send messages there idiot ## Instruction: Add shitpost language error keys ## Code After: err: see_help: for help, `{prefix}help {cmd}` bad_arg: bad arg! {msg} {see_help} uh_oh: lol. {ex} {see_help} not_in_dm: "not in dm idiot" globally_disabled: "that command has been disabled" timeout: command took too long, try again pls! dms_disabled: idiot {mention}, enable dms so i can help u cmd: config: set: invalid: config key is invalid lol ur dum list: none: no config keys!! ping: pre: pongerino!! post: 'pongerino! rtt: `{rtt:.2f}ms`' prefixes: 'prefixes r: {prefixes}' eval: long: 'result was too long lol {}' huge: 'result was huge lol' pastebin_down: 'result was so huge we broke pastebin xddd' wiki: > nede help ?visit wiki!!! {wiki} also u can ask 4 help here: {invite} talk in #support idiote about: title: woof!! description: a dumb botto by {maker.mention} (`{maker.id}`) birthday: '%B %m (created %Y)' fields: git_rev: git hash github_repo: github repo birthday: bday misc: cant_respond: i can't send messages there idiot
+ err: + see_help: for help, `{prefix}help {cmd}` + bad_arg: bad arg! {msg} {see_help} + uh_oh: lol. {ex} {see_help} + not_in_dm: "not in dm idiot" + globally_disabled: "that command has been disabled" + timeout: command took too long, try again pls! + dms_disabled: idiot {mention}, enable dms so i can help u cmd: config: set: invalid: config key is invalid lol ur dum list: none: no config keys!! ping: pre: pongerino!! post: 'pongerino! rtt: `{rtt:.2f}ms`' prefixes: 'prefixes r: {prefixes}' eval: long: 'result was too long lol {}' huge: 'result was huge lol' pastebin_down: 'result was so huge we broke pastebin xddd' wiki: > nede help ?visit wiki!!! {wiki} also u can ask 4 help here: {invite} talk in #support idiote about: title: woof!! description: a dumb botto by {maker.mention} (`{maker.id}`) birthday: '%B %m (created %Y)' fields: git_rev: git hash github_repo: github repo birthday: bday misc: cant_respond: i can't send messages there idiot
8
0.285714
8
0
19342a99a93f0ae92e69ff89f0470268a556fb3e
scripts/run-experiments.sh
scripts/run-experiments.sh
cliopts="$@" max_procs=1 DATA="data/RCV1_seq.bin" THETA="0.35 0.5 0.7 0.8 0.9 0.99" LAMBDA="1 0.1 0.01 0.001 0.0001" INDEX="INVERTED ALLPAIRS L2AP" parallel --ungroup --max-procs ${max_procs} "scripts/minibatch {1} -t {2} -l {3} -i {4} ${cliopts} > results/{1/.}_t{2}_l{3}_mb-{4}" ::: $DATA ::: $THETA ::: $LAMBDA ::: $INDEX parallel --ungroup --max-procs ${max_procs} "scripts/streaming {1} -t {2} -l {3} ${cliopts} > results/{1/.}_t{2}_l{3}_STREAMING" ::: $DATA ::: $THETA ::: $LAMBDA
cliopts="$@" max_procs=1 DATA="data/RCV1-seq.bin" THETA="0.35 0.5 0.7 0.8 0.9 0.99" LAMBDA="1 0.1 0.01 0.001 0.0001" #INDEX="INVERTED ALLPAIRS L2AP" INDEX="INVERTED L2AP" parallel --ungroup --max-procs ${max_procs} "scripts/minibatch {1} -t {2} -l {3} -i {4} ${cliopts} > results/{1/.}_t{2}_l{3}_MB-{4}" ::: $DATA ::: $THETA ::: $LAMBDA ::: $INDEX parallel --ungroup --max-procs ${max_procs} "scripts/streaming {1} -t {2} -l {3} -i {4} ${cliopts} > results/{1/.}_t{2}_l{3}_STR-{4}" ::: $DATA ::: $THETA ::: $LAMBDA ::: $INDEX
Add index option to Streaming
Add index option to Streaming
Shell
apache-2.0
gdfm/sssj,gdfm/sssj,gdfm/sssj
shell
## Code Before: cliopts="$@" max_procs=1 DATA="data/RCV1_seq.bin" THETA="0.35 0.5 0.7 0.8 0.9 0.99" LAMBDA="1 0.1 0.01 0.001 0.0001" INDEX="INVERTED ALLPAIRS L2AP" parallel --ungroup --max-procs ${max_procs} "scripts/minibatch {1} -t {2} -l {3} -i {4} ${cliopts} > results/{1/.}_t{2}_l{3}_mb-{4}" ::: $DATA ::: $THETA ::: $LAMBDA ::: $INDEX parallel --ungroup --max-procs ${max_procs} "scripts/streaming {1} -t {2} -l {3} ${cliopts} > results/{1/.}_t{2}_l{3}_STREAMING" ::: $DATA ::: $THETA ::: $LAMBDA ## Instruction: Add index option to Streaming ## Code After: cliopts="$@" max_procs=1 DATA="data/RCV1-seq.bin" THETA="0.35 0.5 0.7 0.8 0.9 0.99" LAMBDA="1 0.1 0.01 0.001 0.0001" #INDEX="INVERTED ALLPAIRS L2AP" INDEX="INVERTED L2AP" parallel --ungroup --max-procs ${max_procs} "scripts/minibatch {1} -t {2} -l {3} -i {4} ${cliopts} > results/{1/.}_t{2}_l{3}_MB-{4}" ::: $DATA ::: $THETA ::: $LAMBDA ::: $INDEX parallel --ungroup --max-procs ${max_procs} "scripts/streaming {1} -t {2} -l {3} -i {4} ${cliopts} > results/{1/.}_t{2}_l{3}_STR-{4}" ::: $DATA ::: $THETA ::: $LAMBDA ::: $INDEX
cliopts="$@" max_procs=1 - DATA="data/RCV1_seq.bin" ? ^ + DATA="data/RCV1-seq.bin" ? ^ THETA="0.35 0.5 0.7 0.8 0.9 0.99" LAMBDA="1 0.1 0.01 0.001 0.0001" - INDEX="INVERTED ALLPAIRS L2AP" + #INDEX="INVERTED ALLPAIRS L2AP" ? + + INDEX="INVERTED L2AP" - parallel --ungroup --max-procs ${max_procs} "scripts/minibatch {1} -t {2} -l {3} -i {4} ${cliopts} > results/{1/.}_t{2}_l{3}_mb-{4}" ::: $DATA ::: $THETA ::: $LAMBDA ::: $INDEX ? ^^ + parallel --ungroup --max-procs ${max_procs} "scripts/minibatch {1} -t {2} -l {3} -i {4} ${cliopts} > results/{1/.}_t{2}_l{3}_MB-{4}" ::: $DATA ::: $THETA ::: $LAMBDA ::: $INDEX ? ^^ - parallel --ungroup --max-procs ${max_procs} "scripts/streaming {1} -t {2} -l {3} ${cliopts} > results/{1/.}_t{2}_l{3}_STREAMING" ::: $DATA ::: $THETA ::: $LAMBDA ? ^^^^^^ + parallel --ungroup --max-procs ${max_procs} "scripts/streaming {1} -t {2} -l {3} -i {4} ${cliopts} > results/{1/.}_t{2}_l{3}_STR-{4}" ::: $DATA ::: $THETA ::: $LAMBDA ::: $INDEX ? +++++++ ^^^^ +++++++++++
9
0.818182
5
4
53071ffd578429e6ba627d7450b15320872c074e
tests/bootstrap.php
tests/bootstrap.php
<?php $loader = require __DIR__.'/../vendor/.composer/autoload.php'; $loader->add('Igorw\Tests', __DIR__); $loader->register();
<?php $loader = require __DIR__.'/../vendor/autoload.php'; $loader->add('Igorw\Tests', __DIR__); $loader->register();
Use new composer autoload filename
Use new composer autoload filename
PHP
mit
ympons/react,dagopoot/react,cesarmarinhorj/react,dagopoot/react,ericariyanto/react,krageon/react,cystbear/react,naroga/react,ericariyanto/react,nemurici/react,sachintaware/react,nemurici/react,cystbear/react,krageon/react,FireWalkerX/react,cesarmarinhorj/react,reactphp/react,sachintaware/react,naroga/react,FireWalkerX/react,ympons/react
php
## Code Before: <?php $loader = require __DIR__.'/../vendor/.composer/autoload.php'; $loader->add('Igorw\Tests', __DIR__); $loader->register(); ## Instruction: Use new composer autoload filename ## Code After: <?php $loader = require __DIR__.'/../vendor/autoload.php'; $loader->add('Igorw\Tests', __DIR__); $loader->register();
<?php - $loader = require __DIR__.'/../vendor/.composer/autoload.php'; ? ---------- + $loader = require __DIR__.'/../vendor/autoload.php'; $loader->add('Igorw\Tests', __DIR__); $loader->register();
2
0.4
1
1
f9711559b8cfb07b57f9875a6176b00be91c76cf
.travis.yml
.travis.yml
language: objective-c before_install: - brew update - brew install xctool --HEAD - bundle install script: - rake server:start - rake test
language: objective-c before_install: - brew update - brew install https://raw.github.com/fpotter/homebrew/246a1439dab49542d4531ad7e1bac7048151f601/Library/Formula/xctool.rb - bundle install script: - rake server:start - rake test
Install xctool directly from unmerged 0.1.7 formula since --HEAD is broken
Install xctool directly from unmerged 0.1.7 formula since --HEAD is broken
YAML
apache-2.0
lucasecf/RestKit,erichedstrom/RestKit,nett55/RestKit,Juraldinio/RestKit,Papercloud/RestKit,youssman/RestKit,hanangellove/RestKit,zhenlove/RestKit,CodewareTechnology/RestKit,pat2man/RestKit,cfis/RestKit,taptaptap/RestKit,margarina/RestKit-latest,caamorales/RestKit,kevmeyer/RestKit,loverbabyz/RestKit,DejaMi/RestKit,ForrestAlfred/RestKit,youssman/RestKit,zhenlove/RestKit,damiannz/RestKit,cfis/RestKit,Bogon/RestKit,Meihualu/RestKit,nett55/RestKit,Bogon/RestKit,LiuShulong/RestKit,Meihualu/RestKit,braindata/RestKit,wuxsoft/RestKit,loverbabyz/RestKit,braindata/RestKit-1,nett55/RestKit,cryptojuice/RestKit,QLGu/RestKit,ipmobiletech/RestKit,vilinskiy-playdayteam/RestKit,gauravstomar/RestKit,jonesgithub/RestKit,wangjiangwen/RestKit,mavericksunny/RestKit,braindata/RestKit-1,sandyway/RestKit,samkrishna/RestKit,goldstar/RestKit,pbogdanv/RestKit,agworld/RestKit,zjh171/RestKit,pat2man/RestKit,sachin-khard/NucRestKit,PonderProducts/RestKit,wuxsoft/RestKit,mberube09/RestKit,Flutterbee/RestKit,HarrisLee/RestKit,zhenlove/RestKit,lmirosevic/RestKit,gauravstomar/RestKit,mumer92/RestKit,SuPair/RestKit,samanalysis/RestKit,money-alex2006hw/RestKit,Meihualu/RestKit,mberube09/RestKit,timbodeit/RestKit,StasanTelnov/RestKit,aleufms/RestKit,SuPair/RestKit,QLGu/RestKit,Flutterbee/RestKit,youssman/RestKit,cryptojuice/RestKit,dx285/RestKit,cryptojuice/RestKit,fhchina/RestKit,common2015/RestKit,fedegasp/RestKit,ForrestAlfred/RestKit,ppierson/RestKit,REXLabsInc/RestKit,mumer92/RestKit,adozenlines/RestKit,ForrestAlfred/RestKit,dx285/RestKit,baumatron/RestKit,QLGu/RestKit,zhenlove/RestKit,zilaiyedaren/RestKit,justinyaoqi/RestKit,Livestream/RestKit,LiuShulong/RestKit,sandyway/RestKit,agworld/RestKit,goldstar/RestKit,ChinaPicture/RestKit,gauravstomar/RestKit,antondarki/RestKit,StasanTelnov/RestKit,braindata/RestKit-1,0x73/RestKit,wyzzarz/RestKit,kevmeyer/RestKit,imton/RestKit,nett55/RestKit,Bogon/RestKit,taptaptap/RestKit,pat2man/RestKit,lmirosevic/RestKit,DejaMi/RestKit,LiuShulong/RestKit,cnbin/RestKit,Papercloud/RestKit,cnbin/RestKit,Papercloud/RestKit,sachin-khard/NucleusRestKit,samkrishna/RestKit,justinyaoqi/RestKit,sachin-khard/NucleusRestKit,ppierson/RestKit,SuPair/RestKit,qingsong-xu/RestKit,samanalysis/RestKit,sachin-khard/NucRestKit,sachin-khard/NucRestKit,wangjiangwen/RestKit,adozenlines/RestKit,SuPair/RestKit,samanalysis/RestKit,erichedstrom/RestKit,apontador/RestKit,qingsong-xu/RestKit,naqi/RestKit,TheFarm/RestKit,wangjiangwen/RestKit,common2015/RestKit,cfis/RestKit,zjh171/RestKit,adozenlines/RestKit,ipmobiletech/RestKit,fedegasp/RestKit,apontador/RestKit,cnbin/RestKit,jrtaal/RestKit,margarina/RestKit-latest,damiannz/RestKit,erichedstrom/RestKit,baumatron/RestKit,wuxsoft/RestKit,fedegasp/RestKit,Meihualu/RestKit,wuxsoft/RestKit,HarrisLee/RestKit,apontador/RestKit,margarina/RestKit-latest,CodewareTechnology/RestKit,sachin-khard/NucleusRestKit,zilaiyedaren/RestKit,lmirosevic/RestKit,timbodeit/RestKit,RyanCodes/RestKit,oye-lionel/GithubTest,kevmeyer/RestKit,hejunbinlan/RestKit,taptaptap/RestKit,oye-lionel/GithubTest,zjh171/RestKit,ipmobiletech/RestKit,braindata/RestKit-1,hanangellove/RestKit,Gaantz/RestKit,adozenlines/RestKit,wuxsoft/RestKit,CodewareTechnology/RestKit,nphkh/RestKit,sachin-khard/NucRestKit,jrtaal/RestKit,agworld/RestKit,RestKit/RestKit,Livestream/RestKit,aleufms/RestKit,Livestream/RestKit,kevmeyer/RestKit,canaydogan/RestKit,PonderProducts/RestKit,Juraldinio/RestKit,ChinaPicture/RestKit,HarrisLee/RestKit,mavericksunny/RestKit,zilaiyedaren/RestKit,hejunbinlan/RestKit,hanangellove/RestKit,zilaiyedaren/RestKit,qingsong-xu/RestKit,Meihualu/RestKit,qingsong-xu/RestKit,apontador/RestKit,pbogdanv/RestKit,gank0326/restkit,youssman/RestKit,DejaMi/RestKit,lucasecf/RestKit,wyzzarz/RestKit,nett55/RestKit,jonesgithub/RestKit,Papercloud/RestKit,timbodeit/RestKit,mumer92/RestKit,braindata/RestKit-1,apontador/RestKit,money-alex2006hw/RestKit,justinyaoqi/RestKit,qingsong-xu/RestKit,djz-code/RestKit,canaydogan/RestKit,jrtaal/RestKit,baumatron/RestKit,Bogon/RestKit,naqi/RestKit,aleufms/RestKit,QLGu/RestKit,pbogdanv/RestKit,wireitcollege/RestKit,jonesgithub/RestKit,djz-code/RestKit,Juraldinio/RestKit,fhchina/RestKit,ChinaPicture/RestKit,StasanTelnov/RestKit,lucasecf/RestKit,ppierson/RestKit,HarrisLee/RestKit,Gaantz/RestKit,gauravstomar/RestKit,Juraldinio/RestKit,djz-code/RestKit,PonderProducts/RestKit,Juraldinio/RestKit,REXLabsInc/RestKit,coderChrisLee/RestKit,hejunbinlan/RestKit,common2015/RestKit,pat2man/RestKit,adozenlines/RestKit,zjh171/RestKit,oligriffiths/RestKit,0x73/RestKit,ppierson/RestKit,imton/RestKit,samkrishna/RestKit,damiannz/RestKit,REXLabsInc/RestKit,Flutterbee/RestKit,damiannz/RestKit,Gaantz/RestKit,cryptojuice/RestKit,naqi/RestKit,LiuShulong/RestKit,lmirosevic/RestKit,sandyway/RestKit,loverbabyz/RestKit,agworld/RestKit,vilinskiy-playdayteam/RestKit,PonderProducts/RestKit,wireitcollege/RestKit,TheFarm/RestKit,pat2man/RestKit,0x73/RestKit,percysnoodle/RestKit,percysnoodle/RestKit,oye-lionel/GithubTest,lmirosevic/RestKit,0dayZh/RestKit,oligriffiths/RestKit,mumer92/RestKit,braindata/RestKit,fedegasp/RestKit,mavericksunny/RestKit,gank0326/restkit,0dayZh/RestKit,caamorales/RestKit,aleufms/RestKit,aleufms/RestKit,justinyaoqi/RestKit,DejaMi/RestKit,jonesgithub/RestKit,wireitcollege/RestKit,fedegasp/RestKit,common2015/RestKit,Gaantz/RestKit,RestKit/RestKit,kevmeyer/RestKit,samanalysis/RestKit,braindata/RestKit,timbodeit/RestKit,common2015/RestKit,jrtaal/RestKit,baumatron/RestKit,coderChrisLee/RestKit,Gaantz/RestKit,margarina/RestKit-latest,baumatron/RestKit,goldstar/RestKit,nphkh/RestKit,pbogdanv/RestKit,sandyway/RestKit,SuPair/RestKit,moneytree/RestKit,wyzzarz/RestKit,wireitcollege/RestKit,RyanCodes/RestKit,cnbin/RestKit,nphkh/RestKit,cnbin/RestKit,lucasecf/RestKit,dx285/RestKit,wangjiangwen/RestKit,0x73/RestKit,hanangellove/RestKit,vilinskiy-playdayteam/RestKit,ppierson/RestKit,Livestream/RestKit,ChinaPicture/RestKit,jrtaal/RestKit,mumer92/RestKit,gank0326/restkit,loverbabyz/RestKit,coderChrisLee/RestKit,oligriffiths/RestKit,gank0326/restkit,QLGu/RestKit,0dayZh/RestKit,coderChrisLee/RestKit,LiuShulong/RestKit,gauravstomar/RestKit,antondarki/RestKit,ipmobiletech/RestKit,Bogon/RestKit,oye-lionel/GithubTest,RyanCodes/RestKit,DejaMi/RestKit,jonesgithub/RestKit,antondarki/RestKit,moneytree/RestKit,caamorales/RestKit,samanalysis/RestKit,percysnoodle/RestKit,caamorales/RestKit,pbogdanv/RestKit,damiannz/RestKit,imton/RestKit,sandyway/RestKit,0dayZh/RestKit,antondarki/RestKit,canaydogan/RestKit,mavericksunny/RestKit,wyzzarz/RestKit,ForrestAlfred/RestKit,RyanCodes/RestKit,nphkh/RestKit,hejunbinlan/RestKit,coderChrisLee/RestKit,Flutterbee/RestKit,fhchina/RestKit,canaydogan/RestKit,mberube09/RestKit,oligriffiths/RestKit,gank0326/restkit,sachin-khard/NucleusRestKit,mberube09/RestKit,wangjiangwen/RestKit,imton/RestKit,timbodeit/RestKit,fhchina/RestKit,zhenlove/RestKit,zilaiyedaren/RestKit,taptaptap/RestKit,hejunbinlan/RestKit,braindata/RestKit,wireitcollege/RestKit,sachin-khard/NucleusRestKit,0x73/RestKit,zjh171/RestKit,RestKit/RestKit,canaydogan/RestKit,caamorales/RestKit,imton/RestKit,oligriffiths/RestKit,nphkh/RestKit,moneytree/RestKit,Papercloud/RestKit,oye-lionel/GithubTest,cryptojuice/RestKit,hanangellove/RestKit,goldstar/RestKit,REXLabsInc/RestKit,ipmobiletech/RestKit,moneytree/RestKit,ForrestAlfred/RestKit,HarrisLee/RestKit,naqi/RestKit,djz-code/RestKit,lucasecf/RestKit,dx285/RestKit,money-alex2006hw/RestKit,CodewareTechnology/RestKit,TheFarm/RestKit,youssman/RestKit,moneytree/RestKit,antondarki/RestKit,sachin-khard/NucRestKit,money-alex2006hw/RestKit,RyanCodes/RestKit,percysnoodle/RestKit,loverbabyz/RestKit,ChinaPicture/RestKit,justinyaoqi/RestKit,vilinskiy-playdayteam/RestKit,fhchina/RestKit,money-alex2006hw/RestKit,dx285/RestKit,CodewareTechnology/RestKit
yaml
## Code Before: language: objective-c before_install: - brew update - brew install xctool --HEAD - bundle install script: - rake server:start - rake test ## Instruction: Install xctool directly from unmerged 0.1.7 formula since --HEAD is broken ## Code After: language: objective-c before_install: - brew update - brew install https://raw.github.com/fpotter/homebrew/246a1439dab49542d4531ad7e1bac7048151f601/Library/Formula/xctool.rb - bundle install script: - rake server:start - rake test
language: objective-c before_install: - brew update - - brew install xctool --HEAD + - brew install https://raw.github.com/fpotter/homebrew/246a1439dab49542d4531ad7e1bac7048151f601/Library/Formula/xctool.rb - bundle install script: - rake server:start - rake test
2
0.25
1
1
c24049173ecf9706e3f3c9990d18694a7722c434
Resources/config/admin/detected_bot.yml
Resources/config/admin/detected_bot.yml
entity_name: bot menu: icons: main: bundles/darvinbotdetector/images/admin/detected_bot_main.png sidebar: bundles/darvinbotdetector/images/admin/detected_bot_sidebar.png disabled_routes: - copy - delete - edit - new - update-property sortable_fields: date: ~ botType: ~ ip: ~ url: ~ responseCode: ~ form: filter: fields: dateFrom: ~ dateTo: ~ botType: compare_strict: false ip: compare_strict: false url: compare_strict: false responseCode: compare_strict: false view: index: action_widgets: show_link: ~ fields: date: ~ botType: ~ ip: ~ url: ~ responseCode: ~ show: action_widgets: ~ fields: date: ~ botType: ~ ip: ~ url: ~ responseCode: ~
entity_name: bot menu: icons: main: bundles/darvinbotdetector/images/admin/detected_bot_main.png sidebar: bundles/darvinbotdetector/images/admin/detected_bot_sidebar.png colors: main: "#6c6c6c" disabled_routes: - copy - delete - edit - new - update-property sortable_fields: date: ~ botType: ~ ip: ~ url: ~ responseCode: ~ form: filter: fields: dateFrom: ~ dateTo: ~ botType: compare_strict: false ip: compare_strict: false url: compare_strict: false responseCode: compare_strict: false view: index: action_widgets: show_link: ~ fields: date: ~ botType: ~ ip: ~ url: ~ responseCode: ~ show: action_widgets: ~ fields: date: ~ botType: ~ ip: ~ url: ~ responseCode: ~
Configure admin menu item colors.
Configure admin menu item colors.
YAML
mit
DarvinStudio/DarvinBotDetectorBundle
yaml
## Code Before: entity_name: bot menu: icons: main: bundles/darvinbotdetector/images/admin/detected_bot_main.png sidebar: bundles/darvinbotdetector/images/admin/detected_bot_sidebar.png disabled_routes: - copy - delete - edit - new - update-property sortable_fields: date: ~ botType: ~ ip: ~ url: ~ responseCode: ~ form: filter: fields: dateFrom: ~ dateTo: ~ botType: compare_strict: false ip: compare_strict: false url: compare_strict: false responseCode: compare_strict: false view: index: action_widgets: show_link: ~ fields: date: ~ botType: ~ ip: ~ url: ~ responseCode: ~ show: action_widgets: ~ fields: date: ~ botType: ~ ip: ~ url: ~ responseCode: ~ ## Instruction: Configure admin menu item colors. ## Code After: entity_name: bot menu: icons: main: bundles/darvinbotdetector/images/admin/detected_bot_main.png sidebar: bundles/darvinbotdetector/images/admin/detected_bot_sidebar.png colors: main: "#6c6c6c" disabled_routes: - copy - delete - edit - new - update-property sortable_fields: date: ~ botType: ~ ip: ~ url: ~ responseCode: ~ form: filter: fields: dateFrom: ~ dateTo: ~ botType: compare_strict: false ip: compare_strict: false url: compare_strict: false responseCode: compare_strict: false view: index: action_widgets: show_link: ~ fields: date: ~ botType: ~ ip: ~ url: ~ responseCode: ~ show: action_widgets: ~ fields: date: ~ botType: ~ ip: ~ url: ~ responseCode: ~
entity_name: bot menu: icons: main: bundles/darvinbotdetector/images/admin/detected_bot_main.png sidebar: bundles/darvinbotdetector/images/admin/detected_bot_sidebar.png + colors: + main: "#6c6c6c" disabled_routes: - copy - delete - edit - new - update-property sortable_fields: date: ~ botType: ~ ip: ~ url: ~ responseCode: ~ form: filter: fields: dateFrom: ~ dateTo: ~ botType: compare_strict: false ip: compare_strict: false url: compare_strict: false responseCode: compare_strict: false view: index: action_widgets: show_link: ~ fields: date: ~ botType: ~ ip: ~ url: ~ responseCode: ~ show: action_widgets: ~ fields: date: ~ botType: ~ ip: ~ url: ~ responseCode: ~
2
0.041667
2
0
82c0b8f0978d09f9ff21099307075dc9114811aa
test-requirements-py3.txt
test-requirements-py3.txt
hacking>=0.9.2,<0.10 Babel>=1.3 coverage>=3.6 discover fixtures>=0.3.14 httplib2>=0.7.5 mock>=1.0 mox>=0.5.3 # Docs Requirements are commented out because of the quick fix of bug #1403510 # oslosphinx>=2.2.0 # Apache-2.0 oslotest>=1.2.0 # Apache-2.0 pymongo>=2.5 python-subunit>=0.0.18 # sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 # sphinxcontrib-docbookrestapi # sphinxcontrib-httpdomain # sphinxcontrib-pecanwsme>=0.8 testrepository>=0.0.18 testscenarios>=0.4 testtools>=0.9.36,!=1.2.0
hacking>=0.9.2,<0.10 Babel>=1.3 coverage>=3.6 discover fixtures>=0.3.14 httplib2>=0.7.5 mock>=1.0 mox>=0.5.3 # Docs Requirements oslosphinx>=2.2.0 # Apache-2.0 oslotest>=1.2.0 # Apache-2.0 pymongo>=2.5 python-subunit>=0.0.18 sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 sphinxcontrib-docbookrestapi sphinxcontrib-httpdomain sphinxcontrib-pecanwsme>=0.8 testrepository>=0.0.18 testscenarios>=0.4 testtools>=0.9.36,!=1.2.0
Revert "Remove Sphinx from py33 requirements"
Revert "Remove Sphinx from py33 requirements" This reverts commit f3927e17f7088569872a42d4701abeed285a7970. Change-Id: I424315afe5cdfe42f4eeb22cb3e760d6013eaf46
Text
apache-2.0
r-mibu/ceilometer,maestro-hybrid-cloud/ceilometer,fabian4/ceilometer,ityaptin/ceilometer,idegtiarov/ceilometer,r-mibu/ceilometer,eayunstack/ceilometer,isyippee/ceilometer,cernops/ceilometer,eayunstack/ceilometer,maestro-hybrid-cloud/ceilometer,redhat-openstack/ceilometer,openstack/aodh,Juniper/ceilometer,pkilambi/ceilometer,isyippee/ceilometer,openstack/ceilometer,sileht/aodh,pczerkas/aodh,Juniper/ceilometer,pczerkas/aodh,pkilambi/ceilometer,chungg/aodh,mathslinux/ceilometer,openstack/aodh,cernops/ceilometer,sileht/aodh,redhat-openstack/ceilometer,chungg/aodh,mathslinux/ceilometer,ityaptin/ceilometer,openstack/ceilometer,fabian4/ceilometer,idegtiarov/ceilometer
text
## Code Before: hacking>=0.9.2,<0.10 Babel>=1.3 coverage>=3.6 discover fixtures>=0.3.14 httplib2>=0.7.5 mock>=1.0 mox>=0.5.3 # Docs Requirements are commented out because of the quick fix of bug #1403510 # oslosphinx>=2.2.0 # Apache-2.0 oslotest>=1.2.0 # Apache-2.0 pymongo>=2.5 python-subunit>=0.0.18 # sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 # sphinxcontrib-docbookrestapi # sphinxcontrib-httpdomain # sphinxcontrib-pecanwsme>=0.8 testrepository>=0.0.18 testscenarios>=0.4 testtools>=0.9.36,!=1.2.0 ## Instruction: Revert "Remove Sphinx from py33 requirements" This reverts commit f3927e17f7088569872a42d4701abeed285a7970. Change-Id: I424315afe5cdfe42f4eeb22cb3e760d6013eaf46 ## Code After: hacking>=0.9.2,<0.10 Babel>=1.3 coverage>=3.6 discover fixtures>=0.3.14 httplib2>=0.7.5 mock>=1.0 mox>=0.5.3 # Docs Requirements oslosphinx>=2.2.0 # Apache-2.0 oslotest>=1.2.0 # Apache-2.0 pymongo>=2.5 python-subunit>=0.0.18 sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 sphinxcontrib-docbookrestapi sphinxcontrib-httpdomain sphinxcontrib-pecanwsme>=0.8 testrepository>=0.0.18 testscenarios>=0.4 testtools>=0.9.36,!=1.2.0
hacking>=0.9.2,<0.10 Babel>=1.3 coverage>=3.6 discover fixtures>=0.3.14 httplib2>=0.7.5 mock>=1.0 mox>=0.5.3 - # Docs Requirements are commented out because of the quick fix of bug #1403510 + # Docs Requirements - # oslosphinx>=2.2.0 # Apache-2.0 ? -- + oslosphinx>=2.2.0 # Apache-2.0 oslotest>=1.2.0 # Apache-2.0 pymongo>=2.5 python-subunit>=0.0.18 - # sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 ? -- + sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 - # sphinxcontrib-docbookrestapi ? -- + sphinxcontrib-docbookrestapi - # sphinxcontrib-httpdomain ? -- + sphinxcontrib-httpdomain - # sphinxcontrib-pecanwsme>=0.8 ? -- + sphinxcontrib-pecanwsme>=0.8 testrepository>=0.0.18 testscenarios>=0.4 testtools>=0.9.36,!=1.2.0
12
0.6
6
6
e2e5c8a5a6197a20f3274c9cea2aab094ff6f76c
Kindle_Cloud_Reader_tweak.user.css
Kindle_Cloud_Reader_tweak.user.css
/* Kindle Cloud Reader tweak */ @namespace url("http://www.w3.org/1999/xhtml"); @-moz-document domain("read.amazon.co.jp") { /* Paging arrow */ .pageArrow { background: floralwhite !important; } #kindleReader_center { left: 3% !important; right: 3% !important; } #kindleReader_pageTurnAreaLeft { width: 3% !important; } #kindleReader_pageTurnAreaRight { width: 3% !important; left: 97% !important; } /* Overray element opacity */ .immersive_slide_area { opacity: 0.4 !important; } .immersive_slide_area:hover { opacity: 0.8 !important; } /* Footer height adjustment */ #kindleReader_footer { height: 40px !important; } #kindleReader_footer_readerControls_left, #kindleReader_footer_readerControls_middle, #kindleReader_footer_readerControls_right { min-height: 40px !important; height: 100% !important; } #kindleReader_footer_readerControls_left, #kindleReader_footer_readerControls_right { padding-top: 8px !important; } #kindleReader_progressbar_div { top: 8px !important; } #kindleReader_footer_message { margin-top: 12px !important; font: 12px/1 sans-serif !important; letter-spacing: 0.2em !important; word-spacing: 1em !important; } }
/* Kindle Cloud Reader tweak */ @namespace url("http://www.w3.org/1999/xhtml"); @-moz-document domain("read.amazon.co.jp") { /* Paging arrow */ .pageArrow { background: floralwhite !important; } /* Overray element opacity */ .immersive_slide_area { opacity: 0.4 !important; } .immersive_slide_area:hover { opacity: 0.8 !important; } }
Drop the code out of use
Drop the code out of use The parts userstyles are applied should be minimal to keep the original design as much as possible for the respect to author :)
CSS
unlicense
curipha/userstyles
css
## Code Before: /* Kindle Cloud Reader tweak */ @namespace url("http://www.w3.org/1999/xhtml"); @-moz-document domain("read.amazon.co.jp") { /* Paging arrow */ .pageArrow { background: floralwhite !important; } #kindleReader_center { left: 3% !important; right: 3% !important; } #kindleReader_pageTurnAreaLeft { width: 3% !important; } #kindleReader_pageTurnAreaRight { width: 3% !important; left: 97% !important; } /* Overray element opacity */ .immersive_slide_area { opacity: 0.4 !important; } .immersive_slide_area:hover { opacity: 0.8 !important; } /* Footer height adjustment */ #kindleReader_footer { height: 40px !important; } #kindleReader_footer_readerControls_left, #kindleReader_footer_readerControls_middle, #kindleReader_footer_readerControls_right { min-height: 40px !important; height: 100% !important; } #kindleReader_footer_readerControls_left, #kindleReader_footer_readerControls_right { padding-top: 8px !important; } #kindleReader_progressbar_div { top: 8px !important; } #kindleReader_footer_message { margin-top: 12px !important; font: 12px/1 sans-serif !important; letter-spacing: 0.2em !important; word-spacing: 1em !important; } } ## Instruction: Drop the code out of use The parts userstyles are applied should be minimal to keep the original design as much as possible for the respect to author :) ## Code After: /* Kindle Cloud Reader tweak */ @namespace url("http://www.w3.org/1999/xhtml"); @-moz-document domain("read.amazon.co.jp") { /* Paging arrow */ .pageArrow { background: floralwhite !important; } /* Overray element opacity */ .immersive_slide_area { opacity: 0.4 !important; } .immersive_slide_area:hover { opacity: 0.8 !important; } }
/* Kindle Cloud Reader tweak */ @namespace url("http://www.w3.org/1999/xhtml"); @-moz-document domain("read.amazon.co.jp") { /* Paging arrow */ .pageArrow { background: floralwhite !important; } - #kindleReader_center { - left: 3% !important; - right: 3% !important; - } - #kindleReader_pageTurnAreaLeft { - width: 3% !important; - } - #kindleReader_pageTurnAreaRight { - width: 3% !important; - left: 97% !important; - } - /* Overray element opacity */ .immersive_slide_area { opacity: 0.4 !important; } .immersive_slide_area:hover { opacity: 0.8 !important; } - - /* Footer height adjustment */ - #kindleReader_footer { - height: 40px !important; - } - #kindleReader_footer_readerControls_left, - #kindleReader_footer_readerControls_middle, - #kindleReader_footer_readerControls_right { - min-height: 40px !important; - height: 100% !important; - } - - #kindleReader_footer_readerControls_left, - #kindleReader_footer_readerControls_right { - padding-top: 8px !important; - } - - #kindleReader_progressbar_div { - top: 8px !important; - } - #kindleReader_footer_message { - margin-top: 12px !important; - font: 12px/1 sans-serif !important; - letter-spacing: 0.2em !important; - word-spacing: 1em !important; - } }
38
0.690909
0
38
ffb91fc7435727d459354ef72d9b22a44a42b446
config/currentuser-services_public_key.txt
config/currentuser-services_public_key.txt
-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApB6BAGF36LkQEzLLbqpt eYf4R70nzxSyLpZc8ixW+VWteoEGUhbtaU+WfMI/c0o9hZgmnEQ7eGyZnpEvTShd DmsbvbYiYi6SHq1pPTRjpIdK5cKwzSTxMl6yG33nKYCvnufs2ZgmxuiVhGoxVa+9 cG/T6fIVvDbK7wpcn3bk81RlAbZg+/lCT+g64AD2RylBB8uA4oKL8A6xNnrReAma t3m8INuzbPiN13VZ6iWfb5E9DDBWIYpwhVnJmVXv05eWedQWGgIKb6cEGjiM5U0p OqZIlv2+pSo/ViiXDV/1oPGegEucO2sMMvxd9dvPlXabHSl3GEkl+8YxMt1zrV9w MQIDAQAB -----END PUBLIC KEY-----
-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7XrSJNBNHd+KgBCmMaKm cuN046QvNrtIRGtCglKmEzMUbjOeNGcC3jJsL1FVpmHD8+/FcOBwDN1DPagRYFL2 jVMVs2bhCD0SyhWoStvPNSDJRIOxxKHdwvGlQ2vNRnA+SEmpSx7dGmXy5Zhe9z6P G7Nbtc3uxCJGzZmBQL3M+Qsi71RvmX9DmARCezOMI+iKkvo9XW8cTaRrAwsEySSX OmzcSOvkbThX3R6UY8exIZ/sqmPv5nnhdz91IkcIEP9UzId39ECavt7cYmNs9hz+ oIaLRNosB2w5+5JH7r2UcEVnydjFeD/w+3ZH8+d47XBGgyR9jHB6c+EmjIEL5xp0 swIDAQAB -----END PUBLIC KEY-----
Update public key (key for services.currentuser.io)
Update public key (key for services.currentuser.io)
Text
mit
currentuser/currentuser-services-gem
text
## Code Before: -----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApB6BAGF36LkQEzLLbqpt eYf4R70nzxSyLpZc8ixW+VWteoEGUhbtaU+WfMI/c0o9hZgmnEQ7eGyZnpEvTShd DmsbvbYiYi6SHq1pPTRjpIdK5cKwzSTxMl6yG33nKYCvnufs2ZgmxuiVhGoxVa+9 cG/T6fIVvDbK7wpcn3bk81RlAbZg+/lCT+g64AD2RylBB8uA4oKL8A6xNnrReAma t3m8INuzbPiN13VZ6iWfb5E9DDBWIYpwhVnJmVXv05eWedQWGgIKb6cEGjiM5U0p OqZIlv2+pSo/ViiXDV/1oPGegEucO2sMMvxd9dvPlXabHSl3GEkl+8YxMt1zrV9w MQIDAQAB -----END PUBLIC KEY----- ## Instruction: Update public key (key for services.currentuser.io) ## Code After: -----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7XrSJNBNHd+KgBCmMaKm cuN046QvNrtIRGtCglKmEzMUbjOeNGcC3jJsL1FVpmHD8+/FcOBwDN1DPagRYFL2 jVMVs2bhCD0SyhWoStvPNSDJRIOxxKHdwvGlQ2vNRnA+SEmpSx7dGmXy5Zhe9z6P G7Nbtc3uxCJGzZmBQL3M+Qsi71RvmX9DmARCezOMI+iKkvo9XW8cTaRrAwsEySSX OmzcSOvkbThX3R6UY8exIZ/sqmPv5nnhdz91IkcIEP9UzId39ECavt7cYmNs9hz+ oIaLRNosB2w5+5JH7r2UcEVnydjFeD/w+3ZH8+d47XBGgyR9jHB6c+EmjIEL5xp0 swIDAQAB -----END PUBLIC KEY-----
-----BEGIN PUBLIC KEY----- - MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApB6BAGF36LkQEzLLbqpt - eYf4R70nzxSyLpZc8ixW+VWteoEGUhbtaU+WfMI/c0o9hZgmnEQ7eGyZnpEvTShd - DmsbvbYiYi6SHq1pPTRjpIdK5cKwzSTxMl6yG33nKYCvnufs2ZgmxuiVhGoxVa+9 - cG/T6fIVvDbK7wpcn3bk81RlAbZg+/lCT+g64AD2RylBB8uA4oKL8A6xNnrReAma - t3m8INuzbPiN13VZ6iWfb5E9DDBWIYpwhVnJmVXv05eWedQWGgIKb6cEGjiM5U0p - OqZIlv2+pSo/ViiXDV/1oPGegEucO2sMMvxd9dvPlXabHSl3GEkl+8YxMt1zrV9w + MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7XrSJNBNHd+KgBCmMaKm + cuN046QvNrtIRGtCglKmEzMUbjOeNGcC3jJsL1FVpmHD8+/FcOBwDN1DPagRYFL2 + jVMVs2bhCD0SyhWoStvPNSDJRIOxxKHdwvGlQ2vNRnA+SEmpSx7dGmXy5Zhe9z6P + G7Nbtc3uxCJGzZmBQL3M+Qsi71RvmX9DmARCezOMI+iKkvo9XW8cTaRrAwsEySSX + OmzcSOvkbThX3R6UY8exIZ/sqmPv5nnhdz91IkcIEP9UzId39ECavt7cYmNs9hz+ + oIaLRNosB2w5+5JH7r2UcEVnydjFeD/w+3ZH8+d47XBGgyR9jHB6c+EmjIEL5xp0 - MQIDAQAB ? ^^ + swIDAQAB ? ^^ -----END PUBLIC KEY-----
14
1.555556
7
7
7241cfd56fe3675de0c85d9ca8bc014726b3bff6
.travis.yml
.travis.yml
dist: trusty sudo: false language: c compiler: - gcc - clang os: - linux - osx addons: apt: packages: - gcc-multilib script: - make
dist: trusty sudo: false language: c compiler: - gcc - clang os: - linux - osx matrix: allow_failures: - os: linux compiler: clang addons: apt: packages: - gcc-multilib script: - make
Allow clang to fail on Travis for Linux
Allow clang to fail on Travis for Linux Too old version on Travis to bother with.
YAML
apache-2.0
khaledhosny/psautohint,khaledhosny/psautohint
yaml
## Code Before: dist: trusty sudo: false language: c compiler: - gcc - clang os: - linux - osx addons: apt: packages: - gcc-multilib script: - make ## Instruction: Allow clang to fail on Travis for Linux Too old version on Travis to bother with. ## Code After: dist: trusty sudo: false language: c compiler: - gcc - clang os: - linux - osx matrix: allow_failures: - os: linux compiler: clang addons: apt: packages: - gcc-multilib script: - make
dist: trusty sudo: false language: c compiler: - gcc - clang os: - linux - osx + matrix: + allow_failures: + - os: linux + compiler: clang + addons: apt: packages: - gcc-multilib script: - make
5
0.25
5
0
141e09398d22974bbc5df58c6cfdc1f4505b1e83
app/models/map_layer.rb
app/models/map_layer.rb
class MapLayer < ActiveRecord::Base def self.table_name() "mapscan_layers" end belongs_to :layer belongs_to :map, :foreign_key => "mapscan_id" end
class MapLayer < ActiveRecord::Base def self.table_name() "mapscan_layers" end belongs_to :layer belongs_to :map, :foreign_key => "mapscan_id" validates_uniqueness_of :layer_id, :scope => :mapscan_id, :message => "Layer already has this map" end
Add validation to map layers join model to ensure that a map can not have multiple layers the same
Add validation to map layers join model to ensure that a map can not have multiple layers the same
Ruby
mit
NYPL/nypl-warper,nypl-spacetime/nypl-warper,mgiraldo/nypl-warper,mgiraldo/nypl-warper,mgiraldo/nypl-warper,mgiraldo/nypl-warper,NYPL/nypl-warper,NYPL/nypl-warper,nypl-spacetime/nypl-warper,NYPL/nypl-warper,mgiraldo/nypl-warper,mgiraldo/nypl-warper,nypl-spacetime/nypl-warper,nypl-spacetime/nypl-warper
ruby
## Code Before: class MapLayer < ActiveRecord::Base def self.table_name() "mapscan_layers" end belongs_to :layer belongs_to :map, :foreign_key => "mapscan_id" end ## Instruction: Add validation to map layers join model to ensure that a map can not have multiple layers the same ## Code After: class MapLayer < ActiveRecord::Base def self.table_name() "mapscan_layers" end belongs_to :layer belongs_to :map, :foreign_key => "mapscan_id" validates_uniqueness_of :layer_id, :scope => :mapscan_id, :message => "Layer already has this map" end
class MapLayer < ActiveRecord::Base def self.table_name() "mapscan_layers" end belongs_to :layer belongs_to :map, :foreign_key => "mapscan_id" + validates_uniqueness_of :layer_id, :scope => :mapscan_id, :message => "Layer already has this map" + end
2
0.285714
2
0
50b2be08ed2d074ed0da9b3e3c644f47ad9d7990
staging/src/k8s.io/kubelet/README.md
staging/src/k8s.io/kubelet/README.md
Implements [KEP 14 - Moving ComponentConfig API types to staging repos](https://git.k8s.io/enhancements/keps/sig-cluster-lifecycle/wgs/0014-20180707-componentconfig-api-types-to-staging.md#kubelet-changes) This repo provides external, versioned ComponentConfig API types for configuring the kubelet. These external types can easily be vendored and used by any third-party tool writing Kubernetes ComponentConfig objects. ## Compatibility HEAD of this repo will match HEAD of k8s.io/apiserver, k8s.io/apimachinery, and k8s.io/client-go. ## Where does it come from? This repo is synced from https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io/kubelet. Code changes are made in that location, merged into `k8s.io/kubernetes` and later synced here by a bot.
Implements [KEP 14 - Moving ComponentConfig API types to staging repos](https://git.k8s.io/enhancements/keps/sig-cluster-lifecycle/wgs/115-componentconfig/README.md#kubelet-changes) This repo provides external, versioned ComponentConfig API types for configuring the kubelet. These external types can easily be vendored and used by any third-party tool writing Kubernetes ComponentConfig objects. ## Compatibility HEAD of this repo will match HEAD of k8s.io/apiserver, k8s.io/apimachinery, and k8s.io/client-go. ## Where does it come from? This repo is synced from https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io/kubelet. Code changes are made in that location, merged into `k8s.io/kubernetes` and later synced here by a bot.
Modify the kubelet document url
Modify the kubelet document url
Markdown
apache-2.0
mikebrow/kubernetes,feiskyer/kubernetes,kubernetes/kubernetes,li-ang/kubernetes,kevin-wangzefeng/kubernetes,PiotrProkop/kubernetes,dixudx/kubernetes,bparees/kubernetes,tengqm/kubernetes,fabriziopandini/kubernetes,soltysh/kubernetes,chrislovecnm/kubernetes,MikeSpreitzer/kubernetes,monopole/kubernetes,mosoft521/kubernetes,iterion/kubernetes,liggitt/kubernetes,saad-ali/kubernetes,k82/kubernetes,saad-ali/kubernetes,verb/kubernetes,dereknex/kubernetes,fanzhangio/kubernetes,li-ang/kubernetes,weiwei04/kubernetes,rafax/kubernetes,olivierlemasle/kubernetes,idvoretskyi/kubernetes,dereknex/kubernetes,jsafrane/kubernetes,hex108/kubernetes,mahak/kubernetes,mkumatag/kubernetes,carlory/kubernetes,verult/kubernetes,enj/kubernetes,GulajavaMinistudio/kubernetes,bparees/kubernetes,ping035627/kubernetes,kubernetes/kubernetes,mfojtik/kubernetes,dereknex/kubernetes,Clarifai/kubernetes,wongma7/kubernetes,krmayankk/kubernetes,tpepper/kubernetes,mikedanese/kubernetes,sdminonne/kubernetes,ravilr/kubernetes,tengqm/kubernetes,ii/kubernetes,fanzhangio/kubernetes,spzala/kubernetes,dereknex/kubernetes,matthyx/kubernetes,jackfrancis/kubernetes,mosoft521/kubernetes,csrwng/kubernetes,dixudx/kubernetes,BenTheElder/kubernetes,nikhita/kubernetes,openshift/kubernetes,iterion/kubernetes,rafax/kubernetes,cofyc/kubernetes,x13n/kubernetes,idvoretskyi/kubernetes,dims/kubernetes,x13n/kubernetes,thockin/kubernetes,Clarifai/kubernetes,kevin-wangzefeng/kubernetes,dims/kubernetes,ingvagabund/kubernetes,spzala/kubernetes,csrwng/kubernetes,enj/kubernetes,carlory/kubernetes,jingxu97/kubernetes,deads2k/kubernetes,sdminonne/kubernetes,olivierlemasle/kubernetes,mkumatag/kubernetes,soltysh/kubernetes,jackfrancis/kubernetes,dixudx/kubernetes,mosoft521/kubernetes,zhouhaibing089/kubernetes,warmchang/kubernetes,jagosan/kubernetes,cblecker/kubernetes,weiwei04/kubernetes,humblec/kubernetes,feiskyer/kubernetes,jessfraz/kubernetes,verult/kubernetes,carlory/kubernetes,sdminonne/kubernetes,iameli/kubernetes,chestack/kubernetes,Acidburn0zzz/kubernetes,zhangmingld/kubernetes,PI-Victor/kubernetes,idvoretskyi/kubernetes,alejandroEsc/kubernetes,Clarifai/kubernetes,matthyx/kubernetes,openshift/kubernetes,ingvagabund/kubernetes,liggitt/kubernetes,kevin-wangzefeng/kubernetes,mengqiy/kubernetes,thockin/kubernetes,aledbf/kubernetes,shyamjvs/kubernetes,ping035627/kubernetes,k82cn/kubernetes,spzala/kubernetes,iterion/kubernetes,iameli/kubernetes,micahhausler/kubernetes,thockin/kubernetes,gnufied/kubernetes,fanzhangio/kubernetes,ingvagabund/kubernetes,tengqm/kubernetes,sdminonne/kubernetes,humblec/kubernetes,spzala/kubernetes,andrewrynhard/kubernetes,GulajavaMinistudio/kubernetes,soltysh/kubernetes,chrislovecnm/kubernetes,mkumatag/kubernetes,csrwng/kubernetes,li-ang/kubernetes,monopole/kubernetes,bparees/kubernetes,weiwei04/kubernetes,mikedanese/kubernetes,idvoretskyi/kubernetes,cofyc/kubernetes,mahak/kubernetes,PI-Victor/kubernetes,micahhausler/kubernetes,aledbf/kubernetes,mengqiy/kubernetes,rrati/kubernetes,li-ang/kubernetes,iameli/kubernetes,x13n/kubernetes,monopole/kubernetes,verult/kubernetes,nak3/kubernetes,zhangmingld/kubernetes,zhangmingld/kubernetes,iameli/kubernetes,andrewrynhard/kubernetes,enj/kubernetes,GulajavaMinistudio/kubernetes,PI-Victor/kubernetes,olivierlemasle/kubernetes,ingvagabund/kubernetes,deads2k/kubernetes,mikebrow/kubernetes,verult/kubernetes,chrislovecnm/kubernetes,lojies/kubernetes,lojies/kubernetes,liggitt/kubernetes,cblecker/kubernetes,mikebrow/kubernetes,nak3/kubernetes,cofyc/kubernetes,BenTheElder/kubernetes,zhouhaibing089/kubernetes,humblec/kubernetes,MikeSpreitzer/kubernetes,monopole/kubernetes,rafax/kubernetes,weiwei04/kubernetes,shyamjvs/kubernetes,tpepper/kubernetes,fanzhangio/kubernetes,csrwng/kubernetes,nckturner/kubernetes,matthyx/kubernetes,zhouhaibing089/kubernetes,ravilr/kubernetes,MikeSpreitzer/kubernetes,ravilr/kubernetes,Acidburn0zzz/kubernetes,fabriziopandini/kubernetes,fanzhangio/kubernetes,chrislovecnm/kubernetes,BenTheElder/kubernetes,mikedanese/kubernetes,x13n/kubernetes,mikedanese/kubernetes,PI-Victor/kubernetes,GulajavaMinistudio/kubernetes,gnufied/kubernetes,rnaveiras/kubernetes,iterion/kubernetes,fabriziopandini/kubernetes,tpepper/kubernetes,nckturner/kubernetes,mengqiy/kubernetes,roberthbailey/kubernetes,jagosan/kubernetes,nak3/kubernetes,micahhausler/kubernetes,mkumatag/kubernetes,zhangmingld/kubernetes,cofyc/kubernetes,feiskyer/kubernetes,jsafrane/kubernetes,mfojtik/kubernetes,MikeSpreitzer/kubernetes,k82/kubernetes,BenTheElder/kubernetes,iterion/kubernetes,weiwei04/kubernetes,warmchang/kubernetes,mosoft521/kubernetes,jessfraz/kubernetes,saad-ali/kubernetes,humblec/kubernetes,ping035627/kubernetes,kubernetes/kubernetes,jsafrane/kubernetes,x13n/kubernetes,andrewrynhard/kubernetes,verult/kubernetes,ii/kubernetes,tengqm/kubernetes,linux-on-ibm-z/kubernetes,liggitt/kubernetes,humblec/kubernetes,dereknex/kubernetes,dims/kubernetes,idvoretskyi/kubernetes,Acidburn0zzz/kubernetes,verb/kubernetes,dims/kubernetes,alejandroEsc/kubernetes,chestack/kubernetes,jackfrancis/kubernetes,Acidburn0zzz/kubernetes,krmayankk/kubernetes,roberthbailey/kubernetes,gnufied/kubernetes,dixudx/kubernetes,hex108/kubernetes,jsafrane/kubernetes,warmchang/kubernetes,nckturner/kubernetes,k82cn/kubernetes,PI-Victor/kubernetes,rrati/kubernetes,rnaveiras/kubernetes,jessfraz/kubernetes,nikhita/kubernetes,k82/kubernetes,kevin-wangzefeng/kubernetes,spzala/kubernetes,linux-on-ibm-z/kubernetes,wongma7/kubernetes,roberthbailey/kubernetes,PiotrProkop/kubernetes,mfojtik/kubernetes,soltysh/kubernetes,saad-ali/kubernetes,tengqm/kubernetes,verult/kubernetes,dims/kubernetes,nak3/kubernetes,Clarifai/kubernetes,hex108/kubernetes,hex108/kubernetes,cblecker/kubernetes,zhangmingld/kubernetes,ii/kubernetes,carlory/kubernetes,rafax/kubernetes,lojies/kubernetes,thockin/kubernetes,deads2k/kubernetes,lojies/kubernetes,gnufied/kubernetes,shyamjvs/kubernetes,openshift/kubernetes,jagosan/kubernetes,verb/kubernetes,nckturner/kubernetes,ravilr/kubernetes,rrati/kubernetes,BenTheElder/kubernetes,mikebrow/kubernetes,wongma7/kubernetes,PiotrProkop/kubernetes,jingxu97/kubernetes,k82cn/kubernetes,rrati/kubernetes,csrwng/kubernetes,jingxu97/kubernetes,linux-on-ibm-z/kubernetes,andrewrynhard/kubernetes,nak3/kubernetes,mahak/kubernetes,mahak/kubernetes,kubernetes/kubernetes,feiskyer/kubernetes,krmayankk/kubernetes,jessfraz/kubernetes,nak3/kubernetes,nikhita/kubernetes,tpepper/kubernetes,iameli/kubernetes,mosoft521/kubernetes,chestack/kubernetes,dixudx/kubernetes,jagosan/kubernetes,zhangmingld/kubernetes,jsafrane/kubernetes,dlorenc/kubernetes,ingvagabund/kubernetes,k82/kubernetes,tpepper/kubernetes,fanzhangio/kubernetes,MikeSpreitzer/kubernetes,saad-ali/kubernetes,alejandroEsc/kubernetes,cofyc/kubernetes,mikebrow/kubernetes,alejandroEsc/kubernetes,nikhita/kubernetes,rnaveiras/kubernetes,mengqiy/kubernetes,linux-on-ibm-z/kubernetes,deads2k/kubernetes,jackfrancis/kubernetes,Acidburn0zzz/kubernetes,idvoretskyi/kubernetes,sdminonne/kubernetes,bparees/kubernetes,li-ang/kubernetes,olivierlemasle/kubernetes,weiwei04/kubernetes,dereknex/kubernetes,linux-on-ibm-z/kubernetes,deads2k/kubernetes,mkumatag/kubernetes,feiskyer/kubernetes,olivierlemasle/kubernetes,wongma7/kubernetes,Clarifai/kubernetes,enj/kubernetes,ravilr/kubernetes,Clarifai/kubernetes,andrewrynhard/kubernetes,aledbf/kubernetes,ii/kubernetes,hex108/kubernetes,nckturner/kubernetes,carlory/kubernetes,jingxu97/kubernetes,PiotrProkop/kubernetes,verb/kubernetes,liggitt/kubernetes,monopole/kubernetes,saad-ali/kubernetes,matthyx/kubernetes,bparees/kubernetes,alejandroEsc/kubernetes,lojies/kubernetes,nikhita/kubernetes,mfojtik/kubernetes,chestack/kubernetes,krmayankk/kubernetes,fabriziopandini/kubernetes,ingvagabund/kubernetes,micahhausler/kubernetes,chestack/kubernetes,wongma7/kubernetes,cofyc/kubernetes,PiotrProkop/kubernetes,gnufied/kubernetes,rnaveiras/kubernetes,tpepper/kubernetes,kevin-wangzefeng/kubernetes,roberthbailey/kubernetes,kubernetes/kubernetes,PI-Victor/kubernetes,Acidburn0zzz/kubernetes,dlorenc/kubernetes,krmayankk/kubernetes,aledbf/kubernetes,chrislovecnm/kubernetes,hex108/kubernetes,fabriziopandini/kubernetes,cblecker/kubernetes,ii/kubernetes,x13n/kubernetes,dlorenc/kubernetes,mfojtik/kubernetes,thockin/kubernetes,rnaveiras/kubernetes,mahak/kubernetes,mfojtik/kubernetes,k82cn/kubernetes,ping035627/kubernetes,jagosan/kubernetes,mikedanese/kubernetes,warmchang/kubernetes,mengqiy/kubernetes,k82cn/kubernetes,openshift/kubernetes,verb/kubernetes,dlorenc/kubernetes,k82/kubernetes,jessfraz/kubernetes,jingxu97/kubernetes,warmchang/kubernetes,dlorenc/kubernetes,enj/kubernetes,aledbf/kubernetes,shyamjvs/kubernetes,iterion/kubernetes,jackfrancis/kubernetes,GulajavaMinistudio/kubernetes,openshift/kubernetes,chrislovecnm/kubernetes,micahhausler/kubernetes,andrewrynhard/kubernetes,ping035627/kubernetes,dlorenc/kubernetes,rrati/kubernetes,cblecker/kubernetes,zhouhaibing089/kubernetes,matthyx/kubernetes,soltysh/kubernetes,shyamjvs/kubernetes,krmayankk/kubernetes,zhouhaibing089/kubernetes,roberthbailey/kubernetes
markdown
## Code Before: Implements [KEP 14 - Moving ComponentConfig API types to staging repos](https://git.k8s.io/enhancements/keps/sig-cluster-lifecycle/wgs/0014-20180707-componentconfig-api-types-to-staging.md#kubelet-changes) This repo provides external, versioned ComponentConfig API types for configuring the kubelet. These external types can easily be vendored and used by any third-party tool writing Kubernetes ComponentConfig objects. ## Compatibility HEAD of this repo will match HEAD of k8s.io/apiserver, k8s.io/apimachinery, and k8s.io/client-go. ## Where does it come from? This repo is synced from https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io/kubelet. Code changes are made in that location, merged into `k8s.io/kubernetes` and later synced here by a bot. ## Instruction: Modify the kubelet document url ## Code After: Implements [KEP 14 - Moving ComponentConfig API types to staging repos](https://git.k8s.io/enhancements/keps/sig-cluster-lifecycle/wgs/115-componentconfig/README.md#kubelet-changes) This repo provides external, versioned ComponentConfig API types for configuring the kubelet. These external types can easily be vendored and used by any third-party tool writing Kubernetes ComponentConfig objects. ## Compatibility HEAD of this repo will match HEAD of k8s.io/apiserver, k8s.io/apimachinery, and k8s.io/client-go. ## Where does it come from? This repo is synced from https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io/kubelet. Code changes are made in that location, merged into `k8s.io/kubernetes` and later synced here by a bot.
- Implements [KEP 14 - Moving ComponentConfig API types to staging repos](https://git.k8s.io/enhancements/keps/sig-cluster-lifecycle/wgs/0014-20180707-componentconfig-api-types-to-staging.md#kubelet-changes) ? -- ---- ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ + Implements [KEP 14 - Moving ComponentConfig API types to staging repos](https://git.k8s.io/enhancements/keps/sig-cluster-lifecycle/wgs/115-componentconfig/README.md#kubelet-changes) ? ^ ^^^^^^^ This repo provides external, versioned ComponentConfig API types for configuring the kubelet. These external types can easily be vendored and used by any third-party tool writing Kubernetes ComponentConfig objects. ## Compatibility HEAD of this repo will match HEAD of k8s.io/apiserver, k8s.io/apimachinery, and k8s.io/client-go. ## Where does it come from? This repo is synced from https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io/kubelet. Code changes are made in that location, merged into `k8s.io/kubernetes` and later synced here by a bot.
2
0.133333
1
1
fd317da65f472e2a34698cc076bd4faf559a0624
elements/_input.scss
elements/_input.scss
// // + Input // ============================================================================= input { @include padding(x 16, em); border-radius: em($border-radius); outline: unset; background-color: $white; color: $color-first-8; box-shadow: $border; &[type='text'] { &:focus { box-shadow: inset 0 0 0 em($border-thickness) remove-alpha($border-color, $color-first-3); } } // Buttons &[type='button'], &[type='submit'] { &:hover, &:focus { background-color: $color-first-2; } &:active { background-color: $color-first-3; } } @at-root .transparent & { background-color: unset; &:focus { box-shadow: inset 0 0 0 em($border-thickness) layer-colors($border-color, $color-first-2); } } }
// // + Input // ============================================================================= input { @include padding(x 16, em); height: em(32); // Same height as <button> border-radius: em($border-radius); outline: unset; background-color: $white; color: $color-first-8; box-shadow: $border; &[type='text'] { &:focus { box-shadow: inset 0 0 0 em($border-thickness) remove-alpha($border-color, $color-first-3); } } // Buttons &[type='button'], &[type='submit'] { &:hover, &:focus { background-color: remove-alpha($color-first-2, $white); } &:active { background-color: remove-alpha($color-first-3, $white); } @at-root .transparent & { // THIS COULD BE A PLACEHOLDER?? IT'S ALSO USED IN BUTTON &:hover, &:focus { background-color: $color-first-2; } &:active { background-color: $color-first-3; } } } @at-root .transparent & { background-color: unset; &:focus { box-shadow: inset 0 0 0 em($border-thickness) layer-colors($border-color, $color-first-2); } } }
Improve and add transparency to input button
Improve and add transparency to input button
SCSS
mit
dustindowell22/buckle
scss
## Code Before: // // + Input // ============================================================================= input { @include padding(x 16, em); border-radius: em($border-radius); outline: unset; background-color: $white; color: $color-first-8; box-shadow: $border; &[type='text'] { &:focus { box-shadow: inset 0 0 0 em($border-thickness) remove-alpha($border-color, $color-first-3); } } // Buttons &[type='button'], &[type='submit'] { &:hover, &:focus { background-color: $color-first-2; } &:active { background-color: $color-first-3; } } @at-root .transparent & { background-color: unset; &:focus { box-shadow: inset 0 0 0 em($border-thickness) layer-colors($border-color, $color-first-2); } } } ## Instruction: Improve and add transparency to input button ## Code After: // // + Input // ============================================================================= input { @include padding(x 16, em); height: em(32); // Same height as <button> border-radius: em($border-radius); outline: unset; background-color: $white; color: $color-first-8; box-shadow: $border; &[type='text'] { &:focus { box-shadow: inset 0 0 0 em($border-thickness) remove-alpha($border-color, $color-first-3); } } // Buttons &[type='button'], &[type='submit'] { &:hover, &:focus { background-color: remove-alpha($color-first-2, $white); } &:active { background-color: remove-alpha($color-first-3, $white); } @at-root .transparent & { // THIS COULD BE A PLACEHOLDER?? IT'S ALSO USED IN BUTTON &:hover, &:focus { background-color: $color-first-2; } &:active { background-color: $color-first-3; } } } @at-root .transparent & { background-color: unset; &:focus { box-shadow: inset 0 0 0 em($border-thickness) layer-colors($border-color, $color-first-2); } } }
// // + Input // ============================================================================= input { @include padding(x 16, em); + height: em(32); // Same height as <button> border-radius: em($border-radius); outline: unset; background-color: $white; color: $color-first-8; box-shadow: $border; &[type='text'] { &:focus { box-shadow: inset 0 0 0 em($border-thickness) remove-alpha($border-color, $color-first-3); } } // Buttons &[type='button'], &[type='submit'] { &:hover, &:focus { - background-color: $color-first-2; + background-color: remove-alpha($color-first-2, $white); ? +++++++++++++ +++++++++ } &:active { + background-color: remove-alpha($color-first-3, $white); + } + + @at-root .transparent & { // THIS COULD BE A PLACEHOLDER?? IT'S ALSO USED IN BUTTON + &:hover, + &:focus { + background-color: $color-first-2; + } + + &:active { - background-color: $color-first-3; + background-color: $color-first-3; ? ++ + } } } @at-root .transparent & { background-color: unset; &:focus { box-shadow: inset 0 0 0 em($border-thickness) layer-colors($border-color, $color-first-2); } } }
16
0.4
14
2