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
|
---|---|---|---|---|---|---|---|---|---|---|---|
26c8eb5aca2a792bfde61777664813cf1ffc7cb0
|
README.md
|
README.md
|

WeTracker is a project to create an online, collaborative music creation suite.
The interface is designed to be flexible and configurable, using
[react-grid-layout](https://github.com/STRML/react-grid-layout) for layout, which
allows an infinite amount of configuration, place your widgets in any location you
like, instead of being constrained to the typical docker style interface. The
screenshot above shows the current, work-in-progress,
[tracker](https://en.wikipedia.org/wiki/Music_tracker) style interface, this is
just one of the planned methods for editing music, others will follow, including
a more traditional horizontal style. The underlying music framework is able to
support multiple visual representations.
The project will ultimately allow collaborative editing at varyious levels,
including live interactive editing by multiple users, and turn based non-realtime
music creation.
This project is very early in its development, feel free to provide feedback and
ideas, or clone the project and contribute via pull requests.
WeTracker is built on React, using
[react-boilerplate](https://github.com/mxstbr/react-boilerplate). To try it out
for yourself, clone this repo and run:
```
npm install
npm run start
```
|

Take a look at a short video of the current status [here](https://youtu.be/YHOuZ-R9W3g)
WeTracker is a project to create an online, collaborative music creation suite.
The interface is designed to be flexible and configurable, using
[react-grid-layout](https://github.com/STRML/react-grid-layout) for layout, which
allows an infinite amount of configuration, place your widgets in any location you
like, instead of being constrained to the typical docker style interface. The
screenshot above shows the current, work-in-progress,
[tracker](https://en.wikipedia.org/wiki/Music_tracker) style interface, this is
just one of the planned methods for editing music, others will follow, including
a more traditional horizontal style. The underlying music framework is able to
support multiple visual representations.
The project will ultimately allow collaborative editing at varyious levels,
including live interactive editing by multiple users, and turn based non-realtime
music creation.
This project is very early in its development, feel free to provide feedback and
ideas, or clone the project and contribute via pull requests.
WeTracker is built on React, using
[react-boilerplate](https://github.com/mxstbr/react-boilerplate). To try it out
for yourself, clone this repo and run:
```
npm install
npm run start
```
|
Add link to youtube video.
|
Add link to youtube video.
|
Markdown
|
mit
|
pgregory/wetracker,pgregory/wetracker
|
markdown
|
## Code Before:

WeTracker is a project to create an online, collaborative music creation suite.
The interface is designed to be flexible and configurable, using
[react-grid-layout](https://github.com/STRML/react-grid-layout) for layout, which
allows an infinite amount of configuration, place your widgets in any location you
like, instead of being constrained to the typical docker style interface. The
screenshot above shows the current, work-in-progress,
[tracker](https://en.wikipedia.org/wiki/Music_tracker) style interface, this is
just one of the planned methods for editing music, others will follow, including
a more traditional horizontal style. The underlying music framework is able to
support multiple visual representations.
The project will ultimately allow collaborative editing at varyious levels,
including live interactive editing by multiple users, and turn based non-realtime
music creation.
This project is very early in its development, feel free to provide feedback and
ideas, or clone the project and contribute via pull requests.
WeTracker is built on React, using
[react-boilerplate](https://github.com/mxstbr/react-boilerplate). To try it out
for yourself, clone this repo and run:
```
npm install
npm run start
```
## Instruction:
Add link to youtube video.
## Code After:

Take a look at a short video of the current status [here](https://youtu.be/YHOuZ-R9W3g)
WeTracker is a project to create an online, collaborative music creation suite.
The interface is designed to be flexible and configurable, using
[react-grid-layout](https://github.com/STRML/react-grid-layout) for layout, which
allows an infinite amount of configuration, place your widgets in any location you
like, instead of being constrained to the typical docker style interface. The
screenshot above shows the current, work-in-progress,
[tracker](https://en.wikipedia.org/wiki/Music_tracker) style interface, this is
just one of the planned methods for editing music, others will follow, including
a more traditional horizontal style. The underlying music framework is able to
support multiple visual representations.
The project will ultimately allow collaborative editing at varyious levels,
including live interactive editing by multiple users, and turn based non-realtime
music creation.
This project is very early in its development, feel free to provide feedback and
ideas, or clone the project and contribute via pull requests.
WeTracker is built on React, using
[react-boilerplate](https://github.com/mxstbr/react-boilerplate). To try it out
for yourself, clone this repo and run:
```
npm install
npm run start
```
|
ab1a4cb4e3737a8f1036096de701ce5a7a8d35d7
|
lib/store_schema/converter/boolean.rb
|
lib/store_schema/converter/boolean.rb
|
require_relative "base"
class StoreSchema::Converter::Boolean < StoreSchema::Converter::Base
# @return [String] the database representation of a true value.
#
DB_TRUE_VALUE = "t"
# @return [Array] all the values that are considered to be truthy.
#
TRUE_VALUES = [true, 1, "1", "t", "T", "true", "TRUE", "on", "ON"]
# @return [Array] all the values that are considered to be falsy.
#
FALSE_VALUES = [false, 0, "0", "f", "F", "false", "FALSE", "off", "OFF"]
# @return [Object]
#
attr_reader :value
# @param [Object] value
#
def initialize(value)
@value = value
end
# Converts the {#value} to a database-storable value.
#
# @return [String, false] false if {#value} is an invalid date-type.
#
def to_db
if TRUE_VALUES.include?(value)
"t"
elsif FALSE_VALUES.include?(value)
"f"
else
false
end
end
# Converts the {#value} to a Ruby-type value.
#
# @return [true, false]
#
def from_db
value == DB_TRUE_VALUE
end
end
|
require_relative "base"
class StoreSchema::Converter::Boolean < StoreSchema::Converter::Base
# @return [String] the database representation of a true value.
#
DB_TRUE_VALUE = "t"
# @return [Array] all the values that are considered to be truthy.
#
TRUE_VALUES = [true, 1, "1", "t", "T", "true", "TRUE", "on", "ON"]
# @return [Array] all the values that are considered to be falsy.
#
FALSE_VALUES = [false, 0, "0", "f", "F", "false", "FALSE", "off", "OFF"]
# @return [Object]
#
attr_reader :value
# @param [Object] value
#
def initialize(value)
@value = value
end
# Converts the {#value} to a database-storable value.
#
# @return [String, false] false if {#value} is an invalid date-type.
#
def to_db
if TRUE_VALUES.include?(value)
DB_TRUE_VALUE
elsif FALSE_VALUES.include?(value)
"f"
else
false
end
end
# Converts the {#value} to a Ruby-type value.
#
# @return [true, false]
#
def from_db
value == DB_TRUE_VALUE
end
end
|
Return `DB_TRUE_VALUE` instead of "t" to avoid multiple memory allocations and to ensure consistency.
|
Return `DB_TRUE_VALUE` instead of "t" to avoid multiple memory allocations and to ensure consistency.
|
Ruby
|
mit
|
meskyanichi/store_schema,mrrooijen/store_schema
|
ruby
|
## Code Before:
require_relative "base"
class StoreSchema::Converter::Boolean < StoreSchema::Converter::Base
# @return [String] the database representation of a true value.
#
DB_TRUE_VALUE = "t"
# @return [Array] all the values that are considered to be truthy.
#
TRUE_VALUES = [true, 1, "1", "t", "T", "true", "TRUE", "on", "ON"]
# @return [Array] all the values that are considered to be falsy.
#
FALSE_VALUES = [false, 0, "0", "f", "F", "false", "FALSE", "off", "OFF"]
# @return [Object]
#
attr_reader :value
# @param [Object] value
#
def initialize(value)
@value = value
end
# Converts the {#value} to a database-storable value.
#
# @return [String, false] false if {#value} is an invalid date-type.
#
def to_db
if TRUE_VALUES.include?(value)
"t"
elsif FALSE_VALUES.include?(value)
"f"
else
false
end
end
# Converts the {#value} to a Ruby-type value.
#
# @return [true, false]
#
def from_db
value == DB_TRUE_VALUE
end
end
## Instruction:
Return `DB_TRUE_VALUE` instead of "t" to avoid multiple memory allocations and to ensure consistency.
## Code After:
require_relative "base"
class StoreSchema::Converter::Boolean < StoreSchema::Converter::Base
# @return [String] the database representation of a true value.
#
DB_TRUE_VALUE = "t"
# @return [Array] all the values that are considered to be truthy.
#
TRUE_VALUES = [true, 1, "1", "t", "T", "true", "TRUE", "on", "ON"]
# @return [Array] all the values that are considered to be falsy.
#
FALSE_VALUES = [false, 0, "0", "f", "F", "false", "FALSE", "off", "OFF"]
# @return [Object]
#
attr_reader :value
# @param [Object] value
#
def initialize(value)
@value = value
end
# Converts the {#value} to a database-storable value.
#
# @return [String, false] false if {#value} is an invalid date-type.
#
def to_db
if TRUE_VALUES.include?(value)
DB_TRUE_VALUE
elsif FALSE_VALUES.include?(value)
"f"
else
false
end
end
# Converts the {#value} to a Ruby-type value.
#
# @return [true, false]
#
def from_db
value == DB_TRUE_VALUE
end
end
|
86c890ad1f2249b79c9da92bf33cc819900c4ee6
|
README.md
|
README.md
|
panonoctl
========
Python API to interact with the [PANONO](https://www.panono.com) 360-camera.
Documentation
=============
### Connect
```python
>>> from panonoctl import panono
>>> cam = panono()
>>> cam.connect()
```
License
=======
Copyright 2016 Florian Lehner
Licensed under the Apache License, Version 2.0: [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
panonoctl
========
Python API to interact with the [PANONO](https://www.panono.com) 360-camera.
Install
=======
To install, execute:
```
pip install panonoctl
```
Documentation
=============
### Connect
```python
>>> from panonoctl import panono
>>> cam = panono()
>>> cam.connect()
```
License
=======
Copyright 2016 Florian Lehner
Licensed under the Apache License, Version 2.0: [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
Add info about pypi support
|
Add info about pypi support
Signed-off-by: Lehner Florian <[email protected]>
|
Markdown
|
apache-2.0
|
florianl/panonoctl
|
markdown
|
## Code Before:
panonoctl
========
Python API to interact with the [PANONO](https://www.panono.com) 360-camera.
Documentation
=============
### Connect
```python
>>> from panonoctl import panono
>>> cam = panono()
>>> cam.connect()
```
License
=======
Copyright 2016 Florian Lehner
Licensed under the Apache License, Version 2.0: [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
## Instruction:
Add info about pypi support
Signed-off-by: Lehner Florian <[email protected]>
## Code After:
panonoctl
========
Python API to interact with the [PANONO](https://www.panono.com) 360-camera.
Install
=======
To install, execute:
```
pip install panonoctl
```
Documentation
=============
### Connect
```python
>>> from panonoctl import panono
>>> cam = panono()
>>> cam.connect()
```
License
=======
Copyright 2016 Florian Lehner
Licensed under the Apache License, Version 2.0: [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
cc794aab05c8c605867185349a099b2c0bbf6a1e
|
app/models/mdm/user.rb
|
app/models/mdm/user.rb
|
class Mdm::User < ActiveRecord::Base
extend MetasploitDataModels::SerializedPrefs
#
# Associations
#
has_many :owned_workspaces,
class_name: 'Mdm::Workspace',
foreign_key: 'owner_id',
inverse_of: :owner
has_many :tags,
class_name: 'Mdm::Tag',
inverse_of: :user
has_and_belongs_to_many :workspaces, -> { uniq }, :join_table => 'workspace_members', :class_name => 'Mdm::Workspace'
#
# Serialziations
#
serialize :prefs, MetasploitDataModels::Base64Serializer.new
serialized_prefs_attr_accessor :nexpose_host, :nexpose_port, :nexpose_user, :nexpose_pass, :nexpose_creds_type, :nexpose_creds_user, :nexpose_creds_pass
serialized_prefs_attr_accessor :http_proxy_host, :http_proxy_port, :http_proxy_user, :http_proxy_pass
serialized_prefs_attr_accessor :time_zone, :session_key
serialized_prefs_attr_accessor :last_login_address # specifically NOT last_login_ip to prevent confusion with AuthLogic magic columns (which dont work for serialized fields)
Metasploit::Concern.run(self)
end
|
class Mdm::User < ActiveRecord::Base
extend MetasploitDataModels::SerializedPrefs
#
# Associations
#
has_many :owned_workspaces,
class_name: 'Mdm::Workspace',
foreign_key: 'owner_id',
inverse_of: :owner
has_many :tags,
class_name: 'Mdm::Tag',
inverse_of: :user
has_and_belongs_to_many :workspaces, -> { uniq }, :join_table => 'workspace_members', :class_name => 'Mdm::Workspace'
#
# Serialziations
#
serialize :prefs, MetasploitDataModels::Base64Serializer.new
serialized_prefs_attr_accessor :nexpose_host, :nexpose_port, :nexpose_user, :nexpose_pass, :nexpose_creds_type, :nexpose_creds_user, :nexpose_creds_pass
serialized_prefs_attr_accessor :http_proxy_host, :http_proxy_port, :http_proxy_user, :http_proxy_pass
serialized_prefs_attr_accessor :time_zone, :session_key
serialized_prefs_attr_accessor :last_login_address # specifically NOT last_login_ip to prevent confusion with AuthLogic magic columns (which dont work for serialized fields)
# Model Associations
attr_accessible :owned_workspaces, :tags, :workspaces
Metasploit::Concern.run(self)
end
|
Revert "Drop another attr_accessible call"
|
Revert "Drop another attr_accessible call"
This reverts commit c5bcead4c75126e093ac7717886105b3bb256a1e.
|
Ruby
|
bsd-3-clause
|
farias-r7/metasploit_data_models,rapid7/metasploit_data_models,bcook-r7/metasploit_data_models,farias-r7/metasploit_data_models,rapid7/metasploit_data_models,farias-r7/metasploit_data_models,bcook-r7/metasploit_data_models,bcook-r7/metasploit_data_models,rapid7/metasploit_data_models
|
ruby
|
## Code Before:
class Mdm::User < ActiveRecord::Base
extend MetasploitDataModels::SerializedPrefs
#
# Associations
#
has_many :owned_workspaces,
class_name: 'Mdm::Workspace',
foreign_key: 'owner_id',
inverse_of: :owner
has_many :tags,
class_name: 'Mdm::Tag',
inverse_of: :user
has_and_belongs_to_many :workspaces, -> { uniq }, :join_table => 'workspace_members', :class_name => 'Mdm::Workspace'
#
# Serialziations
#
serialize :prefs, MetasploitDataModels::Base64Serializer.new
serialized_prefs_attr_accessor :nexpose_host, :nexpose_port, :nexpose_user, :nexpose_pass, :nexpose_creds_type, :nexpose_creds_user, :nexpose_creds_pass
serialized_prefs_attr_accessor :http_proxy_host, :http_proxy_port, :http_proxy_user, :http_proxy_pass
serialized_prefs_attr_accessor :time_zone, :session_key
serialized_prefs_attr_accessor :last_login_address # specifically NOT last_login_ip to prevent confusion with AuthLogic magic columns (which dont work for serialized fields)
Metasploit::Concern.run(self)
end
## Instruction:
Revert "Drop another attr_accessible call"
This reverts commit c5bcead4c75126e093ac7717886105b3bb256a1e.
## Code After:
class Mdm::User < ActiveRecord::Base
extend MetasploitDataModels::SerializedPrefs
#
# Associations
#
has_many :owned_workspaces,
class_name: 'Mdm::Workspace',
foreign_key: 'owner_id',
inverse_of: :owner
has_many :tags,
class_name: 'Mdm::Tag',
inverse_of: :user
has_and_belongs_to_many :workspaces, -> { uniq }, :join_table => 'workspace_members', :class_name => 'Mdm::Workspace'
#
# Serialziations
#
serialize :prefs, MetasploitDataModels::Base64Serializer.new
serialized_prefs_attr_accessor :nexpose_host, :nexpose_port, :nexpose_user, :nexpose_pass, :nexpose_creds_type, :nexpose_creds_user, :nexpose_creds_pass
serialized_prefs_attr_accessor :http_proxy_host, :http_proxy_port, :http_proxy_user, :http_proxy_pass
serialized_prefs_attr_accessor :time_zone, :session_key
serialized_prefs_attr_accessor :last_login_address # specifically NOT last_login_ip to prevent confusion with AuthLogic magic columns (which dont work for serialized fields)
# Model Associations
attr_accessible :owned_workspaces, :tags, :workspaces
Metasploit::Concern.run(self)
end
|
130f0f6193a9ebc5914569f911ade2cec7b31127
|
app/Resources/TwigBundle/views/Exception/error403.html.twig
|
app/Resources/TwigBundle/views/Exception/error403.html.twig
|
{% extends 'SonataAdminBundle::empty_layout.html.twig' %}
{% block sonata_page_content %}
<h1>Σφάλμα</h1>
<div>
O υπάρχων λογαριασμός δεν έχει δικαίωμα πρόσβασης στην εφαρμογή "Μητρώο Υποστηρικτικών δομών - Μη Σχολικών Μονάδων" (ή υπάρχει τεχνικό πρόβλημα που δεν επιτρέπει την πιστοποίηση του).<BR />
Η πρόσβαση επιτρέπεται μόνο με τον επίσημο λογαριασμό μη σχολικής μονάδας.<BR />
<BR />
<a href="{{ url('fos_user_security_logout') }}">Αποσύνδεση</a>
</div>
{% endblock %}
|
{% extends 'SonataAdminBundle::empty_layout.html.twig' %}
{% block sonata_page_content %}
<h1>Σφάλμα</h1>
<div>
O υπάρχων λογαριασμός δεν έχει δικαίωμα πρόσβασης στην εφαρμογή "Μητρώο Υποστηρικτικών δομών - Μη Σχολικών Μονάδων" (ή υπάρχει τεχνικό πρόβλημα που δεν επιτρέπει την πιστοποίηση του).<BR />
Η πρόσβαση επιτρέπεται μόνο με τον επίσημο λογαριασμό μη σχολικής μονάδας.<BR />
<BR />
<BR />
Για περισσότερες πληροφορίες, δείτε το <a href="{{ asset('user_guide_SUS.pdf') }}">Εγχειρίδιο Χρήσηςεδώ</a>.
<BR />
<BR />
<a href="{{ url('fos_user_security_logout') }}">Αποσύνδεση</a>
</div>
{% endblock %}
|
Add user guide in error
|
Add user guide in error
|
Twig
|
mit
|
teiath/sus,teiath/sus,teiath/sus,teiath/sus,teiath/sus
|
twig
|
## Code Before:
{% extends 'SonataAdminBundle::empty_layout.html.twig' %}
{% block sonata_page_content %}
<h1>Σφάλμα</h1>
<div>
O υπάρχων λογαριασμός δεν έχει δικαίωμα πρόσβασης στην εφαρμογή "Μητρώο Υποστηρικτικών δομών - Μη Σχολικών Μονάδων" (ή υπάρχει τεχνικό πρόβλημα που δεν επιτρέπει την πιστοποίηση του).<BR />
Η πρόσβαση επιτρέπεται μόνο με τον επίσημο λογαριασμό μη σχολικής μονάδας.<BR />
<BR />
<a href="{{ url('fos_user_security_logout') }}">Αποσύνδεση</a>
</div>
{% endblock %}
## Instruction:
Add user guide in error
## Code After:
{% extends 'SonataAdminBundle::empty_layout.html.twig' %}
{% block sonata_page_content %}
<h1>Σφάλμα</h1>
<div>
O υπάρχων λογαριασμός δεν έχει δικαίωμα πρόσβασης στην εφαρμογή "Μητρώο Υποστηρικτικών δομών - Μη Σχολικών Μονάδων" (ή υπάρχει τεχνικό πρόβλημα που δεν επιτρέπει την πιστοποίηση του).<BR />
Η πρόσβαση επιτρέπεται μόνο με τον επίσημο λογαριασμό μη σχολικής μονάδας.<BR />
<BR />
<BR />
Για περισσότερες πληροφορίες, δείτε το <a href="{{ asset('user_guide_SUS.pdf') }}">Εγχειρίδιο Χρήσηςεδώ</a>.
<BR />
<BR />
<a href="{{ url('fos_user_security_logout') }}">Αποσύνδεση</a>
</div>
{% endblock %}
|
53378ca5028460d32d314a259e9098918782e25e
|
doc/installation_linux.rst
|
doc/installation_linux.rst
|
Installation on Linux
=====================
Python 3.x
----------
.. code-block:: bash
sudo apt-get install libavbin-dev libavbin0 python3-dev python3-pip libjpeg-dev zlib1g-dev
sudo pip3 install arcade
Issues with avbin?
------------------
The libavbin items help with sound.
There is an issue getting this library on newer versions of Ubuntu.
.. code-block:: bash
sudo apt-get install libasound2
|
Installation on Linux
=====================
.. code-block:: bash
apt update && sudo apt install -y python3-dev python3-pip git libavbin-dev libavbin0 libjpeg-dev zlib1g-dev
sudo pip3 install virtualenv virtualenvwrapper
virtualenv ~/.virtualenvs/arcade -p python3
source ~/.virtualenvs/arcade/bin/activate
pip install arcade
Issues with avbin?
------------------
The libavbin items help with sound.
There is an issue getting this library on newer versions of Ubuntu.
.. code-block:: bash
sudo apt-get install -y libasound2
|
Update Linux installation instructions to include virtualenv
|
Update Linux installation instructions to include virtualenv
|
reStructuredText
|
mit
|
mikemhenry/arcade,mikemhenry/arcade
|
restructuredtext
|
## Code Before:
Installation on Linux
=====================
Python 3.x
----------
.. code-block:: bash
sudo apt-get install libavbin-dev libavbin0 python3-dev python3-pip libjpeg-dev zlib1g-dev
sudo pip3 install arcade
Issues with avbin?
------------------
The libavbin items help with sound.
There is an issue getting this library on newer versions of Ubuntu.
.. code-block:: bash
sudo apt-get install libasound2
## Instruction:
Update Linux installation instructions to include virtualenv
## Code After:
Installation on Linux
=====================
.. code-block:: bash
apt update && sudo apt install -y python3-dev python3-pip git libavbin-dev libavbin0 libjpeg-dev zlib1g-dev
sudo pip3 install virtualenv virtualenvwrapper
virtualenv ~/.virtualenvs/arcade -p python3
source ~/.virtualenvs/arcade/bin/activate
pip install arcade
Issues with avbin?
------------------
The libavbin items help with sound.
There is an issue getting this library on newer versions of Ubuntu.
.. code-block:: bash
sudo apt-get install -y libasound2
|
fc8e44332d4b83662c412e6c7033b9694d056f59
|
src/motion/arcsys2_description/package.xml
|
src/motion/arcsys2_description/package.xml
|
<?xml version="1.0"?>
<package format="2">
<name> arcsys2_description </name>
<version> 0.0.1 </version>
<maintainer email="[email protected]"> Yamasaki Tatsuya </maintainer>
<license> MIT </license>
<description>
The manipulator package.
</description>
<buildtool_depend> catkin </buildtool_depend>
</package>
|
<?xml version="1.0"?>
<package format="2">
<name> arcsys2_description </name>
<version> 0.0.1 </version>
<maintainer email="[email protected]"> Yamasaki Tatsuya </maintainer>
<license> MIT </license>
<description>
The manipulator package.
</description>
<buildtool_depend> catkin </buildtool_depend>
<exec_depend> joint_state_publisher </exec_depend>
<exec_depend> robot_state_publisher </exec_depend>
<exec_depend> rviz </exec_depend>
</package>
|
Add dependency for launch file
|
Add dependency for launch file
|
XML
|
mit
|
agrirobo/arcsys2,agrirobo/arcsys2
|
xml
|
## Code Before:
<?xml version="1.0"?>
<package format="2">
<name> arcsys2_description </name>
<version> 0.0.1 </version>
<maintainer email="[email protected]"> Yamasaki Tatsuya </maintainer>
<license> MIT </license>
<description>
The manipulator package.
</description>
<buildtool_depend> catkin </buildtool_depend>
</package>
## Instruction:
Add dependency for launch file
## Code After:
<?xml version="1.0"?>
<package format="2">
<name> arcsys2_description </name>
<version> 0.0.1 </version>
<maintainer email="[email protected]"> Yamasaki Tatsuya </maintainer>
<license> MIT </license>
<description>
The manipulator package.
</description>
<buildtool_depend> catkin </buildtool_depend>
<exec_depend> joint_state_publisher </exec_depend>
<exec_depend> robot_state_publisher </exec_depend>
<exec_depend> rviz </exec_depend>
</package>
|
8882fbaa4cc929b56d2d94b9ae9c1b8eacf15513
|
README.md
|
README.md
|
This project is a simple Docker image that runs [JetBrains CLion IDE](http://www.jetbrains.com/).
#Prerequisites
* a working [Docker](http://docker.io) engine
* a working [Docker Compose](http://docker.io) installation
#Building
Type `docker-compose build` to build the image.
#Installation
Docker will automatically install the newly built image into the cache.
#Tips and Tricks
##Launching The Image
`docker-compose up` will launch the image allowing you to begin working on projects. The Docker Compose file is
configured to mount your home directory into the container.
#Troubleshooting
##User Account
The image assumes that the account running the continer will have a user and group id of 1000:1000. This allows the container
to save files in your home directory and keep the proper permissions.
##X-Windows
If the image complains that it cannot connect to your X server, simply run `xhost +` to allow the container to connect
to your X server.
#License and Credits
This project is licensed under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/).
#List of Changes
|
This project is a simple Docker image that runs [JetBrains CLion IDE](http://www.jetbrains.com/).
# Prerequisites
* a working [Docker](http://docker.io) engine
* a working [Docker Compose](http://docker.io) installation
# Building
Type `docker-compose build` to build the image.
# Installation
Docker will automatically install the newly built image into the cache.
# Tips and Tricks
## Launching The Image
`docker-compose up` will launch the image allowing you to begin working on projects. The Docker Compose file is
configured to mount your home directory into the container.
# Troubleshooting
## User Account
The image assumes that the account running the continer will have a user and group id of 1000:1000. This allows the container
to save files in your home directory and keep the proper permissions.
## X-Windows
If the image complains that it cannot connect to your X server, simply run `xhost +` to allow the container to connect
to your X server.
# License and Credits
This project is licensed under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/).
# List of Changes
|
Update readme's headings to match github's new readme style
|
Update readme's headings to match github's new readme style
|
Markdown
|
apache-2.0
|
kurron/docker-clion
|
markdown
|
## Code Before:
This project is a simple Docker image that runs [JetBrains CLion IDE](http://www.jetbrains.com/).
#Prerequisites
* a working [Docker](http://docker.io) engine
* a working [Docker Compose](http://docker.io) installation
#Building
Type `docker-compose build` to build the image.
#Installation
Docker will automatically install the newly built image into the cache.
#Tips and Tricks
##Launching The Image
`docker-compose up` will launch the image allowing you to begin working on projects. The Docker Compose file is
configured to mount your home directory into the container.
#Troubleshooting
##User Account
The image assumes that the account running the continer will have a user and group id of 1000:1000. This allows the container
to save files in your home directory and keep the proper permissions.
##X-Windows
If the image complains that it cannot connect to your X server, simply run `xhost +` to allow the container to connect
to your X server.
#License and Credits
This project is licensed under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/).
#List of Changes
## Instruction:
Update readme's headings to match github's new readme style
## Code After:
This project is a simple Docker image that runs [JetBrains CLion IDE](http://www.jetbrains.com/).
# Prerequisites
* a working [Docker](http://docker.io) engine
* a working [Docker Compose](http://docker.io) installation
# Building
Type `docker-compose build` to build the image.
# Installation
Docker will automatically install the newly built image into the cache.
# Tips and Tricks
## Launching The Image
`docker-compose up` will launch the image allowing you to begin working on projects. The Docker Compose file is
configured to mount your home directory into the container.
# Troubleshooting
## User Account
The image assumes that the account running the continer will have a user and group id of 1000:1000. This allows the container
to save files in your home directory and keep the proper permissions.
## X-Windows
If the image complains that it cannot connect to your X server, simply run `xhost +` to allow the container to connect
to your X server.
# License and Credits
This project is licensed under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/).
# List of Changes
|
105043877325114ddb74aeeb98dd4762684a89dd
|
src/main/sass/components/_labeled.scss
|
src/main/sass/components/_labeled.scss
|
.#{$prefix}-lblv {
align-items: center;
display: flex;
padding-left: 4px;
padding-right: 4px;
&_l {
color: var(--label-foreground-color);
flex: 1;
hyphens: auto;
padding-left: 4px;
padding-right: 16px;
}
&_v {
align-self: flex-start;
flex-grow: 0;
flex-shrink: 0;
width: 160px;
}
}
|
.#{$prefix}-lblv {
align-items: center;
display: flex;
padding-left: 4px;
padding-right: 4px;
&_l {
color: var(--label-foreground-color);
flex: 1;
hyphens: auto;
overflow: hidden;
padding-left: 4px;
padding-right: 16px;
}
&_v {
align-self: flex-start;
flex-grow: 0;
flex-shrink: 0;
width: 160px;
}
}
|
Fix broken layout with long word
|
Fix broken layout with long word
|
SCSS
|
mit
|
cocopon/tweakpane,cocopon/tweakpane,cocopon/tweakpane
|
scss
|
## Code Before:
.#{$prefix}-lblv {
align-items: center;
display: flex;
padding-left: 4px;
padding-right: 4px;
&_l {
color: var(--label-foreground-color);
flex: 1;
hyphens: auto;
padding-left: 4px;
padding-right: 16px;
}
&_v {
align-self: flex-start;
flex-grow: 0;
flex-shrink: 0;
width: 160px;
}
}
## Instruction:
Fix broken layout with long word
## Code After:
.#{$prefix}-lblv {
align-items: center;
display: flex;
padding-left: 4px;
padding-right: 4px;
&_l {
color: var(--label-foreground-color);
flex: 1;
hyphens: auto;
overflow: hidden;
padding-left: 4px;
padding-right: 16px;
}
&_v {
align-self: flex-start;
flex-grow: 0;
flex-shrink: 0;
width: 160px;
}
}
|
3794fe611e5fbbe55506a7d2e59b2f3f872d8733
|
backend/controllers/file_controller.py
|
backend/controllers/file_controller.py
|
import os
from werkzeug.utils import secure_filename
import config
from flask_restful import Resource
from flask import request, abort
def allowed_file(filename):
return ('.' in filename and
filename.rsplit('.', 1)[1].lower() in config.ALLOWED_EXTENSIONS)
class File(Resource):
def post(self):
if 'uploaded_data' not in request.files:
abort(500)
file = request.files['uploaded_data']
if file.filename == '':
abort(500)
if allowed_file(file.filename):
filename = secure_filename(file.filename)
file.save(os.path.join(config.UPLOAD_FOLDER, filename))
return {'response': 'File uploaded successfully'}
def delete(self):
filename = request.args.get('filename')
os.remove(os.path.join(config.UPLOAD_FOLDER, filename))
return {'response': 'File deleted successfully'}
|
import os
from werkzeug.utils import secure_filename
import config
from flask_restful import Resource
from flask import request, abort
def allowed_file(filename):
return ('.' in filename and
filename.rsplit('.', 1)[1].lower() in config.ALLOWED_EXTENSIONS)
class File(Resource):
def post(self):
if 'uploaded_data' not in request.files:
abort(400, 'Uploaded_data is required for the request')
file = request.files['uploaded_data']
if file.filename == '':
abort(400, 'Filename cannot be empty')
if allowed_file(file.filename):
filename = secure_filename(file.filename)
file.save(os.path.join(config.UPLOAD_FOLDER, filename))
return {'response': 'File uploaded successfully'}
else:
abort(415, 'File type is not supported')
def delete(self):
filename = secure_filename(request.args.get('filename'))
os.remove(os.path.join(config.UPLOAD_FOLDER, filename))
return {'response': 'File deleted successfully'}
|
Change status codes and messages
|
Change status codes and messages
|
Python
|
apache-2.0
|
googleinterns/inventory-visualizer,googleinterns/inventory-visualizer,googleinterns/inventory-visualizer,googleinterns/inventory-visualizer,googleinterns/inventory-visualizer
|
python
|
## Code Before:
import os
from werkzeug.utils import secure_filename
import config
from flask_restful import Resource
from flask import request, abort
def allowed_file(filename):
return ('.' in filename and
filename.rsplit('.', 1)[1].lower() in config.ALLOWED_EXTENSIONS)
class File(Resource):
def post(self):
if 'uploaded_data' not in request.files:
abort(500)
file = request.files['uploaded_data']
if file.filename == '':
abort(500)
if allowed_file(file.filename):
filename = secure_filename(file.filename)
file.save(os.path.join(config.UPLOAD_FOLDER, filename))
return {'response': 'File uploaded successfully'}
def delete(self):
filename = request.args.get('filename')
os.remove(os.path.join(config.UPLOAD_FOLDER, filename))
return {'response': 'File deleted successfully'}
## Instruction:
Change status codes and messages
## Code After:
import os
from werkzeug.utils import secure_filename
import config
from flask_restful import Resource
from flask import request, abort
def allowed_file(filename):
return ('.' in filename and
filename.rsplit('.', 1)[1].lower() in config.ALLOWED_EXTENSIONS)
class File(Resource):
def post(self):
if 'uploaded_data' not in request.files:
abort(400, 'Uploaded_data is required for the request')
file = request.files['uploaded_data']
if file.filename == '':
abort(400, 'Filename cannot be empty')
if allowed_file(file.filename):
filename = secure_filename(file.filename)
file.save(os.path.join(config.UPLOAD_FOLDER, filename))
return {'response': 'File uploaded successfully'}
else:
abort(415, 'File type is not supported')
def delete(self):
filename = secure_filename(request.args.get('filename'))
os.remove(os.path.join(config.UPLOAD_FOLDER, filename))
return {'response': 'File deleted successfully'}
|
709017ea46cd3784983ef0ee64cfe608aa44cf0c
|
tests/integration/aiohttp_utils.py
|
tests/integration/aiohttp_utils.py
|
import asyncio
import aiohttp
@asyncio.coroutine
def aiohttp_request(loop, method, url, output='text', **kwargs):
session = aiohttp.ClientSession(loop=loop)
response_ctx = session.request(method, url, **kwargs) # NOQA: E999
response = yield from response_ctx.__aenter__() # NOQA: E999
if output == 'text':
content = yield from response.text() # NOQA: E999
elif output == 'json':
content = yield from response.json() # NOQA: E999
elif output == 'raw':
content = yield from response.read() # NOQA: E999
response_ctx._resp.close()
yield from session.close()
return response, content
|
import asyncio
import aiohttp
@asyncio.coroutine
def aiohttp_request(loop, method, url, output='text', encoding='utf-8', **kwargs):
session = aiohttp.ClientSession(loop=loop)
response_ctx = session.request(method, url, **kwargs) # NOQA: E999
response = yield from response_ctx.__aenter__() # NOQA: E999
if output == 'text':
content = yield from response.text() # NOQA: E999
elif output == 'json':
content = yield from response.json(encoding=encoding) # NOQA: E999
elif output == 'raw':
content = yield from response.read() # NOQA: E999
response_ctx._resp.close()
yield from session.close()
return response, content
|
Fix aiohttp utils to pass encondig to response.json
|
Fix aiohttp utils to pass encondig to response.json
|
Python
|
mit
|
graingert/vcrpy,graingert/vcrpy,kevin1024/vcrpy,kevin1024/vcrpy
|
python
|
## Code Before:
import asyncio
import aiohttp
@asyncio.coroutine
def aiohttp_request(loop, method, url, output='text', **kwargs):
session = aiohttp.ClientSession(loop=loop)
response_ctx = session.request(method, url, **kwargs) # NOQA: E999
response = yield from response_ctx.__aenter__() # NOQA: E999
if output == 'text':
content = yield from response.text() # NOQA: E999
elif output == 'json':
content = yield from response.json() # NOQA: E999
elif output == 'raw':
content = yield from response.read() # NOQA: E999
response_ctx._resp.close()
yield from session.close()
return response, content
## Instruction:
Fix aiohttp utils to pass encondig to response.json
## Code After:
import asyncio
import aiohttp
@asyncio.coroutine
def aiohttp_request(loop, method, url, output='text', encoding='utf-8', **kwargs):
session = aiohttp.ClientSession(loop=loop)
response_ctx = session.request(method, url, **kwargs) # NOQA: E999
response = yield from response_ctx.__aenter__() # NOQA: E999
if output == 'text':
content = yield from response.text() # NOQA: E999
elif output == 'json':
content = yield from response.json(encoding=encoding) # NOQA: E999
elif output == 'raw':
content = yield from response.read() # NOQA: E999
response_ctx._resp.close()
yield from session.close()
return response, content
|
8f786d9d84400babb87d9ff817cafc6bf4168bda
|
src/main/webapp/401.html
|
src/main/webapp/401.html
|
<!DOCTYPE html>
<!--
Copyright 2020 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<head>
<meta charset="UTF-8">
<title>401 Page</title>
<link rel="stylesheet" href="404_style.css">
<meta http-equiv="refresh" content="5;url=/index.jsp">
</head>
<body>
<div id="main">
<h1>Error 401</h1>
<p>Sorry, our website only supports users with Google corporate account</p>
<p>You will be redirected back to main page in 5 seconds</p>
</div>
</body>
</html>
|
<!DOCTYPE html>
<!--
Copyright 2020 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<head>
<meta charset="UTF-8">
<title>401 Page</title>
<link rel="stylesheet" href="404_style.css">
<meta http-equiv="refresh" content="3;url=/index.jsp">
</head>
<body>
<div id="main">
<h1>Error 401</h1>
<p>Sorry, our website only supports users with Google corporate account</p>
<p>You will be redirected back to main page in 3 seconds</p>
</div>
</body>
</html>
|
Change the redirect waiting time from 5 seconds to 3 seconds
|
Change the redirect waiting time from 5 seconds to 3 seconds
|
HTML
|
apache-2.0
|
googleinterns/NeighborGood,googleinterns/NeighborGood,googleinterns/NeighborGood
|
html
|
## Code Before:
<!DOCTYPE html>
<!--
Copyright 2020 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<head>
<meta charset="UTF-8">
<title>401 Page</title>
<link rel="stylesheet" href="404_style.css">
<meta http-equiv="refresh" content="5;url=/index.jsp">
</head>
<body>
<div id="main">
<h1>Error 401</h1>
<p>Sorry, our website only supports users with Google corporate account</p>
<p>You will be redirected back to main page in 5 seconds</p>
</div>
</body>
</html>
## Instruction:
Change the redirect waiting time from 5 seconds to 3 seconds
## Code After:
<!DOCTYPE html>
<!--
Copyright 2020 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<head>
<meta charset="UTF-8">
<title>401 Page</title>
<link rel="stylesheet" href="404_style.css">
<meta http-equiv="refresh" content="3;url=/index.jsp">
</head>
<body>
<div id="main">
<h1>Error 401</h1>
<p>Sorry, our website only supports users with Google corporate account</p>
<p>You will be redirected back to main page in 3 seconds</p>
</div>
</body>
</html>
|
371a07635c861741d85e52bf365a4f3d0d3fa49c
|
org.jrebirth.af/showcase/fxml/src/main/java/org/jrebirth/af/showcase/fxml/ui/main/FXMLShowCaseModel.java
|
org.jrebirth.af/showcase/fxml/src/main/java/org/jrebirth/af/showcase/fxml/ui/main/FXMLShowCaseModel.java
|
package org.jrebirth.af.showcase.fxml.ui.main;
import org.jrebirth.af.api.module.Register;
import org.jrebirth.af.api.ui.ModuleModel;
import org.jrebirth.af.component.ui.stack.StackModel;
import org.jrebirth.af.core.ui.DefaultModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* The class <strong>SampleModel</strong>.
*
* @author
*/
@Register(value = ModuleModel.class)
public final class FXMLShowCaseModel extends DefaultModel<FXMLShowCaseModel, FXMLShowCaseView> implements ModuleModel {
/** The class logger. */
private static final Logger LOGGER = LoggerFactory.getLogger(FXMLShowCaseModel.class);
private StackModel stackModel;
/**
* {@inheritDoc}
*/
@Override
protected void initModel() {
super.initModel();
stackModel = getModel(StackModel.class, FXMLPage.class);
}
/**
* {@inheritDoc}
*/
@Override
protected void showView() {
super.showView();
view().node().setCenter(stackModel.node());
// getModel(StackModel.class, FXMLPage.class).doShowView(null);
}
@Override
public String moduleName() {
return "FXML";
}
}
|
package org.jrebirth.af.showcase.fxml.ui.main;
import org.jrebirth.af.api.component.basic.InnerComponent;
import org.jrebirth.af.api.module.Register;
import org.jrebirth.af.api.ui.ModuleModel;
import org.jrebirth.af.component.ui.stack.StackModel;
import org.jrebirth.af.core.component.basic.CBuilder;
import org.jrebirth.af.core.ui.DefaultModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* The class <strong>FXMLShowCaseModel</strong>.
*
* @author Sébastien Bordes
*/
@Register(value = ModuleModel.class)
public final class FXMLShowCaseModel extends DefaultModel<FXMLShowCaseModel, FXMLShowCaseView> implements ModuleModel {
/** The class logger. */
private static final Logger LOGGER = LoggerFactory.getLogger(FXMLShowCaseModel.class);
private StackModel stackModel;
/**
* {@inheritDoc}
*/
@Override
protected void initModel() {
super.initModel();
InnerComponent<StackModel> stack = CBuilder.innerComponent(StackModel.class, FXMLPage.class);
stackModel = findInnerComponent(stack);
//stackModel = getModel(StackModel.class, FXMLPage.class);
}
/**
* {@inheritDoc}
*/
@Override
protected void showView() {
super.showView();
view().node().setCenter(stackModel.node());
// getModel(StackModel.class, FXMLPage.class).doShowView(null);
}
@Override
public String moduleName() {
return "FXML";
}
}
|
Fix trouble when using local UI components without releasing them
|
Fix trouble when using local UI components without releasing them
|
Java
|
apache-2.0
|
Rizen59/JRebirth,JRebirth/JRebirth,Rizen59/JRebirth,JRebirth/JRebirth
|
java
|
## Code Before:
package org.jrebirth.af.showcase.fxml.ui.main;
import org.jrebirth.af.api.module.Register;
import org.jrebirth.af.api.ui.ModuleModel;
import org.jrebirth.af.component.ui.stack.StackModel;
import org.jrebirth.af.core.ui.DefaultModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* The class <strong>SampleModel</strong>.
*
* @author
*/
@Register(value = ModuleModel.class)
public final class FXMLShowCaseModel extends DefaultModel<FXMLShowCaseModel, FXMLShowCaseView> implements ModuleModel {
/** The class logger. */
private static final Logger LOGGER = LoggerFactory.getLogger(FXMLShowCaseModel.class);
private StackModel stackModel;
/**
* {@inheritDoc}
*/
@Override
protected void initModel() {
super.initModel();
stackModel = getModel(StackModel.class, FXMLPage.class);
}
/**
* {@inheritDoc}
*/
@Override
protected void showView() {
super.showView();
view().node().setCenter(stackModel.node());
// getModel(StackModel.class, FXMLPage.class).doShowView(null);
}
@Override
public String moduleName() {
return "FXML";
}
}
## Instruction:
Fix trouble when using local UI components without releasing them
## Code After:
package org.jrebirth.af.showcase.fxml.ui.main;
import org.jrebirth.af.api.component.basic.InnerComponent;
import org.jrebirth.af.api.module.Register;
import org.jrebirth.af.api.ui.ModuleModel;
import org.jrebirth.af.component.ui.stack.StackModel;
import org.jrebirth.af.core.component.basic.CBuilder;
import org.jrebirth.af.core.ui.DefaultModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* The class <strong>FXMLShowCaseModel</strong>.
*
* @author Sébastien Bordes
*/
@Register(value = ModuleModel.class)
public final class FXMLShowCaseModel extends DefaultModel<FXMLShowCaseModel, FXMLShowCaseView> implements ModuleModel {
/** The class logger. */
private static final Logger LOGGER = LoggerFactory.getLogger(FXMLShowCaseModel.class);
private StackModel stackModel;
/**
* {@inheritDoc}
*/
@Override
protected void initModel() {
super.initModel();
InnerComponent<StackModel> stack = CBuilder.innerComponent(StackModel.class, FXMLPage.class);
stackModel = findInnerComponent(stack);
//stackModel = getModel(StackModel.class, FXMLPage.class);
}
/**
* {@inheritDoc}
*/
@Override
protected void showView() {
super.showView();
view().node().setCenter(stackModel.node());
// getModel(StackModel.class, FXMLPage.class).doShowView(null);
}
@Override
public String moduleName() {
return "FXML";
}
}
|
b2fb19ce6c511df0c7a4528d9927f4ee11345f37
|
app/views/widgets/_normal_issue.html.erb
|
app/views/widgets/_normal_issue.html.erb
|
<div class="labels">
<% issue.position_groups.each do |label, parties| %>
<div class="position">
<div class="position-wrapper">
<h3>
<%= image_tag label.icon, class: "icon" %>
<%= label.text %>
</h3>
</div>
</div>
<% end %>
</div>
<div class="icons">
<% issue.position_groups.each do |label, parties| %>
<div class="position">
<div class="position-wrapper">
<% parties.each do |party| %>
<%= link_to issue_url(issue, anchor: party.slug), class: 'issue-graph-party' do %>
<%= image_tag party.logo.versions[:medium], alt: "#{party.name}s logo" %>
<% end %>
<% end %>
</div>
</div>
<% end %>
</div>
|
<div class="labels">
<% issue.position_groups.each do |label, parties| %>
<div class="position">
<div class="position-wrapper">
<h3>
<%= label.text %>
</h3>
</div>
</div>
<% end %>
</div>
<div class="icons">
<% issue.position_groups.each do |label, parties| %>
<div class="position">
<div class="position-wrapper">
<% parties.each do |party| %>
<%= link_to issue_url(issue, anchor: party.slug), class: 'issue-graph-party' do %>
<%= image_tag party.logo.versions[:medium], alt: "#{party.name}s logo" %>
<% end %>
<% end %>
</div>
</div>
<% end %>
</div>
|
Remove thumb icons from issue widget.
|
Remove thumb icons from issue widget.
|
HTML+ERB
|
bsd-3-clause
|
holderdeord/hdo-site,holderdeord/hdo-site,holderdeord/hdo-site,holderdeord/hdo-site
|
html+erb
|
## Code Before:
<div class="labels">
<% issue.position_groups.each do |label, parties| %>
<div class="position">
<div class="position-wrapper">
<h3>
<%= image_tag label.icon, class: "icon" %>
<%= label.text %>
</h3>
</div>
</div>
<% end %>
</div>
<div class="icons">
<% issue.position_groups.each do |label, parties| %>
<div class="position">
<div class="position-wrapper">
<% parties.each do |party| %>
<%= link_to issue_url(issue, anchor: party.slug), class: 'issue-graph-party' do %>
<%= image_tag party.logo.versions[:medium], alt: "#{party.name}s logo" %>
<% end %>
<% end %>
</div>
</div>
<% end %>
</div>
## Instruction:
Remove thumb icons from issue widget.
## Code After:
<div class="labels">
<% issue.position_groups.each do |label, parties| %>
<div class="position">
<div class="position-wrapper">
<h3>
<%= label.text %>
</h3>
</div>
</div>
<% end %>
</div>
<div class="icons">
<% issue.position_groups.each do |label, parties| %>
<div class="position">
<div class="position-wrapper">
<% parties.each do |party| %>
<%= link_to issue_url(issue, anchor: party.slug), class: 'issue-graph-party' do %>
<%= image_tag party.logo.versions[:medium], alt: "#{party.name}s logo" %>
<% end %>
<% end %>
</div>
</div>
<% end %>
</div>
|
13825b98edb987f131c006b9f56ac8ad75f1754f
|
slimbb/templates/slimbb/index.html
|
slimbb/templates/slimbb/index.html
|
{% extends 'slimbb/base.html' %}
{% load forum_extras %}
{% load i18n %}
{% block content %}
<div id="idx1" class="blocktable">
{% for iter in cats %}
<h2 id="category_head_{{ iter.id }}">
<a class="toggle" href="#">Toggle shoutbox</a>
<span>
{{ iter.cat }}
</span>
</h2>
<div class="box" id="category_body_{{ iter.id }}">
<div class="inbox">
<table cellspacing="0">
<thead>
<tr>
<th class="tcl" scope="col">{% trans "Forum" %}</th>
<th class="tc2" scope="col">{% trans "Topics" %}</th>
<th class="tc3" scope="col">{% trans "Posts" %}</th>
<th class="tcr" scope="col">{% trans "Last post" %}</th>
</tr>
</thead>
<tbody>
{% for forum in iter.forums %}
{% include 'slimbb/forum_row.html' %}
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endfor %}
</div>
{% endblock %}
|
{% extends 'slimbb/base.html' %}
{% load forum_extras %}
{% load i18n %}
{% block content %}
<div id="idx1" class="blocktable">
{% for iter in cats %}
<h2 id="category_head_{{ iter.id }}">
<span>
{{ iter.cat }}
</span>
</h2>
<div class="box" id="category_body_{{ iter.id }}">
<div class="inbox">
<table cellspacing="0">
<thead>
<tr>
<th class="tcl" scope="col">{% trans "Forum" %}</th>
<th class="tc2" scope="col">{% trans "Topics" %}</th>
<th class="tc3" scope="col">{% trans "Posts" %}</th>
<th class="tcr" scope="col">{% trans "Last post" %}</th>
</tr>
</thead>
<tbody>
{% for forum in iter.forums %}
{% include 'slimbb/forum_row.html' %}
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endfor %}
</div>
{% endblock %}
|
Remove useless "-" button in category box
|
Remove useless "-" button in category box
|
HTML
|
bsd-3-clause
|
hsoft/slimbb,hsoft/slimbb,hsoft/slimbb
|
html
|
## Code Before:
{% extends 'slimbb/base.html' %}
{% load forum_extras %}
{% load i18n %}
{% block content %}
<div id="idx1" class="blocktable">
{% for iter in cats %}
<h2 id="category_head_{{ iter.id }}">
<a class="toggle" href="#">Toggle shoutbox</a>
<span>
{{ iter.cat }}
</span>
</h2>
<div class="box" id="category_body_{{ iter.id }}">
<div class="inbox">
<table cellspacing="0">
<thead>
<tr>
<th class="tcl" scope="col">{% trans "Forum" %}</th>
<th class="tc2" scope="col">{% trans "Topics" %}</th>
<th class="tc3" scope="col">{% trans "Posts" %}</th>
<th class="tcr" scope="col">{% trans "Last post" %}</th>
</tr>
</thead>
<tbody>
{% for forum in iter.forums %}
{% include 'slimbb/forum_row.html' %}
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endfor %}
</div>
{% endblock %}
## Instruction:
Remove useless "-" button in category box
## Code After:
{% extends 'slimbb/base.html' %}
{% load forum_extras %}
{% load i18n %}
{% block content %}
<div id="idx1" class="blocktable">
{% for iter in cats %}
<h2 id="category_head_{{ iter.id }}">
<span>
{{ iter.cat }}
</span>
</h2>
<div class="box" id="category_body_{{ iter.id }}">
<div class="inbox">
<table cellspacing="0">
<thead>
<tr>
<th class="tcl" scope="col">{% trans "Forum" %}</th>
<th class="tc2" scope="col">{% trans "Topics" %}</th>
<th class="tc3" scope="col">{% trans "Posts" %}</th>
<th class="tcr" scope="col">{% trans "Last post" %}</th>
</tr>
</thead>
<tbody>
{% for forum in iter.forums %}
{% include 'slimbb/forum_row.html' %}
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endfor %}
</div>
{% endblock %}
|
ef4c9f6a2e6fc1db01d93d937d24e444b0bb0ede
|
tests/memory_profiling.py
|
tests/memory_profiling.py
|
import inspect
import sys
import time
import memory_profiler
import vector_test
try:
from pvectorc import pvector
except ImportError:
print("No C implementation of PVector available, terminating")
sys.exit()
PROFILING_DURATION = 2.0
def run_function(fn):
stop = time.time() + PROFILING_DURATION
while time.time() < stop:
fn(pvector)
def detect_memory_leak(samples):
# Skip the first half to get rid of the build up period and the last since it seems
# a little less precise
samples = samples[int(len(samples)/2):len(samples)-1]
return not samples.count(samples[0]) > len(samples) - 2
def profile_tests():
test_functions = [fn for fn in inspect.getmembers(vector_test, inspect.isfunction)
if fn[0].startswith('test_')]
for name, fn in test_functions:
# There are a couple of tests that are not run for the C implementation, skip those
fn_args = inspect.getargspec(fn)[0]
if 'pvector' in fn_args:
print('Executing %s' % name)
result = memory_profiler.memory_usage((run_function, (fn,), {}), interval=.1)
assert not detect_memory_leak(result), (name, result)
if __name__ == "__main__":
profile_tests()
|
import inspect
import sys
import time
import memory_profiler
import vector_test
try:
from pvectorc import pvector
except ImportError:
print("No C implementation of PVector available, terminating")
sys.exit()
PROFILING_DURATION = 2.0
def run_function(fn):
stop = time.time() + PROFILING_DURATION
while time.time() < stop:
fn(pvector)
def detect_memory_leak(samples):
# Skip the first samples to get rid of the build up period and the last sample since it seems
# a little less precise
rising = 0
for i in range(5, len(samples)-1):
if samples[i] < samples[i+1]:
rising += 1
return (rising / float(len(samples) - 6)) > 0.2
def profile_tests():
test_functions = [fn for fn in inspect.getmembers(vector_test, inspect.isfunction)
if fn[0].startswith('test_')]
for name, fn in test_functions:
# There are a couple of tests that are not run for the C implementation, skip those
fn_args = inspect.getargspec(fn)[0]
if 'pvector' in fn_args:
print('Executing %s' % name)
result = memory_profiler.memory_usage((run_function, (fn,), {}), interval=.1)
assert not detect_memory_leak(result), (name, result)
if __name__ == "__main__":
profile_tests()
|
Improve memory error detection for less false positives
|
Improve memory error detection for less false positives
|
Python
|
mit
|
tobgu/pyrsistent,jkbjh/pyrsistent,Futrell/pyrsistent,tobgu/pyrsistent,jml/pyrsistent,jml/pyrsistent,tobgu/pyrsistent,jkbjh/pyrsistent,Futrell/pyrsistent,jkbjh/pyrsistent,Futrell/pyrsistent,jml/pyrsistent
|
python
|
## Code Before:
import inspect
import sys
import time
import memory_profiler
import vector_test
try:
from pvectorc import pvector
except ImportError:
print("No C implementation of PVector available, terminating")
sys.exit()
PROFILING_DURATION = 2.0
def run_function(fn):
stop = time.time() + PROFILING_DURATION
while time.time() < stop:
fn(pvector)
def detect_memory_leak(samples):
# Skip the first half to get rid of the build up period and the last since it seems
# a little less precise
samples = samples[int(len(samples)/2):len(samples)-1]
return not samples.count(samples[0]) > len(samples) - 2
def profile_tests():
test_functions = [fn for fn in inspect.getmembers(vector_test, inspect.isfunction)
if fn[0].startswith('test_')]
for name, fn in test_functions:
# There are a couple of tests that are not run for the C implementation, skip those
fn_args = inspect.getargspec(fn)[0]
if 'pvector' in fn_args:
print('Executing %s' % name)
result = memory_profiler.memory_usage((run_function, (fn,), {}), interval=.1)
assert not detect_memory_leak(result), (name, result)
if __name__ == "__main__":
profile_tests()
## Instruction:
Improve memory error detection for less false positives
## Code After:
import inspect
import sys
import time
import memory_profiler
import vector_test
try:
from pvectorc import pvector
except ImportError:
print("No C implementation of PVector available, terminating")
sys.exit()
PROFILING_DURATION = 2.0
def run_function(fn):
stop = time.time() + PROFILING_DURATION
while time.time() < stop:
fn(pvector)
def detect_memory_leak(samples):
# Skip the first samples to get rid of the build up period and the last sample since it seems
# a little less precise
rising = 0
for i in range(5, len(samples)-1):
if samples[i] < samples[i+1]:
rising += 1
return (rising / float(len(samples) - 6)) > 0.2
def profile_tests():
test_functions = [fn for fn in inspect.getmembers(vector_test, inspect.isfunction)
if fn[0].startswith('test_')]
for name, fn in test_functions:
# There are a couple of tests that are not run for the C implementation, skip those
fn_args = inspect.getargspec(fn)[0]
if 'pvector' in fn_args:
print('Executing %s' % name)
result = memory_profiler.memory_usage((run_function, (fn,), {}), interval=.1)
assert not detect_memory_leak(result), (name, result)
if __name__ == "__main__":
profile_tests()
|
ad7d39c472130e7f06c30d06a5aed465d2e5ab2c
|
linter.py
|
linter.py
|
from SublimeLinter.lint import Linter, util
class Cppcheck(Linter):
cmd = ('cppcheck', '--template={file}:{line}: {severity}: {message}', '--inline-suppr', '--quiet', '${args}', '${file}')
regex = (
r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\d+):)?\s+'
r'((?P<error>error)|(?P<warning>warning|style|performance|portability|information)):\s+'
r'(?P<message>.+)'
)
error_stream = util.STREAM_BOTH # linting errors are on stderr, exceptions like "file not found" on stdout
on_stderr = None # handle stderr via split_match
tempfile_suffix = '-'
defaults = {
'selector': 'source.c, source.c++',
'--std=,+': [], # example ['c99', 'c89']
'--enable=,': 'style',
}
def split_match(self, match):
"""
Return the components of the match.
We override this because included header files can cause linter errors,
and we only want errors from the linted file.
"""
if match:
if match.group('file') != self.filename:
return None
return super().split_match(match)
|
from SublimeLinter.lint import Linter, util
class Cppcheck(Linter):
cmd = (
'cppcheck',
'--template={file}:{line}: {severity}: {message}',
'--inline-suppr',
'--quiet',
'${args}',
'${file}'
)
regex = (
r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\d+):)?\s+'
r'((?P<error>error)|(?P<warning>warning|style|performance|portability|information)):\s+'
r'(?P<message>.+)'
)
error_stream = util.STREAM_BOTH # linting errors are on stderr, exceptions like "file not found" on stdout
on_stderr = None # handle stderr via split_match
tempfile_suffix = '-'
defaults = {
'selector': 'source.c, source.c++',
'--std=,+': [], # example ['c99', 'c89']
'--enable=,': 'style',
}
def split_match(self, match):
"""
Return the components of the match.
We override this because included header files can cause linter errors,
and we only want errors from the linted file.
"""
if match:
if match.group('file') != self.filename:
return None
return super().split_match(match)
|
Reformat cmd to go under 120 character limit
|
Reformat cmd to go under 120 character limit
|
Python
|
mit
|
SublimeLinter/SublimeLinter-cppcheck
|
python
|
## Code Before:
from SublimeLinter.lint import Linter, util
class Cppcheck(Linter):
cmd = ('cppcheck', '--template={file}:{line}: {severity}: {message}', '--inline-suppr', '--quiet', '${args}', '${file}')
regex = (
r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\d+):)?\s+'
r'((?P<error>error)|(?P<warning>warning|style|performance|portability|information)):\s+'
r'(?P<message>.+)'
)
error_stream = util.STREAM_BOTH # linting errors are on stderr, exceptions like "file not found" on stdout
on_stderr = None # handle stderr via split_match
tempfile_suffix = '-'
defaults = {
'selector': 'source.c, source.c++',
'--std=,+': [], # example ['c99', 'c89']
'--enable=,': 'style',
}
def split_match(self, match):
"""
Return the components of the match.
We override this because included header files can cause linter errors,
and we only want errors from the linted file.
"""
if match:
if match.group('file') != self.filename:
return None
return super().split_match(match)
## Instruction:
Reformat cmd to go under 120 character limit
## Code After:
from SublimeLinter.lint import Linter, util
class Cppcheck(Linter):
cmd = (
'cppcheck',
'--template={file}:{line}: {severity}: {message}',
'--inline-suppr',
'--quiet',
'${args}',
'${file}'
)
regex = (
r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\d+):)?\s+'
r'((?P<error>error)|(?P<warning>warning|style|performance|portability|information)):\s+'
r'(?P<message>.+)'
)
error_stream = util.STREAM_BOTH # linting errors are on stderr, exceptions like "file not found" on stdout
on_stderr = None # handle stderr via split_match
tempfile_suffix = '-'
defaults = {
'selector': 'source.c, source.c++',
'--std=,+': [], # example ['c99', 'c89']
'--enable=,': 'style',
}
def split_match(self, match):
"""
Return the components of the match.
We override this because included header files can cause linter errors,
and we only want errors from the linted file.
"""
if match:
if match.group('file') != self.filename:
return None
return super().split_match(match)
|
609908f1181b416f8004c186e1b4a883fd5a9115
|
runner.js
|
runner.js
|
":" //# why? http://sambal.org/?p=1014 ; exec /usr/bin/env node --harmony "$0" "$@"
'use strict';
var packageJson = require('./package.json'),
adventure = require('adventure');
var shop = adventure(packageJson.name),
lesson;
[
'scopes',
'scope-chains',
'global-scope-and-shadowing',
'closures',
'garbage-collection'
].forEach(function(lesson, index) {
lesson = require('./' + lesson);
shop.add((index + 1) + '. ' + lesson.title, function() {
return lesson.problem
});
})
shop.execute(process.argv.slice(2));
|
'use strict';
var packageJson = require('./package.json'),
adventure = require('adventure');
var shop = adventure(packageJson.name),
lesson;
[
'scopes',
'scope-chains',
'global-scope-and-shadowing',
'closures',
'garbage-collection'
].forEach(function(lesson, index) {
lesson = require('./' + lesson);
shop.add((index + 1) + '. ' + lesson.title, function() {
return lesson.problem
});
})
shop.execute(process.argv.slice(2));
|
Remove unnecessary bash hack line
|
Remove unnecessary bash hack line
Refs #3 & #4
|
JavaScript
|
isc
|
aijiekj/scope-chains-closures,Dannnno/scope-chains-closures,jesstelford/scope-chains-closures,SomeoneWeird/scope-chains-closures,martinheidegger/scope-chains-closures,guofoo/scope-chains-closures
|
javascript
|
## Code Before:
":" //# why? http://sambal.org/?p=1014 ; exec /usr/bin/env node --harmony "$0" "$@"
'use strict';
var packageJson = require('./package.json'),
adventure = require('adventure');
var shop = adventure(packageJson.name),
lesson;
[
'scopes',
'scope-chains',
'global-scope-and-shadowing',
'closures',
'garbage-collection'
].forEach(function(lesson, index) {
lesson = require('./' + lesson);
shop.add((index + 1) + '. ' + lesson.title, function() {
return lesson.problem
});
})
shop.execute(process.argv.slice(2));
## Instruction:
Remove unnecessary bash hack line
Refs #3 & #4
## Code After:
'use strict';
var packageJson = require('./package.json'),
adventure = require('adventure');
var shop = adventure(packageJson.name),
lesson;
[
'scopes',
'scope-chains',
'global-scope-and-shadowing',
'closures',
'garbage-collection'
].forEach(function(lesson, index) {
lesson = require('./' + lesson);
shop.add((index + 1) + '. ' + lesson.title, function() {
return lesson.problem
});
})
shop.execute(process.argv.slice(2));
|
a5befe542e857ec36717f7f8da53ff9f2c2af7e6
|
natasha/__init__.py
|
natasha/__init__.py
|
from copy import copy
from collections import deque
from yargy import FactParser
from natasha.grammars import Person, Geo
class Combinator(object):
DEFAULT_GRAMMARS = [
Person,
Geo,
]
def __init__(self, grammars=None, cache_size=50000):
self.grammars = grammars or self.DEFAULT_GRAMMARS
self.parser = FactParser(cache_size=cache_size)
def extract(self, text):
tokens = deque(self.parser.tokenizer.transform(text))
for grammar in self.grammars:
for grammar_type, rule in grammar.__members__.items():
for match in self.parser.extract(copy(tokens), rule.value):
yield (grammar, grammar_type, match)
|
from copy import copy
from collections import deque
from yargy import FactParser
from natasha.grammars import Person, Geo, Money, Date
class Combinator(object):
DEFAULT_GRAMMARS = [
Money,
Person,
Geo,
Date,
]
def __init__(self, grammars=None, cache_size=50000):
self.grammars = grammars or self.DEFAULT_GRAMMARS
self.parser = FactParser(cache_size=cache_size)
def extract(self, text):
tokens = deque(self.parser.tokenizer.transform(text))
for grammar in self.grammars:
for grammar_type, rule in grammar.__members__.items():
for match in self.parser.extract(copy(tokens), rule.value):
yield (grammar, grammar_type, match)
|
Add new grammars to Combinator.DEFAULT_GRAMMARS
|
Add new grammars to Combinator.DEFAULT_GRAMMARS
|
Python
|
mit
|
natasha/natasha
|
python
|
## Code Before:
from copy import copy
from collections import deque
from yargy import FactParser
from natasha.grammars import Person, Geo
class Combinator(object):
DEFAULT_GRAMMARS = [
Person,
Geo,
]
def __init__(self, grammars=None, cache_size=50000):
self.grammars = grammars or self.DEFAULT_GRAMMARS
self.parser = FactParser(cache_size=cache_size)
def extract(self, text):
tokens = deque(self.parser.tokenizer.transform(text))
for grammar in self.grammars:
for grammar_type, rule in grammar.__members__.items():
for match in self.parser.extract(copy(tokens), rule.value):
yield (grammar, grammar_type, match)
## Instruction:
Add new grammars to Combinator.DEFAULT_GRAMMARS
## Code After:
from copy import copy
from collections import deque
from yargy import FactParser
from natasha.grammars import Person, Geo, Money, Date
class Combinator(object):
DEFAULT_GRAMMARS = [
Money,
Person,
Geo,
Date,
]
def __init__(self, grammars=None, cache_size=50000):
self.grammars = grammars or self.DEFAULT_GRAMMARS
self.parser = FactParser(cache_size=cache_size)
def extract(self, text):
tokens = deque(self.parser.tokenizer.transform(text))
for grammar in self.grammars:
for grammar_type, rule in grammar.__members__.items():
for match in self.parser.extract(copy(tokens), rule.value):
yield (grammar, grammar_type, match)
|
c8cfce2cd4820d937d10dced4472055921342582
|
cyder/core/ctnr/forms.py
|
cyder/core/ctnr/forms.py
|
from django import forms
from cyder.base.constants import LEVELS
from cyder.base.mixins import UsabilityFormMixin
from cyder.core.ctnr.models import Ctnr
class CtnrForm(forms.ModelForm, UsabilityFormMixin):
class Meta:
model = Ctnr
exclude = ('users',)
def filter_by_ctnr_all(self, ctnr):
pass
class CtnrUserForm(forms.Form):
level = forms.ChoiceField(widget=forms.RadioSelect,
label="Level*",
choices=[item for item in LEVELS.items()])
class CtnrObjectForm(forms.Form):
obj_type = forms.ChoiceField(
widget=forms.RadioSelect,
label='Type*',
choices=(
('user', 'User'),
('domain', 'Domain'),
('range', 'Range'),
('workgroup', 'Workgroup')))
def __init__(self, *args, **kwargs):
obj_perm = kwargs.pop('obj_perm', False)
super(CtnrObjectForm, self).__init__(*args, **kwargs)
if not obj_perm:
self.fields['obj_type'].choices = (('user', 'User'),)
obj = forms.CharField(
widget=forms.TextInput(attrs={'id': 'object-searchbox'}),
label='Search*')
|
from django import forms
from cyder.base.constants import LEVELS
from cyder.base.mixins import UsabilityFormMixin
from cyder.core.ctnr.models import Ctnr
class CtnrForm(forms.ModelForm, UsabilityFormMixin):
class Meta:
model = Ctnr
exclude = ('users', 'domains', 'ranges', 'workgroups')
def filter_by_ctnr_all(self, ctnr):
pass
class CtnrUserForm(forms.Form):
level = forms.ChoiceField(widget=forms.RadioSelect,
label="Level*",
choices=[item for item in LEVELS.items()])
class CtnrObjectForm(forms.Form):
obj_type = forms.ChoiceField(
widget=forms.RadioSelect,
label='Type*',
choices=(
('user', 'User'),
('domain', 'Domain'),
('range', 'Range'),
('workgroup', 'Workgroup')))
def __init__(self, *args, **kwargs):
obj_perm = kwargs.pop('obj_perm', False)
super(CtnrObjectForm, self).__init__(*args, **kwargs)
if not obj_perm:
self.fields['obj_type'].choices = (('user', 'User'),)
obj = forms.CharField(
widget=forms.TextInput(attrs={'id': 'object-searchbox'}),
label='Search*')
|
Remove m2m fields from ctnr edit form
|
Remove m2m fields from ctnr edit form
|
Python
|
bsd-3-clause
|
akeym/cyder,drkitty/cyder,OSU-Net/cyder,akeym/cyder,OSU-Net/cyder,OSU-Net/cyder,murrown/cyder,drkitty/cyder,OSU-Net/cyder,akeym/cyder,murrown/cyder,drkitty/cyder,murrown/cyder,murrown/cyder,drkitty/cyder,akeym/cyder
|
python
|
## Code Before:
from django import forms
from cyder.base.constants import LEVELS
from cyder.base.mixins import UsabilityFormMixin
from cyder.core.ctnr.models import Ctnr
class CtnrForm(forms.ModelForm, UsabilityFormMixin):
class Meta:
model = Ctnr
exclude = ('users',)
def filter_by_ctnr_all(self, ctnr):
pass
class CtnrUserForm(forms.Form):
level = forms.ChoiceField(widget=forms.RadioSelect,
label="Level*",
choices=[item for item in LEVELS.items()])
class CtnrObjectForm(forms.Form):
obj_type = forms.ChoiceField(
widget=forms.RadioSelect,
label='Type*',
choices=(
('user', 'User'),
('domain', 'Domain'),
('range', 'Range'),
('workgroup', 'Workgroup')))
def __init__(self, *args, **kwargs):
obj_perm = kwargs.pop('obj_perm', False)
super(CtnrObjectForm, self).__init__(*args, **kwargs)
if not obj_perm:
self.fields['obj_type'].choices = (('user', 'User'),)
obj = forms.CharField(
widget=forms.TextInput(attrs={'id': 'object-searchbox'}),
label='Search*')
## Instruction:
Remove m2m fields from ctnr edit form
## Code After:
from django import forms
from cyder.base.constants import LEVELS
from cyder.base.mixins import UsabilityFormMixin
from cyder.core.ctnr.models import Ctnr
class CtnrForm(forms.ModelForm, UsabilityFormMixin):
class Meta:
model = Ctnr
exclude = ('users', 'domains', 'ranges', 'workgroups')
def filter_by_ctnr_all(self, ctnr):
pass
class CtnrUserForm(forms.Form):
level = forms.ChoiceField(widget=forms.RadioSelect,
label="Level*",
choices=[item for item in LEVELS.items()])
class CtnrObjectForm(forms.Form):
obj_type = forms.ChoiceField(
widget=forms.RadioSelect,
label='Type*',
choices=(
('user', 'User'),
('domain', 'Domain'),
('range', 'Range'),
('workgroup', 'Workgroup')))
def __init__(self, *args, **kwargs):
obj_perm = kwargs.pop('obj_perm', False)
super(CtnrObjectForm, self).__init__(*args, **kwargs)
if not obj_perm:
self.fields['obj_type'].choices = (('user', 'User'),)
obj = forms.CharField(
widget=forms.TextInput(attrs={'id': 'object-searchbox'}),
label='Search*')
|
16514de50a7936950845a3851cae8ce571e0c2c2
|
include/llvm/Transforms/Utils/IntegerDivision.h
|
include/llvm/Transforms/Utils/IntegerDivision.h
|
//===- llvm/Transforms/Utils/IntegerDivision.h ------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains an implementation of 32bit integer division for targets
// that don't have native support. It's largely derived from compiler-rt's
// implementation of __udivsi3, but hand-tuned for targets that prefer less
// control flow.
//
//===----------------------------------------------------------------------===//
#ifndef TRANSFORMS_UTILS_INTEGERDIVISION_H
#define TRANSFORMS_UTILS_INTEGERDIVISION_H
namespace llvm {
class BinaryOperator;
}
namespace llvm {
bool expandDivision(BinaryOperator* Div);
} // End llvm namespace
#endif
|
//===- llvm/Transforms/Utils/IntegerDivision.h ------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains an implementation of 32bit integer division for targets
// that don't have native support. It's largely derived from compiler-rt's
// implementation of __udivsi3, but hand-tuned for targets that prefer less
// control flow.
//
//===----------------------------------------------------------------------===//
#ifndef TRANSFORMS_UTILS_INTEGERDIVISION_H
#define TRANSFORMS_UTILS_INTEGERDIVISION_H
namespace llvm {
class BinaryOperator;
}
namespace llvm {
/// Generate code to divide two integers, replacing Div with the generated
/// code. This currently generates code similarly to compiler-rt's
/// implementations, but future work includes generating more specialized code
/// when more information about the operands are known. Currently only
/// implements 32bit scalar division, but future work is removing this
/// limitation.
///
/// @brief Replace Div with generated code.
bool expandDivision(BinaryOperator* Div);
} // End llvm namespace
#endif
|
Document the interface for integer expansion, using doxygen-style comments
|
Document the interface for integer expansion, using doxygen-style comments
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@164231 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm
|
c
|
## Code Before:
//===- llvm/Transforms/Utils/IntegerDivision.h ------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains an implementation of 32bit integer division for targets
// that don't have native support. It's largely derived from compiler-rt's
// implementation of __udivsi3, but hand-tuned for targets that prefer less
// control flow.
//
//===----------------------------------------------------------------------===//
#ifndef TRANSFORMS_UTILS_INTEGERDIVISION_H
#define TRANSFORMS_UTILS_INTEGERDIVISION_H
namespace llvm {
class BinaryOperator;
}
namespace llvm {
bool expandDivision(BinaryOperator* Div);
} // End llvm namespace
#endif
## Instruction:
Document the interface for integer expansion, using doxygen-style comments
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@164231 91177308-0d34-0410-b5e6-96231b3b80d8
## Code After:
//===- llvm/Transforms/Utils/IntegerDivision.h ------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains an implementation of 32bit integer division for targets
// that don't have native support. It's largely derived from compiler-rt's
// implementation of __udivsi3, but hand-tuned for targets that prefer less
// control flow.
//
//===----------------------------------------------------------------------===//
#ifndef TRANSFORMS_UTILS_INTEGERDIVISION_H
#define TRANSFORMS_UTILS_INTEGERDIVISION_H
namespace llvm {
class BinaryOperator;
}
namespace llvm {
/// Generate code to divide two integers, replacing Div with the generated
/// code. This currently generates code similarly to compiler-rt's
/// implementations, but future work includes generating more specialized code
/// when more information about the operands are known. Currently only
/// implements 32bit scalar division, but future work is removing this
/// limitation.
///
/// @brief Replace Div with generated code.
bool expandDivision(BinaryOperator* Div);
} // End llvm namespace
#endif
|
7bd8694180a748465b508c5fde236dc097783c4e
|
RoboFile.php
|
RoboFile.php
|
<?php
/**
* PHP version 5.6
*
* This source file is subject to the license that is bundled with this package in the file LICENSE.
*/
class RoboFile extends \Robo\Tasks
{
/**
* @description Run all the Codeception acceptance tests in PhantomJS
*/
public function acceptance()
{
$this->stopOnFail();
$this
->taskExec('node_modules/.bin/phantomjs')
->option('webdriver', 4444)
->option('webdriver-loglevel', 'WARNING')
->background()
->run()
;
$this
->taskServer(8000)
->dir('web')
->background()
->run()
;
$this
->taskExec('php bin/codecept')
->arg('clean')
->run()
;
$this
->taskCodecept('bin/codecept')
->suite('acceptance')
->option('steps')
->run()
;
}
}
|
<?php
/**
* PHP version 5.6
*
* This source file is subject to the license that is bundled with this package in the file LICENSE.
*/
class RoboFile extends \Robo\Tasks
{
/**
* @description Run all the Codeception acceptance tests in PhantomJS
*/
public function acceptance()
{
$this->stopOnFail();
$this
->taskExec('node_modules/.bin/phantomjs')
->option('webdriver', 4444)
->option('webdriver-loglevel', 'WARNING')
->background()
->run()
;
$this
->taskServer(8000)
->dir('web')
->background()
->run()
;
$this
->taskExec('php bin/codecept')
->arg('clean')
->run()
;
$this
->taskCodecept('bin/codecept')
->suite('acceptance')
->option('steps')
->run()
;
}
/**
* @description Run Behat, phpspec, PHPUnit and Codeception tests
*/
public function test()
{
$this->stopOnFail();
$this
->taskExec('php bin/behat')
->run()
;
$this
->taskPhpspec('bin/phpspec')
->run()
;
$this
->taskPhpUnit('bin/phpunit')
->option('testdox')
->run()
;
$this->acceptance();
}
/**
* @description Run the application using PHP built-in server
*/
public function run()
{
$this->stopOnFail();
$this
->taskServer(8000)
->dir('web')
->background()
->run()
;
while (true);
}
}
|
Add Robot tasks to run all the tests and the app.
|
Add Robot tasks to run all the tests and the app.
|
PHP
|
mit
|
MontealegreLuis/php-testing-tools,MontealegreLuis/php-testing-tools
|
php
|
## Code Before:
<?php
/**
* PHP version 5.6
*
* This source file is subject to the license that is bundled with this package in the file LICENSE.
*/
class RoboFile extends \Robo\Tasks
{
/**
* @description Run all the Codeception acceptance tests in PhantomJS
*/
public function acceptance()
{
$this->stopOnFail();
$this
->taskExec('node_modules/.bin/phantomjs')
->option('webdriver', 4444)
->option('webdriver-loglevel', 'WARNING')
->background()
->run()
;
$this
->taskServer(8000)
->dir('web')
->background()
->run()
;
$this
->taskExec('php bin/codecept')
->arg('clean')
->run()
;
$this
->taskCodecept('bin/codecept')
->suite('acceptance')
->option('steps')
->run()
;
}
}
## Instruction:
Add Robot tasks to run all the tests and the app.
## Code After:
<?php
/**
* PHP version 5.6
*
* This source file is subject to the license that is bundled with this package in the file LICENSE.
*/
class RoboFile extends \Robo\Tasks
{
/**
* @description Run all the Codeception acceptance tests in PhantomJS
*/
public function acceptance()
{
$this->stopOnFail();
$this
->taskExec('node_modules/.bin/phantomjs')
->option('webdriver', 4444)
->option('webdriver-loglevel', 'WARNING')
->background()
->run()
;
$this
->taskServer(8000)
->dir('web')
->background()
->run()
;
$this
->taskExec('php bin/codecept')
->arg('clean')
->run()
;
$this
->taskCodecept('bin/codecept')
->suite('acceptance')
->option('steps')
->run()
;
}
/**
* @description Run Behat, phpspec, PHPUnit and Codeception tests
*/
public function test()
{
$this->stopOnFail();
$this
->taskExec('php bin/behat')
->run()
;
$this
->taskPhpspec('bin/phpspec')
->run()
;
$this
->taskPhpUnit('bin/phpunit')
->option('testdox')
->run()
;
$this->acceptance();
}
/**
* @description Run the application using PHP built-in server
*/
public function run()
{
$this->stopOnFail();
$this
->taskServer(8000)
->dir('web')
->background()
->run()
;
while (true);
}
}
|
5a119725de0012a4776270f22a534de797493180
|
README.adoc
|
README.adoc
|
This repository contains the AsciiDoc mode for CodeMirror.
## Installation
```
$ npm install codemirror-asciidoc
```
## Usage
```js
var codemirror = require("codemirror/lib/codemirror"),
codemirror_asciidoc = require("codemirror-asciidoc/lib/asciidoc");
codemirror.fromTextArea(document.getElementById("editor"), {
lineNumbers: true,
lineWrapping: true,
mode: "asciidoc"
});
```
## License
BSD
## Credits
The AsciiDoc mode for CodeMirror was generated from the AsciiDoc mode for Ace using the https://github.com/espadrine/ace2cm[ace2cm] project by https://github.com/espadrine[Thaddee Tyl].
|
This repository contains the AsciiDoc mode for CodeMirror.
## Installation
```
$ npm install codemirror-asciidoc
```
## Usage
```js
var codemirror = require("codemirror"),
codemirror_asciidoc = require("codemirror-asciidoc");
codemirror.fromTextArea(document.getElementById("editor"), {
lineNumbers: true,
lineWrapping: true,
mode: "asciidoc"
});
```
## License
BSD
## Credits
The AsciiDoc mode for CodeMirror was generated from the AsciiDoc mode for Ace using the https://github.com/espadrine/ace2cm[ace2cm] project by https://github.com/espadrine[Thaddee Tyl].
|
Simplify import path for modules
|
Simplify import path for modules
|
AsciiDoc
|
bsd-3-clause
|
asciidoctor/codemirror-asciidoc
|
asciidoc
|
## Code Before:
This repository contains the AsciiDoc mode for CodeMirror.
## Installation
```
$ npm install codemirror-asciidoc
```
## Usage
```js
var codemirror = require("codemirror/lib/codemirror"),
codemirror_asciidoc = require("codemirror-asciidoc/lib/asciidoc");
codemirror.fromTextArea(document.getElementById("editor"), {
lineNumbers: true,
lineWrapping: true,
mode: "asciidoc"
});
```
## License
BSD
## Credits
The AsciiDoc mode for CodeMirror was generated from the AsciiDoc mode for Ace using the https://github.com/espadrine/ace2cm[ace2cm] project by https://github.com/espadrine[Thaddee Tyl].
## Instruction:
Simplify import path for modules
## Code After:
This repository contains the AsciiDoc mode for CodeMirror.
## Installation
```
$ npm install codemirror-asciidoc
```
## Usage
```js
var codemirror = require("codemirror"),
codemirror_asciidoc = require("codemirror-asciidoc");
codemirror.fromTextArea(document.getElementById("editor"), {
lineNumbers: true,
lineWrapping: true,
mode: "asciidoc"
});
```
## License
BSD
## Credits
The AsciiDoc mode for CodeMirror was generated from the AsciiDoc mode for Ace using the https://github.com/espadrine/ace2cm[ace2cm] project by https://github.com/espadrine[Thaddee Tyl].
|
ee2622f43a1194f830c6f3a313c02fce936de9f6
|
source/rankings.html.haml
|
source/rankings.html.haml
|
%h2
ATP rankings chart for top 50 players
%span.generated-note (generated at <span class='generated-at'></span>)
#rankings-chart
%script(src='javascripts/rankings-dep.js')
:javascript
loadData('rankings', function(rankings) {
updateGenerationTime(rankings.generated_at);
window.d = $.map(rankings.data, function(v, i){return [[v.rank + ' ' + v.last, v.points]]});
$.jqplot('rankings-chart', [d], {
series: [{
renderer:$.jqplot.BarRenderer,
rendererOptions:{
barWidth: 14,
barMargin: 2,
barPadding: 2
},
}],
axesDefaults: {
tickRenderer: $.jqplot.CanvasAxisTickRenderer,
tickOptions: {
showGridLine: false,
angle: -35,
fontSize: '10pt',
fontFamily: 'Georgia'
}
},
axes: {
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer
},
yaxis: {
min: 0,
max: 15000,
numberTicks: 7,
autoscale:true
}
}
});
$('#rankings-chart').bind('jqplotDataClick',
function (ev, seriesIndex, pointIndex, data) {
if (window.console) console.log(seriesIndex, pointIndex, data);
}
);
})
|
%h2
ATP rankings chart for top 50 players
%span.generated-note (generated at <span class='generated-at'></span>)
#rankings-chart(style='height: 1000px')
%script(src='javascripts/rankings-dep.js')
:javascript
loadData('rankings', function(rankings) {
updateGenerationTime(rankings.generated_at);
window.d = $.map(rankings.data, function(v, i){return [[v.points, v.rank + ' ' + v.last]]}).reverse();
$.jqplot('rankings-chart', [d], {
series: [{
shadowAngle: 135,
renderer:$.jqplot.BarRenderer,
rendererOptions:{
barDirection: 'horizontal',
barWidth: 10,
barMargin: 2,
barPadding: 2
},
}],
axesDefaults: {
tickRenderer: $.jqplot.CanvasAxisTickRenderer,
tickOptions: {
showGridLine: false,
fontSize: '10pt',
fontFamily: 'Georgia'
}
},
axes: {
yaxis: {
renderer: $.jqplot.CategoryAxisRenderer
},
xaxis: {
min: 0,
max: 15000,
numberTicks: 7,
autoscale:true
}
}
});
//$('#rankings-chart').bind('jqplotDataClick',
// function (ev, seriesIndex, pointIndex, data) {
// if (window.console) console.log(seriesIndex, pointIndex, data);
// }
//);
})
|
Change ranking bar direction to horizontal
|
Change ranking bar direction to horizontal
|
Haml
|
mit
|
gcao/tennis,gcao/tennis
|
haml
|
## Code Before:
%h2
ATP rankings chart for top 50 players
%span.generated-note (generated at <span class='generated-at'></span>)
#rankings-chart
%script(src='javascripts/rankings-dep.js')
:javascript
loadData('rankings', function(rankings) {
updateGenerationTime(rankings.generated_at);
window.d = $.map(rankings.data, function(v, i){return [[v.rank + ' ' + v.last, v.points]]});
$.jqplot('rankings-chart', [d], {
series: [{
renderer:$.jqplot.BarRenderer,
rendererOptions:{
barWidth: 14,
barMargin: 2,
barPadding: 2
},
}],
axesDefaults: {
tickRenderer: $.jqplot.CanvasAxisTickRenderer,
tickOptions: {
showGridLine: false,
angle: -35,
fontSize: '10pt',
fontFamily: 'Georgia'
}
},
axes: {
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer
},
yaxis: {
min: 0,
max: 15000,
numberTicks: 7,
autoscale:true
}
}
});
$('#rankings-chart').bind('jqplotDataClick',
function (ev, seriesIndex, pointIndex, data) {
if (window.console) console.log(seriesIndex, pointIndex, data);
}
);
})
## Instruction:
Change ranking bar direction to horizontal
## Code After:
%h2
ATP rankings chart for top 50 players
%span.generated-note (generated at <span class='generated-at'></span>)
#rankings-chart(style='height: 1000px')
%script(src='javascripts/rankings-dep.js')
:javascript
loadData('rankings', function(rankings) {
updateGenerationTime(rankings.generated_at);
window.d = $.map(rankings.data, function(v, i){return [[v.points, v.rank + ' ' + v.last]]}).reverse();
$.jqplot('rankings-chart', [d], {
series: [{
shadowAngle: 135,
renderer:$.jqplot.BarRenderer,
rendererOptions:{
barDirection: 'horizontal',
barWidth: 10,
barMargin: 2,
barPadding: 2
},
}],
axesDefaults: {
tickRenderer: $.jqplot.CanvasAxisTickRenderer,
tickOptions: {
showGridLine: false,
fontSize: '10pt',
fontFamily: 'Georgia'
}
},
axes: {
yaxis: {
renderer: $.jqplot.CategoryAxisRenderer
},
xaxis: {
min: 0,
max: 15000,
numberTicks: 7,
autoscale:true
}
}
});
//$('#rankings-chart').bind('jqplotDataClick',
// function (ev, seriesIndex, pointIndex, data) {
// if (window.console) console.log(seriesIndex, pointIndex, data);
// }
//);
})
|
40c79d932a1ee0acbfc9babb0be904e2fa4ba9dd
|
README.md
|
README.md
|
**Test style 2**
*Test 123*
## The second large heading
Changes in example branch\
THis is test new cotent
Readme file updated in a branch
Adding a new comments here
### One more uddate for readme file
## Purpose
THis file sdfasf
### REfdfs
dfsadf
## Getting start
fjasl;kdjf
|
**Test style 2**
*Test 123*
## The second large heading
Changes in example branch\
THis is test new cotent
Readme file updated in a branch
Adding a new comments here
### One more uddate for readme file
## Purpose
THis file sdfasf
### REfdfs
dfsadf
## Getting start
fjasl;kdjf
## Adding a new line to see if it applying to personal account and orginization
__Test 123__
|
Test sync between personal and organization by editing readme file
|
Test sync between personal and organization by editing readme file
|
Markdown
|
apache-2.0
|
org-example/website,org-example/website
|
markdown
|
## Code Before:
**Test style 2**
*Test 123*
## The second large heading
Changes in example branch\
THis is test new cotent
Readme file updated in a branch
Adding a new comments here
### One more uddate for readme file
## Purpose
THis file sdfasf
### REfdfs
dfsadf
## Getting start
fjasl;kdjf
## Instruction:
Test sync between personal and organization by editing readme file
## Code After:
**Test style 2**
*Test 123*
## The second large heading
Changes in example branch\
THis is test new cotent
Readme file updated in a branch
Adding a new comments here
### One more uddate for readme file
## Purpose
THis file sdfasf
### REfdfs
dfsadf
## Getting start
fjasl;kdjf
## Adding a new line to see if it applying to personal account and orginization
__Test 123__
|
5aee5bde100ff4d5c2e9b2cc54964954e10bf5f8
|
src/civility-static/civility-public/views/controllers/tractographyApp.html
|
src/civility-static/civility-public/views/controllers/tractographyApp.html
|
<div ng-controller="tractographyAppController">
<!-- Tabs -->
<uib-tabset active="routeParams.activeTab">
<uib-tab index="1" heading="Tractography" active="true">
<submit-tracto> </submit-tracto>
</uib-tab>
<uib-tab index="2" heading="Jobs">
<clusterpost-app job-callback="jobCallback" download-callback="downloadCallback" app-name="'tractographyScriptApp.sh'"></clusterpost-app>
</uib-tab>
<uib-tab index="3" heading="View">
<circle-plot data="job"></circle-plot>
</uib-tab>
<uib-tab index="4" heading="Visualization">
<connectivity-visualisation > </connectivity-visualisation>
</uib-tab>
</uib-tabset>
<div >
|
<div ng-controller="tractographyAppController">
<!-- Tabs -->
<uib-tabset active="routeParams.activeTab">
<uib-tab index="1" heading="Tractography" active="true">
<submit-tracto> </submit-tracto>
</uib-tab>
<uib-tab index="2" heading="Jobs">
<clusterpost-jobs job-callback="jobCallback" download-callback="downloadCallback" executable="'tractographyScriptApp.sh'"></clusterpost-jobs>
</uib-tab>
<uib-tab index="3" heading="View">
<circle-plot data="job"></circle-plot>
</uib-tab>
<uib-tab index="4" heading="Visualization">
<connectivity-visualisation > </connectivity-visualisation>
</uib-tab>
</uib-tabset>
<div >
|
Change directive to standard list jobs
|
ENH: Change directive to standard list jobs
|
HTML
|
apache-2.0
|
NIRALUser/ProbtrackBrainConnectivity,NIRALUser/ProbtrackBrainConnectivity,NIRALUser/CIVILITY,NIRALUser/ProbtrackBrainConnectivity,NIRALUser/ProbtrackBrainConnectivity,NIRALUser/CIVILITY,NIRALUser/CIVILITY,NIRALUser/CIVILITY
|
html
|
## Code Before:
<div ng-controller="tractographyAppController">
<!-- Tabs -->
<uib-tabset active="routeParams.activeTab">
<uib-tab index="1" heading="Tractography" active="true">
<submit-tracto> </submit-tracto>
</uib-tab>
<uib-tab index="2" heading="Jobs">
<clusterpost-app job-callback="jobCallback" download-callback="downloadCallback" app-name="'tractographyScriptApp.sh'"></clusterpost-app>
</uib-tab>
<uib-tab index="3" heading="View">
<circle-plot data="job"></circle-plot>
</uib-tab>
<uib-tab index="4" heading="Visualization">
<connectivity-visualisation > </connectivity-visualisation>
</uib-tab>
</uib-tabset>
<div >
## Instruction:
ENH: Change directive to standard list jobs
## Code After:
<div ng-controller="tractographyAppController">
<!-- Tabs -->
<uib-tabset active="routeParams.activeTab">
<uib-tab index="1" heading="Tractography" active="true">
<submit-tracto> </submit-tracto>
</uib-tab>
<uib-tab index="2" heading="Jobs">
<clusterpost-jobs job-callback="jobCallback" download-callback="downloadCallback" executable="'tractographyScriptApp.sh'"></clusterpost-jobs>
</uib-tab>
<uib-tab index="3" heading="View">
<circle-plot data="job"></circle-plot>
</uib-tab>
<uib-tab index="4" heading="Visualization">
<connectivity-visualisation > </connectivity-visualisation>
</uib-tab>
</uib-tabset>
<div >
|
7f009627bc82b67f34f93430152da71767be0029
|
packages/rear-system-package/config/app-paths.js
|
packages/rear-system-package/config/app-paths.js
|
const fs = require('fs');
const path = require('path');
const resolveApp = require('rear-core/resolve-app');
const ownNodeModules = fs.realpathSync(
path.join(__dirname, '..', 'node_modules')
);
const AppPaths = {
ownNodeModules,
root: resolveApp('src'),
appIndexJs: resolveApp('src', 'index.js'),
// TODO: rename to appBuild ?
dest: resolveApp('lib'),
eslintConfig: path.join(ownNodeModules, 'eslint-config-rear', 'index.js'),
flowBin: path.join(ownNodeModules, 'flow-bin'),
eslintBin: path.join(ownNodeModules, 'eslint'),
appNodeModules: resolveApp('node_modules'),
}
module.exports = AppPaths;
|
const fs = require('fs');
const path = require('path');
const resolveApp = require('rear-core/resolve-app');
let ownNodeModules;
try {
// Since this package is also used to build other packages
// in this repo, we need to make sure its dependencies
// are available when is symlinked by lerna.
// Normally, modules are resolved from the app's node_modules.
ownNodeModules = fs.realpathSync(
path.join(__dirname, '..', 'node_modules')
);
} catch (err) {
ownNodeModules = resolveApp('node_modules');
}
const AppPaths = {
ownNodeModules,
root: resolveApp('src'),
appIndexJs: resolveApp('src', 'index.js'),
dest: resolveApp('lib'),
eslintConfig: path.join(ownNodeModules, 'eslint-config-rear', 'index.js'),
flowBin: path.join(ownNodeModules, 'flow-bin'),
eslintBin: path.join(ownNodeModules, 'eslint'),
appNodeModules: resolveApp('node_modules'),
}
module.exports = AppPaths;
|
Fix an issue that prevented modules to be resolved
|
Fix an issue that prevented modules to be resolved
rear-system-package's config/app-paths.js was trying to resolve
node_modules from inside the dependency. This is needed when
rear-system-package is symlinked. Normally node_modules paths should
be resolved from the app's node_modules.
|
JavaScript
|
mit
|
erremauro/rear,rearjs/rear
|
javascript
|
## Code Before:
const fs = require('fs');
const path = require('path');
const resolveApp = require('rear-core/resolve-app');
const ownNodeModules = fs.realpathSync(
path.join(__dirname, '..', 'node_modules')
);
const AppPaths = {
ownNodeModules,
root: resolveApp('src'),
appIndexJs: resolveApp('src', 'index.js'),
// TODO: rename to appBuild ?
dest: resolveApp('lib'),
eslintConfig: path.join(ownNodeModules, 'eslint-config-rear', 'index.js'),
flowBin: path.join(ownNodeModules, 'flow-bin'),
eslintBin: path.join(ownNodeModules, 'eslint'),
appNodeModules: resolveApp('node_modules'),
}
module.exports = AppPaths;
## Instruction:
Fix an issue that prevented modules to be resolved
rear-system-package's config/app-paths.js was trying to resolve
node_modules from inside the dependency. This is needed when
rear-system-package is symlinked. Normally node_modules paths should
be resolved from the app's node_modules.
## Code After:
const fs = require('fs');
const path = require('path');
const resolveApp = require('rear-core/resolve-app');
let ownNodeModules;
try {
// Since this package is also used to build other packages
// in this repo, we need to make sure its dependencies
// are available when is symlinked by lerna.
// Normally, modules are resolved from the app's node_modules.
ownNodeModules = fs.realpathSync(
path.join(__dirname, '..', 'node_modules')
);
} catch (err) {
ownNodeModules = resolveApp('node_modules');
}
const AppPaths = {
ownNodeModules,
root: resolveApp('src'),
appIndexJs: resolveApp('src', 'index.js'),
dest: resolveApp('lib'),
eslintConfig: path.join(ownNodeModules, 'eslint-config-rear', 'index.js'),
flowBin: path.join(ownNodeModules, 'flow-bin'),
eslintBin: path.join(ownNodeModules, 'eslint'),
appNodeModules: resolveApp('node_modules'),
}
module.exports = AppPaths;
|
01d7817f5b83bc7277704e7b9bff355ddf7df457
|
.scrutinizer.yml
|
.scrutinizer.yml
|
filter:
excluded_paths:
- 'build/*'
- 'vendor/*'
- 'l10n/*'
- 'tests/'
- 'js/vendor/*'
- 'js/tests/*'
imports:
- javascript
- php
tools:
external_code_coverage:
timeout: 7200 # Timeout in seconds. 120 minutes
|
build:
nodes:
analysis:
tests:
override:
- php-scrutinizer-run --enable-security-analysis
filter:
excluded_paths:
- 'build/*'
- 'vendor/*'
- 'l10n/*'
- 'tests/'
- 'js/vendor/*'
- 'js/tests/*'
imports:
- javascript
- php
tools:
external_code_coverage:
timeout: 7200 # Timeout in seconds. 120 minutes
|
Switch to new Scrutinizer analysis
|
Switch to new Scrutinizer analysis
Signed-off-by: Christoph Wurst <[email protected]>
|
YAML
|
agpl-3.0
|
kingjan1999/mail,kingjan1999/mail,ChristophWurst/mail,ChristophWurst/mail,kingjan1999/mail,ChristophWurst/mail
|
yaml
|
## Code Before:
filter:
excluded_paths:
- 'build/*'
- 'vendor/*'
- 'l10n/*'
- 'tests/'
- 'js/vendor/*'
- 'js/tests/*'
imports:
- javascript
- php
tools:
external_code_coverage:
timeout: 7200 # Timeout in seconds. 120 minutes
## Instruction:
Switch to new Scrutinizer analysis
Signed-off-by: Christoph Wurst <[email protected]>
## Code After:
build:
nodes:
analysis:
tests:
override:
- php-scrutinizer-run --enable-security-analysis
filter:
excluded_paths:
- 'build/*'
- 'vendor/*'
- 'l10n/*'
- 'tests/'
- 'js/vendor/*'
- 'js/tests/*'
imports:
- javascript
- php
tools:
external_code_coverage:
timeout: 7200 # Timeout in seconds. 120 minutes
|
0f44d1cf6cb67c5118b296fa6efb118e8104dbe7
|
.travis.yml
|
.travis.yml
|
language: php
php:
- 7.3
- 7.4snapshot
env:
matrix:
- DEPENDENCIES="high"
- DEPENDENCIES="low"
before_script:
- if [ "$DEPENDENCIES" = "high" ]; then composer --prefer-source update; fi;
- if [ "$DEPENDENCIES" = "low" ]; then composer --prefer-lowest --prefer-source update; fi;
script:
- ./vendor/bin/phpunit
- ulimit -n 4096 && phpdbg -qrr ./vendor/bin/infection --min-msi=98 --min-covered-msi=98
- php -n ./vendor/bin/phpbench run --report=aggregate --revs=500 --iterations=50 --warmup=3
# Only run the code standards with the latest package
- ./vendor/bin/phpcs
- ./vendor/bin/roave-backward-compatibility-check
|
language: php
php:
- 7.3
- 7.4snapshot
env:
matrix:
- DEPENDENCIES="high"
- DEPENDENCIES="low"
before_script:
- if [ "$DEPENDENCIES" = "high" ]; then composer --prefer-source update; fi;
- if [ "$DEPENDENCIES" = "low" ]; then composer --prefer-lowest --prefer-source update; fi;
script:
- ./vendor/bin/phpunit
- ulimit -n 4096 && phpdbg -qrr ./vendor/bin/infection --min-msi=98 --min-covered-msi=98
- php -n ./vendor/bin/phpbench run --report=aggregate --revs=500 --iterations=50 --warmup=3
# Only run the code standards with the latest package
- ./vendor/bin/phpcs
- ./vendor/bin/roave-backward-compatibility-check
matrix:
allow_failures:
- php: 7.4snapshot
|
Allow failures on PHP 7.4 (for now)
|
Allow failures on PHP 7.4 (for now)
We'll add `--ignore-platform-requirements` to installation steps later on,
if we want to further explore PHP 7.4 implications.
|
YAML
|
mit
|
Ocramius/GeneratedHydrator
|
yaml
|
## Code Before:
language: php
php:
- 7.3
- 7.4snapshot
env:
matrix:
- DEPENDENCIES="high"
- DEPENDENCIES="low"
before_script:
- if [ "$DEPENDENCIES" = "high" ]; then composer --prefer-source update; fi;
- if [ "$DEPENDENCIES" = "low" ]; then composer --prefer-lowest --prefer-source update; fi;
script:
- ./vendor/bin/phpunit
- ulimit -n 4096 && phpdbg -qrr ./vendor/bin/infection --min-msi=98 --min-covered-msi=98
- php -n ./vendor/bin/phpbench run --report=aggregate --revs=500 --iterations=50 --warmup=3
# Only run the code standards with the latest package
- ./vendor/bin/phpcs
- ./vendor/bin/roave-backward-compatibility-check
## Instruction:
Allow failures on PHP 7.4 (for now)
We'll add `--ignore-platform-requirements` to installation steps later on,
if we want to further explore PHP 7.4 implications.
## Code After:
language: php
php:
- 7.3
- 7.4snapshot
env:
matrix:
- DEPENDENCIES="high"
- DEPENDENCIES="low"
before_script:
- if [ "$DEPENDENCIES" = "high" ]; then composer --prefer-source update; fi;
- if [ "$DEPENDENCIES" = "low" ]; then composer --prefer-lowest --prefer-source update; fi;
script:
- ./vendor/bin/phpunit
- ulimit -n 4096 && phpdbg -qrr ./vendor/bin/infection --min-msi=98 --min-covered-msi=98
- php -n ./vendor/bin/phpbench run --report=aggregate --revs=500 --iterations=50 --warmup=3
# Only run the code standards with the latest package
- ./vendor/bin/phpcs
- ./vendor/bin/roave-backward-compatibility-check
matrix:
allow_failures:
- php: 7.4snapshot
|
4431dd159e7e3e8ba8793f9c1afa636e4eaaba9f
|
CHANGELOG.md
|
CHANGELOG.md
|
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
### Added
- Add a phyMyAdmin container
## [v0.11.0] - 2016-11-09
### Changed
- Allow access to the Magento Connect Manager (see issue #29)
- Move the scope hint and qconfig modules to the normal requirements (see pull request #27)
|
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
### Added
- Add a phyMyAdmin container
### Changed
- Update AOE Scheduler to version "^1"
- Reference major versions for SMTP Pro, Lesti FPC, Magento Core, AOE Template hints and Scope Hint
## [v0.11.0] - 2016-11-09
### Changed
- Allow access to the Magento Connect Manager (see issue #29)
- Move the scope hint and qconfig modules to the normal requirements (see pull request #27)
|
Update the changelog for v0.12.0
|
Update the changelog for v0.12.0
|
Markdown
|
bsd-3-clause
|
andreaskoch/dockerized-magento
|
markdown
|
## Code Before:
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
### Added
- Add a phyMyAdmin container
## [v0.11.0] - 2016-11-09
### Changed
- Allow access to the Magento Connect Manager (see issue #29)
- Move the scope hint and qconfig modules to the normal requirements (see pull request #27)
## Instruction:
Update the changelog for v0.12.0
## Code After:
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
### Added
- Add a phyMyAdmin container
### Changed
- Update AOE Scheduler to version "^1"
- Reference major versions for SMTP Pro, Lesti FPC, Magento Core, AOE Template hints and Scope Hint
## [v0.11.0] - 2016-11-09
### Changed
- Allow access to the Magento Connect Manager (see issue #29)
- Move the scope hint and qconfig modules to the normal requirements (see pull request #27)
|
12789a1fd7ff4b88d7650611a9c39c4dcde17cd1
|
lib/travis/build/addons/sauce_connect.rb
|
lib/travis/build/addons/sauce_connect.rb
|
require 'travis/build/addons/base'
module Travis
module Build
class Addons
class SauceConnect < Base
SUPER_USER_SAFE = true
TEMPLATES_PATH = File.expand_path('templates', __FILE__.sub('.rb', ''))
def after_header
sh.raw template('sauce_connect.sh')
end
def before_before_script
sh.export 'SAUCE_USERNAME', username, echo: false if username
sh.export 'SAUCE_ACCESS_KEY', access_key, echo: false if access_key
sh.fold 'sauce_connect' do
sh.cmd 'travis_start_sauce_connect', assert: false, echo: true, timing: true
sh.export 'TRAVIS_SAUCE_CONNECT', 'true', echo: false
end
end
def finish
sh.cmd 'travis_stop_sauce_connect', assert: false, echo: true, timing: true
end
private
def username
config[:username]
end
def access_key
config[:access_key]
end
end
end
end
end
|
require 'travis/build/addons/base'
module Travis
module Build
class Addons
class SauceConnect < Base
SUPER_USER_SAFE = true
TEMPLATES_PATH = File.expand_path('templates', __FILE__.sub('.rb', ''))
def after_header
sh.raw template('sauce_connect.sh')
end
def before_before_script
sh.export 'SAUCE_USERNAME', username, echo: false if username
sh.export 'SAUCE_ACCESS_KEY', access_key, echo: false if access_key
sh.fold 'sauce_connect.start' do
sh.echo 'Starting Sauce Connect', echo: true, ansi: :yellow
sh.cmd 'travis_start_sauce_connect', assert: false, echo: true, timing: true
sh.export 'TRAVIS_SAUCE_CONNECT', 'true', echo: false
end
end
def after_after_script
sh.fold 'sauce_connect.stop' do
sh.echo 'Stopping Sauce Connect', echo: true, ansi: :yellow
sh.cmd 'travis_stop_sauce_connect', assert: false, echo: true, timing: true
end
end
private
def username
config[:username]
end
def access_key
config[:access_key]
end
end
end
end
end
|
Add fold headers for sauce connect start/stop operations
|
Add fold headers for sauce connect start/stop operations
|
Ruby
|
mit
|
Tiger66639/travis-build,kidaa/travis-build,luoqii/travis-build,aceofspades/travis-build,craigcitro/travis-build,JuliaCI/travis-build,akoeplinger/travis-build,andyli/travis-build,Acidburn0zzz/travis-build,gavioto/travis-build,tmccombs/travis-build,lrowe/travis-build,andyli/travis-build,luoqii/travis-build,Joshua-Anderson/travis-build,Distelli/travis-build,kevmoo/travis-build,final-ci/travis-build,vinaykaradia/travisBuild-clone,vlamanna/travis-build,craigcitro/travis-build,wereHamster/travis-build,jhass/travis-build,Distelli/travis-build,paultcochrane/travis-build,JuliaCI/travis-build,aceofspades/travis-build,tmccombs/travis-build,will/travis-build,wereHamster/travis-build,whip112/travis-build,wereHamster/travis-build,Joshua-Anderson/travis-build,paultcochrane/travis-build,vinaykaradia/travisBuild-clone,Tiger66639/travis-build,final-ci/travis-build,kidaa/travis-build,dirk/travis-build,whip112/travis-build,paultcochrane/travis-build,tianon/travis-build,vinaykaradia/travisBuild-clone,will/travis-build,gavioto/travis-build,akoeplinger/travis-build,dirk/travis-build,lrowe/travis-build,Joshua-Anderson/travis-build,tianon/travis-build,will/travis-build,final-ci/travis-build,vlamanna/travis-build,kevmoo/travis-build,aceofspades/travis-build,Acidburn0zzz/travis-build,jhass/travis-build,vlamanna/travis-build
|
ruby
|
## Code Before:
require 'travis/build/addons/base'
module Travis
module Build
class Addons
class SauceConnect < Base
SUPER_USER_SAFE = true
TEMPLATES_PATH = File.expand_path('templates', __FILE__.sub('.rb', ''))
def after_header
sh.raw template('sauce_connect.sh')
end
def before_before_script
sh.export 'SAUCE_USERNAME', username, echo: false if username
sh.export 'SAUCE_ACCESS_KEY', access_key, echo: false if access_key
sh.fold 'sauce_connect' do
sh.cmd 'travis_start_sauce_connect', assert: false, echo: true, timing: true
sh.export 'TRAVIS_SAUCE_CONNECT', 'true', echo: false
end
end
def finish
sh.cmd 'travis_stop_sauce_connect', assert: false, echo: true, timing: true
end
private
def username
config[:username]
end
def access_key
config[:access_key]
end
end
end
end
end
## Instruction:
Add fold headers for sauce connect start/stop operations
## Code After:
require 'travis/build/addons/base'
module Travis
module Build
class Addons
class SauceConnect < Base
SUPER_USER_SAFE = true
TEMPLATES_PATH = File.expand_path('templates', __FILE__.sub('.rb', ''))
def after_header
sh.raw template('sauce_connect.sh')
end
def before_before_script
sh.export 'SAUCE_USERNAME', username, echo: false if username
sh.export 'SAUCE_ACCESS_KEY', access_key, echo: false if access_key
sh.fold 'sauce_connect.start' do
sh.echo 'Starting Sauce Connect', echo: true, ansi: :yellow
sh.cmd 'travis_start_sauce_connect', assert: false, echo: true, timing: true
sh.export 'TRAVIS_SAUCE_CONNECT', 'true', echo: false
end
end
def after_after_script
sh.fold 'sauce_connect.stop' do
sh.echo 'Stopping Sauce Connect', echo: true, ansi: :yellow
sh.cmd 'travis_stop_sauce_connect', assert: false, echo: true, timing: true
end
end
private
def username
config[:username]
end
def access_key
config[:access_key]
end
end
end
end
end
|
a45eed3e99c00974815a6c2e0fed8bc57e9a6c6e
|
backend/install.sh
|
backend/install.sh
|
apt-get update -y
apt-get --assume-yes -y install mongodb
pip3 install -r requirements.txt
|
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list
apt-get update -y
apt-get --assume-yes -y install mongodb-org
pip3 install -r requirements.txt
|
Install newer mongodb version (to allow for text indexing)
|
Install newer mongodb version (to allow for text indexing)
|
Shell
|
mit
|
HMProgrammingClub/NYCSL2,HMProgrammingClub/NYCSL2,HMProgrammingClub/NYCSL2,HMProgrammingClub/NYCSL2,HMProgrammingClub/NYCSL2,HMProgrammingClub/NYCSL2
|
shell
|
## Code Before:
apt-get update -y
apt-get --assume-yes -y install mongodb
pip3 install -r requirements.txt
## Instruction:
Install newer mongodb version (to allow for text indexing)
## Code After:
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list
apt-get update -y
apt-get --assume-yes -y install mongodb-org
pip3 install -r requirements.txt
|
370507fc48636417a10e4075917783169f3653c3
|
test_edelbaum.py
|
test_edelbaum.py
|
from astropy import units as u
from numpy.testing import assert_almost_equal
from poliastro.bodies import Earth
from edelbaum import extra_quantities
def test_leo_geo_time_and_delta_v():
a_0 = 7000.0 # km
a_f = 42166.0 # km
i_f = 0.0 # deg
i_0 = 28.5 # deg
f = 3.5e-7 # km / s2
k = Earth.k.decompose([u.km, u.s]).value
expected_t_f = 191.26295 # s
expected_delta_V = 5.78378 # km / s
delta_V, t_f = extra_quantities(k, a_0, a_f, i_f - i_0, f)
assert_almost_equal(t_f / 86400, expected_t_f, decimal=0)
assert_almost_equal(delta_V, expected_delta_V, decimal=1)
|
from astropy import units as u
from numpy.testing import assert_almost_equal
from poliastro.bodies import Earth
from edelbaum import extra_quantities
def test_leo_geo_time_and_delta_v():
a_0 = 7000.0 # km
a_f = 42166.0 # km
i_f = 0.0 # rad
i_0 = (28.5 * u.deg).to(u.rad).value # rad
f = 3.5e-7 # km / s2
k = Earth.k.decompose([u.km, u.s]).value
expected_t_f = 191.26295 # s
expected_delta_V = 5.78378 # km / s
delta_V, t_f = extra_quantities(k, a_0, a_f, i_f - i_0, f)
assert_almost_equal(t_f / 86400, expected_t_f, decimal=2)
assert_almost_equal(delta_V, expected_delta_V, decimal=4)
|
Fix unit error, improve precision
|
Fix unit error, improve precision
|
Python
|
mit
|
Juanlu001/pfc-uc3m
|
python
|
## Code Before:
from astropy import units as u
from numpy.testing import assert_almost_equal
from poliastro.bodies import Earth
from edelbaum import extra_quantities
def test_leo_geo_time_and_delta_v():
a_0 = 7000.0 # km
a_f = 42166.0 # km
i_f = 0.0 # deg
i_0 = 28.5 # deg
f = 3.5e-7 # km / s2
k = Earth.k.decompose([u.km, u.s]).value
expected_t_f = 191.26295 # s
expected_delta_V = 5.78378 # km / s
delta_V, t_f = extra_quantities(k, a_0, a_f, i_f - i_0, f)
assert_almost_equal(t_f / 86400, expected_t_f, decimal=0)
assert_almost_equal(delta_V, expected_delta_V, decimal=1)
## Instruction:
Fix unit error, improve precision
## Code After:
from astropy import units as u
from numpy.testing import assert_almost_equal
from poliastro.bodies import Earth
from edelbaum import extra_quantities
def test_leo_geo_time_and_delta_v():
a_0 = 7000.0 # km
a_f = 42166.0 # km
i_f = 0.0 # rad
i_0 = (28.5 * u.deg).to(u.rad).value # rad
f = 3.5e-7 # km / s2
k = Earth.k.decompose([u.km, u.s]).value
expected_t_f = 191.26295 # s
expected_delta_V = 5.78378 # km / s
delta_V, t_f = extra_quantities(k, a_0, a_f, i_f - i_0, f)
assert_almost_equal(t_f / 86400, expected_t_f, decimal=2)
assert_almost_equal(delta_V, expected_delta_V, decimal=4)
|
2fcd13166f46f4744db6c7a7978c8c7f535ee5fe
|
.travis.yml
|
.travis.yml
|
language: java
jdk:
- oraclejdk8
install: ./mvnw install -DskipTests=true -Dgpg.skip=true
script: ./mvnw test
sudo: false
|
language: java
jdk:
- oraclejdk8
install: ./mvnw install -DskipTests=true -Dgpg.skip=true
script: ./mvnw test
services:
- redis-server
sudo: false
|
Enable redis on Travis CI
|
Enable redis on Travis CI
|
YAML
|
mit
|
moznion/jesqulin
|
yaml
|
## Code Before:
language: java
jdk:
- oraclejdk8
install: ./mvnw install -DskipTests=true -Dgpg.skip=true
script: ./mvnw test
sudo: false
## Instruction:
Enable redis on Travis CI
## Code After:
language: java
jdk:
- oraclejdk8
install: ./mvnw install -DskipTests=true -Dgpg.skip=true
script: ./mvnw test
services:
- redis-server
sudo: false
|
ccbef43f5bd1f7c393d7ccc90e2ba79f42f3e1e6
|
releasenotes/notes/dvr-support-live-migration-b818b12bd9cbb518.yaml
|
releasenotes/notes/dvr-support-live-migration-b818b12bd9cbb518.yaml
|
---
prelude: >
Fix DVR support for service port live migration.
fixes:
- Create DVR routers pro-actively on the destination
node for migrating dvr service port.
- If the DVR service port has associated floatingip,
then the floatingip namespace would be created on
the destination node.
issues:
- Right now we do not have status update notification
for L3 networks into Nova for nova to take necessary
action on failure to create the L3 networks.
So we do not report back failure and will be handled
in next release. In this case there might be a delay
in creating the routers and fip namespace after the
DVR service port migrates.
- If the nova reverts or cancels the live migration
after it informs the neutron and before it migrates
the dvr service port, then we do not cleanup the router
and fip namespace that was created on the destination
node.
|
---
prelude: >
Improve DVR's resiliency during Nova VM live
migration events.
fixes:
- Create DVR router namespaces pro-actively on the
destination node during live migration events. This
helps minimize packet loss to floating IP traffic.
issues:
- More synchronization between Nova and Neutron is needed
to properly handle live migration failures on either
side. For instance, if live migration is reverted or
canceled, some dangling Neutron resources may be left
on the destination host.
|
Improve release notes for dvr fixes
|
Improve release notes for dvr fixes
Change-Id: Ida1165add974207a4ea25696d26e1daae7914288
Related-bug: #1456073
|
YAML
|
apache-2.0
|
mahak/neutron,igor-toga/local-snat,sebrandon1/neutron,cloudbase/neutron,mahak/neutron,klmitch/neutron,noironetworks/neutron,klmitch/neutron,igor-toga/local-snat,wolverineav/neutron,MaximNevrov/neutron,openstack/neutron,bigswitch/neutron,huntxu/neutron,huntxu/neutron,cloudbase/neutron,mahak/neutron,openstack/neutron,MaximNevrov/neutron,noironetworks/neutron,sebrandon1/neutron,openstack/neutron,eayunstack/neutron,eayunstack/neutron,bigswitch/neutron,wolverineav/neutron
|
yaml
|
## Code Before:
---
prelude: >
Fix DVR support for service port live migration.
fixes:
- Create DVR routers pro-actively on the destination
node for migrating dvr service port.
- If the DVR service port has associated floatingip,
then the floatingip namespace would be created on
the destination node.
issues:
- Right now we do not have status update notification
for L3 networks into Nova for nova to take necessary
action on failure to create the L3 networks.
So we do not report back failure and will be handled
in next release. In this case there might be a delay
in creating the routers and fip namespace after the
DVR service port migrates.
- If the nova reverts or cancels the live migration
after it informs the neutron and before it migrates
the dvr service port, then we do not cleanup the router
and fip namespace that was created on the destination
node.
## Instruction:
Improve release notes for dvr fixes
Change-Id: Ida1165add974207a4ea25696d26e1daae7914288
Related-bug: #1456073
## Code After:
---
prelude: >
Improve DVR's resiliency during Nova VM live
migration events.
fixes:
- Create DVR router namespaces pro-actively on the
destination node during live migration events. This
helps minimize packet loss to floating IP traffic.
issues:
- More synchronization between Nova and Neutron is needed
to properly handle live migration failures on either
side. For instance, if live migration is reverted or
canceled, some dangling Neutron resources may be left
on the destination host.
|
0385f8959fc610f26d2e62b4153dbeeb9c33ee6c
|
mapillary/photostory001.md
|
mapillary/photostory001.md
|
---
layout: page
title: Mapillary Photostory 001
permalink: /mapillary/photostory001
---
<div class="row"><div class="col-md-12">
<iframe width="100%" src="https://mapillary-hacks.github.io/photostories/?src=/mapillary/photostory001.js"></iframe>
</div>
</div>
|
---
layout: page
title: Mapillary Photostory 001
permalink: /mapillary/photostory001
---
<div class="row"><div class="col-md-12">
<iframe width="100%" src="https://mapillary-hacks.github.io/photostories/?src=www.terremotocentroitalia.info/mapillary/photostory001.js"></iframe>
</div>
</div>
|
Fix link photostory di prova
|
Fix link photostory di prova
|
Markdown
|
mit
|
emergenzeHack/terremotocentro,emergenzeHack/terremotocentro,emergenzeHack/terremotocentro,emergenzeHack/terremotocentro,emergenzeHack/terremotocentro
|
markdown
|
## Code Before:
---
layout: page
title: Mapillary Photostory 001
permalink: /mapillary/photostory001
---
<div class="row"><div class="col-md-12">
<iframe width="100%" src="https://mapillary-hacks.github.io/photostories/?src=/mapillary/photostory001.js"></iframe>
</div>
</div>
## Instruction:
Fix link photostory di prova
## Code After:
---
layout: page
title: Mapillary Photostory 001
permalink: /mapillary/photostory001
---
<div class="row"><div class="col-md-12">
<iframe width="100%" src="https://mapillary-hacks.github.io/photostories/?src=www.terremotocentroitalia.info/mapillary/photostory001.js"></iframe>
</div>
</div>
|
6afc8866035a32df77a570940ea3ed7dbd0e1790
|
test/functional/search_controller_test.rb
|
test/functional/search_controller_test.rb
|
require 'test_helper'
class SearchControllerTest < ActionController::TestCase
include Devise::TestHelpers
test "should get index" do
sign_in User.first
get :index, nil, {current_project_id: Project.first.id}
assert_response :success
assert_not_nil assigns(:iczn_groups)
sign_out User.first
end
end
|
require 'test_helper'
class SearchControllerTest < ActionController::TestCase
include Devise::TestHelpers
test "should get index" do
# Only signing in so that is_authenticated_user? doesn't fail
sign_in User.first
sign_out User.first
get :index, nil, {current_project_id: Project.first.id}
assert_response :success
assert_not_nil assigns(:iczn_groups)
end
test "should download all" do
i = IcznGroup.first
params = {download_all: '1',
select_all_traits: '1',
include_references: '1',
"#{i.name}[0]" => "#{i.id}",
format: :csv
}
post :results, params, {current_project_id: Project.first.id}
assert assigns :results
assert_response :success
assert_template 'search/results'
assert_equal @response.content_type, 'text/csv'
end
end
|
Test case for should download all
|
Test case for should download all
Also makes should get index sign out before doing anything
|
Ruby
|
mit
|
NESCent/TraitDB,NESCent/TraitDB,NESCent/TraitDB
|
ruby
|
## Code Before:
require 'test_helper'
class SearchControllerTest < ActionController::TestCase
include Devise::TestHelpers
test "should get index" do
sign_in User.first
get :index, nil, {current_project_id: Project.first.id}
assert_response :success
assert_not_nil assigns(:iczn_groups)
sign_out User.first
end
end
## Instruction:
Test case for should download all
Also makes should get index sign out before doing anything
## Code After:
require 'test_helper'
class SearchControllerTest < ActionController::TestCase
include Devise::TestHelpers
test "should get index" do
# Only signing in so that is_authenticated_user? doesn't fail
sign_in User.first
sign_out User.first
get :index, nil, {current_project_id: Project.first.id}
assert_response :success
assert_not_nil assigns(:iczn_groups)
end
test "should download all" do
i = IcznGroup.first
params = {download_all: '1',
select_all_traits: '1',
include_references: '1',
"#{i.name}[0]" => "#{i.id}",
format: :csv
}
post :results, params, {current_project_id: Project.first.id}
assert assigns :results
assert_response :success
assert_template 'search/results'
assert_equal @response.content_type, 'text/csv'
end
end
|
d50f5a8099313d8207c60733ea4a50ee06c15f8f
|
src/selectors/NewsSelectors.js
|
src/selectors/NewsSelectors.js
|
/* NewsSelector.js
* Use reselect.js library for our seearch functionlity which has two types of selectors: input and memoized
* Dependencies: ActionTypes
* Modules: NewsActions, and NewsFeed
* Author: Tiffany Tse
* Created: July 29, 2017
*/
//import dependencies
import {createSelector } from 'reselect';
//import modules
import { reshapeNewsData } from '../util/DataTransformations.js';
//pass state to newsSelector where wstate.news is passed to reshapeNewsData as input
const newsSelector = state => state.news;
/*Return the news portion of our Redux state tree. From there, we create two memoized
selectors–reshapeNewsSelector and allNewsSelector. Memoized selectors take two
arguments. The first is an array of inputs or memoized selectors.*/
const reshapeNewsSelector = createSelector(
[newsSelector],
reshapeNewsData
);
//allNewsSelector simply returns the entire transformed list without modification (newsItems => newsItems).
export const allNewsSelector = createSelector(
[reshapeNewsSelector],
newsItems => newsItems
);
|
/* NewsSelector.js
* Use reselect.js library for our seearch functionlity which has two types of selectors: input and memoized
* Dependencies: reselect
* Modules: reshapeNewsData
* Author: Tiffany Tse
* Created: August 12, 2017
*/
//import dependencies
import {createSelector } from 'reselect';
//import modules
import { reshapeNewsData } from '../util/DataTransformations.js';
//pass state to newsSelector where wstate.news is passed to reshapeNewsData as input
const newsSelector = state => state.news;
/*Return the news portion of our Redux state tree. From there, we create two memoized
selectors–reshapeNewsSelector and allNewsSelector. Memoized selectors take two
arguments. The first is an array of inputs or memoized selectors.*/
const reshapeNewsSelector = createSelector(
[newsSelector],
reshapeNewsData
);
//allNewsSelector simply returns the entire transformed list without modification (newsItems => newsItems).
export const allNewsSelector = createSelector(
[reshapeNewsSelector],
newsItems => newsItems
);
|
Update header comment with correct date creation, dependencies, and modules needed
|
Update header comment with correct date creation, dependencies, and modules needed
|
JavaScript
|
mit
|
titse/NYTimes-Clone,titse/NYTimes-Clone,titse/NYTimes-Clone
|
javascript
|
## Code Before:
/* NewsSelector.js
* Use reselect.js library for our seearch functionlity which has two types of selectors: input and memoized
* Dependencies: ActionTypes
* Modules: NewsActions, and NewsFeed
* Author: Tiffany Tse
* Created: July 29, 2017
*/
//import dependencies
import {createSelector } from 'reselect';
//import modules
import { reshapeNewsData } from '../util/DataTransformations.js';
//pass state to newsSelector where wstate.news is passed to reshapeNewsData as input
const newsSelector = state => state.news;
/*Return the news portion of our Redux state tree. From there, we create two memoized
selectors–reshapeNewsSelector and allNewsSelector. Memoized selectors take two
arguments. The first is an array of inputs or memoized selectors.*/
const reshapeNewsSelector = createSelector(
[newsSelector],
reshapeNewsData
);
//allNewsSelector simply returns the entire transformed list without modification (newsItems => newsItems).
export const allNewsSelector = createSelector(
[reshapeNewsSelector],
newsItems => newsItems
);
## Instruction:
Update header comment with correct date creation, dependencies, and modules needed
## Code After:
/* NewsSelector.js
* Use reselect.js library for our seearch functionlity which has two types of selectors: input and memoized
* Dependencies: reselect
* Modules: reshapeNewsData
* Author: Tiffany Tse
* Created: August 12, 2017
*/
//import dependencies
import {createSelector } from 'reselect';
//import modules
import { reshapeNewsData } from '../util/DataTransformations.js';
//pass state to newsSelector where wstate.news is passed to reshapeNewsData as input
const newsSelector = state => state.news;
/*Return the news portion of our Redux state tree. From there, we create two memoized
selectors–reshapeNewsSelector and allNewsSelector. Memoized selectors take two
arguments. The first is an array of inputs or memoized selectors.*/
const reshapeNewsSelector = createSelector(
[newsSelector],
reshapeNewsData
);
//allNewsSelector simply returns the entire transformed list without modification (newsItems => newsItems).
export const allNewsSelector = createSelector(
[reshapeNewsSelector],
newsItems => newsItems
);
|
531054c8983a09a579de8a7b1a97dfb3a1d60493
|
main.js
|
main.js
|
const electron = require('electron');
// Module to control application life.
const app = electron.app;
// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow;
const ipcMain = electron.ipcMain;
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let mainWindow;
function createWindow() {
// Create the browser window.
mainWindow = new BrowserWindow({
width: 870,
height: 475,
icon: __dirname + '/logo.png'
});
// and load the index.html of the app.
mainWindow.loadURL(`file://${__dirname}/index.html`);
// Uncomment to open dev tools (Inspect Element) automatically
// mainWindow.webContents.openDevTools();
// Emitted when the window is closed.
mainWindow.on('closed', function() {
// Dereference window object
mainWindow = null;
});
}
// Called when Electron has finished initialization.
app.on('ready', createWindow);
ipcMain.on('renderData', function(event, arg) {
var dataWindow = new BrowserWindow({
width: 1000,
height: 500
});
// Load options page
dataWindow.loadURL(`file://${__dirname}/data.html`);
dataWindow.on('closed', function() {
// Dereference window object
dataWindow = null;
});
});
|
const electron = require('electron');
// Module to control application life.
const app = electron.app;
// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow;
const ipcMain = electron.ipcMain;
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let mainWindow;
function createWindow() {
// Create the browser window.
mainWindow = new BrowserWindow({
width: 870,
height: 475,
icon: __dirname + '/logo.png'
});
// and load the index.html of the app.
mainWindow.loadURL(`file://${__dirname}/index.html`);
// Emitted when the window is closed.
mainWindow.on('closed', function() {
// Dereference window object
mainWindow = null;
});
}
// Called when Electron has finished initialization.
app.on('ready', createWindow);
ipcMain.on('renderData', function(event, arg) {
var dataWindow = new BrowserWindow({
width: 1000,
height: 500
});
// Load options page
dataWindow.loadURL(`file://${__dirname}/data.html`);
dataWindow.on('closed', function() {
// Dereference window object
dataWindow = null;
});
});
|
Remove commented developer tools code
|
Remove commented developer tools code
|
JavaScript
|
mit
|
FRCScout/FRCScout,FRCScout/FRCScout,frc1418/VictiScout,frc1418/VictiScout
|
javascript
|
## Code Before:
const electron = require('electron');
// Module to control application life.
const app = electron.app;
// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow;
const ipcMain = electron.ipcMain;
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let mainWindow;
function createWindow() {
// Create the browser window.
mainWindow = new BrowserWindow({
width: 870,
height: 475,
icon: __dirname + '/logo.png'
});
// and load the index.html of the app.
mainWindow.loadURL(`file://${__dirname}/index.html`);
// Uncomment to open dev tools (Inspect Element) automatically
// mainWindow.webContents.openDevTools();
// Emitted when the window is closed.
mainWindow.on('closed', function() {
// Dereference window object
mainWindow = null;
});
}
// Called when Electron has finished initialization.
app.on('ready', createWindow);
ipcMain.on('renderData', function(event, arg) {
var dataWindow = new BrowserWindow({
width: 1000,
height: 500
});
// Load options page
dataWindow.loadURL(`file://${__dirname}/data.html`);
dataWindow.on('closed', function() {
// Dereference window object
dataWindow = null;
});
});
## Instruction:
Remove commented developer tools code
## Code After:
const electron = require('electron');
// Module to control application life.
const app = electron.app;
// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow;
const ipcMain = electron.ipcMain;
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let mainWindow;
function createWindow() {
// Create the browser window.
mainWindow = new BrowserWindow({
width: 870,
height: 475,
icon: __dirname + '/logo.png'
});
// and load the index.html of the app.
mainWindow.loadURL(`file://${__dirname}/index.html`);
// Emitted when the window is closed.
mainWindow.on('closed', function() {
// Dereference window object
mainWindow = null;
});
}
// Called when Electron has finished initialization.
app.on('ready', createWindow);
ipcMain.on('renderData', function(event, arg) {
var dataWindow = new BrowserWindow({
width: 1000,
height: 500
});
// Load options page
dataWindow.loadURL(`file://${__dirname}/data.html`);
dataWindow.on('closed', function() {
// Dereference window object
dataWindow = null;
});
});
|
61d0917f5be733d124ddd137e4fdb79af5190cd1
|
SurgSim/Physics/PerformanceTests/CMakeLists.txt
|
SurgSim/Physics/PerformanceTests/CMakeLists.txt
|
include_directories(
${gtest_SOURCE_DIR}/include
${OSG_INCLUDE_DIR}
${OPENTHREADS_INCLUDE_DIR}
)
set(UNIT_TEST_SOURCES
Fem3DPerformanceTest.cpp
)
set(UNIT_TEST_HEADERS
)
set(LIBS
SurgSimPhysics
)
file(COPY Data DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
# Configure the path for the data files
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/config.txt.in"
"${CMAKE_CURRENT_BINARY_DIR}/config.txt"
)
surgsim_add_unit_tests(SurgSimPhysicsPerformanceTest)
set_target_properties(SurgSimPhysicsPerformanceTest PROPERTIES FOLDER "Physics")
|
include_directories(
${gtest_SOURCE_DIR}/include
${OSG_INCLUDE_DIR}
${OPENTHREADS_INCLUDE_DIR}
)
set(UNIT_TEST_SOURCES
Fem3DPerformanceTest.cpp
)
set(UNIT_TEST_HEADERS
)
set(LIBS
SurgSimInput
SurgSimPhysics
)
file(COPY Data DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
# Configure the path for the data files
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/config.txt.in"
"${CMAKE_CURRENT_BINARY_DIR}/config.txt"
)
surgsim_add_unit_tests(SurgSimPhysicsPerformanceTest)
set_target_properties(SurgSimPhysicsPerformanceTest PROPERTIES FOLDER "Physics")
|
Add missing library to Physics Performance Tests
|
Add missing library to Physics Performance Tests
When building shared libraries, this missing library dependancy came up.
|
Text
|
apache-2.0
|
simquest/opensurgsim,simquest/opensurgsim,simquest/opensurgsim,simquest/opensurgsim
|
text
|
## Code Before:
include_directories(
${gtest_SOURCE_DIR}/include
${OSG_INCLUDE_DIR}
${OPENTHREADS_INCLUDE_DIR}
)
set(UNIT_TEST_SOURCES
Fem3DPerformanceTest.cpp
)
set(UNIT_TEST_HEADERS
)
set(LIBS
SurgSimPhysics
)
file(COPY Data DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
# Configure the path for the data files
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/config.txt.in"
"${CMAKE_CURRENT_BINARY_DIR}/config.txt"
)
surgsim_add_unit_tests(SurgSimPhysicsPerformanceTest)
set_target_properties(SurgSimPhysicsPerformanceTest PROPERTIES FOLDER "Physics")
## Instruction:
Add missing library to Physics Performance Tests
When building shared libraries, this missing library dependancy came up.
## Code After:
include_directories(
${gtest_SOURCE_DIR}/include
${OSG_INCLUDE_DIR}
${OPENTHREADS_INCLUDE_DIR}
)
set(UNIT_TEST_SOURCES
Fem3DPerformanceTest.cpp
)
set(UNIT_TEST_HEADERS
)
set(LIBS
SurgSimInput
SurgSimPhysics
)
file(COPY Data DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
# Configure the path for the data files
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/config.txt.in"
"${CMAKE_CURRENT_BINARY_DIR}/config.txt"
)
surgsim_add_unit_tests(SurgSimPhysicsPerformanceTest)
set_target_properties(SurgSimPhysicsPerformanceTest PROPERTIES FOLDER "Physics")
|
d20d267dd08457df0becc777fef0a22064e1af8b
|
src/views/index.hbs
|
src/views/index.hbs
|
<div class="container text-center">
<div class="col-md-6 col-md-offset-3">
<form action="/terms/">
<div class="form-group">
<div class="input-group">
<input class="form-control" name="search-term" placeholder="Enter a search term (ex. `CMS` or `NPN`)" autofocus />
<a href="/terms/new" class="btn btn-success input-group-addon">Add term</a>
</div>
</div>
<div class="form-group">
<button class="btn btn-primary">Search</button>
</div>
</form>
</div>
</div>
|
<div class="container text-center">
<div class="col-md-6 col-md-offset-3">
<form action="/terms/">
<div class="form-group">
<div class="input-group">
<input class="form-control" name="search-term" placeholder="What are you looking for?" autofocus />
<a href="/terms/new" class="btn btn-success input-group-addon">
<i class="glyphicon glyphicon-plus"></i>
New term
</a>
</div>
</div>
<div class="form-group">
<button class="btn btn-primary">Search</button>
</div>
</form>
</div>
</div>
|
Update home page search-box. New behavior includes iconography with new term button. Also update placeholder text of search box.
|
Update home page search-box.
New behavior includes iconography with new term button.
Also update placeholder text of search box.
|
Handlebars
|
mit
|
ritterim/definely
|
handlebars
|
## Code Before:
<div class="container text-center">
<div class="col-md-6 col-md-offset-3">
<form action="/terms/">
<div class="form-group">
<div class="input-group">
<input class="form-control" name="search-term" placeholder="Enter a search term (ex. `CMS` or `NPN`)" autofocus />
<a href="/terms/new" class="btn btn-success input-group-addon">Add term</a>
</div>
</div>
<div class="form-group">
<button class="btn btn-primary">Search</button>
</div>
</form>
</div>
</div>
## Instruction:
Update home page search-box.
New behavior includes iconography with new term button.
Also update placeholder text of search box.
## Code After:
<div class="container text-center">
<div class="col-md-6 col-md-offset-3">
<form action="/terms/">
<div class="form-group">
<div class="input-group">
<input class="form-control" name="search-term" placeholder="What are you looking for?" autofocus />
<a href="/terms/new" class="btn btn-success input-group-addon">
<i class="glyphicon glyphicon-plus"></i>
New term
</a>
</div>
</div>
<div class="form-group">
<button class="btn btn-primary">Search</button>
</div>
</form>
</div>
</div>
|
94b45d1dd6973086b9c451bee87e531560c32a05
|
README.md
|
README.md
|
[](https://travis-ci.org/mhelgeson/b9)
[](https://coveralls.io/github/mhelgeson/b9?branch=master)
- - -
An event-based, modular slack bot framework.
## Features
- uses slack's real time messaging api
- modular plugins auto-installed from dependencies
- web api and rtm api emitted as events
## Installation
Install the `b9` class module as a dependency in your project.
```js
npm install b9 --save
```
## Quick Start
Require the `b9` module and invoke it with the api token.
```js
require("b9")("SLACK_API_TOKEN");
```
## Modules
- [main](./src)
- [command](./src/command)
- [connect](./src/connect)
- [events](./src/events)
- [install](./src/install)
- [post](./src/post)
---
`Class M3 General Utility Non-Theorizing Environmental Control Robot`
|
[](https://travis-ci.org/mhelgeson/b9)
[](https://coveralls.io/github/mhelgeson/b9?branch=master)
[](https://www.npmjs.com/package/b9)
- - -
An event-based, modular slack bot framework.
## Features
- uses slack's real time messaging api
- modular plugins auto-installed from dependencies
- web api and rtm api emitted as events
## Installation
Install the `b9` class module as a dependency in your project.
```js
npm install b9 --save
```
## Quick Start
Require the `b9` module and invoke it with the api token.
```js
require("b9")("SLACK_API_TOKEN");
```
## Modules
- [main](./src)
- [command](./src/command)
- [connect](./src/connect)
- [events](./src/events)
- [install](./src/install)
- [post](./src/post)
---
`Class M3 General Utility Non-Theorizing Environmental Control Robot`
|
Add npm badge to readme
|
Add npm badge to readme
|
Markdown
|
mit
|
mhelgeson/b9
|
markdown
|
## Code Before:
[](https://travis-ci.org/mhelgeson/b9)
[](https://coveralls.io/github/mhelgeson/b9?branch=master)
- - -
An event-based, modular slack bot framework.
## Features
- uses slack's real time messaging api
- modular plugins auto-installed from dependencies
- web api and rtm api emitted as events
## Installation
Install the `b9` class module as a dependency in your project.
```js
npm install b9 --save
```
## Quick Start
Require the `b9` module and invoke it with the api token.
```js
require("b9")("SLACK_API_TOKEN");
```
## Modules
- [main](./src)
- [command](./src/command)
- [connect](./src/connect)
- [events](./src/events)
- [install](./src/install)
- [post](./src/post)
---
`Class M3 General Utility Non-Theorizing Environmental Control Robot`
## Instruction:
Add npm badge to readme
## Code After:
[](https://travis-ci.org/mhelgeson/b9)
[](https://coveralls.io/github/mhelgeson/b9?branch=master)
[](https://www.npmjs.com/package/b9)
- - -
An event-based, modular slack bot framework.
## Features
- uses slack's real time messaging api
- modular plugins auto-installed from dependencies
- web api and rtm api emitted as events
## Installation
Install the `b9` class module as a dependency in your project.
```js
npm install b9 --save
```
## Quick Start
Require the `b9` module and invoke it with the api token.
```js
require("b9")("SLACK_API_TOKEN");
```
## Modules
- [main](./src)
- [command](./src/command)
- [connect](./src/connect)
- [events](./src/events)
- [install](./src/install)
- [post](./src/post)
---
`Class M3 General Utility Non-Theorizing Environmental Control Robot`
|
6a000c00ac12cb14e40845eeb73431d978708a95
|
.travis.yml
|
.travis.yml
|
language: java
jdk:
- oraclejdk8
before_install:
- chmod +x gradlew
install: ./gradlew checkSnapshotDependencies compileJava
script: ./gradlew eclipse check jacocoTestReport javadoc
after_failure:
- cat build/test-results/*.xml
|
language: java
jdk:
- oraclejdk8
before_install:
- chmod +x gradlew
install: ./gradlew checkSnapshotDependencies compileJava
script: ./gradlew eclipse build jacocoTestReport javadoc checkSnapshotDependencies
after_failure:
- cat build/test-results/*.xml
|
Add more targets to the Travis build
|
Add more targets to the Travis build
|
YAML
|
bsd-2-clause
|
centic9/commons-dost
|
yaml
|
## Code Before:
language: java
jdk:
- oraclejdk8
before_install:
- chmod +x gradlew
install: ./gradlew checkSnapshotDependencies compileJava
script: ./gradlew eclipse check jacocoTestReport javadoc
after_failure:
- cat build/test-results/*.xml
## Instruction:
Add more targets to the Travis build
## Code After:
language: java
jdk:
- oraclejdk8
before_install:
- chmod +x gradlew
install: ./gradlew checkSnapshotDependencies compileJava
script: ./gradlew eclipse build jacocoTestReport javadoc checkSnapshotDependencies
after_failure:
- cat build/test-results/*.xml
|
53b6d8d9594d5c0154fccd3051a98d3106c0f9ed
|
schema/text/BlockContent.schema.yaml
|
schema/text/BlockContent.schema.yaml
|
title: BlockContent
description: Block content.
anyOf:
- $ref: CodeBlock.schema.yaml
- $ref: CodeChunk.schema.yaml
- $ref: Heading.schema.yaml
- $ref: List.schema.yaml
- $ref: Paragraph.schema.yaml
- $ref: QuoteBlock.schema.yaml
- $ref: Table.schema.yaml
- $ref: ThematicBreak.schema.yaml
|
title: BlockContent
description: Block content.
anyOf:
- $ref: CodeBlock.schema.yaml
- $ref: CodeChunk.schema.yaml
- $ref: Heading.schema.yaml
- $ref: List.schema.yaml
- $ref: ListItem.schema.yaml
- $ref: Paragraph.schema.yaml
- $ref: QuoteBlock.schema.yaml
- $ref: Table.schema.yaml
- $ref: ThematicBreak.schema.yaml
|
Add ListItem to BlockContent type
|
fix(BlockContent): Add ListItem to BlockContent type
|
YAML
|
apache-2.0
|
stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila
|
yaml
|
## Code Before:
title: BlockContent
description: Block content.
anyOf:
- $ref: CodeBlock.schema.yaml
- $ref: CodeChunk.schema.yaml
- $ref: Heading.schema.yaml
- $ref: List.schema.yaml
- $ref: Paragraph.schema.yaml
- $ref: QuoteBlock.schema.yaml
- $ref: Table.schema.yaml
- $ref: ThematicBreak.schema.yaml
## Instruction:
fix(BlockContent): Add ListItem to BlockContent type
## Code After:
title: BlockContent
description: Block content.
anyOf:
- $ref: CodeBlock.schema.yaml
- $ref: CodeChunk.schema.yaml
- $ref: Heading.schema.yaml
- $ref: List.schema.yaml
- $ref: ListItem.schema.yaml
- $ref: Paragraph.schema.yaml
- $ref: QuoteBlock.schema.yaml
- $ref: Table.schema.yaml
- $ref: ThematicBreak.schema.yaml
|
be57028fc9eaf9f0217d5c11e59dd1632ca84f55
|
Code/Backends/Extrinsic-HIR-compiler/define-global-environment.lisp
|
Code/Backends/Extrinsic-HIR-compiler/define-global-environment.lisp
|
(cl:in-package #:sicl-extrinsic-hir-compiler)
(defclass environment (sicl-simple-environment:simple-environment)
())
|
(cl:in-package #:sicl-extrinsic-hir-compiler)
(defclass environment (sicl-extrinsic-environment:environment)
())
|
Make the extrinsic environment a superclass.
|
Make the extrinsic environment a superclass.
|
Common Lisp
|
bsd-2-clause
|
clasp-developers/SICL,clasp-developers/SICL,vtomole/SICL,vtomole/SICL,vtomole/SICL,clasp-developers/SICL,vtomole/SICL,clasp-developers/SICL
|
common-lisp
|
## Code Before:
(cl:in-package #:sicl-extrinsic-hir-compiler)
(defclass environment (sicl-simple-environment:simple-environment)
())
## Instruction:
Make the extrinsic environment a superclass.
## Code After:
(cl:in-package #:sicl-extrinsic-hir-compiler)
(defclass environment (sicl-extrinsic-environment:environment)
())
|
7e2481ac5ec169e628d517e2916775bf2a1ff73d
|
.travis.yml
|
.travis.yml
|
language: android
android:
components:
# https://github.com/travis-ci/travis-ci/issues/5036
- tools
- platform-tools
- build-tools-23.0.3
- android-23
- extra-android-m2repository
- extra-google-m2repository
# Necessary because otherwise Gradle will OOM during the compilation phase:
# https://travis-ci.org/firebase/firebase-jobdispatcher-android/builds/164194294
# But also can't be >= 3gb, otherwise Travis will kill our process:
# https://docs.travis-ci.com/user/common-build-problems/#My-build-script-is-killed-without-any-error
env:
- GRADLE_OPTS="-XX:MaxPermSize=1024m"
script:
- ./gradlew jobdispatcher:build testapp:assemble
# "avoid uploading the cache after every build"
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
|
language: android
jdk: oraclejdk8
# Container builds don't have enough memory to reliably finish without being
# killed, so pretend sudo is required so we don't use the container infra.
# See: https://github.com/travis-ci/travis-ci/issues/5582
sudo: required
android:
components:
# https://github.com/travis-ci/travis-ci/issues/5036
- tools
- platform-tools
- build-tools-23.0.3
- android-23
- extra-android-m2repository
- extra-google-m2repository
# "avoid uploading the cache after every build"
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -rf $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
script: ./gradlew jobdispatcher:build testapp:assemble
|
Mark sudo as required to fix Travis
|
Mark sudo as required to fix Travis
Thanks @SUPERCILEX for the help (#39)!
|
YAML
|
apache-2.0
|
googlearchive/firebase-jobdispatcher-android
|
yaml
|
## Code Before:
language: android
android:
components:
# https://github.com/travis-ci/travis-ci/issues/5036
- tools
- platform-tools
- build-tools-23.0.3
- android-23
- extra-android-m2repository
- extra-google-m2repository
# Necessary because otherwise Gradle will OOM during the compilation phase:
# https://travis-ci.org/firebase/firebase-jobdispatcher-android/builds/164194294
# But also can't be >= 3gb, otherwise Travis will kill our process:
# https://docs.travis-ci.com/user/common-build-problems/#My-build-script-is-killed-without-any-error
env:
- GRADLE_OPTS="-XX:MaxPermSize=1024m"
script:
- ./gradlew jobdispatcher:build testapp:assemble
# "avoid uploading the cache after every build"
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
## Instruction:
Mark sudo as required to fix Travis
Thanks @SUPERCILEX for the help (#39)!
## Code After:
language: android
jdk: oraclejdk8
# Container builds don't have enough memory to reliably finish without being
# killed, so pretend sudo is required so we don't use the container infra.
# See: https://github.com/travis-ci/travis-ci/issues/5582
sudo: required
android:
components:
# https://github.com/travis-ci/travis-ci/issues/5036
- tools
- platform-tools
- build-tools-23.0.3
- android-23
- extra-android-m2repository
- extra-google-m2repository
# "avoid uploading the cache after every build"
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -rf $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
script: ./gradlew jobdispatcher:build testapp:assemble
|
96a6b929d80bd5ad8a7bf5d09955b3e45e5bbe56
|
test/test_Spectrum.py
|
test/test_Spectrum.py
|
from __future__ import division, print_function
import pytest
import sys
# Add Spectrum location to path
sys.path.append('../')
import Spectrum
# Test using hypothesis
from hypothesis import given
import hypothesis.strategies as st
@given(st.lists(st.floats()), st.lists(st.floats()), st.booleans())
def test_spectrum_assigns_hypothesis_data(y, x, z):
spec = Spectrum.Spectrum(y, x, z)
assert spec.flux == y
assert spec.xaxis == x
assert spec.calibrated == z
def test_spectrum_assigns_data():
x = [1,2,3,4,5,6]
y = [1,1,0.9,0.95,1,1]
calib_val = 0
spec = Spectrum.Spectrum(y, x, calibrated=calib_val)
assert spec.flux == y
assert spec.xaxis == x
assert spec.calibrated == calib_val
|
from __future__ import division, print_function
import pytest
import sys
# Add Spectrum location to path
sys.path.append('../')
import Spectrum
# Test using hypothesis
from hypothesis import given
import hypothesis.strategies as st
@given(st.lists(st.floats()), st.lists(st.floats()), st.booleans())
def test_spectrum_assigns_hypothesis_data(y, x, z):
spec = Spectrum.Spectrum(y, x, z)
assert spec.flux == y
assert spec.xaxis == x
assert spec.calibrated == z
def test_spectrum_assigns_data():
x = [1,2,3,4,5,6]
y = [1,1,0.9,0.95,1,1]
calib_val = 0
spec = Spectrum.Spectrum(y, x, calibrated=calib_val)
assert spec.flux == y
assert spec.xaxis == x
assert spec.calibrated == calib_val
@given(st.lists(st.floats()), st.lists(st.floats()), st.booleans(), st.floats(), st.floats())
def test_wav_select(y, x, calib, wav_min, wav_max):
# Create specturm
spec = Spectrum.Spectrum(y, xaxis=x, calibrated=calib)
# Select wavelength values
spec.wav_select(wav_min, wav_max)
# All values in selected spectrum should be less than the max and greater than the min value.
if isinstance(spec.xaxis, list):
assert all([xval >= wav_min for xval in spec.xaxis])
assert all([xval <= wav_max for xval in spec.xaxis])
else:
assert all(spec.xaxis >= wav_min)
assert all(spec.xaxis <= wav_max)
##Also need to test asignment!
# spec2 = spec.wav_selector()
|
Test property of wavelength selection
|
Test property of wavelength selection
That afterwards the values are all above and below the min and max
values used.
|
Python
|
mit
|
jason-neal/spectrum_overload,jason-neal/spectrum_overload,jason-neal/spectrum_overload
|
python
|
## Code Before:
from __future__ import division, print_function
import pytest
import sys
# Add Spectrum location to path
sys.path.append('../')
import Spectrum
# Test using hypothesis
from hypothesis import given
import hypothesis.strategies as st
@given(st.lists(st.floats()), st.lists(st.floats()), st.booleans())
def test_spectrum_assigns_hypothesis_data(y, x, z):
spec = Spectrum.Spectrum(y, x, z)
assert spec.flux == y
assert spec.xaxis == x
assert spec.calibrated == z
def test_spectrum_assigns_data():
x = [1,2,3,4,5,6]
y = [1,1,0.9,0.95,1,1]
calib_val = 0
spec = Spectrum.Spectrum(y, x, calibrated=calib_val)
assert spec.flux == y
assert spec.xaxis == x
assert spec.calibrated == calib_val
## Instruction:
Test property of wavelength selection
That afterwards the values are all above and below the min and max
values used.
## Code After:
from __future__ import division, print_function
import pytest
import sys
# Add Spectrum location to path
sys.path.append('../')
import Spectrum
# Test using hypothesis
from hypothesis import given
import hypothesis.strategies as st
@given(st.lists(st.floats()), st.lists(st.floats()), st.booleans())
def test_spectrum_assigns_hypothesis_data(y, x, z):
spec = Spectrum.Spectrum(y, x, z)
assert spec.flux == y
assert spec.xaxis == x
assert spec.calibrated == z
def test_spectrum_assigns_data():
x = [1,2,3,4,5,6]
y = [1,1,0.9,0.95,1,1]
calib_val = 0
spec = Spectrum.Spectrum(y, x, calibrated=calib_val)
assert spec.flux == y
assert spec.xaxis == x
assert spec.calibrated == calib_val
@given(st.lists(st.floats()), st.lists(st.floats()), st.booleans(), st.floats(), st.floats())
def test_wav_select(y, x, calib, wav_min, wav_max):
# Create specturm
spec = Spectrum.Spectrum(y, xaxis=x, calibrated=calib)
# Select wavelength values
spec.wav_select(wav_min, wav_max)
# All values in selected spectrum should be less than the max and greater than the min value.
if isinstance(spec.xaxis, list):
assert all([xval >= wav_min for xval in spec.xaxis])
assert all([xval <= wav_max for xval in spec.xaxis])
else:
assert all(spec.xaxis >= wav_min)
assert all(spec.xaxis <= wav_max)
##Also need to test asignment!
# spec2 = spec.wav_selector()
|
5075a2b05cfd527a4cc234f738c9018ee96b211b
|
app/models/extensions/gremlin_indexable.rb
|
app/models/extensions/gremlin_indexable.rb
|
require 'active_support/concern'
require 'notify_gremlin_indexer'
# When included schedule for indexing by Gremlin.
module GremlinIndexable
extend ActiveSupport::Concern
included do
after_commit :notify_indexer_update, on: %i[create update]
def notify_indexer_update
if deleted_at_changed? && deleted_at.present?
NotifyGremlinIndexer.delete_one(id)
else
NotifyGremlinIndexer.index_one(id)
end
end
end
end
|
require 'active_support/concern'
require 'notify_gremlin_indexer'
# When included schedule for indexing by Gremlin.
module GremlinIndexable
extend ActiveSupport::Concern
included do
after_commit :notify_indexer_update, on: %i[create update]
def notify_indexer_update
if deleted_at? && previous_changes.key?('deleted_at')
NotifyGremlinIndexer.delete_one(id)
else
NotifyGremlinIndexer.index_one(id)
end
end
end
end
|
Fix envelope deletion detection in indexer notification callback
|
Fix envelope deletion detection in indexer notification callback
|
Ruby
|
apache-2.0
|
CredentialEngine/CredentialRegistry,CredentialEngine/CredentialRegistry,CredentialEngine/CredentialRegistry
|
ruby
|
## Code Before:
require 'active_support/concern'
require 'notify_gremlin_indexer'
# When included schedule for indexing by Gremlin.
module GremlinIndexable
extend ActiveSupport::Concern
included do
after_commit :notify_indexer_update, on: %i[create update]
def notify_indexer_update
if deleted_at_changed? && deleted_at.present?
NotifyGremlinIndexer.delete_one(id)
else
NotifyGremlinIndexer.index_one(id)
end
end
end
end
## Instruction:
Fix envelope deletion detection in indexer notification callback
## Code After:
require 'active_support/concern'
require 'notify_gremlin_indexer'
# When included schedule for indexing by Gremlin.
module GremlinIndexable
extend ActiveSupport::Concern
included do
after_commit :notify_indexer_update, on: %i[create update]
def notify_indexer_update
if deleted_at? && previous_changes.key?('deleted_at')
NotifyGremlinIndexer.delete_one(id)
else
NotifyGremlinIndexer.index_one(id)
end
end
end
end
|
09c4d68e0872a789a203bc48cfe4c3605e9b17e1
|
public/res/less/custom-other.less
|
public/res/less/custom-other.less
|
@import "../bootstrap/less/variables.less";
@import "custom-variables.less";
.page-header {
margin: 0px;
padding-top: 10px;
border-bottom: none;
background: linear-gradient(to bottom, @brand-primary, @brand-primary 90%, @gray-darker);
}
.navbar {
border: none;
margin-bottom: 0px;
}
.navbar:after {
height: 15px;
width: 100%;
background: linear-gradient(to top, @body-bg, @gray-darker 80%, @gray-dark);
}
.navbar li a:active {
text-decoration: underline;
}
form textarea {
resize: vertical;
}
.bg-primary, .bg-success, .bg-info, .bg-warning, .bg-danger {
padding: 10px;
}
.btn-centered {
position: relative;
top: 7px;
}
.thin-sides-margin {
margin-left: 0px;
margin-right: 0px;
}
.thin-sides-padding {
padding-left: 0px;
padding-right: 0px;
}
.forceheight {
overflow: hidden;
}
#post-navlinks {
margin-bottom: 5px;
}
|
@import "../bootstrap/less/variables.less";
@import "custom-variables.less";
@import url(http://fonts.googleapis.com/css?family=Ubuntu);
@font-family-sans-serif: "Ubuntu", "Helvetica Neue", Helvetica, Arial, sans-serif;
.page-header {
margin: 0px;
padding-top: 10px;
border-bottom: none;
background: linear-gradient(to bottom, @brand-primary, @brand-primary 90%, @gray-darker);
}
.page-header h2 {
font-size: ceil((@font-size-h1 * 1.1));
}
.navbar {
border: none;
margin-bottom: 0px;
}
.navbar:after {
height: 15px;
width: 100%;
background: linear-gradient(to top, @body-bg, @gray-darker 80%, @gray-dark);
}
.navbar li a:active {
text-decoration: underline;
}
form textarea {
resize: vertical;
}
.bg-primary, .bg-success, .bg-info, .bg-warning, .bg-danger {
padding: 10px;
}
.btn-centered {
position: relative;
top: 7px;
}
.thin-sides-margin {
margin-left: 0px;
margin-right: 0px;
}
.thin-sides-padding {
padding-left: 0px;
padding-right: 0px;
}
.forceheight {
overflow: hidden;
}
#post-navlinks {
margin-bottom: 5px;
}
|
Use Ubunutu as default font
|
Use Ubunutu as default font
|
Less
|
mit
|
ashfordl/blog,ashfordl/blog
|
less
|
## Code Before:
@import "../bootstrap/less/variables.less";
@import "custom-variables.less";
.page-header {
margin: 0px;
padding-top: 10px;
border-bottom: none;
background: linear-gradient(to bottom, @brand-primary, @brand-primary 90%, @gray-darker);
}
.navbar {
border: none;
margin-bottom: 0px;
}
.navbar:after {
height: 15px;
width: 100%;
background: linear-gradient(to top, @body-bg, @gray-darker 80%, @gray-dark);
}
.navbar li a:active {
text-decoration: underline;
}
form textarea {
resize: vertical;
}
.bg-primary, .bg-success, .bg-info, .bg-warning, .bg-danger {
padding: 10px;
}
.btn-centered {
position: relative;
top: 7px;
}
.thin-sides-margin {
margin-left: 0px;
margin-right: 0px;
}
.thin-sides-padding {
padding-left: 0px;
padding-right: 0px;
}
.forceheight {
overflow: hidden;
}
#post-navlinks {
margin-bottom: 5px;
}
## Instruction:
Use Ubunutu as default font
## Code After:
@import "../bootstrap/less/variables.less";
@import "custom-variables.less";
@import url(http://fonts.googleapis.com/css?family=Ubuntu);
@font-family-sans-serif: "Ubuntu", "Helvetica Neue", Helvetica, Arial, sans-serif;
.page-header {
margin: 0px;
padding-top: 10px;
border-bottom: none;
background: linear-gradient(to bottom, @brand-primary, @brand-primary 90%, @gray-darker);
}
.page-header h2 {
font-size: ceil((@font-size-h1 * 1.1));
}
.navbar {
border: none;
margin-bottom: 0px;
}
.navbar:after {
height: 15px;
width: 100%;
background: linear-gradient(to top, @body-bg, @gray-darker 80%, @gray-dark);
}
.navbar li a:active {
text-decoration: underline;
}
form textarea {
resize: vertical;
}
.bg-primary, .bg-success, .bg-info, .bg-warning, .bg-danger {
padding: 10px;
}
.btn-centered {
position: relative;
top: 7px;
}
.thin-sides-margin {
margin-left: 0px;
margin-right: 0px;
}
.thin-sides-padding {
padding-left: 0px;
padding-right: 0px;
}
.forceheight {
overflow: hidden;
}
#post-navlinks {
margin-bottom: 5px;
}
|
855549ff6ada4ecf1e30814dc04a14ff61f3536f
|
README.md
|
README.md
|
Multiprocessing with Mozzi
|
Multiprocessing with Mozzi
Malaria connects two Arduino Unos (running Mozzi) together with a PCM bus,
distributing DSP work between them. A third Arduino (not shown) receives
MIDI messages and controls parameters on the first two over a private MIDI bus.
Typically the first processor generates waveforms while the second executes filters
and other effects.
The PCM bus uses the following pins, to transmit 9 bit integers (8 + sign) from
processor 1 to 2:
pins 2-7: least significant bits
pin 8: clock
pin 10: sign
pins 11-12: most significant bits
If hard synchronization is not required, the clock pin could be used for other
purposes (Eg Mozzi HiFi mode).
Audio output
+
|
|
|
+------------------------------+
| 1 1 1 | |
| 2 1 0 | 8 7 6 5 4 3 2 0 |
| + + + + + + + + + + + +---------------+
| | | | 9 | | | | | | | | |
Arduino Mozzi | | | | | | | | | | | | |
processor #2 | | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | +-------+ MIDI TX from
| | | | | | | | | | | | | Arduino controller
| | | | | | | | | | | | |
+------------------------------+ |
| | | | | | | | | | |
+------------------------------+ |
| + + + + + + + + + + +---------------+
| 1 1 1 8 7 6 5 4 3 2 0 |
| 2 1 0 |
| |
Arduino Mozzi | |
processor #1 | |
| |
| |
| |
| |
+------------------------------+
|
Add summary and ASCII art diagram.
|
Add summary and ASCII art diagram.
|
Markdown
|
mit
|
anarkiwi/Malaria
|
markdown
|
## Code Before:
Multiprocessing with Mozzi
## Instruction:
Add summary and ASCII art diagram.
## Code After:
Multiprocessing with Mozzi
Malaria connects two Arduino Unos (running Mozzi) together with a PCM bus,
distributing DSP work between them. A third Arduino (not shown) receives
MIDI messages and controls parameters on the first two over a private MIDI bus.
Typically the first processor generates waveforms while the second executes filters
and other effects.
The PCM bus uses the following pins, to transmit 9 bit integers (8 + sign) from
processor 1 to 2:
pins 2-7: least significant bits
pin 8: clock
pin 10: sign
pins 11-12: most significant bits
If hard synchronization is not required, the clock pin could be used for other
purposes (Eg Mozzi HiFi mode).
Audio output
+
|
|
|
+------------------------------+
| 1 1 1 | |
| 2 1 0 | 8 7 6 5 4 3 2 0 |
| + + + + + + + + + + + +---------------+
| | | | 9 | | | | | | | | |
Arduino Mozzi | | | | | | | | | | | | |
processor #2 | | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | +-------+ MIDI TX from
| | | | | | | | | | | | | Arduino controller
| | | | | | | | | | | | |
+------------------------------+ |
| | | | | | | | | | |
+------------------------------+ |
| + + + + + + + + + + +---------------+
| 1 1 1 8 7 6 5 4 3 2 0 |
| 2 1 0 |
| |
Arduino Mozzi | |
processor #1 | |
| |
| |
| |
| |
+------------------------------+
|
fde6f04a09276fd0c908e8f20157752355013678
|
README.md
|
README.md
|
This repository is based on [Joyent mibe](https://github.com/joyent/mibe). Please note this repository should be build with the [mi-core-base](https://github.com/skylime/mi-core-base) mibe image.
|
This repository is based on [Joyent mibe](https://github.com/joyent/mibe). Please note this repository should be build with the [mi-core-base](https://github.com/skylime/mi-core-base) mibe image.
## description
This mibe image contains some bots for notification.
- trollo: A Trello bot
- paranoiapoodle: A simple IRC bot which we use for munin notification
- lassie: A remote check and notification service / watchdog
All bots are not configured to start automatically because they need a modified
configuration file which we will not provide via `mdata`.
## configuration
All configuration could be found in `/opt/notify`. There are already example
configs copied from the service. Please do your required changed and use the
`svcadm` command to enable them.
```
svcadm enable trollo
svcadm enable paranoiapoodle
svcadm enable lassie
```
|
Modify readme which includes more desc.
|
Modify readme which includes more desc.
|
Markdown
|
mit
|
skylime/mi-core-notify
|
markdown
|
## Code Before:
This repository is based on [Joyent mibe](https://github.com/joyent/mibe). Please note this repository should be build with the [mi-core-base](https://github.com/skylime/mi-core-base) mibe image.
## Instruction:
Modify readme which includes more desc.
## Code After:
This repository is based on [Joyent mibe](https://github.com/joyent/mibe). Please note this repository should be build with the [mi-core-base](https://github.com/skylime/mi-core-base) mibe image.
## description
This mibe image contains some bots for notification.
- trollo: A Trello bot
- paranoiapoodle: A simple IRC bot which we use for munin notification
- lassie: A remote check and notification service / watchdog
All bots are not configured to start automatically because they need a modified
configuration file which we will not provide via `mdata`.
## configuration
All configuration could be found in `/opt/notify`. There are already example
configs copied from the service. Please do your required changed and use the
`svcadm` command to enable them.
```
svcadm enable trollo
svcadm enable paranoiapoodle
svcadm enable lassie
```
|
847fdb40c0d93fc3fec0f13a4ac45041018a6382
|
go/src/koding/db/models/group.go
|
go/src/koding/db/models/group.go
|
package models
import (
"labix.org/v2/mgo/bson"
)
type Group struct {
Id bson.ObjectId `bson:"_id" json:"-"`
Body string `bson:"body" json:"body"`
Title string `bson:"title" json:"title"`
Slug string `bson:"slug" json:"slug"`
Privacy string `bson:"privacy" json:"privacy"`
Visibility string `bson:"visibility" json:"visibility"`
SocialApiChannelId string `bson:"socialApiChannelId" json:"socialApiChannelId"`
Parent []map[string]interface{} `bson:"parent" json:"parent"`
Customize map[string]interface{} `bson:"customize" json:"customize"`
Counts map[string]interface{} `bson:"counts" json:"counts"`
Migration string `bson:"migration,omitempty"`
}
|
package models
import (
"labix.org/v2/mgo/bson"
)
type Group struct {
Id bson.ObjectId `bson:"_id" json:"-"`
Body string `bson:"body" json:"body"`
Title string `bson:"title" json:"title"`
Slug string `bson:"slug" json:"slug"`
Privacy string `bson:"privacy" json:"privacy"`
Visibility string `bson:"visibility" json:"visibility"`
SocialApiChannelId string `bson:"socialApiChannelId" json:"socialApiChannelId"`
Parent []map[string]interface{} `bson:"parent" json:"parent"`
Customize map[string]interface{} `bson:"customize" json:"customize"`
Counts map[string]interface{} `bson:"counts" json:"counts"`
Migration string `bson:"migration,omitempty"`
StackTemplate []string `bson:"stackTemplates",omitempty`
}
|
Add StackTemplate field to Group mongo model
|
Mongo: Add StackTemplate field to Group mongo model
|
Go
|
agpl-3.0
|
drewsetski/koding,drewsetski/koding,usirin/koding,usirin/koding,rjeczalik/koding,jack89129/koding,kwagdy/koding-1,cihangir/koding,drewsetski/koding,alex-ionochkin/koding,andrewjcasal/koding,acbodine/koding,rjeczalik/koding,jack89129/koding,koding/koding,koding/koding,usirin/koding,kwagdy/koding-1,kwagdy/koding-1,mertaytore/koding,koding/koding,gokmen/koding,andrewjcasal/koding,gokmen/koding,drewsetski/koding,szkl/koding,drewsetski/koding,szkl/koding,mertaytore/koding,gokmen/koding,sinan/koding,sinan/koding,jack89129/koding,szkl/koding,acbodine/koding,mertaytore/koding,rjeczalik/koding,drewsetski/koding,kwagdy/koding-1,gokmen/koding,andrewjcasal/koding,szkl/koding,acbodine/koding,gokmen/koding,jack89129/koding,alex-ionochkin/koding,koding/koding,sinan/koding,andrewjcasal/koding,szkl/koding,szkl/koding,sinan/koding,kwagdy/koding-1,koding/koding,acbodine/koding,gokmen/koding,szkl/koding,mertaytore/koding,drewsetski/koding,usirin/koding,alex-ionochkin/koding,mertaytore/koding,rjeczalik/koding,alex-ionochkin/koding,andrewjcasal/koding,rjeczalik/koding,sinan/koding,acbodine/koding,alex-ionochkin/koding,kwagdy/koding-1,koding/koding,cihangir/koding,sinan/koding,jack89129/koding,cihangir/koding,kwagdy/koding-1,jack89129/koding,andrewjcasal/koding,mertaytore/koding,acbodine/koding,rjeczalik/koding,alex-ionochkin/koding,usirin/koding,cihangir/koding,acbodine/koding,mertaytore/koding,gokmen/koding,andrewjcasal/koding,jack89129/koding,gokmen/koding,jack89129/koding,cihangir/koding,koding/koding,kwagdy/koding-1,sinan/koding,drewsetski/koding,cihangir/koding,usirin/koding,usirin/koding,cihangir/koding,rjeczalik/koding,rjeczalik/koding,mertaytore/koding,sinan/koding,andrewjcasal/koding,cihangir/koding,koding/koding,usirin/koding,szkl/koding,alex-ionochkin/koding,alex-ionochkin/koding,acbodine/koding
|
go
|
## Code Before:
package models
import (
"labix.org/v2/mgo/bson"
)
type Group struct {
Id bson.ObjectId `bson:"_id" json:"-"`
Body string `bson:"body" json:"body"`
Title string `bson:"title" json:"title"`
Slug string `bson:"slug" json:"slug"`
Privacy string `bson:"privacy" json:"privacy"`
Visibility string `bson:"visibility" json:"visibility"`
SocialApiChannelId string `bson:"socialApiChannelId" json:"socialApiChannelId"`
Parent []map[string]interface{} `bson:"parent" json:"parent"`
Customize map[string]interface{} `bson:"customize" json:"customize"`
Counts map[string]interface{} `bson:"counts" json:"counts"`
Migration string `bson:"migration,omitempty"`
}
## Instruction:
Mongo: Add StackTemplate field to Group mongo model
## Code After:
package models
import (
"labix.org/v2/mgo/bson"
)
type Group struct {
Id bson.ObjectId `bson:"_id" json:"-"`
Body string `bson:"body" json:"body"`
Title string `bson:"title" json:"title"`
Slug string `bson:"slug" json:"slug"`
Privacy string `bson:"privacy" json:"privacy"`
Visibility string `bson:"visibility" json:"visibility"`
SocialApiChannelId string `bson:"socialApiChannelId" json:"socialApiChannelId"`
Parent []map[string]interface{} `bson:"parent" json:"parent"`
Customize map[string]interface{} `bson:"customize" json:"customize"`
Counts map[string]interface{} `bson:"counts" json:"counts"`
Migration string `bson:"migration,omitempty"`
StackTemplate []string `bson:"stackTemplates",omitempty`
}
|
025c8cc6417ccc16ce540249115235e9912e32c0
|
docs/make.jl
|
docs/make.jl
|
using Documenter, Optim
# use include("Rosenbrock.jl") etc
# assuming linux.
#run('mv ../LICENSE.md ./LICENSE.md')
#run('mv ../CONTRIBUTING.md ./dev/CONTRIBUTING.md')
makedocs(
doctest = false
)
deploydocs(
repo = "github.com/JuliaOpt/Optim.jl.git"
)
|
using Documenter, Optim
# use include("Rosenbrock.jl") etc
# assuming linux.
#run('mv ../LICENSE.md ./LICENSE.md')
#run('mv ../CONTRIBUTING.md ./dev/CONTRIBUTING.md')
makedocs(
doctest = false
)
deploydocs(
repo = "github.com/JuliaOpt/Optim.jl.git",
julia = "0.5"
)
|
Fix Documenter by changing from nightly to v0.5.
|
Fix Documenter by changing from nightly to v0.5.
|
Julia
|
mit
|
matthieugomez/Optim.jl,matthieugomez/Optim.jl,JuliaPackageMirrors/Optim.jl,JuliaPackageMirrors/Optim.jl
|
julia
|
## Code Before:
using Documenter, Optim
# use include("Rosenbrock.jl") etc
# assuming linux.
#run('mv ../LICENSE.md ./LICENSE.md')
#run('mv ../CONTRIBUTING.md ./dev/CONTRIBUTING.md')
makedocs(
doctest = false
)
deploydocs(
repo = "github.com/JuliaOpt/Optim.jl.git"
)
## Instruction:
Fix Documenter by changing from nightly to v0.5.
## Code After:
using Documenter, Optim
# use include("Rosenbrock.jl") etc
# assuming linux.
#run('mv ../LICENSE.md ./LICENSE.md')
#run('mv ../CONTRIBUTING.md ./dev/CONTRIBUTING.md')
makedocs(
doctest = false
)
deploydocs(
repo = "github.com/JuliaOpt/Optim.jl.git",
julia = "0.5"
)
|
c30bbf2ef0c9fed05d85d4845dea459691545b12
|
scripts/GenerateManifests.cmd
|
scripts/GenerateManifests.cmd
|
@@setlocal
@@set POWERSHELL_BAT_ARGS=%*
@@if defined POWERSHELL_BAT_ARGS set POWERSHELL_BAT_ARGS=%POWERSHELL_BAT_ARGS:"=\"%
@@powershell.exe -Command Invoke-Expression $('$args=@(^&{$args} %POWERSHELL_BAT_ARGS%);'+[String]::Join([char]10, $((Get-Content '%~f0') -notmatch '^^@@'))) & goto :EOF
if ($args.Length -lt 1 -or $args.Length -gt 2)
{
Write-Host "Specify an assembly path and an optional output directory.";
Exit 1;
}
$assemblyPath = $args[0];
$outputDirectory = ".";
if ($args.Length -eq 2)
{
$outputDirectory = $args[1];
}
$eventSourceType = [System.Diagnostics.Tracing.EventSource];
$assembly = [System.Reflection.Assembly]::LoadFrom($args[0]);
$types = $assembly.GetTypes();
foreach ($type in $types)
{
if ($type.IsSubclassOf($eventSourceType))
{
Write-Host "Found type '$type'.";
$text = [System.Diagnostics.Tracing.EventSource]::GenerateManifest($type, $null);
$fileName = "$outputDirectory\" + $type.FullName.Replace(".", "-") + ".man";
Write-Host "Writing manifest to '$fileName'...";
$text | Out-File $fileName;
}
}
Write-Host "Done.";
|
@@setlocal
@@set POWERSHELL_BAT_ARGS=%*
@@if defined POWERSHELL_BAT_ARGS set POWERSHELL_BAT_ARGS=%POWERSHELL_BAT_ARGS:"=\"%
@@powershell.exe -Command Invoke-Expression $('$args=@(^&{$args} %POWERSHELL_BAT_ARGS%);'+[String]::Join([char]10, $((Get-Content '%~f0') -notmatch '^^@@'))) & goto :EOF
if ($args.Length -lt 1 -or $args.Length -gt 2)
{
Write-Host "Specify an assembly path and an optional output directory.";
Exit 1;
}
$assemblyPath = $args[0];
$outputDirectory = ".";
if ($args.Length -eq 2)
{
$outputDirectory = $args[1];
}
$eventSourceType = [System.Diagnostics.Tracing.EventSource];
$assembly = [System.Reflection.Assembly]::LoadFrom($args[0]);
$types = $assembly.GetTypes();
foreach ($type in $types)
{
if ($type.IsSubclassOf($eventSourceType))
{
Write-Host "Found type '$type'.";
$text = [System.Diagnostics.Tracing.EventSource]::GenerateManifest($type, "NOT-USED");
$fileName = "$outputDirectory\" + $type.FullName.Replace(".", "-") + ".man";
Write-Host "Writing manifest to '$fileName'...";
$text | Out-File $fileName;
}
}
Write-Host "Done.";
|
Add dummy resource file values for manifest
|
Add dummy resource file values for manifest
|
Batchfile
|
unlicense
|
brian-dot-net/writeasync,brian-dot-net/writeasync,brian-dot-net/writeasync
|
batchfile
|
## Code Before:
@@setlocal
@@set POWERSHELL_BAT_ARGS=%*
@@if defined POWERSHELL_BAT_ARGS set POWERSHELL_BAT_ARGS=%POWERSHELL_BAT_ARGS:"=\"%
@@powershell.exe -Command Invoke-Expression $('$args=@(^&{$args} %POWERSHELL_BAT_ARGS%);'+[String]::Join([char]10, $((Get-Content '%~f0') -notmatch '^^@@'))) & goto :EOF
if ($args.Length -lt 1 -or $args.Length -gt 2)
{
Write-Host "Specify an assembly path and an optional output directory.";
Exit 1;
}
$assemblyPath = $args[0];
$outputDirectory = ".";
if ($args.Length -eq 2)
{
$outputDirectory = $args[1];
}
$eventSourceType = [System.Diagnostics.Tracing.EventSource];
$assembly = [System.Reflection.Assembly]::LoadFrom($args[0]);
$types = $assembly.GetTypes();
foreach ($type in $types)
{
if ($type.IsSubclassOf($eventSourceType))
{
Write-Host "Found type '$type'.";
$text = [System.Diagnostics.Tracing.EventSource]::GenerateManifest($type, $null);
$fileName = "$outputDirectory\" + $type.FullName.Replace(".", "-") + ".man";
Write-Host "Writing manifest to '$fileName'...";
$text | Out-File $fileName;
}
}
Write-Host "Done.";
## Instruction:
Add dummy resource file values for manifest
## Code After:
@@setlocal
@@set POWERSHELL_BAT_ARGS=%*
@@if defined POWERSHELL_BAT_ARGS set POWERSHELL_BAT_ARGS=%POWERSHELL_BAT_ARGS:"=\"%
@@powershell.exe -Command Invoke-Expression $('$args=@(^&{$args} %POWERSHELL_BAT_ARGS%);'+[String]::Join([char]10, $((Get-Content '%~f0') -notmatch '^^@@'))) & goto :EOF
if ($args.Length -lt 1 -or $args.Length -gt 2)
{
Write-Host "Specify an assembly path and an optional output directory.";
Exit 1;
}
$assemblyPath = $args[0];
$outputDirectory = ".";
if ($args.Length -eq 2)
{
$outputDirectory = $args[1];
}
$eventSourceType = [System.Diagnostics.Tracing.EventSource];
$assembly = [System.Reflection.Assembly]::LoadFrom($args[0]);
$types = $assembly.GetTypes();
foreach ($type in $types)
{
if ($type.IsSubclassOf($eventSourceType))
{
Write-Host "Found type '$type'.";
$text = [System.Diagnostics.Tracing.EventSource]::GenerateManifest($type, "NOT-USED");
$fileName = "$outputDirectory\" + $type.FullName.Replace(".", "-") + ".man";
Write-Host "Writing manifest to '$fileName'...";
$text | Out-File $fileName;
}
}
Write-Host "Done.";
|
ade36512277fefa064b33a89ca14757c707316f4
|
app/Helpers/BBCode/Tags/CodeTag.php
|
app/Helpers/BBCode/Tags/CodeTag.php
|
<?php
namespace App\Helpers\BBCode\Tags;
class CodeTag extends Tag {
function __construct()
{
$this->token = 'code';
$this->element = 'code';
}
public function FormatResult($result, $parser, $state, $scope, $options, $text)
{
$text = $parser->CleanString($text);
return '<code>' . $text . '</code>';
}
}
|
<?php
namespace App\Helpers\BBCode\Tags;
class CodeTag extends Tag {
function __construct()
{
$this->token = 'code';
$this->element = 'code';
}
public function FormatResult($result, $parser, $state, $scope, $options, $text)
{
// The text is already html escaped at this point (the default element cleans all strings)
return '<code>' . $text . '</code>';
}
}
|
Fix double escape in the code tag
|
Fix double escape in the code tag
|
PHP
|
mit
|
LogicAndTrick/twhl,LogicAndTrick/twhl,LogicAndTrick/twhl,LogicAndTrick/twhl
|
php
|
## Code Before:
<?php
namespace App\Helpers\BBCode\Tags;
class CodeTag extends Tag {
function __construct()
{
$this->token = 'code';
$this->element = 'code';
}
public function FormatResult($result, $parser, $state, $scope, $options, $text)
{
$text = $parser->CleanString($text);
return '<code>' . $text . '</code>';
}
}
## Instruction:
Fix double escape in the code tag
## Code After:
<?php
namespace App\Helpers\BBCode\Tags;
class CodeTag extends Tag {
function __construct()
{
$this->token = 'code';
$this->element = 'code';
}
public function FormatResult($result, $parser, $state, $scope, $options, $text)
{
// The text is already html escaped at this point (the default element cleans all strings)
return '<code>' . $text . '</code>';
}
}
|
fc3f03a161c08e4e0946671305183f1c608f7765
|
services/QuillLMS/client/app/modules/apollo.ts
|
services/QuillLMS/client/app/modules/apollo.ts
|
// import ApolloClient from "apollo-boost";
// const client = new ApolloClient({});
import { ApolloClient } from 'apollo-client';
import { HttpLink } from 'apollo-link-http';
import { InMemoryCache } from 'apollo-cache-inmemory';
import { ApolloLink, concat } from 'apollo-link';
const httpLink = new HttpLink({ uri: '/graphql' });
const authMiddleware = new ApolloLink((operation, forward) => {
// add the authorization to the headers
operation.setContext({
headers: {
'x-csrf-token': document.getElementsByName('csrf-token')[0] ? document.getElementsByName('csrf-token')[0].content : 0
}
});
return forward(operation);
})
const client = new ApolloClient({
link: concat(authMiddleware, httpLink),
cache: new InMemoryCache(),
});
export default client;
|
// import ApolloClient from "apollo-boost";
// const client = new ApolloClient({});
import { ApolloClient } from 'apollo-client';
import { HttpLink } from 'apollo-link-http';
import { InMemoryCache } from 'apollo-cache-inmemory';
import { ApolloLink, concat } from 'apollo-link';
const httpLink = new HttpLink({ uri: '/graphql' });
const authMiddleware = new ApolloLink((operation, forward) => {
// add the authorization to the headers
operation.setContext({
headers: {
'x-csrf-token': document.getElementsByName('csrf-token')[0] ? document.getElementsByName('csrf-token')[0].getAttribute('content') : 0
}
});
return forward(operation);
})
const client = new ApolloClient({
link: concat(authMiddleware, httpLink),
cache: new InMemoryCache(),
});
export default client;
|
Fix property 'content' does not exist on type 'HTMLElement'
|
quill-lms: Fix property 'content' does not exist on type 'HTMLElement'
document.getElementsByName() returns a HTMLElement object, which does not have a property
'content'. [0]
TypeScript is typesafe, so where returned object HTMLElement does not have a property,
any attempted access to it will be invalid. Reported by tslint and [email protected].
There are two potential solutions:
- Utilize the generic .getAttribute('content'); or
- Cast to the specific subtype (e.g. HTMLMetaElement) [1] which does have
a property 'content'.
tslint error:
ERROR in [at-loader] ./app/modules/apollo.ts:16:113
TS2339: Property 'content' does not exist on type 'HTMLElement'.
[0] https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement
[1] https://developer.mozilla.org/en-US/docs/Web/API/HTMLMetaElement
|
TypeScript
|
agpl-3.0
|
empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core
|
typescript
|
## Code Before:
// import ApolloClient from "apollo-boost";
// const client = new ApolloClient({});
import { ApolloClient } from 'apollo-client';
import { HttpLink } from 'apollo-link-http';
import { InMemoryCache } from 'apollo-cache-inmemory';
import { ApolloLink, concat } from 'apollo-link';
const httpLink = new HttpLink({ uri: '/graphql' });
const authMiddleware = new ApolloLink((operation, forward) => {
// add the authorization to the headers
operation.setContext({
headers: {
'x-csrf-token': document.getElementsByName('csrf-token')[0] ? document.getElementsByName('csrf-token')[0].content : 0
}
});
return forward(operation);
})
const client = new ApolloClient({
link: concat(authMiddleware, httpLink),
cache: new InMemoryCache(),
});
export default client;
## Instruction:
quill-lms: Fix property 'content' does not exist on type 'HTMLElement'
document.getElementsByName() returns a HTMLElement object, which does not have a property
'content'. [0]
TypeScript is typesafe, so where returned object HTMLElement does not have a property,
any attempted access to it will be invalid. Reported by tslint and [email protected].
There are two potential solutions:
- Utilize the generic .getAttribute('content'); or
- Cast to the specific subtype (e.g. HTMLMetaElement) [1] which does have
a property 'content'.
tslint error:
ERROR in [at-loader] ./app/modules/apollo.ts:16:113
TS2339: Property 'content' does not exist on type 'HTMLElement'.
[0] https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement
[1] https://developer.mozilla.org/en-US/docs/Web/API/HTMLMetaElement
## Code After:
// import ApolloClient from "apollo-boost";
// const client = new ApolloClient({});
import { ApolloClient } from 'apollo-client';
import { HttpLink } from 'apollo-link-http';
import { InMemoryCache } from 'apollo-cache-inmemory';
import { ApolloLink, concat } from 'apollo-link';
const httpLink = new HttpLink({ uri: '/graphql' });
const authMiddleware = new ApolloLink((operation, forward) => {
// add the authorization to the headers
operation.setContext({
headers: {
'x-csrf-token': document.getElementsByName('csrf-token')[0] ? document.getElementsByName('csrf-token')[0].getAttribute('content') : 0
}
});
return forward(operation);
})
const client = new ApolloClient({
link: concat(authMiddleware, httpLink),
cache: new InMemoryCache(),
});
export default client;
|
543644a7d9aca6999541859c2a13231762550bb8
|
backends/filesystem_flash/duell_library.xml
|
backends/filesystem_flash/duell_library.xml
|
<?xml version="1.0" encoding="utf-8"?>
<library>
<haxelib name="air3" />
</library>
|
<?xml version="1.0" encoding="utf-8"?>
<library>
<haxelib name="air3" version="0.0.1" />
</library>
|
Revert "Revert "Added versions to haxelibs""
|
Revert "Revert "Added versions to haxelibs""
This reverts commit d6e558844692f6bac32f3ae60d26906f7e1215e9.
|
XML
|
bsd-2-clause
|
gameduell/filesystem,gameduell/filesystem,gameduell/filesystem,gameduell/filesystem
|
xml
|
## Code Before:
<?xml version="1.0" encoding="utf-8"?>
<library>
<haxelib name="air3" />
</library>
## Instruction:
Revert "Revert "Added versions to haxelibs""
This reverts commit d6e558844692f6bac32f3ae60d26906f7e1215e9.
## Code After:
<?xml version="1.0" encoding="utf-8"?>
<library>
<haxelib name="air3" version="0.0.1" />
</library>
|
ff9e0fcf35197ab9ffabae6f3e39334cca2c7daa
|
src/Templates.php
|
src/Templates.php
|
<?php
namespace jvwp;
use FlorianWolters\Component\Util\Singleton\SingletonTrait;
class Templates
{
use SingletonTrait;
private $twigLoader;
private $twigEnvironment;
function __construct ()
{
$this->twigLoader = new \Twig_Loader_Filesystem(array());
$this->twigEnvironment = new \Twig_Environment($this->twigLoader);
}
/**
* Adds a path where templates are stored.
*
* @param string $path A path where to look for templates
* @param string $namespace The namespace to associate the path with
*
* @throws \Twig_Error_Loader
*/
public static function addPath ($path, $namespace = \Twig_Loader_Filesystem::MAIN_NAMESPACE)
{
$twigLoader = self::getInstance()->twigLoader;
/* @var $twigLoader \Twig_Loader_Filesystem */
$twigLoader->addPath($path, $namespace);
}
/**
* Gets the template with the given name.
*
* @param string $name
*
* @return \Twig_Template
*/
public static function getTemplate ($name)
{
return self::getInstance()->getTwigEnvironment()->loadTemplate($name);
}
/**
* @return \Twig_Environment;
*/
public function getTwigEnvironment ()
{
return $this->twigEnvironment;
}
}
|
<?php
namespace jvwp;
use FlorianWolters\Component\Util\Singleton\SingletonTrait;
class Templates
{
use SingletonTrait;
private $twigLoader;
private $twigEnvironment;
function __construct ()
{
$this->twigLoader = new \Twig_Loader_Filesystem(array());
$this->twigEnvironment = new \Twig_Environment($this->twigLoader);
self::extendTwig($this->twigEnvironment);
}
/**
* Adds the WP-specific filters and functions to the twig environment
* @param \Twig_Environment $twig_Environment
*/
private static function extendTwig (\Twig_Environment $twig_Environment)
{
$twig_Environment->addFilter('__', new \Twig_SimpleFilter('__', function ($text, $domain = 'default') {
return __($text, $domain);
}));
}
/**
* Adds a path where templates are stored.
*
* @param string $path A path where to look for templates
* @param string $namespace The namespace to associate the path with
*
* @throws \Twig_Error_Loader
*/
public static function addPath ($path, $namespace = \Twig_Loader_Filesystem::MAIN_NAMESPACE)
{
$twigLoader = self::getInstance()->twigLoader;
/* @var $twigLoader \Twig_Loader_Filesystem */
$twigLoader->addPath($path, $namespace);
}
/**
* Gets the template with the given name.
*
* @param string $name
*
* @return \Twig_Template
*/
public static function getTemplate ($name)
{
return self::getInstance()->getTwigEnvironment()->loadTemplate($name);
}
/**
* @return \Twig_Environment;
*/
public function getTwigEnvironment ()
{
return $this->twigEnvironment;
}
}
|
Add the WordPress i18n as a filter to twig
|
Add the WordPress i18n as a filter to twig
|
PHP
|
mit
|
jmversteeg/jvwp,jmversteeg/jvwp
|
php
|
## Code Before:
<?php
namespace jvwp;
use FlorianWolters\Component\Util\Singleton\SingletonTrait;
class Templates
{
use SingletonTrait;
private $twigLoader;
private $twigEnvironment;
function __construct ()
{
$this->twigLoader = new \Twig_Loader_Filesystem(array());
$this->twigEnvironment = new \Twig_Environment($this->twigLoader);
}
/**
* Adds a path where templates are stored.
*
* @param string $path A path where to look for templates
* @param string $namespace The namespace to associate the path with
*
* @throws \Twig_Error_Loader
*/
public static function addPath ($path, $namespace = \Twig_Loader_Filesystem::MAIN_NAMESPACE)
{
$twigLoader = self::getInstance()->twigLoader;
/* @var $twigLoader \Twig_Loader_Filesystem */
$twigLoader->addPath($path, $namespace);
}
/**
* Gets the template with the given name.
*
* @param string $name
*
* @return \Twig_Template
*/
public static function getTemplate ($name)
{
return self::getInstance()->getTwigEnvironment()->loadTemplate($name);
}
/**
* @return \Twig_Environment;
*/
public function getTwigEnvironment ()
{
return $this->twigEnvironment;
}
}
## Instruction:
Add the WordPress i18n as a filter to twig
## Code After:
<?php
namespace jvwp;
use FlorianWolters\Component\Util\Singleton\SingletonTrait;
class Templates
{
use SingletonTrait;
private $twigLoader;
private $twigEnvironment;
function __construct ()
{
$this->twigLoader = new \Twig_Loader_Filesystem(array());
$this->twigEnvironment = new \Twig_Environment($this->twigLoader);
self::extendTwig($this->twigEnvironment);
}
/**
* Adds the WP-specific filters and functions to the twig environment
* @param \Twig_Environment $twig_Environment
*/
private static function extendTwig (\Twig_Environment $twig_Environment)
{
$twig_Environment->addFilter('__', new \Twig_SimpleFilter('__', function ($text, $domain = 'default') {
return __($text, $domain);
}));
}
/**
* Adds a path where templates are stored.
*
* @param string $path A path where to look for templates
* @param string $namespace The namespace to associate the path with
*
* @throws \Twig_Error_Loader
*/
public static function addPath ($path, $namespace = \Twig_Loader_Filesystem::MAIN_NAMESPACE)
{
$twigLoader = self::getInstance()->twigLoader;
/* @var $twigLoader \Twig_Loader_Filesystem */
$twigLoader->addPath($path, $namespace);
}
/**
* Gets the template with the given name.
*
* @param string $name
*
* @return \Twig_Template
*/
public static function getTemplate ($name)
{
return self::getInstance()->getTwigEnvironment()->loadTemplate($name);
}
/**
* @return \Twig_Environment;
*/
public function getTwigEnvironment ()
{
return $this->twigEnvironment;
}
}
|
52bd6f2dfe50469e7818240a45f34d3ba16b122a
|
lib/auth0.js
|
lib/auth0.js
|
import Auth0Lock from 'auth0-lock'
export const lock = new Auth0Lock(process.env.AUTH0_CLIENT_ID, process.env.AUTH0_DOMAIN)
|
import Auth0Lock from 'auth0-lock'
export const isRequired = process.env.AUTH0_CLIENT_ID && process.env.AUTH0_DOMAIN
export const lock = new Auth0Lock(process.env.AUTH0_CLIENT_ID, process.env.AUTH0_DOMAIN)
|
Add a check to see if auth is necessary
|
Add a check to see if auth is necessary
|
JavaScript
|
mit
|
conveyal/analysis-ui,conveyal/scenario-editor,conveyal/analysis-ui,conveyal/scenario-editor,conveyal/analysis-ui
|
javascript
|
## Code Before:
import Auth0Lock from 'auth0-lock'
export const lock = new Auth0Lock(process.env.AUTH0_CLIENT_ID, process.env.AUTH0_DOMAIN)
## Instruction:
Add a check to see if auth is necessary
## Code After:
import Auth0Lock from 'auth0-lock'
export const isRequired = process.env.AUTH0_CLIENT_ID && process.env.AUTH0_DOMAIN
export const lock = new Auth0Lock(process.env.AUTH0_CLIENT_ID, process.env.AUTH0_DOMAIN)
|
bb4e683ac877463605bc4fc216abee5757b0427f
|
spec/unit/data_mapper/mapper/class_methods/finalize_attributes_spec.rb
|
spec/unit/data_mapper/mapper/class_methods/finalize_attributes_spec.rb
|
require 'spec_helper'
describe DataMapper::Mapper, '.finalize_attributes' do
it "finalizes its attribute set" do
described_class.attributes.should_receive(:finalize).with({})
described_class.finalize_attributes({})
end
end
|
require 'spec_helper'
describe DataMapper::Mapper, '.finalize_attributes' do
subject { object.finalize_attributes(registry) }
let(:object) { described_class }
let(:registry) { mock }
before do
object.attributes.should_receive(:finalize).with(registry)
end
it_should_behave_like 'a command method'
end
|
Kill a mutation in Mapper.finalize_attributes
|
Kill a mutation in Mapper.finalize_attributes
|
Ruby
|
mit
|
vrish88/rom,pdswan/rom,pvcarrera/rom,rom-rb/rom,Snuff/rom,rom-rb/rom,jeremyf/rom,kwando/rom,cored/rom,dcarral/rom,endash/rom,denyago/rom,dekz/rom,rom-rb/rom,pxlpnk/rom
|
ruby
|
## Code Before:
require 'spec_helper'
describe DataMapper::Mapper, '.finalize_attributes' do
it "finalizes its attribute set" do
described_class.attributes.should_receive(:finalize).with({})
described_class.finalize_attributes({})
end
end
## Instruction:
Kill a mutation in Mapper.finalize_attributes
## Code After:
require 'spec_helper'
describe DataMapper::Mapper, '.finalize_attributes' do
subject { object.finalize_attributes(registry) }
let(:object) { described_class }
let(:registry) { mock }
before do
object.attributes.should_receive(:finalize).with(registry)
end
it_should_behave_like 'a command method'
end
|
9ff3e28199e4b73501eaf0c11bcdf1d837461e8c
|
index.html
|
index.html
|
<html>
<body>
Hello DBC!
</body>
</html>
|
<!DOCTYPE html>
<html lang="en">
<head>
<title>Jenna Espezua | Developer</title>
<meta charset= "utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<header>
<a href="index.html" id="logo">
<h1>Jenna Espezua</h1>
<h2>Developer</h2>
</a>
<nav>
<ul>
<li><a href="index.html" class="selected">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Portfolio</a></li>
<li><a href="#">Resume</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</header>
<section id="page-gallery">
<ul>
<li>
<a href="index.html">
<img src="" alt="Home Page">
</a>
</li>
<li>
<a href="#">
<img src="#" alt="About Page">
</a>
</li>
<li>
<a href="#">
<img src="#" alt="Portfolio Page">
</a>
</li>
<li>
<a href="#">
<img src="#" alt="Resume Page">
</a>
</li>
<li>
<a href="#">
<img src="#" alt="Blog Page">
</a>
</li>
<li>
<a href="#">
<img src="#" alt="Contact Page">
</a>
</li>
</ul>
</section>
<footer>
<ul id="contact-links-footer">
<li><a href="emailto:[email protected]"><img src="#" alt="Email" /></a></li>
<li><a href="https://www.linkedin.com/in/jennaespezua"><img src="#" alt="LinkedIn" /></a></li>
<li><a href="https://github.com/espezua"><img src="#" alt="GitHub" /></a></li>
<li><a href="https://twitter.com/JennaEspezua"><img src="#" alt="Twitter" /></a></li>
</ul>
<p>© 2015 Jenna Espezua</p>
</footer>
</body>
</html>
|
Add content and html to home page
|
Add content and html to home page
|
HTML
|
mit
|
espezua/espezua.github.io
|
html
|
## Code Before:
<html>
<body>
Hello DBC!
</body>
</html>
## Instruction:
Add content and html to home page
## Code After:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Jenna Espezua | Developer</title>
<meta charset= "utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<header>
<a href="index.html" id="logo">
<h1>Jenna Espezua</h1>
<h2>Developer</h2>
</a>
<nav>
<ul>
<li><a href="index.html" class="selected">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Portfolio</a></li>
<li><a href="#">Resume</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</header>
<section id="page-gallery">
<ul>
<li>
<a href="index.html">
<img src="" alt="Home Page">
</a>
</li>
<li>
<a href="#">
<img src="#" alt="About Page">
</a>
</li>
<li>
<a href="#">
<img src="#" alt="Portfolio Page">
</a>
</li>
<li>
<a href="#">
<img src="#" alt="Resume Page">
</a>
</li>
<li>
<a href="#">
<img src="#" alt="Blog Page">
</a>
</li>
<li>
<a href="#">
<img src="#" alt="Contact Page">
</a>
</li>
</ul>
</section>
<footer>
<ul id="contact-links-footer">
<li><a href="emailto:[email protected]"><img src="#" alt="Email" /></a></li>
<li><a href="https://www.linkedin.com/in/jennaespezua"><img src="#" alt="LinkedIn" /></a></li>
<li><a href="https://github.com/espezua"><img src="#" alt="GitHub" /></a></li>
<li><a href="https://twitter.com/JennaEspezua"><img src="#" alt="Twitter" /></a></li>
</ul>
<p>© 2015 Jenna Espezua</p>
</footer>
</body>
</html>
|
f35b8ec8c22956e7461846944260d94d79ae772b
|
brunch-config.js
|
brunch-config.js
|
// Brunch configuration
// See http://brunch.io for documentation.
'use strict';
module.exports = {
files: {
javascripts: {
joinTo: {
'scripts/main.js': ['app/scripts/**/*.js', /^node_modules/]
}
},
stylesheets: {
joinTo: {
'styles/main.css': ['app/styles/main.scss']
}
}
},
modules: {
autoRequire: {
'scripts/main.js': ['scripts/main']
}
},
paths: {
// Exclude test files from compilation
watched: ['app']
},
plugins: {
copycat: {
fonts: ['node_modules/typeface-ubuntu/files'],
verbose: false,
onlyChanged: true
},
postcss: {
processors: [
require('autoprefixer')({
browsers: ['> 0.1%']
})
]
},
swPrecache: {
swFileName: 'service-worker.js',
options: {
cacheId: 'connect-four',
staticFileGlobs: ['public/**/!(*map*)'],
stripPrefix: 'public',
replacePrefix: '/connect-four'
}
}
}
};
|
// Brunch configuration
// See http://brunch.io for documentation.
'use strict';
module.exports = {
files: {
javascripts: {
joinTo: {
'scripts/main.js': ['app/scripts/**/*.js', /^node_modules/]
}
},
stylesheets: {
joinTo: {
'styles/main.css': ['app/styles/main.scss']
}
}
},
modules: {
autoRequire: {
'scripts/main.js': ['scripts/main']
}
},
paths: {
// Exclude test files from compilation
watched: ['app']
},
plugins: {
copycat: {
fonts: [
'node_modules/typeface-ubuntu/files/ubuntu-latin-400.woff2',
'node_modules/typeface-ubuntu/files/ubuntu-latin-400.woff',
'node_modules/typeface-ubuntu/files/ubuntu-latin-400.eot',
'node_modules/typeface-ubuntu/files/ubuntu-latin-400.svg'
],
verbose: false,
onlyChanged: true
},
postcss: {
processors: [
require('autoprefixer')({
browsers: ['> 0.1%']
})
]
},
swPrecache: {
swFileName: 'service-worker.js',
options: {
cacheId: 'connect-four',
staticFileGlobs: ['public/**/!(*map*)'],
stripPrefix: 'public',
replacePrefix: '/connect-four'
}
}
}
};
|
Copy only the required fonts when building
|
Copy only the required fonts when building
|
JavaScript
|
mit
|
caleb531/connect-four
|
javascript
|
## Code Before:
// Brunch configuration
// See http://brunch.io for documentation.
'use strict';
module.exports = {
files: {
javascripts: {
joinTo: {
'scripts/main.js': ['app/scripts/**/*.js', /^node_modules/]
}
},
stylesheets: {
joinTo: {
'styles/main.css': ['app/styles/main.scss']
}
}
},
modules: {
autoRequire: {
'scripts/main.js': ['scripts/main']
}
},
paths: {
// Exclude test files from compilation
watched: ['app']
},
plugins: {
copycat: {
fonts: ['node_modules/typeface-ubuntu/files'],
verbose: false,
onlyChanged: true
},
postcss: {
processors: [
require('autoprefixer')({
browsers: ['> 0.1%']
})
]
},
swPrecache: {
swFileName: 'service-worker.js',
options: {
cacheId: 'connect-four',
staticFileGlobs: ['public/**/!(*map*)'],
stripPrefix: 'public',
replacePrefix: '/connect-four'
}
}
}
};
## Instruction:
Copy only the required fonts when building
## Code After:
// Brunch configuration
// See http://brunch.io for documentation.
'use strict';
module.exports = {
files: {
javascripts: {
joinTo: {
'scripts/main.js': ['app/scripts/**/*.js', /^node_modules/]
}
},
stylesheets: {
joinTo: {
'styles/main.css': ['app/styles/main.scss']
}
}
},
modules: {
autoRequire: {
'scripts/main.js': ['scripts/main']
}
},
paths: {
// Exclude test files from compilation
watched: ['app']
},
plugins: {
copycat: {
fonts: [
'node_modules/typeface-ubuntu/files/ubuntu-latin-400.woff2',
'node_modules/typeface-ubuntu/files/ubuntu-latin-400.woff',
'node_modules/typeface-ubuntu/files/ubuntu-latin-400.eot',
'node_modules/typeface-ubuntu/files/ubuntu-latin-400.svg'
],
verbose: false,
onlyChanged: true
},
postcss: {
processors: [
require('autoprefixer')({
browsers: ['> 0.1%']
})
]
},
swPrecache: {
swFileName: 'service-worker.js',
options: {
cacheId: 'connect-four',
staticFileGlobs: ['public/**/!(*map*)'],
stripPrefix: 'public',
replacePrefix: '/connect-four'
}
}
}
};
|
e5998bee254dc31acd36c4499b700d9ff309b72d
|
tests/Fixtures/AbstractResponse.php
|
tests/Fixtures/AbstractResponse.php
|
<?php
namespace ChainableTest\Fixtures;
use Chainable\ChainableInterface;
use Chainable\Result\ChainResult;
use Chainable\Result\ChainResultInterface;
abstract class AbstractResponse implements ChainableInterface
{
abstract public function getValue();
/**
* @param mixed $data
*
* @return ChainResultInterface
*/
public function process(... $data)
{
return new ChainResult($this->getValue(), reset(reset($data)) === $this->getValue());
}
}
|
<?php
namespace ChainableTest\Fixtures;
use Chainable\ChainableInterface;
use Chainable\Result\ChainResult;
use Chainable\Result\ChainResultInterface;
abstract class AbstractResponse implements ChainableInterface
{
abstract public function getValue();
/**
* @param mixed $data
*
* @return ChainResultInterface
*/
public function process(... $data)
{
$value = reset($data);
return new ChainResult($this->getValue(), reset($value) === $this->getValue());
}
}
|
Fix dumb error in travis php version
|
Fix dumb error in travis php version
|
PHP
|
mit
|
marcosdsanchez/chainable,marcosdsanchez/chainable
|
php
|
## Code Before:
<?php
namespace ChainableTest\Fixtures;
use Chainable\ChainableInterface;
use Chainable\Result\ChainResult;
use Chainable\Result\ChainResultInterface;
abstract class AbstractResponse implements ChainableInterface
{
abstract public function getValue();
/**
* @param mixed $data
*
* @return ChainResultInterface
*/
public function process(... $data)
{
return new ChainResult($this->getValue(), reset(reset($data)) === $this->getValue());
}
}
## Instruction:
Fix dumb error in travis php version
## Code After:
<?php
namespace ChainableTest\Fixtures;
use Chainable\ChainableInterface;
use Chainable\Result\ChainResult;
use Chainable\Result\ChainResultInterface;
abstract class AbstractResponse implements ChainableInterface
{
abstract public function getValue();
/**
* @param mixed $data
*
* @return ChainResultInterface
*/
public function process(... $data)
{
$value = reset($data);
return new ChainResult($this->getValue(), reset($value) === $this->getValue());
}
}
|
00f16e3d7c4239bcb4c0b55302e4956adf69d691
|
pkgs/os-specific/linux/hwdata/default.nix
|
pkgs/os-specific/linux/hwdata/default.nix
|
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "hwdata-${version}";
version = "0.291";
src = fetchurl {
url = "https://git.fedorahosted.org/cgit/hwdata.git/snapshot/hwdata-${version}.tar.xz";
sha256 = "121qixrdhdncva1cnj7m7jlqvi1kbj85dpi844jiis3a8hgpzw5a";
};
preConfigure = "patchShebangs ./configure";
configureFlags = "--datadir=$(prefix)/data";
meta = {
homepage = "https://fedorahosted.org/hwdata/";
description = "Hardware Database, including Monitors, pci.ids, usb.ids, and video cards";
license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux;
};
}
|
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "hwdata-${version}";
version = "0.291";
src = fetchurl {
url = "http://pkgs.fedoraproject.org/repo/pkgs/hwdata/hwdata-0.291.tar.bz2/effe59bf406eb03bb295bd34e0913dd8/hwdata-0.291.tar.bz2";
sha256 = "01cq9csryxcrilnqdjd2r8gpaap3mk4968v7y36c7shyyaf9zkym";
};
preConfigure = "patchShebangs ./configure";
configureFlags = "--datadir=$(prefix)/data";
meta = {
homepage = "https://fedorahosted.org/hwdata/";
description = "Hardware Database, including Monitors, pci.ids, usb.ids, and video cards";
license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux;
};
}
|
Use content-addressed source file; previous source tarball changed contents.
|
hwdata: Use content-addressed source file; previous source tarball changed contents.
|
Nix
|
mit
|
SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs
|
nix
|
## Code Before:
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "hwdata-${version}";
version = "0.291";
src = fetchurl {
url = "https://git.fedorahosted.org/cgit/hwdata.git/snapshot/hwdata-${version}.tar.xz";
sha256 = "121qixrdhdncva1cnj7m7jlqvi1kbj85dpi844jiis3a8hgpzw5a";
};
preConfigure = "patchShebangs ./configure";
configureFlags = "--datadir=$(prefix)/data";
meta = {
homepage = "https://fedorahosted.org/hwdata/";
description = "Hardware Database, including Monitors, pci.ids, usb.ids, and video cards";
license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux;
};
}
## Instruction:
hwdata: Use content-addressed source file; previous source tarball changed contents.
## Code After:
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "hwdata-${version}";
version = "0.291";
src = fetchurl {
url = "http://pkgs.fedoraproject.org/repo/pkgs/hwdata/hwdata-0.291.tar.bz2/effe59bf406eb03bb295bd34e0913dd8/hwdata-0.291.tar.bz2";
sha256 = "01cq9csryxcrilnqdjd2r8gpaap3mk4968v7y36c7shyyaf9zkym";
};
preConfigure = "patchShebangs ./configure";
configureFlags = "--datadir=$(prefix)/data";
meta = {
homepage = "https://fedorahosted.org/hwdata/";
description = "Hardware Database, including Monitors, pci.ids, usb.ids, and video cards";
license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux;
};
}
|
0e87e345d40badda9cd17f9e007f11789796b3c6
|
.travis.yml
|
.travis.yml
|
sudo: required
language:
- python
- node_js
python:
- "2.7"
- "3.3"
node_js:
- "node"
cache:
directories:
# cache pylint stat files:
- $HOME/.pylint.d
install:
# install dev/test dependencies:
- bash scripts/install.sh
script:
# run tests:
- bash scripts/run_tests.sh
notifications:
# disable all email build notifications:
email: false
|
dist: trusty
sudo: required
addons:
sonarcloud:
organization: "jonlabelle-github"
token:
secure: "EfB1NODLgc/Sp8JGzckrrxLPWB3x/mmfujMAMNBpLSbMDTn6tWdG7PKrOS5VNBlv/UtkSJgJ3VJkDA7A0IS8IxAdy1fxRBK/XB1Ws/OAh8m25/3Unm05PBGLOtyZlgup3jUzWm7pLtz+TLGLcvp+Z+RD80BM9Ck6dDZZrDBeImw9vwINebHGbbwrAUK07vqwl0BCrTmAWwILyPXLO4vlXtJyZeiUIVP2xaBXXG0rjpmy8Re4VIs/BClkGVAa5R0hKZAq5lsFavMXROLeUQyJd4axqsXY9/btCBGxvFFZW39OZPtZvAKTsvtbmyWwg8YgkhUx8bbEu6IkEgJKFZfrZEdPqWmQGH97fMVR2N8vl0ln0n0HHGtjGuXxtK3pWgp20Texa7BR+pMJRZkd/hVdXdKbQ/5og4ZwGZUwP//Ct9Mhq9gJ5dzYNsYx9vIsT6O++71jQM6zlETHpRjzBByt4BDOl6eHSDw1yqWqBJL++Wci64jE9HQFvflgVywCzQU4O0b0fLZcn/A2/d+b6dYF8yxpS26ZQ0yUotCBhbRMzHTqENemMAyyyuJgtdkEcH0l2j6ZmFAWWDgfus/H6cYM52mLUcu6lFgKzl6IRIrBUq4E4jEiU7J/DYRpFvY2/5xoWeJ11E6oOPCr+M3khHLArV221KLqFWwI/qTuy1hA1VY="
# jdk required by sonar-scanner:
jdk:
- oraclejdk8
language:
- python
- node_js
python:
- "2.7"
- "3.3"
node_js:
- "node"
cache:
directories:
- $HOME/.pylint.d
- $HOME/.sonar/cache
install:
- bash scripts/install.sh
script:
- bash scripts/run_tests.sh
- sonar-scanner
notifications:
email: false
|
Add sonar scan task to Travis build
|
Add sonar scan task to Travis build
|
YAML
|
mit
|
jonlabelle/SublimeJsPrettier,jonlabelle/SublimeJsPrettier
|
yaml
|
## Code Before:
sudo: required
language:
- python
- node_js
python:
- "2.7"
- "3.3"
node_js:
- "node"
cache:
directories:
# cache pylint stat files:
- $HOME/.pylint.d
install:
# install dev/test dependencies:
- bash scripts/install.sh
script:
# run tests:
- bash scripts/run_tests.sh
notifications:
# disable all email build notifications:
email: false
## Instruction:
Add sonar scan task to Travis build
## Code After:
dist: trusty
sudo: required
addons:
sonarcloud:
organization: "jonlabelle-github"
token:
secure: "EfB1NODLgc/Sp8JGzckrrxLPWB3x/mmfujMAMNBpLSbMDTn6tWdG7PKrOS5VNBlv/UtkSJgJ3VJkDA7A0IS8IxAdy1fxRBK/XB1Ws/OAh8m25/3Unm05PBGLOtyZlgup3jUzWm7pLtz+TLGLcvp+Z+RD80BM9Ck6dDZZrDBeImw9vwINebHGbbwrAUK07vqwl0BCrTmAWwILyPXLO4vlXtJyZeiUIVP2xaBXXG0rjpmy8Re4VIs/BClkGVAa5R0hKZAq5lsFavMXROLeUQyJd4axqsXY9/btCBGxvFFZW39OZPtZvAKTsvtbmyWwg8YgkhUx8bbEu6IkEgJKFZfrZEdPqWmQGH97fMVR2N8vl0ln0n0HHGtjGuXxtK3pWgp20Texa7BR+pMJRZkd/hVdXdKbQ/5og4ZwGZUwP//Ct9Mhq9gJ5dzYNsYx9vIsT6O++71jQM6zlETHpRjzBByt4BDOl6eHSDw1yqWqBJL++Wci64jE9HQFvflgVywCzQU4O0b0fLZcn/A2/d+b6dYF8yxpS26ZQ0yUotCBhbRMzHTqENemMAyyyuJgtdkEcH0l2j6ZmFAWWDgfus/H6cYM52mLUcu6lFgKzl6IRIrBUq4E4jEiU7J/DYRpFvY2/5xoWeJ11E6oOPCr+M3khHLArV221KLqFWwI/qTuy1hA1VY="
# jdk required by sonar-scanner:
jdk:
- oraclejdk8
language:
- python
- node_js
python:
- "2.7"
- "3.3"
node_js:
- "node"
cache:
directories:
- $HOME/.pylint.d
- $HOME/.sonar/cache
install:
- bash scripts/install.sh
script:
- bash scripts/run_tests.sh
- sonar-scanner
notifications:
email: false
|
20240c8a92be56d5eeb272beb9b93387aca395e9
|
app/Http/Controllers/LanguageController.php
|
app/Http/Controllers/LanguageController.php
|
<?php
namespace App\Http\Controllers;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Redirect;
use Log;
class LanguageController extends Controller
{
/**
* Switch Language
*
* @param string $lang Locale full name
* @return Redirect Redirect back to requesting URL
*/
public function switchLang($lang)
{
Log::info("Language switch Request to $lang");
if (array_key_exists($lang, Config::get('languages'))) {
Log::info('Language Switched');
Session::set('applocale', $lang);
}
return Redirect::back();
}
}
|
<?php
namespace App\Http\Controllers;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Redirect;
use Log;
class LanguageController extends Controller
{
/**
* Switch Language
*
* @param string $lang Locale full name
* @return Redirect Redirect back to requesting URL
*/
public function switchLang($lang)
{
Log::info("Language switch Request to $lang");
if (array_key_exists($lang, Config::get('languages'))) {
Log::info('Language Switched');
Session::set('applocale', $lang);
$locale = \Locale::parseLocale($lang);
Session::set('language', $locale['language']);
}
return Redirect::back();
}
}
|
Set language part global accesible
|
Set language part global accesible
|
PHP
|
agpl-3.0
|
timegridio/timegrid,alariva/timegrid,alariva/timegrid,alariva/timegrid,alariva/timegrid,timegridio/timegrid,timegridio/timegrid
|
php
|
## Code Before:
<?php
namespace App\Http\Controllers;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Redirect;
use Log;
class LanguageController extends Controller
{
/**
* Switch Language
*
* @param string $lang Locale full name
* @return Redirect Redirect back to requesting URL
*/
public function switchLang($lang)
{
Log::info("Language switch Request to $lang");
if (array_key_exists($lang, Config::get('languages'))) {
Log::info('Language Switched');
Session::set('applocale', $lang);
}
return Redirect::back();
}
}
## Instruction:
Set language part global accesible
## Code After:
<?php
namespace App\Http\Controllers;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Redirect;
use Log;
class LanguageController extends Controller
{
/**
* Switch Language
*
* @param string $lang Locale full name
* @return Redirect Redirect back to requesting URL
*/
public function switchLang($lang)
{
Log::info("Language switch Request to $lang");
if (array_key_exists($lang, Config::get('languages'))) {
Log::info('Language Switched');
Session::set('applocale', $lang);
$locale = \Locale::parseLocale($lang);
Session::set('language', $locale['language']);
}
return Redirect::back();
}
}
|
24e3fdd5e99feea622fc62f3dabf784b3bfd4788
|
server/package.json
|
server/package.json
|
{
"name": "learn-with-jesus-backend",
"version": "0.0.1",
"description": "",
"main": "index.js",
"scripts": {
"start-prod": "node index.js",
"db": "mongod --dbpath ../data-dev/",
"start": "concurrently \"'npm run db'\" \"npm start\""
},
"author": "Jesús Real Serrano <[email protected]>",
"license": "MIT",
"devDependencies": {
"concurrently": "^2.0.0"
},
"dependencies": {
"mongodb": "^2.2.16",
"express": "^4.14.0"
}
}
|
{
"name": "learn-with-jesus-backend",
"version": "0.0.1",
"description": "",
"main": "index.js",
"scripts": {
"start-prod": "node src/index.js",
"db": "mongod --dbpath ../data/data-dev/",
"start": "concurrently \"npm run db\" \"npm run start-prod\""
},
"author": "Jesús Real Serrano <[email protected]>",
"license": "MIT",
"devDependencies": {
"concurrently": "^2.0.0"
},
"dependencies": {
"mongodb": "^2.2.16",
"express": "^4.14.0"
}
}
|
Fix npm scripts for server local development
|
Fix npm scripts for server local development
|
JSON
|
mit
|
jesusreal/learn-with-jesus,jesusreal/learn-with-jesus,jesusreal/learn-with-jesus
|
json
|
## Code Before:
{
"name": "learn-with-jesus-backend",
"version": "0.0.1",
"description": "",
"main": "index.js",
"scripts": {
"start-prod": "node index.js",
"db": "mongod --dbpath ../data-dev/",
"start": "concurrently \"'npm run db'\" \"npm start\""
},
"author": "Jesús Real Serrano <[email protected]>",
"license": "MIT",
"devDependencies": {
"concurrently": "^2.0.0"
},
"dependencies": {
"mongodb": "^2.2.16",
"express": "^4.14.0"
}
}
## Instruction:
Fix npm scripts for server local development
## Code After:
{
"name": "learn-with-jesus-backend",
"version": "0.0.1",
"description": "",
"main": "index.js",
"scripts": {
"start-prod": "node src/index.js",
"db": "mongod --dbpath ../data/data-dev/",
"start": "concurrently \"npm run db\" \"npm run start-prod\""
},
"author": "Jesús Real Serrano <[email protected]>",
"license": "MIT",
"devDependencies": {
"concurrently": "^2.0.0"
},
"dependencies": {
"mongodb": "^2.2.16",
"express": "^4.14.0"
}
}
|
4b1d3e046614babbc96455805f8e86e8307f7ca7
|
client/package.json
|
client/package.json
|
{
"name": "superdesk-client",
"license": "GPL-3.0",
"dependencies": {
"superdesk-core": "superdesk/superdesk-client-core#5442257"
}
}
|
{
"name": "superdesk-client",
"license": "GPL-3.0",
"dependencies": {
"superdesk-core": "superdesk/superdesk-client-core#c0949630b84e8c57413cbec76b0a457bc18798b5"
}
}
|
Update NTB superdesk client core
|
Update NTB superdesk client core
|
JSON
|
agpl-3.0
|
superdesk/superdesk-ntb,superdesk/superdesk-ntb,ioanpocol/superdesk-ntb,superdesk/superdesk-ntb,petrjasek/superdesk-ntb,petrjasek/superdesk-ntb,ioanpocol/superdesk-ntb,ioanpocol/superdesk-ntb,superdesk/superdesk-ntb,petrjasek/superdesk-ntb,petrjasek/superdesk-ntb
|
json
|
## Code Before:
{
"name": "superdesk-client",
"license": "GPL-3.0",
"dependencies": {
"superdesk-core": "superdesk/superdesk-client-core#5442257"
}
}
## Instruction:
Update NTB superdesk client core
## Code After:
{
"name": "superdesk-client",
"license": "GPL-3.0",
"dependencies": {
"superdesk-core": "superdesk/superdesk-client-core#c0949630b84e8c57413cbec76b0a457bc18798b5"
}
}
|
4c6268da777fb9f3ef4948a10f5e7af30446b250
|
gencards.sh
|
gencards.sh
|
filea=$(mktemp)
fileb=$(mktemp)
copya=$(mktemp)
outfile=outcards.csv
max=14
for i in $(cut -f1 -d',' dynamic.csv | grep . | tail --lines=+2)
do
seq --format=",$i,%g,," 1 "$max" | tee -a "$filea" >> "$fileb"
done
cp "$filea" "$copya"
while IFS= read -r line
do
IFS=, read n attr val n n <<< "$line"
if [ ".$n." == ".." ]
then
n=
fi
attr=$(echo "$line" | cut -f2 -d',')
val=$(echo "$line" | cut -f3 -d',')
insert=$(grep . "$fileb" | grep -vw "$attr" | sort -R | head -1)
iat=$(echo "$insert" | cut -f2 -d',')
ival=$(echo "$insert" | cut -f3 -d',')
sed -i -e "s/$insert//g" "$fileb"
sed -i -e "s/^,$attr,$val,,$/,$attr,$val,$iat,$ival,,/g" "$filea"
done < "$copya"
cp "$filea" "$outfile"
rm -f "$filea" "$fileb" "$copya"
|
filea=$(mktemp)
fileb=$(mktemp)
copya=$(mktemp)
outfile=outcards.csv
max=14
if [ ".$1." != ".." ]
then
outfile=$1
fi
if [ ".$2." != ".." ]
then
max=$2
fi
for i in $(cut -f1 -d',' dynamic.csv | grep . | tail --lines=+2)
do
seq --format=",$i,%g,," 1 "$max" | tee -a "$filea" >> "$fileb"
done
cp "$filea" "$copya"
while IFS= read -r line
do
IFS=, read n attr val n n <<< "$line"
if [ ".$n." == ".." ]
then
n=
fi
attr=$(echo "$line" | cut -f2 -d',')
val=$(echo "$line" | cut -f3 -d',')
insert=$(grep . "$fileb" | grep -vw "$attr" | sort -R | head -1)
iat=$(echo "$insert" | cut -f2 -d',')
ival=$(echo "$insert" | cut -f3 -d',')
sed -i -e "s/$insert//g" "$fileb"
sed -i -e "s/^,$attr,$val,,$/,$attr,$val,$iat,$ival,,/g" "$filea"
done < "$copya"
cp "$filea" "$outfile"
rm -f "$filea" "$fileb" "$copya"
|
Check for command-line arguments in generation script
|
Check for command-line arguments in generation script
|
Shell
|
agpl-3.0
|
jcolag/AttaCard-Generator,jcolag/AttaCard-Generator
|
shell
|
## Code Before:
filea=$(mktemp)
fileb=$(mktemp)
copya=$(mktemp)
outfile=outcards.csv
max=14
for i in $(cut -f1 -d',' dynamic.csv | grep . | tail --lines=+2)
do
seq --format=",$i,%g,," 1 "$max" | tee -a "$filea" >> "$fileb"
done
cp "$filea" "$copya"
while IFS= read -r line
do
IFS=, read n attr val n n <<< "$line"
if [ ".$n." == ".." ]
then
n=
fi
attr=$(echo "$line" | cut -f2 -d',')
val=$(echo "$line" | cut -f3 -d',')
insert=$(grep . "$fileb" | grep -vw "$attr" | sort -R | head -1)
iat=$(echo "$insert" | cut -f2 -d',')
ival=$(echo "$insert" | cut -f3 -d',')
sed -i -e "s/$insert//g" "$fileb"
sed -i -e "s/^,$attr,$val,,$/,$attr,$val,$iat,$ival,,/g" "$filea"
done < "$copya"
cp "$filea" "$outfile"
rm -f "$filea" "$fileb" "$copya"
## Instruction:
Check for command-line arguments in generation script
## Code After:
filea=$(mktemp)
fileb=$(mktemp)
copya=$(mktemp)
outfile=outcards.csv
max=14
if [ ".$1." != ".." ]
then
outfile=$1
fi
if [ ".$2." != ".." ]
then
max=$2
fi
for i in $(cut -f1 -d',' dynamic.csv | grep . | tail --lines=+2)
do
seq --format=",$i,%g,," 1 "$max" | tee -a "$filea" >> "$fileb"
done
cp "$filea" "$copya"
while IFS= read -r line
do
IFS=, read n attr val n n <<< "$line"
if [ ".$n." == ".." ]
then
n=
fi
attr=$(echo "$line" | cut -f2 -d',')
val=$(echo "$line" | cut -f3 -d',')
insert=$(grep . "$fileb" | grep -vw "$attr" | sort -R | head -1)
iat=$(echo "$insert" | cut -f2 -d',')
ival=$(echo "$insert" | cut -f3 -d',')
sed -i -e "s/$insert//g" "$fileb"
sed -i -e "s/^,$attr,$val,,$/,$attr,$val,$iat,$ival,,/g" "$filea"
done < "$copya"
cp "$filea" "$outfile"
rm -f "$filea" "$fileb" "$copya"
|
c8554ae7a076b096e0c28906a386c9049f2a83be
|
src/main/java/com/bwfcwalshy/flarebot/permissions/PermissionNode.java
|
src/main/java/com/bwfcwalshy/flarebot/permissions/PermissionNode.java
|
package com.bwfcwalshy.flarebot.permissions;
import java.util.function.Predicate;
public class PermissionNode implements Predicate<PermissionNode> {
private final String node;
public PermissionNode(String node) {
this.node = node;
}
public String getNode() {
return node;
}
@Override
public boolean test(PermissionNode node) {
String textNode = getNode().replace(".", "\\.").replace("*", ".*");
return node.getNode().matches(textNode);
}
}
|
package com.bwfcwalshy.flarebot.permissions;
import java.util.Arrays;
import java.util.function.Predicate;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
public class PermissionNode implements Predicate<PermissionNode> {
private final String node;
public PermissionNode(String node) {
this.node = node;
}
public String getNode() {
return node;
}
@Override
public boolean test(PermissionNode node) {
String textNode = Arrays.stream(getNode().split("(?:^\\*(\\.))|(?:(?<=\\.)\\*(?=\\.))"))
.map(Pattern::quote)
.collect(Collectors.joining(".+"));
return node.getNode().matches(textNode);
}
}
|
Make permission nodes better again
|
Make permission nodes better again
|
Java
|
mit
|
weeryan17/FlareBot,binaryoverload/FlareBot,FlareBot/FlareBot
|
java
|
## Code Before:
package com.bwfcwalshy.flarebot.permissions;
import java.util.function.Predicate;
public class PermissionNode implements Predicate<PermissionNode> {
private final String node;
public PermissionNode(String node) {
this.node = node;
}
public String getNode() {
return node;
}
@Override
public boolean test(PermissionNode node) {
String textNode = getNode().replace(".", "\\.").replace("*", ".*");
return node.getNode().matches(textNode);
}
}
## Instruction:
Make permission nodes better again
## Code After:
package com.bwfcwalshy.flarebot.permissions;
import java.util.Arrays;
import java.util.function.Predicate;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
public class PermissionNode implements Predicate<PermissionNode> {
private final String node;
public PermissionNode(String node) {
this.node = node;
}
public String getNode() {
return node;
}
@Override
public boolean test(PermissionNode node) {
String textNode = Arrays.stream(getNode().split("(?:^\\*(\\.))|(?:(?<=\\.)\\*(?=\\.))"))
.map(Pattern::quote)
.collect(Collectors.joining(".+"));
return node.getNode().matches(textNode);
}
}
|
7463fa3d5b611b7d11fc0c8874d9456d39ad8a90
|
about/index.md
|
about/index.md
|
---
layout: page
title: About
---
|
---
layout: page
title: "About LOTSA"
excerpt: "Who we are and what we do."
---
Louisville Old Time Squares Association (LOTSA) is a group of people
dedicated to building community using traditional-style square dance. We
run a monthly series of dances, our Third Thursday Hoedown in
Germantown, at the AmVets Post #9 in Louisville's Schnitzelburg
neighborhood, and help set up and promote other traditional-style square
dances and old-time music events around town. We also make try to
coordinate with traditional music & dance groups in surrounding cities,
helping to pass along bands and callers between gigs.
Check us out [on Facebook](https://www.facebook.com/groups/LOTSA/) and [on Meetup](http://www.meetup.com/louisvillesquares).
|
Add some initial content to About page
|
Add some initial content to About page
Mentions trad-style squares and Third Thursdays. Links to Facebook and
Meetup.
|
Markdown
|
mit
|
chetgray/lotsa.github.io,lotsa/lotsa.github.io,chetgray/lotsa.github.io,lotsa/lotsa.github.io,chetgray/lotsa.github.io,lotsa/lotsa.github.io
|
markdown
|
## Code Before:
---
layout: page
title: About
---
## Instruction:
Add some initial content to About page
Mentions trad-style squares and Third Thursdays. Links to Facebook and
Meetup.
## Code After:
---
layout: page
title: "About LOTSA"
excerpt: "Who we are and what we do."
---
Louisville Old Time Squares Association (LOTSA) is a group of people
dedicated to building community using traditional-style square dance. We
run a monthly series of dances, our Third Thursday Hoedown in
Germantown, at the AmVets Post #9 in Louisville's Schnitzelburg
neighborhood, and help set up and promote other traditional-style square
dances and old-time music events around town. We also make try to
coordinate with traditional music & dance groups in surrounding cities,
helping to pass along bands and callers between gigs.
Check us out [on Facebook](https://www.facebook.com/groups/LOTSA/) and [on Meetup](http://www.meetup.com/louisvillesquares).
|
e1f53ff613de4ecd143840ff13aeea2ff51e9730
|
.travis/scripts/apache-vhosts.sh
|
.travis/scripts/apache-vhosts.sh
|
echo "ServerName localhost" | sudo tee /etc/apache2/conf-available/fqdn.conf
sudo a2enconf fqdn
echo "---> Starting $(tput bold ; tput setaf 2)virtual host creation$(tput sgr0)"
sudo cp -f .travis/apache2/www_simplemappr_local.conf /etc/apache2/sites-available/www_simplemappr_local.conf
sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/www_simplemappr_local.conf
sudo a2ensite www_simplemappr_local.conf
sudo cp -f .travis/apache2/img_simplemappr_local.conf /etc/apache2/sites-available/img_simplemappr_local.conf
sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/img_simplemappr_local.conf
sudo a2ensite img_simplemappr_local.conf
sudo a2enmod actions rewrite expires headers
sudo touch /var/run/php-fpm.sock
sudo chmod 777 /var/run/php-fpm.sock
|
echo "---> Starting $(tput bold ; tput setaf 2)virtual host creation$(tput sgr0)"
sudo cp -f .travis/apache2/www_simplemappr_local.conf /etc/apache2/sites-available/www_simplemappr_local.conf
sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/www_simplemappr_local.conf
sudo a2ensite www_simplemappr_local.conf
sudo cp -f .travis/apache2/img_simplemappr_local.conf /etc/apache2/sites-available/img_simplemappr_local.conf
sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/img_simplemappr_local.conf
sudo a2ensite img_simplemappr_local.conf
sudo a2enmod actions rewrite expires headers
sudo touch /var/run/php-fpm.sock
sudo chmod 777 /var/run/php-fpm.sock
|
Comment out FQDN entry for Travis-CI
|
Comment out FQDN entry for Travis-CI
|
Shell
|
mit
|
dshorthouse/SimpleMappr,dshorthouse/SimpleMappr,dshorthouse/SimpleMappr,dshorthouse/SimpleMappr,dshorthouse/SimpleMappr
|
shell
|
## Code Before:
echo "ServerName localhost" | sudo tee /etc/apache2/conf-available/fqdn.conf
sudo a2enconf fqdn
echo "---> Starting $(tput bold ; tput setaf 2)virtual host creation$(tput sgr0)"
sudo cp -f .travis/apache2/www_simplemappr_local.conf /etc/apache2/sites-available/www_simplemappr_local.conf
sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/www_simplemappr_local.conf
sudo a2ensite www_simplemappr_local.conf
sudo cp -f .travis/apache2/img_simplemappr_local.conf /etc/apache2/sites-available/img_simplemappr_local.conf
sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/img_simplemappr_local.conf
sudo a2ensite img_simplemappr_local.conf
sudo a2enmod actions rewrite expires headers
sudo touch /var/run/php-fpm.sock
sudo chmod 777 /var/run/php-fpm.sock
## Instruction:
Comment out FQDN entry for Travis-CI
## Code After:
echo "---> Starting $(tput bold ; tput setaf 2)virtual host creation$(tput sgr0)"
sudo cp -f .travis/apache2/www_simplemappr_local.conf /etc/apache2/sites-available/www_simplemappr_local.conf
sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/www_simplemappr_local.conf
sudo a2ensite www_simplemappr_local.conf
sudo cp -f .travis/apache2/img_simplemappr_local.conf /etc/apache2/sites-available/img_simplemappr_local.conf
sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/img_simplemappr_local.conf
sudo a2ensite img_simplemappr_local.conf
sudo a2enmod actions rewrite expires headers
sudo touch /var/run/php-fpm.sock
sudo chmod 777 /var/run/php-fpm.sock
|
c4663b4fc79df27678bd4635dd037e0d43e9d04d
|
appveyor.yml
|
appveyor.yml
|
version: v1-winbuild-{build}
image: Visual Studio 2017
platform:
- Win32
- x64
configuration:
- Release
before_build:
- cmd: if "%platform%"=="Win32" set msvc=Visual Studio 15 2017
- cmd: if "%platform%"=="x64" set msvc=Visual Studio 15 2017 Win64
build_script:
- powershell ".\ci\do-ut.ps1;exit $LASTEXITCODE"
- cd build
- cpack -C "%configuration%"
artifacts:
- path: build/td-agent-bit-*.exe
name: td-agent-bit
|
version: v1-winbuild-{build}
image: Visual Studio 2017
platform:
- Win32
- x64
configuration:
- Release
install:
- if %PLATFORM%==x86 (set MSYS2_MSYSTEM=MINGW32) else set MSYS2_MSYSTEM=MINGW64
- if %PLATFORM%==x86 (set MSYS2_PREFIX=C:\msys64\mingw32) else set MSYS2_PREFIX=C:\msys64\mingw64
- cmd: set PATH=%MSYS2_PREFIX%\bin;C:\msys64\usr\bin;%PATH%
- cmd: C:\msys64\usr\bin\pacman -Su --noconfirm bison flex
before_build:
- cmd: if "%platform%"=="Win32" set msvc=Visual Studio 15 2017
- cmd: if "%platform%"=="x64" set msvc=Visual Studio 15 2017 Win64
build_script:
- powershell ".\ci\do-ut.ps1;exit $LASTEXITCODE"
- cd build
- cpack -C "%configuration%"
artifacts:
- path: build/td-agent-bit-*.exe
name: td-agent-bit
|
Use bison and flex from MSYS2
|
ci: Use bison and flex from MSYS2
Signed-off-by: Hiroshi Hatake <[email protected]>
|
YAML
|
apache-2.0
|
fluent/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit
|
yaml
|
## Code Before:
version: v1-winbuild-{build}
image: Visual Studio 2017
platform:
- Win32
- x64
configuration:
- Release
before_build:
- cmd: if "%platform%"=="Win32" set msvc=Visual Studio 15 2017
- cmd: if "%platform%"=="x64" set msvc=Visual Studio 15 2017 Win64
build_script:
- powershell ".\ci\do-ut.ps1;exit $LASTEXITCODE"
- cd build
- cpack -C "%configuration%"
artifacts:
- path: build/td-agent-bit-*.exe
name: td-agent-bit
## Instruction:
ci: Use bison and flex from MSYS2
Signed-off-by: Hiroshi Hatake <[email protected]>
## Code After:
version: v1-winbuild-{build}
image: Visual Studio 2017
platform:
- Win32
- x64
configuration:
- Release
install:
- if %PLATFORM%==x86 (set MSYS2_MSYSTEM=MINGW32) else set MSYS2_MSYSTEM=MINGW64
- if %PLATFORM%==x86 (set MSYS2_PREFIX=C:\msys64\mingw32) else set MSYS2_PREFIX=C:\msys64\mingw64
- cmd: set PATH=%MSYS2_PREFIX%\bin;C:\msys64\usr\bin;%PATH%
- cmd: C:\msys64\usr\bin\pacman -Su --noconfirm bison flex
before_build:
- cmd: if "%platform%"=="Win32" set msvc=Visual Studio 15 2017
- cmd: if "%platform%"=="x64" set msvc=Visual Studio 15 2017 Win64
build_script:
- powershell ".\ci\do-ut.ps1;exit $LASTEXITCODE"
- cd build
- cpack -C "%configuration%"
artifacts:
- path: build/td-agent-bit-*.exe
name: td-agent-bit
|
880af833f348966d5cedf6921246b5b231028645
|
cookbooks/universe_ubuntu/spec/unit/recipes/default_spec.rb
|
cookbooks/universe_ubuntu/spec/unit/recipes/default_spec.rb
|
require 'spec_helper'
describe 'universe_ubuntu::default' do
context 'When all attributes are default, on an Ubuntu' do
before do
stub_command("[ -x /home/vagrant/anaconda3/bin/conda ]").and_return(0)
end
let(:chef_run) do
ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '14.04') do |node|
node.override['etc']['passwd']['vagrant']['dir'] = '/home/vagrant'
end.converge(described_recipe)
end
it 'converges successfully' do
expect { chef_run }.to_not raise_error
end
end
end
|
require 'spec_helper'
describe 'universe_ubuntu::default' do
context 'When all attributes are default, on an Ubuntu' do
before do
stub_command("[ -x /home/vagrant/anaconda3/bin/conda ]").and_return(0)
end
let(:chef_run) do
ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '14.04') do |node|
node.override['etc']['passwd']['vagrant']['dir'] = '/home/vagrant'
end.converge(described_recipe)
end
it 'converges successfully' do
expect { chef_run }.to_not raise_error
end
pkgs = %w(golang
libjpeg-turbo8-dev
make
tmux
htop
chromium-browser
git
cmake
zlib1g-dev
libjpeg-dev
xvfb
libav-tools
xorg-dev
python-opengl
libboost-all-dev
libsdl2-dev
swig)
pkgs.each do |name|
it "install #{name} package" do
expect(chef_run).to install_package name
end
end
end
end
|
Add unit test on packages install
|
Add unit test on packages install
|
Ruby
|
mit
|
havk64/Universe-on-Ubuntu-Chef-Cookbook,havk64/Universe-on-Ubuntu-Chef-Cookbook
|
ruby
|
## Code Before:
require 'spec_helper'
describe 'universe_ubuntu::default' do
context 'When all attributes are default, on an Ubuntu' do
before do
stub_command("[ -x /home/vagrant/anaconda3/bin/conda ]").and_return(0)
end
let(:chef_run) do
ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '14.04') do |node|
node.override['etc']['passwd']['vagrant']['dir'] = '/home/vagrant'
end.converge(described_recipe)
end
it 'converges successfully' do
expect { chef_run }.to_not raise_error
end
end
end
## Instruction:
Add unit test on packages install
## Code After:
require 'spec_helper'
describe 'universe_ubuntu::default' do
context 'When all attributes are default, on an Ubuntu' do
before do
stub_command("[ -x /home/vagrant/anaconda3/bin/conda ]").and_return(0)
end
let(:chef_run) do
ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '14.04') do |node|
node.override['etc']['passwd']['vagrant']['dir'] = '/home/vagrant'
end.converge(described_recipe)
end
it 'converges successfully' do
expect { chef_run }.to_not raise_error
end
pkgs = %w(golang
libjpeg-turbo8-dev
make
tmux
htop
chromium-browser
git
cmake
zlib1g-dev
libjpeg-dev
xvfb
libav-tools
xorg-dev
python-opengl
libboost-all-dev
libsdl2-dev
swig)
pkgs.each do |name|
it "install #{name} package" do
expect(chef_run).to install_package name
end
end
end
end
|
7c40fc45014722196263ce701911987b992d8b40
|
vagrant/pg_config.sh
|
vagrant/pg_config.sh
|
apt-get -qqy update
apt-get -qqy install postgresql python-psycopg2
apt-get -qqy install python-flask python-sqlalchemy
apt-get -qqy install python-pip
pip install bleach
pip install oauth2client
pip install requests
pip install httplib2
su postgres -c 'createuser -dRS vagrant'
su vagrant -c 'createdb'
su vagrant -c 'createdb forum'
su vagrant -c 'psql forum -f /vagrant/forum/forum.sql'
vagrantTip="[35m[1mThe shared directory is located at /vagrant\nTo access your shared files: cd /vagrant(B[m"
echo -e $vagrantTip > /etc/motd
|
apt-get -qqy update
apt-get -qqy install postgresql python-psycopg2
apt-get -qqy install python-flask python-sqlalchemy
apt-get -qqy install python-pip
pip install bleach
pip install oauth2client
pip install requests
pip install httplib2
su postgres -c 'createuser -dRS vagrant'
su vagrant -c 'createdb'
vagrantTip="[35m[1mThe shared directory is located at /vagrant\nTo access your shared files: cd /vagrant[B[m"
echo -e $vagrantTip > /etc/motd
|
Remove unused commands and correct typo in vagrantTip
|
Fix: Remove unused commands and correct typo in vagrantTip
|
Shell
|
mit
|
gsbullmer/tournament-results,gsbullmer/tournament-results,gsbullmer/tournament-results
|
shell
|
## Code Before:
apt-get -qqy update
apt-get -qqy install postgresql python-psycopg2
apt-get -qqy install python-flask python-sqlalchemy
apt-get -qqy install python-pip
pip install bleach
pip install oauth2client
pip install requests
pip install httplib2
su postgres -c 'createuser -dRS vagrant'
su vagrant -c 'createdb'
su vagrant -c 'createdb forum'
su vagrant -c 'psql forum -f /vagrant/forum/forum.sql'
vagrantTip="[35m[1mThe shared directory is located at /vagrant\nTo access your shared files: cd /vagrant(B[m"
echo -e $vagrantTip > /etc/motd
## Instruction:
Fix: Remove unused commands and correct typo in vagrantTip
## Code After:
apt-get -qqy update
apt-get -qqy install postgresql python-psycopg2
apt-get -qqy install python-flask python-sqlalchemy
apt-get -qqy install python-pip
pip install bleach
pip install oauth2client
pip install requests
pip install httplib2
su postgres -c 'createuser -dRS vagrant'
su vagrant -c 'createdb'
vagrantTip="[35m[1mThe shared directory is located at /vagrant\nTo access your shared files: cd /vagrant[B[m"
echo -e $vagrantTip > /etc/motd
|
e4db9e64197a2f6eaef8f3a1ae3d33fc5ab2a2a8
|
lib/android/app/src/main/java/com/reactnativenavigation/presentation/OverlayManager.java
|
lib/android/app/src/main/java/com/reactnativenavigation/presentation/OverlayManager.java
|
package com.reactnativenavigation.presentation;
import android.view.ViewGroup;
import com.reactnativenavigation.utils.CommandListener;
import com.reactnativenavigation.viewcontrollers.ViewController;
import java.util.HashMap;
public class OverlayManager {
private final HashMap<String, ViewController> overlayRegistry = new HashMap<>();
public void show(ViewGroup root, ViewController overlay, CommandListener listener) {
overlayRegistry.put(overlay.getId(), overlay);
overlay.setOnAppearedListener(() -> listener.onSuccess(overlay.getId()));
root.addView(overlay.getView());
}
public void dismiss(String componentId, CommandListener listener) {
ViewController overlay = overlayRegistry.get(componentId);
if (overlay == null) {
listener.onError("Could not dismiss Overlay. Overlay with id " + componentId + " was not found.");
} else {
overlay.destroy();
overlayRegistry.remove(componentId);
listener.onSuccess(componentId);
}
}
public void destroy() {
for (ViewController view : overlayRegistry.values()) {
view.destroy();
}
overlayRegistry.clear();
}
public int size() {
return overlayRegistry.size();
}
}
|
package com.reactnativenavigation.presentation;
import android.support.annotation.Nullable;
import android.view.ViewGroup;
import com.reactnativenavigation.utils.CommandListener;
import com.reactnativenavigation.viewcontrollers.ViewController;
import java.util.HashMap;
public class OverlayManager {
private final HashMap<String, ViewController> overlayRegistry = new HashMap<>();
public void show(@Nullable ViewGroup root, ViewController overlay, CommandListener listener) {
if (root == null) {
listener.onError("Can't show Overlay before setRoot is called. This will be resolved in #3899");
return;
}
overlayRegistry.put(overlay.getId(), overlay);
overlay.setOnAppearedListener(() -> listener.onSuccess(overlay.getId()));
root.addView(overlay.getView());
}
public void dismiss(String componentId, CommandListener listener) {
ViewController overlay = overlayRegistry.get(componentId);
if (overlay == null) {
listener.onError("Could not dismiss Overlay. Overlay with id " + componentId + " was not found.");
} else {
overlay.destroy();
overlayRegistry.remove(componentId);
listener.onSuccess(componentId);
}
}
public void destroy() {
for (ViewController view : overlayRegistry.values()) {
view.destroy();
}
overlayRegistry.clear();
}
public int size() {
return overlayRegistry.size();
}
}
|
Handle NPE when showing Overlay before setRoot is called
|
Handle NPE when showing Overlay before setRoot is called
Rejecting the promise is a temporary solution, Overlay should not be coupled to root.
|
Java
|
mit
|
thanhzusu/react-native-navigation,thanhzusu/react-native-navigation,Jpoliachik/react-native-navigation,guyca/react-native-navigation,Jpoliachik/react-native-navigation,Jpoliachik/react-native-navigation,ceyhuno/react-native-navigation,thanhzusu/react-native-navigation,wix/react-native-navigation,chicojasl/react-native-navigation,3sidedcube/react-native-navigation,wix/react-native-navigation,guyca/react-native-navigation,chicojasl/react-native-navigation,ceyhuno/react-native-navigation,guyca/react-native-navigation,3sidedcube/react-native-navigation,Jpoliachik/react-native-navigation,3sidedcube/react-native-navigation,thanhzusu/react-native-navigation,ceyhuno/react-native-navigation,wix/react-native-navigation,wix/react-native-navigation,3sidedcube/react-native-navigation,wix/react-native-navigation,Jpoliachik/react-native-navigation,Jpoliachik/react-native-navigation,chicojasl/react-native-navigation,ceyhuno/react-native-navigation,thanhzusu/react-native-navigation,chicojasl/react-native-navigation,chicojasl/react-native-navigation,ceyhuno/react-native-navigation,wix/react-native-navigation,thanhzusu/react-native-navigation,guyca/react-native-navigation,chicojasl/react-native-navigation,ceyhuno/react-native-navigation
|
java
|
## Code Before:
package com.reactnativenavigation.presentation;
import android.view.ViewGroup;
import com.reactnativenavigation.utils.CommandListener;
import com.reactnativenavigation.viewcontrollers.ViewController;
import java.util.HashMap;
public class OverlayManager {
private final HashMap<String, ViewController> overlayRegistry = new HashMap<>();
public void show(ViewGroup root, ViewController overlay, CommandListener listener) {
overlayRegistry.put(overlay.getId(), overlay);
overlay.setOnAppearedListener(() -> listener.onSuccess(overlay.getId()));
root.addView(overlay.getView());
}
public void dismiss(String componentId, CommandListener listener) {
ViewController overlay = overlayRegistry.get(componentId);
if (overlay == null) {
listener.onError("Could not dismiss Overlay. Overlay with id " + componentId + " was not found.");
} else {
overlay.destroy();
overlayRegistry.remove(componentId);
listener.onSuccess(componentId);
}
}
public void destroy() {
for (ViewController view : overlayRegistry.values()) {
view.destroy();
}
overlayRegistry.clear();
}
public int size() {
return overlayRegistry.size();
}
}
## Instruction:
Handle NPE when showing Overlay before setRoot is called
Rejecting the promise is a temporary solution, Overlay should not be coupled to root.
## Code After:
package com.reactnativenavigation.presentation;
import android.support.annotation.Nullable;
import android.view.ViewGroup;
import com.reactnativenavigation.utils.CommandListener;
import com.reactnativenavigation.viewcontrollers.ViewController;
import java.util.HashMap;
public class OverlayManager {
private final HashMap<String, ViewController> overlayRegistry = new HashMap<>();
public void show(@Nullable ViewGroup root, ViewController overlay, CommandListener listener) {
if (root == null) {
listener.onError("Can't show Overlay before setRoot is called. This will be resolved in #3899");
return;
}
overlayRegistry.put(overlay.getId(), overlay);
overlay.setOnAppearedListener(() -> listener.onSuccess(overlay.getId()));
root.addView(overlay.getView());
}
public void dismiss(String componentId, CommandListener listener) {
ViewController overlay = overlayRegistry.get(componentId);
if (overlay == null) {
listener.onError("Could not dismiss Overlay. Overlay with id " + componentId + " was not found.");
} else {
overlay.destroy();
overlayRegistry.remove(componentId);
listener.onSuccess(componentId);
}
}
public void destroy() {
for (ViewController view : overlayRegistry.values()) {
view.destroy();
}
overlayRegistry.clear();
}
public int size() {
return overlayRegistry.size();
}
}
|
40f903e489a026e2f98320af9276faa59075c3f3
|
build.sh
|
build.sh
|
set -x
# Cleanup
rm -fr debian-arm64
# Debootstrap a minimal Debian Jessie rootfs
# --keyring /usr/share/keyrings/debian-ports-archive-keyring.gpg \
# --no-check-gpg \
qemu-debootstrap \
--arch=arm64 \
--variant=buildd \
--exclude=debfoster \
--include=net-tools \
jessie \
debian-arm64 \
http://ftp.debian.org/debian
# set root password to 'hypriot'
echo 'root:hypriot' | sudo chroot debian-arm64 /usr/sbin/chpasswd
# Package rootfs tarball
tar -czf rootfs.tar.gz -C debian-arm64/ .
|
set -x
# Cleanup
rm -fr debian-arm64
# Debootstrap a minimal Debian Jessie rootfs
# --keyring /usr/share/keyrings/debian-ports-archive-keyring.gpg \
# --no-check-gpg \
# --variant=buildd \
qemu-debootstrap \
--arch=arm64 \
--exclude=debfoster \
--include=net-tools \
jessie \
debian-arm64 \
http://ftp.debian.org/debian
### HypriotOS specific settings ###
# set hostname to 'black-pearl'
echo 'black-pearl' | sudo chroot debian-arm64 tee /etc/hostname
# set root password to 'hypriot'
echo 'root:hypriot' | sudo chroot debian-arm64 /usr/sbin/chpasswd
# Package rootfs tarball
tar -czf rootfs.tar.gz -C debian-arm64/ .
|
Use debootstrap default variant to get networking
|
Use debootstrap default variant to get networking
|
Shell
|
mit
|
DieterReuter/make-roofs-debian-arm64
|
shell
|
## Code Before:
set -x
# Cleanup
rm -fr debian-arm64
# Debootstrap a minimal Debian Jessie rootfs
# --keyring /usr/share/keyrings/debian-ports-archive-keyring.gpg \
# --no-check-gpg \
qemu-debootstrap \
--arch=arm64 \
--variant=buildd \
--exclude=debfoster \
--include=net-tools \
jessie \
debian-arm64 \
http://ftp.debian.org/debian
# set root password to 'hypriot'
echo 'root:hypriot' | sudo chroot debian-arm64 /usr/sbin/chpasswd
# Package rootfs tarball
tar -czf rootfs.tar.gz -C debian-arm64/ .
## Instruction:
Use debootstrap default variant to get networking
## Code After:
set -x
# Cleanup
rm -fr debian-arm64
# Debootstrap a minimal Debian Jessie rootfs
# --keyring /usr/share/keyrings/debian-ports-archive-keyring.gpg \
# --no-check-gpg \
# --variant=buildd \
qemu-debootstrap \
--arch=arm64 \
--exclude=debfoster \
--include=net-tools \
jessie \
debian-arm64 \
http://ftp.debian.org/debian
### HypriotOS specific settings ###
# set hostname to 'black-pearl'
echo 'black-pearl' | sudo chroot debian-arm64 tee /etc/hostname
# set root password to 'hypriot'
echo 'root:hypriot' | sudo chroot debian-arm64 /usr/sbin/chpasswd
# Package rootfs tarball
tar -czf rootfs.tar.gz -C debian-arm64/ .
|
f221a1da89188319da5d89a049340047d6b43c1b
|
templates/home.html
|
templates/home.html
|
{% extends "base.html" %}
{% block title %}Budget{% endblock %}
{% block content %}
<ul class="unstyled">
{% for budget in budgets %}
<li>
<h2>{{ budget.title|e }} <small>{{ budget.description|e }}</small></h2>
<table class="table table-striped table-hover">
{% for key, item in budget.items %}
<tr>
<td>{{ item.description|e }}</td>
<td>
<form method="post" action="/budgets/{{budget._id}}/transactions/{{key}}">
<input type="hidden" name="_METHOD" value="DELETE" />
{{ item.amount|number_format(2)|e }}
<button class="close">×</button>
</form>
</td>
</tr>
{%endfor %}
<tr>
<form method="post" action="/budgets/{{budget._id}}/transactions">
<td><input type="text" class="input-block-level" name="description" placeholder="Description" /></td>
<td class="input-append">
<input type="text" name="amount" placeholder="Amount" />
<button type="submit" class="btn">Save</button>
</td>
</form>
</tr>
<tr class="{% if budget.overrun %}error{% else %}info{% endif %}">
<td></td>
<td class="span1">{{ budget.total|number_format(2)|e }}</td>
</tr>
</table>
</li>
{% endfor %}
</ul>
{% endblock %}
|
{% extends "base.html" %}
{% block title %}Budget{% endblock %}
{% block content %}
<ul class="unstyled">
{% for budget in budgets %}
<li>
<h2>{{ budget.title|e }} <small>{{ budget.description|e }}</small></h2>
<table class="table table-striped table-hover">
{% for key, item in budget.items %}
<tr>
<td>{{ item.description|e }}</td>
<td>
<form method="post" action="/budgets/{{budget._id}}/transactions/{{key}}">
<input type="hidden" name="_METHOD" value="DELETE" />
{{ item.amount|number_format(2)|e }}
<button class="close">×</button>
</form>
</td>
</tr>
{%endfor %}
<tr>
<form method="post" action="/budgets/{{budget._id}}/transactions">
<td><input type="text" class="input-block-level" name="description" placeholder="Description" /></td>
<td class="input-append">
<input type="number" step="0.01" name="amount" placeholder="Amount" />
<button type="submit" class="btn">Save</button>
</td>
</form>
</tr>
<tr class="{% if budget.overrun %}error{% else %}info{% endif %}">
<td></td>
<td class="span1">{{ budget.total|number_format(2)|e }}</td>
</tr>
</table>
</li>
{% endfor %}
</ul>
{% endblock %}
|
Change amount input to a number input.
|
Change amount input to a number input.
|
HTML
|
mit
|
nubs/budget
|
html
|
## Code Before:
{% extends "base.html" %}
{% block title %}Budget{% endblock %}
{% block content %}
<ul class="unstyled">
{% for budget in budgets %}
<li>
<h2>{{ budget.title|e }} <small>{{ budget.description|e }}</small></h2>
<table class="table table-striped table-hover">
{% for key, item in budget.items %}
<tr>
<td>{{ item.description|e }}</td>
<td>
<form method="post" action="/budgets/{{budget._id}}/transactions/{{key}}">
<input type="hidden" name="_METHOD" value="DELETE" />
{{ item.amount|number_format(2)|e }}
<button class="close">×</button>
</form>
</td>
</tr>
{%endfor %}
<tr>
<form method="post" action="/budgets/{{budget._id}}/transactions">
<td><input type="text" class="input-block-level" name="description" placeholder="Description" /></td>
<td class="input-append">
<input type="text" name="amount" placeholder="Amount" />
<button type="submit" class="btn">Save</button>
</td>
</form>
</tr>
<tr class="{% if budget.overrun %}error{% else %}info{% endif %}">
<td></td>
<td class="span1">{{ budget.total|number_format(2)|e }}</td>
</tr>
</table>
</li>
{% endfor %}
</ul>
{% endblock %}
## Instruction:
Change amount input to a number input.
## Code After:
{% extends "base.html" %}
{% block title %}Budget{% endblock %}
{% block content %}
<ul class="unstyled">
{% for budget in budgets %}
<li>
<h2>{{ budget.title|e }} <small>{{ budget.description|e }}</small></h2>
<table class="table table-striped table-hover">
{% for key, item in budget.items %}
<tr>
<td>{{ item.description|e }}</td>
<td>
<form method="post" action="/budgets/{{budget._id}}/transactions/{{key}}">
<input type="hidden" name="_METHOD" value="DELETE" />
{{ item.amount|number_format(2)|e }}
<button class="close">×</button>
</form>
</td>
</tr>
{%endfor %}
<tr>
<form method="post" action="/budgets/{{budget._id}}/transactions">
<td><input type="text" class="input-block-level" name="description" placeholder="Description" /></td>
<td class="input-append">
<input type="number" step="0.01" name="amount" placeholder="Amount" />
<button type="submit" class="btn">Save</button>
</td>
</form>
</tr>
<tr class="{% if budget.overrun %}error{% else %}info{% endif %}">
<td></td>
<td class="span1">{{ budget.total|number_format(2)|e }}</td>
</tr>
</table>
</li>
{% endfor %}
</ul>
{% endblock %}
|
688f8421172de6b964eec54e182cd73915eec898
|
sequel-annotate.gemspec
|
sequel-annotate.gemspec
|
spec = Gem::Specification.new do |s|
s.name = 'sequel-annotate'
s.version = '1.2.0'
s.platform = Gem::Platform::RUBY
s.has_rdoc = true
s.extra_rdoc_files = ["README.rdoc", "CHANGELOG", "MIT-LICENSE"]
s.rdoc_options += ["--quiet", "--line-numbers", "--inline-source", '--title', 'sequel-annotate: Annotate Sequel models with schema information', '--main', 'README.rdoc']
s.license = "MIT"
s.summary = "Annotate Sequel models with schema information"
s.author = "Jeremy Evans"
s.email = "[email protected]"
s.homepage = "http://github.com/jeremyevans/sequel-annotate"
s.files = %w(MIT-LICENSE CHANGELOG README.rdoc Rakefile) + Dir["{spec,lib}/**/*.rb"]
s.required_ruby_version = ">= 1.8.7"
s.description = <<END
sequel-annotate annotates Sequel models with schema information. By
default, it includes information on columns, indexes, and foreign key
constraints for the current table.
On PostgreSQL, this includes more advanced information, including
check constraints, triggers, and foreign keys constraints for other
tables that reference the current table.
END
s.add_dependency('sequel', '>= 4')
s.add_development_dependency('minitest', '>= 5')
s.add_development_dependency('pg')
s.add_development_dependency('sqlite3')
end
|
spec = Gem::Specification.new do |s|
s.name = 'sequel-annotate'
s.version = '1.2.0'
s.platform = Gem::Platform::RUBY
s.extra_rdoc_files = ["README.rdoc", "CHANGELOG", "MIT-LICENSE"]
s.rdoc_options += ["--quiet", "--line-numbers", "--inline-source", '--title', 'sequel-annotate: Annotate Sequel models with schema information', '--main', 'README.rdoc']
s.license = "MIT"
s.summary = "Annotate Sequel models with schema information"
s.author = "Jeremy Evans"
s.email = "[email protected]"
s.homepage = "http://github.com/jeremyevans/sequel-annotate"
s.files = %w(MIT-LICENSE CHANGELOG README.rdoc Rakefile) + Dir["{spec,lib}/**/*.rb"]
s.required_ruby_version = ">= 1.8.7"
s.description = <<END
sequel-annotate annotates Sequel models with schema information. By
default, it includes information on columns, indexes, and foreign key
constraints for the current table.
On PostgreSQL, this includes more advanced information, including
check constraints, triggers, and foreign keys constraints for other
tables that reference the current table.
END
s.add_dependency('sequel', '>= 4')
s.add_development_dependency('minitest', '>= 5')
s.add_development_dependency('pg')
s.add_development_dependency('sqlite3')
end
|
Remove has_rdoc from gemspec, since it is deprecated
|
Remove has_rdoc from gemspec, since it is deprecated
|
Ruby
|
mit
|
jeremyevans/sequel-annotate
|
ruby
|
## Code Before:
spec = Gem::Specification.new do |s|
s.name = 'sequel-annotate'
s.version = '1.2.0'
s.platform = Gem::Platform::RUBY
s.has_rdoc = true
s.extra_rdoc_files = ["README.rdoc", "CHANGELOG", "MIT-LICENSE"]
s.rdoc_options += ["--quiet", "--line-numbers", "--inline-source", '--title', 'sequel-annotate: Annotate Sequel models with schema information', '--main', 'README.rdoc']
s.license = "MIT"
s.summary = "Annotate Sequel models with schema information"
s.author = "Jeremy Evans"
s.email = "[email protected]"
s.homepage = "http://github.com/jeremyevans/sequel-annotate"
s.files = %w(MIT-LICENSE CHANGELOG README.rdoc Rakefile) + Dir["{spec,lib}/**/*.rb"]
s.required_ruby_version = ">= 1.8.7"
s.description = <<END
sequel-annotate annotates Sequel models with schema information. By
default, it includes information on columns, indexes, and foreign key
constraints for the current table.
On PostgreSQL, this includes more advanced information, including
check constraints, triggers, and foreign keys constraints for other
tables that reference the current table.
END
s.add_dependency('sequel', '>= 4')
s.add_development_dependency('minitest', '>= 5')
s.add_development_dependency('pg')
s.add_development_dependency('sqlite3')
end
## Instruction:
Remove has_rdoc from gemspec, since it is deprecated
## Code After:
spec = Gem::Specification.new do |s|
s.name = 'sequel-annotate'
s.version = '1.2.0'
s.platform = Gem::Platform::RUBY
s.extra_rdoc_files = ["README.rdoc", "CHANGELOG", "MIT-LICENSE"]
s.rdoc_options += ["--quiet", "--line-numbers", "--inline-source", '--title', 'sequel-annotate: Annotate Sequel models with schema information', '--main', 'README.rdoc']
s.license = "MIT"
s.summary = "Annotate Sequel models with schema information"
s.author = "Jeremy Evans"
s.email = "[email protected]"
s.homepage = "http://github.com/jeremyevans/sequel-annotate"
s.files = %w(MIT-LICENSE CHANGELOG README.rdoc Rakefile) + Dir["{spec,lib}/**/*.rb"]
s.required_ruby_version = ">= 1.8.7"
s.description = <<END
sequel-annotate annotates Sequel models with schema information. By
default, it includes information on columns, indexes, and foreign key
constraints for the current table.
On PostgreSQL, this includes more advanced information, including
check constraints, triggers, and foreign keys constraints for other
tables that reference the current table.
END
s.add_dependency('sequel', '>= 4')
s.add_development_dependency('minitest', '>= 5')
s.add_development_dependency('pg')
s.add_development_dependency('sqlite3')
end
|
3e23986c572f1489671b3bd2d17fc3e2ab450fef
|
src/Strategy/DailySchedule.php
|
src/Strategy/DailySchedule.php
|
<?php
namespace jjok\Switches\Strategy;
use DateTimeInterface as DateTime;
use jjok\Switches\Period;
use jjok\Switches\SwitchStrategy;
use jjok\Switches\Time;
final class DailySchedule implements SwitchStrategy
{
/**
* @var Period[]
*/
private $periods = [];
public function __construct(array $periods)
{
foreach($periods as $period) {
$this->addPeriod($period);
}
}
private function addPeriod(Period $period)
{
$this->periods[] = $period;
}
public function isOnAt(DateTime $dateTime) : bool
{
$time = Time::fromDateTime($dateTime);
foreach ($this->periods as $period) {
// if($period->includes($time)) {
if($time->isDuring($period)) {
return true;
}
}
return false;
}
}
|
<?php
namespace jjok\Switches\Strategy;
use DateTimeInterface as DateTime;
use jjok\Switches\Period;
use jjok\Switches\SwitchStrategy;
use jjok\Switches\Time;
use function array_walk;
final class DailySchedule implements SwitchStrategy
{
/**
* @var Period[]
*/
private $periods = [];
public function __construct(array $periods)
{
array_walk($periods, [$this, 'addPeriod']);
}
private function addPeriod(Period $period) : void
{
$this->periods[] = $period;
}
public function isOnAt(DateTime $dateTime) : bool
{
$time = Time::fromDateTime($dateTime);
foreach ($this->periods as $period) {
if($time->isDuring($period)) {
return true;
}
}
return false;
}
}
|
Use array_walk instead of loop
|
Use array_walk instead of loop
|
PHP
|
mit
|
jjok/Scheduler
|
php
|
## Code Before:
<?php
namespace jjok\Switches\Strategy;
use DateTimeInterface as DateTime;
use jjok\Switches\Period;
use jjok\Switches\SwitchStrategy;
use jjok\Switches\Time;
final class DailySchedule implements SwitchStrategy
{
/**
* @var Period[]
*/
private $periods = [];
public function __construct(array $periods)
{
foreach($periods as $period) {
$this->addPeriod($period);
}
}
private function addPeriod(Period $period)
{
$this->periods[] = $period;
}
public function isOnAt(DateTime $dateTime) : bool
{
$time = Time::fromDateTime($dateTime);
foreach ($this->periods as $period) {
// if($period->includes($time)) {
if($time->isDuring($period)) {
return true;
}
}
return false;
}
}
## Instruction:
Use array_walk instead of loop
## Code After:
<?php
namespace jjok\Switches\Strategy;
use DateTimeInterface as DateTime;
use jjok\Switches\Period;
use jjok\Switches\SwitchStrategy;
use jjok\Switches\Time;
use function array_walk;
final class DailySchedule implements SwitchStrategy
{
/**
* @var Period[]
*/
private $periods = [];
public function __construct(array $periods)
{
array_walk($periods, [$this, 'addPeriod']);
}
private function addPeriod(Period $period) : void
{
$this->periods[] = $period;
}
public function isOnAt(DateTime $dateTime) : bool
{
$time = Time::fromDateTime($dateTime);
foreach ($this->periods as $period) {
if($time->isDuring($period)) {
return true;
}
}
return false;
}
}
|
54c994e8dfcbfd98256ded0b458cabb4febedbaf
|
src/Exception/InvalidOptionValue.php
|
src/Exception/InvalidOptionValue.php
|
<?php
namespace AmpProject\Exception;
use InvalidArgumentException;
/**
* Exception thrown when an invalid option value was provided.
*
* @package ampproject/amp-toolbox
*/
final class InvalidOptionValue extends InvalidArgumentException implements AmpException
{
/**
* Instantiate an InvalidOptionValue exception for an invalid option value.
*
* @param string $option Name of the option.
* @param array<string> $accepted Array of acceptable values.
* @param string $actual Value that was actually provided.
* @return self
*/
public static function forValue($option, $accepted, $actual)
{
$acceptedString = implode(', ', $accepted);
$message = "The value for the option '{$option}' expected the value to be one of "
. "[{$acceptedString}], got '{$actual}' instead.";
return new self($message);
}
}
|
<?php
namespace AmpProject\Exception;
use DomainException;
/**
* Exception thrown when an invalid option value was provided.
*
* @package ampproject/amp-toolbox
*/
final class InvalidOptionValue extends DomainException implements AmpException
{
/**
* Instantiate an InvalidOptionValue exception for an invalid option value.
*
* @param string $option Name of the option.
* @param array<string> $accepted Array of acceptable values.
* @param string $actual Value that was actually provided.
* @return self
*/
public static function forValue($option, $accepted, $actual)
{
$acceptedString = implode(', ', $accepted);
$message = "The value for the option '{$option}' expected the value to be one of "
. "[{$acceptedString}], got '{$actual}' instead.";
return new self($message);
}
}
|
Extend DomainException instead of InvalidArgumentException
|
Extend DomainException instead of InvalidArgumentException
|
PHP
|
apache-2.0
|
ampproject/amp-toolbox-php,ampproject/amp-toolbox-php
|
php
|
## Code Before:
<?php
namespace AmpProject\Exception;
use InvalidArgumentException;
/**
* Exception thrown when an invalid option value was provided.
*
* @package ampproject/amp-toolbox
*/
final class InvalidOptionValue extends InvalidArgumentException implements AmpException
{
/**
* Instantiate an InvalidOptionValue exception for an invalid option value.
*
* @param string $option Name of the option.
* @param array<string> $accepted Array of acceptable values.
* @param string $actual Value that was actually provided.
* @return self
*/
public static function forValue($option, $accepted, $actual)
{
$acceptedString = implode(', ', $accepted);
$message = "The value for the option '{$option}' expected the value to be one of "
. "[{$acceptedString}], got '{$actual}' instead.";
return new self($message);
}
}
## Instruction:
Extend DomainException instead of InvalidArgumentException
## Code After:
<?php
namespace AmpProject\Exception;
use DomainException;
/**
* Exception thrown when an invalid option value was provided.
*
* @package ampproject/amp-toolbox
*/
final class InvalidOptionValue extends DomainException implements AmpException
{
/**
* Instantiate an InvalidOptionValue exception for an invalid option value.
*
* @param string $option Name of the option.
* @param array<string> $accepted Array of acceptable values.
* @param string $actual Value that was actually provided.
* @return self
*/
public static function forValue($option, $accepted, $actual)
{
$acceptedString = implode(', ', $accepted);
$message = "The value for the option '{$option}' expected the value to be one of "
. "[{$acceptedString}], got '{$actual}' instead.";
return new self($message);
}
}
|
f24d3bbd9bd5bdfdfaf939bf795f5c4ad490e8dd
|
src/waypoints_reader/scripts/yaml_reader.py
|
src/waypoints_reader/scripts/yaml_reader.py
|
import yaml
import rospy
from goal_sender_msgs.msg import GoalSequence
from goal_sender_msgs.msg import Waypoint
def read_yaml(path):
f = open(path, 'r')
waypoints = yaml.load(f)
f.close()
return waypoints
def pub_data():
pub = rospy.Publisher('goal_sequence', GoalSequence, queue_size=10)
rospy.init_node('yaml_reader', anonymous=True)
msg = GoalSequence()
for waypoint_data in read_yaml(rospy.get_param('~path', 'waypoints.yaml')):
waypoint = Waypoint(name = waypoint_data.get('name', ""),
x = waypoint_data['x'], # required
y = waypoint_data['y'], # required
radius = waypoint_data['radius'], # required
importance = waypoint_data.get('importance', 0),
drag = waypoint_data.get('drag', 0))
msg.waypoints.append(waypoint)
pub.publish(msg)
if __name__ == '__main__':
try:
pub_data()
except rospy.ROSInterruptException:
pass
|
import yaml
import rospy
from goal_sender_msgs.srv import ApplyGoals
from goal_sender_msgs.msg import GoalSequence
from goal_sender_msgs.msg import Waypoint
def read_yaml(path):
f = open(path, 'r')
waypoints = yaml.load(f)
f.close()
return waypoints
def get_waypoints():
sequence = GoalSequence()
for waypoint_data in read_yaml(rospy.get_param('~path', 'waypoints.yaml')):
waypoint = Waypoint(name = waypoint_data.get('name', ""),
x = waypoint_data['x'], # required
y = waypoint_data['y'], # required
radius = waypoint_data['radius'], # required
importance = waypoint_data.get('importance', 0),
drag = waypoint_data.get('drag', 0))
sequence.waypoints.append(waypoint)
return sequence
if __name__ == '__main__':
rospy.init_node('yaml_reader', anonymous=True)
goal_sequence = get_waypoints()
rospy.wait_for_service('apply_goals')
try:
apply_goals = rospy.ServiceProxy('apply_goals', ApplyGoals)
resp = apply_goals(goal_sequence)
print resp.message
except rospy.ServiceException, e:
print e
|
Change goals passage with service (from message)
|
Change goals passage with service (from message)
|
Python
|
bsd-3-clause
|
CIR-KIT/fifth_robot_pkg,CIR-KIT/fifth_robot_pkg,CIR-KIT/fifth_robot_pkg
|
python
|
## Code Before:
import yaml
import rospy
from goal_sender_msgs.msg import GoalSequence
from goal_sender_msgs.msg import Waypoint
def read_yaml(path):
f = open(path, 'r')
waypoints = yaml.load(f)
f.close()
return waypoints
def pub_data():
pub = rospy.Publisher('goal_sequence', GoalSequence, queue_size=10)
rospy.init_node('yaml_reader', anonymous=True)
msg = GoalSequence()
for waypoint_data in read_yaml(rospy.get_param('~path', 'waypoints.yaml')):
waypoint = Waypoint(name = waypoint_data.get('name', ""),
x = waypoint_data['x'], # required
y = waypoint_data['y'], # required
radius = waypoint_data['radius'], # required
importance = waypoint_data.get('importance', 0),
drag = waypoint_data.get('drag', 0))
msg.waypoints.append(waypoint)
pub.publish(msg)
if __name__ == '__main__':
try:
pub_data()
except rospy.ROSInterruptException:
pass
## Instruction:
Change goals passage with service (from message)
## Code After:
import yaml
import rospy
from goal_sender_msgs.srv import ApplyGoals
from goal_sender_msgs.msg import GoalSequence
from goal_sender_msgs.msg import Waypoint
def read_yaml(path):
f = open(path, 'r')
waypoints = yaml.load(f)
f.close()
return waypoints
def get_waypoints():
sequence = GoalSequence()
for waypoint_data in read_yaml(rospy.get_param('~path', 'waypoints.yaml')):
waypoint = Waypoint(name = waypoint_data.get('name', ""),
x = waypoint_data['x'], # required
y = waypoint_data['y'], # required
radius = waypoint_data['radius'], # required
importance = waypoint_data.get('importance', 0),
drag = waypoint_data.get('drag', 0))
sequence.waypoints.append(waypoint)
return sequence
if __name__ == '__main__':
rospy.init_node('yaml_reader', anonymous=True)
goal_sequence = get_waypoints()
rospy.wait_for_service('apply_goals')
try:
apply_goals = rospy.ServiceProxy('apply_goals', ApplyGoals)
resp = apply_goals(goal_sequence)
print resp.message
except rospy.ServiceException, e:
print e
|
9eeea85643d0c1fa6e64263deef6191a88211f0b
|
.travis.yml
|
.travis.yml
|
language: php
dist: trusty
sudo: false
php:
- 7.2
branches:
- master
before_script:
#- pecl install channel://pecl.php.net/pthreads-3.1.6
- git clone https://github.com/krakjoe/pthreads.git --depth=1
- cd pthreads
- phpize
- ./configure
- make
- make install
- cd ..
- echo "extension=pthreads.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo | pecl install channel://pecl.php.net/yaml-2.0.2
- git clone --recursive https://github.com/pmmp/PocketMine-MP.git --depth=1
- cd PocketMine-MP
- mkdir plugins
- cd plugins
- wget -O DevTools.phar https://poggit.pmmp.io/r/10317/PocketMine-DevTools.phar
- cd /home/travis/build/robske110/SignServerStats/
- cp -rf Travis.php PocketMine-MP/
- cd PocketMine-MP
script:
- php Travis.php
notifications:
email: false
|
language: php
dist: trusty
sudo: false
php:
- 7.2
branches:
- master
before_script:
#- pecl install channel://pecl.php.net/pthreads-3.1.6
- git clone https://github.com/krakjoe/pthreads.git --depth=1
- cd pthreads
- phpize
- ./configure
- make
- make install
- cd ..
- echo "extension=pthreads.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo | pecl install channel://pecl.php.net/yaml-2.0.2
- git clone --recursive https://github.com/pmmp/PocketMine-MP.git --depth=1
- cd PocketMine-MP
- composer install
- mkdir plugins
- cd plugins
- wget -O DevTools.phar https://jenkins.pmmp.io/job/PocketMine-MP/lastSuccessfulBuild/artifact/DevTools.phar
- cd /home/travis/build/robske110/SignServerStats/
- cp -rf Travis.php PocketMine-MP/
- cd PocketMine-MP
script:
- php Travis.php
notifications:
email: false
|
Fix composer need; update DevTools link
|
Travis: Fix composer need; update DevTools link
|
YAML
|
mit
|
robske110/SignServerStats
|
yaml
|
## Code Before:
language: php
dist: trusty
sudo: false
php:
- 7.2
branches:
- master
before_script:
#- pecl install channel://pecl.php.net/pthreads-3.1.6
- git clone https://github.com/krakjoe/pthreads.git --depth=1
- cd pthreads
- phpize
- ./configure
- make
- make install
- cd ..
- echo "extension=pthreads.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo | pecl install channel://pecl.php.net/yaml-2.0.2
- git clone --recursive https://github.com/pmmp/PocketMine-MP.git --depth=1
- cd PocketMine-MP
- mkdir plugins
- cd plugins
- wget -O DevTools.phar https://poggit.pmmp.io/r/10317/PocketMine-DevTools.phar
- cd /home/travis/build/robske110/SignServerStats/
- cp -rf Travis.php PocketMine-MP/
- cd PocketMine-MP
script:
- php Travis.php
notifications:
email: false
## Instruction:
Travis: Fix composer need; update DevTools link
## Code After:
language: php
dist: trusty
sudo: false
php:
- 7.2
branches:
- master
before_script:
#- pecl install channel://pecl.php.net/pthreads-3.1.6
- git clone https://github.com/krakjoe/pthreads.git --depth=1
- cd pthreads
- phpize
- ./configure
- make
- make install
- cd ..
- echo "extension=pthreads.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo | pecl install channel://pecl.php.net/yaml-2.0.2
- git clone --recursive https://github.com/pmmp/PocketMine-MP.git --depth=1
- cd PocketMine-MP
- composer install
- mkdir plugins
- cd plugins
- wget -O DevTools.phar https://jenkins.pmmp.io/job/PocketMine-MP/lastSuccessfulBuild/artifact/DevTools.phar
- cd /home/travis/build/robske110/SignServerStats/
- cp -rf Travis.php PocketMine-MP/
- cd PocketMine-MP
script:
- php Travis.php
notifications:
email: false
|
a6fe52278d4ff6c35e4775e9bf9cbdcef97a613d
|
src/main/java/info/u_team/u_team_core/util/registry/ClientRegistry.java
|
src/main/java/info/u_team/u_team_core/util/registry/ClientRegistry.java
|
package info.u_team.u_team_core.util.registry;
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.entity.*;
import net.minecraft.tileentity.*;
import net.minecraftforge.api.distmarker.*;
import net.minecraftforge.fml.client.registry.*;
@OnlyIn(Dist.CLIENT)
public class ClientRegistry {
public static <T extends Entity> void registerEntityRenderer(EntityType<T> clazz, IRenderFactory<? super T> rendererFactory) {
RenderingRegistry.registerEntityRenderingHandler(clazz, rendererFactory);
}
public static <T extends TileEntity> void registerSpecialTileEntityRenderer(TileEntityType<T> clazz, TileEntityRenderer<? super T> renderer) {
net.minecraftforge.fml.client.registry.ClientRegistry.bindTileEntityRenderer(clazz, renderer);
}
public static void registerKeybinding(KeyBinding key) {
net.minecraftforge.fml.client.registry.ClientRegistry.registerKeyBinding(key);
}
}
|
package info.u_team.u_team_core.util.registry;
import java.util.function.Function;
import net.minecraft.client.renderer.tileentity.*;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.entity.*;
import net.minecraft.tileentity.*;
import net.minecraftforge.api.distmarker.*;
import net.minecraftforge.fml.client.registry.*;
@OnlyIn(Dist.CLIENT)
public class ClientRegistry {
public static <T extends Entity> void registerEntityRenderer(EntityType<T> clazz, IRenderFactory<? super T> rendererFactory) {
RenderingRegistry.registerEntityRenderingHandler(clazz, rendererFactory);
}
public static <T extends TileEntity> void registerSpecialTileEntityRenderer(TileEntityType<T> clazz, TileEntityRenderer<? super T> renderer) {
registerSpecialTileEntityRenderer(clazz, dispatcher -> renderer);
}
public static <T extends TileEntity> void registerSpecialTileEntityRenderer(TileEntityType<T> clazz, Function<? super TileEntityRendererDispatcher, ? extends TileEntityRenderer<? super T>> rendererFactory) {
net.minecraftforge.fml.client.registry.ClientRegistry.bindTileEntityRenderer(clazz, rendererFactory);
}
public static void registerKeybinding(KeyBinding key) {
net.minecraftforge.fml.client.registry.ClientRegistry.registerKeyBinding(key);
}
}
|
Fix changes in the registry of tile entity renderer in the latest forge updates (30.0.19)
|
Fix changes in the registry of tile entity renderer in the latest forge updates (30.0.19)
|
Java
|
apache-2.0
|
MC-U-Team/U-Team-Core,MC-U-Team/U-Team-Core
|
java
|
## Code Before:
package info.u_team.u_team_core.util.registry;
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.entity.*;
import net.minecraft.tileentity.*;
import net.minecraftforge.api.distmarker.*;
import net.minecraftforge.fml.client.registry.*;
@OnlyIn(Dist.CLIENT)
public class ClientRegistry {
public static <T extends Entity> void registerEntityRenderer(EntityType<T> clazz, IRenderFactory<? super T> rendererFactory) {
RenderingRegistry.registerEntityRenderingHandler(clazz, rendererFactory);
}
public static <T extends TileEntity> void registerSpecialTileEntityRenderer(TileEntityType<T> clazz, TileEntityRenderer<? super T> renderer) {
net.minecraftforge.fml.client.registry.ClientRegistry.bindTileEntityRenderer(clazz, renderer);
}
public static void registerKeybinding(KeyBinding key) {
net.minecraftforge.fml.client.registry.ClientRegistry.registerKeyBinding(key);
}
}
## Instruction:
Fix changes in the registry of tile entity renderer in the latest forge updates (30.0.19)
## Code After:
package info.u_team.u_team_core.util.registry;
import java.util.function.Function;
import net.minecraft.client.renderer.tileentity.*;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.entity.*;
import net.minecraft.tileentity.*;
import net.minecraftforge.api.distmarker.*;
import net.minecraftforge.fml.client.registry.*;
@OnlyIn(Dist.CLIENT)
public class ClientRegistry {
public static <T extends Entity> void registerEntityRenderer(EntityType<T> clazz, IRenderFactory<? super T> rendererFactory) {
RenderingRegistry.registerEntityRenderingHandler(clazz, rendererFactory);
}
public static <T extends TileEntity> void registerSpecialTileEntityRenderer(TileEntityType<T> clazz, TileEntityRenderer<? super T> renderer) {
registerSpecialTileEntityRenderer(clazz, dispatcher -> renderer);
}
public static <T extends TileEntity> void registerSpecialTileEntityRenderer(TileEntityType<T> clazz, Function<? super TileEntityRendererDispatcher, ? extends TileEntityRenderer<? super T>> rendererFactory) {
net.minecraftforge.fml.client.registry.ClientRegistry.bindTileEntityRenderer(clazz, rendererFactory);
}
public static void registerKeybinding(KeyBinding key) {
net.minecraftforge.fml.client.registry.ClientRegistry.registerKeyBinding(key);
}
}
|
64f790dfedb9f03afbc0d1ae3c31d42024551688
|
airline-web-archetype/src/main/resources/archetype-resources/src/main/java/AirlineRestClient.java
|
airline-web-archetype/src/main/resources/archetype-resources/src/main/java/AirlineRestClient.java
|
package ${package};
import edu.pdx.cs410J.web.HttpRequestHelper;
import java.io.IOException;
/**
* A helper class for accessing the rest client
*/
public class AirlineRestClient extends HttpRequestHelper
{
private static final String WEB_APP = "${artifactId}";
private static final String SERVLET = "flights";
private final String url;
/**
* Creates a client to the airline REST service running on the given host and port
* @param hostName The name of the host
* @param port The port
*/
public AirlineRestClient( String hostName, int port )
{
this.url = String.format( "http://%s:%d/%s/%s", hostName, port, WEB_APP, SERVLET );
}
/**
* Returns all keys and values from the server
*/
public Response getAllKeysAndValues() throws IOException
{
return get(this.url );
}
/**
* Returns all values for the given key
*/
public Response getValues( String key ) throws IOException
{
return get(this.url, "key", key);
}
public Response addKeyValuePair( String key, String value ) throws IOException
{
return post( this.url, "key", key, "value", value );
}
}
|
package ${package};
import edu.pdx.cs410J.web.HttpRequestHelper;
import java.io.IOException;
/**
* A helper class for accessing the rest client. Note that this class provides
* an example of how to make gets and posts to a URL. You'll need to change it
* to do something other than just send key/value pairs.
*/
public class AirlineRestClient extends HttpRequestHelper
{
private static final String WEB_APP = "${artifactId}";
private static final String SERVLET = "flights";
private final String url;
/**
* Creates a client to the airline REST service running on the given host and port
* @param hostName The name of the host
* @param port The port
*/
public AirlineRestClient( String hostName, int port )
{
this.url = String.format( "http://%s:%d/%s/%s", hostName, port, WEB_APP, SERVLET );
}
/**
* Returns all keys and values from the server
*/
public Response getAllKeysAndValues() throws IOException
{
return get(this.url );
}
/**
* Returns all values for the given key
*/
public Response getValues( String key ) throws IOException
{
return get(this.url, "key", key);
}
public Response addKeyValuePair( String key, String value ) throws IOException
{
return post( this.url, "key", key, "value", value );
}
}
|
Add a comment instructing the student to make changes to this code.
|
Add a comment instructing the student to make changes to this code.
|
Java
|
apache-2.0
|
DavidWhitlock/PortlandStateJava,DavidWhitlock/PortlandStateJava
|
java
|
## Code Before:
package ${package};
import edu.pdx.cs410J.web.HttpRequestHelper;
import java.io.IOException;
/**
* A helper class for accessing the rest client
*/
public class AirlineRestClient extends HttpRequestHelper
{
private static final String WEB_APP = "${artifactId}";
private static final String SERVLET = "flights";
private final String url;
/**
* Creates a client to the airline REST service running on the given host and port
* @param hostName The name of the host
* @param port The port
*/
public AirlineRestClient( String hostName, int port )
{
this.url = String.format( "http://%s:%d/%s/%s", hostName, port, WEB_APP, SERVLET );
}
/**
* Returns all keys and values from the server
*/
public Response getAllKeysAndValues() throws IOException
{
return get(this.url );
}
/**
* Returns all values for the given key
*/
public Response getValues( String key ) throws IOException
{
return get(this.url, "key", key);
}
public Response addKeyValuePair( String key, String value ) throws IOException
{
return post( this.url, "key", key, "value", value );
}
}
## Instruction:
Add a comment instructing the student to make changes to this code.
## Code After:
package ${package};
import edu.pdx.cs410J.web.HttpRequestHelper;
import java.io.IOException;
/**
* A helper class for accessing the rest client. Note that this class provides
* an example of how to make gets and posts to a URL. You'll need to change it
* to do something other than just send key/value pairs.
*/
public class AirlineRestClient extends HttpRequestHelper
{
private static final String WEB_APP = "${artifactId}";
private static final String SERVLET = "flights";
private final String url;
/**
* Creates a client to the airline REST service running on the given host and port
* @param hostName The name of the host
* @param port The port
*/
public AirlineRestClient( String hostName, int port )
{
this.url = String.format( "http://%s:%d/%s/%s", hostName, port, WEB_APP, SERVLET );
}
/**
* Returns all keys and values from the server
*/
public Response getAllKeysAndValues() throws IOException
{
return get(this.url );
}
/**
* Returns all values for the given key
*/
public Response getValues( String key ) throws IOException
{
return get(this.url, "key", key);
}
public Response addKeyValuePair( String key, String value ) throws IOException
{
return post( this.url, "key", key, "value", value );
}
}
|
840c54e5b6ab87078e9570dfc0adf73952c8c663
|
jbpm-container-test/jbpm-in-container-test/jbpm-container-test-suite/src/test/resources/org/jbpm/test/container/archive/localtransactions/tomcat-context.xml
|
jbpm-container-test/jbpm-in-container-test/jbpm-container-test-suite/src/test/resources/org/jbpm/test/container/archive/localtransactions/tomcat-context.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<!-- use standard Java delegation (parent-first) model -->
<Loader delegate="true" />
<Listener className="bitronix.tm.integration.tomcat55.BTMLifecycleListener" />
<Resource name="TransactionSynchronizationRegistry" auth="Container" type="javax.transaction.TransactionSynchronizationRegistry"
factory="bitronix.tm.BitronixTransactionSynchronizationRegistryObjectFactory" />
<Transaction factory="bitronix.tm.BitronixUserTransactionObjectFactory" />
</Context>
|
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<!--
Use non-standard Java delegation (parent-last) model because of jboss-logging, which on JWS is of version 3.1.4
while tests need at least version 3.2.0 because of Hibernate
-->
<Loader delegate="false"/>
<Listener className="bitronix.tm.integration.tomcat55.BTMLifecycleListener" />
<Resource name="TransactionSynchronizationRegistry" auth="Container" type="javax.transaction.TransactionSynchronizationRegistry"
factory="bitronix.tm.BitronixTransactionSynchronizationRegistryObjectFactory" />
<Transaction factory="bitronix.tm.BitronixUserTransactionObjectFactory" />
</Context>
|
Change Java delegation model from parent-first to parent-last on tomcat 8
|
Change Java delegation model from parent-first to parent-last on tomcat 8
|
XML
|
apache-2.0
|
jomarko/jbpm,ibek/jbpm,domhanak/jbpm,livthomas/jbpm,pleacu/jbpm,jomarko/jbpm,romartin/jbpm,jesuino/jbpm,livthomas/jbpm,domhanak/jbpm,jesuino/jbpm,DuncanDoyle/jbpm,domhanak/jbpm,droolsjbpm/jbpm,pleacu/jbpm,jomarko/jbpm,jakubschwan/jbpm,droolsjbpm/jbpm,jesuino/jbpm,DuncanDoyle/jbpm,livthomas/jbpm,jakubschwan/jbpm,DuncanDoyle/jbpm,jesuino/jbpm,ibek/jbpm,romartin/jbpm,jomarko/jbpm,droolsjbpm/jbpm,romartin/jbpm,romartin/jbpm,pleacu/jbpm,ibek/jbpm,jakubschwan/jbpm
|
xml
|
## Code Before:
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<!-- use standard Java delegation (parent-first) model -->
<Loader delegate="true" />
<Listener className="bitronix.tm.integration.tomcat55.BTMLifecycleListener" />
<Resource name="TransactionSynchronizationRegistry" auth="Container" type="javax.transaction.TransactionSynchronizationRegistry"
factory="bitronix.tm.BitronixTransactionSynchronizationRegistryObjectFactory" />
<Transaction factory="bitronix.tm.BitronixUserTransactionObjectFactory" />
</Context>
## Instruction:
Change Java delegation model from parent-first to parent-last on tomcat 8
## Code After:
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<!--
Use non-standard Java delegation (parent-last) model because of jboss-logging, which on JWS is of version 3.1.4
while tests need at least version 3.2.0 because of Hibernate
-->
<Loader delegate="false"/>
<Listener className="bitronix.tm.integration.tomcat55.BTMLifecycleListener" />
<Resource name="TransactionSynchronizationRegistry" auth="Container" type="javax.transaction.TransactionSynchronizationRegistry"
factory="bitronix.tm.BitronixTransactionSynchronizationRegistryObjectFactory" />
<Transaction factory="bitronix.tm.BitronixUserTransactionObjectFactory" />
</Context>
|
f2b1024f5b5074abc30a9db7b3a32de04d55ad41
|
Gruntfile.js
|
Gruntfile.js
|
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json')
});
};
|
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-screeps');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
screeps: {
options: {
email: '[email protected]',
password: 'mypassword',
branch: 'default',
ptr: false
},
dist: {
src: ['src/*.js']
}
}
});
};
|
Update gruntfile with screeps task
|
Update gruntfile with screeps task
|
JavaScript
|
mit
|
aregaz/Screeps
|
javascript
|
## Code Before:
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json')
});
};
## Instruction:
Update gruntfile with screeps task
## Code After:
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-screeps');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
screeps: {
options: {
email: '[email protected]',
password: 'mypassword',
branch: 'default',
ptr: false
},
dist: {
src: ['src/*.js']
}
}
});
};
|
c4c2845d2be318a3aaa23e1f279df9b2180add41
|
test/systems/test_skill_check.py
|
test/systems/test_skill_check.py
|
from roglick.engine.ecs import Entity,EntityManager
from roglick.components import SkillComponent,SkillSubComponent
from roglick.systems import SkillSystem
from roglick.engine import event
from roglick.events import SkillCheckEvent
def test_skill_check():
wins = 0
iters = 1000
em = EntityManager()
em.set_component(em.pc, SkillComponent())
skills = em.get_component(em.pc, SkillComponent)
# 7 has ~41% odds of success
skills.skills['Dagger'] = SkillSubComponent(7)
sys = SkillSystem()
sys.set_entity_manager(em)
event.register(sys)
for x in range(iters):
ch = SkillCheckEvent(em.pc, "Dagger")
event.dispatch(ch)
if ch.result[2]:
wins += 1
# Use a fudge factor, because random
assert wins >= (iters * 0.38)
assert wins <= (iters * 0.44)
|
from roglick.engine.ecs import Entity,EntityManager
from roglick.components import SkillComponent,SkillSubComponent
from roglick.systems import SkillSystem
from roglick.engine import event
from roglick.events import SkillCheckEvent
def test_skill_check():
wins = 0
iters = 1000
em = EntityManager()
em.set_component(em.pc, SkillComponent())
skills = em.get_component(em.pc, SkillComponent)
# 7 has ~41% odds of success
skills.skills['melee.swords.dagger'] = SkillSubComponent(7)
sys = SkillSystem()
sys.set_entity_manager(em)
event.register(sys)
for x in range(iters):
ch = SkillCheckEvent(em.pc, "melee.swords.dagger")
event.dispatch(ch)
if ch.result[2]:
wins += 1
# Use a fudge factor, because random
assert wins >= (iters * 0.38)
assert wins <= (iters * 0.44)
|
Fix tests to use new key structure
|
Fix tests to use new key structure
|
Python
|
mit
|
Kromey/roglick
|
python
|
## Code Before:
from roglick.engine.ecs import Entity,EntityManager
from roglick.components import SkillComponent,SkillSubComponent
from roglick.systems import SkillSystem
from roglick.engine import event
from roglick.events import SkillCheckEvent
def test_skill_check():
wins = 0
iters = 1000
em = EntityManager()
em.set_component(em.pc, SkillComponent())
skills = em.get_component(em.pc, SkillComponent)
# 7 has ~41% odds of success
skills.skills['Dagger'] = SkillSubComponent(7)
sys = SkillSystem()
sys.set_entity_manager(em)
event.register(sys)
for x in range(iters):
ch = SkillCheckEvent(em.pc, "Dagger")
event.dispatch(ch)
if ch.result[2]:
wins += 1
# Use a fudge factor, because random
assert wins >= (iters * 0.38)
assert wins <= (iters * 0.44)
## Instruction:
Fix tests to use new key structure
## Code After:
from roglick.engine.ecs import Entity,EntityManager
from roglick.components import SkillComponent,SkillSubComponent
from roglick.systems import SkillSystem
from roglick.engine import event
from roglick.events import SkillCheckEvent
def test_skill_check():
wins = 0
iters = 1000
em = EntityManager()
em.set_component(em.pc, SkillComponent())
skills = em.get_component(em.pc, SkillComponent)
# 7 has ~41% odds of success
skills.skills['melee.swords.dagger'] = SkillSubComponent(7)
sys = SkillSystem()
sys.set_entity_manager(em)
event.register(sys)
for x in range(iters):
ch = SkillCheckEvent(em.pc, "melee.swords.dagger")
event.dispatch(ch)
if ch.result[2]:
wins += 1
# Use a fudge factor, because random
assert wins >= (iters * 0.38)
assert wins <= (iters * 0.44)
|
9f76645be86cc3873b97ba6d705c4a22b7aae627
|
.github/ISSUE_TEMPLATE/config.yml
|
.github/ISSUE_TEMPLATE/config.yml
|
blank_issues_enabled: false
|
blank_issues_enabled: false
contact_links:
- name: Kubernetes Provider for Terraform Roadmap
url: https://github.com/terraform-providers/terraform-provider-kubernetes/blob/master/_about/ROADMAP.md
|
Add roadmap to issues template
|
Add roadmap to issues template
|
YAML
|
mpl-2.0
|
terraform-providers/terraform-provider-kubernetes,terraform-providers/terraform-provider-kubernetes,terraform-providers/terraform-provider-kubernetes
|
yaml
|
## Code Before:
blank_issues_enabled: false
## Instruction:
Add roadmap to issues template
## Code After:
blank_issues_enabled: false
contact_links:
- name: Kubernetes Provider for Terraform Roadmap
url: https://github.com/terraform-providers/terraform-provider-kubernetes/blob/master/_about/ROADMAP.md
|
6342917419c50a24849b9c15e345bb2e1c2bc664
|
src/views/platforms/html.js
|
src/views/platforms/html.js
|
var rootView = null;
export function isAttached(view) {
if (!view) throw new Error("'view' param is required.");
return view.parentElement !== null;
}
export function setRootView(view) {
if (!view) throw new Error("'view' param is required.");
rootView = view;
}
export function getRootView() {
return rootView;
}
export function pageAttacher(result) {
if (!rootView) return;
while (rootView.firstElementChild) {
rootView.removeChild(rootView.firstElementChild);
}
rootView.appendChild(result.view);
}
export function getAttachers() {
return {
page: pageAttacher
};
}
export function buildTextAsHtml(content) {
return new Promise(function (resolve, reject) {
var fileReader = new FileReader();
fileReader.onloadend = function (evt) {
var view = document.createElement("pre");
view.textContent = evt.target.result;
var result = { content, view };
resolve(result);
};
fileReader.readAsText(content.blob);
});
}
export function getBuilders() {
return {
text: {
mediaType: "text/*",
builder: buildTextAsHtml
}
};
}
|
var rootView = null;
export function isAttached(view) {
if (!view) throw new Error("'view' param is required.");
return view.parentElement !== null;
}
export function setRootView(view) {
if (!view) throw new Error("'view' param is required.");
rootView = view;
}
export function getRootView() {
return rootView;
}
export function rootAttacher(result) {
if (!rootView) return;
while (rootView.firstElementChild) {
rootView.removeChild(rootView.firstElementChild);
}
rootView.appendChild(result.view);
}
export function getAttachers() {
return [
{
name: "root",
attacher: rootAttacher
}
];
}
export function buildTextAsHtml(content) {
return new Promise(function (resolve, reject) {
var fileReader = new FileReader();
fileReader.onloadend = function (evt) {
var view = document.createElement("pre");
view.textContent = evt.target.result;
var result = { content, view };
resolve(result);
};
fileReader.readAsText(content.blob);
});
}
export function getBuilders() {
return [
{
mediaType: "text/*",
builder: buildTextAsHtml
}
];
}
|
Return Arrays Instead of Objects
|
Return Arrays Instead of Objects
|
JavaScript
|
mit
|
lynx-json/jsua
|
javascript
|
## Code Before:
var rootView = null;
export function isAttached(view) {
if (!view) throw new Error("'view' param is required.");
return view.parentElement !== null;
}
export function setRootView(view) {
if (!view) throw new Error("'view' param is required.");
rootView = view;
}
export function getRootView() {
return rootView;
}
export function pageAttacher(result) {
if (!rootView) return;
while (rootView.firstElementChild) {
rootView.removeChild(rootView.firstElementChild);
}
rootView.appendChild(result.view);
}
export function getAttachers() {
return {
page: pageAttacher
};
}
export function buildTextAsHtml(content) {
return new Promise(function (resolve, reject) {
var fileReader = new FileReader();
fileReader.onloadend = function (evt) {
var view = document.createElement("pre");
view.textContent = evt.target.result;
var result = { content, view };
resolve(result);
};
fileReader.readAsText(content.blob);
});
}
export function getBuilders() {
return {
text: {
mediaType: "text/*",
builder: buildTextAsHtml
}
};
}
## Instruction:
Return Arrays Instead of Objects
## Code After:
var rootView = null;
export function isAttached(view) {
if (!view) throw new Error("'view' param is required.");
return view.parentElement !== null;
}
export function setRootView(view) {
if (!view) throw new Error("'view' param is required.");
rootView = view;
}
export function getRootView() {
return rootView;
}
export function rootAttacher(result) {
if (!rootView) return;
while (rootView.firstElementChild) {
rootView.removeChild(rootView.firstElementChild);
}
rootView.appendChild(result.view);
}
export function getAttachers() {
return [
{
name: "root",
attacher: rootAttacher
}
];
}
export function buildTextAsHtml(content) {
return new Promise(function (resolve, reject) {
var fileReader = new FileReader();
fileReader.onloadend = function (evt) {
var view = document.createElement("pre");
view.textContent = evt.target.result;
var result = { content, view };
resolve(result);
};
fileReader.readAsText(content.blob);
});
}
export function getBuilders() {
return [
{
mediaType: "text/*",
builder: buildTextAsHtml
}
];
}
|
c2b7255ad92d98107652567badb508426a1e81b6
|
app/views/products/index.html.erb
|
app/views/products/index.html.erb
|
<p id="notice"><%= flash[:notice] %></p>
<%= form_tag search_products_path, method: :get do %>
<%= label_tag "name", "Search by product name:" %>
<%= text_field_tag "name" %>
<%= submit_tag"Search" %>
<% end %>
<h1>Listing Products</h1>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Cost</th>
<th>Stock</th>
</tr>
</thead>
<tbody>
<% @products.each do |product| %>
<tr>
<td><%= product.name %></td>
<td><%= product.description %></td>
<td><%= number_to_currency product.cost, unit: "PhP" %></td>
<td><%= product.stock %></td>
<td><%= link_to 'Show', product %></td>
</tr>
<% end %>
</tbody>
</table>
|
<p id="notice"><%= flash[:notice] %></p>
<%= form_tag search_products_path, method: :get do %>
<%= label_tag "name", "Search by product name:" %>
<%= text_field_tag "name" %>
<%= submit_tag"Search" %>
<% end %>
<h1>Listing Products</h1>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Cost</th>
<th>Stock</th>
</tr>
</thead>
<tbody>
<% @products.each do |product| %>
<tr>
<td><%= product.name %></td>
<td><%= product.description %></td>
<td><%= number_to_currency product.cost, unit: "PhP" %></td>
<td><%= product.stock %></td>
<td><%= link_to 'Show', product %></td>
</tr>
<% end %>
</tbody>
</table>
<p><%= link_to "Create a new Product", new_product_path %></p>
|
Add link to New Product
|
Add link to New Product
|
HTML+ERB
|
mit
|
bryanbibat/rasm40code,bryanbibat/rasm40code
|
html+erb
|
## Code Before:
<p id="notice"><%= flash[:notice] %></p>
<%= form_tag search_products_path, method: :get do %>
<%= label_tag "name", "Search by product name:" %>
<%= text_field_tag "name" %>
<%= submit_tag"Search" %>
<% end %>
<h1>Listing Products</h1>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Cost</th>
<th>Stock</th>
</tr>
</thead>
<tbody>
<% @products.each do |product| %>
<tr>
<td><%= product.name %></td>
<td><%= product.description %></td>
<td><%= number_to_currency product.cost, unit: "PhP" %></td>
<td><%= product.stock %></td>
<td><%= link_to 'Show', product %></td>
</tr>
<% end %>
</tbody>
</table>
## Instruction:
Add link to New Product
## Code After:
<p id="notice"><%= flash[:notice] %></p>
<%= form_tag search_products_path, method: :get do %>
<%= label_tag "name", "Search by product name:" %>
<%= text_field_tag "name" %>
<%= submit_tag"Search" %>
<% end %>
<h1>Listing Products</h1>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Cost</th>
<th>Stock</th>
</tr>
</thead>
<tbody>
<% @products.each do |product| %>
<tr>
<td><%= product.name %></td>
<td><%= product.description %></td>
<td><%= number_to_currency product.cost, unit: "PhP" %></td>
<td><%= product.stock %></td>
<td><%= link_to 'Show', product %></td>
</tr>
<% end %>
</tbody>
</table>
<p><%= link_to "Create a new Product", new_product_path %></p>
|
9e8fc76f0a8635b975654aa6b40d3d770617027d
|
.travis.yml
|
.travis.yml
|
language: ruby
before_install:
- gem install bundler -v '>= 1.5.1'
rvm:
- 1.9.3
- 2.0.0
- 2.1
- 2.2
- ruby-head
- jruby
gemfile:
- gemfiles/Gemfile.rails-4-0-stable
- gemfiles/Gemfile.rails-4-1-stable
- gemfiles/Gemfile.rails-4-2-stable
- Gemfile
notifications:
email: false
campfire:
on_success: change
on_failure: always
rooms:
- secure: "0UzWiVjxtaMsAiLCdK0p5ZIpWi94rmH71hbEQ3tuKTSSrsh9qW16cd39TS6i\nOdlSojcdzACanjIL8Z2qyG2DHScLBZAzWdDNWpnbtpJfDQ+p5ldDdbFmL6+5\n0t2nvv9uNQvhSOMD9ukdb7BFlRvd8Yq7zdjyAKt8efV2Abx7Msk="
|
sudo: false
cache: bundler
language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.1
- 2.2
- ruby-head
- jruby
gemfile:
- gemfiles/Gemfile.rails-4-0-stable
- gemfiles/Gemfile.rails-4-1-stable
- gemfiles/Gemfile.rails-4-2-stable
- gemfiles/Gemfile.rails-head
- Gemfile
exclude:
- rvm: 1.9.3
gemfile: gemfiles/Gemfile.rails-head
- rvm: 2.0.0
gemfile: gemfiles/Gemfile.rails-head
- rvm: 2.1
gemfile: gemfiles/Gemfile.rails-head
notifications:
email: false
campfire:
on_success: change
on_failure: always
rooms:
- secure: "0UzWiVjxtaMsAiLCdK0p5ZIpWi94rmH71hbEQ3tuKTSSrsh9qW16cd39TS6i\nOdlSojcdzACanjIL8Z2qyG2DHScLBZAzWdDNWpnbtpJfDQ+p5ldDdbFmL6+5\n0t2nvv9uNQvhSOMD9ukdb7BFlRvd8Yq7zdjyAKt8efV2Abx7Msk="
|
Tweak our build matrix for Rails 5.
|
Tweak our build matrix for Rails 5.
|
YAML
|
mit
|
plataformatec/simple_form,plataformatec/simple_form
|
yaml
|
## Code Before:
language: ruby
before_install:
- gem install bundler -v '>= 1.5.1'
rvm:
- 1.9.3
- 2.0.0
- 2.1
- 2.2
- ruby-head
- jruby
gemfile:
- gemfiles/Gemfile.rails-4-0-stable
- gemfiles/Gemfile.rails-4-1-stable
- gemfiles/Gemfile.rails-4-2-stable
- Gemfile
notifications:
email: false
campfire:
on_success: change
on_failure: always
rooms:
- secure: "0UzWiVjxtaMsAiLCdK0p5ZIpWi94rmH71hbEQ3tuKTSSrsh9qW16cd39TS6i\nOdlSojcdzACanjIL8Z2qyG2DHScLBZAzWdDNWpnbtpJfDQ+p5ldDdbFmL6+5\n0t2nvv9uNQvhSOMD9ukdb7BFlRvd8Yq7zdjyAKt8efV2Abx7Msk="
## Instruction:
Tweak our build matrix for Rails 5.
## Code After:
sudo: false
cache: bundler
language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.1
- 2.2
- ruby-head
- jruby
gemfile:
- gemfiles/Gemfile.rails-4-0-stable
- gemfiles/Gemfile.rails-4-1-stable
- gemfiles/Gemfile.rails-4-2-stable
- gemfiles/Gemfile.rails-head
- Gemfile
exclude:
- rvm: 1.9.3
gemfile: gemfiles/Gemfile.rails-head
- rvm: 2.0.0
gemfile: gemfiles/Gemfile.rails-head
- rvm: 2.1
gemfile: gemfiles/Gemfile.rails-head
notifications:
email: false
campfire:
on_success: change
on_failure: always
rooms:
- secure: "0UzWiVjxtaMsAiLCdK0p5ZIpWi94rmH71hbEQ3tuKTSSrsh9qW16cd39TS6i\nOdlSojcdzACanjIL8Z2qyG2DHScLBZAzWdDNWpnbtpJfDQ+p5ldDdbFmL6+5\n0t2nvv9uNQvhSOMD9ukdb7BFlRvd8Yq7zdjyAKt8efV2Abx7Msk="
|
b67b9d1de11dd8ef29bd22cbf82c1d40cbfd348c
|
public/index.html
|
public/index.html
|
<!doctype html>
<html lang="ja" data-framework="react">
<head>
<meta charset="utf-8">
<title>React • ALPS Console</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
</head>
<body>
<div class="container-fluid">
<div class="page-header">
<h1>ALPS Console</h1>
</div>
<div id="ConsoleApp"></div>
</div>
<footer class="info">
</footer>
<script src="bundle.js"></script>
</body>
</html>
|
<!doctype html>
<html lang="ja" data-framework="react">
<head>
<meta charset="utf-8">
<title>React • ALPS Console</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
</head>
<body>
<div class="container-fluid">
<div class="page-header">
<h1>ALPS Console</h1>
</div>
<div id="ConsoleApp"></div>
</div>
<footer class="info">
<a href="https://github.com/tkawa/alps-console"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a>
</footer>
<script src="bundle.js"></script>
</body>
</html>
|
Add GitHub 'Fork me' Ribbons
|
Add GitHub 'Fork me' Ribbons
|
HTML
|
mit
|
tkawa/alps-console,tkawa/alps-console
|
html
|
## Code Before:
<!doctype html>
<html lang="ja" data-framework="react">
<head>
<meta charset="utf-8">
<title>React • ALPS Console</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
</head>
<body>
<div class="container-fluid">
<div class="page-header">
<h1>ALPS Console</h1>
</div>
<div id="ConsoleApp"></div>
</div>
<footer class="info">
</footer>
<script src="bundle.js"></script>
</body>
</html>
## Instruction:
Add GitHub 'Fork me' Ribbons
## Code After:
<!doctype html>
<html lang="ja" data-framework="react">
<head>
<meta charset="utf-8">
<title>React • ALPS Console</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
</head>
<body>
<div class="container-fluid">
<div class="page-header">
<h1>ALPS Console</h1>
</div>
<div id="ConsoleApp"></div>
</div>
<footer class="info">
<a href="https://github.com/tkawa/alps-console"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a>
</footer>
<script src="bundle.js"></script>
</body>
</html>
|
46d95ea45973802d50bf39607f855c49c3c27e17
|
ie.tcd.imm.hits.update/site.xml
|
ie.tcd.imm.hits.update/site.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<site>
<description url="http://hits.googlecode.com/svn/trunk/ie.tcd.imm.hits.update/">
HiTS official update iste
</description>
<feature url="file://///med177068.college.tcd.ie/Test/features/ie.tcd.imm.hits.feature_0.1.0.jar" id="ie.tcd.imm.hits.feature" version="0.1.0">
<category name="HiTS"/>
</feature>
<archive path="plugins/ie.tcd.imm.hits.3rdparty_0.1.0.jar" url="file://///med177068.college.tcd.ie/Test/plugins/ie.tcd.imm.hits.3rdparty_0.1.0.jar"/>
<archive path="plugins/ie.tcd.imm.hits_0.1.0.jar" url="file://///med177068.college.tcd.ie/Test/plugins/ie.tcd.imm.hits_0.1.0.jar"/>
<category-def name="HiTS" label="HiTS">
<description>
Contains the nodes, and the non-standard dependencies.
</description>
</category-def>
</site>
|
<?xml version="1.0" encoding="UTF-8"?>
<site>
<description url="http://hits.googlecode.com/svn/trunk/ie.tcd.imm.hits.update/">
HiTS official update iste
</description>
<feature url="http://hits.googlecode.com/files/ie.tcd.imm.hits.feature_0.1.0.jar" id="ie.tcd.imm.hits.feature" version="0.1.0">
<category name="HiTS"/>
</feature>
<archive path="plugins/ie.tcd.imm.hits.3rdparty_0.1.0.jar" url="http://hits.googlecode.com/files/ie.tcd.imm.hits.3rdparty_0.1.0.jar"/>
<archive path="plugins/ie.tcd.imm.hits_0.1.0.jar" url="http://hits.googlecode.com/files/ie.tcd.imm.hits_0.1.0.jar"/>
<category-def name="HiTS" label="HiTS main">
<description>
Contains the nodes, and the non-standard dependencies.
</description>
</category-def>
</site>
|
Update to link to the uploaded jars.
|
Update to link to the uploaded jars.
|
XML
|
apache-2.0
|
aborg0/hits,aborg0/hits
|
xml
|
## Code Before:
<?xml version="1.0" encoding="UTF-8"?>
<site>
<description url="http://hits.googlecode.com/svn/trunk/ie.tcd.imm.hits.update/">
HiTS official update iste
</description>
<feature url="file://///med177068.college.tcd.ie/Test/features/ie.tcd.imm.hits.feature_0.1.0.jar" id="ie.tcd.imm.hits.feature" version="0.1.0">
<category name="HiTS"/>
</feature>
<archive path="plugins/ie.tcd.imm.hits.3rdparty_0.1.0.jar" url="file://///med177068.college.tcd.ie/Test/plugins/ie.tcd.imm.hits.3rdparty_0.1.0.jar"/>
<archive path="plugins/ie.tcd.imm.hits_0.1.0.jar" url="file://///med177068.college.tcd.ie/Test/plugins/ie.tcd.imm.hits_0.1.0.jar"/>
<category-def name="HiTS" label="HiTS">
<description>
Contains the nodes, and the non-standard dependencies.
</description>
</category-def>
</site>
## Instruction:
Update to link to the uploaded jars.
## Code After:
<?xml version="1.0" encoding="UTF-8"?>
<site>
<description url="http://hits.googlecode.com/svn/trunk/ie.tcd.imm.hits.update/">
HiTS official update iste
</description>
<feature url="http://hits.googlecode.com/files/ie.tcd.imm.hits.feature_0.1.0.jar" id="ie.tcd.imm.hits.feature" version="0.1.0">
<category name="HiTS"/>
</feature>
<archive path="plugins/ie.tcd.imm.hits.3rdparty_0.1.0.jar" url="http://hits.googlecode.com/files/ie.tcd.imm.hits.3rdparty_0.1.0.jar"/>
<archive path="plugins/ie.tcd.imm.hits_0.1.0.jar" url="http://hits.googlecode.com/files/ie.tcd.imm.hits_0.1.0.jar"/>
<category-def name="HiTS" label="HiTS main">
<description>
Contains the nodes, and the non-standard dependencies.
</description>
</category-def>
</site>
|
0397724420b14c35c7cd88dc6580bf780c2509e4
|
rts/c/tuning.h
|
rts/c/tuning.h
|
// Start of tuning.h.
static char* load_tuning_file(const char *fname,
void *cfg,
int (*set_size)(void*, const char*, size_t)) {
const int max_line_len = 1024;
char* line = (char*) malloc(max_line_len);
FILE *f = fopen(fname, "r");
if (f == NULL) {
snprintf(line, max_line_len, "Cannot open file: %s", strerror(errno));
return line;
}
int lineno = 0;
while (fgets(line, max_line_len, f) != NULL) {
lineno++;
char *eql = strstr(line, "=");
if (eql) {
*eql = 0;
int value = atoi(eql+1);
if (set_size(cfg, line, value) != 0) {
strncpy(eql+1, line, max_line_len-strlen(line)-1);
snprintf(line, max_line_len, "Unknown name '%s' on line %d.", eql+1, lineno);
return line;
}
} else {
snprintf(line, max_line_len, "Invalid line %d (must be of form 'name=int').",
lineno);
return line;
}
}
free(line);
return NULL;
}
// End of tuning.h.
|
// Start of tuning.h.
static char* load_tuning_file(const char *fname,
void *cfg,
int (*set_size)(void*, const char*, size_t)) {
const int max_line_len = 1024;
char* line = (char*) malloc(max_line_len);
FILE *f = fopen(fname, "r");
if (f == NULL) {
snprintf(line, max_line_len, "Cannot open file: %s", strerror(errno));
return line;
}
int lineno = 0;
while (fgets(line, max_line_len, f) != NULL) {
lineno++;
char *eql = strstr(line, "=");
if (eql) {
*eql = 0;
int value = atoi(eql+1);
if (set_size(cfg, line, value) != 0) {
char* err = (char*) malloc(max_line_len + 50);
snprintf(err, max_line_len + 50, "Unknown name '%s' on line %d.", line, lineno);
free(line);
return err;
}
} else {
snprintf(line, max_line_len, "Invalid line %d (must be of form 'name=int').",
lineno);
return line;
}
}
free(line);
return NULL;
}
// End of tuning.h.
|
Fix error for short names
|
Fix error for short names
|
C
|
isc
|
diku-dk/futhark,HIPERFIT/futhark,diku-dk/futhark,diku-dk/futhark,HIPERFIT/futhark,HIPERFIT/futhark,diku-dk/futhark,diku-dk/futhark
|
c
|
## Code Before:
// Start of tuning.h.
static char* load_tuning_file(const char *fname,
void *cfg,
int (*set_size)(void*, const char*, size_t)) {
const int max_line_len = 1024;
char* line = (char*) malloc(max_line_len);
FILE *f = fopen(fname, "r");
if (f == NULL) {
snprintf(line, max_line_len, "Cannot open file: %s", strerror(errno));
return line;
}
int lineno = 0;
while (fgets(line, max_line_len, f) != NULL) {
lineno++;
char *eql = strstr(line, "=");
if (eql) {
*eql = 0;
int value = atoi(eql+1);
if (set_size(cfg, line, value) != 0) {
strncpy(eql+1, line, max_line_len-strlen(line)-1);
snprintf(line, max_line_len, "Unknown name '%s' on line %d.", eql+1, lineno);
return line;
}
} else {
snprintf(line, max_line_len, "Invalid line %d (must be of form 'name=int').",
lineno);
return line;
}
}
free(line);
return NULL;
}
// End of tuning.h.
## Instruction:
Fix error for short names
## Code After:
// Start of tuning.h.
static char* load_tuning_file(const char *fname,
void *cfg,
int (*set_size)(void*, const char*, size_t)) {
const int max_line_len = 1024;
char* line = (char*) malloc(max_line_len);
FILE *f = fopen(fname, "r");
if (f == NULL) {
snprintf(line, max_line_len, "Cannot open file: %s", strerror(errno));
return line;
}
int lineno = 0;
while (fgets(line, max_line_len, f) != NULL) {
lineno++;
char *eql = strstr(line, "=");
if (eql) {
*eql = 0;
int value = atoi(eql+1);
if (set_size(cfg, line, value) != 0) {
char* err = (char*) malloc(max_line_len + 50);
snprintf(err, max_line_len + 50, "Unknown name '%s' on line %d.", line, lineno);
free(line);
return err;
}
} else {
snprintf(line, max_line_len, "Invalid line %d (must be of form 'name=int').",
lineno);
return line;
}
}
free(line);
return NULL;
}
// End of tuning.h.
|
4fa67aad23546c208c072778b85ced9d684cc62b
|
CMakeLists.txt
|
CMakeLists.txt
|
cmake_minimum_required(VERSION 2.8)
project(twilio-c)
add_library(twilioc encode.c rest.c twilio.c)
target_include_directories(twilioc PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
cmake_minimum_required(VERSION 2.8)
project(twilio-c)
#
# Building and Installation
#
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wextra -pedantic")
#
# Source and Output
#
add_library(twilioc encode.c rest.c twilio.c)
target_include_directories(twilioc PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
Add cflags to build for more strict coding
|
build: Add cflags to build for more strict coding
Adds some sanity checks for the build, need cleanup code accordingly.
|
Text
|
mit
|
WillDignazio/twilio-c
|
text
|
## Code Before:
cmake_minimum_required(VERSION 2.8)
project(twilio-c)
add_library(twilioc encode.c rest.c twilio.c)
target_include_directories(twilioc PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
## Instruction:
build: Add cflags to build for more strict coding
Adds some sanity checks for the build, need cleanup code accordingly.
## Code After:
cmake_minimum_required(VERSION 2.8)
project(twilio-c)
#
# Building and Installation
#
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wextra -pedantic")
#
# Source and Output
#
add_library(twilioc encode.c rest.c twilio.c)
target_include_directories(twilioc PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
8fff28d5951b4ac6bde6a568b42a07d59c7ee5a6
|
lib/puppet/type/shared/target.rb
|
lib/puppet/type/shared/target.rb
|
newproperty(:target, :array_matching => :all) do
include EasyType
desc 'The target name'
to_translate_to_resource do | raw_resource|
unless raw_resource['target'].nil?
raw_resource['target'].split(',')
end
end
def insync?(is)
is.sort == should.sort
end
end
def target
self[:target] ? self[:target].join(',') : ''
end
autorequire(:wls_safagent) { autorequire_when(:wls_safagent, 'SAFAgent') }
autorequire(:wls_server) { autorequire_when(:wls_safagent, 'Server') }
autorequire(:wls_cluster) { autorequire_when(:wls_safagent, 'Cluster') }
autorequire(:wls_jmsserver) { autorequire_when(:wls_safagent, 'JMSServer') }
private
def autorequire_when(type, type_name)
return_value = []
targets = self[:target] || []
targets.each_with_index do |value, index|
return_value << full_name(value) if self[:targettype][index] == type_name
end
end
def full_name(name)
"#{domain}/#{name}"
end
|
newproperty(:target, :array_matching => :all) do
include EasyType
desc 'The target name'
to_translate_to_resource do | raw_resource|
unless raw_resource['target'].nil?
raw_resource['target'].split(',')
end
end
def insync?(is)
is = [] if is == :absent or is.nil?
is.sort == should.sort
end
end
def target
self[:target] ? self[:target].join(',') : ''
end
autorequire(:wls_safagent) { autorequire_when(:wls_safagent, 'SAFAgent') }
autorequire(:wls_server) { autorequire_when(:wls_safagent, 'Server') }
autorequire(:wls_cluster) { autorequire_when(:wls_safagent, 'Cluster') }
autorequire(:wls_jmsserver) { autorequire_when(:wls_safagent, 'JMSServer') }
private
def autorequire_when(type, type_name)
return_value = []
targets = self[:target] || []
targets.each_with_index do |value, index|
return_value << full_name(value) if self[:targettype][index] == type_name
end
end
def full_name(name)
"#{domain}/#{name}"
end
|
Fix "undefined method `sort' for :absent:Symbol"
|
Fix "undefined method `sort' for :absent:Symbol"
This was a problem when managing datasources that had become
untargetted.
Fixes https://github.com/biemond/biemond-orawls/issues/212
Fix as suggested by Bert Hajee https://github.com/hajee
|
Ruby
|
apache-2.0
|
yadavnikhil/biemond-orawls,hajee/biemond-orawls,CDLSoftware/biemond-orawls,alexjfisher/biemond-orawls,CDLSoftware/biemond-orawls,BasLangenberg/biemond-orawls,alexjfisher/biemond-orawls,theonejdub/biemond-orawls,CDLSoftware/biemond-orawls,BasLangenberg/biemond-orawls,hajee/biemond-orawls,cmbrehm/biemond-orawls,biemond/biemond-orawls,yadavnikhil/biemond-orawls,cmbrehm/biemond-orawls,cmbrehm/biemond-orawls,CDLSoftware/biemond-orawls,alexjfisher/biemond-orawls,alexjfisher/biemond-orawls,robh007/biemond-orawls,BasLangenberg/biemond-orawls,robh007/biemond-orawls,yadavnikhil/biemond-orawls,rmestrum/biemond-orawls,rmestrum/biemond-orawls,robh007/biemond-orawls,theonejdub/biemond-orawls,yadavnikhil/biemond-orawls,rmestrum/biemond-orawls,biemond/biemond-orawls,BasLangenberg/biemond-orawls,theonejdub/biemond-orawls,hajee/biemond-orawls,biemond/biemond-orawls,robh007/biemond-orawls,biemond/biemond-orawls,rmestrum/biemond-orawls,theonejdub/biemond-orawls,cmbrehm/biemond-orawls,hajee/biemond-orawls
|
ruby
|
## Code Before:
newproperty(:target, :array_matching => :all) do
include EasyType
desc 'The target name'
to_translate_to_resource do | raw_resource|
unless raw_resource['target'].nil?
raw_resource['target'].split(',')
end
end
def insync?(is)
is.sort == should.sort
end
end
def target
self[:target] ? self[:target].join(',') : ''
end
autorequire(:wls_safagent) { autorequire_when(:wls_safagent, 'SAFAgent') }
autorequire(:wls_server) { autorequire_when(:wls_safagent, 'Server') }
autorequire(:wls_cluster) { autorequire_when(:wls_safagent, 'Cluster') }
autorequire(:wls_jmsserver) { autorequire_when(:wls_safagent, 'JMSServer') }
private
def autorequire_when(type, type_name)
return_value = []
targets = self[:target] || []
targets.each_with_index do |value, index|
return_value << full_name(value) if self[:targettype][index] == type_name
end
end
def full_name(name)
"#{domain}/#{name}"
end
## Instruction:
Fix "undefined method `sort' for :absent:Symbol"
This was a problem when managing datasources that had become
untargetted.
Fixes https://github.com/biemond/biemond-orawls/issues/212
Fix as suggested by Bert Hajee https://github.com/hajee
## Code After:
newproperty(:target, :array_matching => :all) do
include EasyType
desc 'The target name'
to_translate_to_resource do | raw_resource|
unless raw_resource['target'].nil?
raw_resource['target'].split(',')
end
end
def insync?(is)
is = [] if is == :absent or is.nil?
is.sort == should.sort
end
end
def target
self[:target] ? self[:target].join(',') : ''
end
autorequire(:wls_safagent) { autorequire_when(:wls_safagent, 'SAFAgent') }
autorequire(:wls_server) { autorequire_when(:wls_safagent, 'Server') }
autorequire(:wls_cluster) { autorequire_when(:wls_safagent, 'Cluster') }
autorequire(:wls_jmsserver) { autorequire_when(:wls_safagent, 'JMSServer') }
private
def autorequire_when(type, type_name)
return_value = []
targets = self[:target] || []
targets.each_with_index do |value, index|
return_value << full_name(value) if self[:targettype][index] == type_name
end
end
def full_name(name)
"#{domain}/#{name}"
end
|
7806365ee5f08a867c2e1433f4dbbb9af037c7bb
|
test/test_post.rb
|
test/test_post.rb
|
$LOAD_PATH.unshift(__dir__)
require 'helper'
describe 'Post' do
before do
test_site.scan_templates
test_site.scan_pages
test_site.scan_posts
end
subject do
filename = '2015-01-01-a-post.markdown'
file_path = File.join(test_site.source_paths[:posts], filename)
Dimples::Post.new(test_site, file_path)
end
it 'parses its YAML front matter' do
subject.title.must_equal('My first post')
subject.categories.sort.must_equal(%w[green red])
end
it 'correctly sets its slug' do
subject.slug.must_equal('a-post')
end
it 'correctly sets its date' do
subject.year.must_equal('2015')
subject.month.must_equal('01')
subject.day.must_equal('01')
end
describe 'when publishing' do
let(:file_path) { subject.output_path(test_site.output_paths[:site]) }
before { subject.write(file_path) }
it 'creates the generated file' do
File.exist?(file_path).must_equal(true)
compare_file_to_fixture(file_path, 'posts/2015-01-01-a-post')
end
end
end
|
$LOAD_PATH.unshift(__dir__)
require 'helper'
describe 'Post' do
before do
test_site.scan_templates
test_site.scan_pages
test_site.scan_posts
end
subject do
test_site.posts.select { |post| post.slug == 'another-post' }.first
end
it 'parses its YAML front matter' do
subject.title.must_equal('My second post')
subject.categories.sort.must_equal(['green'])
end
it 'finds its next post' do
subject.next_post.slug.must_equal('yet-another-post')
end
it 'finds its previous post' do
subject.previous_post.slug.must_equal('a-post')
end
it 'correctly sets its slug' do
subject.slug.must_equal('another-post')
end
it 'correctly sets its date' do
subject.year.must_equal('2015')
subject.month.must_equal('02')
subject.day.must_equal('01')
end
it 'returns the correct value when inspected' do
subject.inspect.must_equal "#<Dimples::Post @slug=#{subject.slug} @output_path=#{subject.output_path}>"
end
describe 'when publishing' do
before { subject.write }
it 'creates the generated file' do
compare_file_to_fixture(subject.output_path, 'posts/2015-02-01-another-post')
end
end
end
|
Switch to a different subject post, add tests for previous and next posts and the inspect method, switch to the simpler write method.
|
Switch to a different subject post, add tests for previous and next posts and the inspect method, switch to the simpler write method.
|
Ruby
|
mit
|
waferbaby/dimples
|
ruby
|
## Code Before:
$LOAD_PATH.unshift(__dir__)
require 'helper'
describe 'Post' do
before do
test_site.scan_templates
test_site.scan_pages
test_site.scan_posts
end
subject do
filename = '2015-01-01-a-post.markdown'
file_path = File.join(test_site.source_paths[:posts], filename)
Dimples::Post.new(test_site, file_path)
end
it 'parses its YAML front matter' do
subject.title.must_equal('My first post')
subject.categories.sort.must_equal(%w[green red])
end
it 'correctly sets its slug' do
subject.slug.must_equal('a-post')
end
it 'correctly sets its date' do
subject.year.must_equal('2015')
subject.month.must_equal('01')
subject.day.must_equal('01')
end
describe 'when publishing' do
let(:file_path) { subject.output_path(test_site.output_paths[:site]) }
before { subject.write(file_path) }
it 'creates the generated file' do
File.exist?(file_path).must_equal(true)
compare_file_to_fixture(file_path, 'posts/2015-01-01-a-post')
end
end
end
## Instruction:
Switch to a different subject post, add tests for previous and next posts and the inspect method, switch to the simpler write method.
## Code After:
$LOAD_PATH.unshift(__dir__)
require 'helper'
describe 'Post' do
before do
test_site.scan_templates
test_site.scan_pages
test_site.scan_posts
end
subject do
test_site.posts.select { |post| post.slug == 'another-post' }.first
end
it 'parses its YAML front matter' do
subject.title.must_equal('My second post')
subject.categories.sort.must_equal(['green'])
end
it 'finds its next post' do
subject.next_post.slug.must_equal('yet-another-post')
end
it 'finds its previous post' do
subject.previous_post.slug.must_equal('a-post')
end
it 'correctly sets its slug' do
subject.slug.must_equal('another-post')
end
it 'correctly sets its date' do
subject.year.must_equal('2015')
subject.month.must_equal('02')
subject.day.must_equal('01')
end
it 'returns the correct value when inspected' do
subject.inspect.must_equal "#<Dimples::Post @slug=#{subject.slug} @output_path=#{subject.output_path}>"
end
describe 'when publishing' do
before { subject.write }
it 'creates the generated file' do
compare_file_to_fixture(subject.output_path, 'posts/2015-02-01-another-post')
end
end
end
|
d80b1465e6ea6019531a2bd1df4599e28afdebf4
|
openstackclient/tests/functional/network/v2/test_network_service_provider.py
|
openstackclient/tests/functional/network/v2/test_network_service_provider.py
|
import testtools
from openstackclient.tests.functional import base
class TestNetworkServiceProvider(base.TestCase):
"""Functional tests for network service provider"""
SERVICE_TYPE = ['L3_ROUTER_NAT']
@testtools.skip('broken SDK testing')
def test_network_service_provider_list(self):
raw_output = self.openstack('network service provider list')
self.assertIn(self.SERVICE_TYPE, raw_output)
|
from openstackclient.tests.functional import base
class TestNetworkServiceProvider(base.TestCase):
"""Functional tests for network service provider"""
SERVICE_TYPE = 'L3_ROUTER_NAT'
def test_network_service_provider_list(self):
raw_output = self.openstack('network service provider list')
self.assertIn(self.SERVICE_TYPE, raw_output)
|
Fix network service provider functional test
|
Fix network service provider functional test
SDK refactor broken network service provider
functional test, tested this command works,
but there is a error in the funtional test,
so fix it.
Change-Id: I783c58cedd39a05b665e47709b2b5321871e558b
Closes-Bug: 1653138
|
Python
|
apache-2.0
|
dtroyer/python-openstackclient,openstack/python-openstackclient,dtroyer/python-openstackclient,openstack/python-openstackclient
|
python
|
## Code Before:
import testtools
from openstackclient.tests.functional import base
class TestNetworkServiceProvider(base.TestCase):
"""Functional tests for network service provider"""
SERVICE_TYPE = ['L3_ROUTER_NAT']
@testtools.skip('broken SDK testing')
def test_network_service_provider_list(self):
raw_output = self.openstack('network service provider list')
self.assertIn(self.SERVICE_TYPE, raw_output)
## Instruction:
Fix network service provider functional test
SDK refactor broken network service provider
functional test, tested this command works,
but there is a error in the funtional test,
so fix it.
Change-Id: I783c58cedd39a05b665e47709b2b5321871e558b
Closes-Bug: 1653138
## Code After:
from openstackclient.tests.functional import base
class TestNetworkServiceProvider(base.TestCase):
"""Functional tests for network service provider"""
SERVICE_TYPE = 'L3_ROUTER_NAT'
def test_network_service_provider_list(self):
raw_output = self.openstack('network service provider list')
self.assertIn(self.SERVICE_TYPE, raw_output)
|
7d0f1c9cea6e71d5cc515ae3790226ae6badda79
|
Logger.py
|
Logger.py
|
import time
class Logger():
def __init__(self, name = "defaultLogFile"):
timestamp = time.strftime('%Y_%m_%d-%H_%M_%S')
self.name = "Logs/" + timestamp + "_" + name + ".txt"
try:
self.logfile = open(self.name, 'w')
self.opened = True
except:
self.opened = False
def save_line(self,data):
time_s = time.time()
time_ms = int(round((time_s - round(time_s))*1000))
timestamp = time.strftime(('%H_%M_%S'), time.localtime(time_s))+"_" +str(time_ms) + " : "
if(self.opened):
self.logfile.write(timestamp+data)
self.logfile.flush()
return 0,""
else:
return 1,str(timestamp+data)
def close(self):
if(self.opened):
self.logfile.flush()
self.logfile.close()
self.opened = False
return 0
else:
return 1
|
import time
class Logger():
def __init__(self, name = "defaultLogFile"):
timestamp = time.strftime('%Y_%m_%d-%H_%M_%S')
self.name = "Logs/" + timestamp + "_" + name + ".txt"
try:
self.logfile = open(self.name, 'w')
self.opened = True
except:
self.opened = False
def save_line(self,data):
time_s = time.time()
time_ms = int((time_s - int(time_s))*1000.0)
timestamp = time.strftime(('%H_%M_%S'), time.localtime(time_s))+"_" +str(time_ms) + " : "
if(self.opened):
self.logfile.write(timestamp+data)
self.logfile.flush()
return 0,""
else:
return 1,str(timestamp+data)
def close(self):
if(self.opened):
self.logfile.flush()
self.logfile.close()
self.opened = False
return 0
else:
return 1
|
Correct and simplify calculation of miliseconds
|
Correct and simplify calculation of miliseconds
Signed-off-by: TeaPackCZ <[email protected]>
|
Python
|
mit
|
TeaPackCZ/RobotZed,TeaPackCZ/RobotZed
|
python
|
## Code Before:
import time
class Logger():
def __init__(self, name = "defaultLogFile"):
timestamp = time.strftime('%Y_%m_%d-%H_%M_%S')
self.name = "Logs/" + timestamp + "_" + name + ".txt"
try:
self.logfile = open(self.name, 'w')
self.opened = True
except:
self.opened = False
def save_line(self,data):
time_s = time.time()
time_ms = int(round((time_s - round(time_s))*1000))
timestamp = time.strftime(('%H_%M_%S'), time.localtime(time_s))+"_" +str(time_ms) + " : "
if(self.opened):
self.logfile.write(timestamp+data)
self.logfile.flush()
return 0,""
else:
return 1,str(timestamp+data)
def close(self):
if(self.opened):
self.logfile.flush()
self.logfile.close()
self.opened = False
return 0
else:
return 1
## Instruction:
Correct and simplify calculation of miliseconds
Signed-off-by: TeaPackCZ <[email protected]>
## Code After:
import time
class Logger():
def __init__(self, name = "defaultLogFile"):
timestamp = time.strftime('%Y_%m_%d-%H_%M_%S')
self.name = "Logs/" + timestamp + "_" + name + ".txt"
try:
self.logfile = open(self.name, 'w')
self.opened = True
except:
self.opened = False
def save_line(self,data):
time_s = time.time()
time_ms = int((time_s - int(time_s))*1000.0)
timestamp = time.strftime(('%H_%M_%S'), time.localtime(time_s))+"_" +str(time_ms) + " : "
if(self.opened):
self.logfile.write(timestamp+data)
self.logfile.flush()
return 0,""
else:
return 1,str(timestamp+data)
def close(self):
if(self.opened):
self.logfile.flush()
self.logfile.close()
self.opened = False
return 0
else:
return 1
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.