commit
stringlengths 40
40
| old_file
stringlengths 4
237
| new_file
stringlengths 4
237
| old_contents
stringlengths 1
4.24k
| new_contents
stringlengths 5
4.84k
| subject
stringlengths 15
778
| message
stringlengths 16
6.86k
| lang
stringlengths 1
30
| license
stringclasses 13
values | repos
stringlengths 5
116k
| config
stringlengths 1
30
| content
stringlengths 105
8.72k
|
---|---|---|---|---|---|---|---|---|---|---|---|
554652724e18814d4b0f297ca5ce8ed327524d78
|
schema/StudentInsertCoursework.sql
|
schema/StudentInsertCoursework.sql
|
insert into Coursework(title,date_submitted,file,student_user_id,class_id)
values (?,now(),?,?,?);
|
insert into Coursework(title,date_submitted,file,file_extension,student_user_id,class_id)
values (?,now(),?,?,?,?);
|
Modify to match new column data for Coursework table
|
Modify to match new column data for Coursework table
|
SQL
|
apache-2.0
|
Daytron/revworks
|
sql
|
## Code Before:
insert into Coursework(title,date_submitted,file,student_user_id,class_id)
values (?,now(),?,?,?);
## Instruction:
Modify to match new column data for Coursework table
## Code After:
insert into Coursework(title,date_submitted,file,file_extension,student_user_id,class_id)
values (?,now(),?,?,?,?);
|
2e3fce7ecd8af7925edc8713c35ba2fc3f00e4ee
|
atlasdb-ete-tests/docker/conf/atlasdb-ete.cassandra.yml
|
atlasdb-ete-tests/docker/conf/atlasdb-ete.cassandra.yml
|
server:
#rootPath: /api/*
#applicationContextPath: /
#adminContextPath: /
applicationConnectors:
- type: http
port: 3828
adminConnectors:
- type: http
port: 3829
atlasdb:
keyValueService:
type: cassandra
servers:
- cassandra:9160
poolSize: 20
keyspace: atlasete
credentials:
username: cassandra
password: cassandra
ssl: false
replicationFactor: 1
mutationBatchCount: 10000
mutationBatchSizeBytes: 10000000
fetchBatchCount: 1000
safetyDisabled: false
autoRefreshNodes: false
leader:
quorumSize: 2
learnerLogDir: var/data/paxosLog/learner1
acceptorLogDir: var/data/paxosLog/acceptor1
localServer: http://${ME}:3828
lockCreator: http://ete1:3828
leaders:
- http://ete1:3828
- http://ete2:3828
- http://ete3:3828
|
server:
#rootPath: /api/*
#applicationContextPath: /
#adminContextPath: /
applicationConnectors:
- type: http
port: 3828
adminConnectors:
- type: http
port: 3829
atlasdb:
keyValueService:
type: cassandra
servers:
- cassandra:9160
poolSize: 20
keyspace: atlasete
credentials:
username: cassandra
password: cassandra
ssl: false
replicationFactor: 1
mutationBatchCount: 10000
mutationBatchSizeBytes: 10000000
fetchBatchCount: 1000
safetyDisabled: false
autoRefreshNodes: false
leader:
quorumSize: 2
learnerLogDir: var/data/paxosLog/learner1
acceptorLogDir: var/data/paxosLog/acceptor1
localServer: http://${ME}:3828
leaders:
- http://ete1:3828
- http://ete2:3828
- http://ete3:3828
|
Remove wrong config value from ETE tests
|
Remove wrong config value from ETE tests
|
YAML
|
apache-2.0
|
palantir/atlasdb,EvilMcJerkface/atlasdb,EvilMcJerkface/atlasdb,EvilMcJerkface/atlasdb,palantir/atlasdb,palantir/atlasdb
|
yaml
|
## Code Before:
server:
#rootPath: /api/*
#applicationContextPath: /
#adminContextPath: /
applicationConnectors:
- type: http
port: 3828
adminConnectors:
- type: http
port: 3829
atlasdb:
keyValueService:
type: cassandra
servers:
- cassandra:9160
poolSize: 20
keyspace: atlasete
credentials:
username: cassandra
password: cassandra
ssl: false
replicationFactor: 1
mutationBatchCount: 10000
mutationBatchSizeBytes: 10000000
fetchBatchCount: 1000
safetyDisabled: false
autoRefreshNodes: false
leader:
quorumSize: 2
learnerLogDir: var/data/paxosLog/learner1
acceptorLogDir: var/data/paxosLog/acceptor1
localServer: http://${ME}:3828
lockCreator: http://ete1:3828
leaders:
- http://ete1:3828
- http://ete2:3828
- http://ete3:3828
## Instruction:
Remove wrong config value from ETE tests
## Code After:
server:
#rootPath: /api/*
#applicationContextPath: /
#adminContextPath: /
applicationConnectors:
- type: http
port: 3828
adminConnectors:
- type: http
port: 3829
atlasdb:
keyValueService:
type: cassandra
servers:
- cassandra:9160
poolSize: 20
keyspace: atlasete
credentials:
username: cassandra
password: cassandra
ssl: false
replicationFactor: 1
mutationBatchCount: 10000
mutationBatchSizeBytes: 10000000
fetchBatchCount: 1000
safetyDisabled: false
autoRefreshNodes: false
leader:
quorumSize: 2
learnerLogDir: var/data/paxosLog/learner1
acceptorLogDir: var/data/paxosLog/acceptor1
localServer: http://${ME}:3828
leaders:
- http://ete1:3828
- http://ete2:3828
- http://ete3:3828
|
9bee186245020a5a7e3e4c34b48c4965514887dc
|
app/views/search/opensearch.xml
|
app/views/search/opensearch.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>GOV.UK</ShortName>
<Description>Search GOV.UK - The best place to find government services and information.</Description>
<Url type="text/html" template="https://www.gov.uk/search?q={searchTerms}"/>
</OpenSearchDescription>
|
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>GOV.UK</ShortName>
<Description>Search GOV.UK - The best place to find government services and information.</Description>
<Url type="text/html" template="https://www.gov.uk/search/all?keywords={searchTerms}"/>
</OpenSearchDescription>
|
Change Google Chrome config to search with new finder This tells Google Chrome that if users tab when typing 'gov.uk' to use the new finder and the correct parameter
|
Change Google Chrome config to search with new finder
This tells Google Chrome that if users tab when typing 'gov.uk' to
use the new finder and the correct parameter
Trello: https://trello.com/c/Rr6BrjXi/453-configure-chrome-address-bar-search-to-know-where-our-site-search-is-s
|
XML
|
mit
|
alphagov/finder-frontend,alphagov/finder-frontend,alphagov/finder-frontend,alphagov/finder-frontend
|
xml
|
## Code Before:
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>GOV.UK</ShortName>
<Description>Search GOV.UK - The best place to find government services and information.</Description>
<Url type="text/html" template="https://www.gov.uk/search?q={searchTerms}"/>
</OpenSearchDescription>
## Instruction:
Change Google Chrome config to search with new finder
This tells Google Chrome that if users tab when typing 'gov.uk' to
use the new finder and the correct parameter
Trello: https://trello.com/c/Rr6BrjXi/453-configure-chrome-address-bar-search-to-know-where-our-site-search-is-s
## Code After:
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>GOV.UK</ShortName>
<Description>Search GOV.UK - The best place to find government services and information.</Description>
<Url type="text/html" template="https://www.gov.uk/search/all?keywords={searchTerms}"/>
</OpenSearchDescription>
|
8161e8c4bb9f5249f6915497db3c523182dd874d
|
app/css/_comment_icon.scss
|
app/css/_comment_icon.scss
|
%comment-icon {
@extend %default-font;
font-weight: bold;
-webkit-font-smoothing: auto;
position: relative;
display: inline-block;
min-width: 1.4em;
height: 1.1em;
border-radius: 0.25em;
padding: 0 0.2em;
line-height: 1;
vertical-align: text-top;
text-align: center;
-moz-box-sizing: border-box; box-sizing: border-box;
}
%comment-icon-triangle {
position: absolute;
display: block;
top: 1em;
left: 20%;
border-style: solid;
border-width: 0.43em 0.55em 0 0;
border-color: transparent;
}
|
%comment-icon {
@extend %default-font;
font-weight: bold;
-webkit-font-smoothing: auto;
position: relative;
display: inline-block;
min-width: 1.4em;
height: 1.1em;
border-radius: 0.25em;
padding: 0 0.2em;
line-height: 1;
vertical-align: baseline;
top: -0.15em;
text-align: center;
-moz-box-sizing: border-box; box-sizing: border-box;
}
%comment-icon-triangle {
position: absolute;
display: block;
top: 1em;
left: 20%;
border-style: solid;
border-width: 0.43em 0.55em 0 0;
border-color: transparent;
}
|
Use vertical-align baseline as this doesn't depend on the font and looks better in most cases
|
Use vertical-align baseline as this doesn't depend on the font and looks better in most cases
|
SCSS
|
mit
|
Factlink/js-library,Factlink/js-library,Factlink/js-library
|
scss
|
## Code Before:
%comment-icon {
@extend %default-font;
font-weight: bold;
-webkit-font-smoothing: auto;
position: relative;
display: inline-block;
min-width: 1.4em;
height: 1.1em;
border-radius: 0.25em;
padding: 0 0.2em;
line-height: 1;
vertical-align: text-top;
text-align: center;
-moz-box-sizing: border-box; box-sizing: border-box;
}
%comment-icon-triangle {
position: absolute;
display: block;
top: 1em;
left: 20%;
border-style: solid;
border-width: 0.43em 0.55em 0 0;
border-color: transparent;
}
## Instruction:
Use vertical-align baseline as this doesn't depend on the font and looks better in most cases
## Code After:
%comment-icon {
@extend %default-font;
font-weight: bold;
-webkit-font-smoothing: auto;
position: relative;
display: inline-block;
min-width: 1.4em;
height: 1.1em;
border-radius: 0.25em;
padding: 0 0.2em;
line-height: 1;
vertical-align: baseline;
top: -0.15em;
text-align: center;
-moz-box-sizing: border-box; box-sizing: border-box;
}
%comment-icon-triangle {
position: absolute;
display: block;
top: 1em;
left: 20%;
border-style: solid;
border-width: 0.43em 0.55em 0 0;
border-color: transparent;
}
|
06bd3b2846354aeef1bc57eb644911f1c02c65b2
|
tests/CMakeLists.txt
|
tests/CMakeLists.txt
|
project(tests)
enable_testing()
add_definitions(-DTEST=1)
find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Test REQUIRED)
find_package(Qt5Widgets REQUIRED)
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Test Qt5::Widgets)
file(GLOB_RECURSE SOURCES "src/*.cpp")
include(ListFilterRegex)
listFilterRegex(SOURCES "vendor")
include_directories("src/" "../lib/src/")
add_executable(${PROJECT_NAME} ${SOURCES})
add_test(${PROJECT_NAME} ${PROJECT_NAME})
target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES} lib)
add_subdirectory(languages)
# Pre-compiled header
if(USE_PCH)
cotire(${PROJECT_NAME})
endif()
|
project(tests)
enable_testing()
add_definitions(-DTEST=1)
if(DEFINED HEADLESS)
add_definitions(-DHEADLESS=1)
endif()
find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Test REQUIRED)
find_package(Qt5Widgets REQUIRED)
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Test Qt5::Widgets)
file(GLOB_RECURSE SOURCES "src/*.cpp")
include(ListFilterRegex)
listFilterRegex(SOURCES "vendor")
include_directories("src/" "../lib/src/")
add_executable(${PROJECT_NAME} ${SOURCES})
add_test(${PROJECT_NAME} ${PROJECT_NAME})
target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES} lib)
add_subdirectory(languages)
# Pre-compiled header
if(USE_PCH)
cotire(${PROJECT_NAME})
endif()
|
Allow to run tests without a X server
|
Allow to run tests without a X server
|
Text
|
apache-2.0
|
Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber
|
text
|
## Code Before:
project(tests)
enable_testing()
add_definitions(-DTEST=1)
find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Test REQUIRED)
find_package(Qt5Widgets REQUIRED)
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Test Qt5::Widgets)
file(GLOB_RECURSE SOURCES "src/*.cpp")
include(ListFilterRegex)
listFilterRegex(SOURCES "vendor")
include_directories("src/" "../lib/src/")
add_executable(${PROJECT_NAME} ${SOURCES})
add_test(${PROJECT_NAME} ${PROJECT_NAME})
target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES} lib)
add_subdirectory(languages)
# Pre-compiled header
if(USE_PCH)
cotire(${PROJECT_NAME})
endif()
## Instruction:
Allow to run tests without a X server
## Code After:
project(tests)
enable_testing()
add_definitions(-DTEST=1)
if(DEFINED HEADLESS)
add_definitions(-DHEADLESS=1)
endif()
find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Test REQUIRED)
find_package(Qt5Widgets REQUIRED)
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Test Qt5::Widgets)
file(GLOB_RECURSE SOURCES "src/*.cpp")
include(ListFilterRegex)
listFilterRegex(SOURCES "vendor")
include_directories("src/" "../lib/src/")
add_executable(${PROJECT_NAME} ${SOURCES})
add_test(${PROJECT_NAME} ${PROJECT_NAME})
target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES} lib)
add_subdirectory(languages)
# Pre-compiled header
if(USE_PCH)
cotire(${PROJECT_NAME})
endif()
|
7c7be4572e3713ab2d96a533c21ee2c4fc88ec8d
|
requirements/base.txt
|
requirements/base.txt
|
Django==1.9.12
django-analytical==2.2.1
django-bootstrap-form==3.2.1
django-jsonfield==0.9.13
django-markdown==0.8.4
django-markitup==3.0.0
django-multiselectfield==0.1.5
djangorestframework==3.3.3
Fabric==1.12.0
fabtools==0.19.0
gunicorn==19.6.0
Pillow==3.3.1
pinax-eventlog==1.1.2
pip==9.0.1
psycopg2==2.6.2
pytz==2016.6.1
setuptools==34.0.2
six==1.10.0
unicodecsv==0.14.1
wagtail==1.8
wagtailmenus==2.1.2
virtualenv==15.1.0
git+git://github.com/pydata/symposion.git@983ec0045f34f480059e5b2#egg=symposion
|
Django==1.9.12
django-analytical==2.2.1
django-bootstrap-form==3.2.1
django-jsonfield==0.9.13
django-markdown==0.8.4
django-markitup==3.0.0
django-multiselectfield==0.1.5
djangorestframework==3.3.3
Fabric==1.12.0
fabtools==0.19.0
gunicorn==19.6.0
Pillow==3.3.1
pinax-eventlog==1.1.2
pip==9.0.1
psycopg2==2.6.2
pytz==2016.6.1
unicodecsv==0.14.1
wagtail==1.8
wagtailmenus==2.1.2
virtualenv==15.1.0
git+git://github.com/pydata/symposion.git@983ec0045f34f480059e5b2#egg=symposion
|
Remove setuptools and six from requirements.
|
Remove setuptools and six from requirements.
See #142 and #143 - pinning these two packages are
ineffective/incomplete solutions to the problem (the required packages
on each conference site server is being run by the system's pip instead
of the virtualenv's).
|
Text
|
mit
|
pydata/conf_site,pydata/conf_site,pydata/conf_site
|
text
|
## Code Before:
Django==1.9.12
django-analytical==2.2.1
django-bootstrap-form==3.2.1
django-jsonfield==0.9.13
django-markdown==0.8.4
django-markitup==3.0.0
django-multiselectfield==0.1.5
djangorestframework==3.3.3
Fabric==1.12.0
fabtools==0.19.0
gunicorn==19.6.0
Pillow==3.3.1
pinax-eventlog==1.1.2
pip==9.0.1
psycopg2==2.6.2
pytz==2016.6.1
setuptools==34.0.2
six==1.10.0
unicodecsv==0.14.1
wagtail==1.8
wagtailmenus==2.1.2
virtualenv==15.1.0
git+git://github.com/pydata/symposion.git@983ec0045f34f480059e5b2#egg=symposion
## Instruction:
Remove setuptools and six from requirements.
See #142 and #143 - pinning these two packages are
ineffective/incomplete solutions to the problem (the required packages
on each conference site server is being run by the system's pip instead
of the virtualenv's).
## Code After:
Django==1.9.12
django-analytical==2.2.1
django-bootstrap-form==3.2.1
django-jsonfield==0.9.13
django-markdown==0.8.4
django-markitup==3.0.0
django-multiselectfield==0.1.5
djangorestframework==3.3.3
Fabric==1.12.0
fabtools==0.19.0
gunicorn==19.6.0
Pillow==3.3.1
pinax-eventlog==1.1.2
pip==9.0.1
psycopg2==2.6.2
pytz==2016.6.1
unicodecsv==0.14.1
wagtail==1.8
wagtailmenus==2.1.2
virtualenv==15.1.0
git+git://github.com/pydata/symposion.git@983ec0045f34f480059e5b2#egg=symposion
|
18e65ebf891126591ec56d86ff0c275f77ad9671
|
index.html
|
index.html
|
<DOCTYPE html>
<html lang="en">
<head>
<title>Williams Soaring Price Calculator</title>
<script src="calculator.js" type="text/javascript"></script>
<link rel="stylesheet" href="style1.css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
</head>
<body>
<div id="inputForm">
<select id="airplaneSel">
<option value="ASK-21"></option>
<option value="Duo Discus X"></option>
<option value="ASK-23"></option>
<option value="ASW-24"></option>
<option value="Your Glider"></option>
</select>
</div>
</body>
</html>
|
<DOCTYPE html>
<html lang="en">
<head>
<title>Williams Soaring Price Calculator</title>
<script src="calculator.js" type="text/javascript"></script>
<link rel="stylesheet" href="style1.css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
</head>
<body>
<div id="inputForm">
<select id="airplaneSel">
<option value="ASK-21">ASK-21</option>
<option value="DUO-X">DUO Discus X</option>
<option value="ASK-23">ASK-23</option>
<option value="ASW-24">ASW-24</option>
<option value="Yours">Your Glider</option>
</select>
</div>
</body>
</html>
|
Put the name of the select in between the tags, will see if that works.
|
Put the name of the select in between the tags, will see if that works.
|
HTML
|
agpl-3.0
|
sgoblin/wsc-pricecalc,sgoblin/wsc-pricecalc
|
html
|
## Code Before:
<DOCTYPE html>
<html lang="en">
<head>
<title>Williams Soaring Price Calculator</title>
<script src="calculator.js" type="text/javascript"></script>
<link rel="stylesheet" href="style1.css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
</head>
<body>
<div id="inputForm">
<select id="airplaneSel">
<option value="ASK-21"></option>
<option value="Duo Discus X"></option>
<option value="ASK-23"></option>
<option value="ASW-24"></option>
<option value="Your Glider"></option>
</select>
</div>
</body>
</html>
## Instruction:
Put the name of the select in between the tags, will see if that works.
## Code After:
<DOCTYPE html>
<html lang="en">
<head>
<title>Williams Soaring Price Calculator</title>
<script src="calculator.js" type="text/javascript"></script>
<link rel="stylesheet" href="style1.css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
</head>
<body>
<div id="inputForm">
<select id="airplaneSel">
<option value="ASK-21">ASK-21</option>
<option value="DUO-X">DUO Discus X</option>
<option value="ASK-23">ASK-23</option>
<option value="ASW-24">ASW-24</option>
<option value="Yours">Your Glider</option>
</select>
</div>
</body>
</html>
|
328433cbfb303f2972a816fd2ff1f7a171ad277a
|
README.md
|
README.md
|
The Exponent Development Library
## Building Watchman
Configure with `./configure --disable-statedir` to use TMPDIR for the watchman state.
|
The Exponent Development Library.
[Documentation](https://docs.getexponent.com/versions/devdocs/index.html)
## Building Watchman
Configure with `./configure --disable-statedir` to use TMPDIR for the watchman state.
|
Add documentation link to readme
|
Add documentation link to readme
fbshipit-source-id: 426f4d8
|
Markdown
|
mit
|
exponentjs/xdl,exponentjs/xdl,exponentjs/xdl
|
markdown
|
## Code Before:
The Exponent Development Library
## Building Watchman
Configure with `./configure --disable-statedir` to use TMPDIR for the watchman state.
## Instruction:
Add documentation link to readme
fbshipit-source-id: 426f4d8
## Code After:
The Exponent Development Library.
[Documentation](https://docs.getexponent.com/versions/devdocs/index.html)
## Building Watchman
Configure with `./configure --disable-statedir` to use TMPDIR for the watchman state.
|
4641e2a05de38767f98714a7fea1e46a6a43f710
|
src/components/class-component.php
|
src/components/class-component.php
|
<?php
namespace Xu\Components;
use Xu\Foundation\Foundation;
/**
* Component class.
*/
abstract class Component {
/**
* xu instance.
*
* @var \Xu\Foundation\Xu
*/
protected $xu;
/**
* Create a new component instance.
*
* @param \Xu\Foundation\Foundation $xu
*/
public function __construct( Foundation $xu ) {
$this->xu = $xu;
}
/**
* Bootstrap the component.
*
* @codeCoverageIgnore
*/
public function bootstrap() {
}
/**
* Return the given object. Useful for chaining.
*
* @param mixed $obj
*
* @return mixed
*/
protected function with( $obj ) {
return $obj;
}
}
|
<?php
namespace Xu\Components;
use Xu\Contracts\Foundation\Foundation as FoundationContract;
/**
* Component class.
*/
abstract class Component {
/**
* xu instance.
*
* @var \Xu\Contracts\Foundation\Foundation
*/
protected $xu;
/**
* Create a new component instance.
*
* @param \Xu\Contracts\Foundation\Foundation $xu
*/
public function __construct( FoundationContract $xu ) {
$this->xu = $xu;
}
/**
* Bootstrap the component.
*
* @codeCoverageIgnore
*/
public function bootstrap() {
}
/**
* Return the given object. Useful for chaining.
*
* @param mixed $obj
*
* @return mixed
*/
protected function with( $obj ) {
return $obj;
}
}
|
Update component class to take foundation contract
|
Update component class to take foundation contract
|
PHP
|
mit
|
wp-xu/xu,wp-xu/framework
|
php
|
## Code Before:
<?php
namespace Xu\Components;
use Xu\Foundation\Foundation;
/**
* Component class.
*/
abstract class Component {
/**
* xu instance.
*
* @var \Xu\Foundation\Xu
*/
protected $xu;
/**
* Create a new component instance.
*
* @param \Xu\Foundation\Foundation $xu
*/
public function __construct( Foundation $xu ) {
$this->xu = $xu;
}
/**
* Bootstrap the component.
*
* @codeCoverageIgnore
*/
public function bootstrap() {
}
/**
* Return the given object. Useful for chaining.
*
* @param mixed $obj
*
* @return mixed
*/
protected function with( $obj ) {
return $obj;
}
}
## Instruction:
Update component class to take foundation contract
## Code After:
<?php
namespace Xu\Components;
use Xu\Contracts\Foundation\Foundation as FoundationContract;
/**
* Component class.
*/
abstract class Component {
/**
* xu instance.
*
* @var \Xu\Contracts\Foundation\Foundation
*/
protected $xu;
/**
* Create a new component instance.
*
* @param \Xu\Contracts\Foundation\Foundation $xu
*/
public function __construct( FoundationContract $xu ) {
$this->xu = $xu;
}
/**
* Bootstrap the component.
*
* @codeCoverageIgnore
*/
public function bootstrap() {
}
/**
* Return the given object. Useful for chaining.
*
* @param mixed $obj
*
* @return mixed
*/
protected function with( $obj ) {
return $obj;
}
}
|
22d68da72421c17ee15e0c7be71740b10a93ee9e
|
testing/platform_test.h
|
testing/platform_test.h
|
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef TESTING_PLATFORM_TEST_H_
#define TESTING_PLATFORM_TEST_H_
#include <gtest/gtest.h>
#if defined(GTEST_OS_MAC)
#ifdef __OBJC__
@class NSAutoreleasePool;
#else
class NSAutoreleasePool;
#endif
// The purpose of this class us to provide a hook for platform-specific
// operations across unit tests. For example, on the Mac, it creates and
// releases an outer NSAutoreleasePool for each test case. For now, it's only
// implemented on the Mac. To enable this for another platform, just adjust
// the #ifdefs and add a platform_test_<platform>.cc implementation file.
class PlatformTest : public testing::Test {
protected:
PlatformTest();
virtual ~PlatformTest();
private:
NSAutoreleasePool* pool_;
};
#else
typedef testing::Test PlatformTest;
#endif // GTEST_OS_MAC
#endif // TESTING_PLATFORM_TEST_H_
|
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef TESTING_PLATFORM_TEST_H_
#define TESTING_PLATFORM_TEST_H_
#include <gtest/gtest.h>
#if defined(GTEST_OS_MAC)
#ifdef __OBJC__
@class NSAutoreleasePool;
#else
class NSAutoreleasePool;
#endif
// The purpose of this class us to provide a hook for platform-specific
// operations across unit tests. For example, on the Mac, it creates and
// releases an outer NSAutoreleasePool for each test case. For now, it's only
// implemented on the Mac. To enable this for another platform, just adjust
// the #ifdefs and add a platform_test_<platform>.cc implementation file.
class PlatformTest : public testing::Test {
public:
virtual ~PlatformTest();
protected:
PlatformTest();
private:
NSAutoreleasePool* pool_;
};
#else
typedef testing::Test PlatformTest;
#endif // GTEST_OS_MAC
#endif // TESTING_PLATFORM_TEST_H_
|
Change visibility of the destructor to public.
|
Change visibility of the destructor to public.
PlatformTest's destructor was set as protected, though the parent class
testing::Test declares it public.
BUG=none
Review URL: https://chromiumcodereview.appspot.com/11038058
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@161352 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
pozdnyakov/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,patrickm/chromium.src,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,patrickm/chromium.src,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,pozdnyakov/chromium-crosswalk,axinging/chromium-crosswalk,dushu1203/chromium.src,dushu1203/chromium.src,timopulkkinen/BubbleFish,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,hgl888/chromium-crosswalk,bright-sparks/chromium-spacewalk,PeterWangIntel/chromium-crosswalk,mogoweb/chromium-crosswalk,hujiajie/pa-chromium,dednal/chromium.src,mogoweb/chromium-crosswalk,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,dushu1203/chromium.src,axinging/chromium-crosswalk,ondra-novak/chromium.src,anirudhSK/chromium,zcbenz/cefode-chromium,Fireblend/chromium-crosswalk,nacl-webkit/chrome_deps,hujiajie/pa-chromium,junmin-zhu/chromium-rivertrail,ChromiumWebApps/chromium,ChromiumWebApps/chromium,krieger-od/nwjs_chromium.src,junmin-zhu/chromium-rivertrail,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,ondra-novak/chromium.src,mogoweb/chromium-crosswalk,dushu1203/chromium.src,dednal/chromium.src,hgl888/chromium-crosswalk,Chilledheart/chromium,nacl-webkit/chrome_deps,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,anirudhSK/chromium,anirudhSK/chromium,krieger-od/nwjs_chromium.src,ltilve/chromium,Just-D/chromium-1,dednal/chromium.src,markYoungH/chromium.src,Just-D/chromium-1,jaruba/chromium.src,nacl-webkit/chrome_deps,junmin-zhu/chromium-rivertrail,hujiajie/pa-chromium,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,ltilve/chromium,markYoungH/chromium.src,junmin-zhu/chromium-rivertrail,pozdnyakov/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,markYoungH/chromium.src,M4sse/chromium.src,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,littlstar/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,Jonekee/chromium.src,patrickm/chromium.src,littlstar/chromium.src,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,patrickm/chromium.src,ChromiumWebApps/chromium,ltilve/chromium,timopulkkinen/BubbleFish,Chilledheart/chromium,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,mogoweb/chromium-crosswalk,nacl-webkit/chrome_deps,dednal/chromium.src,dednal/chromium.src,patrickm/chromium.src,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,zcbenz/cefode-chromium,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,ChromiumWebApps/chromium,axinging/chromium-crosswalk,markYoungH/chromium.src,ondra-novak/chromium.src,dednal/chromium.src,littlstar/chromium.src,Jonekee/chromium.src,chuan9/chromium-crosswalk,Chilledheart/chromium,timopulkkinen/BubbleFish,ltilve/chromium,littlstar/chromium.src,M4sse/chromium.src,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,dednal/chromium.src,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,crosswalk-project/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,ltilve/chromium,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,dushu1203/chromium.src,patrickm/chromium.src,Jonekee/chromium.src,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,hujiajie/pa-chromium,ltilve/chromium,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,anirudhSK/chromium,markYoungH/chromium.src,M4sse/chromium.src,junmin-zhu/chromium-rivertrail,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,Fireblend/chromium-crosswalk,pozdnyakov/chromium-crosswalk,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,zcbenz/cefode-chromium,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,patrickm/chromium.src,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,chuan9/chromium-crosswalk,zcbenz/cefode-chromium,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,timopulkkinen/BubbleFish,junmin-zhu/chromium-rivertrail,Jonekee/chromium.src,timopulkkinen/BubbleFish,dednal/chromium.src,Fireblend/chromium-crosswalk,littlstar/chromium.src,patrickm/chromium.src,Just-D/chromium-1,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,anirudhSK/chromium,markYoungH/chromium.src,fujunwei/chromium-crosswalk,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,M4sse/chromium.src,ChromiumWebApps/chromium,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,timopulkkinen/BubbleFish,axinging/chromium-crosswalk,hujiajie/pa-chromium,zcbenz/cefode-chromium,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,jaruba/chromium.src,dednal/chromium.src,M4sse/chromium.src,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,littlstar/chromium.src,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,Chilledheart/chromium,jaruba/chromium.src,nacl-webkit/chrome_deps,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,pozdnyakov/chromium-crosswalk,axinging/chromium-crosswalk,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,zcbenz/cefode-chromium,axinging/chromium-crosswalk,hujiajie/pa-chromium,hujiajie/pa-chromium,jaruba/chromium.src,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,ltilve/chromium,Just-D/chromium-1,ltilve/chromium,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,bright-sparks/chromium-spacewalk,Chilledheart/chromium,junmin-zhu/chromium-rivertrail,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,ChromiumWebApps/chromium,anirudhSK/chromium,Fireblend/chromium-crosswalk,dushu1203/chromium.src,Jonekee/chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,dednal/chromium.src,Just-D/chromium-1,hgl888/chromium-crosswalk,bright-sparks/chromium-spacewalk,hujiajie/pa-chromium,Chilledheart/chromium,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,jaruba/chromium.src,chuan9/chromium-crosswalk,M4sse/chromium.src,littlstar/chromium.src,timopulkkinen/BubbleFish,dednal/chromium.src,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,chuan9/chromium-crosswalk,mogoweb/chromium-crosswalk,markYoungH/chromium.src,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,nacl-webkit/chrome_deps,patrickm/chromium.src,TheTypoMaster/chromium-crosswalk,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,junmin-zhu/chromium-rivertrail,Jonekee/chromium.src,hujiajie/pa-chromium,Jonekee/chromium.src,chuan9/chromium-crosswalk,mogoweb/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,TheTypoMaster/chromium-crosswalk
|
c
|
## Code Before:
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef TESTING_PLATFORM_TEST_H_
#define TESTING_PLATFORM_TEST_H_
#include <gtest/gtest.h>
#if defined(GTEST_OS_MAC)
#ifdef __OBJC__
@class NSAutoreleasePool;
#else
class NSAutoreleasePool;
#endif
// The purpose of this class us to provide a hook for platform-specific
// operations across unit tests. For example, on the Mac, it creates and
// releases an outer NSAutoreleasePool for each test case. For now, it's only
// implemented on the Mac. To enable this for another platform, just adjust
// the #ifdefs and add a platform_test_<platform>.cc implementation file.
class PlatformTest : public testing::Test {
protected:
PlatformTest();
virtual ~PlatformTest();
private:
NSAutoreleasePool* pool_;
};
#else
typedef testing::Test PlatformTest;
#endif // GTEST_OS_MAC
#endif // TESTING_PLATFORM_TEST_H_
## Instruction:
Change visibility of the destructor to public.
PlatformTest's destructor was set as protected, though the parent class
testing::Test declares it public.
BUG=none
Review URL: https://chromiumcodereview.appspot.com/11038058
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@161352 0039d316-1c4b-4281-b951-d872f2087c98
## Code After:
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef TESTING_PLATFORM_TEST_H_
#define TESTING_PLATFORM_TEST_H_
#include <gtest/gtest.h>
#if defined(GTEST_OS_MAC)
#ifdef __OBJC__
@class NSAutoreleasePool;
#else
class NSAutoreleasePool;
#endif
// The purpose of this class us to provide a hook for platform-specific
// operations across unit tests. For example, on the Mac, it creates and
// releases an outer NSAutoreleasePool for each test case. For now, it's only
// implemented on the Mac. To enable this for another platform, just adjust
// the #ifdefs and add a platform_test_<platform>.cc implementation file.
class PlatformTest : public testing::Test {
public:
virtual ~PlatformTest();
protected:
PlatformTest();
private:
NSAutoreleasePool* pool_;
};
#else
typedef testing::Test PlatformTest;
#endif // GTEST_OS_MAC
#endif // TESTING_PLATFORM_TEST_H_
|
7262106a478eab0e86795ce04a32342b6f6d6d6b
|
elements/coupling-view/coupling-element.html
|
elements/coupling-view/coupling-element.html
|
<link rel="import" href="../bower_components/polymer/polymer.html">
<link rel="import" href="../bower_components/paper-card/paper-card.html">
<link rel="import" href="../bower_components/iron-flex-layout/iron-flex-layout-classes.html">
<link rel="import" href="../colors.html">
<dom-module id="coupling-element">
<template>
<style include="iron-flex"></style>
<style>
:host {
padding: 32px;
display: block;
}
paper-card {
background-color: white;
margin: 0 auto;
--paper-card-header-color: white;
--paper-card-header-text: {
font-size: medium;
background-color: var(--main-color-500);
};
}
</style>
<paper-card heading="Couple timelines to cameras">
<div class="content">
content
</div>
</paper-card>
</template>
<script>
(function () {
class couplingElement {
beforeRegister() {
this.is = "coupling-element";
this.properties = {
};
}
}
Polymer(couplingElement);
})();
</script>
</dom-module>
|
<link rel="import" href="../bower_components/polymer/polymer.html">
<link rel="import" href="../bower_components/paper-card/paper-card.html">
<link rel="import" href="../bower_components/iron-flex-layout/iron-flex-layout-classes.html">
<link rel="import" href="../colors.html">
<dom-module id="coupling-element">
<template>
<style include="iron-flex"></style>
<style>
:host {
padding: 32px;
display: block;
}
paper-card {
display: block;
background-color: white;
margin: 0 auto;
max-width: 800px;
--paper-card-header-color: white;
--paper-card-header-text: {
font-size: medium;
background-color: var(--main-color-500);
};
}
.content {
padding: 16px;
}
</style>
<paper-card heading="Couple timelines to cameras">
<div class="content">
content
</div>
</paper-card>
</template>
<script>
(function () {
class couplingElement {
beforeRegister() {
this.is = "coupling-element";
this.properties = {
};
}
}
Polymer(couplingElement);
})();
</script>
</dom-module>
|
Add basic styling to paper-card
|
Add basic styling to paper-card
|
HTML
|
apache-2.0
|
bartdejonge1996/goto-fail-webserver,bartdejonge1996/goto-fail-webserver
|
html
|
## Code Before:
<link rel="import" href="../bower_components/polymer/polymer.html">
<link rel="import" href="../bower_components/paper-card/paper-card.html">
<link rel="import" href="../bower_components/iron-flex-layout/iron-flex-layout-classes.html">
<link rel="import" href="../colors.html">
<dom-module id="coupling-element">
<template>
<style include="iron-flex"></style>
<style>
:host {
padding: 32px;
display: block;
}
paper-card {
background-color: white;
margin: 0 auto;
--paper-card-header-color: white;
--paper-card-header-text: {
font-size: medium;
background-color: var(--main-color-500);
};
}
</style>
<paper-card heading="Couple timelines to cameras">
<div class="content">
content
</div>
</paper-card>
</template>
<script>
(function () {
class couplingElement {
beforeRegister() {
this.is = "coupling-element";
this.properties = {
};
}
}
Polymer(couplingElement);
})();
</script>
</dom-module>
## Instruction:
Add basic styling to paper-card
## Code After:
<link rel="import" href="../bower_components/polymer/polymer.html">
<link rel="import" href="../bower_components/paper-card/paper-card.html">
<link rel="import" href="../bower_components/iron-flex-layout/iron-flex-layout-classes.html">
<link rel="import" href="../colors.html">
<dom-module id="coupling-element">
<template>
<style include="iron-flex"></style>
<style>
:host {
padding: 32px;
display: block;
}
paper-card {
display: block;
background-color: white;
margin: 0 auto;
max-width: 800px;
--paper-card-header-color: white;
--paper-card-header-text: {
font-size: medium;
background-color: var(--main-color-500);
};
}
.content {
padding: 16px;
}
</style>
<paper-card heading="Couple timelines to cameras">
<div class="content">
content
</div>
</paper-card>
</template>
<script>
(function () {
class couplingElement {
beforeRegister() {
this.is = "coupling-element";
this.properties = {
};
}
}
Polymer(couplingElement);
})();
</script>
</dom-module>
|
bf891428f6312e500fbcf4387a5ddcd2f71c367e
|
addons/Dexie.Syncable/src/apply-changes.js
|
addons/Dexie.Syncable/src/apply-changes.js
|
import { CREATE, DELETE, UPDATE } from './change_types';
import bulkUpdate from './bulk-update';
export default function initApplyChanges(db) {
return function applyChanges(changes, offset) {
const length = changes.length;
if (offset >= length) return Promise.resolve(null);
const firstChange = changes[offset];
let i, change;
for (i=offset + 1; i < length; ++i) {
change = changes[i];
if (change.type !== firstChange.type ||
change.table !== firstChange.table)
break;
}
const table = db.table(firstChange.table);
const specifyKeys = !table.schema.primKey.keyPath;
const changesToApply = changes.slice(offset, i);
const changeType = firstChange.type;
const bulkPromise =
changeType === CREATE ?
table.bulkPut(changesToApply.map(c => c.obj), specifyKeys ?
changesToApply.map(c => c.key) : undefined) :
changeType === UPDATE ?
bulkUpdate(table, changesToApply) :
changeType === DELETE ?
table.bulkDelete(changesToApply.map(c => c.key)) :
Promise.resolve(null);
return bulkPromise.then(()=>applyChanges(changes, i));
};
}
|
import Dexie from 'dexie';
import { CREATE, DELETE, UPDATE } from './change_types';
import bulkUpdate from './bulk-update';
export default function initApplyChanges(db) {
return function applyChanges(changes, offset) {
const length = changes.length;
if (offset >= length) return Dexie.Promise.resolve(null);
const firstChange = changes[offset];
let i, change;
for (i=offset + 1; i < length; ++i) {
change = changes[i];
if (change.type !== firstChange.type ||
change.table !== firstChange.table)
break;
}
const table = db.table(firstChange.table);
const specifyKeys = !table.schema.primKey.keyPath;
const changesToApply = changes.slice(offset, i);
const changeType = firstChange.type;
const bulkPromise =
changeType === CREATE ?
table.bulkPut(changesToApply.map(c => c.obj), specifyKeys ?
changesToApply.map(c => c.key) : undefined) :
changeType === UPDATE ?
bulkUpdate(table, changesToApply) :
changeType === DELETE ?
table.bulkDelete(changesToApply.map(c => c.key)) :
Dexie.Promise.resolve(null);
return bulkPromise.then(()=>applyChanges(changes, i));
};
}
|
Use Dexie.Promise not the global Promise
|
Use Dexie.Promise not the global Promise
|
JavaScript
|
apache-2.0
|
chrahunt/Dexie.js,jimmywarting/Dexie.js,dfahlander/Dexie.js,dfahlander/Dexie.js,dfahlander/Dexie.js,chrahunt/Dexie.js,jimmywarting/Dexie.js,jimmywarting/Dexie.js,dfahlander/Dexie.js,jimmywarting/Dexie.js,chrahunt/Dexie.js,chrahunt/Dexie.js
|
javascript
|
## Code Before:
import { CREATE, DELETE, UPDATE } from './change_types';
import bulkUpdate from './bulk-update';
export default function initApplyChanges(db) {
return function applyChanges(changes, offset) {
const length = changes.length;
if (offset >= length) return Promise.resolve(null);
const firstChange = changes[offset];
let i, change;
for (i=offset + 1; i < length; ++i) {
change = changes[i];
if (change.type !== firstChange.type ||
change.table !== firstChange.table)
break;
}
const table = db.table(firstChange.table);
const specifyKeys = !table.schema.primKey.keyPath;
const changesToApply = changes.slice(offset, i);
const changeType = firstChange.type;
const bulkPromise =
changeType === CREATE ?
table.bulkPut(changesToApply.map(c => c.obj), specifyKeys ?
changesToApply.map(c => c.key) : undefined) :
changeType === UPDATE ?
bulkUpdate(table, changesToApply) :
changeType === DELETE ?
table.bulkDelete(changesToApply.map(c => c.key)) :
Promise.resolve(null);
return bulkPromise.then(()=>applyChanges(changes, i));
};
}
## Instruction:
Use Dexie.Promise not the global Promise
## Code After:
import Dexie from 'dexie';
import { CREATE, DELETE, UPDATE } from './change_types';
import bulkUpdate from './bulk-update';
export default function initApplyChanges(db) {
return function applyChanges(changes, offset) {
const length = changes.length;
if (offset >= length) return Dexie.Promise.resolve(null);
const firstChange = changes[offset];
let i, change;
for (i=offset + 1; i < length; ++i) {
change = changes[i];
if (change.type !== firstChange.type ||
change.table !== firstChange.table)
break;
}
const table = db.table(firstChange.table);
const specifyKeys = !table.schema.primKey.keyPath;
const changesToApply = changes.slice(offset, i);
const changeType = firstChange.type;
const bulkPromise =
changeType === CREATE ?
table.bulkPut(changesToApply.map(c => c.obj), specifyKeys ?
changesToApply.map(c => c.key) : undefined) :
changeType === UPDATE ?
bulkUpdate(table, changesToApply) :
changeType === DELETE ?
table.bulkDelete(changesToApply.map(c => c.key)) :
Dexie.Promise.resolve(null);
return bulkPromise.then(()=>applyChanges(changes, i));
};
}
|
1ac797476473d708b834c434723d50256a12f556
|
app/views/coronavirus_local_restrictions/results.html.erb
|
app/views/coronavirus_local_restrictions/results.html.erb
|
<% content_for :title, t("coronavirus_local_restrictions.lookup.title") %>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<% if !@location_lookup.data.first.england? %>
<%= render partial: "coronavirus_local_restrictions/devolved_nation" %>
<% elsif @restriction.present? && @restriction.alert_level == 2 %>
<%= render partial: "coronavirus_local_restrictions/tier_two_restrictions" %>
<% elsif @restriction.present? && @restriction.alert_level == 3 %>
<%= render partial: "coronavirus_local_restrictions/tier_three_restrictions" %>
<% else %>
<%= render partial: "coronavirus_local_restrictions/tier_one_restrictions" %>
<% end %>
</div>
</div>
|
<% content_for :title, t("coronavirus_local_restrictions.lookup.title") %>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<% if !@location_lookup.data.first.england? %>
<%= render partial: "coronavirus_local_restrictions/devolved_nation" %>
<% elsif @restriction.present? && @restriction.current.present? && @restriction.current_alert_level == 2 %>
<%= render partial: "coronavirus_local_restrictions/tier_two_restrictions" %>
<% elsif @restriction.present? && @restriction.current.present? && @restriction.current_alert_level == 3 %>
<%= render partial: "coronavirus_local_restrictions/tier_three_restrictions" %>
<% else %>
<%= render partial: "coronavirus_local_restrictions/tier_one_restrictions" %>
<% end %>
</div>
</div>
|
Update the results view to use the current alert level
|
Update the results view to use the current alert level
|
HTML+ERB
|
mit
|
alphagov/collections,alphagov/collections,alphagov/collections,alphagov/collections
|
html+erb
|
## Code Before:
<% content_for :title, t("coronavirus_local_restrictions.lookup.title") %>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<% if !@location_lookup.data.first.england? %>
<%= render partial: "coronavirus_local_restrictions/devolved_nation" %>
<% elsif @restriction.present? && @restriction.alert_level == 2 %>
<%= render partial: "coronavirus_local_restrictions/tier_two_restrictions" %>
<% elsif @restriction.present? && @restriction.alert_level == 3 %>
<%= render partial: "coronavirus_local_restrictions/tier_three_restrictions" %>
<% else %>
<%= render partial: "coronavirus_local_restrictions/tier_one_restrictions" %>
<% end %>
</div>
</div>
## Instruction:
Update the results view to use the current alert level
## Code After:
<% content_for :title, t("coronavirus_local_restrictions.lookup.title") %>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<% if !@location_lookup.data.first.england? %>
<%= render partial: "coronavirus_local_restrictions/devolved_nation" %>
<% elsif @restriction.present? && @restriction.current.present? && @restriction.current_alert_level == 2 %>
<%= render partial: "coronavirus_local_restrictions/tier_two_restrictions" %>
<% elsif @restriction.present? && @restriction.current.present? && @restriction.current_alert_level == 3 %>
<%= render partial: "coronavirus_local_restrictions/tier_three_restrictions" %>
<% else %>
<%= render partial: "coronavirus_local_restrictions/tier_one_restrictions" %>
<% end %>
</div>
</div>
|
84b907ad78f03d614e8af14578c21e1228ab723d
|
top.py
|
top.py
|
from api_connector import *
from csv_io import *
def main():
conn = ApiConnector()
csvio = CsvIo()
article_list = conn.get_top()
stories = []
for i in article_list:
try:
story = conn.get_item(i)
if story.get("deleted"):
continue
print csvio.story_to_csv(story)
stories.append(story)
except NetworkError as e:
print e
csvio.write_stories_csv(stories)
for story in stories:
try:
conn.get_kids(story)
except NetworkError as e:
print e
users = []
for u in sorted(conn.user_dict.keys()):
try:
userjson = conn.get_user(u)
users.append(userjson)
print u
except NetworkError as e:
print e
csvio.write_users_csv(users)
if __name__ == '__main__':
main()
CsvIo().concat_users()
CsvIo().concat_stories()
|
from api_connector import *
from csv_io import *
def main():
conn = ApiConnector()
csvio = CsvIo()
article_list = conn.get_top()
stories = []
for i in article_list:
try:
story = conn.get_item(i)
if story.get("deleted"):
continue
print csvio.story_to_csv(story)
stories.append(story)
except NetworkError as e:
print e
csvio.write_stories_csv(stories)
for story in stories:
try:
conn.get_kids(story)
except NetworkError as e:
print e
users = []
for u in sorted(conn.user_dict.keys()):
try:
userjson = conn.get_user(u)
users.append(userjson)
print u
except NetworkError as e:
print e
csvio.write_users_csv(users)
if __name__ == '__main__':
csvio = CsvIo()
main()
csvio.concat_users()
csvio.concat_stories()
|
Use common object for csvio calls
|
Use common object for csvio calls
|
Python
|
apache-2.0
|
rylans/hackernews-top,davande/hackernews-top
|
python
|
## Code Before:
from api_connector import *
from csv_io import *
def main():
conn = ApiConnector()
csvio = CsvIo()
article_list = conn.get_top()
stories = []
for i in article_list:
try:
story = conn.get_item(i)
if story.get("deleted"):
continue
print csvio.story_to_csv(story)
stories.append(story)
except NetworkError as e:
print e
csvio.write_stories_csv(stories)
for story in stories:
try:
conn.get_kids(story)
except NetworkError as e:
print e
users = []
for u in sorted(conn.user_dict.keys()):
try:
userjson = conn.get_user(u)
users.append(userjson)
print u
except NetworkError as e:
print e
csvio.write_users_csv(users)
if __name__ == '__main__':
main()
CsvIo().concat_users()
CsvIo().concat_stories()
## Instruction:
Use common object for csvio calls
## Code After:
from api_connector import *
from csv_io import *
def main():
conn = ApiConnector()
csvio = CsvIo()
article_list = conn.get_top()
stories = []
for i in article_list:
try:
story = conn.get_item(i)
if story.get("deleted"):
continue
print csvio.story_to_csv(story)
stories.append(story)
except NetworkError as e:
print e
csvio.write_stories_csv(stories)
for story in stories:
try:
conn.get_kids(story)
except NetworkError as e:
print e
users = []
for u in sorted(conn.user_dict.keys()):
try:
userjson = conn.get_user(u)
users.append(userjson)
print u
except NetworkError as e:
print e
csvio.write_users_csv(users)
if __name__ == '__main__':
csvio = CsvIo()
main()
csvio.concat_users()
csvio.concat_stories()
|
91a9bd2ebcf3f08e2c879e1b6804fd2a160f0547
|
test/IncrementingTest.php
|
test/IncrementingTest.php
|
<?php
class IncrementingTest extends RememberTestCase
{
public function testIncrementingModelsPopsCache()
{
$group = Group::create(['id' => static::ID, 'name' => 'counter test', 'counter' => 0]);
$cached = Group::find(static::ID);
$group->increment('counter');
$new = Group::find(static::ID);
$this->assertNotEquals($cached, $new);
$this->assertEquals(1, $group->counter);
$this->assertEquals(1, $new->counter);
}
public function testDecrementingModelsPopsCache()
{
$group = Group::create(['id' => static::ID, 'name' => 'counter test', 'counter' => 0]);
$cached = Group::find(static::ID);
$group->decrement('counter');
$new = Group::find(static::ID);
$this->assertNotEquals($cached, $new);
$this->assertEquals(-1, $group->counter);
$this->assertEquals(-1, $new->counter);
}
}
|
<?php
class IncrementingTest extends RememberTestCase
{
public function testIncrementingModelsPopsCache()
{
$group = Group::create(['id' => static::ID, 'name' => 'counter test', 'counter' => 0]);
$cached = Group::find(static::ID);
$group->increment('counter');
$new = Group::find(static::ID);
$this->assertNotEquals($cached, $new);
$this->assertEquals(1, $group->counter);
$this->assertEquals(1, $new->counter);
static::$sql = false;
// check we've properly cached here.
Group::find(static::ID);
}
public function testDecrementingModelsPopsCache()
{
$group = Group::create(['id' => static::ID, 'name' => 'counter test', 'counter' => 0]);
$cached = Group::find(static::ID);
$group->decrement('counter');
$new = Group::find(static::ID);
$this->assertNotEquals($cached, $new);
$this->assertEquals(-1, $group->counter);
$this->assertEquals(-1, $new->counter);
static::$sql = false;
// check we've properly cached here.
Group::find(static::ID);
}
}
|
Make incrementing tests check the cache was actually used, too
|
Make incrementing tests check the cache was actually used, too
|
PHP
|
mit
|
ameliaikeda/rememberable
|
php
|
## Code Before:
<?php
class IncrementingTest extends RememberTestCase
{
public function testIncrementingModelsPopsCache()
{
$group = Group::create(['id' => static::ID, 'name' => 'counter test', 'counter' => 0]);
$cached = Group::find(static::ID);
$group->increment('counter');
$new = Group::find(static::ID);
$this->assertNotEquals($cached, $new);
$this->assertEquals(1, $group->counter);
$this->assertEquals(1, $new->counter);
}
public function testDecrementingModelsPopsCache()
{
$group = Group::create(['id' => static::ID, 'name' => 'counter test', 'counter' => 0]);
$cached = Group::find(static::ID);
$group->decrement('counter');
$new = Group::find(static::ID);
$this->assertNotEquals($cached, $new);
$this->assertEquals(-1, $group->counter);
$this->assertEquals(-1, $new->counter);
}
}
## Instruction:
Make incrementing tests check the cache was actually used, too
## Code After:
<?php
class IncrementingTest extends RememberTestCase
{
public function testIncrementingModelsPopsCache()
{
$group = Group::create(['id' => static::ID, 'name' => 'counter test', 'counter' => 0]);
$cached = Group::find(static::ID);
$group->increment('counter');
$new = Group::find(static::ID);
$this->assertNotEquals($cached, $new);
$this->assertEquals(1, $group->counter);
$this->assertEquals(1, $new->counter);
static::$sql = false;
// check we've properly cached here.
Group::find(static::ID);
}
public function testDecrementingModelsPopsCache()
{
$group = Group::create(['id' => static::ID, 'name' => 'counter test', 'counter' => 0]);
$cached = Group::find(static::ID);
$group->decrement('counter');
$new = Group::find(static::ID);
$this->assertNotEquals($cached, $new);
$this->assertEquals(-1, $group->counter);
$this->assertEquals(-1, $new->counter);
static::$sql = false;
// check we've properly cached here.
Group::find(static::ID);
}
}
|
9da3f2a835fa2aaba5d91ffe31b3fcaf8d83a4c9
|
snake/main.py
|
snake/main.py
|
import os
import sys
from snake.core import Snake
SNAKEFILE_LOADED = False
def abort(msg):
print >> sys.stderr, "Error: %s" % msg
sys.exit(1)
def load_snakefile(path, fail_silently=False):
global SNAKEFILE_LOADED
if not SNAKEFILE_LOADED:
sys.path.insert(0, path)
try:
return __import__('snakefile')
except ImportError:
if not fail_silently:
abort("couldn't find any snakefile.")
else:
SNAKEFILE_LOADED = True
del sys.path[0]
def find_snakefile():
global SNAKEFILE_LOADED
path = os.getcwd()
while True:
filepath = os.path.join(path, 'snakefile.py')
if os.path.isfile(filepath):
return load_snakefile(path), filepath
if not os.path.split(path)[1]:
break
path = os.path.split(path)[0]
if not SNAKEFILE_LOADED:
abort("couldn't find any snakefile.")
def main():
snakefile, snakefilepath = find_snakefile()
for name in dir(snakefile):
attr = getattr(snakefile, name)
if isinstance(attr, Snake):
attr.run(snakefilepath)
break
else:
abort("couldn't find any Snake instance in snakefile.")
|
import imp
import os
import sys
from snake.core import Snake
def abort(msg):
print >> sys.stderr, "Error: %s" % msg
sys.exit(1)
def get_ascending_paths(path):
paths = []
while True:
paths.append(path)
path, tail = os.path.split(path)
if not tail:
break
return paths
def find_snakefile():
paths = get_ascending_paths(os.getcwd())
try:
return imp.find_module('snakefile', paths)
except:
abort("couldn't find any snakefile.")
def get_snakefile():
return imp.load_module('snakefile', *find_snakefile())
def main():
snakefile = get_snakefile()
for name in dir(snakefile):
attr = getattr(snakefile, name)
if isinstance(attr, Snake):
attr.run(snakefile.__file__)
break
else:
abort("couldn't find any Snake instance in snakefile.")
|
Improve the way snakefile loading works
|
Improve the way snakefile loading works
|
Python
|
bsd-2-clause
|
yumike/snake
|
python
|
## Code Before:
import os
import sys
from snake.core import Snake
SNAKEFILE_LOADED = False
def abort(msg):
print >> sys.stderr, "Error: %s" % msg
sys.exit(1)
def load_snakefile(path, fail_silently=False):
global SNAKEFILE_LOADED
if not SNAKEFILE_LOADED:
sys.path.insert(0, path)
try:
return __import__('snakefile')
except ImportError:
if not fail_silently:
abort("couldn't find any snakefile.")
else:
SNAKEFILE_LOADED = True
del sys.path[0]
def find_snakefile():
global SNAKEFILE_LOADED
path = os.getcwd()
while True:
filepath = os.path.join(path, 'snakefile.py')
if os.path.isfile(filepath):
return load_snakefile(path), filepath
if not os.path.split(path)[1]:
break
path = os.path.split(path)[0]
if not SNAKEFILE_LOADED:
abort("couldn't find any snakefile.")
def main():
snakefile, snakefilepath = find_snakefile()
for name in dir(snakefile):
attr = getattr(snakefile, name)
if isinstance(attr, Snake):
attr.run(snakefilepath)
break
else:
abort("couldn't find any Snake instance in snakefile.")
## Instruction:
Improve the way snakefile loading works
## Code After:
import imp
import os
import sys
from snake.core import Snake
def abort(msg):
print >> sys.stderr, "Error: %s" % msg
sys.exit(1)
def get_ascending_paths(path):
paths = []
while True:
paths.append(path)
path, tail = os.path.split(path)
if not tail:
break
return paths
def find_snakefile():
paths = get_ascending_paths(os.getcwd())
try:
return imp.find_module('snakefile', paths)
except:
abort("couldn't find any snakefile.")
def get_snakefile():
return imp.load_module('snakefile', *find_snakefile())
def main():
snakefile = get_snakefile()
for name in dir(snakefile):
attr = getattr(snakefile, name)
if isinstance(attr, Snake):
attr.run(snakefile.__file__)
break
else:
abort("couldn't find any Snake instance in snakefile.")
|
6b6f739ed9df057a62401429167dd14691cdfee5
|
packages/ember-runtime/tests/core/inspect_test.js
|
packages/ember-runtime/tests/core/inspect_test.js
|
module("Ember.inspect");
var inspect = Ember.inspect;
test("strings", function() {
equal(inspect("foo"), "foo");
});
test("numbers", function() {
equal(inspect(2.6), "2.6");
});
test("null", function() {
equal(inspect(null), "null");
});
test("undefined", function() {
equal(inspect(undefined), "undefined");
});
test("true", function() {
equal(inspect(true), "true");
});
test("false", function() {
equal(inspect(false), "false");
});
test("object", function() {
equal(inspect({}), "{}");
equal(inspect({ foo: 'bar' }), "{foo: bar}");
equal(inspect({ foo: Ember.K }), "{foo: function() { ... }}");
});
test("array", function() {
equal(inspect([1,2,3]), "[1,2,3]");
});
test("regexp", function() {
equal(inspect(/regexp/), "/regexp/");
});
test("date", function() {
var inspected = inspect(new Date("Sat Apr 30 2011 13:24:11"));
ok(inspected.match(/Sat Apr 30/), "The inspected date has its date");
ok(inspected.match(/2011/), "The inspected date has its year");
ok(inspected.match(/13:24:11/), "The inspected date has its time");
});
test("error", function() {
equal(inspect(new Error("Oops")), "Error: Oops");
});
|
module("Ember.inspect");
var inspect = Ember.inspect;
test("strings", function() {
equal(inspect("foo"), "foo");
});
test("numbers", function() {
equal(inspect(2.6), "2.6");
});
test("null", function() {
equal(inspect(null), "null");
});
test("undefined", function() {
equal(inspect(undefined), "undefined");
});
test("true", function() {
equal(inspect(true), "true");
});
test("false", function() {
equal(inspect(false), "false");
});
test("object", function() {
equal(inspect({}), "{}");
equal(inspect({ foo: 'bar' }), "{foo: bar}");
equal(inspect({ foo: Ember.K }), "{foo: function() { ... }}");
});
test("array", function() {
equal(inspect([1,2,3]), "[1,2,3]");
});
test("regexp", function() {
equal(inspect(/regexp/), "/regexp/");
});
test("date", function() {
var inspected = inspect(new Date("Sat Apr 30 2011 13:24:11"));
ok(inspected.match(/Sat Apr 30/), "The inspected date has its date");
ok(inspected.match(/2011/), "The inspected date has its year");
ok(inspected.match(/13:24:11/), "The inspected date has its time");
});
|
Remove unnecessary assertion for `Ember.inspect`
|
Remove unnecessary assertion for `Ember.inspect`
The assertion for `Ember.inspect` with error object depends on
`Error#toString`.
It returns the value that provided by each environments.
|
JavaScript
|
mit
|
selvagsz/ember.js,8thcolor/ember.js,Turbo87/ember.js,cesarizu/ember.js,abulrim/ember.js,furkanayhan/ember.js,practicefusion/ember.js,yuhualingfeng/ember.js,sandstrom/ember.js,mixonic/ember.js,topaxi/ember.js,blimmer/ember.js,yuhualingfeng/ember.js,tsing80/ember.js,jayphelps/ember.js,gfvcastro/ember.js,kublaj/ember.js,seanjohnson08/ember.js,yuhualingfeng/ember.js,jerel/ember.js,asakusuma/ember.js,kellyselden/ember.js,omurbilgili/ember.js,ThiagoGarciaAlves/ember.js,martndemus/ember.js,elwayman02/ember.js,mallikarjunayaddala/ember.js,rondale-sc/ember.js,mike-north/ember.js,Patsy-issa/ember.js,VictorChaun/ember.js,loadimpact/ember.js,cibernox/ember.js,simudream/ember.js,Krasnyanskiy/ember.js,latlontude/ember.js,mfeckie/ember.js,rodrigo-morais/ember.js,joeruello/ember.js,cjc343/ember.js,benstoltz/ember.js,njagadeesh/ember.js,dschmidt/ember.js,toddjordan/ember.js,kigsmtua/ember.js,jamesarosen/ember.js,sly7-7/ember.js,jplwood/ember.js,schreiaj/ember.js,jonathanKingston/ember.js,jonathanKingston/ember.js,nruth/ember.js,gdi2290/ember.js,MatrixZ/ember.js,GavinJoyce/ember.js,sharma1nitish/ember.js,Kuzirashi/ember.js,fivetanley/ember.js,ssured/ember.js,delftswa2016/ember.js,rwjblue/ember.js,tiegz/ember.js,danielgynn/ember.js,jcope2013/ember.js,cbou/ember.js,bmac/ember.js,kidaa/ember.js,jayphelps/ember.js,adatapost/ember.js,ryanlabouve/ember.js,ubuntuvim/ember.js,jonathanKingston/ember.js,howmuchcomputer/ember.js,selvagsz/ember.js,howmuchcomputer/ember.js,mitchlloyd/ember.js,Kuzirashi/ember.js,mmpestorich/ember.js,stefanpenner/ember.js,nathanhammond/ember.js,JesseQin/ember.js,Serabe/ember.js,amk221/ember.js,Eric-Guo/ember.js,Trendy/ember.js,max-konin/ember.js,kigsmtua/ember.js,jayphelps/ember.js,cbou/ember.js,vitch/ember.js,yonjah/ember.js,michaelBenin/ember.js,wycats/ember.js,slindberg/ember.js,JesseQin/ember.js,code0100fun/ember.js,marcioj/ember.js,ridixcr/ember.js,Vassi/ember.js,kmiyashiro/ember.js,artfuldodger/ember.js,kublaj/ember.js,selvagsz/ember.js,vikram7/ember.js,jasonmit/ember.js,EricSchank/ember.js,Robdel12/ember.js,tianxiangbing/ember.js,chadhietala/mixonic-ember,green-arrow/ember.js,yonjah/ember.js,Zagorakiss/ember.js,kellyselden/ember.js,chadhietala/ember.js,tofanelli/ember.js,HipsterBrown/ember.js,Leooo/ember.js,cjc343/ember.js,yaymukund/ember.js,max-konin/ember.js,fpauser/ember.js,latlontude/ember.js,tiegz/ember.js,mfeckie/ember.js,jerel/ember.js,raycohen/ember.js,HipsterBrown/ember.js,twokul/ember.js,Eric-Guo/ember.js,joeruello/ember.js,brzpegasus/ember.js,faizaanshamsi/ember.js,omurbilgili/ember.js,tricknotes/ember.js,jish/ember.js,NLincoln/ember.js,kwight/ember.js,Patsy-issa/ember.js,gfvcastro/ember.js,sivakumar-kailasam/ember.js,paddyobrien/ember.js,femi-saliu/ember.js,TriumphantAkash/ember.js,ryanlabouve/ember.js,njagadeesh/ember.js,kennethdavidbuck/ember.js,code0100fun/ember.js,kigsmtua/ember.js,benstoltz/ember.js,karthiick/ember.js,Robdel12/ember.js,ianstarz/ember.js,jasonmit/ember.js,practicefusion/ember.js,cibernox/ember.js,Trendy/ember.js,rwjblue/ember.js,kwight/ember.js,nipunas/ember.js,miguelcobain/ember.js,Trendy/ember.js,jaswilli/ember.js,tsing80/ember.js,kidaa/ember.js,Eric-Guo/ember.js,fxkr/ember.js,Vassi/ember.js,jherdman/ember.js,femi-saliu/ember.js,wagenet/ember.js,udhayam/ember.js,udhayam/ember.js,ridixcr/ember.js,miguelcobain/ember.js,kennethdavidbuck/ember.js,pixelhandler/ember.js,claimsmall/ember.js,williamsbdev/ember.js,jish/ember.js,cyjia/ember.js,jerel/ember.js,mitchlloyd/ember.js,knownasilya/ember.js,trek/ember.js,kublaj/ember.js,howmuchcomputer/ember.js,Gaurav0/ember.js,schreiaj/ember.js,soulcutter/ember.js,KevinTCoughlin/ember.js,gfvcastro/ember.js,eliotsykes/ember.js,mitchlloyd/ember.js,jherdman/ember.js,xtian/ember.js,g13013/ember.js,pangratz/ember.js,zenefits/ember.js,vikram7/ember.js,rwjblue/ember.js,JesseQin/ember.js,kwight/ember.js,xtian/ember.js,koriroys/ember.js,howmuchcomputer/ember.js,howtolearntocode/ember.js,kidaa/ember.js,pixelhandler/ember.js,jbrown/ember.js,schreiaj/ember.js,pangratz/ember.js,twokul/ember.js,nightire/ember.js,ianstarz/ember.js,develoser/ember.js,green-arrow/ember.js,adamesque/ember.js,abulrim/ember.js,mfeckie/ember.js,visualjeff/ember.js,givanse/ember.js,alexdiliberto/ember.js,kidaa/ember.js,tianxiangbing/ember.js,mike-north/ember.js,raytiley/ember.js,jmurphyau/ember.js,karthiick/ember.js,fxkr/ember.js,artfuldodger/ember.js,greyhwndz/ember.js,jasonmit/ember.js,boztek/ember.js,yaymukund/ember.js,dschmidt/ember.js,cdl/ember.js,TriumphantAkash/ember.js,yaymukund/ember.js,nickiaconis/ember.js,anilmaurya/ember.js,dschmidt/ember.js,asakusuma/ember.js,johanneswuerbach/ember.js,cjc343/ember.js,lan0/ember.js,antigremlin/ember.js,delftswa2016/ember.js,kellyselden/ember.js,raycohen/ember.js,blimmer/ember.js,simudream/ember.js,ming-codes/ember.js,Patsy-issa/ember.js,jasonmit/ember.js,cesarizu/ember.js,femi-saliu/ember.js,develoser/ember.js,runspired/ember.js,schreiaj/ember.js,nruth/ember.js,workmanw/ember.js,asakusuma/ember.js,okuryu/ember.js,sivakumar-kailasam/ember.js,jmurphyau/ember.js,wecc/ember.js,qaiken/ember.js,jplwood/ember.js,emberjs/ember.js,slindberg/ember.js,rfsv/ember.js,kigsmtua/ember.js,intercom/ember.js,swarmbox/ember.js,xcskier56/ember.js,bantic/ember.js,tianxiangbing/ember.js,workmanw/ember.js,adamesque/ember.js,HipsterBrown/ember.js,cyjia/ember.js,opichals/ember.js,swarmbox/ember.js,Robdel12/ember.js,jish/ember.js,patricksrobertson/ember.js,rlugojr/ember.js,XrXr/ember.js,nicklv/ember.js,vikram7/ember.js,green-arrow/ember.js,eliotsykes/ember.js,joeruello/ember.js,vitch/ember.js,duggiefresh/ember.js,johanneswuerbach/ember.js,Turbo87/ember.js,omurbilgili/ember.js,thoov/ember.js,lsthornt/ember.js,fouzelddin/ember.js,XrXr/ember.js,omurbilgili/ember.js,olivierchatry/ember.js,ryanlabouve/ember.js,nicklv/ember.js,alexspeller/ember.js,8thcolor/ember.js,max-konin/ember.js,davidpett/ember.js,lan0/ember.js,delftswa2016/ember.js,JKGisMe/ember.js,howtolearntocode/ember.js,thejameskyle/ember.js,nickiaconis/ember.js,martndemus/ember.js,mitchlloyd/ember.js,xiujunma/ember.js,acburdine/ember.js,Serabe/ember.js,toddjordan/ember.js,johanneswuerbach/ember.js,szines/ember.js,gdi2290/ember.js,wycats/ember.js,yonjah/ember.js,pixelhandler/ember.js,claimsmall/ember.js,raytiley/ember.js,ThiagoGarciaAlves/ember.js,Trendy/ember.js,pangratz/ember.js,Turbo87/ember.js,tricknotes/ember.js,soulcutter/ember.js,kublaj/ember.js,patricksrobertson/ember.js,cjc343/ember.js,balinterdi/ember.js,pixelhandler/ember.js,tricknotes/ember.js,amk221/ember.js,chadhietala/mixonic-ember,MatrixZ/ember.js,gnarf/ember.js,visualjeff/ember.js,kwight/ember.js,sandstrom/ember.js,ianstarz/ember.js,Serabe/ember.js,yaymukund/ember.js,martndemus/ember.js,JKGisMe/ember.js,mmun/ember.js,MatrixZ/ember.js,alexdiliberto/ember.js,Kuzirashi/ember.js,davidpett/ember.js,bmac/ember.js,Vassi/ember.js,ThiagoGarciaAlves/ember.js,elwayman02/ember.js,femi-saliu/ember.js,nvoron23/ember.js,workmanw/ember.js,opichals/ember.js,szines/ember.js,eliotsykes/ember.js,bantic/ember.js,nipunas/ember.js,cibernox/ember.js,cbou/ember.js,sandstrom/ember.js,xcskier56/ember.js,adamesque/ember.js,tiegz/ember.js,koriroys/ember.js,ming-codes/ember.js,quaertym/ember.js,elwayman02/ember.js,seanjohnson08/ember.js,cyberkoi/ember.js,marijaselakovic/ember.js,HeroicEric/ember.js,cyberkoi/ember.js,sly7-7/ember.js,raytiley/ember.js,lazybensch/ember.js,sivakumar-kailasam/ember.js,kanongil/ember.js,twokul/ember.js,pangratz/ember.js,xiujunma/ember.js,koriroys/ember.js,SaladFork/ember.js,kaeufl/ember.js,mmpestorich/ember.js,cgvarela/ember.js,alexdiliberto/ember.js,fivetanley/ember.js,code0100fun/ember.js,olivierchatry/ember.js,runspired/ember.js,njagadeesh/ember.js,GavinJoyce/ember.js,cdl/ember.js,HeroicEric/ember.js,rubenrp81/ember.js,kmiyashiro/ember.js,cyberkoi/ember.js,JacobNinja/es6,cyjia/ember.js,zenefits/ember.js,rfsv/ember.js,NLincoln/ember.js,jbrown/ember.js,cdl/ember.js,fouzelddin/ember.js,mike-north/ember.js,marijaselakovic/ember.js,acburdine/ember.js,kaeufl/ember.js,szines/ember.js,brzpegasus/ember.js,practicefusion/ember.js,mdehoog/ember.js,rondale-sc/ember.js,thejameskyle/ember.js,nickiaconis/ember.js,Eric-Guo/ember.js,xtian/ember.js,rondale-sc/ember.js,elwayman02/ember.js,kaeufl/ember.js,latlontude/ember.js,rfsv/ember.js,csantero/ember.js,paddyobrien/ember.js,nruth/ember.js,kmiyashiro/ember.js,raytiley/ember.js,antigremlin/ember.js,nipunas/ember.js,jaswilli/ember.js,duggiefresh/ember.js,tofanelli/ember.js,mdehoog/ember.js,gnarf/ember.js,JacobNinja/es6,rodrigo-morais/ember.js,Leooo/ember.js,Zagorakiss/ember.js,fpauser/ember.js,kanongil/ember.js,boztek/ember.js,ef4/ember.js,tricknotes/ember.js,g13013/ember.js,SaladFork/ember.js,thejameskyle/ember.js,howtolearntocode/ember.js,anilmaurya/ember.js,rwjblue/ember.js,intercom/ember.js,abulrim/ember.js,opichals/ember.js,topaxi/ember.js,ebryn/ember.js,dgeb/ember.js,fpauser/ember.js,eliotsykes/ember.js,abulrim/ember.js,dgeb/ember.js,quaertym/ember.js,quaertym/ember.js,nvoron23/ember.js,8thcolor/ember.js,tildeio/ember.js,csantero/ember.js,jherdman/ember.js,fouzelddin/ember.js,soulcutter/ember.js,jherdman/ember.js,qaiken/ember.js,jackiewung/ember.js,rot26/ember.js,gdi2290/ember.js,VictorChaun/ember.js,johnnyshields/ember.js,xiujunma/ember.js,jcope2013/ember.js,adatapost/ember.js,opichals/ember.js,artfuldodger/ember.js,tildeio/ember.js,wecc/ember.js,wecc/ember.js,nvoron23/ember.js,ming-codes/ember.js,aihua/ember.js,givanse/ember.js,EricSchank/ember.js,olivierchatry/ember.js,green-arrow/ember.js,lsthornt/ember.js,gnarf/ember.js,ubuntuvim/ember.js,wagenet/ember.js,emberjs/ember.js,lsthornt/ember.js,alexspeller/ember.js,VictorChaun/ember.js,KevinTCoughlin/ember.js,trentmwillis/ember.js,Gaurav0/ember.js,selvagsz/ember.js,adatapost/ember.js,Zagorakiss/ember.js,amk221/ember.js,ridixcr/ember.js,boztek/ember.js,benstoltz/ember.js,ubuntuvim/ember.js,marijaselakovic/ember.js,nightire/ember.js,patricksrobertson/ember.js,yonjah/ember.js,qaiken/ember.js,tildeio/ember.js,mixonic/ember.js,danielgynn/ember.js,raycohen/ember.js,tianxiangbing/ember.js,rlugojr/ember.js,intercom/ember.js,jasonmit/ember.js,faizaanshamsi/ember.js,mallikarjunayaddala/ember.js,develoser/ember.js,jonathanKingston/ember.js,JKGisMe/ember.js,bmac/ember.js,jackiewung/ember.js,vitch/ember.js,faizaanshamsi/ember.js,lazybensch/ember.js,seanpdoyle/ember.js,lazybensch/ember.js,bekzod/ember.js,xtian/ember.js,xcambar/ember.js,rot26/ember.js,marcioj/ember.js,anilmaurya/ember.js,Zagorakiss/ember.js,fxkr/ember.js,johanneswuerbach/ember.js,ebryn/ember.js,HeroicEric/ember.js,gfvcastro/ember.js,rubenrp81/ember.js,miguelcobain/ember.js,cbou/ember.js,sivakumar-kailasam/ember.js,stefanpenner/ember.js,tiegz/ember.js,rlugojr/ember.js,jplwood/ember.js,lan0/ember.js,williamsbdev/ember.js,MatrixZ/ember.js,csantero/ember.js,max-konin/ember.js,cgvarela/ember.js,slindberg/ember.js,koriroys/ember.js,fxkr/ember.js,g13013/ember.js,danielgynn/ember.js,trek/ember.js,visualjeff/ember.js,fivetanley/ember.js,nicklv/ember.js,cdl/ember.js,BrianSipple/ember.js,williamsbdev/ember.js,davidpett/ember.js,bantic/ember.js,TriumphantAkash/ember.js,blimmer/ember.js,loadimpact/ember.js,SaladFork/ember.js,jackiewung/ember.js,bcardarella/ember.js,furkanayhan/ember.js,furkanayhan/ember.js,kiwiupover/ember.js,tsing80/ember.js,rodrigo-morais/ember.js,nruth/ember.js,seanjohnson08/ember.js,fouzelddin/ember.js,xcambar/ember.js,seanpdoyle/ember.js,brzpegasus/ember.js,xcambar/ember.js,trek/ember.js,Gaurav0/ember.js,skeate/ember.js,karthiick/ember.js,trentmwillis/ember.js,amk221/ember.js,XrXr/ember.js,Robdel12/ember.js,claimsmall/ember.js,develoser/ember.js,jaswilli/ember.js,yuhualingfeng/ember.js,jplwood/ember.js,Serabe/ember.js,ridixcr/ember.js,loadimpact/ember.js,cyjia/ember.js,NLincoln/ember.js,cgvarela/ember.js,GavinJoyce/ember.js,jayphelps/ember.js,bcardarella/ember.js,mrjavascript/ember.js,tofanelli/ember.js,kellyselden/ember.js,tomdale/ember.js,wycats/ember.js,runspired/ember.js,mixonic/ember.js,lan0/ember.js,topaxi/ember.js,greyhwndz/ember.js,rodrigo-morais/ember.js,aihua/ember.js,seanjohnson08/ember.js,thoov/ember.js,olivierchatry/ember.js,bekzod/ember.js,mrjavascript/ember.js,simudream/ember.js,kanongil/ember.js,ebryn/ember.js,cowboyd/ember.js,stefanpenner/ember.js,balinterdi/ember.js,marcioj/ember.js,antigremlin/ember.js,jcope2013/ember.js,cesarizu/ember.js,nvoron23/ember.js,ef4/ember.js,SaladFork/ember.js,code0100fun/ember.js,mdehoog/ember.js,swarmbox/ember.js,xcskier56/ember.js,kennethdavidbuck/ember.js,johnnyshields/ember.js,jish/ember.js,rot26/ember.js,thejameskyle/ember.js,greyhwndz/ember.js,tomdale/ember.js,nicklv/ember.js,zenefits/ember.js,skeate/ember.js,JKGisMe/ember.js,jaswilli/ember.js,anilmaurya/ember.js,balinterdi/ember.js,mfeckie/ember.js,Krasnyanskiy/ember.js,rubenrp81/ember.js,bmac/ember.js,tomdale/ember.js,jamesarosen/ember.js,dgeb/ember.js,Kuzirashi/ember.js,simudream/ember.js,Patsy-issa/ember.js,patricksrobertson/ember.js,kanongil/ember.js,asakusuma/ember.js,seanpdoyle/ember.js,ryanlabouve/ember.js,bcardarella/ember.js,furkanayhan/ember.js,joeruello/ember.js,quaertym/ember.js,BrianSipple/ember.js,jerel/ember.js,kiwiupover/ember.js,nickiaconis/ember.js,kaeufl/ember.js,toddjordan/ember.js,davidpett/ember.js,jbrown/ember.js,acburdine/ember.js,mallikarjunayaddala/ember.js,Krasnyanskiy/ember.js,rfsv/ember.js,delftswa2016/ember.js,nightire/ember.js,xcambar/ember.js,soulcutter/ember.js,jmurphyau/ember.js,okuryu/ember.js,marijaselakovic/ember.js,okuryu/ember.js,KevinTCoughlin/ember.js,GavinJoyce/ember.js,ianstarz/ember.js,dgeb/ember.js,cyberkoi/ember.js,faizaanshamsi/ember.js,sly7-7/ember.js,workmanw/ember.js,wecc/ember.js,givanse/ember.js,runspired/ember.js,visualjeff/ember.js,alexdiliberto/ember.js,nathanhammond/ember.js,mrjavascript/ember.js,sharma1nitish/ember.js,martndemus/ember.js,Leooo/ember.js,jmurphyau/ember.js,chadhietala/ember.js,johnnyshields/ember.js,lazybensch/ember.js,csantero/ember.js,JesseQin/ember.js,Vassi/ember.js,bekzod/ember.js,EricSchank/ember.js,claimsmall/ember.js,kmiyashiro/ember.js,ssured/ember.js,thoov/ember.js,givanse/ember.js,mrjavascript/ember.js,skeate/ember.js,cibernox/ember.js,lsthornt/ember.js,nathanhammond/ember.js,skeate/ember.js,NLincoln/ember.js,EricSchank/ember.js,HeroicEric/ember.js,jcope2013/ember.js,sharma1nitish/ember.js,sivakumar-kailasam/ember.js,chadhietala/mixonic-ember,udhayam/ember.js,mike-north/ember.js,Turbo87/ember.js,knownasilya/ember.js,trentmwillis/ember.js,JacobNinja/es6,bantic/ember.js,nathanhammond/ember.js,thoov/ember.js,miguelcobain/ember.js,udhayam/ember.js,sharma1nitish/ember.js,BrianSipple/ember.js,cowboyd/ember.js,williamsbdev/ember.js,vikram7/ember.js,twokul/ember.js,cgvarela/ember.js,kennethdavidbuck/ember.js,mdehoog/ember.js,adatapost/ember.js,szines/ember.js,wagenet/ember.js,kiwiupover/ember.js,cowboyd/ember.js,BrianSipple/ember.js,mmpestorich/ember.js,TriumphantAkash/ember.js,seanpdoyle/ember.js,knownasilya/ember.js,tsing80/ember.js,xcskier56/ember.js,karthiick/ember.js,artfuldodger/ember.js,paddyobrien/ember.js,VictorChaun/ember.js,ef4/ember.js,danielgynn/ember.js,duggiefresh/ember.js,chadhietala/ember.js,XrXr/ember.js,trentmwillis/ember.js,Gaurav0/ember.js,howtolearntocode/ember.js,trek/ember.js,bekzod/ember.js,aihua/ember.js,duggiefresh/ember.js,xiujunma/ember.js,Krasnyanskiy/ember.js,nightire/ember.js,cowboyd/ember.js,nipunas/ember.js,blimmer/ember.js,mmun/ember.js,tofanelli/ember.js,fpauser/ember.js,mallikarjunayaddala/ember.js,benstoltz/ember.js,rubenrp81/ember.js,aihua/ember.js,ThiagoGarciaAlves/ember.js,jamesarosen/ember.js,marcioj/ember.js,intercom/ember.js,toddjordan/ember.js,rot26/ember.js,jackiewung/ember.js,johnnyshields/ember.js,njagadeesh/ember.js,qaiken/ember.js,greyhwndz/ember.js,rlugojr/ember.js,antigremlin/ember.js,Leooo/ember.js,topaxi/ember.js,emberjs/ember.js,swarmbox/ember.js,zenefits/ember.js,ubuntuvim/ember.js,loadimpact/ember.js,KevinTCoughlin/ember.js,michaelBenin/ember.js,8thcolor/ember.js,brzpegasus/ember.js,wycats/ember.js,boztek/ember.js,cesarizu/ember.js,ef4/ember.js,chadhietala/ember.js,jamesarosen/ember.js,acburdine/ember.js,practicefusion/ember.js,HipsterBrown/ember.js
|
javascript
|
## Code Before:
module("Ember.inspect");
var inspect = Ember.inspect;
test("strings", function() {
equal(inspect("foo"), "foo");
});
test("numbers", function() {
equal(inspect(2.6), "2.6");
});
test("null", function() {
equal(inspect(null), "null");
});
test("undefined", function() {
equal(inspect(undefined), "undefined");
});
test("true", function() {
equal(inspect(true), "true");
});
test("false", function() {
equal(inspect(false), "false");
});
test("object", function() {
equal(inspect({}), "{}");
equal(inspect({ foo: 'bar' }), "{foo: bar}");
equal(inspect({ foo: Ember.K }), "{foo: function() { ... }}");
});
test("array", function() {
equal(inspect([1,2,3]), "[1,2,3]");
});
test("regexp", function() {
equal(inspect(/regexp/), "/regexp/");
});
test("date", function() {
var inspected = inspect(new Date("Sat Apr 30 2011 13:24:11"));
ok(inspected.match(/Sat Apr 30/), "The inspected date has its date");
ok(inspected.match(/2011/), "The inspected date has its year");
ok(inspected.match(/13:24:11/), "The inspected date has its time");
});
test("error", function() {
equal(inspect(new Error("Oops")), "Error: Oops");
});
## Instruction:
Remove unnecessary assertion for `Ember.inspect`
The assertion for `Ember.inspect` with error object depends on
`Error#toString`.
It returns the value that provided by each environments.
## Code After:
module("Ember.inspect");
var inspect = Ember.inspect;
test("strings", function() {
equal(inspect("foo"), "foo");
});
test("numbers", function() {
equal(inspect(2.6), "2.6");
});
test("null", function() {
equal(inspect(null), "null");
});
test("undefined", function() {
equal(inspect(undefined), "undefined");
});
test("true", function() {
equal(inspect(true), "true");
});
test("false", function() {
equal(inspect(false), "false");
});
test("object", function() {
equal(inspect({}), "{}");
equal(inspect({ foo: 'bar' }), "{foo: bar}");
equal(inspect({ foo: Ember.K }), "{foo: function() { ... }}");
});
test("array", function() {
equal(inspect([1,2,3]), "[1,2,3]");
});
test("regexp", function() {
equal(inspect(/regexp/), "/regexp/");
});
test("date", function() {
var inspected = inspect(new Date("Sat Apr 30 2011 13:24:11"));
ok(inspected.match(/Sat Apr 30/), "The inspected date has its date");
ok(inspected.match(/2011/), "The inspected date has its year");
ok(inspected.match(/13:24:11/), "The inspected date has its time");
});
|
07aced1a932413ee26c967a643fb37cb05b24823
|
resources/views/partials/menu-item.blade.php
|
resources/views/partials/menu-item.blade.php
|
@if (is_string($item))
<li class="header">{{ $item }}</li>
@else
<li {{ isset($item['submenu']) ? 'class="treeview"' : '' }}>
<a href="{{ isset($item['url']) ? url($item['url']) : '#' }}">
<i class="fa fa-fw fa-{{ $item['icon'] or 'circle-o' }} {{ isset($item['icon_color']) ? 'text-' . $item['icon_color'] : '' }}"></i>
<span>{{ $item['text'] }}</span>
@if (isset($item['label']))
<span class="label label-{{ $item['label_color'] or 'primary' }} pull-right">{{ $item['label'] }}</span>
@endif
@if (isset($item['submenu']) && !isset($item['label']))
<i class="fa fa-angle-left pull-right"></i>
@endif
</a>
@if (isset($item['submenu']))
<ul class="treeview-menu">
@each('adminlte::partials.menu-item', $item['submenu'], 'item')
</ul>
@endif
</li>
@endif
|
@if (is_string($item))
<li class="header">{{ $item }}</li>
@else
<li {{ isset($item['submenu']) ? 'class="treeview"' : '' }}>
<a href="{{ isset($item['url']) ? url($item['url']) : '#' }}">
<i class="fa fa-fw fa-{{ $item['icon'] or 'circle-o' }} {{ isset($item['icon_color']) ? 'text-' . $item['icon_color'] : '' }}"></i>
<span>{{ $item['text'] }}</span>
@if (isset($item['label']))
<span class="label label-{{ $item['label_color'] or 'primary' }} pull-right">{{ $item['label'] }}</span>
@elseif (isset($item['submenu']))
<i class="fa fa-angle-left pull-right"></i>
@endif
</a>
@if (isset($item['submenu']))
<ul class="treeview-menu">
@each('adminlte::partials.menu-item', $item['submenu'], 'item')
</ul>
@endif
</li>
@endif
|
Clean up if statement in menu item partial view
|
Clean up if statement in menu item partial view
|
PHP
|
mit
|
apisznasdin/Laravel-AdminLTE,MasterBratac/Laravel-AdminLTE,apisznasdin/Laravel-AdminLTE,MasterBratac/Laravel-AdminLTE,JeroenNoten/Laravel-AdminLTE,apisznasdin/Laravel-AdminLTE,JeroenNoten/Laravel-AdminLTE,MasterBratac/Laravel-AdminLTE
|
php
|
## Code Before:
@if (is_string($item))
<li class="header">{{ $item }}</li>
@else
<li {{ isset($item['submenu']) ? 'class="treeview"' : '' }}>
<a href="{{ isset($item['url']) ? url($item['url']) : '#' }}">
<i class="fa fa-fw fa-{{ $item['icon'] or 'circle-o' }} {{ isset($item['icon_color']) ? 'text-' . $item['icon_color'] : '' }}"></i>
<span>{{ $item['text'] }}</span>
@if (isset($item['label']))
<span class="label label-{{ $item['label_color'] or 'primary' }} pull-right">{{ $item['label'] }}</span>
@endif
@if (isset($item['submenu']) && !isset($item['label']))
<i class="fa fa-angle-left pull-right"></i>
@endif
</a>
@if (isset($item['submenu']))
<ul class="treeview-menu">
@each('adminlte::partials.menu-item', $item['submenu'], 'item')
</ul>
@endif
</li>
@endif
## Instruction:
Clean up if statement in menu item partial view
## Code After:
@if (is_string($item))
<li class="header">{{ $item }}</li>
@else
<li {{ isset($item['submenu']) ? 'class="treeview"' : '' }}>
<a href="{{ isset($item['url']) ? url($item['url']) : '#' }}">
<i class="fa fa-fw fa-{{ $item['icon'] or 'circle-o' }} {{ isset($item['icon_color']) ? 'text-' . $item['icon_color'] : '' }}"></i>
<span>{{ $item['text'] }}</span>
@if (isset($item['label']))
<span class="label label-{{ $item['label_color'] or 'primary' }} pull-right">{{ $item['label'] }}</span>
@elseif (isset($item['submenu']))
<i class="fa fa-angle-left pull-right"></i>
@endif
</a>
@if (isset($item['submenu']))
<ul class="treeview-menu">
@each('adminlte::partials.menu-item', $item['submenu'], 'item')
</ul>
@endif
</li>
@endif
|
3ed336a37935d6081a6fb0423622e84110114def
|
.travis.yml
|
.travis.yml
|
language: bash
addons:
apt:
sources:
- debian-sid # Grab ShellCheck from the Debian repo
packages:
- shellcheck
script: shellcheck -e SC2086 -s bash create-image create-iso sdc-vmmanifest setup_env.sh
|
language: bash
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y python-pykickstart
addons:
apt:
sources:
- debian-sid # Grab ShellCheck from the Debian repo
packages:
- shellcheck
script: shellcheck -e SC2086 -s bash create-image create-iso sdc-vmmanifest setup_env.sh
script: ksvalidator --firsterror ks.cfg
|
Add kickstart validator and validate ks.cfg file
|
Add kickstart validator and validate ks.cfg file
|
YAML
|
mpl-2.0
|
joyent/fedora-kvm-image-builder
|
yaml
|
## Code Before:
language: bash
addons:
apt:
sources:
- debian-sid # Grab ShellCheck from the Debian repo
packages:
- shellcheck
script: shellcheck -e SC2086 -s bash create-image create-iso sdc-vmmanifest setup_env.sh
## Instruction:
Add kickstart validator and validate ks.cfg file
## Code After:
language: bash
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y python-pykickstart
addons:
apt:
sources:
- debian-sid # Grab ShellCheck from the Debian repo
packages:
- shellcheck
script: shellcheck -e SC2086 -s bash create-image create-iso sdc-vmmanifest setup_env.sh
script: ksvalidator --firsterror ks.cfg
|
0135f7b02af9df7a1f6f0878d3d4de38e917f7a1
|
app/views/App/Index.html
|
app/views/App/Index.html
|
{{set . "title" "Home"}}
{{template "header.html" .}}
<header class="hero-unit" style="background-color:#A9F16C">
<div class="container">
<div class="row">
<div class="hero-text">
<h1>Welcome to FreeCycle.in.net</h1>
<p></p>
</div>
</div>
</div>
</header>
<div class="container">
<div class="row">
<div class="span6">
{{template "flash.html" .}}
</div>
</div>
</div>
{{template "footer.html" .}}
|
{{set . "title" "Home"}}
{{template "header.html" .}}
<header class="hero-unit" style="background-color:#A9F16C">
<div class="container">
<div class="row">
<div class="hero-text">
<h1>Welcome to FreeCycle.in.net</h1>
<p>Description to the site and explain objective</p>
</div>
</div>
</div>
</header>
<div class="container">
<div class="row">
<div class="span6">
{{template "flash.html" .}}
</div>
</div>
</div>
{{template "footer.html" .}}
|
Add some text to index page
|
Add some text to index page
|
HTML
|
apache-2.0
|
antonyho/freecycle.in.net,antonyho/freecycle.in.net
|
html
|
## Code Before:
{{set . "title" "Home"}}
{{template "header.html" .}}
<header class="hero-unit" style="background-color:#A9F16C">
<div class="container">
<div class="row">
<div class="hero-text">
<h1>Welcome to FreeCycle.in.net</h1>
<p></p>
</div>
</div>
</div>
</header>
<div class="container">
<div class="row">
<div class="span6">
{{template "flash.html" .}}
</div>
</div>
</div>
{{template "footer.html" .}}
## Instruction:
Add some text to index page
## Code After:
{{set . "title" "Home"}}
{{template "header.html" .}}
<header class="hero-unit" style="background-color:#A9F16C">
<div class="container">
<div class="row">
<div class="hero-text">
<h1>Welcome to FreeCycle.in.net</h1>
<p>Description to the site and explain objective</p>
</div>
</div>
</div>
</header>
<div class="container">
<div class="row">
<div class="span6">
{{template "flash.html" .}}
</div>
</div>
</div>
{{template "footer.html" .}}
|
702d7d111ef64f4db3a681563adcc0ca46472802
|
examples/lastfm/src/server/index.js
|
examples/lastfm/src/server/index.js
|
import express from 'express';
import { ApolloServer } from 'apollo-server-express';
import dataSources from '../connectors';
import schema from '../schema';
import resolvers from '../resolvers';
import './env';
const PORT = 3000;
const app = express();
const server = new ApolloServer({
typeDefs: schema,
resolvers,
dataSources,
context: () => ({
apiKey: process.env.LASTFM_KEY
})
});
server.applyMiddleware({ app, path: '/' });
app.listen({ port: PORT }, () =>
console.log(`🚀 Server ready at http://localhost:${PORT}${server.graphqlPath}`)
);
|
import express from 'express';
import { ApolloServer } from 'apollo-server-express';
import dataSources from '../connectors';
import schema from '../schema';
import resolvers from '../resolvers';
import './env';
const PORT = 3000;
const app = express();
const server = new ApolloServer({
typeDefs: schema,
resolvers,
dataSources,
context: () => ({
apiKey: process.env.LASTFM_KEY
}),
playground: {
settings: {
'editor.cursorShape': 'line',
'editor.theme': 'light',
}
},
});
server.applyMiddleware({ app, path: '/' });
app.listen({ port: PORT }, () =>
console.log(`🚀 Server ready at http://localhost:${PORT}${server.graphqlPath}`)
);
|
Fix cursor problem in Playground
|
Fix cursor problem in Playground
|
JavaScript
|
mit
|
matt-riley/gql_boilerplate
|
javascript
|
## Code Before:
import express from 'express';
import { ApolloServer } from 'apollo-server-express';
import dataSources from '../connectors';
import schema from '../schema';
import resolvers from '../resolvers';
import './env';
const PORT = 3000;
const app = express();
const server = new ApolloServer({
typeDefs: schema,
resolvers,
dataSources,
context: () => ({
apiKey: process.env.LASTFM_KEY
})
});
server.applyMiddleware({ app, path: '/' });
app.listen({ port: PORT }, () =>
console.log(`🚀 Server ready at http://localhost:${PORT}${server.graphqlPath}`)
);
## Instruction:
Fix cursor problem in Playground
## Code After:
import express from 'express';
import { ApolloServer } from 'apollo-server-express';
import dataSources from '../connectors';
import schema from '../schema';
import resolvers from '../resolvers';
import './env';
const PORT = 3000;
const app = express();
const server = new ApolloServer({
typeDefs: schema,
resolvers,
dataSources,
context: () => ({
apiKey: process.env.LASTFM_KEY
}),
playground: {
settings: {
'editor.cursorShape': 'line',
'editor.theme': 'light',
}
},
});
server.applyMiddleware({ app, path: '/' });
app.listen({ port: PORT }, () =>
console.log(`🚀 Server ready at http://localhost:${PORT}${server.graphqlPath}`)
);
|
216825466815c9efb8227bfda4758302f08d2b33
|
library/CM/FormField/Hidden.js
|
library/CM/FormField/Hidden.js
|
/**
* @class CM_FormField_Hidden
* @extends CM_FormField_Abstract
*/
var CM_FormField_Hidden = CM_FormField_Abstract.extend({
_class: 'CM_FormField_Hidden'
});
|
/**
* @class CM_FormField_Hidden
* @extends CM_FormField_Abstract
*/
var CM_FormField_Hidden = CM_FormField_Abstract.extend({
_class: 'CM_FormField_Hidden',
/**
* @return String
*/
getValue: function() {
return this.$('input').val();
},
/**
* @param {String} value
*/
setValue: function(value) {
this.$('input').val(value);
}
});
|
Add value getter/setter for hidden form field
|
Add value getter/setter for hidden form field
|
JavaScript
|
mit
|
alexispeter/CM,christopheschwyzer/CM,mariansollmann/CM,alexispeter/CM,christopheschwyzer/CM,alexispeter/CM,fauvel/CM,fvovan/CM,christopheschwyzer/CM,cargomedia/CM,fauvel/CM,tomaszdurka/CM,tomaszdurka/CM,cargomedia/CM,zazabe/cm,mariansollmann/CM,tomaszdurka/CM,christopheschwyzer/CM,tomaszdurka/CM,njam/CM,fauvel/CM,alexispeter/CM,mariansollmann/CM,tomaszdurka/CM,fvovan/CM,zazabe/cm,vogdb/cm,vogdb/cm,njam/CM,njam/CM,fauvel/CM,vogdb/cm,fvovan/CM,njam/CM,fauvel/CM,cargomedia/CM,vogdb/cm,njam/CM,zazabe/cm,zazabe/cm,cargomedia/CM,fvovan/CM,vogdb/cm,mariansollmann/CM
|
javascript
|
## Code Before:
/**
* @class CM_FormField_Hidden
* @extends CM_FormField_Abstract
*/
var CM_FormField_Hidden = CM_FormField_Abstract.extend({
_class: 'CM_FormField_Hidden'
});
## Instruction:
Add value getter/setter for hidden form field
## Code After:
/**
* @class CM_FormField_Hidden
* @extends CM_FormField_Abstract
*/
var CM_FormField_Hidden = CM_FormField_Abstract.extend({
_class: 'CM_FormField_Hidden',
/**
* @return String
*/
getValue: function() {
return this.$('input').val();
},
/**
* @param {String} value
*/
setValue: function(value) {
this.$('input').val(value);
}
});
|
6c6fe63cc527fed6da35a5faa48cdb23e6204848
|
app/assets/stylesheets/govuk-component/govspeak/_call-to-action.scss
|
app/assets/stylesheets/govuk-component/govspeak/_call-to-action.scss
|
// Govspeak call to action
// http://govuk-component-guide.herokuapp.com/components/govspeak/fixtures/call_to_action
//
// Support:
//
// - alphagov/whitehall: ✔︎
// - alphagov/govspeak: ✔︎
.govuk-govspeak {
.call-to-action {
margin-top: $gutter;
margin-bottom: $gutter;
background-color: $panel-colour;
padding: $gutter-half;
&:first-child {
margin-top: 0;
}
p:last-child,
ul:last-child,
ol:last-child {
margin-bottom: 0;
}
ol {
@include media(desktop) {
list-style-position: outside;
}
}
}
}
|
// Govspeak call to action
// http://govuk-component-guide.herokuapp.com/components/govspeak/fixtures/call_to_action
//
// Support:
//
// - alphagov/whitehall: ✔︎
// - alphagov/govspeak: ✔︎
.govuk-govspeak {
.call-to-action {
margin-top: $gutter;
margin-bottom: $gutter;
background-color: $panel-colour;
padding: 2em;
&:first-child {
margin-top: 0;
}
p:last-child,
ul:last-child,
ol:last-child {
margin-bottom: 0;
}
}
}
|
Apply rationalised design to call to action
|
Apply rationalised design to call to action
The template consolidation team have been working on Govspeak and have produced a rationalised design for the various Govspeak callouts.
This modifies the ‘call to action’ callout to use 2em padding. It also removes a redundant declaration - ordered lists already have a list-style-position of outside as set in the govspeak typography file.
|
SCSS
|
mit
|
alphagov/static,alphagov/static,alphagov/static
|
scss
|
## Code Before:
// Govspeak call to action
// http://govuk-component-guide.herokuapp.com/components/govspeak/fixtures/call_to_action
//
// Support:
//
// - alphagov/whitehall: ✔︎
// - alphagov/govspeak: ✔︎
.govuk-govspeak {
.call-to-action {
margin-top: $gutter;
margin-bottom: $gutter;
background-color: $panel-colour;
padding: $gutter-half;
&:first-child {
margin-top: 0;
}
p:last-child,
ul:last-child,
ol:last-child {
margin-bottom: 0;
}
ol {
@include media(desktop) {
list-style-position: outside;
}
}
}
}
## Instruction:
Apply rationalised design to call to action
The template consolidation team have been working on Govspeak and have produced a rationalised design for the various Govspeak callouts.
This modifies the ‘call to action’ callout to use 2em padding. It also removes a redundant declaration - ordered lists already have a list-style-position of outside as set in the govspeak typography file.
## Code After:
// Govspeak call to action
// http://govuk-component-guide.herokuapp.com/components/govspeak/fixtures/call_to_action
//
// Support:
//
// - alphagov/whitehall: ✔︎
// - alphagov/govspeak: ✔︎
.govuk-govspeak {
.call-to-action {
margin-top: $gutter;
margin-bottom: $gutter;
background-color: $panel-colour;
padding: 2em;
&:first-child {
margin-top: 0;
}
p:last-child,
ul:last-child,
ol:last-child {
margin-bottom: 0;
}
}
}
|
c81fff4ff4cccc51faf47c7ca9a63cd9eb6a2699
|
projects/tests/factories.py
|
projects/tests/factories.py
|
import factory
from django.contrib.auth.models import User
from accounts.tests.factories import UserFactory
from .. import models
class OrganizationFactory(factory.DjangoModelFactory):
"""Organization factory"""
FACTORY_FOR = models.Organization
name = factory.Sequence(lambda n: 'organization {}'.format(n))
@factory.post_generation
def users(self, create, extracted, **kwargs):
if not create:
return
if extracted:
for user in extracted:
self.users.add(user)
else:
self.users = UserFactory.create_batch(10)
class ProjectFactory(factory.DjangoModelFactory):
"""Project factory"""
FACTORY_FOR = models.Project
name = factory.Sequence(lambda n: 'project{}'.format(n))
url = factory.Sequence(lambda n: 'http://test{}.com'.format(n))
organization = factory.SubFactory(OrganizationFactory)
@factory.sequence
def owner(n):
return User.objects.create_user('user{}'.format(n))
|
import factory
from django.contrib.auth.models import User
from accounts.tests.factories import UserFactory
from .. import models
class OrganizationFactory(factory.DjangoModelFactory):
"""Organization factory"""
FACTORY_FOR = models.Organization
name = factory.Sequence(lambda n: 'organization {}'.format(n))
@factory.post_generation
def users(self, create, extracted, **kwargs):
if not create:
return
if extracted:
for user in extracted:
self.users.add(user)
else:
self.users = UserFactory.create_batch(10)
class ProjectFactory(factory.DjangoModelFactory):
"""Project factory"""
FACTORY_FOR = models.Project
name = factory.Sequence(lambda n: 'project{}'.format(n))
url = factory.Sequence(lambda n: 'http://test{}.com'.format(n))
organization = factory.SubFactory(OrganizationFactory)
run_here = False
@factory.sequence
def owner(n):
return User.objects.create_user('user{}'.format(n))
|
Change project factory default values
|
Change project factory default values
|
Python
|
mit
|
nvbn/coviolations_web,nvbn/coviolations_web
|
python
|
## Code Before:
import factory
from django.contrib.auth.models import User
from accounts.tests.factories import UserFactory
from .. import models
class OrganizationFactory(factory.DjangoModelFactory):
"""Organization factory"""
FACTORY_FOR = models.Organization
name = factory.Sequence(lambda n: 'organization {}'.format(n))
@factory.post_generation
def users(self, create, extracted, **kwargs):
if not create:
return
if extracted:
for user in extracted:
self.users.add(user)
else:
self.users = UserFactory.create_batch(10)
class ProjectFactory(factory.DjangoModelFactory):
"""Project factory"""
FACTORY_FOR = models.Project
name = factory.Sequence(lambda n: 'project{}'.format(n))
url = factory.Sequence(lambda n: 'http://test{}.com'.format(n))
organization = factory.SubFactory(OrganizationFactory)
@factory.sequence
def owner(n):
return User.objects.create_user('user{}'.format(n))
## Instruction:
Change project factory default values
## Code After:
import factory
from django.contrib.auth.models import User
from accounts.tests.factories import UserFactory
from .. import models
class OrganizationFactory(factory.DjangoModelFactory):
"""Organization factory"""
FACTORY_FOR = models.Organization
name = factory.Sequence(lambda n: 'organization {}'.format(n))
@factory.post_generation
def users(self, create, extracted, **kwargs):
if not create:
return
if extracted:
for user in extracted:
self.users.add(user)
else:
self.users = UserFactory.create_batch(10)
class ProjectFactory(factory.DjangoModelFactory):
"""Project factory"""
FACTORY_FOR = models.Project
name = factory.Sequence(lambda n: 'project{}'.format(n))
url = factory.Sequence(lambda n: 'http://test{}.com'.format(n))
organization = factory.SubFactory(OrganizationFactory)
run_here = False
@factory.sequence
def owner(n):
return User.objects.create_user('user{}'.format(n))
|
7bf70fe520bc203e1590c75a23ec2baeeceb719b
|
pkgs/development/libraries/libpcap/default.nix
|
pkgs/development/libraries/libpcap/default.nix
|
{ stdenv, fetchurl, flex, bison }:
stdenv.mkDerivation rec {
name = "libpcap-1.9.0";
src = fetchurl {
url = "https://www.tcpdump.org/release/${name}.tar.gz";
sha256 = "06bhydl4vr4z9c3vahl76f2j96z1fbrcl7wwismgs4sris08inrf";
};
nativeBuildInputs = [ flex bison ];
# We need to force the autodetection because detection doesn't
# work in pure build enviroments.
configureFlags = [
("--with-pcap=" + {
linux = "linux";
darwin = "bpf";
}.${stdenv.hostPlatform.parsed.kernel.name})
] ++ stdenv.lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [
"ac_cv_linux_vers=2"
];
dontStrip = stdenv.hostPlatform != stdenv.buildPlatform;
prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace configure --replace " -arch i386" ""
'';
preInstall = ''mkdir -p $out/bin'';
meta = with stdenv.lib; {
homepage = https://www.tcpdump.org;
description = "Packet Capture Library";
platforms = platforms.unix;
maintainers = with maintainers; [ fpletz ];
license = licenses.bsd3;
};
}
|
{ stdenv, fetchurl, flex, bison }:
stdenv.mkDerivation rec {
name = "libpcap-1.9.0";
src = fetchurl {
url = "https://www.tcpdump.org/release/${name}.tar.gz";
sha256 = "06bhydl4vr4z9c3vahl76f2j96z1fbrcl7wwismgs4sris08inrf";
};
nativeBuildInputs = [ flex bison ];
# We need to force the autodetection because detection doesn't
# work in pure build enviroments.
configureFlags = [
("--with-pcap=" + {
linux = "linux";
darwin = "bpf";
}.${stdenv.hostPlatform.parsed.kernel.name})
] ++ stdenv.lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [
"ac_cv_linux_vers=2"
];
dontStrip = stdenv.hostPlatform != stdenv.buildPlatform;
prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace configure --replace " -arch i386" ""
'' + ''
sed -i '1i#include <limits.h>' pcap-usb-linux.c
'';
preInstall = ''mkdir -p $out/bin'';
meta = with stdenv.lib; {
homepage = https://www.tcpdump.org;
description = "Packet Capture Library";
platforms = platforms.unix;
maintainers = with maintainers; [ fpletz ];
license = licenses.bsd3;
};
}
|
Add missing include, fix w/musl
|
pcap: Add missing include, fix w/musl
|
Nix
|
mit
|
SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs
|
nix
|
## Code Before:
{ stdenv, fetchurl, flex, bison }:
stdenv.mkDerivation rec {
name = "libpcap-1.9.0";
src = fetchurl {
url = "https://www.tcpdump.org/release/${name}.tar.gz";
sha256 = "06bhydl4vr4z9c3vahl76f2j96z1fbrcl7wwismgs4sris08inrf";
};
nativeBuildInputs = [ flex bison ];
# We need to force the autodetection because detection doesn't
# work in pure build enviroments.
configureFlags = [
("--with-pcap=" + {
linux = "linux";
darwin = "bpf";
}.${stdenv.hostPlatform.parsed.kernel.name})
] ++ stdenv.lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [
"ac_cv_linux_vers=2"
];
dontStrip = stdenv.hostPlatform != stdenv.buildPlatform;
prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace configure --replace " -arch i386" ""
'';
preInstall = ''mkdir -p $out/bin'';
meta = with stdenv.lib; {
homepage = https://www.tcpdump.org;
description = "Packet Capture Library";
platforms = platforms.unix;
maintainers = with maintainers; [ fpletz ];
license = licenses.bsd3;
};
}
## Instruction:
pcap: Add missing include, fix w/musl
## Code After:
{ stdenv, fetchurl, flex, bison }:
stdenv.mkDerivation rec {
name = "libpcap-1.9.0";
src = fetchurl {
url = "https://www.tcpdump.org/release/${name}.tar.gz";
sha256 = "06bhydl4vr4z9c3vahl76f2j96z1fbrcl7wwismgs4sris08inrf";
};
nativeBuildInputs = [ flex bison ];
# We need to force the autodetection because detection doesn't
# work in pure build enviroments.
configureFlags = [
("--with-pcap=" + {
linux = "linux";
darwin = "bpf";
}.${stdenv.hostPlatform.parsed.kernel.name})
] ++ stdenv.lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [
"ac_cv_linux_vers=2"
];
dontStrip = stdenv.hostPlatform != stdenv.buildPlatform;
prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace configure --replace " -arch i386" ""
'' + ''
sed -i '1i#include <limits.h>' pcap-usb-linux.c
'';
preInstall = ''mkdir -p $out/bin'';
meta = with stdenv.lib; {
homepage = https://www.tcpdump.org;
description = "Packet Capture Library";
platforms = platforms.unix;
maintainers = with maintainers; [ fpletz ];
license = licenses.bsd3;
};
}
|
b81cce6c7333f638fd2fcfa35394040e25cf1769
|
karma.conf.js
|
karma.conf.js
|
const webpackConfig = require('./webpack.config');
webpackConfig.devtool = 'inline-source-map';
webpackConfig.externals = {
'react/lib/ExecutionEnvironment': true,
'react/lib/ReactContext': 'window'
};
module.exports = (config) => {
config.set({
browsers: ['PhantomJS'],
singleRun: true,
frameworks: ['mocha', 'chai', 'sinon', 'sinon-chai'],
files: ['tests.webpack.js'],
plugins: [
'karma-phantomjs-launcher',
'karma-chai',
'karma-mocha',
'karma-sourcemap-loader',
'karma-webpack',
'karma-mocha-reporter',
'karma-sinon',
'karma-sinon-chai'
],
preprocessors: {
'tests.webpack.js': ['webpack', 'sourcemap']
},
reporters: ['mocha'],
webpack: webpackConfig,
webpackServer: {
noInfo: true
},
autoWatch: true
});
};
|
const webpackConfig = require('./webpack.config');
webpackConfig.devtool = 'inline-source-map';
webpackConfig.externals = {
'react/lib/ExecutionEnvironment': true,
'react/lib/ReactContext': 'window',
'react/addons': true
};
module.exports = (config) => {
config.set({
browsers: ['PhantomJS'],
singleRun: true,
frameworks: ['mocha', 'chai', 'sinon', 'sinon-chai'],
files: ['tests.webpack.js'],
plugins: [
'karma-phantomjs-launcher',
'karma-chai',
'karma-mocha',
'karma-sourcemap-loader',
'karma-webpack',
'karma-mocha-reporter',
'karma-sinon',
'karma-sinon-chai'
],
preprocessors: {
'tests.webpack.js': ['webpack', 'sourcemap']
},
reporters: ['mocha'],
webpack: webpackConfig,
webpackServer: {
noInfo: true
},
autoWatch: true
});
};
|
Fix karma tests not building
|
Fix karma tests not building
|
JavaScript
|
mit
|
nickbabcock/udps,nickbabcock/udps,nickbabcock/udps
|
javascript
|
## Code Before:
const webpackConfig = require('./webpack.config');
webpackConfig.devtool = 'inline-source-map';
webpackConfig.externals = {
'react/lib/ExecutionEnvironment': true,
'react/lib/ReactContext': 'window'
};
module.exports = (config) => {
config.set({
browsers: ['PhantomJS'],
singleRun: true,
frameworks: ['mocha', 'chai', 'sinon', 'sinon-chai'],
files: ['tests.webpack.js'],
plugins: [
'karma-phantomjs-launcher',
'karma-chai',
'karma-mocha',
'karma-sourcemap-loader',
'karma-webpack',
'karma-mocha-reporter',
'karma-sinon',
'karma-sinon-chai'
],
preprocessors: {
'tests.webpack.js': ['webpack', 'sourcemap']
},
reporters: ['mocha'],
webpack: webpackConfig,
webpackServer: {
noInfo: true
},
autoWatch: true
});
};
## Instruction:
Fix karma tests not building
## Code After:
const webpackConfig = require('./webpack.config');
webpackConfig.devtool = 'inline-source-map';
webpackConfig.externals = {
'react/lib/ExecutionEnvironment': true,
'react/lib/ReactContext': 'window',
'react/addons': true
};
module.exports = (config) => {
config.set({
browsers: ['PhantomJS'],
singleRun: true,
frameworks: ['mocha', 'chai', 'sinon', 'sinon-chai'],
files: ['tests.webpack.js'],
plugins: [
'karma-phantomjs-launcher',
'karma-chai',
'karma-mocha',
'karma-sourcemap-loader',
'karma-webpack',
'karma-mocha-reporter',
'karma-sinon',
'karma-sinon-chai'
],
preprocessors: {
'tests.webpack.js': ['webpack', 'sourcemap']
},
reporters: ['mocha'],
webpack: webpackConfig,
webpackServer: {
noInfo: true
},
autoWatch: true
});
};
|
de1848878879b8e09fa1e49229f1b36480ced1cf
|
boot/bionitio-boot-test.sh
|
boot/bionitio-boot-test.sh
|
BOOTSTRAP_SCRIPT=$1
# Run the script and create a new python repository
${BOOTSTRAP_SCRIPT} -i python -n skynet -c BSD-3-Clause -a 'Miles Bennett Dyson' -e '[email protected]' -l logfile
# Install the new program into a virtual environment
python3 -m venv skynet_dev
source skynet_dev/bin/activate
pip install -U skynet
# Run the test suite
./skynet/functional_tests/skynet-test.sh -p skynet -d ./skynet/functional_tests/test_data -v
|
BOOTSTRAP_SCRIPT=$1
# Run the script and create a new python repository
${BOOTSTRAP_SCRIPT} -i python -n biodemo -c BSD-3-Clause -a 'Example Author Name' -e '[email protected]' -l logfile
# Install the new program into a virtual environment
python3 -m venv biodemo_dev
source biodemo_dev/bin/activate
pip install -U ./biodemo
# Run the test suite
./biodemo/functional_tests/biodemo-test.sh -p biodemo -d ./biodemo/functional_tests/test_data -v
|
Replace skynet with biodemo and use generic author name and email address
|
Replace skynet with biodemo and use generic author name and email address
|
Shell
|
mit
|
biotool-paper/biotool,biotool-paper/biotool,bionitio-team/bionitio,biotool-paper/biotool,biotool-paper/biotool,biotool-paper/biotool,biotool-paper/biotool,biotool-paper/biotool,biotool-paper/biotool,biotool-paper/biotool,biotool-paper/biotool
|
shell
|
## Code Before:
BOOTSTRAP_SCRIPT=$1
# Run the script and create a new python repository
${BOOTSTRAP_SCRIPT} -i python -n skynet -c BSD-3-Clause -a 'Miles Bennett Dyson' -e '[email protected]' -l logfile
# Install the new program into a virtual environment
python3 -m venv skynet_dev
source skynet_dev/bin/activate
pip install -U skynet
# Run the test suite
./skynet/functional_tests/skynet-test.sh -p skynet -d ./skynet/functional_tests/test_data -v
## Instruction:
Replace skynet with biodemo and use generic author name and email address
## Code After:
BOOTSTRAP_SCRIPT=$1
# Run the script and create a new python repository
${BOOTSTRAP_SCRIPT} -i python -n biodemo -c BSD-3-Clause -a 'Example Author Name' -e '[email protected]' -l logfile
# Install the new program into a virtual environment
python3 -m venv biodemo_dev
source biodemo_dev/bin/activate
pip install -U ./biodemo
# Run the test suite
./biodemo/functional_tests/biodemo-test.sh -p biodemo -d ./biodemo/functional_tests/test_data -v
|
9522af4d4d244769ba997572306a9d4a43cc8d46
|
setup.sh
|
setup.sh
|
if ! command -v brew > /dev/null; then
echo "Homebrew not installed!"
echo "In order to use this script please install homebrew from https://brew.sh"
exit
fi
echo "Setting brew"
ln -s "$(pwd)"/.Brewfile ~/.Brewfile
brew bundle --global
echo "Setting vim"
if [ ! -d ~/.vim ]; then
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
fi
ln -s "$(pwd)"/vim/vimrc ~/.vimrc
ln -s "$(pwd)"/vim/.nvim ~/.config/nvim/init.vim
echo "Setting emacs"
if [ ! -d ~/.emacs.d ]; then
git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
fi
ln -s "$(pwd)"/emacs/.spacemacs ~/.spacemacs
echo "Setting git config"
ln -s "$(pwd)"/git/.gitconfig ~/.gitconfig
echo "Setting Visual Studio Code"
if which code > /dev/null 2>&1; then
echo "code installed"
. vscode/setup.sh
else
echo "code shell is not installed"
echo "Open the Command Palette (⇧ ⌘ P) and type 'shell command' to find the Shell Command: Install 'code' command in PATH command."
fi
|
if ! command -v brew > /dev/null; then
echo "Homebrew not installed!"
echo "In order to use this script please install homebrew from https://brew.sh"
exit
fi
echo "Setting brew"
ln -s "$(pwd)"/.Brewfile ~/.Brewfile
brew bundle --global
echo "Setting vim"
if [ ! -d ~/.vim ]; then
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
fi
ln -s "$(pwd)"/vim/vimrc ~/.vimrc
mkdir ~/.config
mkdir ~/.config/nvim
ln -s "$(pwd)"/vim/.nvim ~/.config/nvim/init.vim
echo "Setting emacs"
if [ ! -d ~/.emacs.d ]; then
git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
fi
ln -s "$(pwd)"/emacs/.spacemacs ~/.spacemacs
echo "Setting git config"
ln -s "$(pwd)"/git/.gitconfig ~/.gitconfig
echo "Setting Visual Studio Code"
if which code > /dev/null 2>&1; then
echo "code installed"
. vscode/setup.sh
else
echo "code shell is not installed"
echo "Open the Command Palette (⇧ ⌘ P) and type 'shell command' to find the Shell Command: Install 'code' command in PATH command."
fi
|
Create config folder to be able to link neovim
|
Create config folder to be able to link neovim
|
Shell
|
mit
|
csaura/dotfiles
|
shell
|
## Code Before:
if ! command -v brew > /dev/null; then
echo "Homebrew not installed!"
echo "In order to use this script please install homebrew from https://brew.sh"
exit
fi
echo "Setting brew"
ln -s "$(pwd)"/.Brewfile ~/.Brewfile
brew bundle --global
echo "Setting vim"
if [ ! -d ~/.vim ]; then
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
fi
ln -s "$(pwd)"/vim/vimrc ~/.vimrc
ln -s "$(pwd)"/vim/.nvim ~/.config/nvim/init.vim
echo "Setting emacs"
if [ ! -d ~/.emacs.d ]; then
git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
fi
ln -s "$(pwd)"/emacs/.spacemacs ~/.spacemacs
echo "Setting git config"
ln -s "$(pwd)"/git/.gitconfig ~/.gitconfig
echo "Setting Visual Studio Code"
if which code > /dev/null 2>&1; then
echo "code installed"
. vscode/setup.sh
else
echo "code shell is not installed"
echo "Open the Command Palette (⇧ ⌘ P) and type 'shell command' to find the Shell Command: Install 'code' command in PATH command."
fi
## Instruction:
Create config folder to be able to link neovim
## Code After:
if ! command -v brew > /dev/null; then
echo "Homebrew not installed!"
echo "In order to use this script please install homebrew from https://brew.sh"
exit
fi
echo "Setting brew"
ln -s "$(pwd)"/.Brewfile ~/.Brewfile
brew bundle --global
echo "Setting vim"
if [ ! -d ~/.vim ]; then
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
fi
ln -s "$(pwd)"/vim/vimrc ~/.vimrc
mkdir ~/.config
mkdir ~/.config/nvim
ln -s "$(pwd)"/vim/.nvim ~/.config/nvim/init.vim
echo "Setting emacs"
if [ ! -d ~/.emacs.d ]; then
git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
fi
ln -s "$(pwd)"/emacs/.spacemacs ~/.spacemacs
echo "Setting git config"
ln -s "$(pwd)"/git/.gitconfig ~/.gitconfig
echo "Setting Visual Studio Code"
if which code > /dev/null 2>&1; then
echo "code installed"
. vscode/setup.sh
else
echo "code shell is not installed"
echo "Open the Command Palette (⇧ ⌘ P) and type 'shell command' to find the Shell Command: Install 'code' command in PATH command."
fi
|
184b7f60c6ae8dd1daf42a25ce7926c0b89d662f
|
doc/faq.rst
|
doc/faq.rst
|
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, You can obtain one at http://mozilla.org/MPL/2.0/.
Faq
===
#. :ref:`what_is_haka`
#. :ref:`why_a_new_framework`
.. _what_is_haka:
What is Haka?
^^^^^^^^^^^^^
Haka is an open source flexible framework capable of filtering network
traffic based on user rules. It also allows to easily define protocols using
a grammar and a state machine description.
.. _why_a_new_framework:
Why a new framework?
^^^^^^^^^^^^^^^^^^^^
Haka goal is to provide a very flexible language to describe rules as well
as network protocols targeted to security experts.
|
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, You can obtain one at http://mozilla.org/MPL/2.0/.
Faq
===
#. :ref:`what_is_haka`
#. :ref:`why_a_new_framework`
#. :ref:`how_to_start_with_haka`
#. :ref:`how_to_contribute_to_haka`
.. _what_is_haka:
What is Haka?
-------------
Haka is an open source flexible framework capable of filtering network
traffic based on user rules. It also allows to easily define protocols using
a grammar and a state machine description.
.. _why_a_new_framework:
Why a new framework?
--------------------
Haka goal is to provide a very flexible language to describe rules as well
as network protocols targeted to security experts.
.. _how_to_start_with_haka:
How to quickly start with Haka?
-------------------------------
The user guide contains two sections to enable you to quickly start with Haka:
* :doc:`user/install`
* :doc:`user/gettingstarted`
.. _how_to_contribute_to_haka:
How to contribute to Haka?
--------------------------
You are welcome to contribute to Haka. Check our section :doc:`developer/contribute`.
You can follow Haka developments on GitHub : https://github.com/haka-security/haka.
|
Add FAQ questions & answers
|
Add FAQ questions & answers
|
reStructuredText
|
mpl-2.0
|
nabilbendafi/haka,Wingless-Archangel/haka,lcheylus/haka,nabilbendafi/haka,Wingless-Archangel/haka,nabilbendafi/haka,lcheylus/haka,lcheylus/haka,haka-security/haka,haka-security/haka,LubyRuffy/haka,haka-security/haka,LubyRuffy/haka
|
restructuredtext
|
## Code Before:
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, You can obtain one at http://mozilla.org/MPL/2.0/.
Faq
===
#. :ref:`what_is_haka`
#. :ref:`why_a_new_framework`
.. _what_is_haka:
What is Haka?
^^^^^^^^^^^^^
Haka is an open source flexible framework capable of filtering network
traffic based on user rules. It also allows to easily define protocols using
a grammar and a state machine description.
.. _why_a_new_framework:
Why a new framework?
^^^^^^^^^^^^^^^^^^^^
Haka goal is to provide a very flexible language to describe rules as well
as network protocols targeted to security experts.
## Instruction:
Add FAQ questions & answers
## Code After:
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, You can obtain one at http://mozilla.org/MPL/2.0/.
Faq
===
#. :ref:`what_is_haka`
#. :ref:`why_a_new_framework`
#. :ref:`how_to_start_with_haka`
#. :ref:`how_to_contribute_to_haka`
.. _what_is_haka:
What is Haka?
-------------
Haka is an open source flexible framework capable of filtering network
traffic based on user rules. It also allows to easily define protocols using
a grammar and a state machine description.
.. _why_a_new_framework:
Why a new framework?
--------------------
Haka goal is to provide a very flexible language to describe rules as well
as network protocols targeted to security experts.
.. _how_to_start_with_haka:
How to quickly start with Haka?
-------------------------------
The user guide contains two sections to enable you to quickly start with Haka:
* :doc:`user/install`
* :doc:`user/gettingstarted`
.. _how_to_contribute_to_haka:
How to contribute to Haka?
--------------------------
You are welcome to contribute to Haka. Check our section :doc:`developer/contribute`.
You can follow Haka developments on GitHub : https://github.com/haka-security/haka.
|
dd3744032ddbe66961533a3cf8836f4d5bd0a938
|
src/theatralia/core.clj
|
src/theatralia/core.clj
|
(ns theatralia.core)
;;; This is an incorrect implementation, such as might be written by
;;; someone who was used to a Lisp in which an empty list is equal to
;;; nil.
(defn first-element [sequence default]
(if (nil? sequence)
default
(first sequence)))
|
(ns theatralia.core)
(defn first-element [sequence default]
(if (seq sequence)
(first sequence)
default))
|
Make the template tests pass
|
Make the template tests pass
Now the CI build should succeed.
|
Clojure
|
mit
|
rmoehn/theatralia,u-o/theatralia
|
clojure
|
## Code Before:
(ns theatralia.core)
;;; This is an incorrect implementation, such as might be written by
;;; someone who was used to a Lisp in which an empty list is equal to
;;; nil.
(defn first-element [sequence default]
(if (nil? sequence)
default
(first sequence)))
## Instruction:
Make the template tests pass
Now the CI build should succeed.
## Code After:
(ns theatralia.core)
(defn first-element [sequence default]
(if (seq sequence)
(first sequence)
default))
|
aeb30a7fab7c557ceb88de61d8c273b6537fa018
|
lib/jiraSOAP/url.rb
|
lib/jiraSOAP/url.rb
|
class URL
attr_accessor :url
# Initializes @url with the correct object type.
# @param [String] url string to turn into some kind of URL object
# @return [URI::HTTP,NSURL] URI::HTTP on CRuby, NSURL on MacRuby
def initialize(url)
@url = URI.parse url
end
# The to_s method technically exists and so method_missing would not
# work its magic to redirect it to @url so we manually override.
# @return [String]
def to_s
@url.to_s
end
# The magic of the hack, passing everything to the level beneath.
def method_missing(method, *args)
@url.send method, *args
end
end
|
class URL
# @return [NSURL, URI::HTTP] the type depends on your RUBY_ENGINE
attr_accessor :url
# Initializes @url with the correct object type.
# @param [String] url string to turn into some kind of URL object
# @return [URI::HTTP,NSURL] URI::HTTP on CRuby, NSURL on MacRuby
def initialize(url)
@url = URI.parse url
end
# The to_s method technically exists and so method_missing would not
# work its magic to redirect it to @url so we manually override.
# @return [String]
def to_s
@url.to_s
end
# The magic of the hack, passing everything to the level beneath.
def method_missing(method, *args)
@url.send method, *args
end
end
|
Document the type for the URL class' only attribute
|
Document the type for the URL class' only attribute
|
Ruby
|
mit
|
Marketcircle/jiraSOAP
|
ruby
|
## Code Before:
class URL
attr_accessor :url
# Initializes @url with the correct object type.
# @param [String] url string to turn into some kind of URL object
# @return [URI::HTTP,NSURL] URI::HTTP on CRuby, NSURL on MacRuby
def initialize(url)
@url = URI.parse url
end
# The to_s method technically exists and so method_missing would not
# work its magic to redirect it to @url so we manually override.
# @return [String]
def to_s
@url.to_s
end
# The magic of the hack, passing everything to the level beneath.
def method_missing(method, *args)
@url.send method, *args
end
end
## Instruction:
Document the type for the URL class' only attribute
## Code After:
class URL
# @return [NSURL, URI::HTTP] the type depends on your RUBY_ENGINE
attr_accessor :url
# Initializes @url with the correct object type.
# @param [String] url string to turn into some kind of URL object
# @return [URI::HTTP,NSURL] URI::HTTP on CRuby, NSURL on MacRuby
def initialize(url)
@url = URI.parse url
end
# The to_s method technically exists and so method_missing would not
# work its magic to redirect it to @url so we manually override.
# @return [String]
def to_s
@url.to_s
end
# The magic of the hack, passing everything to the level beneath.
def method_missing(method, *args)
@url.send method, *args
end
end
|
479fea5b3c0d971e2eebac0857f361264139f37a
|
lib/get-by-time.js
|
lib/get-by-time.js
|
'use strict';
// To make id smaller we get microgseconds count from more recent date
var start = Date.UTC(2011, 8, 21) * 1000
// Prefix with number, it reduces chances of collision with variable names
// (helpful if used as property names on objects)
, prefix = String(Math.floor(Math.random() * 10))
// Make it more unique
, postfix = Math.floor(Math.random() * 36).toString(36);
module.exports = function (time) {
return prefix + (time - start).toString(36) + postfix;
};
|
'use strict';
// To make id smaller we get microseconds count from more recent date
var start = Date.UTC(2012, 12, 21, 12, 0, 0, 0) * 1000
// Prefix with number, it reduces chances of collision with variable names
// (helpful if used as property names on objects)
, prefix = String(Math.floor(Math.random() * 10))
// Make it more unique
, postfix = Math.floor(Math.random() * 36).toString(36);
module.exports = function (time) {
return prefix + (time - start).toString(36) + postfix;
};
|
Make recent date even more recent
|
Make recent date even more recent
|
JavaScript
|
mit
|
medikoo/time-uuid
|
javascript
|
## Code Before:
'use strict';
// To make id smaller we get microgseconds count from more recent date
var start = Date.UTC(2011, 8, 21) * 1000
// Prefix with number, it reduces chances of collision with variable names
// (helpful if used as property names on objects)
, prefix = String(Math.floor(Math.random() * 10))
// Make it more unique
, postfix = Math.floor(Math.random() * 36).toString(36);
module.exports = function (time) {
return prefix + (time - start).toString(36) + postfix;
};
## Instruction:
Make recent date even more recent
## Code After:
'use strict';
// To make id smaller we get microseconds count from more recent date
var start = Date.UTC(2012, 12, 21, 12, 0, 0, 0) * 1000
// Prefix with number, it reduces chances of collision with variable names
// (helpful if used as property names on objects)
, prefix = String(Math.floor(Math.random() * 10))
// Make it more unique
, postfix = Math.floor(Math.random() * 36).toString(36);
module.exports = function (time) {
return prefix + (time - start).toString(36) + postfix;
};
|
94318e952c45dea6b579d3d19648b084e35d1d5b
|
buildkite/docker/build.sh
|
buildkite/docker/build.sh
|
set -euxo pipefail
docker build --target ubuntu1404-java8 -t gcr.io/bazel-public/ubuntu1404:java8 .
docker push gcr.io/bazel-public/ubuntu1404:java8
docker build --target ubuntu1404-java8 -t gcr.io/bazel-untrusted/ubuntu1404:java8 .
docker push gcr.io/bazel-untrusted/ubuntu1404:java8
docker build --target ubuntu1604-java8 -t gcr.io/bazel-public/ubuntu1604:java8 .
docker push gcr.io/bazel-public/ubuntu1604:java8
docker build --target ubuntu1604-java8 -t gcr.io/bazel-untrusted/ubuntu1604:java8 .
docker push gcr.io/bazel-untrusted/ubuntu1604:java8
for java in java8 java9 java10 java11 nojava; do
docker build --target ubuntu1804-$java -t gcr.io/bazel-public/ubuntu1804:$java .
docker push gcr.io/bazel-public/ubuntu1804:$java
docker build --target ubuntu1804-$java -t gcr.io/bazel-untrusted/ubuntu1804:$java .
docker push gcr.io/bazel-untrusted/ubuntu1804:$java
done
|
set -euxo pipefail
for java in java8 nojava; do
docker build --target ubuntu1404-java8 -t gcr.io/bazel-public/ubuntu1404:$java .
docker push gcr.io/bazel-public/ubuntu1404:$java
docker build --target ubuntu1404-java8 -t gcr.io/bazel-untrusted/ubuntu1404:$java .
docker push gcr.io/bazel-untrusted/ubuntu1404:$java
done
for java in java8 java9 nojava; do
docker build --target ubuntu1604-java8 -t gcr.io/bazel-public/ubuntu1604:$java .
docker push gcr.io/bazel-public/ubuntu1604:$java
docker build --target ubuntu1604-java8 -t gcr.io/bazel-untrusted/ubuntu1604:$java .
docker push gcr.io/bazel-untrusted/ubuntu1604:$java
done
for java in java8 java9 java10 java11 nojava; do
docker build --target ubuntu1804-$java -t gcr.io/bazel-public/ubuntu1804:$java .
docker push gcr.io/bazel-public/ubuntu1804:$java
docker build --target ubuntu1804-$java -t gcr.io/bazel-untrusted/ubuntu1804:$java .
docker push gcr.io/bazel-untrusted/ubuntu1804:$java
done
|
Build and push all available Docker images
|
Build and push all available Docker images
|
Shell
|
apache-2.0
|
bazelbuild/continuous-integration,bazelbuild/continuous-integration,bazelbuild/continuous-integration,bazelbuild/continuous-integration,bazelbuild/continuous-integration,bazelbuild/continuous-integration,bazelbuild/continuous-integration,bazelbuild/continuous-integration
|
shell
|
## Code Before:
set -euxo pipefail
docker build --target ubuntu1404-java8 -t gcr.io/bazel-public/ubuntu1404:java8 .
docker push gcr.io/bazel-public/ubuntu1404:java8
docker build --target ubuntu1404-java8 -t gcr.io/bazel-untrusted/ubuntu1404:java8 .
docker push gcr.io/bazel-untrusted/ubuntu1404:java8
docker build --target ubuntu1604-java8 -t gcr.io/bazel-public/ubuntu1604:java8 .
docker push gcr.io/bazel-public/ubuntu1604:java8
docker build --target ubuntu1604-java8 -t gcr.io/bazel-untrusted/ubuntu1604:java8 .
docker push gcr.io/bazel-untrusted/ubuntu1604:java8
for java in java8 java9 java10 java11 nojava; do
docker build --target ubuntu1804-$java -t gcr.io/bazel-public/ubuntu1804:$java .
docker push gcr.io/bazel-public/ubuntu1804:$java
docker build --target ubuntu1804-$java -t gcr.io/bazel-untrusted/ubuntu1804:$java .
docker push gcr.io/bazel-untrusted/ubuntu1804:$java
done
## Instruction:
Build and push all available Docker images
## Code After:
set -euxo pipefail
for java in java8 nojava; do
docker build --target ubuntu1404-java8 -t gcr.io/bazel-public/ubuntu1404:$java .
docker push gcr.io/bazel-public/ubuntu1404:$java
docker build --target ubuntu1404-java8 -t gcr.io/bazel-untrusted/ubuntu1404:$java .
docker push gcr.io/bazel-untrusted/ubuntu1404:$java
done
for java in java8 java9 nojava; do
docker build --target ubuntu1604-java8 -t gcr.io/bazel-public/ubuntu1604:$java .
docker push gcr.io/bazel-public/ubuntu1604:$java
docker build --target ubuntu1604-java8 -t gcr.io/bazel-untrusted/ubuntu1604:$java .
docker push gcr.io/bazel-untrusted/ubuntu1604:$java
done
for java in java8 java9 java10 java11 nojava; do
docker build --target ubuntu1804-$java -t gcr.io/bazel-public/ubuntu1804:$java .
docker push gcr.io/bazel-public/ubuntu1804:$java
docker build --target ubuntu1804-$java -t gcr.io/bazel-untrusted/ubuntu1804:$java .
docker push gcr.io/bazel-untrusted/ubuntu1804:$java
done
|
29f3691906e174ada9adba3935c5ea08715e18dd
|
ci/tasks/license-finder-report.yml
|
ci/tasks/license-finder-report.yml
|
---
platform: linux
image_resource:
type: docker-image
source: {repository: dingotiles/dingo-postgresql-release-pipeline}
inputs:
- name: boshrelease
- name: boshrelease-ci
- name: version
outputs:
- name: license-finder-reports
run:
path: ./boshrelease-ci/ci/tasks/license-finder-report.sh
|
---
platform: linux
image_resource:
type: docker-image
source: {repository: ruby, tag: '2.2-slim' }
inputs:
- name: boshrelease
- name: boshrelease-ci
- name: version
outputs:
- name: license-finder-reports
run:
path: ./boshrelease-ci/ci/tasks/license-finder-report.sh
|
Use ruby image for license-finder task
|
Use ruby image for license-finder task
|
YAML
|
apache-2.0
|
drnic/patroni-boshrelease,cloudfoundry-community/patroni-boshrelease,drnic/patroni-boshrelease,dingotiles/patroni-docker-boshrelease,dingotiles/patroni-docker-boshrelease,drnic/patroni-boshrelease,dingotiles/dingo-postgresql-release,dingotiles/dingo-postgresql-release,cloudfoundry-community/patroni-boshrelease,dingotiles/dingo-postgresql-release,cloudfoundry-community/patroni-boshrelease,dingotiles/patroni-docker-boshrelease
|
yaml
|
## Code Before:
---
platform: linux
image_resource:
type: docker-image
source: {repository: dingotiles/dingo-postgresql-release-pipeline}
inputs:
- name: boshrelease
- name: boshrelease-ci
- name: version
outputs:
- name: license-finder-reports
run:
path: ./boshrelease-ci/ci/tasks/license-finder-report.sh
## Instruction:
Use ruby image for license-finder task
## Code After:
---
platform: linux
image_resource:
type: docker-image
source: {repository: ruby, tag: '2.2-slim' }
inputs:
- name: boshrelease
- name: boshrelease-ci
- name: version
outputs:
- name: license-finder-reports
run:
path: ./boshrelease-ci/ci/tasks/license-finder-report.sh
|
061c9475c23f0302df6018c3406fcaf487be1551
|
android/src/main/AndroidManifest.xml
|
android/src/main/AndroidManifest.xml
|
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.dylanvann.fastimage"
>
<application>
<meta-data
android:name="com.dylanvann.fastimage.OkHttpProgressGlideModule"
android:value="GlideModule"
/>
<meta-data
android:name="com.bumptech.glide.integration.okhttp.OkHttpGlideModule"
tools:node="remove"
android:value="GlideModule"
/>
</application>
</manifest>
|
<manifest package="com.dylanvann.fastimage">
</manifest>
|
Remove redundant meta-data from manifest
|
Remove redundant meta-data from manifest
|
XML
|
mit
|
DylanVann/react-native-fast-image,DylanVann/react-native-fast-image,DylanVann/react-native-fast-image,DylanVann/react-native-fast-image
|
xml
|
## Code Before:
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.dylanvann.fastimage"
>
<application>
<meta-data
android:name="com.dylanvann.fastimage.OkHttpProgressGlideModule"
android:value="GlideModule"
/>
<meta-data
android:name="com.bumptech.glide.integration.okhttp.OkHttpGlideModule"
tools:node="remove"
android:value="GlideModule"
/>
</application>
</manifest>
## Instruction:
Remove redundant meta-data from manifest
## Code After:
<manifest package="com.dylanvann.fastimage">
</manifest>
|
81023541f8a8b8be008dd127c678bc3630fab292
|
playbook-db.yml
|
playbook-db.yml
|
---
- hosts: all
user: vagrant
sudo: true
sudo_user: root
vars:
mongodb_version: 3.0.0
cache_timeout: 259200
tasks:
- name: MongoDB | Fetch 10Gen signing key
shell: apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
- name: MongoDB | Add 10Gen repository
shell: echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
- name: MongoDB | Install
apt: name=mongodb-org={{ mongodb_version }} state=present update_cache=yes
- name: MongoDB | Comment-out the bind_ip
lineinfile: dest=/etc/mongod.conf regexp=^bind_ip line="#bind_ip = 127.0.0.1"
- name: MongoDB | Ensure deamon is running correctly
service: name=mongod enabled=yes state=started
|
---
- hosts: all
user: vagrant
sudo: true
sudo_user: root
vars:
mongodb_version: 3.0.0
cache_timeout: 259200
tasks:
- name: MongoDB | Fetch 10Gen signing key
shell: apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
- name: MongoDB | Add 10Gen repository
shell: echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
- name: MongoDB | Install
apt: name=mongodb-org={{ mongodb_version }} state=present update_cache=yes
- name: MongoDB | Comment-out the bind_ip
lineinfile: dest=/etc/mongod.conf regexp=^bind_ip line="#bind_ip = 127.0.0.1"
- name: MongoDB | Ensure deamon is running correctly
service: name=mongod enabled=yes state=started
|
Create a list file for MongoDB 3.0
|
Create a list file for MongoDB 3.0
|
YAML
|
agpl-3.0
|
SoftInstigate/restheart-ansible,SoftInstigate/restheart-vagrant
|
yaml
|
## Code Before:
---
- hosts: all
user: vagrant
sudo: true
sudo_user: root
vars:
mongodb_version: 3.0.0
cache_timeout: 259200
tasks:
- name: MongoDB | Fetch 10Gen signing key
shell: apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
- name: MongoDB | Add 10Gen repository
shell: echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
- name: MongoDB | Install
apt: name=mongodb-org={{ mongodb_version }} state=present update_cache=yes
- name: MongoDB | Comment-out the bind_ip
lineinfile: dest=/etc/mongod.conf regexp=^bind_ip line="#bind_ip = 127.0.0.1"
- name: MongoDB | Ensure deamon is running correctly
service: name=mongod enabled=yes state=started
## Instruction:
Create a list file for MongoDB 3.0
## Code After:
---
- hosts: all
user: vagrant
sudo: true
sudo_user: root
vars:
mongodb_version: 3.0.0
cache_timeout: 259200
tasks:
- name: MongoDB | Fetch 10Gen signing key
shell: apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
- name: MongoDB | Add 10Gen repository
shell: echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
- name: MongoDB | Install
apt: name=mongodb-org={{ mongodb_version }} state=present update_cache=yes
- name: MongoDB | Comment-out the bind_ip
lineinfile: dest=/etc/mongod.conf regexp=^bind_ip line="#bind_ip = 127.0.0.1"
- name: MongoDB | Ensure deamon is running correctly
service: name=mongod enabled=yes state=started
|
6be9a1da44b18834f4e4ccdddaf5697b11309630
|
src/lib/JsonDBConfig.ts
|
src/lib/JsonDBConfig.ts
|
export interface JsonDBConfig {
filename: string,
saveOnPush: boolean,
humanReadable: boolean,
separator: string
}
export class Config implements JsonDBConfig {
filename: string
humanReadable: boolean
saveOnPush: boolean
separator: string
constructor(filename: string, saveOnPush: boolean = true, humanReadable: boolean = false, separator: string = '/') {
this.filename = filename
if (!filename.endsWith(".json")) {
this.filename += ".json"
}
this.humanReadable = humanReadable
this.saveOnPush = saveOnPush
this.separator = separator
}
}
|
import * as path from "path";
export interface JsonDBConfig {
filename: string,
saveOnPush: boolean,
humanReadable: boolean,
separator: string
}
export class Config implements JsonDBConfig {
filename: string
humanReadable: boolean
saveOnPush: boolean
separator: string
constructor(filename: string, saveOnPush: boolean = true, humanReadable: boolean = false, separator: string = '/') {
this.filename = filename
if (path.extname(filename) === '')
this.filename += '.json'
this.humanReadable = humanReadable
this.saveOnPush = saveOnPush
this.separator = separator
}
}
|
Support non json file extensions
|
feat(filename): Support non json file extensions
|
TypeScript
|
mit
|
Belphemur/node-json-db,Belphemur/node-json-db
|
typescript
|
## Code Before:
export interface JsonDBConfig {
filename: string,
saveOnPush: boolean,
humanReadable: boolean,
separator: string
}
export class Config implements JsonDBConfig {
filename: string
humanReadable: boolean
saveOnPush: boolean
separator: string
constructor(filename: string, saveOnPush: boolean = true, humanReadable: boolean = false, separator: string = '/') {
this.filename = filename
if (!filename.endsWith(".json")) {
this.filename += ".json"
}
this.humanReadable = humanReadable
this.saveOnPush = saveOnPush
this.separator = separator
}
}
## Instruction:
feat(filename): Support non json file extensions
## Code After:
import * as path from "path";
export interface JsonDBConfig {
filename: string,
saveOnPush: boolean,
humanReadable: boolean,
separator: string
}
export class Config implements JsonDBConfig {
filename: string
humanReadable: boolean
saveOnPush: boolean
separator: string
constructor(filename: string, saveOnPush: boolean = true, humanReadable: boolean = false, separator: string = '/') {
this.filename = filename
if (path.extname(filename) === '')
this.filename += '.json'
this.humanReadable = humanReadable
this.saveOnPush = saveOnPush
this.separator = separator
}
}
|
c1e2ca5cbadd696fc3a8ea8e72662f4c293e856c
|
src/Naderman/Composer/AWS/S3RemoteFilesystem.php
|
src/Naderman/Composer/AWS/S3RemoteFilesystem.php
|
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <[email protected]>
* Jordi Boggiano <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Naderman\Composer\AWS;
use Composer\Composer;
use Composer\IO\IOInterface;
use Composer\Util\RemoteFilesystem;
/**
* Composer Plugin for AWS functionality
*
* @author Nils Adermann <[email protected]>
*/
class S3RemoteFilesystem extends RemoteFilesystem
{
protected $awsClient;
/**
* {@inheritDoc}
*/
public function __construct(IOInterface $io, $options, AwsClient $awsClient)
{
parent::__construct($io, $options);
$this->awsClient = $awsClient;
}
/**
* {@inheritDoc}
*/
public function getContents($originUrl, $fileUrl, $progress = true, $options = array())
{
return $this->awsClient->download($fileUrl, $progress);
}
/**
* {@inheritDoc}
*/
public function copy($originUrl, $fileUrl, $fileName, $progress = true, $options = array())
{
$this->awsClient->download($fileUrl, $progress, $fileName);
}
}
|
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <[email protected]>
* Jordi Boggiano <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Naderman\Composer\AWS;
use Composer\Composer;
use Composer\Config;
use Composer\IO\IOInterface;
use Composer\Util\RemoteFilesystem;
/**
* Composer Plugin for AWS functionality
*
* @author Nils Adermann <[email protected]>
*/
class S3RemoteFilesystem extends RemoteFilesystem
{
protected $awsClient;
/**
* {@inheritDoc}
*/
public function __construct(IOInterface $io, Config $config = null, array $options = array(), AwsClient $awsClient)
{
parent::__construct($io, $config, $options);
$this->awsClient = $awsClient;
}
/**
* {@inheritDoc}
*/
public function getContents($originUrl, $fileUrl, $progress = true, $options = array())
{
return $this->awsClient->download($fileUrl, $progress);
}
/**
* {@inheritDoc}
*/
public function copy($originUrl, $fileUrl, $fileName, $progress = true, $options = array())
{
$this->awsClient->download($fileUrl, $progress, $fileName);
}
}
|
Fix modifications of Composer\Util\RemoteFilesystem (constructor)
|
Fix modifications of Composer\Util\RemoteFilesystem (constructor)
|
PHP
|
mit
|
fdewinne/composer-aws,naderman/composer-aws
|
php
|
## Code Before:
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <[email protected]>
* Jordi Boggiano <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Naderman\Composer\AWS;
use Composer\Composer;
use Composer\IO\IOInterface;
use Composer\Util\RemoteFilesystem;
/**
* Composer Plugin for AWS functionality
*
* @author Nils Adermann <[email protected]>
*/
class S3RemoteFilesystem extends RemoteFilesystem
{
protected $awsClient;
/**
* {@inheritDoc}
*/
public function __construct(IOInterface $io, $options, AwsClient $awsClient)
{
parent::__construct($io, $options);
$this->awsClient = $awsClient;
}
/**
* {@inheritDoc}
*/
public function getContents($originUrl, $fileUrl, $progress = true, $options = array())
{
return $this->awsClient->download($fileUrl, $progress);
}
/**
* {@inheritDoc}
*/
public function copy($originUrl, $fileUrl, $fileName, $progress = true, $options = array())
{
$this->awsClient->download($fileUrl, $progress, $fileName);
}
}
## Instruction:
Fix modifications of Composer\Util\RemoteFilesystem (constructor)
## Code After:
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <[email protected]>
* Jordi Boggiano <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Naderman\Composer\AWS;
use Composer\Composer;
use Composer\Config;
use Composer\IO\IOInterface;
use Composer\Util\RemoteFilesystem;
/**
* Composer Plugin for AWS functionality
*
* @author Nils Adermann <[email protected]>
*/
class S3RemoteFilesystem extends RemoteFilesystem
{
protected $awsClient;
/**
* {@inheritDoc}
*/
public function __construct(IOInterface $io, Config $config = null, array $options = array(), AwsClient $awsClient)
{
parent::__construct($io, $config, $options);
$this->awsClient = $awsClient;
}
/**
* {@inheritDoc}
*/
public function getContents($originUrl, $fileUrl, $progress = true, $options = array())
{
return $this->awsClient->download($fileUrl, $progress);
}
/**
* {@inheritDoc}
*/
public function copy($originUrl, $fileUrl, $fileName, $progress = true, $options = array())
{
$this->awsClient->download($fileUrl, $progress, $fileName);
}
}
|
5288c2b2baac6bed2d0e118a660a3de5d5f8b0b0
|
app/views/sub-sidebar.html
|
app/views/sub-sidebar.html
|
<div class="col-md-3 col-md-offset-1 user-side fixed-pos" style="width: 21%;">
<div class="card side-cards" id="fixed-side">
<div class="card-action pad-card" ng-click="setTab(2)">Overview</div>
<div class="card-action pad-card" ng-if="sub.submissions.length > 0" ng-click="setTab(1)">Submissions <span class="badge">{{ sub.submissions.length }}</span></div>
<div class="card-action pad-card" ng-if="sub.comments.length > 0" ng-click="setTab(0)">Comments <span class="badge">{{ sub.comments.length }}</span></div>
<a href="#/{{ username }}"><div class="card-action pad-card white-bg"><i class="fa fa-arrow-left" aria-hidden="true"></i> {{ username }}</div></a>
<a href="#/{{ username }}/search/"><div class="card-action pad-card white-bg"><i class="fa fa-search" aria-hidden="true"></i> Search</div></a>
<div class="card-action pad-card white-bg">
<span class="gray small-font">Note: The data shown here is based on the user's most recent 1000 comments and submissions each, starting from <span ng-bind="firstPost.created_utc * 1000 | amDateFormat: 'MMM D, YYYY.'"></span>
</div>
</div>
</div>
|
<div class="col-md-3 col-md-offset-1 user-side fixed-pos" style="width: 21%;">
<div class="card side-cards" id="fixed-side">
<div class="card-action pad-card" ng-click="setTab(2)">Overview</div>
<div class="card-action pad-card" ng-if="sub.submissions.length > 0" ng-click="setTab(1)">Submissions <span class="badge">{{ sub.submissions.length }}</span></div>
<div class="card-action pad-card" ng-if="sub.comments.length > 0" ng-click="setTab(0)">Comments <span class="badge">{{ sub.comments.length }}</span></div>
<a href="#/{{ username }}/search/"><div class="card-action pad-card"><i class="fa fa-search" aria-hidden="true"></i> Search</div></a>
<a href="#/{{ username }}"><div class="card-action pad-card white-bg"><i class="fa fa-arrow-left" aria-hidden="true"></i> {{ username }}</div></a>
<div class="card-action pad-card white-bg">
<span class="gray small-font">Note: The data shown here is based on the user's most recent 1000 comments and submissions each, starting from <span ng-bind="firstPost.created_utc * 1000 | amDateFormat: 'MMM D, YYYY.'"></span>
</div>
</div>
</div>
|
Change background color to gray for search tab in sub sidebar
|
Style: Change background color to gray for search tab in sub sidebar
|
HTML
|
mit
|
sharibarboza/SubSnoop,sharibarboza/SubSnoop
|
html
|
## Code Before:
<div class="col-md-3 col-md-offset-1 user-side fixed-pos" style="width: 21%;">
<div class="card side-cards" id="fixed-side">
<div class="card-action pad-card" ng-click="setTab(2)">Overview</div>
<div class="card-action pad-card" ng-if="sub.submissions.length > 0" ng-click="setTab(1)">Submissions <span class="badge">{{ sub.submissions.length }}</span></div>
<div class="card-action pad-card" ng-if="sub.comments.length > 0" ng-click="setTab(0)">Comments <span class="badge">{{ sub.comments.length }}</span></div>
<a href="#/{{ username }}"><div class="card-action pad-card white-bg"><i class="fa fa-arrow-left" aria-hidden="true"></i> {{ username }}</div></a>
<a href="#/{{ username }}/search/"><div class="card-action pad-card white-bg"><i class="fa fa-search" aria-hidden="true"></i> Search</div></a>
<div class="card-action pad-card white-bg">
<span class="gray small-font">Note: The data shown here is based on the user's most recent 1000 comments and submissions each, starting from <span ng-bind="firstPost.created_utc * 1000 | amDateFormat: 'MMM D, YYYY.'"></span>
</div>
</div>
</div>
## Instruction:
Style: Change background color to gray for search tab in sub sidebar
## Code After:
<div class="col-md-3 col-md-offset-1 user-side fixed-pos" style="width: 21%;">
<div class="card side-cards" id="fixed-side">
<div class="card-action pad-card" ng-click="setTab(2)">Overview</div>
<div class="card-action pad-card" ng-if="sub.submissions.length > 0" ng-click="setTab(1)">Submissions <span class="badge">{{ sub.submissions.length }}</span></div>
<div class="card-action pad-card" ng-if="sub.comments.length > 0" ng-click="setTab(0)">Comments <span class="badge">{{ sub.comments.length }}</span></div>
<a href="#/{{ username }}/search/"><div class="card-action pad-card"><i class="fa fa-search" aria-hidden="true"></i> Search</div></a>
<a href="#/{{ username }}"><div class="card-action pad-card white-bg"><i class="fa fa-arrow-left" aria-hidden="true"></i> {{ username }}</div></a>
<div class="card-action pad-card white-bg">
<span class="gray small-font">Note: The data shown here is based on the user's most recent 1000 comments and submissions each, starting from <span ng-bind="firstPost.created_utc * 1000 | amDateFormat: 'MMM D, YYYY.'"></span>
</div>
</div>
</div>
|
708b3c14098537ee302c5a0bc1a1ece9abe4ce8f
|
src/components/RenderCanvas/GenericCanvasElement/index.css
|
src/components/RenderCanvas/GenericCanvasElement/index.css
|
.selected-canvas-element {
/* TODO: Add a proper selected canvas element effect. */
}
|
.selected-canvas-element {
box-shadow: 0 0 16px black;
background: rgba(255, 255, 255, 0.5);
}
|
Revert "Revert "Revert "Remove selected canvas element effect CSS."""
|
Revert "Revert "Revert "Remove selected canvas element effect CSS."""
This reverts commit c9d61e43ed70043b176875408b8dad9141e37602.
|
CSS
|
mit
|
crrio/maplestory.design,crrio/maplestory.design
|
css
|
## Code Before:
.selected-canvas-element {
/* TODO: Add a proper selected canvas element effect. */
}
## Instruction:
Revert "Revert "Revert "Remove selected canvas element effect CSS."""
This reverts commit c9d61e43ed70043b176875408b8dad9141e37602.
## Code After:
.selected-canvas-element {
box-shadow: 0 0 16px black;
background: rgba(255, 255, 255, 0.5);
}
|
ea512cb0f3cb159707eb29fdbf2e31bbb1c1b902
|
.travis.yml
|
.travis.yml
|
language: rust
sudo: false
cache: cargo
os:
- linux
- osx
rust:
- stable
- nightly
env:
- CLIPPY="true"
- CLIPPY=""
install:
- if [ -n "$CLIPPY" ]; then cargo install -f clippy; fi
matrix:
fast_finish: true
exclude:
- rust: stable
env: CLIPPY="true"
- rust: nightly
env: CLIPPY=""
allow_failures:
- rust: nightly
script:
- if [ -n "$CLIPPY" ]; then cargo clippy --all-features --all-targets; fi
- if [ -z "$CLIPPY" ]; then cargo test; fi
|
language: rust
sudo: false
cache: cargo
os:
- linux
- osx
rust:
- stable
- nightly
env:
- CLIPPY="true"
- CLIPPY=""
install:
- if [ -n "$CLIPPY" ]; then rustup component add clippy-preview; fi
matrix:
fast_finish: true
exclude:
- rust: stable
env: CLIPPY="true"
- rust: nightly
env: CLIPPY=""
allow_failures:
- rust: nightly
script:
- if [ -n "$CLIPPY" ]; then cargo clippy --all-features --all-targets; fi
- if [ -z "$CLIPPY" ]; then cargo test; fi
|
Switch to rustup clippy component
|
Switch to rustup clippy component
|
YAML
|
apache-2.0
|
jwilm/alacritty,alacritty/alacritty,jwilm/alacritty,jwilm/alacritty,jwilm/alacritty,alacritty/alacritty
|
yaml
|
## Code Before:
language: rust
sudo: false
cache: cargo
os:
- linux
- osx
rust:
- stable
- nightly
env:
- CLIPPY="true"
- CLIPPY=""
install:
- if [ -n "$CLIPPY" ]; then cargo install -f clippy; fi
matrix:
fast_finish: true
exclude:
- rust: stable
env: CLIPPY="true"
- rust: nightly
env: CLIPPY=""
allow_failures:
- rust: nightly
script:
- if [ -n "$CLIPPY" ]; then cargo clippy --all-features --all-targets; fi
- if [ -z "$CLIPPY" ]; then cargo test; fi
## Instruction:
Switch to rustup clippy component
## Code After:
language: rust
sudo: false
cache: cargo
os:
- linux
- osx
rust:
- stable
- nightly
env:
- CLIPPY="true"
- CLIPPY=""
install:
- if [ -n "$CLIPPY" ]; then rustup component add clippy-preview; fi
matrix:
fast_finish: true
exclude:
- rust: stable
env: CLIPPY="true"
- rust: nightly
env: CLIPPY=""
allow_failures:
- rust: nightly
script:
- if [ -n "$CLIPPY" ]; then cargo clippy --all-features --all-targets; fi
- if [ -z "$CLIPPY" ]; then cargo test; fi
|
5523946b35d076c47be92d703cdb071c18f6d0ec
|
tests/test_subgenerators.py
|
tests/test_subgenerators.py
|
import pytest
from resumeback import send_self
from . import CustomError, defer, wait_until_finished, State
def test_subgenerator_next():
ts = State()
def subgenerator(this):
yield defer(this.next)
ts.run = True
@send_self
def func(this):
yield from subgenerator(this)
wrapper = func()
wait_until_finished(wrapper)
assert ts.run
def test_subgenerator_send():
ts = State()
val = 123
def subgenerator(this):
assert (yield defer(this.send, val)) == val
ts.run = True
@send_self
def func(this):
yield from subgenerator(this)
wrapper = func()
wait_until_finished(wrapper)
assert ts.run
def test_subgenerator_throw():
ts = State()
def subgenerator(this):
with pytest.raises(CustomError):
yield defer(this.throw, CustomError)
ts.run = True
@send_self
def func(this):
yield from subgenerator(this)
wrapper = func()
wait_until_finished(wrapper)
assert ts.run
|
import pytest
from resumeback import send_self
from . import CustomError, defer, wait_until_finished, State
def test_subgenerator_next():
ts = State()
def subgenerator(this):
yield defer(this.next)
ts.run = True
@send_self
def func(this):
yield from subgenerator(this)
wrapper = func()
wait_until_finished(wrapper)
assert ts.run
def test_subgenerator_send():
ts = State()
val = 123
def subgenerator(this):
assert (yield defer(this.send, val)) == val
ts.run = True
@send_self
def func(this):
yield from subgenerator(this)
wrapper = func()
wait_until_finished(wrapper)
assert ts.run
def test_subgenerator_throw():
ts = State()
def subgenerator(this):
with pytest.raises(CustomError):
yield defer(this.throw, CustomError)
ts.run = True
@send_self
def func(this):
yield from subgenerator(this)
wrapper = func()
wait_until_finished(wrapper)
assert ts.run
def test_subgenerator_repurpose():
ts = State()
val = 1234
@send_self
def func2(this):
assert (yield defer(this.send, val)) == val
ts.run = True
@send_self
def func(this):
yield from func2.func(this)
wrapper = func()
wait_until_finished(wrapper)
assert ts.run
|
Add test for decorated subgenerator
|
Add test for decorated subgenerator
|
Python
|
mit
|
FichteFoll/resumeback
|
python
|
## Code Before:
import pytest
from resumeback import send_self
from . import CustomError, defer, wait_until_finished, State
def test_subgenerator_next():
ts = State()
def subgenerator(this):
yield defer(this.next)
ts.run = True
@send_self
def func(this):
yield from subgenerator(this)
wrapper = func()
wait_until_finished(wrapper)
assert ts.run
def test_subgenerator_send():
ts = State()
val = 123
def subgenerator(this):
assert (yield defer(this.send, val)) == val
ts.run = True
@send_self
def func(this):
yield from subgenerator(this)
wrapper = func()
wait_until_finished(wrapper)
assert ts.run
def test_subgenerator_throw():
ts = State()
def subgenerator(this):
with pytest.raises(CustomError):
yield defer(this.throw, CustomError)
ts.run = True
@send_self
def func(this):
yield from subgenerator(this)
wrapper = func()
wait_until_finished(wrapper)
assert ts.run
## Instruction:
Add test for decorated subgenerator
## Code After:
import pytest
from resumeback import send_self
from . import CustomError, defer, wait_until_finished, State
def test_subgenerator_next():
ts = State()
def subgenerator(this):
yield defer(this.next)
ts.run = True
@send_self
def func(this):
yield from subgenerator(this)
wrapper = func()
wait_until_finished(wrapper)
assert ts.run
def test_subgenerator_send():
ts = State()
val = 123
def subgenerator(this):
assert (yield defer(this.send, val)) == val
ts.run = True
@send_self
def func(this):
yield from subgenerator(this)
wrapper = func()
wait_until_finished(wrapper)
assert ts.run
def test_subgenerator_throw():
ts = State()
def subgenerator(this):
with pytest.raises(CustomError):
yield defer(this.throw, CustomError)
ts.run = True
@send_self
def func(this):
yield from subgenerator(this)
wrapper = func()
wait_until_finished(wrapper)
assert ts.run
def test_subgenerator_repurpose():
ts = State()
val = 1234
@send_self
def func2(this):
assert (yield defer(this.send, val)) == val
ts.run = True
@send_self
def func(this):
yield from func2.func(this)
wrapper = func()
wait_until_finished(wrapper)
assert ts.run
|
d2700b0d5067dbc003cd9b872a577456c011c936
|
src/App.js
|
src/App.js
|
import { Flux } from 'flumpt';
import React from 'react';
import Root from './components/Root';
import { EVENTS } from './consts';
import ModelContainer from './containers/ModelContainer';
export default class App extends Flux {
constructor({ renderer }) {
super({
renderer,
initialState: App._createInitialState(),
});
}
static _createInitialState() {
const modelContainer = ModelContainer.getInstance();
const state = {
squares: modelContainer.squares,
};
return state;
}
subscribe() {
this.on(EVENTS.TOUCH_SQUARE, (data) => {
console.log(data);
})
}
render(state) {
return React.createElement(Root, state);
}
}
|
import { Flux } from 'flumpt';
import React from 'react';
import Root from './components/Root';
import { EVENTS } from './consts';
import ModelContainer from './containers/ModelContainer';
export default class App extends Flux {
constructor({ renderer }) {
super({
renderer,
initialState: App._createInitialState(),
});
}
static _createInitialState() {
const modelContainer = ModelContainer.getInstance();
const state = {
squares: modelContainer.squares,
};
return state;
}
/*
* Attach logging to events triggered by "dispatch"
*/
_onDispatch(eventName, handler) {
this.on(eventName, (...args) => {
console.log('dispatch:', eventName, ...args);
handler(...args);
});
}
subscribe() {
this._onDispatch(EVENTS.TOUCH_SQUARE, ({ rowIndex, columnIndex }) => {
})
}
render(state) {
return React.createElement(Root, state);
}
}
|
Attach logging to events triggered by "dispatch" now
|
Attach logging to events triggered by "dispatch" now
|
JavaScript
|
apache-2.0
|
kjirou/battle-reversi,kjirou/reversi-tactics,kjirou/reversi-tactics,kjirou/battle-reversi
|
javascript
|
## Code Before:
import { Flux } from 'flumpt';
import React from 'react';
import Root from './components/Root';
import { EVENTS } from './consts';
import ModelContainer from './containers/ModelContainer';
export default class App extends Flux {
constructor({ renderer }) {
super({
renderer,
initialState: App._createInitialState(),
});
}
static _createInitialState() {
const modelContainer = ModelContainer.getInstance();
const state = {
squares: modelContainer.squares,
};
return state;
}
subscribe() {
this.on(EVENTS.TOUCH_SQUARE, (data) => {
console.log(data);
})
}
render(state) {
return React.createElement(Root, state);
}
}
## Instruction:
Attach logging to events triggered by "dispatch" now
## Code After:
import { Flux } from 'flumpt';
import React from 'react';
import Root from './components/Root';
import { EVENTS } from './consts';
import ModelContainer from './containers/ModelContainer';
export default class App extends Flux {
constructor({ renderer }) {
super({
renderer,
initialState: App._createInitialState(),
});
}
static _createInitialState() {
const modelContainer = ModelContainer.getInstance();
const state = {
squares: modelContainer.squares,
};
return state;
}
/*
* Attach logging to events triggered by "dispatch"
*/
_onDispatch(eventName, handler) {
this.on(eventName, (...args) => {
console.log('dispatch:', eventName, ...args);
handler(...args);
});
}
subscribe() {
this._onDispatch(EVENTS.TOUCH_SQUARE, ({ rowIndex, columnIndex }) => {
})
}
render(state) {
return React.createElement(Root, state);
}
}
|
9b21238e9e44d00db3a527abaf1e5d194429a54b
|
.github/PULL_REQUEST_TEMPLATE.md
|
.github/PULL_REQUEST_TEMPLATE.md
|
- [ ] Add test that verifies the modified behavior
- [ ] Add documentation if it changes public API
## Changelog
Please summarize the changes in a way that makes sense inside the changelog. Feel free to add migration tips or examples if necessary.
|
- [ ] Add test that verifies the modified behavior
- [ ] Add documentation if it changes public API
## Expectations on changes
1. Please don't do code changes and move code around in the same PR, even if you are making code better. Make sure the reviewer can see just the changes which fix the problem. This can make your PR reviewable much more accessible in complex situations; otherwise, it might never get merged even if it is correct because it's impossible to review without reimplementing every change.
2. Often, submitting a failing test is more critical than the fix. Fixing the problem can be challenging and has many ways. Offering an excellent failing test is often 80% of the solution.
3. Please review your PR before submitting it as if you are the reviewer. This way, you show respect for the maintainer's time.
## Changelog
Please summarize the changes in a way that makes sense inside the changelog. Feel free to add migration tips or examples if necessary.
|
Add Expectations on changes section
|
Add Expectations on changes section
|
Markdown
|
mit
|
cssinjs/jss,cssinjs/jss,jsstyles/jss,jsstyles/jss
|
markdown
|
## Code Before:
- [ ] Add test that verifies the modified behavior
- [ ] Add documentation if it changes public API
## Changelog
Please summarize the changes in a way that makes sense inside the changelog. Feel free to add migration tips or examples if necessary.
## Instruction:
Add Expectations on changes section
## Code After:
- [ ] Add test that verifies the modified behavior
- [ ] Add documentation if it changes public API
## Expectations on changes
1. Please don't do code changes and move code around in the same PR, even if you are making code better. Make sure the reviewer can see just the changes which fix the problem. This can make your PR reviewable much more accessible in complex situations; otherwise, it might never get merged even if it is correct because it's impossible to review without reimplementing every change.
2. Often, submitting a failing test is more critical than the fix. Fixing the problem can be challenging and has many ways. Offering an excellent failing test is often 80% of the solution.
3. Please review your PR before submitting it as if you are the reviewer. This way, you show respect for the maintainer's time.
## Changelog
Please summarize the changes in a way that makes sense inside the changelog. Feel free to add migration tips or examples if necessary.
|
edc219356f585b570a49d8c3acdf6aef0416e7d1
|
templates/disclaimer.html
|
templates/disclaimer.html
|
<footer>
<p>
Dette er en uavhengig nettside og er verken tilknyttet NTNU eller linjeforeningen for Fysikk og Matematikk (Nabla). Kildekoden til denne nettsiden og kontakt kan fås <a href='https://github.com/JakobGM/django-kokekunster'>her</a>.
</p>
</footer>
|
<footer>
<p>
Dette er en uavhengig nettside og er verken tilknyttet NTNU eller noen av dets linjeforeninger. Kildekoden til denne nettsiden er tilgjengelig <a href='https://github.com/JakobGM/WikiLinks'>her</a> og kontakt kan fås på e-post til kokekunster (krøllalfa) gmail (dått) no.
</p>
</footer>
|
Update footer text for new branding
|
Update footer text for new branding
Fixes #82.
|
HTML
|
mit
|
afriestad/WikiLinks,afriestad/WikiLinks,afriestad/WikiLinks
|
html
|
## Code Before:
<footer>
<p>
Dette er en uavhengig nettside og er verken tilknyttet NTNU eller linjeforeningen for Fysikk og Matematikk (Nabla). Kildekoden til denne nettsiden og kontakt kan fås <a href='https://github.com/JakobGM/django-kokekunster'>her</a>.
</p>
</footer>
## Instruction:
Update footer text for new branding
Fixes #82.
## Code After:
<footer>
<p>
Dette er en uavhengig nettside og er verken tilknyttet NTNU eller noen av dets linjeforeninger. Kildekoden til denne nettsiden er tilgjengelig <a href='https://github.com/JakobGM/WikiLinks'>her</a> og kontakt kan fås på e-post til kokekunster (krøllalfa) gmail (dått) no.
</p>
</footer>
|
5ad19991a852b6ad8612dca30a7214b44054d990
|
README.md
|
README.md
|
A Titanium module for registering a device with Google Cloud Messaging and handling push notifications sent to the device.
[](http://gitt.io/component/nl.vanvianen.android.gcm)
Read the [documentation](https://github.com/morinel/gcmpush/blob/master/documentation/index.md).
To build, create a `build.properties` file with the following content:
```
titanium.platform=/Users/###USER###/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android
android.platform=/Users/###USER###/Library/Android/sdk/platforms/android-23
google.apis=/Users/###USER###/Library/Android/sdk/add-ons/addon-google_apis-google-23
android.ndk=/Users/###USER###/Library/Android/ndk
```
Make sure your paths are correct for your system setup. Then run:
```
$ ant clean
$ ant
```
A zip file will be created in the `dist` folder.
|
A Titanium module for registering a device with Google Cloud Messaging and handling push notifications sent to the device.
[](http://gitt.io/component/nl.vanvianen.android.gcm)
Read the [documentation](https://github.com/morinel/gcmpush/blob/master/documentation/index.md).
To build, create a `build.properties` file with the following content:
```
titanium.platform=/Users/###USER###/Library/Application Support/Titanium/mobilesdk/osx/7.0.0.GA/android
android.platform=/Users/###USER###/Library/Android/sdk/platforms/android-26
google.apis=/Users/###USER###/Library/Android/sdk/add-ons/addon-google_apis-google-23
android.ndk=/Users/###USER###/Library/Android/ndk
```
Make sure your paths are correct for your system setup. Then run:
```
$ appc run -p android --build-only
```
A zip file will be created in the `dist` folder.
|
Update build instructions for Ti SDK 7.0.0
|
Update build instructions for Ti SDK 7.0.0
|
Markdown
|
apache-2.0
|
morinel/gcmpush,morinel/gcmpush,cr0ybot/gcmpush,morinel/gcmpush,cr0ybot/gcmpush,cr0ybot/gcmpush
|
markdown
|
## Code Before:
A Titanium module for registering a device with Google Cloud Messaging and handling push notifications sent to the device.
[](http://gitt.io/component/nl.vanvianen.android.gcm)
Read the [documentation](https://github.com/morinel/gcmpush/blob/master/documentation/index.md).
To build, create a `build.properties` file with the following content:
```
titanium.platform=/Users/###USER###/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android
android.platform=/Users/###USER###/Library/Android/sdk/platforms/android-23
google.apis=/Users/###USER###/Library/Android/sdk/add-ons/addon-google_apis-google-23
android.ndk=/Users/###USER###/Library/Android/ndk
```
Make sure your paths are correct for your system setup. Then run:
```
$ ant clean
$ ant
```
A zip file will be created in the `dist` folder.
## Instruction:
Update build instructions for Ti SDK 7.0.0
## Code After:
A Titanium module for registering a device with Google Cloud Messaging and handling push notifications sent to the device.
[](http://gitt.io/component/nl.vanvianen.android.gcm)
Read the [documentation](https://github.com/morinel/gcmpush/blob/master/documentation/index.md).
To build, create a `build.properties` file with the following content:
```
titanium.platform=/Users/###USER###/Library/Application Support/Titanium/mobilesdk/osx/7.0.0.GA/android
android.platform=/Users/###USER###/Library/Android/sdk/platforms/android-26
google.apis=/Users/###USER###/Library/Android/sdk/add-ons/addon-google_apis-google-23
android.ndk=/Users/###USER###/Library/Android/ndk
```
Make sure your paths are correct for your system setup. Then run:
```
$ appc run -p android --build-only
```
A zip file will be created in the `dist` folder.
|
c75c0f0d6156429fae8bc864eb8270c017c432b4
|
playbooks/tasks/os/Ubuntu.yml
|
playbooks/tasks/os/Ubuntu.yml
|
---
# tasks on Ubuntu
- set_fact:
apt_repositories:
- bionic main restricted
- bionic-updates main restricted
- bionic universe
- bionic-updates universe
- bionic multiverse
- bionic-updates multiverse
- bionic-backports main restricted universe multiverse
- name: Remove archive.ubuntu.com
apt_repository:
repo: "deb http://archive.ubuntu.com/ubuntu/ {{ item }}"
state: absent
with_items: "{{ apt_repositories }}"
become: yes
- name: Add ftp.jaist.ac.jp
apt_repository:
repo: "deb http://ftp.jaist.ac.jp/pub/Linux/ubuntu/ {{ item }}"
state: present
with_items: "{{ apt_repositories }}"
become: yes
|
---
# tasks on Ubuntu
- set_fact:
apt_repositories:
- bionic main restricted
- bionic-updates main restricted
- bionic universe
- bionic-updates universe
- bionic multiverse
- bionic-updates multiverse
- bionic-backports main restricted universe multiverse
- block:
- name: Install tzdata
apt:
name: tzdata
update_cache: yes
cache_valid_time: 3600
install_recommends: no
- name: set timezone to Asia/Tokyo
timezone:
name: Asia/Tokyo
become: yes
- name: Remove archive.ubuntu.com
apt_repository:
repo: "deb http://archive.ubuntu.com/ubuntu/ {{ item }}"
state: absent
with_items: "{{ apt_repositories }}"
become: yes
- name: Add ftp.jaist.ac.jp
apt_repository:
repo: "deb http://ftp.jaist.ac.jp/pub/Linux/ubuntu/ {{ item }}"
state: present
with_items: "{{ apt_repositories }}"
become: yes
|
Set timezone to Asia/Tokyo. This image is usually used in Japan.
|
Set timezone to Asia/Tokyo. This image is usually used in Japan.
|
YAML
|
mit
|
FGtatsuro/infra-bridgehead,FGtatsuro/infra-bridgehead
|
yaml
|
## Code Before:
---
# tasks on Ubuntu
- set_fact:
apt_repositories:
- bionic main restricted
- bionic-updates main restricted
- bionic universe
- bionic-updates universe
- bionic multiverse
- bionic-updates multiverse
- bionic-backports main restricted universe multiverse
- name: Remove archive.ubuntu.com
apt_repository:
repo: "deb http://archive.ubuntu.com/ubuntu/ {{ item }}"
state: absent
with_items: "{{ apt_repositories }}"
become: yes
- name: Add ftp.jaist.ac.jp
apt_repository:
repo: "deb http://ftp.jaist.ac.jp/pub/Linux/ubuntu/ {{ item }}"
state: present
with_items: "{{ apt_repositories }}"
become: yes
## Instruction:
Set timezone to Asia/Tokyo. This image is usually used in Japan.
## Code After:
---
# tasks on Ubuntu
- set_fact:
apt_repositories:
- bionic main restricted
- bionic-updates main restricted
- bionic universe
- bionic-updates universe
- bionic multiverse
- bionic-updates multiverse
- bionic-backports main restricted universe multiverse
- block:
- name: Install tzdata
apt:
name: tzdata
update_cache: yes
cache_valid_time: 3600
install_recommends: no
- name: set timezone to Asia/Tokyo
timezone:
name: Asia/Tokyo
become: yes
- name: Remove archive.ubuntu.com
apt_repository:
repo: "deb http://archive.ubuntu.com/ubuntu/ {{ item }}"
state: absent
with_items: "{{ apt_repositories }}"
become: yes
- name: Add ftp.jaist.ac.jp
apt_repository:
repo: "deb http://ftp.jaist.ac.jp/pub/Linux/ubuntu/ {{ item }}"
state: present
with_items: "{{ apt_repositories }}"
become: yes
|
ffda8678b763edacc5b5b1513b72760558af738d
|
src/ui/components/PlayingBar/PlayingBar.css
|
src/ui/components/PlayingBar/PlayingBar.css
|
.playing-bar {
-webkit-app-region: no-drag;
display: flex;
align-items: center;
justify-content: space-between;
text-align: center;
}
.playing-bar__cover {
width: 60px;
flex: 0 0 auto;
}
.playing-bar__queue {
-webkit-app-region: no-drag;
width: 60px;
flex: 0 0 auto;
position: relative;
}
.queue-toggle {
color: inherit;
border: 0;
background: transparent;
font-size: 14px;
box-shadow: none;
}
.queue-container {
display: none;
position: absolute;
z-index: 1000;
text-align: left;
right: 0;
top: 26px;
&.is-open {
display: block;
}
}
|
.playing-bar {
display: flex;
align-items: center;
justify-content: space-between;
text-align: center;
}
.playing-bar__cover {
width: 60px;
flex: 0 0 auto;
}
.playing-bar__queue {
-webkit-app-region: no-drag;
width: 60px;
flex: 0 0 auto;
position: relative;
}
.queue-toggle {
color: inherit;
border: 0;
background: transparent;
font-size: 14px;
box-shadow: none;
}
.queue-container {
display: none;
position: absolute;
z-index: 1000;
text-align: left;
right: 0;
top: 26px;
&.is-open {
display: block;
}
}
|
Fix some regions of the header not being draggable
|
Fix some regions of the header not being draggable
|
CSS
|
mit
|
KeitIG/museeks,KeitIG/museeks,KeitIG/museeks
|
css
|
## Code Before:
.playing-bar {
-webkit-app-region: no-drag;
display: flex;
align-items: center;
justify-content: space-between;
text-align: center;
}
.playing-bar__cover {
width: 60px;
flex: 0 0 auto;
}
.playing-bar__queue {
-webkit-app-region: no-drag;
width: 60px;
flex: 0 0 auto;
position: relative;
}
.queue-toggle {
color: inherit;
border: 0;
background: transparent;
font-size: 14px;
box-shadow: none;
}
.queue-container {
display: none;
position: absolute;
z-index: 1000;
text-align: left;
right: 0;
top: 26px;
&.is-open {
display: block;
}
}
## Instruction:
Fix some regions of the header not being draggable
## Code After:
.playing-bar {
display: flex;
align-items: center;
justify-content: space-between;
text-align: center;
}
.playing-bar__cover {
width: 60px;
flex: 0 0 auto;
}
.playing-bar__queue {
-webkit-app-region: no-drag;
width: 60px;
flex: 0 0 auto;
position: relative;
}
.queue-toggle {
color: inherit;
border: 0;
background: transparent;
font-size: 14px;
box-shadow: none;
}
.queue-container {
display: none;
position: absolute;
z-index: 1000;
text-align: left;
right: 0;
top: 26px;
&.is-open {
display: block;
}
}
|
2a34ffded878c9cb5cb257c0202448db54399147
|
centreon/features/CustomViews.feature
|
centreon/features/CustomViews.feature
|
Feature: Custom views
As a Centreon user
I want to share my custom views
So that other users can benefit from it
Background:
Given I am logged in a Centreon server with some widgets
Scenario: Create public share
Given a user sharing publicly a custom view
When another user wishes to add a new custom view
Then he can add the shared view
And cannot modify the content of the shared view
Scenario: Remove public share
Given a user sharing publicly a custom view
And another user is using this shared view
When this other user is not using the shared view anymore
Then the view is not visible anymore
And the user can use it again
|
Feature: Custom views
As a Centreon user
I want to share my custom views
So that other users can benefit from it
Background:
Given I am logged in a Centreon server with some widgets
Scenario: Create public share
Given a user sharing publicly a custom view
When another user wishes to add a new custom view
Then he can add the shared view
And he cannot modify the content of the shared view
Scenario: Remove public share
Given a user sharing publicly a custom view
And another user is using this shared view
When this other user removes the shared view
Then the view is not visible anymore
And the user can use it again
|
Update custom views test feature file.
|
Update custom views test feature file.
|
Cucumber
|
apache-2.0
|
centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon
|
cucumber
|
## Code Before:
Feature: Custom views
As a Centreon user
I want to share my custom views
So that other users can benefit from it
Background:
Given I am logged in a Centreon server with some widgets
Scenario: Create public share
Given a user sharing publicly a custom view
When another user wishes to add a new custom view
Then he can add the shared view
And cannot modify the content of the shared view
Scenario: Remove public share
Given a user sharing publicly a custom view
And another user is using this shared view
When this other user is not using the shared view anymore
Then the view is not visible anymore
And the user can use it again
## Instruction:
Update custom views test feature file.
## Code After:
Feature: Custom views
As a Centreon user
I want to share my custom views
So that other users can benefit from it
Background:
Given I am logged in a Centreon server with some widgets
Scenario: Create public share
Given a user sharing publicly a custom view
When another user wishes to add a new custom view
Then he can add the shared view
And he cannot modify the content of the shared view
Scenario: Remove public share
Given a user sharing publicly a custom view
And another user is using this shared view
When this other user removes the shared view
Then the view is not visible anymore
And the user can use it again
|
89522b8983cc12f7e033eb7f3a4f7bbc10b9d92b
|
src/main/java/org/purescript/psi/declaration/PSFixityDeclaration.kt
|
src/main/java/org/purescript/psi/declaration/PSFixityDeclaration.kt
|
package org.purescript.psi.declaration
import com.intellij.lang.ASTNode
import com.intellij.psi.PsiElement
import com.intellij.psi.PsiNameIdentifierOwner
import org.purescript.psi.PSPsiElement
import org.purescript.psi.name.PSOperatorName
class PSFixityDeclaration(node: ASTNode) : PSPsiElement(node), PsiNameIdentifierOwner {
private val operatorName get() =
findNotNullChildByClass(PSOperatorName::class.java)
override fun setName(name: String): PsiElement? {
return null
}
override fun getNameIdentifier(): PsiElement {
return operatorName;
}
override fun getName(): String {
return operatorName.name
}
}
|
package org.purescript.psi.declaration
import com.intellij.lang.ASTNode
import com.intellij.psi.PsiElement
import com.intellij.psi.PsiNameIdentifierOwner
import org.purescript.psi.PSPsiElement
import org.purescript.psi.name.PSOperatorName
class PSFixityDeclaration(node: ASTNode) : PSPsiElement(node), PsiNameIdentifierOwner {
private val operatorName get() =
findNotNullChildByClass(PSOperatorName::class.java)
override fun setName(name: String): PsiElement? {
return null
}
override fun getTextOffset(): Int = nameIdentifier.textOffset
override fun getNameIdentifier(): PsiElement {
return operatorName;
}
override fun getName(): String {
return operatorName.name
}
}
|
Fix navigation location for fixity declaration
|
Fix navigation location for fixity declaration
|
Kotlin
|
bsd-3-clause
|
intellij-purescript/intellij-purescript,intellij-purescript/intellij-purescript
|
kotlin
|
## Code Before:
package org.purescript.psi.declaration
import com.intellij.lang.ASTNode
import com.intellij.psi.PsiElement
import com.intellij.psi.PsiNameIdentifierOwner
import org.purescript.psi.PSPsiElement
import org.purescript.psi.name.PSOperatorName
class PSFixityDeclaration(node: ASTNode) : PSPsiElement(node), PsiNameIdentifierOwner {
private val operatorName get() =
findNotNullChildByClass(PSOperatorName::class.java)
override fun setName(name: String): PsiElement? {
return null
}
override fun getNameIdentifier(): PsiElement {
return operatorName;
}
override fun getName(): String {
return operatorName.name
}
}
## Instruction:
Fix navigation location for fixity declaration
## Code After:
package org.purescript.psi.declaration
import com.intellij.lang.ASTNode
import com.intellij.psi.PsiElement
import com.intellij.psi.PsiNameIdentifierOwner
import org.purescript.psi.PSPsiElement
import org.purescript.psi.name.PSOperatorName
class PSFixityDeclaration(node: ASTNode) : PSPsiElement(node), PsiNameIdentifierOwner {
private val operatorName get() =
findNotNullChildByClass(PSOperatorName::class.java)
override fun setName(name: String): PsiElement? {
return null
}
override fun getTextOffset(): Int = nameIdentifier.textOffset
override fun getNameIdentifier(): PsiElement {
return operatorName;
}
override fun getName(): String {
return operatorName.name
}
}
|
18b143d7f27683b1b28f053ed93ff57248518eb0
|
src/test/resources/rqg_config.json
|
src/test/resources/rqg_config.json
|
{"node_info":[{"isMasterNode":"true","membasePassword":"password","n1qlPort":8093,"membaseUserId":"Administrator","port":8093,"machineUserId":"root","ip":"localhost","services":["kv","n1ql","index"],"machinePassword":"couchbase","indexPort":9102},{"isMasterNode":"false","membasePassword":"password","n1qlPort":9500,"membaseUserId":"Administrator","port":8093,"machineUserId":"root","ip":"localhost","services":["kv","n1ql","index"],"machinePassword":"couchbase","indexPort":9102}],
"bucket_info":[],"global":{"membasePassword":"password","n1qlPort":8093,"membaseUserId":"Administrator","port":8091,"machineUserId":"root","ip":"localhost","services":["kv","n1ql","index"],"machinePassword":"couchbase","indexPort":9102}}
|
{"node_info":[{"isMasterNode":"true","membasePassword":"password","n1qlPort":8093,"membaseUserId":"Administrator","port":8093,"machineUserId":"root","ip":"localhost","services":["kv","n1ql","index"],"machinePassword":"couchbase","indexPort":9102}],
"bucket_info":[],"global":{"membasePassword":"password","n1qlPort":8093,"membaseUserId":"Administrator","port":8091,"machineUserId":"root","ip":"localhost","services":["kv","n1ql","index"],"machinePassword":"couchbase","indexPort":9102}}
|
Fix environment configs for local environment
|
Test:: Fix environment configs for local environment
|
JSON
|
apache-2.0
|
jdbc-json/jdbc-cb
|
json
|
## Code Before:
{"node_info":[{"isMasterNode":"true","membasePassword":"password","n1qlPort":8093,"membaseUserId":"Administrator","port":8093,"machineUserId":"root","ip":"localhost","services":["kv","n1ql","index"],"machinePassword":"couchbase","indexPort":9102},{"isMasterNode":"false","membasePassword":"password","n1qlPort":9500,"membaseUserId":"Administrator","port":8093,"machineUserId":"root","ip":"localhost","services":["kv","n1ql","index"],"machinePassword":"couchbase","indexPort":9102}],
"bucket_info":[],"global":{"membasePassword":"password","n1qlPort":8093,"membaseUserId":"Administrator","port":8091,"machineUserId":"root","ip":"localhost","services":["kv","n1ql","index"],"machinePassword":"couchbase","indexPort":9102}}
## Instruction:
Test:: Fix environment configs for local environment
## Code After:
{"node_info":[{"isMasterNode":"true","membasePassword":"password","n1qlPort":8093,"membaseUserId":"Administrator","port":8093,"machineUserId":"root","ip":"localhost","services":["kv","n1ql","index"],"machinePassword":"couchbase","indexPort":9102}],
"bucket_info":[],"global":{"membasePassword":"password","n1qlPort":8093,"membaseUserId":"Administrator","port":8091,"machineUserId":"root","ip":"localhost","services":["kv","n1ql","index"],"machinePassword":"couchbase","indexPort":9102}}
|
e15f63bbcc27c44dc6f0be1c89b058d43e7c4b67
|
lib/awsraw.rb
|
lib/awsraw.rb
|
require "awsraw/version"
require "awsraw/s3/canonicalized_resource"
require "awsraw/s3/client"
require "awsraw/s3/faraday_middleware"
require "awsraw/s3/query_string_signer"
require "awsraw/s3/signature"
require "awsraw/s3/string_to_sign"
|
require "awsraw/error"
require "awsraw/version"
require "awsraw/s3/canonicalized_resource"
require "awsraw/s3/client"
require "awsraw/s3/content_md5_header"
require "awsraw/s3/faraday_middleware"
require "awsraw/s3/query_string_signer"
require "awsraw/s3/signature"
require "awsraw/s3/string_to_sign"
|
Add missing requires to top level.
|
Add missing requires to top level.
|
Ruby
|
mit
|
envato/awsraw,envato/awsraw
|
ruby
|
## Code Before:
require "awsraw/version"
require "awsraw/s3/canonicalized_resource"
require "awsraw/s3/client"
require "awsraw/s3/faraday_middleware"
require "awsraw/s3/query_string_signer"
require "awsraw/s3/signature"
require "awsraw/s3/string_to_sign"
## Instruction:
Add missing requires to top level.
## Code After:
require "awsraw/error"
require "awsraw/version"
require "awsraw/s3/canonicalized_resource"
require "awsraw/s3/client"
require "awsraw/s3/content_md5_header"
require "awsraw/s3/faraday_middleware"
require "awsraw/s3/query_string_signer"
require "awsraw/s3/signature"
require "awsraw/s3/string_to_sign"
|
f07c1a9a68fdd0115b1aa19392e4d22c0ac1c198
|
.travis.yml
|
.travis.yml
|
language: python
virtualenv:
system_site_packages: true
env:
matrix:
- PYTHON_VERSION="3.4"
- PYTHON_VERSION="3.5"
- PYTHON_VERSION="3.6"
install:
- source ci/travis_install.sh
script:
- pytest -v
after_success:
- coveralls
cache: apt
sudo: false
|
language: python
virtualenv:
system_site_packages: true
env:
matrix:
- PYTHON_VERSION="3.4"
- PYTHON_VERSION="3.5"
install:
- source ci/travis_install.sh
script:
- pytest -v
after_success:
- coveralls
cache: apt
sudo: false
|
Remove python 3.6 from Travis CI (not yet supported?)
|
Remove python 3.6 from Travis CI (not yet supported?)
|
YAML
|
mit
|
linguistica-uchicago/lxa5,linguistica-uchicago/lxa5,jacksonllee/lxa5,jacksonllee/lxa5
|
yaml
|
## Code Before:
language: python
virtualenv:
system_site_packages: true
env:
matrix:
- PYTHON_VERSION="3.4"
- PYTHON_VERSION="3.5"
- PYTHON_VERSION="3.6"
install:
- source ci/travis_install.sh
script:
- pytest -v
after_success:
- coveralls
cache: apt
sudo: false
## Instruction:
Remove python 3.6 from Travis CI (not yet supported?)
## Code After:
language: python
virtualenv:
system_site_packages: true
env:
matrix:
- PYTHON_VERSION="3.4"
- PYTHON_VERSION="3.5"
install:
- source ci/travis_install.sh
script:
- pytest -v
after_success:
- coveralls
cache: apt
sudo: false
|
57fbef9eca234665761331160a2e1afa41ec7809
|
src/Http/assets.php
|
src/Http/assets.php
|
<?php
namespace {{ theme.namespace }}\Http;
use function {{ theme.namespace }}\asset_path;
/*
|-----------------------------------------------------------------
| Theme Assets
|-----------------------------------------------------------------
|
| This file is for registering your theme stylesheets and scripts.
| In here you should also deregister all unwanted assets which
| can be shiped with various third-parity plugins.
|
*/
// Manages theme stylesheets.
add_action('wp_enqueue_scripts', function () {
wp_enqueue_style('bootstrap', asset_path('css/bootstrap.css'));
wp_enqueue_style('theme', asset_path('css/theme.css'));
});
// Manages theme scripts.
add_action('wp_enqueue_scripts', function () {
// wp_enqueue_script('theme-scripts', asset_path('js/all.js'));
});
|
<?php
namespace {{ theme.namespace }}\Http;
use function {{ theme.namespace }}\asset_path;
/*
|-----------------------------------------------------------------
| Theme Assets
|-----------------------------------------------------------------
|
| This file is for registering your theme stylesheets and scripts.
| In here you should also deregister all unwanted assets which
| can be shiped with various third-parity plugins.
|
*/
// Manages theme stylesheets.
add_action('wp_enqueue_scripts', function () {
wp_enqueue_style('theme', asset_path('css/theme.css'));
});
// Manages theme scripts.
add_action('wp_enqueue_scripts', function () {
// wp_enqueue_script('theme-scripts', asset_path('js/all.js'));
});
|
Remove enqueue of bootstrap.css asset
|
Remove enqueue of bootstrap.css asset
|
PHP
|
mit
|
tonik/theme,tonik/tonik,tonik/tonik,tonik/theme
|
php
|
## Code Before:
<?php
namespace {{ theme.namespace }}\Http;
use function {{ theme.namespace }}\asset_path;
/*
|-----------------------------------------------------------------
| Theme Assets
|-----------------------------------------------------------------
|
| This file is for registering your theme stylesheets and scripts.
| In here you should also deregister all unwanted assets which
| can be shiped with various third-parity plugins.
|
*/
// Manages theme stylesheets.
add_action('wp_enqueue_scripts', function () {
wp_enqueue_style('bootstrap', asset_path('css/bootstrap.css'));
wp_enqueue_style('theme', asset_path('css/theme.css'));
});
// Manages theme scripts.
add_action('wp_enqueue_scripts', function () {
// wp_enqueue_script('theme-scripts', asset_path('js/all.js'));
});
## Instruction:
Remove enqueue of bootstrap.css asset
## Code After:
<?php
namespace {{ theme.namespace }}\Http;
use function {{ theme.namespace }}\asset_path;
/*
|-----------------------------------------------------------------
| Theme Assets
|-----------------------------------------------------------------
|
| This file is for registering your theme stylesheets and scripts.
| In here you should also deregister all unwanted assets which
| can be shiped with various third-parity plugins.
|
*/
// Manages theme stylesheets.
add_action('wp_enqueue_scripts', function () {
wp_enqueue_style('theme', asset_path('css/theme.css'));
});
// Manages theme scripts.
add_action('wp_enqueue_scripts', function () {
// wp_enqueue_script('theme-scripts', asset_path('js/all.js'));
});
|
94db84f53c9623cdcbdccd0081f39c7f2684e9da
|
doc/address.md
|
doc/address.md
|
```ruby
Faker::Address.city #=> "Imogeneborough"
Faker::Address.street_name #=> "Larkin Fork"
Faker::Address.street_address #=> "282 Kevin Brook"
Faker::Address.secondary_address #=> "Apt. 672"
Faker::Address.building_number #=> "7304"
Faker::Address.zip_code #=> "58517"
Faker::Address.zip #=> "58517"
Faker::Address.postcode #=> "76032-4907" or "58517"
Faker::Address.time_zone #=> "Asia/Yakutsk"
Faker::Address.street_suffix #=> "Street"
Faker::Address.city_suffix #=> "fort"
Faker::Address.city_prefix #=> "Lake"
Faker::Address.state #=> "California"
Faker::Address.state_abbr #=> "AP"
Faker::Address.country #=> "French Guiana"
Faker::Address.country_code #=> "IT"
Faker::Address.latitude #=> "-58.17256227443719"
Faker::Address.longitude #=> "-156.65548382095133"
```
|
```ruby
Faker::Address.city #=> "Imogeneborough"
Faker::Address.street_name #=> "Larkin Fork"
Faker::Address.street_address #=> "282 Kevin Brook"
Faker::Address.secondary_address #=> "Apt. 672"
Faker::Address.building_number #=> "7304"
Faker::Address.zip_code #=> "58517" or "23285-4905"
Faker::Address.zip #=> "58517" or "66259-8212"
Faker::Address.postcode #=> "76032-4907" or "58517"
Faker::Address.time_zone #=> "Asia/Yakutsk"
Faker::Address.street_suffix #=> "Street"
Faker::Address.city_suffix #=> "fort"
Faker::Address.city_prefix #=> "Lake"
Faker::Address.state #=> "California"
Faker::Address.state_abbr #=> "AP"
Faker::Address.country #=> "French Guiana"
Faker::Address.country_code #=> "IT"
Faker::Address.latitude #=> "-58.17256227443719"
Faker::Address.longitude #=> "-156.65548382095133"
```
|
Update output for zip functions
|
Update output for zip functions
|
Markdown
|
mit
|
vveliev/faker,kubapol/faker,stympy/faker,irfanah/faker,joelibaceta/faker,kubapol/faker,kubapol/faker,Dakurei/faker,irfanah/faker,irfanah/faker
|
markdown
|
## Code Before:
```ruby
Faker::Address.city #=> "Imogeneborough"
Faker::Address.street_name #=> "Larkin Fork"
Faker::Address.street_address #=> "282 Kevin Brook"
Faker::Address.secondary_address #=> "Apt. 672"
Faker::Address.building_number #=> "7304"
Faker::Address.zip_code #=> "58517"
Faker::Address.zip #=> "58517"
Faker::Address.postcode #=> "76032-4907" or "58517"
Faker::Address.time_zone #=> "Asia/Yakutsk"
Faker::Address.street_suffix #=> "Street"
Faker::Address.city_suffix #=> "fort"
Faker::Address.city_prefix #=> "Lake"
Faker::Address.state #=> "California"
Faker::Address.state_abbr #=> "AP"
Faker::Address.country #=> "French Guiana"
Faker::Address.country_code #=> "IT"
Faker::Address.latitude #=> "-58.17256227443719"
Faker::Address.longitude #=> "-156.65548382095133"
```
## Instruction:
Update output for zip functions
## Code After:
```ruby
Faker::Address.city #=> "Imogeneborough"
Faker::Address.street_name #=> "Larkin Fork"
Faker::Address.street_address #=> "282 Kevin Brook"
Faker::Address.secondary_address #=> "Apt. 672"
Faker::Address.building_number #=> "7304"
Faker::Address.zip_code #=> "58517" or "23285-4905"
Faker::Address.zip #=> "58517" or "66259-8212"
Faker::Address.postcode #=> "76032-4907" or "58517"
Faker::Address.time_zone #=> "Asia/Yakutsk"
Faker::Address.street_suffix #=> "Street"
Faker::Address.city_suffix #=> "fort"
Faker::Address.city_prefix #=> "Lake"
Faker::Address.state #=> "California"
Faker::Address.state_abbr #=> "AP"
Faker::Address.country #=> "French Guiana"
Faker::Address.country_code #=> "IT"
Faker::Address.latitude #=> "-58.17256227443719"
Faker::Address.longitude #=> "-156.65548382095133"
```
|
369466113b31e80ad7ee6832da323f698fbfee44
|
README.markdown
|
README.markdown
|
Overrides the click event on mobile devices to fire an click event immediately and get rid of the 300ms delay (webkit for iPhone and Android problem).
|
Overrides the click event on mobile devices to fire a click event immediately and get rid of the 300ms delay (webkit for iPhone and Android problem).
touchToClick will fire an artificial `click` event when the `touchend` event is fired and the user hasn't moved since `touchstart`. The original `click` event of the mobile browser will be prevented so that there are not two clicks.
### Usage
Just include the file in your webpage:
```
<script type="application/javascript" src="jquery.touchToClick.js"></script>
```
### Alternatives
* [FastClick](https://github.com/ftlabs/fastclick) - Has unit tests, but didn't work us reliably on Android stock browser and Android Firefox
|
Add some more docu and link to FastClick
|
Add some more docu and link to FastClick
|
Markdown
|
mit
|
cargomedia/jquery.touchToClick
|
markdown
|
## Code Before:
Overrides the click event on mobile devices to fire an click event immediately and get rid of the 300ms delay (webkit for iPhone and Android problem).
## Instruction:
Add some more docu and link to FastClick
## Code After:
Overrides the click event on mobile devices to fire a click event immediately and get rid of the 300ms delay (webkit for iPhone and Android problem).
touchToClick will fire an artificial `click` event when the `touchend` event is fired and the user hasn't moved since `touchstart`. The original `click` event of the mobile browser will be prevented so that there are not two clicks.
### Usage
Just include the file in your webpage:
```
<script type="application/javascript" src="jquery.touchToClick.js"></script>
```
### Alternatives
* [FastClick](https://github.com/ftlabs/fastclick) - Has unit tests, but didn't work us reliably on Android stock browser and Android Firefox
|
cdae77dee9888d6d6094566747650bf80d631f03
|
station.py
|
station.py
|
"""Creates the station class"""
#import ask_user from ask_user
#import int_check from int_check
#import reasonable_check from reasonable_check
class Station:
"""
Each train station is an instance of the Station class.
Methods:
__init__: creates a new stations
total_station_pop: calculates total station population
ask_user(prompt, lower_range, upper_range): function to get input, maybe it should live
somewhere else?
"""
def __init__(self, capacity, escalators, train_wait, travelors_arriving, travelors_departing):
self.capacity = user.says("Enter the max capacity of the station between" lower "and" upper)
self.escalators = user.says("Enter the number of escalators in the station between" lower "and" upper)
self.train_wait = user.says("Enter the wait time between trains in seconds between" lower "and" upper)
self.travelors_arriving = user.says("How many people just exited the train? between" lower "and" upper)
self.travelors_departing = user.says("How many people are waiting for the train? between" lower "and" upper)
|
"""Creates the station class"""
#import request_integer_in_range from request_integer_in_range
class Station:
"""
Each train station is an instance of the Station class.
Methods:
__init__: creates a new stations
request_integer_in_range : requests an integer in a range
"""
def __init__(self, capacity, escalators, train_wait, travelors_arriving, travelors_departing):
self.capacity = request_integer_in_range("Enter the station capacity between 10 and 10000: ", 10, 10000)
self.escalators = request_integer_in_range("Enter an odd number of escalators between 1 and 7: ", 1, 7)
self.train_wait = request_integer_in_range("Enter the wait time between trains in seconds between 60 and 1800 ", 60, 1800)
self.travelors_arriving = request_integer_in_range("Enter the number of people exiting the train between 1 and 500: ", 1, 500)
self.travelors_departing = request_integer_in_range("Enter the number of people waiting for the train between 1 and 500: ", 1, 500)
|
Integrate integer test function into instantiation
|
Integrate integer test function into instantiation
Ref #23
|
Python
|
mit
|
ForestPride/rail-problem
|
python
|
## Code Before:
"""Creates the station class"""
#import ask_user from ask_user
#import int_check from int_check
#import reasonable_check from reasonable_check
class Station:
"""
Each train station is an instance of the Station class.
Methods:
__init__: creates a new stations
total_station_pop: calculates total station population
ask_user(prompt, lower_range, upper_range): function to get input, maybe it should live
somewhere else?
"""
def __init__(self, capacity, escalators, train_wait, travelors_arriving, travelors_departing):
self.capacity = user.says("Enter the max capacity of the station between" lower "and" upper)
self.escalators = user.says("Enter the number of escalators in the station between" lower "and" upper)
self.train_wait = user.says("Enter the wait time between trains in seconds between" lower "and" upper)
self.travelors_arriving = user.says("How many people just exited the train? between" lower "and" upper)
self.travelors_departing = user.says("How many people are waiting for the train? between" lower "and" upper)
## Instruction:
Integrate integer test function into instantiation
Ref #23
## Code After:
"""Creates the station class"""
#import request_integer_in_range from request_integer_in_range
class Station:
"""
Each train station is an instance of the Station class.
Methods:
__init__: creates a new stations
request_integer_in_range : requests an integer in a range
"""
def __init__(self, capacity, escalators, train_wait, travelors_arriving, travelors_departing):
self.capacity = request_integer_in_range("Enter the station capacity between 10 and 10000: ", 10, 10000)
self.escalators = request_integer_in_range("Enter an odd number of escalators between 1 and 7: ", 1, 7)
self.train_wait = request_integer_in_range("Enter the wait time between trains in seconds between 60 and 1800 ", 60, 1800)
self.travelors_arriving = request_integer_in_range("Enter the number of people exiting the train between 1 and 500: ", 1, 500)
self.travelors_departing = request_integer_in_range("Enter the number of people waiting for the train between 1 and 500: ", 1, 500)
|
8118dcf15e59fdd32471a7e303af66ca90e09e5c
|
build-android-release.sh
|
build-android-release.sh
|
echo "Building Android release APK"
cordova build android --release
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../keys/evothings.keystore platforms/android/build/outputs/apk/android-release-unsigned.apk evothings_alias
jarsigner -verify -verbose platforms/android/build/outputs/apk/android-release-unsigned.apk
zipalign -v 4 platforms/android/build/outputs/apk/android-release-unsigned.apk ./EvothingsViewer.apk
|
echo "Building Android release APK"
cordova build android --release
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../keys/evothings.keystore platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk evothings_alias
jarsigner -verify -verbose platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk
zipalign -v 4 platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk ./EvothingsViewer.apk
|
Fix for new paths in Cordova 8
|
Fix for new paths in Cordova 8
|
Shell
|
apache-2.0
|
evothings/evothings-viewer,evothings/evothings-viewer,evothings/evothings-viewer,evothings/evothings-viewer
|
shell
|
## Code Before:
echo "Building Android release APK"
cordova build android --release
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../keys/evothings.keystore platforms/android/build/outputs/apk/android-release-unsigned.apk evothings_alias
jarsigner -verify -verbose platforms/android/build/outputs/apk/android-release-unsigned.apk
zipalign -v 4 platforms/android/build/outputs/apk/android-release-unsigned.apk ./EvothingsViewer.apk
## Instruction:
Fix for new paths in Cordova 8
## Code After:
echo "Building Android release APK"
cordova build android --release
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../keys/evothings.keystore platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk evothings_alias
jarsigner -verify -verbose platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk
zipalign -v 4 platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk ./EvothingsViewer.apk
|
a2967f5df7dd86cf3cd434f5e1115f6e714420da
|
register.php
|
register.php
|
<?php
$REGISTER_LTI2 = array(
"name" => "Simple Attendance Tool",
"short_name" => "Attendance Tool",
"description" => "This is a simple attendance tool that allows the instructor to set a code and the students enter the code."
);
|
<?php
$REGISTER_LTI2 = array(
"name" => "Simple Attendance Tool",
"FontAwesome" => "fa-server",
"short_name" => "Attendance Tool",
"description" => "This is a simple attendance tool that allows the instructor to set a code and the students enter the code."
);
|
Add FontAwesome icons to the tool registration.
|
Add FontAwesome icons to the tool registration.
|
PHP
|
apache-2.0
|
csev/tsugi-php-mod,csev/tsugi-php-mod,tsugitools/attend,csev/tsugi-php-mod,csev/tsugi-php-mod,csev/tsugi-php-mod
|
php
|
## Code Before:
<?php
$REGISTER_LTI2 = array(
"name" => "Simple Attendance Tool",
"short_name" => "Attendance Tool",
"description" => "This is a simple attendance tool that allows the instructor to set a code and the students enter the code."
);
## Instruction:
Add FontAwesome icons to the tool registration.
## Code After:
<?php
$REGISTER_LTI2 = array(
"name" => "Simple Attendance Tool",
"FontAwesome" => "fa-server",
"short_name" => "Attendance Tool",
"description" => "This is a simple attendance tool that allows the instructor to set a code and the students enter the code."
);
|
b8f60b0cb80857dea39169acca9bce98e35c52eb
|
app/assets/javascripts/bounties.js.coffee
|
app/assets/javascripts/bounties.js.coffee
|
$('body.bounties.index').ready ->
# Added a parser for the my-bounty input fields
$.fn.dataTable.ext.order['dom-input-numeric'] = (_settings, col) ->
return this.api().column(col, {order: 'index'}).nodes().map (td, _i) ->
return $('input#bounty_value', td).val() * 1
$('#bounties-table').DataTable
order: [[2, 'desc'], [0, 'asc'], [1, 'asc']]
columnDefs: [
targets: ['total-bounty', 'my-bounty']
orderSequence: ['desc', 'asc']
render: (data, type, _row, _meta) ->
if type is 'display'
return data
else
return data.replace(/[^\d]/g, '')
,
targets: ['my-bounty']
orderDataType: 'dom-input-numeric'
type: 'numeric'
]
autoWidth: false
pagingType: 'full_numbers'
language: default_pagination_language
|
$('body.bounties.index').ready ->
# Added a parser for the my-bounty input fields
$.fn.dataTable.ext.order['dom-input-numeric'] = (_settings, col) ->
return this.api().column(col, {order: 'index'}).nodes().map (td, _i) ->
return $('input#bounty_value', td).val() * 1
$('#bounties-table').DataTable
order: [[2, 'desc'], [0, 'asc'], [1, 'asc']]
columnDefs: [
targets: ['total-bounty', 'my-bounty']
orderSequence: ['desc', 'asc']
render: (data, type, _row, _meta) ->
if type is 'display'
return data
else
return data.replace(/[^\d]/g, '')
,
targets: ['my-bounty']
orderDataType: 'dom-input-numeric'
type: 'numeric'
]
dom: '<"top"f>rt<"bottom"p>'
autoWidth: false
pagingType: 'full_numbers'
language: default_pagination_language
|
Remove clutter from bounties page
|
Remove clutter from bounties page
|
CoffeeScript
|
mit
|
ZeusWPI/gamification,ZeusWPI/gamification,ZeusWPI/gamification,ZeusWPI/gamification
|
coffeescript
|
## Code Before:
$('body.bounties.index').ready ->
# Added a parser for the my-bounty input fields
$.fn.dataTable.ext.order['dom-input-numeric'] = (_settings, col) ->
return this.api().column(col, {order: 'index'}).nodes().map (td, _i) ->
return $('input#bounty_value', td).val() * 1
$('#bounties-table').DataTable
order: [[2, 'desc'], [0, 'asc'], [1, 'asc']]
columnDefs: [
targets: ['total-bounty', 'my-bounty']
orderSequence: ['desc', 'asc']
render: (data, type, _row, _meta) ->
if type is 'display'
return data
else
return data.replace(/[^\d]/g, '')
,
targets: ['my-bounty']
orderDataType: 'dom-input-numeric'
type: 'numeric'
]
autoWidth: false
pagingType: 'full_numbers'
language: default_pagination_language
## Instruction:
Remove clutter from bounties page
## Code After:
$('body.bounties.index').ready ->
# Added a parser for the my-bounty input fields
$.fn.dataTable.ext.order['dom-input-numeric'] = (_settings, col) ->
return this.api().column(col, {order: 'index'}).nodes().map (td, _i) ->
return $('input#bounty_value', td).val() * 1
$('#bounties-table').DataTable
order: [[2, 'desc'], [0, 'asc'], [1, 'asc']]
columnDefs: [
targets: ['total-bounty', 'my-bounty']
orderSequence: ['desc', 'asc']
render: (data, type, _row, _meta) ->
if type is 'display'
return data
else
return data.replace(/[^\d]/g, '')
,
targets: ['my-bounty']
orderDataType: 'dom-input-numeric'
type: 'numeric'
]
dom: '<"top"f>rt<"bottom"p>'
autoWidth: false
pagingType: 'full_numbers'
language: default_pagination_language
|
24363587e286d98fafd801eaf750dde726535641
|
Casks/trailer.rb
|
Casks/trailer.rb
|
cask 'trailer' do
version '1.3.16'
sha256 '4004b46c1fb50aab721410ab6bb109afa4eb8cfadc42abfd3183183964654b87'
url "https://ptsochantaris.github.io/trailer/trailer#{version.no_dots}.zip"
appcast 'https://ptsochantaris.github.io/trailer/appcast.xml',
checkpoint: 'eeded65b93ba8a391c14e4b5e60187bc56c56cdbe197005ef1288236aee3bd91'
name 'Trailer'
homepage 'https://ptsochantaris.github.io/trailer/'
license :mit
app 'Trailer.app'
end
|
cask 'trailer' do
version '1.3.17'
sha256 '3c556eb1e68751818346e3468ca5d779c7f38f1ad3cd9b8d14a3baddc7deb2be'
url "https://ptsochantaris.github.io/trailer/trailer#{version.no_dots}.zip"
appcast 'https://ptsochantaris.github.io/trailer/appcast.xml',
checkpoint: 'eeded65b93ba8a391c14e4b5e60187bc56c56cdbe197005ef1288236aee3bd91'
name 'Trailer'
homepage 'https://ptsochantaris.github.io/trailer/'
license :mit
app 'Trailer.app'
end
|
Update Trailer to version 1.3.17
|
Update Trailer to version 1.3.17
This commit updates the version and sha256 stanzas.
|
Ruby
|
bsd-2-clause
|
miccal/homebrew-cask,a1russell/homebrew-cask,FinalDes/homebrew-cask,riyad/homebrew-cask,MoOx/homebrew-cask,optikfluffel/homebrew-cask,asins/homebrew-cask,samdoran/homebrew-cask,jellyfishcoder/homebrew-cask,vigosan/homebrew-cask,kesara/homebrew-cask,greg5green/homebrew-cask,shonjir/homebrew-cask,RJHsiao/homebrew-cask,jeanregisser/homebrew-cask,leipert/homebrew-cask,fharbe/homebrew-cask,dictcp/homebrew-cask,joschi/homebrew-cask,johndbritton/homebrew-cask,muan/homebrew-cask,xight/homebrew-cask,Ephemera/homebrew-cask,jeroenj/homebrew-cask,reitermarkus/homebrew-cask,kTitan/homebrew-cask,n8henrie/homebrew-cask,yurikoles/homebrew-cask,mattrobenolt/homebrew-cask,artdevjs/homebrew-cask,mahori/homebrew-cask,feigaochn/homebrew-cask,zmwangx/homebrew-cask,franklouwers/homebrew-cask,vigosan/homebrew-cask,nathanielvarona/homebrew-cask,malob/homebrew-cask,Cottser/homebrew-cask,ericbn/homebrew-cask,hovancik/homebrew-cask,0xadada/homebrew-cask,gilesdring/homebrew-cask,lifepillar/homebrew-cask,syscrusher/homebrew-cask,anbotero/homebrew-cask,malford/homebrew-cask,shoichiaizawa/homebrew-cask,dictcp/homebrew-cask,joshka/homebrew-cask,cblecker/homebrew-cask,MichaelPei/homebrew-cask,vin047/homebrew-cask,aguynamedryan/homebrew-cask,adrianchia/homebrew-cask,arronmabrey/homebrew-cask,cliffcotino/homebrew-cask,skatsuta/homebrew-cask,thomanq/homebrew-cask,kesara/homebrew-cask,Gasol/homebrew-cask,stephenwade/homebrew-cask,xight/homebrew-cask,gmkey/homebrew-cask,markthetech/homebrew-cask,samnung/homebrew-cask,tyage/homebrew-cask,samnung/homebrew-cask,gabrielizaias/homebrew-cask,sgnh/homebrew-cask,deiga/homebrew-cask,miccal/homebrew-cask,diogodamiani/homebrew-cask,haha1903/homebrew-cask,psibre/homebrew-cask,mhubig/homebrew-cask,stephenwade/homebrew-cask,michelegera/homebrew-cask,inz/homebrew-cask,julionc/homebrew-cask,scribblemaniac/homebrew-cask,miccal/homebrew-cask,hyuna917/homebrew-cask,skatsuta/homebrew-cask,puffdad/homebrew-cask,hyuna917/homebrew-cask,inz/homebrew-cask,colindunn/homebrew-cask,Keloran/homebrew-cask,sohtsuka/homebrew-cask,pkq/homebrew-cask,franklouwers/homebrew-cask,deanmorin/homebrew-cask,tolbkni/homebrew-cask,moimikey/homebrew-cask,mchlrmrz/homebrew-cask,shonjir/homebrew-cask,jpmat296/homebrew-cask,rajiv/homebrew-cask,nrlquaker/homebrew-cask,mahori/homebrew-cask,mjgardner/homebrew-cask,reelsense/homebrew-cask,ksylvan/homebrew-cask,elyscape/homebrew-cask,cprecioso/homebrew-cask,janlugt/homebrew-cask,cobyism/homebrew-cask,0xadada/homebrew-cask,psibre/homebrew-cask,gabrielizaias/homebrew-cask,yumitsu/homebrew-cask,robertgzr/homebrew-cask,renard/homebrew-cask,FinalDes/homebrew-cask,antogg/homebrew-cask,winkelsdorf/homebrew-cask,jeanregisser/homebrew-cask,squid314/homebrew-cask,winkelsdorf/homebrew-cask,JosephViolago/homebrew-cask,imgarylai/homebrew-cask,onlynone/homebrew-cask,riyad/homebrew-cask,lantrix/homebrew-cask,chuanxd/homebrew-cask,Labutin/homebrew-cask,singingwolfboy/homebrew-cask,jeroenj/homebrew-cask,slack4u/homebrew-cask,JosephViolago/homebrew-cask,kkdd/homebrew-cask,sscotth/homebrew-cask,gerrypower/homebrew-cask,ywfwj2008/homebrew-cask,RJHsiao/homebrew-cask,chuanxd/homebrew-cask,mathbunnyru/homebrew-cask,julionc/homebrew-cask,hakamadare/homebrew-cask,SentinelWarren/homebrew-cask,jangalinski/homebrew-cask,pkq/homebrew-cask,jasmas/homebrew-cask,blogabe/homebrew-cask,scribblemaniac/homebrew-cask,MircoT/homebrew-cask,victorpopkov/homebrew-cask,howie/homebrew-cask,jconley/homebrew-cask,xyb/homebrew-cask,tjnycum/homebrew-cask,kkdd/homebrew-cask,troyxmccall/homebrew-cask,Saklad5/homebrew-cask,klane/homebrew-cask,sjackman/homebrew-cask,nrlquaker/homebrew-cask,forevergenin/homebrew-cask,winkelsdorf/homebrew-cask,jawshooah/homebrew-cask,optikfluffel/homebrew-cask,nshemonsky/homebrew-cask,usami-k/homebrew-cask,troyxmccall/homebrew-cask,hanxue/caskroom,mikem/homebrew-cask,imgarylai/homebrew-cask,ericbn/homebrew-cask,yutarody/homebrew-cask,ptb/homebrew-cask,zerrot/homebrew-cask,Cottser/homebrew-cask,mahori/homebrew-cask,n8henrie/homebrew-cask,schneidmaster/homebrew-cask,leipert/homebrew-cask,thehunmonkgroup/homebrew-cask,okket/homebrew-cask,colindunn/homebrew-cask,yuhki50/homebrew-cask,malob/homebrew-cask,n0ts/homebrew-cask,claui/homebrew-cask,mazehall/homebrew-cask,yurikoles/homebrew-cask,moogar0880/homebrew-cask,scottsuch/homebrew-cask,Ketouem/homebrew-cask,sscotth/homebrew-cask,adrianchia/homebrew-cask,uetchy/homebrew-cask,flaviocamilo/homebrew-cask,jasmas/homebrew-cask,decrement/homebrew-cask,Ephemera/homebrew-cask,scribblemaniac/homebrew-cask,kassi/homebrew-cask,andrewdisley/homebrew-cask,jconley/homebrew-cask,Ketouem/homebrew-cask,cliffcotino/homebrew-cask,rajiv/homebrew-cask,Amorymeltzer/homebrew-cask,JikkuJose/homebrew-cask,lukasbestle/homebrew-cask,jedahan/homebrew-cask,stonehippo/homebrew-cask,danielbayley/homebrew-cask,arronmabrey/homebrew-cask,wastrachan/homebrew-cask,scottsuch/homebrew-cask,andrewdisley/homebrew-cask,sosedoff/homebrew-cask,MoOx/homebrew-cask,asbachb/homebrew-cask,m3nu/homebrew-cask,wickles/homebrew-cask,puffdad/homebrew-cask,chadcatlett/caskroom-homebrew-cask,jacobbednarz/homebrew-cask,vitorgalvao/homebrew-cask,jedahan/homebrew-cask,JikkuJose/homebrew-cask,caskroom/homebrew-cask,amatos/homebrew-cask,hellosky806/homebrew-cask,mikem/homebrew-cask,toonetown/homebrew-cask,mishari/homebrew-cask,zmwangx/homebrew-cask,ianyh/homebrew-cask,andrewdisley/homebrew-cask,fanquake/homebrew-cask,13k/homebrew-cask,rogeriopradoj/homebrew-cask,shoichiaizawa/homebrew-cask,moogar0880/homebrew-cask,sebcode/homebrew-cask,claui/homebrew-cask,esebastian/homebrew-cask,howie/homebrew-cask,farmerchris/homebrew-cask,singingwolfboy/homebrew-cask,ptb/homebrew-cask,usami-k/homebrew-cask,jalaziz/homebrew-cask,chrisfinazzo/homebrew-cask,a1russell/homebrew-cask,ksato9700/homebrew-cask,neverfox/homebrew-cask,larseggert/homebrew-cask,tjnycum/homebrew-cask,michelegera/homebrew-cask,perfide/homebrew-cask,sjackman/homebrew-cask,xyb/homebrew-cask,shorshe/homebrew-cask,joshka/homebrew-cask,JacopKane/homebrew-cask,xight/homebrew-cask,BenjaminHCCarr/homebrew-cask,colindean/homebrew-cask,MerelyAPseudonym/homebrew-cask,vitorgalvao/homebrew-cask,fanquake/homebrew-cask,ericbn/homebrew-cask,koenrh/homebrew-cask,bric3/homebrew-cask,mathbunnyru/homebrew-cask,mjdescy/homebrew-cask,ksylvan/homebrew-cask,malford/homebrew-cask,thomanq/homebrew-cask,xakraz/homebrew-cask,cobyism/homebrew-cask,jawshooah/homebrew-cask,dcondrey/homebrew-cask,deiga/homebrew-cask,blainesch/homebrew-cask,opsdev-ws/homebrew-cask,danielbayley/homebrew-cask,reitermarkus/homebrew-cask,johnjelinek/homebrew-cask,pacav69/homebrew-cask,deiga/homebrew-cask,My2ndAngelic/homebrew-cask,jmeridth/homebrew-cask,onlynone/homebrew-cask,fharbe/homebrew-cask,xakraz/homebrew-cask,jmeridth/homebrew-cask,asins/homebrew-cask,alebcay/homebrew-cask,yurikoles/homebrew-cask,athrunsun/homebrew-cask,hanxue/caskroom,My2ndAngelic/homebrew-cask,mchlrmrz/homebrew-cask,timsutton/homebrew-cask,rajiv/homebrew-cask,tsparber/homebrew-cask,wastrachan/homebrew-cask,sanchezm/homebrew-cask,devmynd/homebrew-cask,cfillion/homebrew-cask,ywfwj2008/homebrew-cask,cprecioso/homebrew-cask,adrianchia/homebrew-cask,bdhess/homebrew-cask,jaredsampson/homebrew-cask,mattrobenolt/homebrew-cask,uetchy/homebrew-cask,sanyer/homebrew-cask,wKovacs64/homebrew-cask,jbeagley52/homebrew-cask,sohtsuka/homebrew-cask,morganestes/homebrew-cask,giannitm/homebrew-cask,mjgardner/homebrew-cask,wmorin/homebrew-cask,thehunmonkgroup/homebrew-cask,inta/homebrew-cask,lukasbestle/homebrew-cask,shonjir/homebrew-cask,tsparber/homebrew-cask,colindean/homebrew-cask,gerrypower/homebrew-cask,guerrero/homebrew-cask,samshadwell/homebrew-cask,cblecker/homebrew-cask,lumaxis/homebrew-cask,rogeriopradoj/homebrew-cask,johnjelinek/homebrew-cask,bosr/homebrew-cask,optikfluffel/homebrew-cask,kongslund/homebrew-cask,thii/homebrew-cask,tyage/homebrew-cask,yutarody/homebrew-cask,kpearson/homebrew-cask,Amorymeltzer/homebrew-cask,wKovacs64/homebrew-cask,robertgzr/homebrew-cask,hakamadare/homebrew-cask,gyndav/homebrew-cask,BenjaminHCCarr/homebrew-cask,Gasol/homebrew-cask,singingwolfboy/homebrew-cask,janlugt/homebrew-cask,AnastasiaSulyagina/homebrew-cask,squid314/homebrew-cask,stonehippo/homebrew-cask,kpearson/homebrew-cask,wickedsp1d3r/homebrew-cask,diguage/homebrew-cask,hovancik/homebrew-cask,antogg/homebrew-cask,nathanielvarona/homebrew-cask,jpmat296/homebrew-cask,mhubig/homebrew-cask,goxberry/homebrew-cask,markthetech/homebrew-cask,hristozov/homebrew-cask,josa42/homebrew-cask,kamilboratynski/homebrew-cask,phpwutz/homebrew-cask,decrement/homebrew-cask,sebcode/homebrew-cask,m3nu/homebrew-cask,timsutton/homebrew-cask,boecko/homebrew-cask,AnastasiaSulyagina/homebrew-cask,goxberry/homebrew-cask,patresi/homebrew-cask,exherb/homebrew-cask,schneidmaster/homebrew-cask,bric3/homebrew-cask,mchlrmrz/homebrew-cask,mwean/homebrew-cask,ninjahoahong/homebrew-cask,klane/homebrew-cask,retrography/homebrew-cask,athrunsun/homebrew-cask,haha1903/homebrew-cask,kesara/homebrew-cask,rogeriopradoj/homebrew-cask,FredLackeyOfficial/homebrew-cask,a1russell/homebrew-cask,guerrero/homebrew-cask,y00rb/homebrew-cask,tjnycum/homebrew-cask,tedski/homebrew-cask,sanyer/homebrew-cask,seanzxx/homebrew-cask,imgarylai/homebrew-cask,asbachb/homebrew-cask,sanchezm/homebrew-cask,jalaziz/homebrew-cask,uetchy/homebrew-cask,kingthorin/homebrew-cask,blogabe/homebrew-cask,stephenwade/homebrew-cask,ninjahoahong/homebrew-cask,daften/homebrew-cask,mlocher/homebrew-cask,julionc/homebrew-cask,jangalinski/homebrew-cask,greg5green/homebrew-cask,mlocher/homebrew-cask,hellosky806/homebrew-cask,dcondrey/homebrew-cask,daften/homebrew-cask,forevergenin/homebrew-cask,deanmorin/homebrew-cask,mrmachine/homebrew-cask,Labutin/homebrew-cask,josa42/homebrew-cask,jbeagley52/homebrew-cask,shoichiaizawa/homebrew-cask,alebcay/homebrew-cask,bosr/homebrew-cask,coeligena/homebrew-customized,stigkj/homebrew-caskroom-cask,antogg/homebrew-cask,reitermarkus/homebrew-cask,diogodamiani/homebrew-cask,wickles/homebrew-cask,paour/homebrew-cask,KosherBacon/homebrew-cask,tjt263/homebrew-cask,yumitsu/homebrew-cask,mauricerkelly/homebrew-cask,ksato9700/homebrew-cask,victorpopkov/homebrew-cask,Ngrd/homebrew-cask,kassi/homebrew-cask,inta/homebrew-cask,FredLackeyOfficial/homebrew-cask,jiashuw/homebrew-cask,morganestes/homebrew-cask,xtian/homebrew-cask,JosephViolago/homebrew-cask,mattrobenolt/homebrew-cask,wmorin/homebrew-cask,doits/homebrew-cask,lumaxis/homebrew-cask,kingthorin/homebrew-cask,jaredsampson/homebrew-cask,diguage/homebrew-cask,y00rb/homebrew-cask,kingthorin/homebrew-cask,xyb/homebrew-cask,tan9/homebrew-cask,dictcp/homebrew-cask,0rax/homebrew-cask,larseggert/homebrew-cask,kronicd/homebrew-cask,m3nu/homebrew-cask,seanorama/homebrew-cask,Amorymeltzer/homebrew-cask,MircoT/homebrew-cask,shorshe/homebrew-cask,kronicd/homebrew-cask,gmkey/homebrew-cask,Ngrd/homebrew-cask,caskroom/homebrew-cask,cobyism/homebrew-cask,alexg0/homebrew-cask,joschi/homebrew-cask,seanorama/homebrew-cask,gyndav/homebrew-cask,renaudguerin/homebrew-cask,toonetown/homebrew-cask,andyli/homebrew-cask,mazehall/homebrew-cask,danielbayley/homebrew-cask,devmynd/homebrew-cask,exherb/homebrew-cask,samdoran/homebrew-cask,wmorin/homebrew-cask,jellyfishcoder/homebrew-cask,thii/homebrew-cask,retrography/homebrew-cask,moimikey/homebrew-cask,KosherBacon/homebrew-cask,coeligena/homebrew-customized,chrisfinazzo/homebrew-cask,lucasmezencio/homebrew-cask,13k/homebrew-cask,mauricerkelly/homebrew-cask,renaudguerin/homebrew-cask,paour/homebrew-cask,patresi/homebrew-cask,xcezx/homebrew-cask,paour/homebrew-cask,mjdescy/homebrew-cask,samshadwell/homebrew-cask,vin047/homebrew-cask,nathancahill/homebrew-cask,mwean/homebrew-cask,moimikey/homebrew-cask,stigkj/homebrew-caskroom-cask,BenjaminHCCarr/homebrew-cask,Keloran/homebrew-cask,jgarber623/homebrew-cask,MichaelPei/homebrew-cask,pacav69/homebrew-cask,nrlquaker/homebrew-cask,blainesch/homebrew-cask,gilesdring/homebrew-cask,MerelyAPseudonym/homebrew-cask,kamilboratynski/homebrew-cask,artdevjs/homebrew-cask,n0ts/homebrew-cask,opsdev-ws/homebrew-cask,chrisfinazzo/homebrew-cask,flaviocamilo/homebrew-cask,esebastian/homebrew-cask,seanzxx/homebrew-cask,tangestani/homebrew-cask,josa42/homebrew-cask,reelsense/homebrew-cask,syscrusher/homebrew-cask,theoriginalgri/homebrew-cask,jgarber623/homebrew-cask,dvdoliveira/homebrew-cask,tolbkni/homebrew-cask,yutarody/homebrew-cask,neverfox/homebrew-cask,ianyh/homebrew-cask,gyndav/homebrew-cask,jacobbednarz/homebrew-cask,malob/homebrew-cask,zerrot/homebrew-cask,yuhki50/homebrew-cask,andyli/homebrew-cask,bdhess/homebrew-cask,xtian/homebrew-cask,kongslund/homebrew-cask,giannitm/homebrew-cask,muan/homebrew-cask,koenrh/homebrew-cask,jgarber623/homebrew-cask,dvdoliveira/homebrew-cask,elyscape/homebrew-cask,cblecker/homebrew-cask,mishari/homebrew-cask,xcezx/homebrew-cask,tangestani/homebrew-cask,timsutton/homebrew-cask,johndbritton/homebrew-cask,maxnordlund/homebrew-cask,phpwutz/homebrew-cask,bric3/homebrew-cask,sscotth/homebrew-cask,joschi/homebrew-cask,wickedsp1d3r/homebrew-cask,alebcay/homebrew-cask,farmerchris/homebrew-cask,lucasmezencio/homebrew-cask,Saklad5/homebrew-cask,sgnh/homebrew-cask,sosedoff/homebrew-cask,tjt263/homebrew-cask,JacopKane/homebrew-cask,alexg0/homebrew-cask,doits/homebrew-cask,nathanielvarona/homebrew-cask,esebastian/homebrew-cask,aguynamedryan/homebrew-cask,anbotero/homebrew-cask,mjgardner/homebrew-cask,mathbunnyru/homebrew-cask,tan9/homebrew-cask,0rax/homebrew-cask,sanyer/homebrew-cask,Bombenleger/homebrew-cask,scottsuch/homebrew-cask,cfillion/homebrew-cask,lantrix/homebrew-cask,kTitan/homebrew-cask,chadcatlett/caskroom-homebrew-cask,hanxue/caskroom,pkq/homebrew-cask,joshka/homebrew-cask,feigaochn/homebrew-cask,tedski/homebrew-cask,ebraminio/homebrew-cask,jiashuw/homebrew-cask,Bombenleger/homebrew-cask,hristozov/homebrew-cask,JacopKane/homebrew-cask,alexg0/homebrew-cask,boecko/homebrew-cask,amatos/homebrew-cask,nathancahill/homebrew-cask,coeligena/homebrew-customized,ebraminio/homebrew-cask,maxnordlund/homebrew-cask,neverfox/homebrew-cask,tangestani/homebrew-cask,claui/homebrew-cask,mrmachine/homebrew-cask,Ephemera/homebrew-cask,nshemonsky/homebrew-cask,jalaziz/homebrew-cask,perfide/homebrew-cask,okket/homebrew-cask,stonehippo/homebrew-cask,lifepillar/homebrew-cask,renard/homebrew-cask,SentinelWarren/homebrew-cask,blogabe/homebrew-cask,slack4u/homebrew-cask,theoriginalgri/homebrew-cask
|
ruby
|
## Code Before:
cask 'trailer' do
version '1.3.16'
sha256 '4004b46c1fb50aab721410ab6bb109afa4eb8cfadc42abfd3183183964654b87'
url "https://ptsochantaris.github.io/trailer/trailer#{version.no_dots}.zip"
appcast 'https://ptsochantaris.github.io/trailer/appcast.xml',
checkpoint: 'eeded65b93ba8a391c14e4b5e60187bc56c56cdbe197005ef1288236aee3bd91'
name 'Trailer'
homepage 'https://ptsochantaris.github.io/trailer/'
license :mit
app 'Trailer.app'
end
## Instruction:
Update Trailer to version 1.3.17
This commit updates the version and sha256 stanzas.
## Code After:
cask 'trailer' do
version '1.3.17'
sha256 '3c556eb1e68751818346e3468ca5d779c7f38f1ad3cd9b8d14a3baddc7deb2be'
url "https://ptsochantaris.github.io/trailer/trailer#{version.no_dots}.zip"
appcast 'https://ptsochantaris.github.io/trailer/appcast.xml',
checkpoint: 'eeded65b93ba8a391c14e4b5e60187bc56c56cdbe197005ef1288236aee3bd91'
name 'Trailer'
homepage 'https://ptsochantaris.github.io/trailer/'
license :mit
app 'Trailer.app'
end
|
ca655461571005000a46768bf808fee7beb57d82
|
appveyor.yml
|
appveyor.yml
|
init:
- git config --global core.autocrlf input
# what combinations to test
environment:
matrix:
- nodejs_version: 0.10
install:
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)
- npm install
- npm install -g bower
- bower install
build: off
test_script:
- node --version
- npm --version
- cmd: npm run-script test-windows
|
init:
- git config --global core.autocrlf input
# what combinations to test
environment:
matrix:
- nodejs_version: 0.10
install:
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)
- npm cache clean
- npm install
- npm install -g bower
- bower install
build: off
test_script:
- node --version
- npm --version
- cmd: npm run-script test-windows
|
Clean cache before npm install on windows
|
Clean cache before npm install on windows
|
YAML
|
mit
|
tracer99/steal,mcanthony/steal,stealjs/steal,mcanthony/steal,tracer99/steal,matthewbauer/steal,stealjs/steal,matthewbauer/steal
|
yaml
|
## Code Before:
init:
- git config --global core.autocrlf input
# what combinations to test
environment:
matrix:
- nodejs_version: 0.10
install:
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)
- npm install
- npm install -g bower
- bower install
build: off
test_script:
- node --version
- npm --version
- cmd: npm run-script test-windows
## Instruction:
Clean cache before npm install on windows
## Code After:
init:
- git config --global core.autocrlf input
# what combinations to test
environment:
matrix:
- nodejs_version: 0.10
install:
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)
- npm cache clean
- npm install
- npm install -g bower
- bower install
build: off
test_script:
- node --version
- npm --version
- cmd: npm run-script test-windows
|
5e44054ad4223d32b53c2312ecd5798b0e114548
|
main.js
|
main.js
|
exports.AgGridAurelia = require('./lib/agGridAurelia').AgGridAurelia;
exports.AgGridColumn = require('./lib/agGridColumn').AgGridColumn;
exports.AgCellTemplate = require('./lib/agTemplate').AgCellTemplate;
exports.AgEditorTemplate = require('./lib/agTemplate').AgEditorTemplate;
exports.AgFilterTemplate = require('./lib/agTemplate').AgFilterTemplate;
exports.AureliaCellRendererComponent = require('./lib/aureliaCellRendererComponent').AureliaCellRendererComponent;
exports.AureliaComponentFactory = require('./lib/aureliaComponentFactory').AureliaComponentFactory;
exports.AureliaFrameworkFactory = require('./lib/aureliaFrameworkFactory').AureliaFrameworkFactory;
exports.BaseAureliaEditor = require('./lib/editorViewModels').BaseAureliaEditor;
function configure(config) {
config.globalResources(
'./lib/agGridAurelia',
'./lib/agGridColumn',
'./lib/agTemplate'
);
}
exports.configure = configure;
|
exports.AgGridAurelia = require('./lib/agGridAurelia').AgGridAurelia;
exports.AgGridColumn = require('./lib/agGridColumn').AgGridColumn;
exports.AgCellTemplate = require('./lib/agTemplate').AgCellTemplate;
exports.AgEditorTemplate = require('./lib/agTemplate').AgEditorTemplate;
exports.AgFullWidthRowTemplate = require('./lib/agTemplate').AgFullWidthRowTemplate;
exports.AgFilterTemplate = require('./lib/agTemplate').AgFilterTemplate;
exports.AureliaCellRendererComponent = require('./lib/aureliaCellRendererComponent').AureliaCellRendererComponent;
exports.AureliaComponentFactory = require('./lib/aureliaComponentFactory').AureliaComponentFactory;
exports.AureliaFrameworkFactory = require('./lib/aureliaFrameworkFactory').AureliaFrameworkFactory;
exports.BaseAureliaEditor = require('./lib/editorViewModels').BaseAureliaEditor;
function configure(config) {
config.globalResources(
'./lib/agGridAurelia',
'./lib/agGridColumn',
'./lib/agTemplate'
);
}
exports.configure = configure;
|
Add FullWidth row template to exports
|
Add FullWidth row template to exports
|
JavaScript
|
mit
|
ceolter/ag-grid,ceolter/angular-grid,ceolter/angular-grid,ceolter/ag-grid
|
javascript
|
## Code Before:
exports.AgGridAurelia = require('./lib/agGridAurelia').AgGridAurelia;
exports.AgGridColumn = require('./lib/agGridColumn').AgGridColumn;
exports.AgCellTemplate = require('./lib/agTemplate').AgCellTemplate;
exports.AgEditorTemplate = require('./lib/agTemplate').AgEditorTemplate;
exports.AgFilterTemplate = require('./lib/agTemplate').AgFilterTemplate;
exports.AureliaCellRendererComponent = require('./lib/aureliaCellRendererComponent').AureliaCellRendererComponent;
exports.AureliaComponentFactory = require('./lib/aureliaComponentFactory').AureliaComponentFactory;
exports.AureliaFrameworkFactory = require('./lib/aureliaFrameworkFactory').AureliaFrameworkFactory;
exports.BaseAureliaEditor = require('./lib/editorViewModels').BaseAureliaEditor;
function configure(config) {
config.globalResources(
'./lib/agGridAurelia',
'./lib/agGridColumn',
'./lib/agTemplate'
);
}
exports.configure = configure;
## Instruction:
Add FullWidth row template to exports
## Code After:
exports.AgGridAurelia = require('./lib/agGridAurelia').AgGridAurelia;
exports.AgGridColumn = require('./lib/agGridColumn').AgGridColumn;
exports.AgCellTemplate = require('./lib/agTemplate').AgCellTemplate;
exports.AgEditorTemplate = require('./lib/agTemplate').AgEditorTemplate;
exports.AgFullWidthRowTemplate = require('./lib/agTemplate').AgFullWidthRowTemplate;
exports.AgFilterTemplate = require('./lib/agTemplate').AgFilterTemplate;
exports.AureliaCellRendererComponent = require('./lib/aureliaCellRendererComponent').AureliaCellRendererComponent;
exports.AureliaComponentFactory = require('./lib/aureliaComponentFactory').AureliaComponentFactory;
exports.AureliaFrameworkFactory = require('./lib/aureliaFrameworkFactory').AureliaFrameworkFactory;
exports.BaseAureliaEditor = require('./lib/editorViewModels').BaseAureliaEditor;
function configure(config) {
config.globalResources(
'./lib/agGridAurelia',
'./lib/agGridColumn',
'./lib/agTemplate'
);
}
exports.configure = configure;
|
15e9312625c10b488ad49f648b95796d7d6ef5f0
|
lib/run-effects.ts
|
lib/run-effects.ts
|
import { OpaqueToken, Provider } from '@angular/core';
import { flatten } from './util';
import { CONNECT_EFFECTS_PROVIDER } from './effects';
import { STATE_UPDATES_PROVIDER } from './state-updates';
export const BOOTSTRAP_EFFECTS = new OpaqueToken('@ngrx/effects Bootstrap Effects');
export function runEffects(...effects: any[]) {
const allEffects = flatten(effects).map(effect => new Provider(BOOTSTRAP_EFFECTS, {
useClass: effect,
multi: true
}));
return [
...allEffects,
CONNECT_EFFECTS_PROVIDER,
STATE_UPDATES_PROVIDER
];
}
|
import { OpaqueToken, Provider } from '@angular/core';
import { flatten } from './util';
import { CONNECT_EFFECTS_PROVIDER, BOOTSTRAP_EFFECTS } from './effects';
import { STATE_UPDATES_PROVIDER } from './state-updates';
export function runEffects(...effects: any[]) {
const allEffects = flatten(effects).map(effect => new Provider(BOOTSTRAP_EFFECTS, {
useClass: effect,
multi: true
}));
return [
...allEffects,
CONNECT_EFFECTS_PROVIDER,
STATE_UPDATES_PROVIDER
];
}
|
Fix import for bootstrap effects token
|
Fix import for bootstrap effects token
|
TypeScript
|
mit
|
ngrx/effects,ngrx/effects
|
typescript
|
## Code Before:
import { OpaqueToken, Provider } from '@angular/core';
import { flatten } from './util';
import { CONNECT_EFFECTS_PROVIDER } from './effects';
import { STATE_UPDATES_PROVIDER } from './state-updates';
export const BOOTSTRAP_EFFECTS = new OpaqueToken('@ngrx/effects Bootstrap Effects');
export function runEffects(...effects: any[]) {
const allEffects = flatten(effects).map(effect => new Provider(BOOTSTRAP_EFFECTS, {
useClass: effect,
multi: true
}));
return [
...allEffects,
CONNECT_EFFECTS_PROVIDER,
STATE_UPDATES_PROVIDER
];
}
## Instruction:
Fix import for bootstrap effects token
## Code After:
import { OpaqueToken, Provider } from '@angular/core';
import { flatten } from './util';
import { CONNECT_EFFECTS_PROVIDER, BOOTSTRAP_EFFECTS } from './effects';
import { STATE_UPDATES_PROVIDER } from './state-updates';
export function runEffects(...effects: any[]) {
const allEffects = flatten(effects).map(effect => new Provider(BOOTSTRAP_EFFECTS, {
useClass: effect,
multi: true
}));
return [
...allEffects,
CONNECT_EFFECTS_PROVIDER,
STATE_UPDATES_PROVIDER
];
}
|
ad8ce01d51fc36492094d9f11dbed4ffc81ee7e1
|
lib/domgen/imit/templates/client/schema_dagger_module.java.erb
|
lib/domgen/imit/templates/client/schema_dagger_module.java.erb
|
/* DO NOT EDIT: File is auto-generated */
package <%= to_package(repository.imit.qualified_schema_dagger_module_name) %>;
<% entities = repository.data_modules.select { |data_module| data_module.imit? }.collect{|data_module| data_module.entities.select{|entity| entity.imit? && entity.concrete?} }.flatten -%>
@javax.annotation.Generated( "Domgen" )
@dagger.Module
public final class <%= repository.imit.schema_dagger_module_name %>
{
@javax.annotation.Nonnull
@dagger.Provides
@javax.inject.Singleton
static replicant.SystemSchema provideSystemSchema( @javax.annotation.Nonnull final <%= repository.imit.qualified_gwt_client_session_context_name %> context, @javax.annotation.Nonnull final org.realityforge.replicant.client.EntityLocator entityLocator, <%= entities.collect{|e|"@javax.annotation.Nonnull final #{e.dao.arez.qualified_repository_name} #{Reality::Naming.camelize(e.qualified_name.gsub('.',''))}Repository"}.join(', ') %> )
{
return <%= repository.imit.qualified_schema_factory_name %>.createSystemSchema( context, entityLocator, <%= entities.collect{|e|"#{Reality::Naming.camelize(e.qualified_name.gsub('.',''))}Repository"}.join(', ') %> );
}
}
|
/* DO NOT EDIT: File is auto-generated */
package <%= to_package(repository.imit.qualified_schema_dagger_module_name) %>;
<% entities = repository.data_modules.select { |data_module| data_module.imit? }.collect{|data_module| data_module.entities.select{|entity| entity.imit? && entity.concrete?} }.flatten -%>
@javax.annotation.Generated( "Domgen" )
@dagger.Module
public final class <%= repository.imit.schema_dagger_module_name %>
{
private <%= repository.imit.schema_dagger_module_name %>()
{
}
@javax.annotation.Nonnull
@dagger.Provides
@javax.inject.Singleton
static replicant.SystemSchema provideSystemSchema( @javax.annotation.Nonnull final <%= repository.imit.qualified_gwt_client_session_context_name %> context, @javax.annotation.Nonnull final org.realityforge.replicant.client.EntityLocator entityLocator, <%= entities.collect{|e|"@javax.annotation.Nonnull final #{e.dao.arez.qualified_repository_name} #{Reality::Naming.camelize(e.qualified_name.gsub('.',''))}Repository"}.join(', ') %> )
{
return <%= repository.imit.qualified_schema_factory_name %>.createSystemSchema( context, entityLocator, <%= entities.collect{|e|"#{Reality::Naming.camelize(e.qualified_name.gsub('.',''))}Repository"}.join(', ') %> );
}
}
|
Add constructor to utility class
|
Add constructor to utility class
|
HTML+ERB
|
apache-2.0
|
icaughley/domgen,realityforge/domgen,icaughley/domgen,realityforge/domgen
|
html+erb
|
## Code Before:
/* DO NOT EDIT: File is auto-generated */
package <%= to_package(repository.imit.qualified_schema_dagger_module_name) %>;
<% entities = repository.data_modules.select { |data_module| data_module.imit? }.collect{|data_module| data_module.entities.select{|entity| entity.imit? && entity.concrete?} }.flatten -%>
@javax.annotation.Generated( "Domgen" )
@dagger.Module
public final class <%= repository.imit.schema_dagger_module_name %>
{
@javax.annotation.Nonnull
@dagger.Provides
@javax.inject.Singleton
static replicant.SystemSchema provideSystemSchema( @javax.annotation.Nonnull final <%= repository.imit.qualified_gwt_client_session_context_name %> context, @javax.annotation.Nonnull final org.realityforge.replicant.client.EntityLocator entityLocator, <%= entities.collect{|e|"@javax.annotation.Nonnull final #{e.dao.arez.qualified_repository_name} #{Reality::Naming.camelize(e.qualified_name.gsub('.',''))}Repository"}.join(', ') %> )
{
return <%= repository.imit.qualified_schema_factory_name %>.createSystemSchema( context, entityLocator, <%= entities.collect{|e|"#{Reality::Naming.camelize(e.qualified_name.gsub('.',''))}Repository"}.join(', ') %> );
}
}
## Instruction:
Add constructor to utility class
## Code After:
/* DO NOT EDIT: File is auto-generated */
package <%= to_package(repository.imit.qualified_schema_dagger_module_name) %>;
<% entities = repository.data_modules.select { |data_module| data_module.imit? }.collect{|data_module| data_module.entities.select{|entity| entity.imit? && entity.concrete?} }.flatten -%>
@javax.annotation.Generated( "Domgen" )
@dagger.Module
public final class <%= repository.imit.schema_dagger_module_name %>
{
private <%= repository.imit.schema_dagger_module_name %>()
{
}
@javax.annotation.Nonnull
@dagger.Provides
@javax.inject.Singleton
static replicant.SystemSchema provideSystemSchema( @javax.annotation.Nonnull final <%= repository.imit.qualified_gwt_client_session_context_name %> context, @javax.annotation.Nonnull final org.realityforge.replicant.client.EntityLocator entityLocator, <%= entities.collect{|e|"@javax.annotation.Nonnull final #{e.dao.arez.qualified_repository_name} #{Reality::Naming.camelize(e.qualified_name.gsub('.',''))}Repository"}.join(', ') %> )
{
return <%= repository.imit.qualified_schema_factory_name %>.createSystemSchema( context, entityLocator, <%= entities.collect{|e|"#{Reality::Naming.camelize(e.qualified_name.gsub('.',''))}Repository"}.join(', ') %> );
}
}
|
856b3a3dcb2a1df54236826bc4a95abf35fc23e6
|
src/Admin/Resources/views/Audit/cget.html.twig
|
src/Admin/Resources/views/Audit/cget.html.twig
|
{% extends 'VlRadRestBundle:Default:skeleton.html.twig' %}
{% block radrest_content %}
<div class="panel-heading">
<h3 class="panel-title">List</h3>
</div>
<div class="table-responsive">
{% if data|length > 0 %}
<table class="table">
<thead>
{% set keys = ['objectClass', 'objectId', 'action', 'username', 'loggedAt'] %}
<tr>
{% for name in keys %}
<th>{{ name|humanize }}</th>
{% endfor %}
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for obj in data %}
<tr>
{% for key in keys %}
<td>{{ attribute(obj, key)|radrest_object_stringify }}</td>
{% endfor %}
<td>
{% include 'VlRadRestBundle:Default:cget_links.html.twig' with {obj: obj, controller: controller } only %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>
<div class="panel-body text-center">
{{ knp_pagination_render(data, "", {"media_type": null}) }}
</div>
{% endblock %}
|
{% extends 'VlRadRestBundle:Default:skeleton.html.twig' %}
{% block radrest_content %}
<div class="panel-heading">
<h3 class="panel-title">{{ icon('heartbeat') }} Audit log</h3>
</div>
<div class="table-responsive">
{% if data|length > 0 %}
<table class="table">
<thead>
{% set keys = ['objectClass', 'objectId', 'action', 'username', 'loggedAt'] %}
<tr>
{% for name in keys %}
<th>{{ name|humanize }}</th>
{% endfor %}
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for obj in data %}
<tr>
{% for key in keys %}
<td>{{ attribute(obj, key)|radrest_object_stringify }}</td>
{% endfor %}
<td>
<div class="btn-group btn-group-sm">
<a class="btn btn-info" href="{{ url(controller.route('get'), {id: obj.id}) }}" title="View">{{ icon('eye') }} <span class="sr-only">View</span></a>
<a class="btn btn-default" href="{{ url(controller.route('target'), {id: obj.id}) }}" title="Go to target">{{ icon('link') }} <span class="sr-only">Go to target</span></a>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>
<div class="panel-body text-center">
{{ knp_pagination_render(data, "", {"media_type": null}) }}
</div>
{% endblock %}
|
Add link to target object in audit log list
|
Add link to target object in audit log list
|
Twig
|
agpl-3.0
|
vierbergenlars/authserver,vierbergenlars/authserver,vierbergenlars/authserver,vierbergenlars/authserver
|
twig
|
## Code Before:
{% extends 'VlRadRestBundle:Default:skeleton.html.twig' %}
{% block radrest_content %}
<div class="panel-heading">
<h3 class="panel-title">List</h3>
</div>
<div class="table-responsive">
{% if data|length > 0 %}
<table class="table">
<thead>
{% set keys = ['objectClass', 'objectId', 'action', 'username', 'loggedAt'] %}
<tr>
{% for name in keys %}
<th>{{ name|humanize }}</th>
{% endfor %}
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for obj in data %}
<tr>
{% for key in keys %}
<td>{{ attribute(obj, key)|radrest_object_stringify }}</td>
{% endfor %}
<td>
{% include 'VlRadRestBundle:Default:cget_links.html.twig' with {obj: obj, controller: controller } only %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>
<div class="panel-body text-center">
{{ knp_pagination_render(data, "", {"media_type": null}) }}
</div>
{% endblock %}
## Instruction:
Add link to target object in audit log list
## Code After:
{% extends 'VlRadRestBundle:Default:skeleton.html.twig' %}
{% block radrest_content %}
<div class="panel-heading">
<h3 class="panel-title">{{ icon('heartbeat') }} Audit log</h3>
</div>
<div class="table-responsive">
{% if data|length > 0 %}
<table class="table">
<thead>
{% set keys = ['objectClass', 'objectId', 'action', 'username', 'loggedAt'] %}
<tr>
{% for name in keys %}
<th>{{ name|humanize }}</th>
{% endfor %}
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for obj in data %}
<tr>
{% for key in keys %}
<td>{{ attribute(obj, key)|radrest_object_stringify }}</td>
{% endfor %}
<td>
<div class="btn-group btn-group-sm">
<a class="btn btn-info" href="{{ url(controller.route('get'), {id: obj.id}) }}" title="View">{{ icon('eye') }} <span class="sr-only">View</span></a>
<a class="btn btn-default" href="{{ url(controller.route('target'), {id: obj.id}) }}" title="Go to target">{{ icon('link') }} <span class="sr-only">Go to target</span></a>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>
<div class="panel-body text-center">
{{ knp_pagination_render(data, "", {"media_type": null}) }}
</div>
{% endblock %}
|
23b90f13750fff59bebb6f9d87346579b46b16df
|
src/main/scala/com/microsoft/partnercatalyst/fortis/spark/transforms/topic/KeywordExtractor.scala
|
src/main/scala/com/microsoft/partnercatalyst/fortis/spark/transforms/topic/KeywordExtractor.scala
|
package com.microsoft.partnercatalyst.fortis.spark.transforms.topic
import com.microsoft.partnercatalyst.fortis.spark.transforms.Tag
import org.apache.commons.collections4.trie.PatriciaTrie
import scala.collection.mutable.ListBuffer
@SerialVersionUID(100L)
class KeywordExtractor(keyWords: Seq[String]) extends Serializable {
private val wordTokenizer = """\b""".r
private val keywordTrie = new PatriciaTrie[Unit]()
private val originalCase = Map[String, String](keyWords.map(s => (s.toLowerCase, s)): _*)
originalCase.keys.foreach(keywordTrie.put(_, ()))
def extractKeywords(text: String): List[Tag] = {
def findMatches(segment: Seq[String]): Iterable[String] = {
val sb = new StringBuilder()
val result = ListBuffer[String]()
val it = segment.iterator
var prefix = ""
while (it.hasNext && !keywordTrie.prefixMap(prefix).isEmpty) {
prefix = sb.append(it.next()).mkString
if (keywordTrie.containsKey(prefix)) {
result.append(originalCase(prefix))
}
}
result
}
val tokens = wordTokenizer.split(text.toLowerCase).toSeq
tokens.tails.flatMap(findMatches(_).map(Tag(_, 1))).toList
}
}
|
package com.microsoft.partnercatalyst.fortis.spark.transforms.topic
import com.microsoft.partnercatalyst.fortis.spark.transforms.Tag
import org.apache.commons.collections4.trie.PatriciaTrie
import scala.collection.mutable.ListBuffer
@SerialVersionUID(100L)
class KeywordExtractor(keywords: Seq[String]) extends Serializable {
@transient private lazy val wordTokenizer = """\b""".r
@transient private lazy val keywordTrie = initializeTrie(keywords)
def extractKeywords(text: String): List[Tag] = {
def findMatches(segment: Seq[String]): Iterable[String] = {
val sb = new StringBuilder()
val result = ListBuffer[String]()
val it = segment.iterator
var prefix = ""
while (it.hasNext && !keywordTrie.prefixMap(prefix).isEmpty) {
prefix = sb.append(it.next()).mkString
Option(keywordTrie.get(prefix)).foreach(result.append(_))
}
result
}
val tokens = wordTokenizer.split(text.toLowerCase).toSeq
tokens.tails.flatMap(findMatches(_).map(Tag(_, 1))).toList
}
private def initializeTrie(keywords: Seq[String]): PatriciaTrie[String] = {
val trie = new PatriciaTrie[String]()
keywords.foreach(k => trie.put(k.toLowerCase, k))
trie
}
}
|
Use lazy and transient initialization in keyword extractor.
|
Use lazy and transient initialization in keyword extractor.
Specifically, only the list of search keywords is non-transient. In this way, the initialization of computable data structures used in the implementation is deferred to the worker nodes.
|
Scala
|
mit
|
CatalystCode/project-fortis-spark
|
scala
|
## Code Before:
package com.microsoft.partnercatalyst.fortis.spark.transforms.topic
import com.microsoft.partnercatalyst.fortis.spark.transforms.Tag
import org.apache.commons.collections4.trie.PatriciaTrie
import scala.collection.mutable.ListBuffer
@SerialVersionUID(100L)
class KeywordExtractor(keyWords: Seq[String]) extends Serializable {
private val wordTokenizer = """\b""".r
private val keywordTrie = new PatriciaTrie[Unit]()
private val originalCase = Map[String, String](keyWords.map(s => (s.toLowerCase, s)): _*)
originalCase.keys.foreach(keywordTrie.put(_, ()))
def extractKeywords(text: String): List[Tag] = {
def findMatches(segment: Seq[String]): Iterable[String] = {
val sb = new StringBuilder()
val result = ListBuffer[String]()
val it = segment.iterator
var prefix = ""
while (it.hasNext && !keywordTrie.prefixMap(prefix).isEmpty) {
prefix = sb.append(it.next()).mkString
if (keywordTrie.containsKey(prefix)) {
result.append(originalCase(prefix))
}
}
result
}
val tokens = wordTokenizer.split(text.toLowerCase).toSeq
tokens.tails.flatMap(findMatches(_).map(Tag(_, 1))).toList
}
}
## Instruction:
Use lazy and transient initialization in keyword extractor.
Specifically, only the list of search keywords is non-transient. In this way, the initialization of computable data structures used in the implementation is deferred to the worker nodes.
## Code After:
package com.microsoft.partnercatalyst.fortis.spark.transforms.topic
import com.microsoft.partnercatalyst.fortis.spark.transforms.Tag
import org.apache.commons.collections4.trie.PatriciaTrie
import scala.collection.mutable.ListBuffer
@SerialVersionUID(100L)
class KeywordExtractor(keywords: Seq[String]) extends Serializable {
@transient private lazy val wordTokenizer = """\b""".r
@transient private lazy val keywordTrie = initializeTrie(keywords)
def extractKeywords(text: String): List[Tag] = {
def findMatches(segment: Seq[String]): Iterable[String] = {
val sb = new StringBuilder()
val result = ListBuffer[String]()
val it = segment.iterator
var prefix = ""
while (it.hasNext && !keywordTrie.prefixMap(prefix).isEmpty) {
prefix = sb.append(it.next()).mkString
Option(keywordTrie.get(prefix)).foreach(result.append(_))
}
result
}
val tokens = wordTokenizer.split(text.toLowerCase).toSeq
tokens.tails.flatMap(findMatches(_).map(Tag(_, 1))).toList
}
private def initializeTrie(keywords: Seq[String]): PatriciaTrie[String] = {
val trie = new PatriciaTrie[String]()
keywords.foreach(k => trie.put(k.toLowerCase, k))
trie
}
}
|
d1696f9d3a1c71535cea7ea3caf253e93d8cda55
|
trello_api.mustache
|
trello_api.mustache
|
from urllib import quote_plus
{{#sections}}
from .{{module}} import {{class}}
{{/sections}}
class TrelloApi(object):
def __init__(self, apikey, token=None):
self._apikey = apikey
self._token = token
{{#sections}}
self.{{module}} = {{class}}(apikey, token)
{{/sections}}
def get_token_url(self, app_name, expires='30days', write_access=True):
return 'https://trello.com/1/authorize?key=%s&name=%s&expiration=%s&response_type=token&scope=%s' % (self._apikey, quote_plus(app_name), expires, 'read,write' if write_access else 'read')
|
from urllib import quote_plus
{{#sections}}
from .{{module}} import {{class}}
{{/sections}}
class TrelloApi(object):
def __init__(self, apikey, token=None):
self._apikey = apikey
self._token = token
{{#sections}}
self.{{module}} = {{class}}(apikey, token)
{{/sections}}
def set_token(self, token):
self._token = token
{{#sections}}
self.{{module}}._token = token
{{/sections}}
def get_token_url(self, app_name, expires='30days', write_access=True):
return 'https://trello.com/1/authorize?key=%s&name=%s&expiration=%s&response_type=token&scope=%s' % (self._apikey, quote_plus(app_name), expires, 'read,write' if write_access else 'read')
|
Add a set_token method to the main api for passing a new token along to all of the various apis.
|
Add a set_token method to the main api for passing a new token along to all of the various apis.
|
HTML+Django
|
bsd-2-clause
|
samukasmk/TrelloPy,samukasmk/TrelloPy,samukasmk/TrelloPy
|
html+django
|
## Code Before:
from urllib import quote_plus
{{#sections}}
from .{{module}} import {{class}}
{{/sections}}
class TrelloApi(object):
def __init__(self, apikey, token=None):
self._apikey = apikey
self._token = token
{{#sections}}
self.{{module}} = {{class}}(apikey, token)
{{/sections}}
def get_token_url(self, app_name, expires='30days', write_access=True):
return 'https://trello.com/1/authorize?key=%s&name=%s&expiration=%s&response_type=token&scope=%s' % (self._apikey, quote_plus(app_name), expires, 'read,write' if write_access else 'read')
## Instruction:
Add a set_token method to the main api for passing a new token along to all of the various apis.
## Code After:
from urllib import quote_plus
{{#sections}}
from .{{module}} import {{class}}
{{/sections}}
class TrelloApi(object):
def __init__(self, apikey, token=None):
self._apikey = apikey
self._token = token
{{#sections}}
self.{{module}} = {{class}}(apikey, token)
{{/sections}}
def set_token(self, token):
self._token = token
{{#sections}}
self.{{module}}._token = token
{{/sections}}
def get_token_url(self, app_name, expires='30days', write_access=True):
return 'https://trello.com/1/authorize?key=%s&name=%s&expiration=%s&response_type=token&scope=%s' % (self._apikey, quote_plus(app_name), expires, 'read,write' if write_access else 'read')
|
a7e98012122c3ebfc0bce354c3ccc2e0a156a4cc
|
lib/viget/deployment/common.rb
|
lib/viget/deployment/common.rb
|
module Viget
module Deployment
def self.root_path
Pathname.new(File.expand_path(File.dirname(__FILE__))).join('..', '..', '..')
end
def self.recipes_path
root_path.join('lib', 'viget', 'deployment')
end
end
end
def run_rake_task(command, options = {})
options[:remote] ||= true
if options[:remote]
escaped_release = latest_release.to_s.shellescape
run "cd #{escaped_release} && #{fetch(:rake_environment)} #{fetch(:rake)} #{command}"
else
system "bundle exec rake #{command}"
end
end
require 'capistrano/ext/multistage'
require 'bundler/capistrano'
require 'viget/deployment/shared/slack_notification'
require 'viget/deployment/shared/maintenance'
|
module Viget
module Deployment
def self.root_path
Pathname.new(File.expand_path(File.dirname(__FILE__))).join('..', '..', '..')
end
def self.recipes_path
root_path.join('lib', 'viget', 'deployment')
end
end
end
def run_rake_task(command, options = {})
options[:remote] = true unless options.has_key?(:remote)
if options[:remote]
escaped_release = latest_release.to_s.shellescape
run "cd #{escaped_release} && #{fetch(:rake_environment)} #{fetch(:rake)} #{command}"
else
system "bundle exec rake #{command}"
end
end
require 'capistrano/ext/multistage'
require 'bundler/capistrano'
require 'viget/deployment/shared/slack_notification'
require 'viget/deployment/shared/maintenance'
|
Fix issue with conditional assignment in hash
|
Fix issue with conditional assignment in hash
the `run_rake_task` method was intended to allow running
rake either locally or remotely with the same interface,
but the way the default assignment worked it would always
set the value for the `:remote` option to `true`. This
fixes that issue.
|
Ruby
|
mit
|
vigetlabs/viget-deployment,vigetlabs/viget-deployment
|
ruby
|
## Code Before:
module Viget
module Deployment
def self.root_path
Pathname.new(File.expand_path(File.dirname(__FILE__))).join('..', '..', '..')
end
def self.recipes_path
root_path.join('lib', 'viget', 'deployment')
end
end
end
def run_rake_task(command, options = {})
options[:remote] ||= true
if options[:remote]
escaped_release = latest_release.to_s.shellescape
run "cd #{escaped_release} && #{fetch(:rake_environment)} #{fetch(:rake)} #{command}"
else
system "bundle exec rake #{command}"
end
end
require 'capistrano/ext/multistage'
require 'bundler/capistrano'
require 'viget/deployment/shared/slack_notification'
require 'viget/deployment/shared/maintenance'
## Instruction:
Fix issue with conditional assignment in hash
the `run_rake_task` method was intended to allow running
rake either locally or remotely with the same interface,
but the way the default assignment worked it would always
set the value for the `:remote` option to `true`. This
fixes that issue.
## Code After:
module Viget
module Deployment
def self.root_path
Pathname.new(File.expand_path(File.dirname(__FILE__))).join('..', '..', '..')
end
def self.recipes_path
root_path.join('lib', 'viget', 'deployment')
end
end
end
def run_rake_task(command, options = {})
options[:remote] = true unless options.has_key?(:remote)
if options[:remote]
escaped_release = latest_release.to_s.shellescape
run "cd #{escaped_release} && #{fetch(:rake_environment)} #{fetch(:rake)} #{command}"
else
system "bundle exec rake #{command}"
end
end
require 'capistrano/ext/multistage'
require 'bundler/capistrano'
require 'viget/deployment/shared/slack_notification'
require 'viget/deployment/shared/maintenance'
|
78da7a40db1fa24b40d0937aeab8dc4f7fc19cac
|
Comfortable_layout_for_Kindle_content_manager.user.css
|
Comfortable_layout_for_Kindle_content_manager.user.css
|
/* Comfortable layout for Kindle content manager */
@namespace url("http://www.w3.org/1999/xhtml");
@-moz-document
url-prefix("https://www.amazon.co.jp/hz/mycd/myx"),
url-prefix("https://www.amazon.co.jp/mn/dcw/myx")
{
/* Add more height to "List of collection" box in "Add to collection" screen */
.bulkAddToCollectionDialog_myx .myx-lgtbox-collection-vertical-scroll.recentCollection_myx {
height: 35vh !important;
}
/* Enlarge the count of contents */
.contentCount_myx {
font: 1.2rem/2 sans-serif !important;
word-spacing: 0.5em !important;
}
.contentCount_myx b {
padding-right: 0.2em !important;
}
/* Avoid text wrap on table header */
div[list-view-header-dmyx] .myx-column {
white-space: nowrap !important;
font-size: 12px !important;
}
}
|
/* Comfortable layout for Kindle content manager */
@namespace url("http://www.w3.org/1999/xhtml");
@-moz-document
url-prefix("https://www.amazon.co.jp/hz/mycd/myx"),
url-prefix("https://www.amazon.co.jp/mn/dcw/myx")
{
/* Add more height to "List of collection" box in "Add to collection" screen */
.bulkAddToCollectionDialog_myx .myx-lgtbox-collection-vertical-scroll.recentCollection_myx {
height: 35vh !important;
}
/* Enlarge the count of contents */
.contentCount_myx {
font: 1.2rem/2 sans-serif !important;
word-spacing: 0.5em !important;
}
.contentCount_myx b {
padding-right: 0.2em !important;
}
/* Avoid text wrap on table header */
div[list-view-header-dmyx] .myx-column {
color: #faa !important;
white-space: nowrap !important;
overflow-x: hidden !important;
text-overflow: ellipsis !important;
}
}
|
Improve visibility of header line
|
Improve visibility of header line
|
CSS
|
unlicense
|
curipha/userstyles
|
css
|
## Code Before:
/* Comfortable layout for Kindle content manager */
@namespace url("http://www.w3.org/1999/xhtml");
@-moz-document
url-prefix("https://www.amazon.co.jp/hz/mycd/myx"),
url-prefix("https://www.amazon.co.jp/mn/dcw/myx")
{
/* Add more height to "List of collection" box in "Add to collection" screen */
.bulkAddToCollectionDialog_myx .myx-lgtbox-collection-vertical-scroll.recentCollection_myx {
height: 35vh !important;
}
/* Enlarge the count of contents */
.contentCount_myx {
font: 1.2rem/2 sans-serif !important;
word-spacing: 0.5em !important;
}
.contentCount_myx b {
padding-right: 0.2em !important;
}
/* Avoid text wrap on table header */
div[list-view-header-dmyx] .myx-column {
white-space: nowrap !important;
font-size: 12px !important;
}
}
## Instruction:
Improve visibility of header line
## Code After:
/* Comfortable layout for Kindle content manager */
@namespace url("http://www.w3.org/1999/xhtml");
@-moz-document
url-prefix("https://www.amazon.co.jp/hz/mycd/myx"),
url-prefix("https://www.amazon.co.jp/mn/dcw/myx")
{
/* Add more height to "List of collection" box in "Add to collection" screen */
.bulkAddToCollectionDialog_myx .myx-lgtbox-collection-vertical-scroll.recentCollection_myx {
height: 35vh !important;
}
/* Enlarge the count of contents */
.contentCount_myx {
font: 1.2rem/2 sans-serif !important;
word-spacing: 0.5em !important;
}
.contentCount_myx b {
padding-right: 0.2em !important;
}
/* Avoid text wrap on table header */
div[list-view-header-dmyx] .myx-column {
color: #faa !important;
white-space: nowrap !important;
overflow-x: hidden !important;
text-overflow: ellipsis !important;
}
}
|
a73b9f5e25e17d1b43e85776b9b5d09e4da237e6
|
src/components/dialog/index.vue
|
src/components/dialog/index.vue
|
<template>
<div class="weui_dialog_alert" v-show="show" :transition="maskTransition" @touchmove="!this.scroll && $event.preventDefault()">
<div class="weui_mask" @click="hideOnBlur && (show = false)"></div>
<div class="weui_dialog" v-show="show" :transition="dialogTransition">
<slot></slot>
</div>
</div>
</template>
<script>
export default {
props: {
show: {
type: Boolean,
default: false
},
maskTransition: {
type: String,
default: 'vux-fade'
},
dialogTransition: {
type: String,
default: 'vux-dialog'
},
hideOnBlur: Boolean,
scroll: {
type: Boolean,
default: true
}
},
watch: {
show (val) {
this.$emit(val ? 'on-show' : 'on-hide')
}
}
}
</script>
<style lang="less">
@import '../../styles/transition.less';
@import '../../styles/weui/widget/weui_tips/weui_mask';
@import '../../styles/weui/widget/weui_tips/weui_dialog';
</style>
|
<template>
<div class="weui_dialog_alert" @touchmove="!this.scroll && $event.preventDefault()">
<div class="weui_mask" @click="hideOnBlur && (show = false)" v-show="show" :transition="maskTransition"></div>
<div class="weui_dialog" v-show="show" :transition="dialogTransition">
<slot></slot>
</div>
</div>
</template>
<script>
export default {
props: {
show: {
type: Boolean,
default: false
},
maskTransition: {
type: String,
default: 'vux-fade'
},
dialogTransition: {
type: String,
default: 'vux-dialog'
},
hideOnBlur: Boolean,
scroll: {
type: Boolean,
default: true
}
},
watch: {
show (val) {
this.$emit(val ? 'on-show' : 'on-hide')
}
}
}
</script>
<style lang="less">
@import '../../styles/transition.less';
@import '../../styles/weui/widget/weui_tips/weui_mask';
@import '../../styles/weui/widget/weui_tips/weui_dialog';
</style>
|
Set transition to mask element to avoid blink problem
|
Dialog: Set transition to mask element to avoid blink problem
|
Vue
|
mit
|
huixt/hxvux,airyland/vux,greedying/vux,greedying/vux,huixt/hxvux,szgxwj/vux,greedying/vux,airyland/vux,huixt/hxvux,szgxwj/vux,airyland/vux,szgxwj/vux
|
vue
|
## Code Before:
<template>
<div class="weui_dialog_alert" v-show="show" :transition="maskTransition" @touchmove="!this.scroll && $event.preventDefault()">
<div class="weui_mask" @click="hideOnBlur && (show = false)"></div>
<div class="weui_dialog" v-show="show" :transition="dialogTransition">
<slot></slot>
</div>
</div>
</template>
<script>
export default {
props: {
show: {
type: Boolean,
default: false
},
maskTransition: {
type: String,
default: 'vux-fade'
},
dialogTransition: {
type: String,
default: 'vux-dialog'
},
hideOnBlur: Boolean,
scroll: {
type: Boolean,
default: true
}
},
watch: {
show (val) {
this.$emit(val ? 'on-show' : 'on-hide')
}
}
}
</script>
<style lang="less">
@import '../../styles/transition.less';
@import '../../styles/weui/widget/weui_tips/weui_mask';
@import '../../styles/weui/widget/weui_tips/weui_dialog';
</style>
## Instruction:
Dialog: Set transition to mask element to avoid blink problem
## Code After:
<template>
<div class="weui_dialog_alert" @touchmove="!this.scroll && $event.preventDefault()">
<div class="weui_mask" @click="hideOnBlur && (show = false)" v-show="show" :transition="maskTransition"></div>
<div class="weui_dialog" v-show="show" :transition="dialogTransition">
<slot></slot>
</div>
</div>
</template>
<script>
export default {
props: {
show: {
type: Boolean,
default: false
},
maskTransition: {
type: String,
default: 'vux-fade'
},
dialogTransition: {
type: String,
default: 'vux-dialog'
},
hideOnBlur: Boolean,
scroll: {
type: Boolean,
default: true
}
},
watch: {
show (val) {
this.$emit(val ? 'on-show' : 'on-hide')
}
}
}
</script>
<style lang="less">
@import '../../styles/transition.less';
@import '../../styles/weui/widget/weui_tips/weui_mask';
@import '../../styles/weui/widget/weui_tips/weui_dialog';
</style>
|
e90f024918679be549709ce47f2d54b9ba51829f
|
lib/shipit/webhooks.rb
|
lib/shipit/webhooks.rb
|
require 'shipit/webhooks/handlers'
module Shipit
module Webhooks
def self.default_handlers
{
'push' => [Handlers::PushHandler],
'status' => [Handlers::StatusHandler],
'membership' => [Handlers::MembershipHandler],
'check_suite' => [Handlers::CheckSuiteHandler],
}
end
def self.handlers
@handlers ||= reset_handler_registry
end
def self.reset_handler_registry
@handlers = default_handlers
end
def self.register_handler(event, callable = nil, &block)
handlers[event] ||= []
handlers[event] << callable if callable
handlers[event] << block if block_given?
end
def self.for_event(event)
handlers.fetch(event) { [] }
end
end
end
|
require 'shipit/webhooks/handlers'
module Shipit
module Webhooks
class << self
def default_handlers
{
'push' => [Handlers::PushHandler],
'status' => [Handlers::StatusHandler],
'membership' => [Handlers::MembershipHandler],
'check_suite' => [Handlers::CheckSuiteHandler],
}
end
def handlers
@handlers ||= reset_handler_registry
end
def reset_handler_registry
@handlers = default_handlers
end
def register_handler(event, callable = nil, &block)
handlers[event] ||= []
handlers[event] << callable if callable
handlers[event] << block if block_given?
end
def for_event(event)
handlers.fetch(event) { [] }
end
end
end
end
|
Define webhook class methods by opening the singleton class
|
Define webhook class methods by opening the singleton class
|
Ruby
|
mit
|
Shopify/shipit-engine,Shopify/shipit-engine,Shopify/shipit-engine,Shopify/shipit-engine,Shopify/shipit-engine
|
ruby
|
## Code Before:
require 'shipit/webhooks/handlers'
module Shipit
module Webhooks
def self.default_handlers
{
'push' => [Handlers::PushHandler],
'status' => [Handlers::StatusHandler],
'membership' => [Handlers::MembershipHandler],
'check_suite' => [Handlers::CheckSuiteHandler],
}
end
def self.handlers
@handlers ||= reset_handler_registry
end
def self.reset_handler_registry
@handlers = default_handlers
end
def self.register_handler(event, callable = nil, &block)
handlers[event] ||= []
handlers[event] << callable if callable
handlers[event] << block if block_given?
end
def self.for_event(event)
handlers.fetch(event) { [] }
end
end
end
## Instruction:
Define webhook class methods by opening the singleton class
## Code After:
require 'shipit/webhooks/handlers'
module Shipit
module Webhooks
class << self
def default_handlers
{
'push' => [Handlers::PushHandler],
'status' => [Handlers::StatusHandler],
'membership' => [Handlers::MembershipHandler],
'check_suite' => [Handlers::CheckSuiteHandler],
}
end
def handlers
@handlers ||= reset_handler_registry
end
def reset_handler_registry
@handlers = default_handlers
end
def register_handler(event, callable = nil, &block)
handlers[event] ||= []
handlers[event] << callable if callable
handlers[event] << block if block_given?
end
def for_event(event)
handlers.fetch(event) { [] }
end
end
end
end
|
6c7e456784f0ed7372e0b667f5d04dcdd6fe1af3
|
lib/shell/plugins/base16/interactive.zsh
|
lib/shell/plugins/base16/interactive.zsh
|
BASE16_SHELL="$HOME/.config/dotfiles/shell/vendor/base16-shell/"
[ -n "$PS1" ] && [ -s "$BASE16_SHELL/profile_helper.sh" ] && eval "$("$BASE16_SHELL"/profile_helper.sh)"
if [[ -z "$SSH_CONNECTION" ]]; then
base16_solarized-dark
fi
|
if [[ "$BASE16_THEME" == "base16-*" ]]; then
export BASE16_THEME="$(echo "$BASE16_THEME" | grep --extended-regexp --only '^base16-(.*)$')"
fi
BASE16_SHELL="$HOME/.config/dotfiles/shell/vendor/base16-shell/"
[ -n "$PS1" ] && [ -s "$BASE16_SHELL/profile_helper.sh" ] && eval "$("$BASE16_SHELL"/profile_helper.sh)"
if [[ -z "$SSH_CONNECTION" ]]; then
base16_solarized-dark
fi
|
Fix BASE16_THEME in a nested shell
|
shell: Fix BASE16_THEME in a nested shell
Base16 expects BASE16_THEME to not include a 'base16-' prefix, however,
it then resets it to prepend that, so when running a nested subshell
without explicitly setting the theme, we must remove the prefix. For
simplicity, always remove the prefix when starting a shell.
|
Shell
|
mit
|
amarshall/dotfiles,amarshall/dotfiles,amarshall/dotfiles,amarshall/dotfiles
|
shell
|
## Code Before:
BASE16_SHELL="$HOME/.config/dotfiles/shell/vendor/base16-shell/"
[ -n "$PS1" ] && [ -s "$BASE16_SHELL/profile_helper.sh" ] && eval "$("$BASE16_SHELL"/profile_helper.sh)"
if [[ -z "$SSH_CONNECTION" ]]; then
base16_solarized-dark
fi
## Instruction:
shell: Fix BASE16_THEME in a nested shell
Base16 expects BASE16_THEME to not include a 'base16-' prefix, however,
it then resets it to prepend that, so when running a nested subshell
without explicitly setting the theme, we must remove the prefix. For
simplicity, always remove the prefix when starting a shell.
## Code After:
if [[ "$BASE16_THEME" == "base16-*" ]]; then
export BASE16_THEME="$(echo "$BASE16_THEME" | grep --extended-regexp --only '^base16-(.*)$')"
fi
BASE16_SHELL="$HOME/.config/dotfiles/shell/vendor/base16-shell/"
[ -n "$PS1" ] && [ -s "$BASE16_SHELL/profile_helper.sh" ] && eval "$("$BASE16_SHELL"/profile_helper.sh)"
if [[ -z "$SSH_CONNECTION" ]]; then
base16_solarized-dark
fi
|
fb2dfa3e3d5c29189c65d598867f709a76817bf6
|
.eslintrc.json
|
.eslintrc.json
|
{
"extends": ["eslint:recommended"],
"plugins": [
"jest"
],
"parserOptions": {
"ecmaVersion": 8
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
},
"globals": {},
"rules": {
"no-console": "off",
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"comma-dangle": ["error", "always-multiline"],
"no-extra-semi": "error",
"semi": ["error", "never"],
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/valid-expect": "error"
}
}
|
{
"extends": ["eslint:recommended"],
"plugins": [
"jest"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 8
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
},
"globals": {},
"rules": {
"no-console": "off",
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"comma-dangle": ["error", "always-multiline"],
"no-extra-semi": "error",
"semi": ["error", "never"],
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/valid-expect": "error"
}
}
|
Use babel-eslint as a parser
|
Use babel-eslint as a parser
|
JSON
|
mit
|
ohbarye/review-waiting-list-bot
|
json
|
## Code Before:
{
"extends": ["eslint:recommended"],
"plugins": [
"jest"
],
"parserOptions": {
"ecmaVersion": 8
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
},
"globals": {},
"rules": {
"no-console": "off",
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"comma-dangle": ["error", "always-multiline"],
"no-extra-semi": "error",
"semi": ["error", "never"],
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/valid-expect": "error"
}
}
## Instruction:
Use babel-eslint as a parser
## Code After:
{
"extends": ["eslint:recommended"],
"plugins": [
"jest"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 8
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
},
"globals": {},
"rules": {
"no-console": "off",
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"comma-dangle": ["error", "always-multiline"],
"no-extra-semi": "error",
"semi": ["error", "never"],
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/valid-expect": "error"
}
}
|
1fe58ec8c530df5d791fc77179803def877dfa80
|
_config.yml
|
_config.yml
|
markdown: redcarpet
highlighter: pygments
# Permalinks
permalink: pretty
relative_permalinks: true
# Setup
title: Samy Duc
tagline: 'French Nerd'
description: 'Follow <a href="https://twitter.com/ricklesauceur" target="_blank">@ricklesauceur</a>.'
url:
baseurl: /
author:
name: 'Samy Duc'
url: https://twitter.com/ricklesauceur
paginate: 1
# Custom vars
version: 0.0.1
github:
repo: https://github.com/ricklesauceur
|
markdown: redcarpet
highlighter: pygments
# Permalinks
permalink: pretty
relative_permalinks: true
# Setup
title: Samy Duc
tagline: 'French, GameDev and hacker. Full time dreamer'
description: 'Follow <a href="https://twitter.com/ricklesauceur" target="_blank">@ricklesauceur</a>.'
url:
baseurl: /
author:
name: 'Samy Duc'
url: https://twitter.com/ricklesauceur
paginate: 1
# Custom vars
version: 0.0.1
github:
repo: https://github.com/ricklesauceur
gems:
- jekyll-sitemap
|
Add sitemap and change headline
|
Add sitemap and change headline
|
YAML
|
mit
|
ricklesauceur/ricklesauceur.github.io,ricklesauceur/ricklesauceur.github.io
|
yaml
|
## Code Before:
markdown: redcarpet
highlighter: pygments
# Permalinks
permalink: pretty
relative_permalinks: true
# Setup
title: Samy Duc
tagline: 'French Nerd'
description: 'Follow <a href="https://twitter.com/ricklesauceur" target="_blank">@ricklesauceur</a>.'
url:
baseurl: /
author:
name: 'Samy Duc'
url: https://twitter.com/ricklesauceur
paginate: 1
# Custom vars
version: 0.0.1
github:
repo: https://github.com/ricklesauceur
## Instruction:
Add sitemap and change headline
## Code After:
markdown: redcarpet
highlighter: pygments
# Permalinks
permalink: pretty
relative_permalinks: true
# Setup
title: Samy Duc
tagline: 'French, GameDev and hacker. Full time dreamer'
description: 'Follow <a href="https://twitter.com/ricklesauceur" target="_blank">@ricklesauceur</a>.'
url:
baseurl: /
author:
name: 'Samy Duc'
url: https://twitter.com/ricklesauceur
paginate: 1
# Custom vars
version: 0.0.1
github:
repo: https://github.com/ricklesauceur
gems:
- jekyll-sitemap
|
872b8636fe5a1aa5eb38505249edc9fd13dcb70c
|
test_buffer.go
|
test_buffer.go
|
package main
import (
"testing"
)
func TestPacketAdd(t *testing.T) {
pq := PacketQueue{}
if pq.Length() != 0 {
t.Errorf("Length should be 0 but was %d", pq.Length())
}
i, err := pq.Add([]byte{1,2,3,4,5})
if err != nil {
t.Error(err)
}
if i != 0 {
t.Errorf("Serial no. should be 0 but was %d", i)
}
if pq.Length() != 1 {
t.Errorf("Length should be 1 but was %d", pq.Length())
}
i, err = pq.Add([]byte{6, 7, 8, 9, 0})
if err != nil {
t.Error(err)
}
if pq.Length() != 2 {
t.Errorf("Length should be 2 but was %d", pq.Length())
}
}
|
package main
import (
"testing"
)
func TestPacketAdd(t *testing.T) {
pq := PacketQueue{}
if pq.Length() != 0 {
t.Errorf("Length should be 0 but was %d", pq.Length())
}
i, err := pq.Add([]byte{1,2,3,4,5})
if err != nil {
t.Error(err)
}
if i != 0 {
t.Errorf("Serial no. should be 0 but was %d", i)
}
if pq.Length() != 1 {
t.Errorf("Length should be 1 but was %d", pq.Length())
}
i, err = pq.Add([]byte{6, 7, 8, 9, 0})
if err != nil {
t.Error(err)
}
if pq.Length() != 2 {
t.Errorf("Length should be 2 but was %d", pq.Length())
}
}
func TestQueueCapacity(t *testing.T) {
pq := PacketQueue{}
for i := 0; i < PACKET_BUFFER_SIZE; i++ {
serial, err := pq.Add([]byte{0, 0, byte(i)})
if err != nil {
t.Error(err)
}
if serial != uint64(i) {
t.Errorf("Serial %d did not match %d", serial, i)
}
}
_, err := pq.Add([]byte{0})
if err == nil {
t.Errorf("Queue did not error when adding past capacity")
}
const trimNum uint64 = 5
pq.TrimUpTo(trimNum)
for i := 0; uint64(i) < trimNum; i++ {
serial, err := pq.Add([]byte{1, byte(i)})
if err != nil {
t.Error(err)
}
if serial != uint64(PACKET_BUFFER_SIZE + i) {
t.Errorf("Serial %d did not match %d", serial, i)
}
}
_, err = pq.Add([]byte{0})
if err == nil {
t.Errorf("Queue did not error when adding past capacity")
}
}
|
Add some more queue tests
|
Add some more queue tests
|
Go
|
agpl-3.0
|
erjiang/tuntuntun,erjiang/tuntuntun,erjiang/tuntuntun,erjiang/tuntuntun
|
go
|
## Code Before:
package main
import (
"testing"
)
func TestPacketAdd(t *testing.T) {
pq := PacketQueue{}
if pq.Length() != 0 {
t.Errorf("Length should be 0 but was %d", pq.Length())
}
i, err := pq.Add([]byte{1,2,3,4,5})
if err != nil {
t.Error(err)
}
if i != 0 {
t.Errorf("Serial no. should be 0 but was %d", i)
}
if pq.Length() != 1 {
t.Errorf("Length should be 1 but was %d", pq.Length())
}
i, err = pq.Add([]byte{6, 7, 8, 9, 0})
if err != nil {
t.Error(err)
}
if pq.Length() != 2 {
t.Errorf("Length should be 2 but was %d", pq.Length())
}
}
## Instruction:
Add some more queue tests
## Code After:
package main
import (
"testing"
)
func TestPacketAdd(t *testing.T) {
pq := PacketQueue{}
if pq.Length() != 0 {
t.Errorf("Length should be 0 but was %d", pq.Length())
}
i, err := pq.Add([]byte{1,2,3,4,5})
if err != nil {
t.Error(err)
}
if i != 0 {
t.Errorf("Serial no. should be 0 but was %d", i)
}
if pq.Length() != 1 {
t.Errorf("Length should be 1 but was %d", pq.Length())
}
i, err = pq.Add([]byte{6, 7, 8, 9, 0})
if err != nil {
t.Error(err)
}
if pq.Length() != 2 {
t.Errorf("Length should be 2 but was %d", pq.Length())
}
}
func TestQueueCapacity(t *testing.T) {
pq := PacketQueue{}
for i := 0; i < PACKET_BUFFER_SIZE; i++ {
serial, err := pq.Add([]byte{0, 0, byte(i)})
if err != nil {
t.Error(err)
}
if serial != uint64(i) {
t.Errorf("Serial %d did not match %d", serial, i)
}
}
_, err := pq.Add([]byte{0})
if err == nil {
t.Errorf("Queue did not error when adding past capacity")
}
const trimNum uint64 = 5
pq.TrimUpTo(trimNum)
for i := 0; uint64(i) < trimNum; i++ {
serial, err := pq.Add([]byte{1, byte(i)})
if err != nil {
t.Error(err)
}
if serial != uint64(PACKET_BUFFER_SIZE + i) {
t.Errorf("Serial %d did not match %d", serial, i)
}
}
_, err = pq.Add([]byte{0})
if err == nil {
t.Errorf("Queue did not error when adding past capacity")
}
}
|
a47ca3490feb7154be20033a8e01c9933a72d87c
|
config.default.js
|
config.default.js
|
/**
* 全局配置
* 部署到服务端时,请去掉文件名中的default
* 并将以下参数配置完整,重要信息请妥善保管
*/
var config = {
// port
port: process.env.PORT || '3000',
// mongodb
mongodb:
'mongodb://mongodb-master:27017,mongodb-slave1:27017,mongodb-slave2:27017/wehpu?replicaSet=wehpu',
// 小程序ID 需妥善保管!
appId: '',
// 小程序密钥 需妥善保管!
appSecret: '',
// code换取session_key接口
jscode2session: 'https://api.weixin.qq.com/sns/jscode2session',
// json web token 需妥善保管!
jwtSecret: ''
};
module.exports = config;
|
/**
* 全局配置
* 部署到服务端时,请去掉文件名中的default
* 并将以下参数配置完整,重要信息请妥善保管
*/
var config = {
// port
port: process.env.PORT || '3000',
// mongodb
mongodb:
'mongodb://mongodb-master:27017,mongodb-slave1:27017,mongodb-slave2:27017/wehpu?replicaSet=wehpu',
// 小程序ID 需妥善保管!
appId: '',
// 小程序密钥 需妥善保管!
appSecret: '',
// code换取session_key接口
jscode2session: 'https://api.weixin.qq.com/sns/jscode2session',
// json web token 需妥善保管!
jwtSecret: '',
// 通用加密算法 需妥善保管!
commonAlgorithm: '',
// 通用密钥 需妥善保管!
commonSecret: '',
};
module.exports = config;
|
Add crypto module for pass
|
Add crypto module for pass
|
JavaScript
|
mit
|
hpufe/wehpu-engine,hpufe/wehpu-engine,hpufe/wehpu-engine
|
javascript
|
## Code Before:
/**
* 全局配置
* 部署到服务端时,请去掉文件名中的default
* 并将以下参数配置完整,重要信息请妥善保管
*/
var config = {
// port
port: process.env.PORT || '3000',
// mongodb
mongodb:
'mongodb://mongodb-master:27017,mongodb-slave1:27017,mongodb-slave2:27017/wehpu?replicaSet=wehpu',
// 小程序ID 需妥善保管!
appId: '',
// 小程序密钥 需妥善保管!
appSecret: '',
// code换取session_key接口
jscode2session: 'https://api.weixin.qq.com/sns/jscode2session',
// json web token 需妥善保管!
jwtSecret: ''
};
module.exports = config;
## Instruction:
Add crypto module for pass
## Code After:
/**
* 全局配置
* 部署到服务端时,请去掉文件名中的default
* 并将以下参数配置完整,重要信息请妥善保管
*/
var config = {
// port
port: process.env.PORT || '3000',
// mongodb
mongodb:
'mongodb://mongodb-master:27017,mongodb-slave1:27017,mongodb-slave2:27017/wehpu?replicaSet=wehpu',
// 小程序ID 需妥善保管!
appId: '',
// 小程序密钥 需妥善保管!
appSecret: '',
// code换取session_key接口
jscode2session: 'https://api.weixin.qq.com/sns/jscode2session',
// json web token 需妥善保管!
jwtSecret: '',
// 通用加密算法 需妥善保管!
commonAlgorithm: '',
// 通用密钥 需妥善保管!
commonSecret: '',
};
module.exports = config;
|
cfc91ed7fb5c9b6f9c724e4debdaf01f463baada
|
docs/accessing_etcd.md
|
docs/accessing_etcd.md
|
In order to access localkube resources from inside a pod, localkube's host ip address must be used. This can be obtained by running:
```shell
$ minikube ssh -- "sudo /usr/local/bin/localkube --host-ip"
localkube host ip: 10.0.2.15
```
You can use the host-ip:`10.0.2.15` to access localkube's resources, for example its etcd cluster. In order to access etcd from within a pod, you can run the following command inside:
```shell
curl -L -X PUT http://10.0.2.15:2379/v2/keys/message -d value="Hello"
```
|
In order to access localkube resources from inside a pod, localkube's host ip address must be used. This can be obtained by running:
```shell
$ minikube ssh -- "sudo /usr/local/bin/localkube --host-ip"
localkube host ip: 10.0.2.15
```
You can use the host-ip:`10.0.2.15` to access localkube's resources, for example its etcd cluster. In order to access etcd from within a pod, you can run the following command inside:
```shell
curl -L -X PUT http://10.0.2.15:2379/v2/keys/message -d value="Hello"
```
## Accessing Host Resources From Inside A Pod
In order to access host resources from inside a pod, IP address `192.168.99.1` must be used.
|
Add documentation on accessing host resources
|
Add documentation on accessing host resources
|
Markdown
|
apache-2.0
|
kubernetes/minikube,kubernetes/minikube,dims/minikube,warmchang/minikube,dalehamel/minikube,dims/minikube,dalehamel/minikube,dlorenc/minikube,dlorenc/minikube,kubernetes/minikube,r2d4/minikube,warmchang/minikube,kubernetes/minikube,dlorenc/minikube,dlorenc/minikube,warmchang/minikube,dims/minikube,warmchang/minikube,kubernetes/minikube,dlorenc/minikube,r2d4/minikube,aaron-prindle/minikube,dlorenc/minikube,warmchang/minikube,dlorenc/minikube,kubernetes/minikube,dlorenc/minikube,aaron-prindle/minikube,kubernetes/minikube,aaron-prindle/minikube,r2d4/minikube,dalehamel/minikube,warmchang/minikube,warmchang/minikube
|
markdown
|
## Code Before:
In order to access localkube resources from inside a pod, localkube's host ip address must be used. This can be obtained by running:
```shell
$ minikube ssh -- "sudo /usr/local/bin/localkube --host-ip"
localkube host ip: 10.0.2.15
```
You can use the host-ip:`10.0.2.15` to access localkube's resources, for example its etcd cluster. In order to access etcd from within a pod, you can run the following command inside:
```shell
curl -L -X PUT http://10.0.2.15:2379/v2/keys/message -d value="Hello"
```
## Instruction:
Add documentation on accessing host resources
## Code After:
In order to access localkube resources from inside a pod, localkube's host ip address must be used. This can be obtained by running:
```shell
$ minikube ssh -- "sudo /usr/local/bin/localkube --host-ip"
localkube host ip: 10.0.2.15
```
You can use the host-ip:`10.0.2.15` to access localkube's resources, for example its etcd cluster. In order to access etcd from within a pod, you can run the following command inside:
```shell
curl -L -X PUT http://10.0.2.15:2379/v2/keys/message -d value="Hello"
```
## Accessing Host Resources From Inside A Pod
In order to access host resources from inside a pod, IP address `192.168.99.1` must be used.
|
e94a79c0714c0a6254af7b872fb7f0b4d0588800
|
Components/Queues/Drivers/SyncQueueDriverInterface.php
|
Components/Queues/Drivers/SyncQueueDriverInterface.php
|
<?php
namespace Smartbox\Integration\FrameworkBundle\Components\Queues\Drivers;
use Smartbox\Integration\FrameworkBundle\Components\Queues\QueueMessageInterface;
interface SyncQueueDriverInterface extends QueueDriverInterface
{
/**
* Returns true if a subscription already exists, false otherwise.
*
* @return bool
*/
public function isSubscribed();
/**
* Creates a subscription to the given $queue, allowing to receive messages from it.
*
* @param string $queue Queue to subscribe
*/
public function subscribe(string $queue);
/**
* Destroys the created subscription with a queue.
*/
public function unSubscribe();
/**
* Returns One Serializable object from the queue.
*
* It requires to subscribe previously to a specific queue
*
* @return QueueMessageInterface|null
*
* @throws \Exception
*/
public function receive();
/**
* Clean all the opened resources, must be called just before terminating the current request.
*/
public function destroy();
}
|
<?php
declare(strict_types=1);
namespace Smartbox\Integration\FrameworkBundle\Components\Queues\Drivers;
use Smartbox\Integration\FrameworkBundle\Components\Queues\QueueMessageInterface;
interface SyncQueueDriverInterface extends QueueDriverInterface
{
/**
* Returns true if a subscription already exists, false otherwise.
*
* @return bool
*/
public function isSubscribed();
/**
* Creates a subscription to the given $queue, allowing to receive messages from it.
*
* @param string $queue Queue to subscribe
*/
public function subscribe(string $queue);
/**
* Destroys the created subscription with a queue.
*/
public function unSubscribe();
/**
* Returns One Serializable object from the queue.
*
* It requires to subscribe previously to a specific queue
*
* @return QueueMessageInterface|null
*/
public function receive();
/**
* Clean all the opened resources, must be called just before terminating the current request.
*/
public function destroy();
}
|
Add declare strict type in interface where string typehint is used
|
Add declare strict type in interface where string typehint is used
|
PHP
|
mit
|
smartboxgroup/integration-framework-bundle,smartboxgroup/integration-framework-bundle
|
php
|
## Code Before:
<?php
namespace Smartbox\Integration\FrameworkBundle\Components\Queues\Drivers;
use Smartbox\Integration\FrameworkBundle\Components\Queues\QueueMessageInterface;
interface SyncQueueDriverInterface extends QueueDriverInterface
{
/**
* Returns true if a subscription already exists, false otherwise.
*
* @return bool
*/
public function isSubscribed();
/**
* Creates a subscription to the given $queue, allowing to receive messages from it.
*
* @param string $queue Queue to subscribe
*/
public function subscribe(string $queue);
/**
* Destroys the created subscription with a queue.
*/
public function unSubscribe();
/**
* Returns One Serializable object from the queue.
*
* It requires to subscribe previously to a specific queue
*
* @return QueueMessageInterface|null
*
* @throws \Exception
*/
public function receive();
/**
* Clean all the opened resources, must be called just before terminating the current request.
*/
public function destroy();
}
## Instruction:
Add declare strict type in interface where string typehint is used
## Code After:
<?php
declare(strict_types=1);
namespace Smartbox\Integration\FrameworkBundle\Components\Queues\Drivers;
use Smartbox\Integration\FrameworkBundle\Components\Queues\QueueMessageInterface;
interface SyncQueueDriverInterface extends QueueDriverInterface
{
/**
* Returns true if a subscription already exists, false otherwise.
*
* @return bool
*/
public function isSubscribed();
/**
* Creates a subscription to the given $queue, allowing to receive messages from it.
*
* @param string $queue Queue to subscribe
*/
public function subscribe(string $queue);
/**
* Destroys the created subscription with a queue.
*/
public function unSubscribe();
/**
* Returns One Serializable object from the queue.
*
* It requires to subscribe previously to a specific queue
*
* @return QueueMessageInterface|null
*/
public function receive();
/**
* Clean all the opened resources, must be called just before terminating the current request.
*/
public function destroy();
}
|
00df1e5c6c31f663d36b8e4c86829d322bcfc508
|
example/saisoku.rb
|
example/saisoku.rb
|
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
require "syoboi_calendar"
args = Slop.parse :help => true do
on :u, :user=, "Username on SyoboiCalendar"
on :p, :pass=, "Password on SyoboiCalendar"
end
client = SyoboiCalendar::Client.new(
:user => args[:user],
:pass => args[:pass]
)
programs = client.search(
:first => true,
:range => "2012/4/1-2012/4/30"
)[0..10]
programs.uniq!(&:title)
programs.select!(&:is_saisoku?)
programs.sort! { |a, b| a.start_time.to_i <=> b.start_time.to_i}
programs.each { |program|
puts "|%s|%-8.8s|%s|" % [
program.start_time.strftime("%Y-%m-%d %H:%M"),
program.saisoku_channel_name.tr("A-Z", "A-Z").tr(" ", ""),
program.title,
]
}
|
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
require "syoboi_calendar"
args = Slop.parse :help => true do
on :u, :user=, "Username on SyoboiCalendar"
on :p, :pass=, "Password on SyoboiCalendar"
end
client = SyoboiCalendar::Client.new(
:user => args[:user],
:pass => args[:pass]
)
programs = client.search(
:first => true,
:range => "2012/4/1-2012/4/30"
)[0..10]
programs.uniq!(&:title)
programs.select!(&:is_saisoku?)
programs.sort! { |a, b| a.start_time.to_i <=> b.start_time.to_i}
programs.each { |program|
puts "|%s|%-8.8s|%s|" % [
program.start_time.strftime("%Y-%m-%d %H:%M"),
program.saisoku_channel_name\
.tr("A-Z", "A-Z").tr("a-z", "a-z").tr(" ", ""),
program.title,
]
}
|
Fix bug: lowercase channel name
|
Fix bug: lowercase channel name
|
Ruby
|
mit
|
r7kamura/syoboi_calendar
|
ruby
|
## Code Before:
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
require "syoboi_calendar"
args = Slop.parse :help => true do
on :u, :user=, "Username on SyoboiCalendar"
on :p, :pass=, "Password on SyoboiCalendar"
end
client = SyoboiCalendar::Client.new(
:user => args[:user],
:pass => args[:pass]
)
programs = client.search(
:first => true,
:range => "2012/4/1-2012/4/30"
)[0..10]
programs.uniq!(&:title)
programs.select!(&:is_saisoku?)
programs.sort! { |a, b| a.start_time.to_i <=> b.start_time.to_i}
programs.each { |program|
puts "|%s|%-8.8s|%s|" % [
program.start_time.strftime("%Y-%m-%d %H:%M"),
program.saisoku_channel_name.tr("A-Z", "A-Z").tr(" ", ""),
program.title,
]
}
## Instruction:
Fix bug: lowercase channel name
## Code After:
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
require "syoboi_calendar"
args = Slop.parse :help => true do
on :u, :user=, "Username on SyoboiCalendar"
on :p, :pass=, "Password on SyoboiCalendar"
end
client = SyoboiCalendar::Client.new(
:user => args[:user],
:pass => args[:pass]
)
programs = client.search(
:first => true,
:range => "2012/4/1-2012/4/30"
)[0..10]
programs.uniq!(&:title)
programs.select!(&:is_saisoku?)
programs.sort! { |a, b| a.start_time.to_i <=> b.start_time.to_i}
programs.each { |program|
puts "|%s|%-8.8s|%s|" % [
program.start_time.strftime("%Y-%m-%d %H:%M"),
program.saisoku_channel_name\
.tr("A-Z", "A-Z").tr("a-z", "a-z").tr(" ", ""),
program.title,
]
}
|
467c1a5f04c6fe62b1964893526ce4f0eb2966e5
|
.travis.yml
|
.travis.yml
|
sudo: required
dist: trusty
language: cpp
compiler:
- gcc
- clang
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y qt5-default libqt5svg5-dev
script:
- mkdir build
- cd build
- qmake ..
- make
|
sudo: required
dist: trusty
language: cpp
compiler:
- gcc
- clang
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y qt5-default libqt5svg5-dev
script:
- export QMAKE_CC=$CC
- export QMAKE_CXX=$CXX
- mkdir build
- cd build
- qmake ..
- make
|
Set QMAKE_CC and CXX flag for Travis builds
|
Set QMAKE_CC and CXX flag for Travis builds
|
YAML
|
bsd-2-clause
|
csete/softrig,csete/softrig,csete/softrig
|
yaml
|
## Code Before:
sudo: required
dist: trusty
language: cpp
compiler:
- gcc
- clang
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y qt5-default libqt5svg5-dev
script:
- mkdir build
- cd build
- qmake ..
- make
## Instruction:
Set QMAKE_CC and CXX flag for Travis builds
## Code After:
sudo: required
dist: trusty
language: cpp
compiler:
- gcc
- clang
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y qt5-default libqt5svg5-dev
script:
- export QMAKE_CC=$CC
- export QMAKE_CXX=$CXX
- mkdir build
- cd build
- qmake ..
- make
|
9eb6188dd87095543be05f751c71e4b2e967e59e
|
static/templates/hotspot_overlay.hbs
|
static/templates/hotspot_overlay.hbs
|
<div id="hotspot_{{name}}_overlay" class="hotspot overlay" data-overlay="hotspot_{{name}}_overlay">
<div class="hotspot-popover">
<div class="hotspot-popover-top">
<h1 class="hotspot-title">{{title}}</h1>
</div>
<div class="hotspot-popover-content">
<p class="hotspot-description">{{description}}</p>
</div>
<div class="hotspot-popover-bottom">
<img class="hotspot-img" alt=_("hotspot illustration") src="{{img}}" />
<button class="hotspot-confirm">{{t 'Got it!' }}</button>
</div>
</div>
</div>
|
<div id="hotspot_{{name}}_overlay" class="hotspot overlay" data-overlay="hotspot_{{name}}_overlay">
<div class="hotspot-popover">
<div class="hotspot-popover-top">
<h1 class="hotspot-title">{{title}}</h1>
</div>
<div class="hotspot-popover-content">
<p class="hotspot-description">{{description}}</p>
</div>
<div class="hotspot-popover-bottom">
<img class="hotspot-img" src="{{img}}" />
<button class="hotspot-confirm">{{t 'Got it!' }}</button>
</div>
</div>
</div>
|
Remove useless and malformed alt text.
|
hotspots: Remove useless and malformed alt text.
Since it was introduced in 5ce0db9f433a6dcf7beea42b295f00e27d060933,
we've had alt text for the hotspots illustration with an invalid
translation tag.
Fix this by removing the alt text, since the image has no functional
effect and so the right answer should it fail to load or the user is
visually impaired is to ignore it.
|
Handlebars
|
apache-2.0
|
rht/zulip,hackerkid/zulip,rht/zulip,rht/zulip,andersk/zulip,zulip/zulip,andersk/zulip,punchagan/zulip,eeshangarg/zulip,hackerkid/zulip,kou/zulip,punchagan/zulip,zulip/zulip,eeshangarg/zulip,eeshangarg/zulip,kou/zulip,andersk/zulip,punchagan/zulip,punchagan/zulip,rht/zulip,zulip/zulip,kou/zulip,kou/zulip,andersk/zulip,kou/zulip,punchagan/zulip,kou/zulip,zulip/zulip,punchagan/zulip,zulip/zulip,hackerkid/zulip,andersk/zulip,andersk/zulip,eeshangarg/zulip,rht/zulip,hackerkid/zulip,hackerkid/zulip,rht/zulip,punchagan/zulip,rht/zulip,kou/zulip,zulip/zulip,eeshangarg/zulip,zulip/zulip,hackerkid/zulip,hackerkid/zulip,andersk/zulip,eeshangarg/zulip,eeshangarg/zulip
|
handlebars
|
## Code Before:
<div id="hotspot_{{name}}_overlay" class="hotspot overlay" data-overlay="hotspot_{{name}}_overlay">
<div class="hotspot-popover">
<div class="hotspot-popover-top">
<h1 class="hotspot-title">{{title}}</h1>
</div>
<div class="hotspot-popover-content">
<p class="hotspot-description">{{description}}</p>
</div>
<div class="hotspot-popover-bottom">
<img class="hotspot-img" alt=_("hotspot illustration") src="{{img}}" />
<button class="hotspot-confirm">{{t 'Got it!' }}</button>
</div>
</div>
</div>
## Instruction:
hotspots: Remove useless and malformed alt text.
Since it was introduced in 5ce0db9f433a6dcf7beea42b295f00e27d060933,
we've had alt text for the hotspots illustration with an invalid
translation tag.
Fix this by removing the alt text, since the image has no functional
effect and so the right answer should it fail to load or the user is
visually impaired is to ignore it.
## Code After:
<div id="hotspot_{{name}}_overlay" class="hotspot overlay" data-overlay="hotspot_{{name}}_overlay">
<div class="hotspot-popover">
<div class="hotspot-popover-top">
<h1 class="hotspot-title">{{title}}</h1>
</div>
<div class="hotspot-popover-content">
<p class="hotspot-description">{{description}}</p>
</div>
<div class="hotspot-popover-bottom">
<img class="hotspot-img" src="{{img}}" />
<button class="hotspot-confirm">{{t 'Got it!' }}</button>
</div>
</div>
</div>
|
788fb8dce723d608a38a4c0cd756d87f49d2911e
|
requirements.txt
|
requirements.txt
|
appdirs==1.4.3
bcrypt==3.1.3
cffi==1.10.0
Django==1.11
django-crispy-forms==1.6.1
et-xmlfile==1.0.1
gunicorn==19.7.1
jdcal==1.3
lxml==3.7.3
openpyxl==2.4.7
packaging==16.8
pycparser==2.17
PyMySQL==0.7.11
pyparsing==2.2.0
python-dateutil==2.6.0
pytz==2017.2
requests==2.13.0
six==1.10.0
cloudflare==1.5.1
django_slack==5.8.0
django-extensions==1.7.9
fuzzywuzzy==0.15.0
|
appdirs==1.4.3
bcrypt==3.1.3
cffi==1.10.0
Django==1.11
django-crispy-forms==1.6.1
et-xmlfile==1.0.1
gunicorn==19.7.1
jdcal==1.3
lxml==3.7.3
openpyxl==2.4.7
packaging==16.8
pycparser==2.17
PyMySQL==0.7.11
pyparsing==2.2.0
python-dateutil==2.6.0
pytz==2017.2
requests==2.13.0
six==1.10.0
cloudflare==1.5.1
django_slack==5.8.0
django-extensions==1.7.9
fuzzywuzzy==0.15.0
gevent==1.2.2
|
Add gevent to allow use of async gunicorn workers
|
Add gevent to allow use of async gunicorn workers
|
Text
|
mit
|
owid/owid-grapher,OurWorldInData/our-world-in-data-grapher,owid/owid-grapher,aaldaber/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/our-world-in-data-grapher,OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/our-world-in-data-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,owid/owid-grapher,aaldaber/owid-grapher,aaldaber/owid-grapher,OurWorldInData/our-world-in-data-grapher,aaldaber/owid-grapher,aaldaber/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher
|
text
|
## Code Before:
appdirs==1.4.3
bcrypt==3.1.3
cffi==1.10.0
Django==1.11
django-crispy-forms==1.6.1
et-xmlfile==1.0.1
gunicorn==19.7.1
jdcal==1.3
lxml==3.7.3
openpyxl==2.4.7
packaging==16.8
pycparser==2.17
PyMySQL==0.7.11
pyparsing==2.2.0
python-dateutil==2.6.0
pytz==2017.2
requests==2.13.0
six==1.10.0
cloudflare==1.5.1
django_slack==5.8.0
django-extensions==1.7.9
fuzzywuzzy==0.15.0
## Instruction:
Add gevent to allow use of async gunicorn workers
## Code After:
appdirs==1.4.3
bcrypt==3.1.3
cffi==1.10.0
Django==1.11
django-crispy-forms==1.6.1
et-xmlfile==1.0.1
gunicorn==19.7.1
jdcal==1.3
lxml==3.7.3
openpyxl==2.4.7
packaging==16.8
pycparser==2.17
PyMySQL==0.7.11
pyparsing==2.2.0
python-dateutil==2.6.0
pytz==2017.2
requests==2.13.0
six==1.10.0
cloudflare==1.5.1
django_slack==5.8.0
django-extensions==1.7.9
fuzzywuzzy==0.15.0
gevent==1.2.2
|
182504c04c9e8d0e972fabe0426c4c5a510ea90a
|
library/src/main/java/com/novoda/downloadmanager/lib/PublicFacingStatusTranslator.java
|
library/src/main/java/com/novoda/downloadmanager/lib/PublicFacingStatusTranslator.java
|
package com.novoda.downloadmanager.lib;
public class PublicFacingStatusTranslator {
public int translate(int status) {
switch (status) {
case DownloadStatus.SUBMITTED:
case DownloadStatus.PENDING:
return DownloadManager.STATUS_PENDING;
case DownloadStatus.RUNNING:
return DownloadManager.STATUS_RUNNING;
case DownloadStatus.QUEUED_DUE_CLIENT_RESTRICTIONS:
case DownloadStatus.PAUSED_BY_APP:
case DownloadStatus.WAITING_TO_RETRY:
case DownloadStatus.WAITING_FOR_NETWORK:
case DownloadStatus.QUEUED_FOR_WIFI:
return DownloadManager.STATUS_PAUSED;
case DownloadStatus.PAUSING:
return DownloadManager.STATUS_PAUSING;
case DownloadStatus.SUCCESS:
return DownloadManager.STATUS_SUCCESSFUL;
case DownloadStatus.DELETING:
return DownloadManager.STATUS_DELETING;
default:
return DownloadManager.STATUS_FAILED;
}
}
}
|
package com.novoda.downloadmanager.lib;
public class PublicFacingStatusTranslator {
public int translate(int status) {
switch (status) {
case DownloadStatus.SUBMITTED:
case DownloadStatus.PENDING:
case DownloadStatus.QUEUED_DUE_CLIENT_RESTRICTIONS:
case DownloadStatus.WAITING_TO_RETRY:
case DownloadStatus.WAITING_FOR_NETWORK:
case DownloadStatus.QUEUED_FOR_WIFI:
return DownloadManager.STATUS_PENDING;
case DownloadStatus.RUNNING:
return DownloadManager.STATUS_RUNNING;
case DownloadStatus.PAUSED_BY_APP:
return DownloadManager.STATUS_PAUSED;
case DownloadStatus.PAUSING:
return DownloadManager.STATUS_PAUSING;
case DownloadStatus.SUCCESS:
return DownloadManager.STATUS_SUCCESSFUL;
case DownloadStatus.DELETING:
return DownloadManager.STATUS_DELETING;
default:
return DownloadManager.STATUS_FAILED;
}
}
}
|
Fix Queued states to be pending instead of paused
|
Fix Queued states to be pending instead of paused
|
Java
|
apache-2.0
|
novoda/download-manager
|
java
|
## Code Before:
package com.novoda.downloadmanager.lib;
public class PublicFacingStatusTranslator {
public int translate(int status) {
switch (status) {
case DownloadStatus.SUBMITTED:
case DownloadStatus.PENDING:
return DownloadManager.STATUS_PENDING;
case DownloadStatus.RUNNING:
return DownloadManager.STATUS_RUNNING;
case DownloadStatus.QUEUED_DUE_CLIENT_RESTRICTIONS:
case DownloadStatus.PAUSED_BY_APP:
case DownloadStatus.WAITING_TO_RETRY:
case DownloadStatus.WAITING_FOR_NETWORK:
case DownloadStatus.QUEUED_FOR_WIFI:
return DownloadManager.STATUS_PAUSED;
case DownloadStatus.PAUSING:
return DownloadManager.STATUS_PAUSING;
case DownloadStatus.SUCCESS:
return DownloadManager.STATUS_SUCCESSFUL;
case DownloadStatus.DELETING:
return DownloadManager.STATUS_DELETING;
default:
return DownloadManager.STATUS_FAILED;
}
}
}
## Instruction:
Fix Queued states to be pending instead of paused
## Code After:
package com.novoda.downloadmanager.lib;
public class PublicFacingStatusTranslator {
public int translate(int status) {
switch (status) {
case DownloadStatus.SUBMITTED:
case DownloadStatus.PENDING:
case DownloadStatus.QUEUED_DUE_CLIENT_RESTRICTIONS:
case DownloadStatus.WAITING_TO_RETRY:
case DownloadStatus.WAITING_FOR_NETWORK:
case DownloadStatus.QUEUED_FOR_WIFI:
return DownloadManager.STATUS_PENDING;
case DownloadStatus.RUNNING:
return DownloadManager.STATUS_RUNNING;
case DownloadStatus.PAUSED_BY_APP:
return DownloadManager.STATUS_PAUSED;
case DownloadStatus.PAUSING:
return DownloadManager.STATUS_PAUSING;
case DownloadStatus.SUCCESS:
return DownloadManager.STATUS_SUCCESSFUL;
case DownloadStatus.DELETING:
return DownloadManager.STATUS_DELETING;
default:
return DownloadManager.STATUS_FAILED;
}
}
}
|
da662c55fadacc4ec75167d9d56c9c8dcd756be0
|
src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/package.json
|
src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/package.json
|
{
"name": "aspnet-webpack",
"version": "1.0.9",
"description": "Helpers for using Webpack in ASP.NET Core projects. Works in conjunction with the Microsoft.AspNetCore.SpaServices NuGet package.",
"main": "index.js",
"scripts": {
"prepublish": "rimraf *.d.ts && tsd update && tsc && echo 'Finished building NPM package \"aspnet-webpack\"'",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Microsoft",
"license": "Apache-2.0",
"dependencies": {
"es6-promise": "^3.1.2",
"connect": "^3.4.1",
"memory-fs": "^0.3.0",
"require-from-string": "^1.1.0",
"webpack": "^1.12.14",
"webpack-dev-middleware": "^1.5.1",
"webpack-externals-plugin": "^1.0.0"
},
"devDependencies": {
"rimraf": "^2.5.4",
"typescript": "^1.8.10"
}
}
|
{
"name": "aspnet-webpack",
"version": "1.0.9",
"description": "Helpers for using Webpack in ASP.NET Core projects. Works in conjunction with the Microsoft.AspNetCore.SpaServices NuGet package.",
"main": "index.js",
"scripts": {
"prepublish": "rimraf *.d.ts && tsd update && tsc && echo 'Finished building NPM package \"aspnet-webpack\"'",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Microsoft",
"license": "Apache-2.0",
"dependencies": {
"es6-promise": "^3.1.2",
"connect": "^3.4.1",
"memory-fs": "^0.3.0",
"require-from-string": "^1.1.0",
"webpack-dev-middleware": "^1.6.1",
"webpack-externals-plugin": "^1.0.0"
},
"devDependencies": {
"rimraf": "^2.5.4",
"typescript": "^1.8.10"
},
"peerDependencies": {
"webpack": "^1.13.2"
}
}
|
Make webpack dev dependency a peer dependency in aspnet-webpack.
|
Make webpack dev dependency a peer dependency in aspnet-webpack.
Moving webpack from a dev dependency to a peer dependency makes the dependency soft and allows the webpack-dev-middleware to pickup the version of webpack being used by the consumer of the package.
|
JSON
|
apache-2.0
|
aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore
|
json
|
## Code Before:
{
"name": "aspnet-webpack",
"version": "1.0.9",
"description": "Helpers for using Webpack in ASP.NET Core projects. Works in conjunction with the Microsoft.AspNetCore.SpaServices NuGet package.",
"main": "index.js",
"scripts": {
"prepublish": "rimraf *.d.ts && tsd update && tsc && echo 'Finished building NPM package \"aspnet-webpack\"'",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Microsoft",
"license": "Apache-2.0",
"dependencies": {
"es6-promise": "^3.1.2",
"connect": "^3.4.1",
"memory-fs": "^0.3.0",
"require-from-string": "^1.1.0",
"webpack": "^1.12.14",
"webpack-dev-middleware": "^1.5.1",
"webpack-externals-plugin": "^1.0.0"
},
"devDependencies": {
"rimraf": "^2.5.4",
"typescript": "^1.8.10"
}
}
## Instruction:
Make webpack dev dependency a peer dependency in aspnet-webpack.
Moving webpack from a dev dependency to a peer dependency makes the dependency soft and allows the webpack-dev-middleware to pickup the version of webpack being used by the consumer of the package.
## Code After:
{
"name": "aspnet-webpack",
"version": "1.0.9",
"description": "Helpers for using Webpack in ASP.NET Core projects. Works in conjunction with the Microsoft.AspNetCore.SpaServices NuGet package.",
"main": "index.js",
"scripts": {
"prepublish": "rimraf *.d.ts && tsd update && tsc && echo 'Finished building NPM package \"aspnet-webpack\"'",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Microsoft",
"license": "Apache-2.0",
"dependencies": {
"es6-promise": "^3.1.2",
"connect": "^3.4.1",
"memory-fs": "^0.3.0",
"require-from-string": "^1.1.0",
"webpack-dev-middleware": "^1.6.1",
"webpack-externals-plugin": "^1.0.0"
},
"devDependencies": {
"rimraf": "^2.5.4",
"typescript": "^1.8.10"
},
"peerDependencies": {
"webpack": "^1.13.2"
}
}
|
12ea58bad25fe9e2ffd0f15865449c579bacc415
|
spec/acceptance/freeradius_spec.rb
|
spec/acceptance/freeradius_spec.rb
|
require 'spec_helper_acceptance'
describe 'freeradius' do
context 'when running puppet code' do
pp = "class { 'freeradius': }"
it 'should apply with no errors' do
apply_manifest(pp, :catch_failures => true)
end
it 'should converge on the first run' do
apply_manifest(pp, :catch_changes => true)
end
describe service('radiusd') do
it { is_expected.to be_running }
it { is_expected.to be_enabled }
end
describe port('1812') do
it { is_expected.to be_listening.on('udp') }
end
end
end
|
require 'spec_helper_acceptance'
describe 'freeradius' do
context 'when running puppet code' do
pp = "class { 'freeradius': }"
it 'should apply with no errors' do
apply_manifest(pp, :catch_failures => true)
end
it 'should converge on the first run' do
apply_manifest(pp, :catch_changes => true)
end
describe service('radiusd') do
it { is_expected.to be_running }
it { is_expected.to be_enabled }
end
describe port('1812') do
it { is_expected.to be_listening.on('0.0.0.0').with('udp') }
end
end
end
|
Fix acceptance tests on port
|
Fix acceptance tests on port
|
Ruby
|
apache-2.0
|
raphink/puppet-freeradius
|
ruby
|
## Code Before:
require 'spec_helper_acceptance'
describe 'freeradius' do
context 'when running puppet code' do
pp = "class { 'freeradius': }"
it 'should apply with no errors' do
apply_manifest(pp, :catch_failures => true)
end
it 'should converge on the first run' do
apply_manifest(pp, :catch_changes => true)
end
describe service('radiusd') do
it { is_expected.to be_running }
it { is_expected.to be_enabled }
end
describe port('1812') do
it { is_expected.to be_listening.on('udp') }
end
end
end
## Instruction:
Fix acceptance tests on port
## Code After:
require 'spec_helper_acceptance'
describe 'freeradius' do
context 'when running puppet code' do
pp = "class { 'freeradius': }"
it 'should apply with no errors' do
apply_manifest(pp, :catch_failures => true)
end
it 'should converge on the first run' do
apply_manifest(pp, :catch_changes => true)
end
describe service('radiusd') do
it { is_expected.to be_running }
it { is_expected.to be_enabled }
end
describe port('1812') do
it { is_expected.to be_listening.on('0.0.0.0').with('udp') }
end
end
end
|
6ca8b828824c9d01b5b5ab96fdd25ad503639077
|
helpstack/res/values/hs_colors.xml
|
helpstack/res/values/hs_colors.xml
|
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="hs_background_color">#e1e1e1</color>
<color name="hs_header_background_color">#81c57b</color>
<color name="hs_childView_background_color">#ffffff</color>
<color name="hs_listView_divider_color">#e2e2e2</color>
<color name="hs_listView_selector_color">#d3d3d3</color>
<color name="hs_transparent_color">#0000</color>
<color name="hs_lightGreycolor">#ECECEC</color>
<color name="hs_darkGreycolor">#B5B5B5</color>
<color name="hs_rightchat_bubblecolor">#81c57b</color>
<color name="hs_leftchat_bubblecolor">#ffffff</color>
<color name="hs_leftchat_messageTextcolor">#000000</color>
<color name="hs_rightchat_messageTextcolor">#000000</color>
<color name="hs_message_moreinfoTextColor">#000000</color>
<color name="hs_button_background_color">#FFFFFF</color>
<color name="hs_buttonTextcolor">#DE2527</color>
<color name="hs_editTextcolor">#000000</color>
</resources>
|
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="hs_background_color">#e1e1e1</color>
<color name="hs_header_background_color">#228CD1</color>
<color name="hs_childView_background_color">#000000</color>
<color name="hs_listView_divider_color">#e2e2e2</color>
<color name="hs_listView_selector_color">#d3d3d3</color>
<color name="hs_transparent_color">#0000</color>
<color name="hs_lightGreycolor">#ECECEC</color>
<color name="hs_darkGreycolor">#B5B5B5</color>
<color name="hs_rightchat_bubblecolor">#228CD1</color>
<color name="hs_leftchat_bubblecolor">#000000</color>
<color name="hs_leftchat_messageTextcolor">#000000</color>
<color name="hs_rightchat_messageTextcolor">#000000</color>
<color name="hs_message_moreinfoTextColor">#000000</color>
<color name="hs_button_background_color">#FFFFFF</color>
<color name="hs_buttonTextcolor">#DE2527</color>
<color name="hs_editTextcolor">#000000</color>
</resources>
|
Update default theme with the blue tint
|
Update default theme with the blue tint
The light theme’s colours were changes from green to blue. Since the
default theme is supposed to be the same theme, making the same
green-to-blue changes to the default theme.
|
XML
|
mit
|
kzganesan/helpstack-android,NYPL/helpstack-android,NYPL-Simplified/helpstack-android,thuytrinh/helpstack-android,happyfoxinc/helpstack-android
|
xml
|
## Code Before:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="hs_background_color">#e1e1e1</color>
<color name="hs_header_background_color">#81c57b</color>
<color name="hs_childView_background_color">#ffffff</color>
<color name="hs_listView_divider_color">#e2e2e2</color>
<color name="hs_listView_selector_color">#d3d3d3</color>
<color name="hs_transparent_color">#0000</color>
<color name="hs_lightGreycolor">#ECECEC</color>
<color name="hs_darkGreycolor">#B5B5B5</color>
<color name="hs_rightchat_bubblecolor">#81c57b</color>
<color name="hs_leftchat_bubblecolor">#ffffff</color>
<color name="hs_leftchat_messageTextcolor">#000000</color>
<color name="hs_rightchat_messageTextcolor">#000000</color>
<color name="hs_message_moreinfoTextColor">#000000</color>
<color name="hs_button_background_color">#FFFFFF</color>
<color name="hs_buttonTextcolor">#DE2527</color>
<color name="hs_editTextcolor">#000000</color>
</resources>
## Instruction:
Update default theme with the blue tint
The light theme’s colours were changes from green to blue. Since the
default theme is supposed to be the same theme, making the same
green-to-blue changes to the default theme.
## Code After:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="hs_background_color">#e1e1e1</color>
<color name="hs_header_background_color">#228CD1</color>
<color name="hs_childView_background_color">#000000</color>
<color name="hs_listView_divider_color">#e2e2e2</color>
<color name="hs_listView_selector_color">#d3d3d3</color>
<color name="hs_transparent_color">#0000</color>
<color name="hs_lightGreycolor">#ECECEC</color>
<color name="hs_darkGreycolor">#B5B5B5</color>
<color name="hs_rightchat_bubblecolor">#228CD1</color>
<color name="hs_leftchat_bubblecolor">#000000</color>
<color name="hs_leftchat_messageTextcolor">#000000</color>
<color name="hs_rightchat_messageTextcolor">#000000</color>
<color name="hs_message_moreinfoTextColor">#000000</color>
<color name="hs_button_background_color">#FFFFFF</color>
<color name="hs_buttonTextcolor">#DE2527</color>
<color name="hs_editTextcolor">#000000</color>
</resources>
|
4e4ee2742be0644d1ddcd718f189c7556994ccaf
|
InvenTree/templates/modal_form.html
|
InvenTree/templates/modal_form.html
|
{% block pre_form_content %}
{% endblock %}
{% if form.non_field_errors %}
<div class='alert alert-danger' role='alert' style='display: block;'>
<b>Error Submitting Form:</b>
{{ form.non_field_errors }}
</div>
{% endif %}
<form method="post" action='' class='js-modal-form' enctype="multipart/form-data">
{% csrf_token %}
{% load crispy_forms_tags %}
{% crispy form %}
{% block form_data %}
{% endblock %}
</form>
{% block post_form_content %}
{% endblock %}
|
{% block non_field_error %}
{% if form.non_field_errors %}
<div class='alert alert-danger' role='alert' style='display: block;'>
<b>Error Submitting Form:</b>
{{ form.non_field_errors }}
</div>
{% endif %}
{% endblock %}
{% block pre_form_content %}
{% endblock %}
<form method="post" action='' class='js-modal-form' enctype="multipart/form-data">
{% csrf_token %}
{% load crispy_forms_tags %}
{% crispy form %}
{% block form_data %}
{% endblock %}
</form>
{% block post_form_content %}
{% endblock %}
|
Move modal form error messages to the top
|
Move modal form error messages to the top
|
HTML
|
mit
|
inventree/InvenTree,SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,inventree/InvenTree
|
html
|
## Code Before:
{% block pre_form_content %}
{% endblock %}
{% if form.non_field_errors %}
<div class='alert alert-danger' role='alert' style='display: block;'>
<b>Error Submitting Form:</b>
{{ form.non_field_errors }}
</div>
{% endif %}
<form method="post" action='' class='js-modal-form' enctype="multipart/form-data">
{% csrf_token %}
{% load crispy_forms_tags %}
{% crispy form %}
{% block form_data %}
{% endblock %}
</form>
{% block post_form_content %}
{% endblock %}
## Instruction:
Move modal form error messages to the top
## Code After:
{% block non_field_error %}
{% if form.non_field_errors %}
<div class='alert alert-danger' role='alert' style='display: block;'>
<b>Error Submitting Form:</b>
{{ form.non_field_errors }}
</div>
{% endif %}
{% endblock %}
{% block pre_form_content %}
{% endblock %}
<form method="post" action='' class='js-modal-form' enctype="multipart/form-data">
{% csrf_token %}
{% load crispy_forms_tags %}
{% crispy form %}
{% block form_data %}
{% endblock %}
</form>
{% block post_form_content %}
{% endblock %}
|
3b775a6debea424d5b6d62b8b870917e2fd7d107
|
package.json
|
package.json
|
{
"name": "jscsrc-guesser",
"version": "0.1.1",
"description": "Determine the JSCS ruleset some code currently follows",
"main": "lib/jscsrc-guesser.js",
"scripts": {
"test": "jshint --show-non-errors . && jscs --esnext --verbose . && mocha --harmony --check-leaks --recursive tests/**/*.test.js"
},
"keywords": [
"jscs"
],
"author": "Adrian Heine <[email protected]>",
"license": "AGPL-3.0",
"dependencies": {
"commander": "^2.7.1",
"es6-promise": "*",
"object-assign": "^2.0.0",
"jscs": "~1.13.1"
},
"devDependencies": {
"mocha": "",
"jshint": "^2.7.0"
},
"bin": {
"jscsrc-guesser": "./bin/jscsrc-guesser"
},
"repository": "adrianheine/jscsrc-guesser",
"files": [
"bin",
"lib"
]
}
|
{
"name": "jscsrc-guesser",
"version": "0.1.1",
"description": "Determine the JSCS ruleset some code currently follows",
"main": "lib/jscsrc-guesser.js",
"scripts": {
"test": "jshint --show-non-errors . && jscs --esnext --verbose . && mocha --harmony --check-leaks --recursive tests/**/*.test.js"
},
"keywords": [
"jscs"
],
"author": "Adrian Heine <[email protected]>",
"license": "AGPL-3.0",
"dependencies": {
"commander": "^2.7.1",
"es6-promise": "*",
"object-assign": "^2.0.0",
"jscs": "~1.13.1"
},
"devDependencies": {
"mocha": "",
"jshint": "^2.7.0"
},
"bin": {
"jscsrc-guesser": "./bin/jscsrc-guesser"
},
"repository": "adrianheine/jscsrc-guesser",
"files": [
"bin",
"lib"
]
}
|
Use my private mail address
|
Use my private mail address
|
JSON
|
agpl-3.0
|
adrianheine/jscsrc-guesser
|
json
|
## Code Before:
{
"name": "jscsrc-guesser",
"version": "0.1.1",
"description": "Determine the JSCS ruleset some code currently follows",
"main": "lib/jscsrc-guesser.js",
"scripts": {
"test": "jshint --show-non-errors . && jscs --esnext --verbose . && mocha --harmony --check-leaks --recursive tests/**/*.test.js"
},
"keywords": [
"jscs"
],
"author": "Adrian Heine <[email protected]>",
"license": "AGPL-3.0",
"dependencies": {
"commander": "^2.7.1",
"es6-promise": "*",
"object-assign": "^2.0.0",
"jscs": "~1.13.1"
},
"devDependencies": {
"mocha": "",
"jshint": "^2.7.0"
},
"bin": {
"jscsrc-guesser": "./bin/jscsrc-guesser"
},
"repository": "adrianheine/jscsrc-guesser",
"files": [
"bin",
"lib"
]
}
## Instruction:
Use my private mail address
## Code After:
{
"name": "jscsrc-guesser",
"version": "0.1.1",
"description": "Determine the JSCS ruleset some code currently follows",
"main": "lib/jscsrc-guesser.js",
"scripts": {
"test": "jshint --show-non-errors . && jscs --esnext --verbose . && mocha --harmony --check-leaks --recursive tests/**/*.test.js"
},
"keywords": [
"jscs"
],
"author": "Adrian Heine <[email protected]>",
"license": "AGPL-3.0",
"dependencies": {
"commander": "^2.7.1",
"es6-promise": "*",
"object-assign": "^2.0.0",
"jscs": "~1.13.1"
},
"devDependencies": {
"mocha": "",
"jshint": "^2.7.0"
},
"bin": {
"jscsrc-guesser": "./bin/jscsrc-guesser"
},
"repository": "adrianheine/jscsrc-guesser",
"files": [
"bin",
"lib"
]
}
|
556f082071a8d3917656239d2c5eacfaac4bed5a
|
lib/compile/modules/resolve.js
|
lib/compile/modules/resolve.js
|
import * as Pluggable from "../../pluggable";
import resolve from "../../resolve";
const createModule = Pluggable.sync(function createModule (overrides) {
return Object.assign({
path: null,
ns: null,
nsPath: null,
nsRoot: null,
rawSource: null,
ast: null,
requireNodes: null,
dependencies: null,
hash: null
}, overrides);
});
const preresolve = Pluggable.sync(function preresolve (requireStr) {
return requireStr;
});
function resolveModule (requireStr, contextPath, ns, nsRoot) {
contextPath = contextPath || this.opts.root;
requireStr = this.preresolve(requireStr, contextPath);
const resolved = resolve(
requireStr,
contextPath || this.opts.root,
ns || this.opts.ns,
nsRoot || this.opts.root,
this.opts.extensions
);
if (!resolved) {
throw new Error("Cannot resolve '" + requireStr + "' from '" + contextPath + "'.");
}
return this.createModule(resolved);
}
export default Pluggable.sync(resolveModule, { preresolve, createModule });
|
import * as Pluggable from "../../pluggable";
import resolve from "../../resolve";
const createModule = Pluggable.sync(function createModule (overrides) {
return Object.assign({
path: null,
ns: null,
nsPath: null,
nsRoot: null,
rawSource: null,
ast: null,
requireNodes: null,
dependencies: null,
hash: null
}, overrides);
});
const preresolve = Pluggable.sync(function preresolve (requireStr) {
return requireStr;
});
function resolveModule (requireStr, contextPath, ns, nsRoot) {
contextPath = contextPath || this.opts.root;
requireStr = this.preresolve(requireStr, contextPath);
const resolved = resolve(
requireStr,
contextPath || this.opts.root,
ns || this.opts.ns,
nsRoot || this.opts.root,
this.opts.extensions
);
if (!resolved) {
throw new Error(`Cannot resolve ${requireStr} from ${contextPath}.`);
}
return this.createModule(resolved);
}
export default Pluggable.sync(resolveModule, { preresolve, createModule });
|
Convert string concat to template string
|
Convert string concat to template string
|
JavaScript
|
mit
|
interlockjs/interlock,interlockjs/interlock
|
javascript
|
## Code Before:
import * as Pluggable from "../../pluggable";
import resolve from "../../resolve";
const createModule = Pluggable.sync(function createModule (overrides) {
return Object.assign({
path: null,
ns: null,
nsPath: null,
nsRoot: null,
rawSource: null,
ast: null,
requireNodes: null,
dependencies: null,
hash: null
}, overrides);
});
const preresolve = Pluggable.sync(function preresolve (requireStr) {
return requireStr;
});
function resolveModule (requireStr, contextPath, ns, nsRoot) {
contextPath = contextPath || this.opts.root;
requireStr = this.preresolve(requireStr, contextPath);
const resolved = resolve(
requireStr,
contextPath || this.opts.root,
ns || this.opts.ns,
nsRoot || this.opts.root,
this.opts.extensions
);
if (!resolved) {
throw new Error("Cannot resolve '" + requireStr + "' from '" + contextPath + "'.");
}
return this.createModule(resolved);
}
export default Pluggable.sync(resolveModule, { preresolve, createModule });
## Instruction:
Convert string concat to template string
## Code After:
import * as Pluggable from "../../pluggable";
import resolve from "../../resolve";
const createModule = Pluggable.sync(function createModule (overrides) {
return Object.assign({
path: null,
ns: null,
nsPath: null,
nsRoot: null,
rawSource: null,
ast: null,
requireNodes: null,
dependencies: null,
hash: null
}, overrides);
});
const preresolve = Pluggable.sync(function preresolve (requireStr) {
return requireStr;
});
function resolveModule (requireStr, contextPath, ns, nsRoot) {
contextPath = contextPath || this.opts.root;
requireStr = this.preresolve(requireStr, contextPath);
const resolved = resolve(
requireStr,
contextPath || this.opts.root,
ns || this.opts.ns,
nsRoot || this.opts.root,
this.opts.extensions
);
if (!resolved) {
throw new Error(`Cannot resolve ${requireStr} from ${contextPath}.`);
}
return this.createModule(resolved);
}
export default Pluggable.sync(resolveModule, { preresolve, createModule });
|
78c4f7d741ee428aaa108eacf10784acd3cf37b9
|
tests_appveyor.ps1
|
tests_appveyor.ps1
|
param (
[string]$configuration = "Release"
)
. "$(resolve-path .\packages\nspec.*\tools\NSpecRunner.exe)" --formatter=XmlFormatter Winston.Test\bin\$configuration\Winston.Test.dll > nspec_results.xml
[xml]$res = Get-Content .\nspec_results.xml
foreach($c in $res.Contexts.Context) {
$spec = $c.Context.Specs.Spec
foreach($s in $spec) {
$name = "$($c.Name) $($s.Name)"
$status = $s.Status
Add-AppveyorTest -Name $name -Outcome $status
}
}
|
param (
[string]$configuration = "Release"
)
function NSpec {
. "$(resolve-path .\packages\nspec.*\tools\NSpecRunner.exe)" --formatter=XmlFormatter Winston.Test\bin\$configuration\Winston.Test.dll > nspec_results.xml
[xml]$res = Get-Content .\nspec_results.xml
foreach($c in $res.Contexts.Context) {
$spec = $c.Context.Specs.Spec
foreach($s in $spec) {
$name = "$($c.Name) $($s.Name)"
$status = $s.Status
Add-AppveyorTest -Name $name -Outcome $status
}
}
}
function MSTest {
mstest /testcontainer:"$(Resolve-Path **\bin\$configuration\Winston.Test.dll)" /resultsfile:TestResults\ci.trx
[xml]$trx = Get-Content TestResults\ci.trx
$results = $trx.TestRun.Results.UnitTestResult | select testName,outcome,duration
foreach($r in $results) {
Add-AppveyorTest -Name "$r.testName" -Outcome $r.outcome -Duration $r.duration
}
}
NSpec
MSTest
|
Add missing appveyor test update
|
Add missing appveyor test update
Reports mstest results to appveyor
|
PowerShell
|
mit
|
mattolenik/winston,mattolenik/winston,mattolenik/winston
|
powershell
|
## Code Before:
param (
[string]$configuration = "Release"
)
. "$(resolve-path .\packages\nspec.*\tools\NSpecRunner.exe)" --formatter=XmlFormatter Winston.Test\bin\$configuration\Winston.Test.dll > nspec_results.xml
[xml]$res = Get-Content .\nspec_results.xml
foreach($c in $res.Contexts.Context) {
$spec = $c.Context.Specs.Spec
foreach($s in $spec) {
$name = "$($c.Name) $($s.Name)"
$status = $s.Status
Add-AppveyorTest -Name $name -Outcome $status
}
}
## Instruction:
Add missing appveyor test update
Reports mstest results to appveyor
## Code After:
param (
[string]$configuration = "Release"
)
function NSpec {
. "$(resolve-path .\packages\nspec.*\tools\NSpecRunner.exe)" --formatter=XmlFormatter Winston.Test\bin\$configuration\Winston.Test.dll > nspec_results.xml
[xml]$res = Get-Content .\nspec_results.xml
foreach($c in $res.Contexts.Context) {
$spec = $c.Context.Specs.Spec
foreach($s in $spec) {
$name = "$($c.Name) $($s.Name)"
$status = $s.Status
Add-AppveyorTest -Name $name -Outcome $status
}
}
}
function MSTest {
mstest /testcontainer:"$(Resolve-Path **\bin\$configuration\Winston.Test.dll)" /resultsfile:TestResults\ci.trx
[xml]$trx = Get-Content TestResults\ci.trx
$results = $trx.TestRun.Results.UnitTestResult | select testName,outcome,duration
foreach($r in $results) {
Add-AppveyorTest -Name "$r.testName" -Outcome $r.outcome -Duration $r.duration
}
}
NSpec
MSTest
|
3da4537e522d6f9cc7f449393dc7a96568df699f
|
src/watir_robot_gui.rb
|
src/watir_robot_gui.rb
|
$LOAD_PATH << File.expand_path(File.dirname(__FILE__))
require 'java'
require 'watir_robot_gui/main_frame'
require 'watir_robot_gui/worker/edit_button'
require 'watir_robot_gui/worker/remote_server'
require 'watir_robot_gui/worker/run_button'
require 'watir_robot_gui/worker/html_button'
require 'watir_robot_gui/worker/xml_button'
require 'lib/java/miglayout'
require 'lib/ruby/wr-gems'
require 'rubygems'
require 'robot_remote_server'
require 'watir_robot'
java_import 'javax.swing.BorderFactory'
java_import 'javax.swing.border.TitledBorder'
java_import 'javax.swing.JButton'
java_import 'javax.swing.JFileChooser'
java_import 'javax.swing.JFrame'
java_import 'javax.swing.JLabel'
java_import 'javax.swing.JPanel'
java_import 'javax.swing.JSeparator'
java_import 'javax.swing.JTextField'
java_import 'javax.swing.UIManager'
java_import 'net.miginfocom.swing.MigLayout'
# Run the GUI
f = WatirRobotGui::MainFrame.new
f.run_remote_server
f.set_size(280, 280)
f.pack
f.visible = true
|
$LOAD_PATH << File.expand_path(File.dirname(__FILE__))
# Add local gem repository created from extracted
# JAR archive of gems
ENV['GEM_PATH'] = File.join(File.expand_path(File.dirname(__FILE__)), '../lib/ruby/wr-gems')
require 'java'
require 'watir_robot_gui/main_frame'
require 'watir_robot_gui/worker/edit_button'
require 'watir_robot_gui/worker/remote_server'
require 'watir_robot_gui/worker/run_button'
require 'watir_robot_gui/worker/html_button'
require 'watir_robot_gui/worker/xml_button'
require 'lib/java/miglayout'
require 'rubygems'
require 'robot_remote_server'
require 'watir_robot'
java_import 'javax.swing.BorderFactory'
java_import 'javax.swing.border.TitledBorder'
java_import 'javax.swing.JButton'
java_import 'javax.swing.JFileChooser'
java_import 'javax.swing.JFrame'
java_import 'javax.swing.JLabel'
java_import 'javax.swing.JPanel'
java_import 'javax.swing.JSeparator'
java_import 'javax.swing.JTextField'
java_import 'javax.swing.UIManager'
java_import 'net.miginfocom.swing.MigLayout'
# Run the GUI
f = WatirRobotGui::MainFrame.new
f.run_remote_server
f.set_size(280, 280)
f.pack
f.visible = true
|
Set environment variable to use local gem repo from extracted jar file
|
Set environment variable to use local gem repo from extracted jar file
|
Ruby
|
bsd-3-clause
|
semperos/watir-robot-gui,semperos/watir-robot-gui
|
ruby
|
## Code Before:
$LOAD_PATH << File.expand_path(File.dirname(__FILE__))
require 'java'
require 'watir_robot_gui/main_frame'
require 'watir_robot_gui/worker/edit_button'
require 'watir_robot_gui/worker/remote_server'
require 'watir_robot_gui/worker/run_button'
require 'watir_robot_gui/worker/html_button'
require 'watir_robot_gui/worker/xml_button'
require 'lib/java/miglayout'
require 'lib/ruby/wr-gems'
require 'rubygems'
require 'robot_remote_server'
require 'watir_robot'
java_import 'javax.swing.BorderFactory'
java_import 'javax.swing.border.TitledBorder'
java_import 'javax.swing.JButton'
java_import 'javax.swing.JFileChooser'
java_import 'javax.swing.JFrame'
java_import 'javax.swing.JLabel'
java_import 'javax.swing.JPanel'
java_import 'javax.swing.JSeparator'
java_import 'javax.swing.JTextField'
java_import 'javax.swing.UIManager'
java_import 'net.miginfocom.swing.MigLayout'
# Run the GUI
f = WatirRobotGui::MainFrame.new
f.run_remote_server
f.set_size(280, 280)
f.pack
f.visible = true
## Instruction:
Set environment variable to use local gem repo from extracted jar file
## Code After:
$LOAD_PATH << File.expand_path(File.dirname(__FILE__))
# Add local gem repository created from extracted
# JAR archive of gems
ENV['GEM_PATH'] = File.join(File.expand_path(File.dirname(__FILE__)), '../lib/ruby/wr-gems')
require 'java'
require 'watir_robot_gui/main_frame'
require 'watir_robot_gui/worker/edit_button'
require 'watir_robot_gui/worker/remote_server'
require 'watir_robot_gui/worker/run_button'
require 'watir_robot_gui/worker/html_button'
require 'watir_robot_gui/worker/xml_button'
require 'lib/java/miglayout'
require 'rubygems'
require 'robot_remote_server'
require 'watir_robot'
java_import 'javax.swing.BorderFactory'
java_import 'javax.swing.border.TitledBorder'
java_import 'javax.swing.JButton'
java_import 'javax.swing.JFileChooser'
java_import 'javax.swing.JFrame'
java_import 'javax.swing.JLabel'
java_import 'javax.swing.JPanel'
java_import 'javax.swing.JSeparator'
java_import 'javax.swing.JTextField'
java_import 'javax.swing.UIManager'
java_import 'net.miginfocom.swing.MigLayout'
# Run the GUI
f = WatirRobotGui::MainFrame.new
f.run_remote_server
f.set_size(280, 280)
f.pack
f.visible = true
|
0b632368b4991621696a7f7a396afecf61e6ccc3
|
tools/examples/geturl.py
|
tools/examples/geturl.py
|
import sys
import svn._wc
import svn.util
def main(pool, files):
for f in files:
entry = svn._wc.svn_wc_entry(f, 0, pool)
print svn._wc.svn_wc_entry_t_url_get(entry)
if __name__ == '__main__':
svn.util.run_app(main, sys.argv[1:])
|
import os
import sys
import svn.wc
import svn.util
def main(pool, files):
for f in files:
dirpath = fullpath = os.path.abspath(f)
if not os.path.isdir(dirpath):
dirpath = os.path.dirname(dirpath)
adm_baton = svn.wc.svn_wc_adm_open(None, dirpath, 1, 1, pool)
try:
entry = svn.wc.svn_wc_entry(fullpath, adm_baton, 0, pool)
print svn.wc.svn_wc_entry_t_url_get(entry)
except:
svn.wc.svn_wc_adm_close(adm_baton)
if __name__ == '__main__':
svn.util.run_app(main, sys.argv[1:])
|
Update the example to use the new access baton stuff.
|
Update the example to use the new access baton stuff.
|
Python
|
apache-2.0
|
jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion
|
python
|
## Code Before:
import sys
import svn._wc
import svn.util
def main(pool, files):
for f in files:
entry = svn._wc.svn_wc_entry(f, 0, pool)
print svn._wc.svn_wc_entry_t_url_get(entry)
if __name__ == '__main__':
svn.util.run_app(main, sys.argv[1:])
## Instruction:
Update the example to use the new access baton stuff.
## Code After:
import os
import sys
import svn.wc
import svn.util
def main(pool, files):
for f in files:
dirpath = fullpath = os.path.abspath(f)
if not os.path.isdir(dirpath):
dirpath = os.path.dirname(dirpath)
adm_baton = svn.wc.svn_wc_adm_open(None, dirpath, 1, 1, pool)
try:
entry = svn.wc.svn_wc_entry(fullpath, adm_baton, 0, pool)
print svn.wc.svn_wc_entry_t_url_get(entry)
except:
svn.wc.svn_wc_adm_close(adm_baton)
if __name__ == '__main__':
svn.util.run_app(main, sys.argv[1:])
|
0a15dae3ae76d972d06bd9ec20ab291b2b91fe8e
|
README.md
|
README.md
|
```bash
git clone https://github.com/mathiasbynens/dotfiles.git && cd dotfiles && ./bootstrap.sh
```
When setting up a new Mac, you may want to set some sensible OS X defaults:
```bash
./.osx
```
To update, `cd` into your local `dotfiles` repository and then:
```bash
./bootstrap.sh
```
Suggestions/improvements
[welcome](https://github.com/mathiasbynens/dotfiles/issues)!
## Thanks to…
* [Gianni Chiappetta](http://gf3.ca/) for sharing his [amazing collection of dotfiles](https://github.com/gf3/dotfiles)
* [Matijs Brinkhuis](http://hotfusion.nl/) and his [homedir repository](https://github.com/matijs/homedir)
* [Jan Moesen](http://jan.moesen.nu/) (who will hopefully take [his `.bash_profile`](https://gist.github.com/1156154) and make it into a full `dotfiles` repo some day)
* [Tim Esselens](http://devel.datif.be/)
* anyone who [contributed a patch](https://github.com/mathiasbynens/dotfiles/contributors) or made a helpful suggestion
|
```bash
git clone https://github.com/mathiasbynens/dotfiles.git && cd dotfiles && ./bootstrap.sh
```
When setting up a new Mac, you may want to set some sensible OS X defaults:
```bash
./.osx
```
To update, `cd` into your local `dotfiles` repository and then:
```bash
./bootstrap.sh
```
Suggestions/improvements
[welcome](https://github.com/mathiasbynens/dotfiles/issues)!
## Thanks to…
* [Gianni Chiappetta](http://gf3.ca/) for sharing his [amazing collection of dotfiles](https://github.com/gf3/dotfiles)
* [Matijs Brinkhuis](http://hotfusion.nl/) and his [homedir repository](https://github.com/matijs/homedir)
* [Jan Moesen](http://jan.moesen.nu/) and his [ancient `.bash_profile`](https://gist.github.com/1156154) + [shiny tilde repository](https://github.com/janmoesen/tilde)
* [Tim Esselens](http://devel.datif.be/)
* anyone who [contributed a patch](https://github.com/mathiasbynens/dotfiles/contributors) or made a helpful suggestion
|
Add a link to @janmoesen’s tilde repository.
|
Add a link to @janmoesen’s tilde repository.
|
Markdown
|
mit
|
troyxmccall/dotfiles,troyxmccall/dotfiles,troyxmccall/dotfiles
|
markdown
|
## Code Before:
```bash
git clone https://github.com/mathiasbynens/dotfiles.git && cd dotfiles && ./bootstrap.sh
```
When setting up a new Mac, you may want to set some sensible OS X defaults:
```bash
./.osx
```
To update, `cd` into your local `dotfiles` repository and then:
```bash
./bootstrap.sh
```
Suggestions/improvements
[welcome](https://github.com/mathiasbynens/dotfiles/issues)!
## Thanks to…
* [Gianni Chiappetta](http://gf3.ca/) for sharing his [amazing collection of dotfiles](https://github.com/gf3/dotfiles)
* [Matijs Brinkhuis](http://hotfusion.nl/) and his [homedir repository](https://github.com/matijs/homedir)
* [Jan Moesen](http://jan.moesen.nu/) (who will hopefully take [his `.bash_profile`](https://gist.github.com/1156154) and make it into a full `dotfiles` repo some day)
* [Tim Esselens](http://devel.datif.be/)
* anyone who [contributed a patch](https://github.com/mathiasbynens/dotfiles/contributors) or made a helpful suggestion
## Instruction:
Add a link to @janmoesen’s tilde repository.
## Code After:
```bash
git clone https://github.com/mathiasbynens/dotfiles.git && cd dotfiles && ./bootstrap.sh
```
When setting up a new Mac, you may want to set some sensible OS X defaults:
```bash
./.osx
```
To update, `cd` into your local `dotfiles` repository and then:
```bash
./bootstrap.sh
```
Suggestions/improvements
[welcome](https://github.com/mathiasbynens/dotfiles/issues)!
## Thanks to…
* [Gianni Chiappetta](http://gf3.ca/) for sharing his [amazing collection of dotfiles](https://github.com/gf3/dotfiles)
* [Matijs Brinkhuis](http://hotfusion.nl/) and his [homedir repository](https://github.com/matijs/homedir)
* [Jan Moesen](http://jan.moesen.nu/) and his [ancient `.bash_profile`](https://gist.github.com/1156154) + [shiny tilde repository](https://github.com/janmoesen/tilde)
* [Tim Esselens](http://devel.datif.be/)
* anyone who [contributed a patch](https://github.com/mathiasbynens/dotfiles/contributors) or made a helpful suggestion
|
0c39deaa7160b078e9a9ac339f0464cd67c25a98
|
app/workers/gem_installer.rb
|
app/workers/gem_installer.rb
|
class GemInstaller
include SuckerPunch::Job
workers 16
WORKING = []
def perform(gem_name, version = nil)
SuckerPunch.logger.info "install #{gem_name} #{version}"
pl = Plugin.new(gem_name: gem_name, version: version)
WORKING.push(pl)
pl.uninstall! if pl.installed?
pl.install!
WORKING.delete(pl)
SuckerPunch.logger.info "installed #{gem_name} #{version}"
end
end
|
class GemInstaller
include SuckerPunch::Job
workers 16
WORKING = []
def perform(gem_name, version = nil)
SuckerPunch.logger.info "install #{gem_name} #{version}"
pl = Plugin.new(gem_name: gem_name, version: version)
unless WORKING.find{|p| p.gem_name == pl.gem_name}
WORKING.push(pl)
pl.uninstall! if pl.installed?
pl.install!
WORKING.delete(pl)
end
SuckerPunch.logger.info "installed #{gem_name} #{version}"
end
end
|
Fix to not install plugin if it is installing
|
Fix to not install plugin if it is installing
|
Ruby
|
apache-2.0
|
mt0803/fluentd-ui,fluent/fluentd-ui,mt0803/fluentd-ui,fluent/fluentd-ui,mt0803/fluentd-ui,fluent/fluentd-ui
|
ruby
|
## Code Before:
class GemInstaller
include SuckerPunch::Job
workers 16
WORKING = []
def perform(gem_name, version = nil)
SuckerPunch.logger.info "install #{gem_name} #{version}"
pl = Plugin.new(gem_name: gem_name, version: version)
WORKING.push(pl)
pl.uninstall! if pl.installed?
pl.install!
WORKING.delete(pl)
SuckerPunch.logger.info "installed #{gem_name} #{version}"
end
end
## Instruction:
Fix to not install plugin if it is installing
## Code After:
class GemInstaller
include SuckerPunch::Job
workers 16
WORKING = []
def perform(gem_name, version = nil)
SuckerPunch.logger.info "install #{gem_name} #{version}"
pl = Plugin.new(gem_name: gem_name, version: version)
unless WORKING.find{|p| p.gem_name == pl.gem_name}
WORKING.push(pl)
pl.uninstall! if pl.installed?
pl.install!
WORKING.delete(pl)
end
SuckerPunch.logger.info "installed #{gem_name} #{version}"
end
end
|
028c8a22b05412ff8a98e0dd5d13b48c296ab3a0
|
runTests.js
|
runTests.js
|
'use strict';
/**
* Run package tests.
* (C) 2013 Alex Fernández.
*/
// requires
var testing = require('testing');
/**
* Test that a new object is clean: has no functions.
* Same for string and array.
*/
function testCleanObjects(callback)
{
var object = {};
for (var key in object)
{
testing.fail('New object has attribute %s', key, callback);
}
var string = '';
for (key in string)
{
testing.fail('New string has attribute %s', key, callback);
}
testing.success(callback);
}
/**
* Run all module tests.
*/
exports.test = function(callback)
{
var tests = {
cleanObjects: testCleanObjects,
};
var files = [ 'core', 'string', 'array', 'math', 'object' ];
files.forEach(function(file)
{
tests[file] = require('./test/' + file + '.js').test;
});
testing.run(tests, callback);
};
// run tests if invoked directly
if (__filename == process.argv[1])
{
exports.test(testing.show);
}
|
'use strict';
/**
* Run package tests.
* (C) 2013 Alex Fernández.
*/
// requires
var testing = require('testing');
var _prettyPrint = require('util').inspect;
/**
* Test that new objects, strings, arrays, numbers
* and regular expressions have no enumerable properties.
*/
function testCleanObjects(callback)
{
_assertIsClean({}, callback);
_assertIsClean('', callback);
_assertIsClean([], callback);
_assertIsClean(41.5, callback);
_assertIsClean(/abc/, callback);
testing.success(callback);
}
function _assertIsClean(newObject, callback) {
for (var key in newObject) {
testing.failure('New object ' +
_prettyPrint(newObject) +
' has enumerable property %s', key, callback);
}
}
/**
* Run all module tests.
*/
exports.test = function(callback)
{
var tests = {
cleanObjects: testCleanObjects,
};
var files = [ 'core', 'string', 'array', 'math', 'object' ];
files.forEach(function(file)
{
tests[file] = require('./test/' + file + '.js').test;
});
testing.run(tests, callback);
};
// run tests if invoked directly
if (__filename == process.argv[1])
{
exports.test(testing.show);
}
|
Complete tests for checking that no new enumerable properties are being added to new objects.
|
Complete tests for checking that no new enumerable properties are being added to new objects.
Added tests for array, number and regexp.
Extracted assertion to its own method.
|
JavaScript
|
mit
|
alexfernandez/prototypes
|
javascript
|
## Code Before:
'use strict';
/**
* Run package tests.
* (C) 2013 Alex Fernández.
*/
// requires
var testing = require('testing');
/**
* Test that a new object is clean: has no functions.
* Same for string and array.
*/
function testCleanObjects(callback)
{
var object = {};
for (var key in object)
{
testing.fail('New object has attribute %s', key, callback);
}
var string = '';
for (key in string)
{
testing.fail('New string has attribute %s', key, callback);
}
testing.success(callback);
}
/**
* Run all module tests.
*/
exports.test = function(callback)
{
var tests = {
cleanObjects: testCleanObjects,
};
var files = [ 'core', 'string', 'array', 'math', 'object' ];
files.forEach(function(file)
{
tests[file] = require('./test/' + file + '.js').test;
});
testing.run(tests, callback);
};
// run tests if invoked directly
if (__filename == process.argv[1])
{
exports.test(testing.show);
}
## Instruction:
Complete tests for checking that no new enumerable properties are being added to new objects.
Added tests for array, number and regexp.
Extracted assertion to its own method.
## Code After:
'use strict';
/**
* Run package tests.
* (C) 2013 Alex Fernández.
*/
// requires
var testing = require('testing');
var _prettyPrint = require('util').inspect;
/**
* Test that new objects, strings, arrays, numbers
* and regular expressions have no enumerable properties.
*/
function testCleanObjects(callback)
{
_assertIsClean({}, callback);
_assertIsClean('', callback);
_assertIsClean([], callback);
_assertIsClean(41.5, callback);
_assertIsClean(/abc/, callback);
testing.success(callback);
}
function _assertIsClean(newObject, callback) {
for (var key in newObject) {
testing.failure('New object ' +
_prettyPrint(newObject) +
' has enumerable property %s', key, callback);
}
}
/**
* Run all module tests.
*/
exports.test = function(callback)
{
var tests = {
cleanObjects: testCleanObjects,
};
var files = [ 'core', 'string', 'array', 'math', 'object' ];
files.forEach(function(file)
{
tests[file] = require('./test/' + file + '.js').test;
});
testing.run(tests, callback);
};
// run tests if invoked directly
if (__filename == process.argv[1])
{
exports.test(testing.show);
}
|
0e6fed14e0be4c49a199bdc2d585335f302d5a10
|
ci-scripts/tripleo-upstream/dlrnapi_venv.sh
|
ci-scripts/tripleo-upstream/dlrnapi_venv.sh
|
function activate_dlrnapi_venv {
if [ ! -d $WORKSPACE/dlrnapi_venv ]; then
virtualenv --system-site-packages $WORKSPACE/dlrnapi_venv
fi
source $WORKSPACE/dlrnapi_venv/bin/activate
pip install -U dlrnapi_client shyaml
}
function deactivate_dlrnapi_venv {
# deactivate can fail with unbound variable, so we need +u
set +u
[[ $VIRTUAL_ENV = $WORKSPACE/dlrnapi_venv ]] && deactivate
}
|
function activate_dlrnapi_venv {
if [ ! -d $WORKSPACE/dlrnapi_venv ]; then
if [ $(command -v virtualenv) ]; then
virtualenv --system-site-packages $WORKSPACE/dlrnapi_venv
else
python3 -m venv --system-site-packages $WORKSPACE/dlrnapi_venv
fi
fi
source $WORKSPACE/dlrnapi_venv/bin/activate
pip install -U dlrnapi_client shyaml
}
function deactivate_dlrnapi_venv {
# deactivate can fail with unbound variable, so we need +u
set +u
[[ $VIRTUAL_ENV = $WORKSPACE/dlrnapi_venv ]] && deactivate
}
|
Use venv module if virtualenv not installed
|
Use venv module if virtualenv not installed
In Centos9, virtualenv is not installed on default image.
With python3, We don't need virtualenv and we can use
"python3 -m venv".
Before moving entirely to "python3 -m venv" we should enforce
use of python3 for promoter, Some efforts were made in past
to do that[1].
Once we "enforce the use of python3 for promoter" we can just
use "python3 -m venv" instead of relying on virtualenv.
[1] https://review.rdoproject.org/r/c/rdo-infra/ci-config/+/28208
Change-Id: I46bdb1063cca414e7a9093f6c17347fb69e976b9
|
Shell
|
apache-2.0
|
redhat-openstack/rdo-infra,rdo-infra/ci-config,rdo-infra/ci-config,redhat-openstack/rdo-infra,redhat-openstack/rdo-infra,rdo-infra/ci-config,redhat-openstack/rdo-infra,rdo-infra/ci-config
|
shell
|
## Code Before:
function activate_dlrnapi_venv {
if [ ! -d $WORKSPACE/dlrnapi_venv ]; then
virtualenv --system-site-packages $WORKSPACE/dlrnapi_venv
fi
source $WORKSPACE/dlrnapi_venv/bin/activate
pip install -U dlrnapi_client shyaml
}
function deactivate_dlrnapi_venv {
# deactivate can fail with unbound variable, so we need +u
set +u
[[ $VIRTUAL_ENV = $WORKSPACE/dlrnapi_venv ]] && deactivate
}
## Instruction:
Use venv module if virtualenv not installed
In Centos9, virtualenv is not installed on default image.
With python3, We don't need virtualenv and we can use
"python3 -m venv".
Before moving entirely to "python3 -m venv" we should enforce
use of python3 for promoter, Some efforts were made in past
to do that[1].
Once we "enforce the use of python3 for promoter" we can just
use "python3 -m venv" instead of relying on virtualenv.
[1] https://review.rdoproject.org/r/c/rdo-infra/ci-config/+/28208
Change-Id: I46bdb1063cca414e7a9093f6c17347fb69e976b9
## Code After:
function activate_dlrnapi_venv {
if [ ! -d $WORKSPACE/dlrnapi_venv ]; then
if [ $(command -v virtualenv) ]; then
virtualenv --system-site-packages $WORKSPACE/dlrnapi_venv
else
python3 -m venv --system-site-packages $WORKSPACE/dlrnapi_venv
fi
fi
source $WORKSPACE/dlrnapi_venv/bin/activate
pip install -U dlrnapi_client shyaml
}
function deactivate_dlrnapi_venv {
# deactivate can fail with unbound variable, so we need +u
set +u
[[ $VIRTUAL_ENV = $WORKSPACE/dlrnapi_venv ]] && deactivate
}
|
57f24f02f8b215c347908c1a0d3b3f0d72617f10
|
examples/trivial/package.json
|
examples/trivial/package.json
|
{
"name": "@folio/trivial",
"version": "0.0.2-test",
"description": "A trivial Stripes module.",
"repository": "folio-org/stripes-experiments",
"publishConfig" : {
"registry" : "https://repository.folio.org/repository/npm-folio/"
},
"license": "Apache-2.0",
"engines": {
"node": ">=6.0.0"
},
"main": "About.js",
"stripes": {
"type": "app",
"displayName": "Trivial",
"route": "/trivial",
"okapiInterfaces": {
},
"permissionSets": [
{
"permissionName": "module.trivial.enabled",
"displayName": "UI: Trivial module is enabled"
}
]
}
}
|
{
"name": "@folio/trivial",
"version": "1.0.0",
"description": "A trivial Stripes module.",
"repository": "folio-org/stripes-experiments",
"publishConfig" : {
"registry" : "https://repository.folio.org/repository/npm-folio/"
},
"license": "Apache-2.0",
"engines": {
"node": ">=6.0.0"
},
"main": "About.js",
"stripes": {
"type": "app",
"displayName": "Trivial",
"route": "/trivial",
"okapiInterfaces": {
},
"permissionSets": [
{
"permissionName": "module.trivial.enabled",
"displayName": "UI: Trivial module is enabled"
}
]
},
"dependencies": {
"react": "^15.6.1",
"react-router-dom": "^4.1.1"
}
}
|
Add dependencies; bump Trivial module version to 1.0.0
|
Add dependencies; bump Trivial module version to 1.0.0
|
JSON
|
apache-2.0
|
folio-org/stripes-core,folio-org/stripes-core,folio-org/stripes-core
|
json
|
## Code Before:
{
"name": "@folio/trivial",
"version": "0.0.2-test",
"description": "A trivial Stripes module.",
"repository": "folio-org/stripes-experiments",
"publishConfig" : {
"registry" : "https://repository.folio.org/repository/npm-folio/"
},
"license": "Apache-2.0",
"engines": {
"node": ">=6.0.0"
},
"main": "About.js",
"stripes": {
"type": "app",
"displayName": "Trivial",
"route": "/trivial",
"okapiInterfaces": {
},
"permissionSets": [
{
"permissionName": "module.trivial.enabled",
"displayName": "UI: Trivial module is enabled"
}
]
}
}
## Instruction:
Add dependencies; bump Trivial module version to 1.0.0
## Code After:
{
"name": "@folio/trivial",
"version": "1.0.0",
"description": "A trivial Stripes module.",
"repository": "folio-org/stripes-experiments",
"publishConfig" : {
"registry" : "https://repository.folio.org/repository/npm-folio/"
},
"license": "Apache-2.0",
"engines": {
"node": ">=6.0.0"
},
"main": "About.js",
"stripes": {
"type": "app",
"displayName": "Trivial",
"route": "/trivial",
"okapiInterfaces": {
},
"permissionSets": [
{
"permissionName": "module.trivial.enabled",
"displayName": "UI: Trivial module is enabled"
}
]
},
"dependencies": {
"react": "^15.6.1",
"react-router-dom": "^4.1.1"
}
}
|
bad82c20ababbe60f7250c3ab8bfda06e9c60e64
|
index.html
|
index.html
|
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Samuel Huang</title>
</head>
<body>
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-TR82HB"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-TR82HB');</script>
<!-- End Google Tag Manager -->
<h1>A Thinking Coder</h1>
<p>If I ain't coding, I'm thinking how to code.</p>
</body>
</html>
|
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="description" content="Samuel Huang's personal website">
<meta name="keywords" content="Samuel Huang, Samuel, samuel22gj">
<meta name="author" content="Samuel Huang">
<title>Samuel Huang</title>
</head>
<body>
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-TR82HB"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-TR82HB');</script>
<!-- End Google Tag Manager -->
<h1>A Thinking Coder</h1>
<p>If I ain't coding, I'm thinking how to code.</p>
</body>
</html>
|
Add meta data: desc, keyword and arthor
|
Add meta data: desc, keyword and arthor
|
HTML
|
apache-2.0
|
samuel22gj/samuel22gj.github.io,samuel22gj/samuel22gj.github.io
|
html
|
## Code Before:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Samuel Huang</title>
</head>
<body>
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-TR82HB"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-TR82HB');</script>
<!-- End Google Tag Manager -->
<h1>A Thinking Coder</h1>
<p>If I ain't coding, I'm thinking how to code.</p>
</body>
</html>
## Instruction:
Add meta data: desc, keyword and arthor
## Code After:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="description" content="Samuel Huang's personal website">
<meta name="keywords" content="Samuel Huang, Samuel, samuel22gj">
<meta name="author" content="Samuel Huang">
<title>Samuel Huang</title>
</head>
<body>
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-TR82HB"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-TR82HB');</script>
<!-- End Google Tag Manager -->
<h1>A Thinking Coder</h1>
<p>If I ain't coding, I'm thinking how to code.</p>
</body>
</html>
|
7bb03d4a30d9da15c0f21424bd503b4330a9da98
|
src/Backend/Modules/MediaLibrary/Ajax/MediaItemGetAllById.php
|
src/Backend/Modules/MediaLibrary/Ajax/MediaItemGetAllById.php
|
<?php
namespace Backend\Modules\MediaLibrary\Ajax;
use Backend\Core\Engine\Base\AjaxAction as BackendBaseAJAXAction;
use Symfony\Component\HttpFoundation\Response;
/**
* This AJAX-action will get all media items for a group,
* which was trying to be saved, but another parent error appeared.
*/
class MediaItemGetAllById extends BackendBaseAJAXAction
{
public function execute(): void
{
parent::execute();
// Output success message with variables
$this->output(
Response::HTTP_OK,
[
'items' => $this->getMediaItems(),
]
);
}
protected function getMediaItems(): array
{
/** @var array $ids */
$ids = explode(',', $this->getRequest()->request->get('media_ids'));
// We have no ids
if ($ids === null) {
return [];
}
return $this->get('media_library.repository.item')->findById($ids);
}
}
|
<?php
namespace Backend\Modules\MediaLibrary\Ajax;
use Backend\Core\Engine\Base\AjaxAction as BackendBaseAJAXAction;
use Symfony\Component\HttpFoundation\Response;
/**
* This AJAX-action will get all media items for a group,
* which was trying to be saved, but another parent error appeared.
*/
class MediaItemGetAllById extends BackendBaseAJAXAction
{
public function execute(): void
{
parent::execute();
// Output success message with variables
$this->output(
Response::HTTP_OK,
[
'items' => $this->getMediaItems(),
]
);
}
protected function getMediaItems(): array
{
/** @var array $ids */
$ids = explode(',', $this->getRequest()->request->get('media_ids'));
// We have no ids
if (empty($ids)) {
return [];
}
return $this->get('media_library.repository.item')->findById($ids);
}
}
|
Use the correct test to see if explode returned no results
|
Use the correct test to see if explode returned no results
|
PHP
|
mit
|
carakas/forkcms,jacob-v-dam/forkcms,jonasdekeukelaere/forkcms,jessedobbelaere/forkcms,justcarakas/forkcms,justcarakas/forkcms,carakas/forkcms,Katrienvh/forkcms,sumocoders/forkcms,jonasdekeukelaere/forkcms,bartdc/forkcms,sumocoders/forkcms,jessedobbelaere/forkcms,Katrienvh/forkcms,jonasdekeukelaere/forkcms,carakas/forkcms,sumocoders/forkcms,justcarakas/forkcms,jacob-v-dam/forkcms,carakas/forkcms,jacob-v-dam/forkcms,bartdc/forkcms,jacob-v-dam/forkcms,forkcms/forkcms,jonasdekeukelaere/forkcms,jonasdekeukelaere/forkcms,jessedobbelaere/forkcms,carakas/forkcms,jessedobbelaere/forkcms,bartdc/forkcms,forkcms/forkcms,forkcms/forkcms,sumocoders/forkcms,forkcms/forkcms,Katrienvh/forkcms,Katrienvh/forkcms,sumocoders/forkcms
|
php
|
## Code Before:
<?php
namespace Backend\Modules\MediaLibrary\Ajax;
use Backend\Core\Engine\Base\AjaxAction as BackendBaseAJAXAction;
use Symfony\Component\HttpFoundation\Response;
/**
* This AJAX-action will get all media items for a group,
* which was trying to be saved, but another parent error appeared.
*/
class MediaItemGetAllById extends BackendBaseAJAXAction
{
public function execute(): void
{
parent::execute();
// Output success message with variables
$this->output(
Response::HTTP_OK,
[
'items' => $this->getMediaItems(),
]
);
}
protected function getMediaItems(): array
{
/** @var array $ids */
$ids = explode(',', $this->getRequest()->request->get('media_ids'));
// We have no ids
if ($ids === null) {
return [];
}
return $this->get('media_library.repository.item')->findById($ids);
}
}
## Instruction:
Use the correct test to see if explode returned no results
## Code After:
<?php
namespace Backend\Modules\MediaLibrary\Ajax;
use Backend\Core\Engine\Base\AjaxAction as BackendBaseAJAXAction;
use Symfony\Component\HttpFoundation\Response;
/**
* This AJAX-action will get all media items for a group,
* which was trying to be saved, but another parent error appeared.
*/
class MediaItemGetAllById extends BackendBaseAJAXAction
{
public function execute(): void
{
parent::execute();
// Output success message with variables
$this->output(
Response::HTTP_OK,
[
'items' => $this->getMediaItems(),
]
);
}
protected function getMediaItems(): array
{
/** @var array $ids */
$ids = explode(',', $this->getRequest()->request->get('media_ids'));
// We have no ids
if (empty($ids)) {
return [];
}
return $this->get('media_library.repository.item')->findById($ids);
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.