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
|
---|---|---|---|---|---|---|---|---|---|---|---|
38fb348984b2bffed246dea6aee3c92d56cdfce5 | src/Builder.php | src/Builder.php | <?php namespace GeneaLabs\LaravelModelCaching;
use Closure;
use Illuminate\Cache\TaggableStore;
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
class Builder extends EloquentBuilder
{
protected function eagerLoadRelation(array $models, $name, Closure $constraints)
{
$relation = $this->getRelation($name);
$relation->addEagerConstraints($models);
$constraints($relation);
$parentIds = implode('_', collect($models)->pluck('id')->toArray());
$parentName = str_slug(get_class($relation->getParent()));
$childName = str_slug(get_class($relation->getRelated()));
// $cache = cache();
//
// if (is_subclass_of($cache->getStore(), TaggableStore::class)) {
// $cache->tags([$parentName, $childName]);
// }
$results = cache()->tags([$parentName, $childName])
->rememberForever("{$parentName}_{$parentIds}-{$childName}s", function () use ($relation) {
return $relation->getEager();
});
return $relation->match(
$relation->initRelation($models, $name),
$results,
$name
);
}
}
| <?php namespace GeneaLabs\LaravelModelCaching;
use Closure;
use Illuminate\Cache\TaggableStore;
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
use Illuminate\Database\Eloquent\Relations\Pivot;
use Illuminate\Support\Collection;
use Illuminate\Database\Eloquent\Relations\Relation;
class Builder extends EloquentBuilder
{
protected function eagerLoadRelation(array $models, $name, Closure $constraints)
{
$relation = $this->getRelation($name);
$relation->addEagerConstraints($models);
$constraints($relation);
return $relation->match(
$relation->initRelation($models, $name),
$this->cacheResults($relation, $models),
$name
);
}
protected function cacheResults(Relation $relation, array $models) : Collection
{
$parentIds = implode('_', collect($models)->pluck('id')->toArray());
$parentName = str_slug(get_class($relation->getParent()));
$childName = str_slug(get_class($relation->getRelated()));
$cache = cache();
if (is_subclass_of($cache->getStore(), TaggableStore::class)) {
$cache->tags([$parentName, $childName]);
}
return cache()->tags([$parentName, $childName])
->rememberForever("{$parentName}_{$parentIds}-{$childName}s", function () use ($relation) {
return $relation->getEager();
});
}
}
| Refactor builder method to cache relationships | Refactor builder method to cache relationships
| PHP | mit | GeneaLabs/laravel-model-caching | php | ## Code Before:
<?php namespace GeneaLabs\LaravelModelCaching;
use Closure;
use Illuminate\Cache\TaggableStore;
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
class Builder extends EloquentBuilder
{
protected function eagerLoadRelation(array $models, $name, Closure $constraints)
{
$relation = $this->getRelation($name);
$relation->addEagerConstraints($models);
$constraints($relation);
$parentIds = implode('_', collect($models)->pluck('id')->toArray());
$parentName = str_slug(get_class($relation->getParent()));
$childName = str_slug(get_class($relation->getRelated()));
// $cache = cache();
//
// if (is_subclass_of($cache->getStore(), TaggableStore::class)) {
// $cache->tags([$parentName, $childName]);
// }
$results = cache()->tags([$parentName, $childName])
->rememberForever("{$parentName}_{$parentIds}-{$childName}s", function () use ($relation) {
return $relation->getEager();
});
return $relation->match(
$relation->initRelation($models, $name),
$results,
$name
);
}
}
## Instruction:
Refactor builder method to cache relationships
## Code After:
<?php namespace GeneaLabs\LaravelModelCaching;
use Closure;
use Illuminate\Cache\TaggableStore;
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
use Illuminate\Database\Eloquent\Relations\Pivot;
use Illuminate\Support\Collection;
use Illuminate\Database\Eloquent\Relations\Relation;
class Builder extends EloquentBuilder
{
protected function eagerLoadRelation(array $models, $name, Closure $constraints)
{
$relation = $this->getRelation($name);
$relation->addEagerConstraints($models);
$constraints($relation);
return $relation->match(
$relation->initRelation($models, $name),
$this->cacheResults($relation, $models),
$name
);
}
protected function cacheResults(Relation $relation, array $models) : Collection
{
$parentIds = implode('_', collect($models)->pluck('id')->toArray());
$parentName = str_slug(get_class($relation->getParent()));
$childName = str_slug(get_class($relation->getRelated()));
$cache = cache();
if (is_subclass_of($cache->getStore(), TaggableStore::class)) {
$cache->tags([$parentName, $childName]);
}
return cache()->tags([$parentName, $childName])
->rememberForever("{$parentName}_{$parentIds}-{$childName}s", function () use ($relation) {
return $relation->getEager();
});
}
}
|
d459049d104fdcf08d176969f9ba448885fa51de | esigate42/src/main/webapp/index.jsp | esigate42/src/main/webapp/index.jsp | <%@taglib uri="http://www.sourceforge.net/webassembletool" prefix="w"%>
<w:includeTemplate page="/templates/sparkle/index.html">
<html>
<head>
<w:includeParam name="title">ESIGate Test Example</w:includeParam>
</head>
<body>
<w:includeParam name="colTwo">
<h2>Hello World</h2>
<p>This is a simple demo tutorial of ESIGate's remote template</p>
</w:includeParam>
</body>
</html>
</w:includeTemplate> | <%@taglib uri="http://www.sourceforge.net/webassembletool" prefix="w"%>
<w:includeTemplate page="/templates/sparkle/index.html">
<html>
<head>
<w:includeParam name="title">ESIGate Test Example</w:includeParam>
</head>
<body>
<w:includeParam name="colTwo">
<h2>Hello World</h2>
<p>This is a simple demo tutorial of ESIGate's remote template</p>
</w:includeParam>
<w:includeParam name="menu">
<ul>
<li class="active"><a href="Acitivity">Activity</a></li>
<li><a href="http://www.esigate.org">ESIGate</a></li>
</ul>
</w:includeParam>
<w:includeParam name="colOne">
<h2>Remote content</h2>
<w:includeblock page="/content/blocks.html" name="block3"></w:includeblock>
</w:includeParam>
</body>
</html>
</w:includeTemplate> | Include a remote block code | Include a remote block code | Java Server Pages | apache-2.0 | thbaymet/esigate42 | java-server-pages | ## Code Before:
<%@taglib uri="http://www.sourceforge.net/webassembletool" prefix="w"%>
<w:includeTemplate page="/templates/sparkle/index.html">
<html>
<head>
<w:includeParam name="title">ESIGate Test Example</w:includeParam>
</head>
<body>
<w:includeParam name="colTwo">
<h2>Hello World</h2>
<p>This is a simple demo tutorial of ESIGate's remote template</p>
</w:includeParam>
</body>
</html>
</w:includeTemplate>
## Instruction:
Include a remote block code
## Code After:
<%@taglib uri="http://www.sourceforge.net/webassembletool" prefix="w"%>
<w:includeTemplate page="/templates/sparkle/index.html">
<html>
<head>
<w:includeParam name="title">ESIGate Test Example</w:includeParam>
</head>
<body>
<w:includeParam name="colTwo">
<h2>Hello World</h2>
<p>This is a simple demo tutorial of ESIGate's remote template</p>
</w:includeParam>
<w:includeParam name="menu">
<ul>
<li class="active"><a href="Acitivity">Activity</a></li>
<li><a href="http://www.esigate.org">ESIGate</a></li>
</ul>
</w:includeParam>
<w:includeParam name="colOne">
<h2>Remote content</h2>
<w:includeblock page="/content/blocks.html" name="block3"></w:includeblock>
</w:includeParam>
</body>
</html>
</w:includeTemplate> |
fab20ab4c0ea458531d5c893c37873a9b89641be | src/Models/PollQuestion.php | src/Models/PollQuestion.php | <?php
namespace VoyagerPolls\Models;
use Illuminate\Database\Eloquent\Model;
class PollQuestion extends Model
{
protected $table = 'voyager_poll_questions';
protected $fillable = ['poll_id', 'question', 'order'];
protected $appends = ['answered'];
public function answers(){
return $this->hasMany('VoyagerPolls\Models\PollAnswer', 'question_id')->orderBy('order', 'ASC');
}
public function totalVotes(){
$totalVotes = 0;
foreach($this->answers as $answers){
$totalVotes += $answers->votes;
}
return $totalVotes;
}
public function getAnsweredAttribute(){
return false;
}
}
| <?php
namespace VoyagerPolls\Models;
use Illuminate\Database\Eloquent\Model;
class PollQuestion extends Model
{
protected $table = 'voyager_poll_questions';
protected $fillable = ['poll_id', 'question', 'order'];
protected $appends = ['answered'];
public function answers(){
return $this->hasMany('VoyagerPolls\Models\PollAnswer', 'question_id')->orderBy('order', 'ASC');
}
public function poll() {
return $this->belongsTo('VoyagerPolls\Models\Poll', 'poll_id');
}
public function totalVotes(){
$totalVotes = 0;
foreach($this->answers as $answers){
$totalVotes += $answers->votes;
}
return $totalVotes;
}
public function getAnsweredAttribute(){
return false;
}
}
| Fix relationship between question and poll. | Fix relationship between question and poll.
| PHP | mit | thedevdojo/voyager-polls,thedevdojo/voyager-polls,thedevdojo/voyager-polls | php | ## Code Before:
<?php
namespace VoyagerPolls\Models;
use Illuminate\Database\Eloquent\Model;
class PollQuestion extends Model
{
protected $table = 'voyager_poll_questions';
protected $fillable = ['poll_id', 'question', 'order'];
protected $appends = ['answered'];
public function answers(){
return $this->hasMany('VoyagerPolls\Models\PollAnswer', 'question_id')->orderBy('order', 'ASC');
}
public function totalVotes(){
$totalVotes = 0;
foreach($this->answers as $answers){
$totalVotes += $answers->votes;
}
return $totalVotes;
}
public function getAnsweredAttribute(){
return false;
}
}
## Instruction:
Fix relationship between question and poll.
## Code After:
<?php
namespace VoyagerPolls\Models;
use Illuminate\Database\Eloquent\Model;
class PollQuestion extends Model
{
protected $table = 'voyager_poll_questions';
protected $fillable = ['poll_id', 'question', 'order'];
protected $appends = ['answered'];
public function answers(){
return $this->hasMany('VoyagerPolls\Models\PollAnswer', 'question_id')->orderBy('order', 'ASC');
}
public function poll() {
return $this->belongsTo('VoyagerPolls\Models\Poll', 'poll_id');
}
public function totalVotes(){
$totalVotes = 0;
foreach($this->answers as $answers){
$totalVotes += $answers->votes;
}
return $totalVotes;
}
public function getAnsweredAttribute(){
return false;
}
}
|
ba21db156c75bae9210b9bb90f35759790bf1d31 | spec/runner.html | spec/runner.html | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>NoFlo in browser</title>
<link rel="stylesheet" href="../node_modules/mocha/mocha.css">
<style type="text/css">
#fixtures {
display: none;
}
</style>
</head>
<body>
<div id="mocha"></div>
<div id="fixtures"></div>
<script src="../browser/noflo.js"></script>
<script src="http://chaijs.com/chai.js"></script>
<script src="../node_modules/mocha/mocha.js"></script>
<script>mocha.setup('bdd');</script>
<script src="./Graph.js"></script>
<script src="./InPort.js"></script>
<script src="./Port.js"></script>
<script src="./ArrayPort.js"></script>
<script src="./AsyncComponent.js"></script>
<script src="./ComponentLoader.js"></script>
<script src="./Network.js"></script>
<script src="./NoFlo.js"></script>
<script src="./Subgraph.js"></script>
<script>
if (window.mochaPhantomJS) {
mochaPhantomJS.run();
} else {
mocha.checkLeaks();
mocha.run();
}
</script>
</body>
</html>
| <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>NoFlo in browser</title>
<link rel="stylesheet" href="../node_modules/mocha/mocha.css">
<style type="text/css">
#fixtures {
display: none;
}
</style>
</head>
<body>
<div id="mocha"></div>
<div id="fixtures"></div>
<script src="../browser/noflo.js"></script>
<script src="http://chaijs.com/chai.js"></script>
<script src="../node_modules/mocha/mocha.js"></script>
<script>mocha.setup('bdd');</script>
<script src="./Graph.js"></script>
<script src="./Journal.js"></script>
<script src="./InPort.js"></script>
<script src="./Port.js"></script>
<script src="./ArrayPort.js"></script>
<script src="./AsyncComponent.js"></script>
<script src="./ComponentLoader.js"></script>
<script src="./Network.js"></script>
<script src="./NoFlo.js"></script>
<script src="./Subgraph.js"></script>
<script>
if (window.mochaPhantomJS) {
mochaPhantomJS.run();
} else {
mocha.checkLeaks();
mocha.run();
}
</script>
</body>
</html>
| Test journals on browser too | Test journals on browser too
| HTML | mit | lxfschr/noflo,saurabhsood91/noflo,jonnor/noflo,lxfschr/noflo,noflo/noflo,npmcomponent/noflo-noflo,trustmaster/noflo,saurabhsood91/noflo,trustmaster/noflo,jonnor/noflo | html | ## Code Before:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>NoFlo in browser</title>
<link rel="stylesheet" href="../node_modules/mocha/mocha.css">
<style type="text/css">
#fixtures {
display: none;
}
</style>
</head>
<body>
<div id="mocha"></div>
<div id="fixtures"></div>
<script src="../browser/noflo.js"></script>
<script src="http://chaijs.com/chai.js"></script>
<script src="../node_modules/mocha/mocha.js"></script>
<script>mocha.setup('bdd');</script>
<script src="./Graph.js"></script>
<script src="./InPort.js"></script>
<script src="./Port.js"></script>
<script src="./ArrayPort.js"></script>
<script src="./AsyncComponent.js"></script>
<script src="./ComponentLoader.js"></script>
<script src="./Network.js"></script>
<script src="./NoFlo.js"></script>
<script src="./Subgraph.js"></script>
<script>
if (window.mochaPhantomJS) {
mochaPhantomJS.run();
} else {
mocha.checkLeaks();
mocha.run();
}
</script>
</body>
</html>
## Instruction:
Test journals on browser too
## Code After:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>NoFlo in browser</title>
<link rel="stylesheet" href="../node_modules/mocha/mocha.css">
<style type="text/css">
#fixtures {
display: none;
}
</style>
</head>
<body>
<div id="mocha"></div>
<div id="fixtures"></div>
<script src="../browser/noflo.js"></script>
<script src="http://chaijs.com/chai.js"></script>
<script src="../node_modules/mocha/mocha.js"></script>
<script>mocha.setup('bdd');</script>
<script src="./Graph.js"></script>
<script src="./Journal.js"></script>
<script src="./InPort.js"></script>
<script src="./Port.js"></script>
<script src="./ArrayPort.js"></script>
<script src="./AsyncComponent.js"></script>
<script src="./ComponentLoader.js"></script>
<script src="./Network.js"></script>
<script src="./NoFlo.js"></script>
<script src="./Subgraph.js"></script>
<script>
if (window.mochaPhantomJS) {
mochaPhantomJS.run();
} else {
mocha.checkLeaks();
mocha.run();
}
</script>
</body>
</html>
|
1f4550cfcd9075bdc793f60f667ebfb0cf14cb11 | lib/pah/files/config/database.yml | lib/pah/files/config/database.yml | development:
adapter: postgresql
encoding: utf8
database: PROJECT_development
pool: 5
username: postgres
host: localhost
template: template0
test:
adapter: postgresql
encoding: utf8
database: PROJECT_test
pool: 5
username: postgres
min_messages: WARNING
host: localhost
template: template0
| development:
adapter: postgresql
encoding: utf8
database: PROJECT_development
pool: 5
username: postgres
host: localhost
template: template0
test:
adapter: postgresql
encoding: utf8
database: PROJECT_test
pool: 5
username: postgres
min_messages: WARNING
host: localhost
template: template0
production:
url: <%= ENV["DATABASE_URL"] %> | Add production url, to make the new app works correctly on heroku. Thanks @franciscomxs | Add production url, to make the new app works correctly on heroku. Thanks @franciscomxs
| YAML | mit | Helabs/pah,ffscalco/pah,ffscalco/pah,Helabs/pah | yaml | ## Code Before:
development:
adapter: postgresql
encoding: utf8
database: PROJECT_development
pool: 5
username: postgres
host: localhost
template: template0
test:
adapter: postgresql
encoding: utf8
database: PROJECT_test
pool: 5
username: postgres
min_messages: WARNING
host: localhost
template: template0
## Instruction:
Add production url, to make the new app works correctly on heroku. Thanks @franciscomxs
## Code After:
development:
adapter: postgresql
encoding: utf8
database: PROJECT_development
pool: 5
username: postgres
host: localhost
template: template0
test:
adapter: postgresql
encoding: utf8
database: PROJECT_test
pool: 5
username: postgres
min_messages: WARNING
host: localhost
template: template0
production:
url: <%= ENV["DATABASE_URL"] %> |
560671921ac9063610cdf9ae551de3d63018b95b | app/src/lib/git/update-ref.ts | app/src/lib/git/update-ref.ts | import { git } from './core'
import { Repository } from '../../models/repository'
/**
* Update the ref to a new value.
*
* @param repository - The repository in which the ref exists.
* @param ref - The ref to update. Must be fully qualified
* (e.g., `refs/heads/NAME`).
* @param oldValue - The value we expect the ref to have currently. If it
* doesn't match, the update will be aborted.
* @param newValue - The new value for the ref.
* @param reason - The reflog entry.
*/
export async function updateRef(
repository: Repository,
ref: string,
oldValue: string,
newValue: string,
reason: string
): Promise<void> {
await git(
['update-ref', ref, newValue, oldValue, '-m', reason],
repository.path,
'updateRef'
)
}
/**
* Remove a ref.
*
* @param repository - The repository in which the ref exists.
* @param ref - The ref to remove. Should be fully qualified, but may also be 'HEAD'.
* @param reason - The reflog entry.
*/
export async function deleteRef(
repository: Repository,
ref: string,
reason: string | undefined
): Promise<true | undefined> {
const args = ['update-ref', '-d', ref]
if (reason !== undefined) {
args.push('-m', reason)
}
const result = await git(args, repository.path, 'deleteRef')
if (result.exitCode === 0) {
return true
}
return undefined
}
| import { git } from './core'
import { Repository } from '../../models/repository'
/**
* Update the ref to a new value.
*
* @param repository - The repository in which the ref exists.
* @param ref - The ref to update. Must be fully qualified
* (e.g., `refs/heads/NAME`).
* @param oldValue - The value we expect the ref to have currently. If it
* doesn't match, the update will be aborted.
* @param newValue - The new value for the ref.
* @param reason - The reflog entry.
*/
export async function updateRef(
repository: Repository,
ref: string,
oldValue: string,
newValue: string,
reason: string
): Promise<void> {
await git(
['update-ref', ref, newValue, oldValue, '-m', reason],
repository.path,
'updateRef'
)
}
/**
* Remove a ref.
*
* @param repository - The repository in which the ref exists.
* @param ref - The ref to remove. Should be fully qualified, but may also be 'HEAD'.
* @param reason - The reflog entry.
*/
export async function deleteRef(
repository: Repository,
ref: string,
reason: string | undefined
): Promise<true> {
const args = ['update-ref', '-d', ref]
if (reason !== undefined) {
args.push('-m', reason)
}
await git(args, repository.path, 'deleteRef')
return true
}
| Exit code will always be zero or it'll throw | Exit code will always be zero or it'll throw
| TypeScript | mit | artivilla/desktop,say25/desktop,kactus-io/kactus,kactus-io/kactus,desktop/desktop,shiftkey/desktop,artivilla/desktop,desktop/desktop,kactus-io/kactus,j-f1/forked-desktop,j-f1/forked-desktop,j-f1/forked-desktop,kactus-io/kactus,shiftkey/desktop,artivilla/desktop,shiftkey/desktop,desktop/desktop,j-f1/forked-desktop,say25/desktop,shiftkey/desktop,desktop/desktop,say25/desktop,say25/desktop,artivilla/desktop | typescript | ## Code Before:
import { git } from './core'
import { Repository } from '../../models/repository'
/**
* Update the ref to a new value.
*
* @param repository - The repository in which the ref exists.
* @param ref - The ref to update. Must be fully qualified
* (e.g., `refs/heads/NAME`).
* @param oldValue - The value we expect the ref to have currently. If it
* doesn't match, the update will be aborted.
* @param newValue - The new value for the ref.
* @param reason - The reflog entry.
*/
export async function updateRef(
repository: Repository,
ref: string,
oldValue: string,
newValue: string,
reason: string
): Promise<void> {
await git(
['update-ref', ref, newValue, oldValue, '-m', reason],
repository.path,
'updateRef'
)
}
/**
* Remove a ref.
*
* @param repository - The repository in which the ref exists.
* @param ref - The ref to remove. Should be fully qualified, but may also be 'HEAD'.
* @param reason - The reflog entry.
*/
export async function deleteRef(
repository: Repository,
ref: string,
reason: string | undefined
): Promise<true | undefined> {
const args = ['update-ref', '-d', ref]
if (reason !== undefined) {
args.push('-m', reason)
}
const result = await git(args, repository.path, 'deleteRef')
if (result.exitCode === 0) {
return true
}
return undefined
}
## Instruction:
Exit code will always be zero or it'll throw
## Code After:
import { git } from './core'
import { Repository } from '../../models/repository'
/**
* Update the ref to a new value.
*
* @param repository - The repository in which the ref exists.
* @param ref - The ref to update. Must be fully qualified
* (e.g., `refs/heads/NAME`).
* @param oldValue - The value we expect the ref to have currently. If it
* doesn't match, the update will be aborted.
* @param newValue - The new value for the ref.
* @param reason - The reflog entry.
*/
export async function updateRef(
repository: Repository,
ref: string,
oldValue: string,
newValue: string,
reason: string
): Promise<void> {
await git(
['update-ref', ref, newValue, oldValue, '-m', reason],
repository.path,
'updateRef'
)
}
/**
* Remove a ref.
*
* @param repository - The repository in which the ref exists.
* @param ref - The ref to remove. Should be fully qualified, but may also be 'HEAD'.
* @param reason - The reflog entry.
*/
export async function deleteRef(
repository: Repository,
ref: string,
reason: string | undefined
): Promise<true> {
const args = ['update-ref', '-d', ref]
if (reason !== undefined) {
args.push('-m', reason)
}
await git(args, repository.path, 'deleteRef')
return true
}
|
9a344055fec21a3b02664d5fd5a935fba10366c6 | app/views/welcome/index.html.erb | app/views/welcome/index.html.erb | <!-- Navigation -->
<%= render :partial => 'navigation' %>
<!-- Header -->
<header id="top" class="header cover">
<%= render :partial => 'header' %>
</header>
<section class="whitespace"></section>
<!-- School search results -->
<section id="school-info-section" class="results-section cover">
<%= render :partial => 'school_info_section' %>
</section>
<section class="whitespace"></section>
<!-- Take action section -->
<section id="take-action-section" class="take-action-section cover">
<%= render :partial => 'take_action' %>
</section>
<section class="whitespace"></section>
<!-- Cart section -->
<section id="cart" class="cart-section cover">
<%= render :partial => 'cart_section' %>
</section>
<section class="whitespace"></section>
<!-- Footer -->
<footer>
<%= render :partial => 'footer' %>
</footer>
| <!-- Navigation -->
<%= render :partial => 'navigation' %>
<!-- Header -->
<header id="top" class="header cover">
<%= render :partial => 'header' %>
</header>
<section class="whitespace"></section>
<!-- School search results -->
<section id="school-info-section" class="results-section cover">
<%= render :partial => 'school_info_section' %>
</section>
<!-- <section class="whitespace"></section> -->
<!-- Take action section -->
<section id="take-action-section" class="take-action-section cover">
<%= render :partial => 'take_action' %>
</section>
<!-- <section class="whitespace"></section> -->
<!-- Cart section -->
<section id="cart" class="cart-section cover">
<%= render :partial => 'cart_section' %>
</section>
<section class="whitespace"></section>
<!-- Footer -->
<footer>
<%= render :partial => 'footer' %>
</footer>
| Comment out some divs that create whitespace in index file | Comment out some divs that create whitespace in index file
| HTML+ERB | mit | fma2/cfe-money,fma2/cfe-money,fma2/cfe-money | html+erb | ## Code Before:
<!-- Navigation -->
<%= render :partial => 'navigation' %>
<!-- Header -->
<header id="top" class="header cover">
<%= render :partial => 'header' %>
</header>
<section class="whitespace"></section>
<!-- School search results -->
<section id="school-info-section" class="results-section cover">
<%= render :partial => 'school_info_section' %>
</section>
<section class="whitespace"></section>
<!-- Take action section -->
<section id="take-action-section" class="take-action-section cover">
<%= render :partial => 'take_action' %>
</section>
<section class="whitespace"></section>
<!-- Cart section -->
<section id="cart" class="cart-section cover">
<%= render :partial => 'cart_section' %>
</section>
<section class="whitespace"></section>
<!-- Footer -->
<footer>
<%= render :partial => 'footer' %>
</footer>
## Instruction:
Comment out some divs that create whitespace in index file
## Code After:
<!-- Navigation -->
<%= render :partial => 'navigation' %>
<!-- Header -->
<header id="top" class="header cover">
<%= render :partial => 'header' %>
</header>
<section class="whitespace"></section>
<!-- School search results -->
<section id="school-info-section" class="results-section cover">
<%= render :partial => 'school_info_section' %>
</section>
<!-- <section class="whitespace"></section> -->
<!-- Take action section -->
<section id="take-action-section" class="take-action-section cover">
<%= render :partial => 'take_action' %>
</section>
<!-- <section class="whitespace"></section> -->
<!-- Cart section -->
<section id="cart" class="cart-section cover">
<%= render :partial => 'cart_section' %>
</section>
<section class="whitespace"></section>
<!-- Footer -->
<footer>
<%= render :partial => 'footer' %>
</footer>
|
6b3fdb8c9b5bea403eb323951514f6607fc8ed67 | chap02/build.sbt | chap02/build.sbt | name := "S4DS"
organization := "s4ds"
version := "0.1.0-SNAPSHOT"
scalaVersion := "2.11.6"
resolvers ++= Seq(
"Sonatype OSS Releases" at "http://oss.sonatype.org/content/repositories/releases/",
"Sonatype OSS Snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/"
)
libraryDependencies ++= Seq(
"org.scalanlp" %% "breeze" % "0.11.2",
"org.scalanlp" %% "breeze-natives" % "0.11.2",
"org.slf4j" % "slf4j-simple" % "1.7.5"
)
| name := "S4DS"
organization := "s4ds"
version := "0.1.0-SNAPSHOT"
scalaVersion := "2.11.7"
libraryDependencies ++= Seq(
"org.scalanlp" %% "breeze" % "0.11.2",
"org.scalanlp" %% "breeze-natives" % "0.11.2",
"org.slf4j" % "slf4j-simple" % "1.7.5"
)
| Remove unnecessary resolvers and bump Scala version. | CHAP02: Remove unnecessary resolvers and bump Scala version.
| Scala | apache-2.0 | pbugnion/s4ds,pbugnion/s4ds,pbugnion/s4ds,pbugnion/s4ds | scala | ## Code Before:
name := "S4DS"
organization := "s4ds"
version := "0.1.0-SNAPSHOT"
scalaVersion := "2.11.6"
resolvers ++= Seq(
"Sonatype OSS Releases" at "http://oss.sonatype.org/content/repositories/releases/",
"Sonatype OSS Snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/"
)
libraryDependencies ++= Seq(
"org.scalanlp" %% "breeze" % "0.11.2",
"org.scalanlp" %% "breeze-natives" % "0.11.2",
"org.slf4j" % "slf4j-simple" % "1.7.5"
)
## Instruction:
CHAP02: Remove unnecessary resolvers and bump Scala version.
## Code After:
name := "S4DS"
organization := "s4ds"
version := "0.1.0-SNAPSHOT"
scalaVersion := "2.11.7"
libraryDependencies ++= Seq(
"org.scalanlp" %% "breeze" % "0.11.2",
"org.scalanlp" %% "breeze-natives" % "0.11.2",
"org.slf4j" % "slf4j-simple" % "1.7.5"
)
|
0668b59d8ec73e80976928706f96922605fe4f67 | tsserver/models.py | tsserver/models.py | from tsserver import db
from tsserver.dtutils import datetime_to_str
class Telemetry(db.Model):
"""
All the data that is going to be obtained in regular time intervals
(every second or so).
"""
id = db.Column(db.Integer, primary_key=True)
timestamp = db.Column(db.DateTime)
temperature = db.Column(db.Float)
pressure = db.Column(db.Float)
def __init__(self, timestamp, temperature, pressure):
self.timestamp = timestamp
self.temperature = temperature
self.pressure = pressure
def as_dict(self):
return {'timestamp': datetime_to_str(self.timestamp),
'temperature': self.temperature,
'pressure': self.pressure}
| from tsserver import db
from tsserver.dtutils import datetime_to_str
class Telemetry(db.Model):
"""
All the data that is going to be obtained in regular time intervals
(every second or so).
"""
timestamp = db.Column(db.DateTime, primary_key=True)
temperature = db.Column(db.Float)
pressure = db.Column(db.Float)
def __init__(self, timestamp, temperature, pressure):
self.timestamp = timestamp
self.temperature = temperature
self.pressure = pressure
def as_dict(self):
return {'timestamp': datetime_to_str(self.timestamp),
'temperature': self.temperature,
'pressure': self.pressure}
| Remove integer ID in Telemetry model | Remove integer ID in Telemetry model
| Python | mit | m4tx/techswarm-server | python | ## Code Before:
from tsserver import db
from tsserver.dtutils import datetime_to_str
class Telemetry(db.Model):
"""
All the data that is going to be obtained in regular time intervals
(every second or so).
"""
id = db.Column(db.Integer, primary_key=True)
timestamp = db.Column(db.DateTime)
temperature = db.Column(db.Float)
pressure = db.Column(db.Float)
def __init__(self, timestamp, temperature, pressure):
self.timestamp = timestamp
self.temperature = temperature
self.pressure = pressure
def as_dict(self):
return {'timestamp': datetime_to_str(self.timestamp),
'temperature': self.temperature,
'pressure': self.pressure}
## Instruction:
Remove integer ID in Telemetry model
## Code After:
from tsserver import db
from tsserver.dtutils import datetime_to_str
class Telemetry(db.Model):
"""
All the data that is going to be obtained in regular time intervals
(every second or so).
"""
timestamp = db.Column(db.DateTime, primary_key=True)
temperature = db.Column(db.Float)
pressure = db.Column(db.Float)
def __init__(self, timestamp, temperature, pressure):
self.timestamp = timestamp
self.temperature = temperature
self.pressure = pressure
def as_dict(self):
return {'timestamp': datetime_to_str(self.timestamp),
'temperature': self.temperature,
'pressure': self.pressure}
|
dd6884469b2b47b5eecd0349fd5e9c3e373f77b0 | 6.1.3.42/Dockerfile | 6.1.3.42/Dockerfile | FROM debian:jessie
MAINTAINER herloct <[email protected]>
RUN apt-get update
RUN apt-get install -y openjdk-7-jre-headless ruby unzip curl
RUN useradd -ms /bin/bash sencha
RUN cd && cp -R .bashrc .profile /home/sencha
RUN mkdir -p /home/sencha/app
ADD . /home/sencha/app
RUN chown -R sencha:sencha /home/sencha
USER sencha
ENV HOME /home/sencha
RUN curl -o /home/sencha/cmd.sh.zip http://cdn.sencha.com/cmd/6.1.3/no-jre/SenchaCmd-6.1.3-linux-amd64.sh.zip
RUN unzip -p /home/sencha/cmd.sh.zip > /home/sencha/cmd-install.sh && \
chmod +x /home/sencha/cmd-install.sh && \
/home/sencha/cmd-install.sh -q && \
rm /home/sencha/cmd*
WORKDIR /home/sencha/app
EXPOSE 1841
ENTRYPOINT ["/home/sencha/bin/Sencha/Cmd/6.1.3.42/sencha"]
CMD ["help"]
| FROM debian:jessie
MAINTAINER herloct <[email protected]>
RUN apt-get update && \
apt-get install -y \
curl \
openjdk-7-jre-headless \
ruby \
unzip
RUN useradd -m sencha && \
cd && cp -R .bashrc .profile /home/sencha && \
mkdir -p /project && \
chown -R sencha:sencha /home/sencha /project
USER sencha
ENV HOME /home/sencha
RUN curl -o /home/sencha/cmd.sh.zip http://cdn.sencha.com/cmd/6.1.3/no-jre/SenchaCmd-6.1.3-linux-amd64.sh.zip && \
unzip -p /home/sencha/cmd.sh.zip > /home/sencha/cmd-install.sh && \
chmod +x /home/sencha/cmd-install.sh && \
/home/sencha/cmd-install.sh -q && \
rm /home/sencha/cmd*
ENV PATH /home/sencha/bin/Sencha/Cmd/6.1.3.42/:$PATH
VOLUME /project
WORKDIR /project
EXPOSE 1841
ENTRYPOINT ["sencha"]
CMD ["help"]
| Simplify layers, use `/project` instead of `/home/sencha/app`, use VOLUME instead of ADD | Simplify layers, use `/project` instead of `/home/sencha/app`, use VOLUME instead of ADD
| unknown | mit | herloct/docker-sencha-cmd | unknown | ## Code Before:
FROM debian:jessie
MAINTAINER herloct <[email protected]>
RUN apt-get update
RUN apt-get install -y openjdk-7-jre-headless ruby unzip curl
RUN useradd -ms /bin/bash sencha
RUN cd && cp -R .bashrc .profile /home/sencha
RUN mkdir -p /home/sencha/app
ADD . /home/sencha/app
RUN chown -R sencha:sencha /home/sencha
USER sencha
ENV HOME /home/sencha
RUN curl -o /home/sencha/cmd.sh.zip http://cdn.sencha.com/cmd/6.1.3/no-jre/SenchaCmd-6.1.3-linux-amd64.sh.zip
RUN unzip -p /home/sencha/cmd.sh.zip > /home/sencha/cmd-install.sh && \
chmod +x /home/sencha/cmd-install.sh && \
/home/sencha/cmd-install.sh -q && \
rm /home/sencha/cmd*
WORKDIR /home/sencha/app
EXPOSE 1841
ENTRYPOINT ["/home/sencha/bin/Sencha/Cmd/6.1.3.42/sencha"]
CMD ["help"]
## Instruction:
Simplify layers, use `/project` instead of `/home/sencha/app`, use VOLUME instead of ADD
## Code After:
FROM debian:jessie
MAINTAINER herloct <[email protected]>
RUN apt-get update && \
apt-get install -y \
curl \
openjdk-7-jre-headless \
ruby \
unzip
RUN useradd -m sencha && \
cd && cp -R .bashrc .profile /home/sencha && \
mkdir -p /project && \
chown -R sencha:sencha /home/sencha /project
USER sencha
ENV HOME /home/sencha
RUN curl -o /home/sencha/cmd.sh.zip http://cdn.sencha.com/cmd/6.1.3/no-jre/SenchaCmd-6.1.3-linux-amd64.sh.zip && \
unzip -p /home/sencha/cmd.sh.zip > /home/sencha/cmd-install.sh && \
chmod +x /home/sencha/cmd-install.sh && \
/home/sencha/cmd-install.sh -q && \
rm /home/sencha/cmd*
ENV PATH /home/sencha/bin/Sencha/Cmd/6.1.3.42/:$PATH
VOLUME /project
WORKDIR /project
EXPOSE 1841
ENTRYPOINT ["sencha"]
CMD ["help"]
|
e9212c1b12613b67a8f8714ed4c2874fcbab8445 | flags/sanitize_thread.cmake | flags/sanitize_thread.cmake |
if(DEFINED POLLY_FLAGS_SANITIZE_THREAD_CMAKE_)
return()
else()
set(POLLY_FLAGS_SANITIZE_THREAD_CMAKE_ 1)
endif()
include(polly_add_cache_flag)
polly_add_cache_flag(CMAKE_CXX_FLAGS "-fsanitize=thread")
polly_add_cache_flag(CMAKE_CXX_FLAGS "-fPIE")
polly_add_cache_flag(CMAKE_CXX_FLAGS "-pie")
polly_add_cache_flag(CMAKE_CXX_FLAGS "-g")
polly_add_cache_flag(CMAKE_C_FLAGS "-fsanitize=thread")
polly_add_cache_flag(CMAKE_C_FLAGS "-fPIE")
polly_add_cache_flag(CMAKE_C_FLAGS "-pie")
polly_add_cache_flag(CMAKE_C_FLAGS "-g")
|
if(DEFINED POLLY_FLAGS_SANITIZE_THREAD_CMAKE_)
return()
else()
set(POLLY_FLAGS_SANITIZE_THREAD_CMAKE_ 1)
endif()
include(polly_add_cache_flag)
polly_add_cache_flag(CMAKE_CXX_FLAGS "-fsanitize=thread")
polly_add_cache_flag(CMAKE_CXX_FLAGS "-g")
polly_add_cache_flag(CMAKE_C_FLAGS "-fsanitize=thread")
polly_add_cache_flag(CMAKE_C_FLAGS "-g")
# NOTE:
#
# PIE flags removed because it's not a requirement anymore:
# * https://github.com/google/sanitizers/issues/503#issuecomment-137946595
#
# With PIE flags sanitizer doesn't work on Ubuntu 14.04/16.04
# producing runtime error "ThreadSanitizer: unexpected memory mapping":
# * https://github.com/google/sanitizers/issues/503
| Remove 'PIE' for Clang ThreadSanitizer | Remove 'PIE' for Clang ThreadSanitizer
| CMake | bsd-2-clause | idscan/polly,idscan/polly | cmake | ## Code Before:
if(DEFINED POLLY_FLAGS_SANITIZE_THREAD_CMAKE_)
return()
else()
set(POLLY_FLAGS_SANITIZE_THREAD_CMAKE_ 1)
endif()
include(polly_add_cache_flag)
polly_add_cache_flag(CMAKE_CXX_FLAGS "-fsanitize=thread")
polly_add_cache_flag(CMAKE_CXX_FLAGS "-fPIE")
polly_add_cache_flag(CMAKE_CXX_FLAGS "-pie")
polly_add_cache_flag(CMAKE_CXX_FLAGS "-g")
polly_add_cache_flag(CMAKE_C_FLAGS "-fsanitize=thread")
polly_add_cache_flag(CMAKE_C_FLAGS "-fPIE")
polly_add_cache_flag(CMAKE_C_FLAGS "-pie")
polly_add_cache_flag(CMAKE_C_FLAGS "-g")
## Instruction:
Remove 'PIE' for Clang ThreadSanitizer
## Code After:
if(DEFINED POLLY_FLAGS_SANITIZE_THREAD_CMAKE_)
return()
else()
set(POLLY_FLAGS_SANITIZE_THREAD_CMAKE_ 1)
endif()
include(polly_add_cache_flag)
polly_add_cache_flag(CMAKE_CXX_FLAGS "-fsanitize=thread")
polly_add_cache_flag(CMAKE_CXX_FLAGS "-g")
polly_add_cache_flag(CMAKE_C_FLAGS "-fsanitize=thread")
polly_add_cache_flag(CMAKE_C_FLAGS "-g")
# NOTE:
#
# PIE flags removed because it's not a requirement anymore:
# * https://github.com/google/sanitizers/issues/503#issuecomment-137946595
#
# With PIE flags sanitizer doesn't work on Ubuntu 14.04/16.04
# producing runtime error "ThreadSanitizer: unexpected memory mapping":
# * https://github.com/google/sanitizers/issues/503
|
684d1e6d4c2e11407ac0eb0333a89e1c4d50a058 | app/assets/stylesheets/src_images.css.scss | app/assets/stylesheets/src_images.css.scss | // Place all the styles related to the SrcImages controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
.selected {
background-color: #ffb700;
}
.input-prepend {
margin-top: 10px;
}
.under-construction {
color: #999;
background-color: black;
text-align: center;
}
.under-construction-icon {
color: white;
}
#load-urls {
width: 32em;
}
| $orange: #ffb700;
$lightgrey: #f5f5f5;
$darkgrey: #e3e3e3;
.thumb-index .selected {
background-color: $orange;
}
.input-prepend {
margin-top: 10px;
}
.under-construction {
color: #999;
background-color: black;
text-align: center;
}
.under-construction-icon {
color: white;
}
#load-urls {
width: 32em;
}
.thumb-index {
background-color: darken($lightgrey, 4%);
border: 1px solid darken($darkgrey, 4%);
}
.thumbnail {
background-color: $lightgrey;
}
| Change thumbnail index background and thumbnail selected color. | Change thumbnail index background and thumbnail selected color.
| SCSS | mit | mmb/meme_captain_web,patrickmcguire/meme,mmb/meme_captain_web,mmb/meme_captain_web,mmb/meme_captain_web,patrickmcguire/meme | scss | ## Code Before:
// Place all the styles related to the SrcImages controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
.selected {
background-color: #ffb700;
}
.input-prepend {
margin-top: 10px;
}
.under-construction {
color: #999;
background-color: black;
text-align: center;
}
.under-construction-icon {
color: white;
}
#load-urls {
width: 32em;
}
## Instruction:
Change thumbnail index background and thumbnail selected color.
## Code After:
$orange: #ffb700;
$lightgrey: #f5f5f5;
$darkgrey: #e3e3e3;
.thumb-index .selected {
background-color: $orange;
}
.input-prepend {
margin-top: 10px;
}
.under-construction {
color: #999;
background-color: black;
text-align: center;
}
.under-construction-icon {
color: white;
}
#load-urls {
width: 32em;
}
.thumb-index {
background-color: darken($lightgrey, 4%);
border: 1px solid darken($darkgrey, 4%);
}
.thumbnail {
background-color: $lightgrey;
}
|
5b07b5a7ee4c0e62c3667b8b251609ad9903254e | README.md | README.md | NRules is a production rules engine for .NET, based on the [Rete](http://www.wikipedia.org/wiki/Rete_algorithm) matching algorithm.
## Installing NRules
First, [install NuGet](http://docs.nuget.org/docs/start-here/installing-nuget). Then, install NRules from the Package Manager Console:
PM> Install-Package NRules
## Getting Started
See [Getting Started](https://github.com/snikolayev/NRules/wiki/Getting-Started) guide on NRules [wiki](https://github.com/snikolayev/NRules/wiki).
Or check out the [discussion group](http://groups.google.com/group/nrules-users).
--
Copyright © 2012-2014 [Sergiy Nikolayev](http://sergiynikolayev.com) under the [MIT license](LICENSE.txt).
| NRules is a production rules engine for .NET, based on the [Rete](http://www.wikipedia.org/wiki/Rete_algorithm) matching algorithm.
## Installing NRules
First, [install NuGet](http://docs.nuget.org/docs/start-here/installing-nuget). Then, install NRules from the Package Manager Console:
PM> Install-Package NRules
## Getting Started
See [Getting Started](https://github.com/NRules/NRules/wiki/Getting-Started) guide on NRules [wiki](https://github.com/NRules/NRules/wiki).
Or check out the [discussion group](http://groups.google.com/group/nrules-users).
--
Copyright © 2012-2014 [Sergiy Nikolayev](http://sergiynikolayev.com) under the [MIT license](LICENSE.txt).
| Fix links in the readme | Fix links in the readme
| Markdown | mit | StanleyGoldman/NRules,StanleyGoldman/NRules,NRules/NRules,prashanthr/NRules | markdown | ## Code Before:
NRules is a production rules engine for .NET, based on the [Rete](http://www.wikipedia.org/wiki/Rete_algorithm) matching algorithm.
## Installing NRules
First, [install NuGet](http://docs.nuget.org/docs/start-here/installing-nuget). Then, install NRules from the Package Manager Console:
PM> Install-Package NRules
## Getting Started
See [Getting Started](https://github.com/snikolayev/NRules/wiki/Getting-Started) guide on NRules [wiki](https://github.com/snikolayev/NRules/wiki).
Or check out the [discussion group](http://groups.google.com/group/nrules-users).
--
Copyright © 2012-2014 [Sergiy Nikolayev](http://sergiynikolayev.com) under the [MIT license](LICENSE.txt).
## Instruction:
Fix links in the readme
## Code After:
NRules is a production rules engine for .NET, based on the [Rete](http://www.wikipedia.org/wiki/Rete_algorithm) matching algorithm.
## Installing NRules
First, [install NuGet](http://docs.nuget.org/docs/start-here/installing-nuget). Then, install NRules from the Package Manager Console:
PM> Install-Package NRules
## Getting Started
See [Getting Started](https://github.com/NRules/NRules/wiki/Getting-Started) guide on NRules [wiki](https://github.com/NRules/NRules/wiki).
Or check out the [discussion group](http://groups.google.com/group/nrules-users).
--
Copyright © 2012-2014 [Sergiy Nikolayev](http://sergiynikolayev.com) under the [MIT license](LICENSE.txt).
|
7e22f75e736289f71fddb73e22998c7a2369c8fb | common/patches.rb | common/patches.rb | class Array
def find_property(property, value)
find { |e| e[property.to_s] && e[property.to_s] == value }
end
end | class Array
def find_property(property, value)
find { |e| e.send(property) == value }
end
end | Fix the find_property patch to work for objects and not just hashes | Fix the find_property patch to work for objects and not just hashes
| Ruby | apache-2.0 | meew0/l- | ruby | ## Code Before:
class Array
def find_property(property, value)
find { |e| e[property.to_s] && e[property.to_s] == value }
end
end
## Instruction:
Fix the find_property patch to work for objects and not just hashes
## Code After:
class Array
def find_property(property, value)
find { |e| e.send(property) == value }
end
end |
bb077319a0ff4007ead81bdcd92c3174692f5bd5 | .travis.yml | .travis.yml | dist: trusty
sudo: false
language: cpp
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
script:
- /usr/bin/g++-7 -dumpfullversion
- make clean all V=1 CXX=/usr/bin/g++-7 CC=/usr/bin/gcc-7
- for i in bin/*; do ${i}; done
| dist: trusty
sudo: false
language: cpp
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- cppcheck
script:
- /usr/bin/g++-7 -dumpfullversion
- make clean all V=1 CXX=/usr/bin/g++-7 CC=/usr/bin/gcc-7
- for i in bin/*; do ${i}; done
| Install Cppcheck on Travis CI. | Install Cppcheck on Travis CI.
tab
| YAML | mit | mpoullet/cpp-snippets,mpoullet/cpp-snippets | yaml | ## Code Before:
dist: trusty
sudo: false
language: cpp
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
script:
- /usr/bin/g++-7 -dumpfullversion
- make clean all V=1 CXX=/usr/bin/g++-7 CC=/usr/bin/gcc-7
- for i in bin/*; do ${i}; done
## Instruction:
Install Cppcheck on Travis CI.
tab
## Code After:
dist: trusty
sudo: false
language: cpp
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- cppcheck
script:
- /usr/bin/g++-7 -dumpfullversion
- make clean all V=1 CXX=/usr/bin/g++-7 CC=/usr/bin/gcc-7
- for i in bin/*; do ${i}; done
|
85205ec6e05db9ddc6a44699d541dabbd538dfad | src/test/scala/bio/db/fasta/fastareader_spec.scala | src/test/scala/bio/db/fasta/fastareader_spec.scala | import bio._
import org.scalatest.FlatSpec
import org.scalatest.matchers.ShouldMatchers
package bio.test {
class FastaReaderSpec extends FlatSpec with ShouldMatchers {
"FastaReader" should "read from file" in {
val f = new FastaReader("./test/data/fasta/nt.fa")
val ids = f.map { res =>
val (id,tag,dna) = res
id
}.toList
ids.head should equal ("PUT-157a-Arabidopsis_thaliana-1")
}
"FastaReader" should "balk on nucleotide N with standard Sequence" in {
val f = new FastaReader("./test/data/fasta/nt.fa")
evaluating {
val ids = f.map { res =>
val (id,tag,dna) = res
new DNA.Sequence(id,tag,dna)
}.toList
true
} should produce [IllegalArgumentException]
true
}
}
}
| import bio._
import org.scalatest.FlatSpec
import org.scalatest.matchers.ShouldMatchers
package bio.test {
class FastaReaderSpec extends FlatSpec with ShouldMatchers {
"FastaReader" should "read from file" in {
val f = new FastaReader("./test/data/fasta/nt.fa")
val ids = f.map { res =>
val (id,tag,dna) = res
id
}.toList
ids.head should equal ("PUT-157a-Arabidopsis_thaliana-1")
}
"FastaReader" should "balk on nucleotide N with standard Sequence" in {
val f = new FastaReader("./test/data/fasta/nt.fa")
evaluating {
val seqs = f.map { res =>
val (id,tag,dna) = res
new DNA.Sequence(id,tag,dna)
}.toList
true
} should produce [IllegalArgumentException]
true
}
"FastaReader" should "convert to IUPACSequence" in {
val f = new FastaReader("./test/data/fasta/nt.fa")
val seqs = f.map { res =>
val (id,tag,dna) = res
new DNA.IUPACSequence(id,tag,dna)
}.toList
seqs.head.id.toString should equal ("PUT-157a-Arabidopsis_thaliana-1")
}
}
}
| Read FASTA into IUPACSequence works fine | Read FASTA into IUPACSequence works fine
| Scala | bsd-2-clause | shamim8888/bioscala,shamim8888/bioscala,bioscala/bioscala,bioscala/bioscala | scala | ## Code Before:
import bio._
import org.scalatest.FlatSpec
import org.scalatest.matchers.ShouldMatchers
package bio.test {
class FastaReaderSpec extends FlatSpec with ShouldMatchers {
"FastaReader" should "read from file" in {
val f = new FastaReader("./test/data/fasta/nt.fa")
val ids = f.map { res =>
val (id,tag,dna) = res
id
}.toList
ids.head should equal ("PUT-157a-Arabidopsis_thaliana-1")
}
"FastaReader" should "balk on nucleotide N with standard Sequence" in {
val f = new FastaReader("./test/data/fasta/nt.fa")
evaluating {
val ids = f.map { res =>
val (id,tag,dna) = res
new DNA.Sequence(id,tag,dna)
}.toList
true
} should produce [IllegalArgumentException]
true
}
}
}
## Instruction:
Read FASTA into IUPACSequence works fine
## Code After:
import bio._
import org.scalatest.FlatSpec
import org.scalatest.matchers.ShouldMatchers
package bio.test {
class FastaReaderSpec extends FlatSpec with ShouldMatchers {
"FastaReader" should "read from file" in {
val f = new FastaReader("./test/data/fasta/nt.fa")
val ids = f.map { res =>
val (id,tag,dna) = res
id
}.toList
ids.head should equal ("PUT-157a-Arabidopsis_thaliana-1")
}
"FastaReader" should "balk on nucleotide N with standard Sequence" in {
val f = new FastaReader("./test/data/fasta/nt.fa")
evaluating {
val seqs = f.map { res =>
val (id,tag,dna) = res
new DNA.Sequence(id,tag,dna)
}.toList
true
} should produce [IllegalArgumentException]
true
}
"FastaReader" should "convert to IUPACSequence" in {
val f = new FastaReader("./test/data/fasta/nt.fa")
val seqs = f.map { res =>
val (id,tag,dna) = res
new DNA.IUPACSequence(id,tag,dna)
}.toList
seqs.head.id.toString should equal ("PUT-157a-Arabidopsis_thaliana-1")
}
}
}
|
2134ef5591fc3c4f8d2fa57dc0e9a3e5e53837e4 | src/business/UsersService.js | src/business/UsersService.js | 'use strict';
const bcrypt = require('bcrypt-nodejs');
class UsersService {
constructor(options, usersRepository) {
const self = this;
self._options = options;
self.usersRepository = usersRepository;
}
getUserById(id, callback) {
const self = this;
self.usersRepository.findUserById(id, callback);
}
createUser(user, password, callback) {
const self = this;
bcrypt.genSalt(self._options.saltIterations(), function (saltErr, salt) {
if (saltErr) {
return callback(saltErr);
}
bcrypt.hash(password, salt, null, function (hashErr, hashedPassword) {
if (hashErr) {
return callback(hashErr);
}
user.password = hashedPassword;
self.usersRepository.saveUser(user, callback);
});
});
}
}
module.exports = UsersService;
| 'use strict';
const bcrypt = require('bcrypt-nodejs');
class UsersService {
constructor(options, usersRepository) {
const self = this;
self._options = options;
self.usersRepository = usersRepository;
}
getUserById(id, callback) {
const self = this;
self.usersRepository.findUserById(id, callback);
}
createUser(user, password, callback) {
const self = this;
bcrypt.genSalt(self._options.saltIterations(), function (saltErr, salt) {
if (saltErr) {
return callback(saltErr);
}
bcrypt.hash(password, salt, null, function (hashErr, hashedPassword) {
if (hashErr) {
return callback(hashErr);
}
user.displayName = user.displayName || user.username;
user.password = hashedPassword;
self.usersRepository.saveUser(user, callback);
});
});
}
}
module.exports = UsersService;
| Set user service to always create a display name if one is not supplied | Set user service to always create a display name if one is not supplied
| JavaScript | mit | andrewaramsay/aramsay-server | javascript | ## Code Before:
'use strict';
const bcrypt = require('bcrypt-nodejs');
class UsersService {
constructor(options, usersRepository) {
const self = this;
self._options = options;
self.usersRepository = usersRepository;
}
getUserById(id, callback) {
const self = this;
self.usersRepository.findUserById(id, callback);
}
createUser(user, password, callback) {
const self = this;
bcrypt.genSalt(self._options.saltIterations(), function (saltErr, salt) {
if (saltErr) {
return callback(saltErr);
}
bcrypt.hash(password, salt, null, function (hashErr, hashedPassword) {
if (hashErr) {
return callback(hashErr);
}
user.password = hashedPassword;
self.usersRepository.saveUser(user, callback);
});
});
}
}
module.exports = UsersService;
## Instruction:
Set user service to always create a display name if one is not supplied
## Code After:
'use strict';
const bcrypt = require('bcrypt-nodejs');
class UsersService {
constructor(options, usersRepository) {
const self = this;
self._options = options;
self.usersRepository = usersRepository;
}
getUserById(id, callback) {
const self = this;
self.usersRepository.findUserById(id, callback);
}
createUser(user, password, callback) {
const self = this;
bcrypt.genSalt(self._options.saltIterations(), function (saltErr, salt) {
if (saltErr) {
return callback(saltErr);
}
bcrypt.hash(password, salt, null, function (hashErr, hashedPassword) {
if (hashErr) {
return callback(hashErr);
}
user.displayName = user.displayName || user.username;
user.password = hashedPassword;
self.usersRepository.saveUser(user, callback);
});
});
}
}
module.exports = UsersService;
|
a7c1a438b431d5d97ca89121575a5de33221f064 | test/org/zalando/stups/friboo/system/cron_test.clj | test/org/zalando/stups/friboo/system/cron_test.clj | (ns org.zalando.stups.friboo.system.cron-test
(:require [org.zalando.stups.friboo.system.cron :refer :all]
[clojure.test :refer :all]
[overtone.at-at :as at]
[com.stuartsierra.component :as component]))
(def-cron-component TestCron [state]
(at/at (at/now) (job deliver state 42) pool))
(deftest test-cron-component-lifecycle
;; Here we make sure that the component is started and stopped properly.
(let [state (promise)
cron-component (map->TestCron {:state state})]
(-> cron-component
component/start
component/stop
component/stop) ; stopping twice shouldn't break anything
(is (= 42 (deref state 500 :not-delivered)))))
| (ns org.zalando.stups.friboo.system.cron-test
(:require [org.zalando.stups.friboo.system.cron :refer :all]
[clojure.test :refer :all]
[overtone.at-at :as at]
[com.stuartsierra.component :as component]))
(def-cron-component TestCron [state]
(at/at (at/now) (job deliver state 42) pool))
(deftest test-cron-component-lifecycle
;; Here we make sure that the component is started and stopped properly.
(let [state (promise)
cron-component (component/start (map->TestCron {:state state}))]
(is (= 42 (deref state 500 :not-delivered)))
(-> cron-component
component/stop
component/stop))) ; stopping twice shouldn't break anything
| Fix race condition in unit test | Fix race condition in unit test
Multithreading is tricky... :/
| Clojure | apache-2.0 | zalando-stups/friboo,zalando-stups/friboo,zalando-stups/friboo | clojure | ## Code Before:
(ns org.zalando.stups.friboo.system.cron-test
(:require [org.zalando.stups.friboo.system.cron :refer :all]
[clojure.test :refer :all]
[overtone.at-at :as at]
[com.stuartsierra.component :as component]))
(def-cron-component TestCron [state]
(at/at (at/now) (job deliver state 42) pool))
(deftest test-cron-component-lifecycle
;; Here we make sure that the component is started and stopped properly.
(let [state (promise)
cron-component (map->TestCron {:state state})]
(-> cron-component
component/start
component/stop
component/stop) ; stopping twice shouldn't break anything
(is (= 42 (deref state 500 :not-delivered)))))
## Instruction:
Fix race condition in unit test
Multithreading is tricky... :/
## Code After:
(ns org.zalando.stups.friboo.system.cron-test
(:require [org.zalando.stups.friboo.system.cron :refer :all]
[clojure.test :refer :all]
[overtone.at-at :as at]
[com.stuartsierra.component :as component]))
(def-cron-component TestCron [state]
(at/at (at/now) (job deliver state 42) pool))
(deftest test-cron-component-lifecycle
;; Here we make sure that the component is started and stopped properly.
(let [state (promise)
cron-component (component/start (map->TestCron {:state state}))]
(is (= 42 (deref state 500 :not-delivered)))
(-> cron-component
component/stop
component/stop))) ; stopping twice shouldn't break anything
|
a410bfe7be49c8c2e879685a5dea6d60110d7b73 | package.json | package.json | {
"name": "tempoiq",
"description": "TempoIQ HTTP NodeJS Client",
"version": "1.0.1",
"author": "TempoIQ Tech <[email protected]>",
"keywords": ["tempoiq", "time-series", "database"],
"main": "lib/tempoiq.js",
"devDependencies": {
"mocha": "1.21.4"
},
"scripts": {
"test": "mocha"
},
"repository": {
"type": "git",
"url": "http://github.com/tempoiq/tempoiq-node-js.git"
}
}
| {
"name": "tempoiq",
"description": "TempoIQ HTTP NodeJS Client",
"version": "1.0.1",
"author": "TempoIQ <[email protected]>",
"keywords": ["tempoiq", "time-series", "database"],
"main": "lib/tempoiq.js",
"devDependencies": {
"mocha": "1.21.4"
},
"scripts": {
"test": "mocha"
},
"repository": {
"type": "git",
"url": "http://github.com/tempoiq/tempoiq-node-js.git"
}
}
| Update contact email to support@ | Update contact email to support@
| JSON | mit | meshulam/tempoiq-node-js,TempoIQ/tempoiq-node-js | json | ## Code Before:
{
"name": "tempoiq",
"description": "TempoIQ HTTP NodeJS Client",
"version": "1.0.1",
"author": "TempoIQ Tech <[email protected]>",
"keywords": ["tempoiq", "time-series", "database"],
"main": "lib/tempoiq.js",
"devDependencies": {
"mocha": "1.21.4"
},
"scripts": {
"test": "mocha"
},
"repository": {
"type": "git",
"url": "http://github.com/tempoiq/tempoiq-node-js.git"
}
}
## Instruction:
Update contact email to support@
## Code After:
{
"name": "tempoiq",
"description": "TempoIQ HTTP NodeJS Client",
"version": "1.0.1",
"author": "TempoIQ <[email protected]>",
"keywords": ["tempoiq", "time-series", "database"],
"main": "lib/tempoiq.js",
"devDependencies": {
"mocha": "1.21.4"
},
"scripts": {
"test": "mocha"
},
"repository": {
"type": "git",
"url": "http://github.com/tempoiq/tempoiq-node-js.git"
}
}
|
74a023de9af71822ac565ce384a496c3f50c2ffa | server/models/Category/utils.js | server/models/Category/utils.js | function generateTree(dataArr, root) {
let subTree, directChildren, subDataArr;
let { name, id, articlesCount } = root;
if (dataArr.length === 0) {
return {
id,
name,
articlesCount,
subCategories: []
};
}
directChildren = dataArr.filter((node) => { return node.parentId === root.id; });
subDataArr = dataArr.filter((node) => { return node.parentId !== root.id; });
subTree = directChildren.map((node) => {
return generateTree(subDataArr, node);
});
return {
id,
name,
articlesCount,
subCategories: subTree
};
}
function transformToTree(dataArr) {
let root = dataArr.filter((node) => { return !node.parentId; })[0],
rest = dataArr.filter((node) => { return node.parentId; });
return generateTree(rest, root);
}
export { transformToTree };
| function generateTree(dataArr, root) {
let subTree, directChildren, subDataArr;
let { name, id, articlesCount } = root;
if (Object.keys(root).length === 0) {
return {};
}
if (dataArr.length === 0) {
return {
id,
name,
articlesCount,
subCategories: []
};
}
directChildren = dataArr.filter((node) => { return node.parentId === root.id; });
subDataArr = dataArr.filter((node) => { return node.parentId !== root.id; });
subTree = directChildren.map((node) => {
return generateTree(subDataArr, node);
});
return {
id,
name,
articlesCount,
subCategories: subTree
};
}
function transformToTree(dataArr) {
let root = dataArr.filter((node) => { return !node.parentId; })[0],
rest = dataArr.filter((node) => { return node.parentId; });
return generateTree(rest, root);
}
export { transformToTree };
| Enhance generateTree function by adding edge condition for root | Enhance generateTree function by adding edge condition for root
| JavaScript | mit | armaniExchange/work-genius,armaniExchange/work-genius,armaniExchange/work-genius | javascript | ## Code Before:
function generateTree(dataArr, root) {
let subTree, directChildren, subDataArr;
let { name, id, articlesCount } = root;
if (dataArr.length === 0) {
return {
id,
name,
articlesCount,
subCategories: []
};
}
directChildren = dataArr.filter((node) => { return node.parentId === root.id; });
subDataArr = dataArr.filter((node) => { return node.parentId !== root.id; });
subTree = directChildren.map((node) => {
return generateTree(subDataArr, node);
});
return {
id,
name,
articlesCount,
subCategories: subTree
};
}
function transformToTree(dataArr) {
let root = dataArr.filter((node) => { return !node.parentId; })[0],
rest = dataArr.filter((node) => { return node.parentId; });
return generateTree(rest, root);
}
export { transformToTree };
## Instruction:
Enhance generateTree function by adding edge condition for root
## Code After:
function generateTree(dataArr, root) {
let subTree, directChildren, subDataArr;
let { name, id, articlesCount } = root;
if (Object.keys(root).length === 0) {
return {};
}
if (dataArr.length === 0) {
return {
id,
name,
articlesCount,
subCategories: []
};
}
directChildren = dataArr.filter((node) => { return node.parentId === root.id; });
subDataArr = dataArr.filter((node) => { return node.parentId !== root.id; });
subTree = directChildren.map((node) => {
return generateTree(subDataArr, node);
});
return {
id,
name,
articlesCount,
subCategories: subTree
};
}
function transformToTree(dataArr) {
let root = dataArr.filter((node) => { return !node.parentId; })[0],
rest = dataArr.filter((node) => { return node.parentId; });
return generateTree(rest, root);
}
export { transformToTree };
|
7cd44c5bf480db537c76c3b06f09e83674623261 | test/fixtures/with-directory.js | test/fixtures/with-directory.js | import tempy from 'tempy'
import fs from 'fs-extra'
export default function (test) {
test.beforeEach(async (t) => {
const directory = tempy.directory()
await fs.ensureDir(directory)
Object.assign(t.context, {directory})
})
test.afterEach.always(async (t) => {
const {directory} = t.context
await fs.remove(directory)
})
}
| import {temporaryDirectory} from 'tempy'
import fs from 'fs-extra'
export default function (test) {
test.beforeEach(async (t) => {
const directory = temporaryDirectory()
await fs.ensureDir(directory)
Object.assign(t.context, {directory})
})
test.afterEach.always(async (t) => {
const {directory} = t.context
await fs.remove(directory)
})
}
| Fix breaking usages of an updated version of tempy | test(withDirectory): Fix breaking usages of an updated version of tempy
| JavaScript | mit | vinsonchuong/create-npm | javascript | ## Code Before:
import tempy from 'tempy'
import fs from 'fs-extra'
export default function (test) {
test.beforeEach(async (t) => {
const directory = tempy.directory()
await fs.ensureDir(directory)
Object.assign(t.context, {directory})
})
test.afterEach.always(async (t) => {
const {directory} = t.context
await fs.remove(directory)
})
}
## Instruction:
test(withDirectory): Fix breaking usages of an updated version of tempy
## Code After:
import {temporaryDirectory} from 'tempy'
import fs from 'fs-extra'
export default function (test) {
test.beforeEach(async (t) => {
const directory = temporaryDirectory()
await fs.ensureDir(directory)
Object.assign(t.context, {directory})
})
test.afterEach.always(async (t) => {
const {directory} = t.context
await fs.remove(directory)
})
}
|
d75742c0e5bc8059de5081076ab99bd4d5258d55 | CHANGELOG.md | CHANGELOG.md | v1.0.0 / 2015-04-15
-------------------
* Initial release
v1.0.1 / 2015-04-17
-------------------
* Fix crashes in go-jsonselect triggered with e.g. `rsc --x1 ':root ~ .name' ...`
v1.0.2 / 2015-04-19
-------------------
* Update README, add basic example documentation
* Fix `CloudSpecificAttributes` and `DatacenterPolicy` attribute types in cm15 package
v1.0.3 / 2015-04-20
-------------------
* Add rsssh example
* Change datetime attributes of cm15 package resources to use `*RubyTime` instead of `RubyTime`
* Change `CurrentInstance` attribute type in cm15 package to use `*Instance` instead of `Instance`
| v1.0.0 / 2015-04-15
-------------------
* Initial release
v1.0.1 / 2015-04-17
-------------------
* Fix crashes in go-jsonselect triggered with e.g. `rsc --x1 ':root ~ .name' ...`
v1.0.2 / 2015-04-19
-------------------
* Update README, add basic example documentation
* Fix `CloudSpecificAttributes` and `DatacenterPolicy` attribute types in cm15 package
v1.0.3 / 2015-04-20
-------------------
* Add rsssh example
* Change datetime attributes of cm15 package resources to use `*RubyTime` instead of `RubyTime`
* Change `CurrentInstance` attribute type in cm15 package to use `*Instance` instead of `Instance`
v1.0.4 / 2015-04-23
-------------------
* Fix handling of array arguments on the command line
v1.0.5 / 2015-04-30
-------------------
* Add new instance API token authenticator and corresponding "--apiToken" flag
* Fix cm15 package ServerArrayLocator.CurrentInstances()
* Fix crashes in go-jsonselect
* Add tests to package examples
| Update changelog for 1.0.5 release | Update changelog for 1.0.5 release
| Markdown | mit | rightscale/rsc,rightscale/rsc,manuelfelipe/rsc,rgeyer/rsc,manuelfelipe/rsc,lopaka/rsc,dylanmei/rsc,rightscale/rsc,rgeyer/rsc,dylanmei/rsc,lopaka/rsc,lopaka/rsc,lopaka/rsc,dylanmei/rsc,rgeyer/rsc,rgeyer/rsc,rightscale/rsc,rgeyer/rsc,rightscale/rsc,manuelfelipe/rsc,dylanmei/rsc,dylanmei/rsc,manuelfelipe/rsc,lopaka/rsc,manuelfelipe/rsc | markdown | ## Code Before:
v1.0.0 / 2015-04-15
-------------------
* Initial release
v1.0.1 / 2015-04-17
-------------------
* Fix crashes in go-jsonselect triggered with e.g. `rsc --x1 ':root ~ .name' ...`
v1.0.2 / 2015-04-19
-------------------
* Update README, add basic example documentation
* Fix `CloudSpecificAttributes` and `DatacenterPolicy` attribute types in cm15 package
v1.0.3 / 2015-04-20
-------------------
* Add rsssh example
* Change datetime attributes of cm15 package resources to use `*RubyTime` instead of `RubyTime`
* Change `CurrentInstance` attribute type in cm15 package to use `*Instance` instead of `Instance`
## Instruction:
Update changelog for 1.0.5 release
## Code After:
v1.0.0 / 2015-04-15
-------------------
* Initial release
v1.0.1 / 2015-04-17
-------------------
* Fix crashes in go-jsonselect triggered with e.g. `rsc --x1 ':root ~ .name' ...`
v1.0.2 / 2015-04-19
-------------------
* Update README, add basic example documentation
* Fix `CloudSpecificAttributes` and `DatacenterPolicy` attribute types in cm15 package
v1.0.3 / 2015-04-20
-------------------
* Add rsssh example
* Change datetime attributes of cm15 package resources to use `*RubyTime` instead of `RubyTime`
* Change `CurrentInstance` attribute type in cm15 package to use `*Instance` instead of `Instance`
v1.0.4 / 2015-04-23
-------------------
* Fix handling of array arguments on the command line
v1.0.5 / 2015-04-30
-------------------
* Add new instance API token authenticator and corresponding "--apiToken" flag
* Fix cm15 package ServerArrayLocator.CurrentInstances()
* Fix crashes in go-jsonselect
* Add tests to package examples
|
b5853f2a385e88bc345796e9a3b078a3daaa10af | metadata/dmusiolik.pijaret.txt | metadata/dmusiolik.pijaret.txt | Categories:System,Security,Connectivity
License:GPLv3
Web Site:
Source Code:https://github.com/MrFlyingToasterman/Pijaret
Issue Tracker:https://github.com/MrFlyingToasterman/Pijaret/issues
Auto Name:Pijaret
Summary:Encrypt text by rotation
Description:
Pijaret is just another rotation encryption tool. The main purpose is to create
a small encryption tool to make services like Whatsapp or Telegram a bit more
secure. The system is easy to understand. You share a numeric key with your
partner in real life and en/de-crypt some important messages with it. (In case
you don’t go outside you can just tormail your chat partner or stuff)
.
Repo Type:git
Repo:https://github.com/MrFlyingToasterman/Pijaret
Build:1.4,1
commit=1.4
subdir=app
gradle=yes
Auto Update Mode:None
Update Check Mode:Tags
Current Version:1.4
Current Version Code:1
| Categories:System,Security,Connectivity
License:GPLv3
Web Site:
Source Code:https://github.com/MrFlyingToasterman/Pijaret
Issue Tracker:https://github.com/MrFlyingToasterman/Pijaret/issues
Auto Name:Pijaret
Summary:Encrypt text by rotation
Description:
Pijaret is just another rotation encryption tool. The main purpose is to create
a small encryption tool to make services like Whatsapp or Telegram a bit more
secure. The system is easy to understand. You share a numeric key with your
partner in real life and en/de-crypt some important messages with it. (In case
you don’t go outside you can just tormail your chat partner or stuff)
.
Repo Type:git
Repo:https://github.com/MrFlyingToasterman/Pijaret
Build:1.4,1
commit=1.4
subdir=app
gradle=yes
Build:1.4,4
commit=89863e1499aca3a1fc440af21868682a7fafe9b7
subdir=app
gradle=yes
Auto Update Mode:None
Update Check Mode:Tags
Current Version:1.4
Current Version Code:1
| Update Pijaret to 1.4 (4) | Update Pijaret to 1.4 (4)
| Text | agpl-3.0 | f-droid/fdroiddata,f-droid/fdroid-data,f-droid/fdroiddata | text | ## Code Before:
Categories:System,Security,Connectivity
License:GPLv3
Web Site:
Source Code:https://github.com/MrFlyingToasterman/Pijaret
Issue Tracker:https://github.com/MrFlyingToasterman/Pijaret/issues
Auto Name:Pijaret
Summary:Encrypt text by rotation
Description:
Pijaret is just another rotation encryption tool. The main purpose is to create
a small encryption tool to make services like Whatsapp or Telegram a bit more
secure. The system is easy to understand. You share a numeric key with your
partner in real life and en/de-crypt some important messages with it. (In case
you don’t go outside you can just tormail your chat partner or stuff)
.
Repo Type:git
Repo:https://github.com/MrFlyingToasterman/Pijaret
Build:1.4,1
commit=1.4
subdir=app
gradle=yes
Auto Update Mode:None
Update Check Mode:Tags
Current Version:1.4
Current Version Code:1
## Instruction:
Update Pijaret to 1.4 (4)
## Code After:
Categories:System,Security,Connectivity
License:GPLv3
Web Site:
Source Code:https://github.com/MrFlyingToasterman/Pijaret
Issue Tracker:https://github.com/MrFlyingToasterman/Pijaret/issues
Auto Name:Pijaret
Summary:Encrypt text by rotation
Description:
Pijaret is just another rotation encryption tool. The main purpose is to create
a small encryption tool to make services like Whatsapp or Telegram a bit more
secure. The system is easy to understand. You share a numeric key with your
partner in real life and en/de-crypt some important messages with it. (In case
you don’t go outside you can just tormail your chat partner or stuff)
.
Repo Type:git
Repo:https://github.com/MrFlyingToasterman/Pijaret
Build:1.4,1
commit=1.4
subdir=app
gradle=yes
Build:1.4,4
commit=89863e1499aca3a1fc440af21868682a7fafe9b7
subdir=app
gradle=yes
Auto Update Mode:None
Update Check Mode:Tags
Current Version:1.4
Current Version Code:1
|
5fce7ac8e773a13b9b944a9bd31e24a4d48b6832 | src/main/java/info/u_team/u_team_core/item/tool/ToolSet.java | src/main/java/info/u_team/u_team_core/item/tool/ToolSet.java | package info.u_team.u_team_core.item.tool;
import info.u_team.u_team_core.api.registry.IUArrayRegistryType;
import net.minecraft.item.Item;
public class ToolSet implements IUArrayRegistryType<Item> {
private final UAxeItem axe;
private final UHoeItem hoe;
private final UPickaxeItem pickaxe;
private final UShovelItem spade;
private final USwordItem sword;
public ToolSet(UAxeItem axe, UHoeItem hoe, UPickaxeItem pickaxe, UShovelItem spade, USwordItem sword) {
this.axe = axe;
this.hoe = hoe;
this.pickaxe = pickaxe;
this.spade = spade;
this.sword = sword;
}
@Override
public Item[] getArray() {
return new Item[] { axe, hoe, pickaxe, spade, sword };
}
public UAxeItem getAxe() {
return axe;
}
public UHoeItem getHoe() {
return hoe;
}
public UPickaxeItem getPickaxe() {
return pickaxe;
}
public UShovelItem getSpade() {
return spade;
}
public USwordItem getSword() {
return sword;
}
}
| package info.u_team.u_team_core.item.tool;
import info.u_team.u_team_core.api.registry.IUArrayRegistryType;
import net.minecraft.item.Item;
public class ToolSet implements IUArrayRegistryType<Item> {
private final UAxeItem axe;
private final UHoeItem hoe;
private final UPickaxeItem pickaxe;
private final UShovelItem shovel;
private final USwordItem sword;
public ToolSet(UAxeItem axe, UHoeItem hoe, UPickaxeItem pickaxe, UShovelItem shovel, USwordItem sword) {
this.axe = axe;
this.hoe = hoe;
this.pickaxe = pickaxe;
this.shovel = shovel;
this.sword = sword;
}
@Override
public Item[] getArray() {
return new Item[] { axe, hoe, pickaxe, shovel, sword };
}
public UAxeItem getAxe() {
return axe;
}
public UHoeItem getHoe() {
return hoe;
}
public UPickaxeItem getPickaxe() {
return pickaxe;
}
public UShovelItem getShovel() {
return shovel;
}
public USwordItem getSword() {
return sword;
}
}
| Rename all spade variable names to shovel variable names | Rename all spade variable names to shovel variable names
| 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.item.tool;
import info.u_team.u_team_core.api.registry.IUArrayRegistryType;
import net.minecraft.item.Item;
public class ToolSet implements IUArrayRegistryType<Item> {
private final UAxeItem axe;
private final UHoeItem hoe;
private final UPickaxeItem pickaxe;
private final UShovelItem spade;
private final USwordItem sword;
public ToolSet(UAxeItem axe, UHoeItem hoe, UPickaxeItem pickaxe, UShovelItem spade, USwordItem sword) {
this.axe = axe;
this.hoe = hoe;
this.pickaxe = pickaxe;
this.spade = spade;
this.sword = sword;
}
@Override
public Item[] getArray() {
return new Item[] { axe, hoe, pickaxe, spade, sword };
}
public UAxeItem getAxe() {
return axe;
}
public UHoeItem getHoe() {
return hoe;
}
public UPickaxeItem getPickaxe() {
return pickaxe;
}
public UShovelItem getSpade() {
return spade;
}
public USwordItem getSword() {
return sword;
}
}
## Instruction:
Rename all spade variable names to shovel variable names
## Code After:
package info.u_team.u_team_core.item.tool;
import info.u_team.u_team_core.api.registry.IUArrayRegistryType;
import net.minecraft.item.Item;
public class ToolSet implements IUArrayRegistryType<Item> {
private final UAxeItem axe;
private final UHoeItem hoe;
private final UPickaxeItem pickaxe;
private final UShovelItem shovel;
private final USwordItem sword;
public ToolSet(UAxeItem axe, UHoeItem hoe, UPickaxeItem pickaxe, UShovelItem shovel, USwordItem sword) {
this.axe = axe;
this.hoe = hoe;
this.pickaxe = pickaxe;
this.shovel = shovel;
this.sword = sword;
}
@Override
public Item[] getArray() {
return new Item[] { axe, hoe, pickaxe, shovel, sword };
}
public UAxeItem getAxe() {
return axe;
}
public UHoeItem getHoe() {
return hoe;
}
public UPickaxeItem getPickaxe() {
return pickaxe;
}
public UShovelItem getShovel() {
return shovel;
}
public USwordItem getSword() {
return sword;
}
}
|
d100b2fc59dd771c942b6feacdbef7cad886953d | lib/travis/model/remote_log.rb | lib/travis/model/remote_log.rb | require 'virtus'
class RemoteLog
include Virtus.model(nullify_blank: true)
attribute :aggregated_at, Time
attribute :archive_verified, Boolean, default: false
attribute :archived_at, Time
attribute :archiving, Boolean, default: false
attribute :content, String
attribute :created_at, Time
attribute :id, Integer
attribute :job_id, Integer
attribute :purged_at, Time
attribute :removed_at, Time
attribute :removed_by_id, Integer
attribute :updated_at, Time
def job
@job ||= Job.find(job_id)
end
def removed_by
@removed_by ||= User.find(removed_by_id)
end
def parts
# The content field is always pre-aggregated.
[]
end
def aggregated?
!!aggregated_at
end
def clear!
raise NotImplementedError
end
def archived?
archived_at && archive_verified?
end
def to_json
{
'log' => attributes.slice(
*%w(id content created_at job_id updated_at)
)
}.to_json
end
end
| require 'virtus'
class RemoteLog
include Virtus.model(nullify_blank: true)
attribute :aggregated_at, Time
attribute :archive_verified, Boolean, default: false
attribute :archived_at, Time
attribute :archiving, Boolean, default: false
attribute :content, String
attribute :created_at, Time
attribute :id, Integer
attribute :job_id, Integer
attribute :purged_at, Time
attribute :removed_at, Time
attribute :removed_by_id, Integer
attribute :updated_at, Time
def job
@job ||= Job.find(job_id)
end
def removed_by
return nil unless removed_by_id
@removed_by ||= User.find(removed_by_id)
end
def parts
# The content field is always pre-aggregated.
[]
end
def aggregated?
!!aggregated_at
end
def clear!
raise NotImplementedError
end
def archived?
archived_at && archive_verified?
end
def to_json
{
'log' => attributes.slice(
*%i(id content created_at job_id updated_at)
)
}.to_json
end
end
| Break early when no user id is present; slice attributes with symbols | Break early when no user id is present; slice attributes with symbols
| Ruby | mit | travis-ci/travis-api,travis-ci/travis-api,travis-ci/travis-api | ruby | ## Code Before:
require 'virtus'
class RemoteLog
include Virtus.model(nullify_blank: true)
attribute :aggregated_at, Time
attribute :archive_verified, Boolean, default: false
attribute :archived_at, Time
attribute :archiving, Boolean, default: false
attribute :content, String
attribute :created_at, Time
attribute :id, Integer
attribute :job_id, Integer
attribute :purged_at, Time
attribute :removed_at, Time
attribute :removed_by_id, Integer
attribute :updated_at, Time
def job
@job ||= Job.find(job_id)
end
def removed_by
@removed_by ||= User.find(removed_by_id)
end
def parts
# The content field is always pre-aggregated.
[]
end
def aggregated?
!!aggregated_at
end
def clear!
raise NotImplementedError
end
def archived?
archived_at && archive_verified?
end
def to_json
{
'log' => attributes.slice(
*%w(id content created_at job_id updated_at)
)
}.to_json
end
end
## Instruction:
Break early when no user id is present; slice attributes with symbols
## Code After:
require 'virtus'
class RemoteLog
include Virtus.model(nullify_blank: true)
attribute :aggregated_at, Time
attribute :archive_verified, Boolean, default: false
attribute :archived_at, Time
attribute :archiving, Boolean, default: false
attribute :content, String
attribute :created_at, Time
attribute :id, Integer
attribute :job_id, Integer
attribute :purged_at, Time
attribute :removed_at, Time
attribute :removed_by_id, Integer
attribute :updated_at, Time
def job
@job ||= Job.find(job_id)
end
def removed_by
return nil unless removed_by_id
@removed_by ||= User.find(removed_by_id)
end
def parts
# The content field is always pre-aggregated.
[]
end
def aggregated?
!!aggregated_at
end
def clear!
raise NotImplementedError
end
def archived?
archived_at && archive_verified?
end
def to_json
{
'log' => attributes.slice(
*%i(id content created_at job_id updated_at)
)
}.to_json
end
end
|
94483acbe5b7c6fcaa293c5bd4e9f47fa5c76776 | README.md | README.md | Web based tool to label images for object. So that they can be used to train dlib or other object detectors.
# How to use
You can either import a file from a URL or from your computer. You can plot the landmark points by yourself or you can request to face++ API to collect the points which gets automatically plotted on the image (You will need to register on face++ to use the API.). If you feel that the result should be improved, you can drag a point to correct location.
# TO DO
* Delete an existing point
* Change landmark type
* export to file
* export to dlib compatible file
* draw the line between landmark points
* draw rectangle
* support for multi faces
| Web based tool to label images for object. So that they can be used to train dlib or other object detectors.
# How to use
You can either import a file from a URL or from your computer. You can plot the landmark points by yourself or you can request to face++ API to collect the points which gets automatically plotted on the image (You will need to register on face++ to use the API.). If you feel that the result should be improved, you can drag a point to correct location.
# TO DO
* API compatible landmark label
* export to file
* export to dlib compatible file
* draw the line between landmark points
* Send selected image file to the API
* Image scalling
* warn user on image switch when label is empty
* filter for (un)labelled images
* Delete all points of a box
* load data from ptn, xml file.
* Tool to draw points in straight line (eg nose, chin, eyebrows' center) | Update Read Me for TO DO | Update Read Me for TO DO
| Markdown | mit | NaturalIntelligence/imglab,NaturalIntelligence/imglab | markdown | ## Code Before:
Web based tool to label images for object. So that they can be used to train dlib or other object detectors.
# How to use
You can either import a file from a URL or from your computer. You can plot the landmark points by yourself or you can request to face++ API to collect the points which gets automatically plotted on the image (You will need to register on face++ to use the API.). If you feel that the result should be improved, you can drag a point to correct location.
# TO DO
* Delete an existing point
* Change landmark type
* export to file
* export to dlib compatible file
* draw the line between landmark points
* draw rectangle
* support for multi faces
## Instruction:
Update Read Me for TO DO
## Code After:
Web based tool to label images for object. So that they can be used to train dlib or other object detectors.
# How to use
You can either import a file from a URL or from your computer. You can plot the landmark points by yourself or you can request to face++ API to collect the points which gets automatically plotted on the image (You will need to register on face++ to use the API.). If you feel that the result should be improved, you can drag a point to correct location.
# TO DO
* API compatible landmark label
* export to file
* export to dlib compatible file
* draw the line between landmark points
* Send selected image file to the API
* Image scalling
* warn user on image switch when label is empty
* filter for (un)labelled images
* Delete all points of a box
* load data from ptn, xml file.
* Tool to draw points in straight line (eg nose, chin, eyebrows' center) |
554cd0852818c527bc81a725405c4e06d99804e9 | Gruntfile.js | Gruntfile.js | 'use strict';
module.exports = function (grunt) {
// Show elapsed time at the end
require('time-grunt')(grunt);
// Load all grunt tasks
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
jshint: {
options: {
jshintrc: '.jshintrc',
reporter: require('jshint-stylish')
},
gruntfile: {
src: 'Gruntfile.js'
},
lib: {
src: ['lib/**/*.js']
},
test: {
src: ['test/**/*.js']
}
},
mochaTest: {
test: {
options: {
reporter: 'spec'
},
src: ['test/**/*.js']
}
},
watch: {
gruntfile: {
files: '<%= jshint.gruntfile.src %>',
tasks: ['jshint:gruntfile']
},
lib: {
files: '<%= jshint.lib.src %>',
tasks: ['jshint:lib', 'nodeunit']
},
test: {
files: '<%= jshint.test.src %>',
tasks: ['jshint:test', 'mochaTest']
}
}
});
// Default task.
grunt.registerTask('default', ['jshint', 'mochaTest']);
grunt.registerTask('test', ['jshint:test','mochaTest']);
};
| 'use strict';
module.exports = function (grunt) {
// Show elapsed time at the end
require('time-grunt')(grunt);
// Load all grunt tasks
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
jshint: {
options: {
jshintrc: '.jshintrc',
reporter: require('jshint-stylish')
},
gruntfile: {
src: 'Gruntfile.js'
},
lib: {
src: ['lib/**/*.js']
},
test: {
src: ['test/**/*.js']
}
},
mochaTest: {
test: {
options: {
reporter: 'spec',
timeout: 5000
},
src: ['test/**/*.js']
}
},
watch: {
gruntfile: {
files: '<%= jshint.gruntfile.src %>',
tasks: ['jshint:gruntfile']
},
lib: {
files: '<%= jshint.lib.src %>',
tasks: ['jshint:lib', 'nodeunit']
},
test: {
files: '<%= jshint.test.src %>',
tasks: ['jshint:test', 'mochaTest']
}
}
});
// Default task.
grunt.registerTask('default', ['jshint', 'mochaTest']);
grunt.registerTask('test', ['jshint:test','mochaTest']);
};
| Set mocha tests timeout to 5s. | Set mocha tests timeout to 5s.
| JavaScript | mit | cladera/orm-wrapper | javascript | ## Code Before:
'use strict';
module.exports = function (grunt) {
// Show elapsed time at the end
require('time-grunt')(grunt);
// Load all grunt tasks
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
jshint: {
options: {
jshintrc: '.jshintrc',
reporter: require('jshint-stylish')
},
gruntfile: {
src: 'Gruntfile.js'
},
lib: {
src: ['lib/**/*.js']
},
test: {
src: ['test/**/*.js']
}
},
mochaTest: {
test: {
options: {
reporter: 'spec'
},
src: ['test/**/*.js']
}
},
watch: {
gruntfile: {
files: '<%= jshint.gruntfile.src %>',
tasks: ['jshint:gruntfile']
},
lib: {
files: '<%= jshint.lib.src %>',
tasks: ['jshint:lib', 'nodeunit']
},
test: {
files: '<%= jshint.test.src %>',
tasks: ['jshint:test', 'mochaTest']
}
}
});
// Default task.
grunt.registerTask('default', ['jshint', 'mochaTest']);
grunt.registerTask('test', ['jshint:test','mochaTest']);
};
## Instruction:
Set mocha tests timeout to 5s.
## Code After:
'use strict';
module.exports = function (grunt) {
// Show elapsed time at the end
require('time-grunt')(grunt);
// Load all grunt tasks
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
jshint: {
options: {
jshintrc: '.jshintrc',
reporter: require('jshint-stylish')
},
gruntfile: {
src: 'Gruntfile.js'
},
lib: {
src: ['lib/**/*.js']
},
test: {
src: ['test/**/*.js']
}
},
mochaTest: {
test: {
options: {
reporter: 'spec',
timeout: 5000
},
src: ['test/**/*.js']
}
},
watch: {
gruntfile: {
files: '<%= jshint.gruntfile.src %>',
tasks: ['jshint:gruntfile']
},
lib: {
files: '<%= jshint.lib.src %>',
tasks: ['jshint:lib', 'nodeunit']
},
test: {
files: '<%= jshint.test.src %>',
tasks: ['jshint:test', 'mochaTest']
}
}
});
// Default task.
grunt.registerTask('default', ['jshint', 'mochaTest']);
grunt.registerTask('test', ['jshint:test','mochaTest']);
};
|
c44e241381917739e6ac6e6a22bd4a6c6611cd90 | lib/rspec/templates/example_group_template.erb | lib/rspec/templates/example_group_template.erb | describe '<%= resource.uri_partial %>' do
let(:route) { '<%= resource.uri_partial %>' }
<% resource.methods.each do |method| %>
describe '<%= method.method.upcase %>' do
it '<%= method.description.downcase %>' do
end
it 'returns status <%= method.responses.first.code %>' do
end
end<% end %>
end
| describe '<%= resource.uri_partial %>' do
let(:route) { '<%= resource.uri_partial %>' }
<% resource.methods.each do |method| %>
describe '<%= method.method.upcase %>' do
let(:response_body) do
<%= method.responses.first.bodies.first %>.to_json
end
it '<%= method.description.downcase %>' do
end
it 'returns status <%= method.responses.first.code %>' do
end
end<% end %>
end
| Add response body to spec | Add response body to spec
| HTML+ERB | mit | danascheider/rambo,danascheider/rambo | html+erb | ## Code Before:
describe '<%= resource.uri_partial %>' do
let(:route) { '<%= resource.uri_partial %>' }
<% resource.methods.each do |method| %>
describe '<%= method.method.upcase %>' do
it '<%= method.description.downcase %>' do
end
it 'returns status <%= method.responses.first.code %>' do
end
end<% end %>
end
## Instruction:
Add response body to spec
## Code After:
describe '<%= resource.uri_partial %>' do
let(:route) { '<%= resource.uri_partial %>' }
<% resource.methods.each do |method| %>
describe '<%= method.method.upcase %>' do
let(:response_body) do
<%= method.responses.first.bodies.first %>.to_json
end
it '<%= method.description.downcase %>' do
end
it 'returns status <%= method.responses.first.code %>' do
end
end<% end %>
end
|
3de053cb83ccdc934f19ab4e4985b4888983624a | .travis.yml | .travis.yml | language: node_js
node_js:
- "0.10"
before_install: cd cordova-lib | language: node_js
git:
depth: 10
node_js:
- "0.10"
before_install: cd cordova-lib
| Set git clone depth to 10 for Travis to make it faster | Set git clone depth to 10 for Travis to make it faster
Some background:
http://blogs.atlassian.com/2014/05/handle-big-repositories-git/
Suggested in https://github.com/apache/cordova-lib/pull/72
github: close #72
| YAML | apache-2.0 | surajpindoria/cordova-lib,phonegap-build/cordova-lib,timwindsor/cordova-lib,shazron/cordova-lib,gorkem/cordova-lib,ogoguel/cordova-lib,alsorokin/cordova-lib,purplecabbage/cordova-lib,shazron/cordova-lib,AxelNennker/cordova-lib,matrosov-nikita/cordova-lib,jasongin/cordova-lib,abstractj/cordova-lib,gorkem/cordova-lib,tony--/cordova-lib,timwindsor/cordova-lib,shazron/cordova-lib,alsorokin/cordova-lib,purplecabbage/cordova-lib,cordova-ubuntu/cordova-lib,meteor/cordova-lib,phonegap-build/cordova-lib,Icenium/cordova-lib,stevengill/cordova-lib,apache/cordova-lib,revolunet/cordova-lib,ktop/cordova-lib,abstractj/cordova-lib,filmaj/cordova-lib,apache/cordova-lib,infil00p/cordova-lib,revolunet/cordova-lib,stevengill/cordova-lib,gorkem/cordova-lib,alsorokin/cordova-lib,filmaj/cordova-lib,matrosov-nikita/cordova-lib,ktop/cordova-lib,stevengill/cordova-lib,carynbear/cordova-lib,meteor/cordova-lib,theaccordance/cordova-lib,AxelNennker/cordova-lib,cordova-ubuntu/cordova-lib,timwindsor/cordova-lib,ktop/cordova-lib,jasongin/cordova-lib,csantanapr/cordova-lib,carynbear/cordova-lib,cordova-ubuntu/cordova-lib,AxelNennker/cordova-lib,jasongin/cordova-lib,marcuspridham/cordova-lib,tony--/cordova-lib,dpogue/cordova-lib,tony--/cordova-lib,revolunet/cordova-lib,vladimir-kotikov/cordova-lib,Icenium/cordova-lib,filmaj/cordova-lib,meteor/cordova-lib,corimf/cordova-lib,ogoguel/cordova-lib,tripodsan/cordova-lib,csantanapr/cordova-lib,matrosov-nikita/cordova-lib,purplecabbage/cordova-lib,timwindsor/cordova-lib,theaccordance/cordova-lib,vladimir-kotikov/cordova-lib,tony--/cordova-lib,csantanapr/cordova-lib,dpogue/cordova-lib,corimf/cordova-lib,jasongin/cordova-lib,cordova-ubuntu/cordova-lib,vladimir-kotikov/cordova-lib,phonegap-build/cordova-lib,ktop/cordova-lib,Icenium/cordova-lib,tripodsan/cordova-lib,abstractj/cordova-lib,vladimir-kotikov/cordova-lib,ktop/cordova-lib,surajpindoria/cordova-lib,theaccordance/cordova-lib,abstractj/cordova-lib,jasongin/cordova-lib,ogoguel/cordova-lib,ogoguel/cordova-lib,marcuspridham/cordova-lib,vladimir-kotikov/cordova-lib,Icenium/cordova-lib,ktop/cordova-lib,AxelNennker/cordova-lib,stevengill/cordova-lib,revolunet/cordova-lib,driftyco/cordova-lib,ogoguel/cordova-lib,marcuspridham/cordova-lib,Icenium/cordova-lib,driftyco/cordova-lib,Icenium/cordova-lib,csantanapr/cordova-lib,phonegap-build/cordova-lib,abstractj/cordova-lib,apache/cordova-lib,phonegap-build/cordova-lib,ogoguel/cordova-lib,matrosov-nikita/cordova-lib,csantanapr/cordova-lib,cordova-ubuntu/cordova-lib,tony--/cordova-lib,carynbear/cordova-lib,alsorokin/cordova-lib,gorkem/cordova-lib,driftyco/cordova-lib,matrosov-nikita/cordova-lib,infil00p/cordova-lib,infil00p/cordova-lib,alsorokin/cordova-lib,surajpindoria/cordova-lib,marcuspridham/cordova-lib,driftyco/cordova-lib,marcuspridham/cordova-lib,matrosov-nikita/cordova-lib,apache/cordova-lib,AxelNennker/cordova-lib,apache/cordova-lib,dpogue/cordova-lib,meteor/cordova-lib,revolunet/cordova-lib,dpogue/cordova-lib,theaccordance/cordova-lib,timwindsor/cordova-lib,vladimir-kotikov/cordova-lib,timwindsor/cordova-lib,carynbear/cordova-lib,corimf/cordova-lib,meteor/cordova-lib,marcuspridham/cordova-lib,infil00p/cordova-lib,stevengill/cordova-lib,driftyco/cordova-lib,tripodsan/cordova-lib,abstractj/cordova-lib,tripodsan/cordova-lib,jasongin/cordova-lib,corimf/cordova-lib,jasongin/cordova-lib,shazron/cordova-lib,alsorokin/cordova-lib,carynbear/cordova-lib,shazron/cordova-lib,meteor/cordova-lib,vladimir-kotikov/cordova-lib,Icenium/cordova-lib,dpogue/cordova-lib,stevengill/cordova-lib,infil00p/cordova-lib,gorkem/cordova-lib,tripodsan/cordova-lib,revolunet/cordova-lib,purplecabbage/cordova-lib,infil00p/cordova-lib,meteor/cordova-lib,theaccordance/cordova-lib,theaccordance/cordova-lib,purplecabbage/cordova-lib,driftyco/cordova-lib,carynbear/cordova-lib,surajpindoria/cordova-lib,filmaj/cordova-lib,revolunet/cordova-lib,shazron/cordova-lib,csantanapr/cordova-lib,infil00p/cordova-lib,carynbear/cordova-lib,corimf/cordova-lib,gorkem/cordova-lib,dpogue/cordova-lib,AxelNennker/cordova-lib,cordova-ubuntu/cordova-lib,tripodsan/cordova-lib,theaccordance/cordova-lib,gorkem/cordova-lib,filmaj/cordova-lib,marcuspridham/cordova-lib,ogoguel/cordova-lib,driftyco/cordova-lib,filmaj/cordova-lib,timwindsor/cordova-lib,tripodsan/cordova-lib,tony--/cordova-lib,corimf/cordova-lib,csantanapr/cordova-lib,surajpindoria/cordova-lib,tony--/cordova-lib,abstractj/cordova-lib,AxelNennker/cordova-lib,phonegap-build/cordova-lib,cordova-ubuntu/cordova-lib,alsorokin/cordova-lib,corimf/cordova-lib,purplecabbage/cordova-lib,surajpindoria/cordova-lib,surajpindoria/cordova-lib | yaml | ## Code Before:
language: node_js
node_js:
- "0.10"
before_install: cd cordova-lib
## Instruction:
Set git clone depth to 10 for Travis to make it faster
Some background:
http://blogs.atlassian.com/2014/05/handle-big-repositories-git/
Suggested in https://github.com/apache/cordova-lib/pull/72
github: close #72
## Code After:
language: node_js
git:
depth: 10
node_js:
- "0.10"
before_install: cd cordova-lib
|
349225aa1759ec10fad847be1e93df06e65a2ef9 | app/views/events/_form.html.erb | app/views/events/_form.html.erb | <%= form_for @event, html: {class: 'row'} do |f| %>
<div class="event-form-inputs col-sm-9">
<div class="form-group">
<%= f.label :activity_id %>
<%= f.select :activity_id, options_from_collection_for_select(@activities, :id, :name, f.object.activity_id), {}, class: 'form-control' %>
</div>
<div class="form-group">
<%= f.label :description %>
<%= f.text_area :description, class: 'form-control' %>
</div>
<%= f.hidden_field :day %>
</div>
<div class="event-form-buttons col-sm-3">
<button type="submit" class="btn btn-primary form-control">Save</button>
<button type="button" class="btn btn-default js-cancel form-control">Close</button>
<% unless @event.new_record? %>
<button type="button" class="btn btn-danger js-delete form-control">Delete</button>
<% end %>
</div>
<% end %>
<% unless @event.new_record? %>
<div class='event-form-assets js-assets-list'>
<%= render('assets/index', event: @event) %>
</div>
<% end %>
| <%= form_for @event, html: {class: 'row'} do |f| %>
<div class="event-form-inputs col-sm-9">
<div class="form-group">
<%= f.label :activity_id %>
<%= f.select :activity_id, options_from_collection_for_select(@activities, :id, :name, f.object.activity_id), {}, class: 'form-control' %>
</div>
<div class="form-group">
<%= f.label :description %>
<%= f.text_area :description, class: 'form-control' %>
</div>
<%= f.hidden_field :day %>
</div>
<div class="event-form-buttons col-sm-3">
<button type="button" class="btn btn-default js-cancel form-control">Close</button>
<button type="submit" class="btn btn-primary form-control">Save</button>
<% unless @event.new_record? %>
<button type="button" class="btn btn-danger js-delete form-control">Delete</button>
<% end %>
</div>
<% end %>
<% unless @event.new_record? %>
<div class='event-form-assets js-assets-list'>
<%= render('assets/index', event: @event) %>
</div>
<% end %>
| Swap Save/Close buttons for clarity | Swap Save/Close buttons for clarity
| HTML+ERB | mit | dncrht/mical,dncrht/mical,dncrht/mical,dncrht/mical | html+erb | ## Code Before:
<%= form_for @event, html: {class: 'row'} do |f| %>
<div class="event-form-inputs col-sm-9">
<div class="form-group">
<%= f.label :activity_id %>
<%= f.select :activity_id, options_from_collection_for_select(@activities, :id, :name, f.object.activity_id), {}, class: 'form-control' %>
</div>
<div class="form-group">
<%= f.label :description %>
<%= f.text_area :description, class: 'form-control' %>
</div>
<%= f.hidden_field :day %>
</div>
<div class="event-form-buttons col-sm-3">
<button type="submit" class="btn btn-primary form-control">Save</button>
<button type="button" class="btn btn-default js-cancel form-control">Close</button>
<% unless @event.new_record? %>
<button type="button" class="btn btn-danger js-delete form-control">Delete</button>
<% end %>
</div>
<% end %>
<% unless @event.new_record? %>
<div class='event-form-assets js-assets-list'>
<%= render('assets/index', event: @event) %>
</div>
<% end %>
## Instruction:
Swap Save/Close buttons for clarity
## Code After:
<%= form_for @event, html: {class: 'row'} do |f| %>
<div class="event-form-inputs col-sm-9">
<div class="form-group">
<%= f.label :activity_id %>
<%= f.select :activity_id, options_from_collection_for_select(@activities, :id, :name, f.object.activity_id), {}, class: 'form-control' %>
</div>
<div class="form-group">
<%= f.label :description %>
<%= f.text_area :description, class: 'form-control' %>
</div>
<%= f.hidden_field :day %>
</div>
<div class="event-form-buttons col-sm-3">
<button type="button" class="btn btn-default js-cancel form-control">Close</button>
<button type="submit" class="btn btn-primary form-control">Save</button>
<% unless @event.new_record? %>
<button type="button" class="btn btn-danger js-delete form-control">Delete</button>
<% end %>
</div>
<% end %>
<% unless @event.new_record? %>
<div class='event-form-assets js-assets-list'>
<%= render('assets/index', event: @event) %>
</div>
<% end %>
|
87b8ed1107c0658711043b681f350aef7f08cec9 | README.md | README.md | PHPUnit Notifier
================

Use [composer](http://getcomposer.org/) to install on your project:
```shell
$ composer require --dev "mdarse/phpunit-notifier"
```
To set up, just register `PHPUnitNotifier\NotifierListener` in the listeners section of you `phpunit.xml`.
Example of PHPUnit XML configuration:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<phpunit>
<testsuites>
<testsuite name="Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<listeners>
<listener class="PHPUnitNotifier\NotifierListener"></listener>
</listeners>
</phpunit>
```
| PHPUnit Notifier
================

Use [composer](http://getcomposer.org/) to install on your project:
```shell
$ composer require --dev "mdarse/phpunit-notifier"
```
To set up, just register `PHPUnitNotifier\NotifierListener` in the listeners section of you `phpunit.xml`.
Example of PHPUnit XML configuration:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<phpunit>
<testsuites>
<testsuite name="Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<listeners>
<listener class="PHPUnitNotifier\NotifierListener"></listener>
</listeners>
</phpunit>
```
There is no supported mean to globally setup the notifier for every project, but
here is a [dirty workaround](https://gist.github.com/mdarse/4028dffd9bb5fdb57889).
| Add info to define notifier globally | Add info to define notifier globally
| Markdown | mit | mdarse/phpunit-notifier | markdown | ## Code Before:
PHPUnit Notifier
================

Use [composer](http://getcomposer.org/) to install on your project:
```shell
$ composer require --dev "mdarse/phpunit-notifier"
```
To set up, just register `PHPUnitNotifier\NotifierListener` in the listeners section of you `phpunit.xml`.
Example of PHPUnit XML configuration:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<phpunit>
<testsuites>
<testsuite name="Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<listeners>
<listener class="PHPUnitNotifier\NotifierListener"></listener>
</listeners>
</phpunit>
```
## Instruction:
Add info to define notifier globally
## Code After:
PHPUnit Notifier
================

Use [composer](http://getcomposer.org/) to install on your project:
```shell
$ composer require --dev "mdarse/phpunit-notifier"
```
To set up, just register `PHPUnitNotifier\NotifierListener` in the listeners section of you `phpunit.xml`.
Example of PHPUnit XML configuration:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<phpunit>
<testsuites>
<testsuite name="Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<listeners>
<listener class="PHPUnitNotifier\NotifierListener"></listener>
</listeners>
</phpunit>
```
There is no supported mean to globally setup the notifier for every project, but
here is a [dirty workaround](https://gist.github.com/mdarse/4028dffd9bb5fdb57889).
|
663077e1fa11bdd1b351c673a36b184332348759 | README.md | README.md | To be done
## FAQs
To be done |
```
$ npm install --save node-secure-password
```
## Why do I need this?
A lot of things can go wrong when it comes to permanently storing user passwords. To protect your user's data you should never store their passwords in plain text but instead use a hash function to store an irreversibly literal generated from your password. To generate an even saver hash a salt should be added to the password before hashing it. Re-hashing the now generated hash we gain even more security by making it even harder to bruteforce.
## FAQs
To be done
| Add new paragraph to readme | Add new paragraph to readme
| Markdown | mit | treylon/node-secure-password | markdown | ## Code Before:
To be done
## FAQs
To be done
## Instruction:
Add new paragraph to readme
## Code After:
```
$ npm install --save node-secure-password
```
## Why do I need this?
A lot of things can go wrong when it comes to permanently storing user passwords. To protect your user's data you should never store their passwords in plain text but instead use a hash function to store an irreversibly literal generated from your password. To generate an even saver hash a salt should be added to the password before hashing it. Re-hashing the now generated hash we gain even more security by making it even harder to bruteforce.
## FAQs
To be done
|
2d9fce5715b2d7d5b920d2e77212f076e9ebd1be | staticgen_demo/staticgen_views.py | staticgen_demo/staticgen_views.py |
from __future__ import unicode_literals
from staticgen.staticgen_pool import staticgen_pool
from staticgen.staticgen_views import StaticgenView
class StaicgenDemoStaticViews(StaticgenView):
def items(self):
return (
'sitemap.xml',
'robots.txt',
'page_not_found',
'server_error',
)
staticgen_pool.register(StaicgenDemoStaticViews)
|
from __future__ import unicode_literals
from django.conf import settings
from django.utils import translation
from staticgen.staticgen_pool import staticgen_pool
from staticgen.staticgen_views import StaticgenView
class StaicgenDemoStaticViews(StaticgenView):
def items(self):
return (
'sitemap.xml',
'robots.txt',
'page_not_found',
'server_error',
)
staticgen_pool.register(StaicgenDemoStaticViews)
class StaticgenCMSView(StaticgenView):
def items(self):
try:
from cms.models import Title
except ImportError: # pragma: no cover
# django-cms is not installed.
return super(StaticgenCMSView, self).items()
items = Title.objects.public().filter(
page__login_required=False,
page__site_id=settings.SITE_ID,
).order_by('page__path')
return items
def url(self, obj):
translation.activate(obj.language)
url = obj.page.get_absolute_url(obj.language)
translation.deactivate()
return url
staticgen_pool.register(StaticgenCMSView)
| Add CMS Pages to staticgen registry. | Add CMS Pages to staticgen registry.
| Python | bsd-3-clause | mishbahr/staticgen-demo,mishbahr/staticgen-demo,mishbahr/staticgen-demo | python | ## Code Before:
from __future__ import unicode_literals
from staticgen.staticgen_pool import staticgen_pool
from staticgen.staticgen_views import StaticgenView
class StaicgenDemoStaticViews(StaticgenView):
def items(self):
return (
'sitemap.xml',
'robots.txt',
'page_not_found',
'server_error',
)
staticgen_pool.register(StaicgenDemoStaticViews)
## Instruction:
Add CMS Pages to staticgen registry.
## Code After:
from __future__ import unicode_literals
from django.conf import settings
from django.utils import translation
from staticgen.staticgen_pool import staticgen_pool
from staticgen.staticgen_views import StaticgenView
class StaicgenDemoStaticViews(StaticgenView):
def items(self):
return (
'sitemap.xml',
'robots.txt',
'page_not_found',
'server_error',
)
staticgen_pool.register(StaicgenDemoStaticViews)
class StaticgenCMSView(StaticgenView):
def items(self):
try:
from cms.models import Title
except ImportError: # pragma: no cover
# django-cms is not installed.
return super(StaticgenCMSView, self).items()
items = Title.objects.public().filter(
page__login_required=False,
page__site_id=settings.SITE_ID,
).order_by('page__path')
return items
def url(self, obj):
translation.activate(obj.language)
url = obj.page.get_absolute_url(obj.language)
translation.deactivate()
return url
staticgen_pool.register(StaticgenCMSView)
|
f9a134b6e4a6c8fc94e377a8f3af1761645a4569 | src/interfaces/ecpg/include/pgtypes_timestamp.h | src/interfaces/ecpg/include/pgtypes_timestamp.h | typedef int64 timestamp;
typedef int64 TimestampTz;
#else
typedef double timestamp;
typedef double TimestampTz;
#endif
#ifdef __cplusplus
extern "C"
{
#endif
extern timestamp PGTYPEStimestamp_from_asc(char *, char **);
extern char *PGTYPEStimestamp_to_asc(timestamp);
extern int PGTYPEStimestamp_sub(timestamp *, timestamp *, interval *);
extern int PGTYPEStimestamp_fmt_asc(timestamp *, char *, int, char *);
extern void PGTYPEStimestamp_current(timestamp *);
extern int PGTYPEStimestamp_defmt_asc(char *, char *, timestamp *);
#ifdef __cplusplus
}
#endif
#endif /* PGTYPES_TIMESTAMP */
| typedef int64 timestamp;
typedef int64 TimestampTz;
#else
typedef double timestamp;
typedef double TimestampTz;
#endif
#ifdef __cplusplus
extern "C"
{
#endif
extern timestamp PGTYPEStimestamp_from_asc(char *, char **);
extern char *PGTYPEStimestamp_to_asc(timestamp);
extern int PGTYPEStimestamp_sub(timestamp *, timestamp *, interval *);
extern int PGTYPEStimestamp_fmt_asc(timestamp *, char *, int, char *);
extern void PGTYPEStimestamp_current(timestamp *);
extern int PGTYPEStimestamp_defmt_asc(char *, char *, timestamp *);
extern int PGTYPEStimestamp_add_interval(timestamp *tin, interval *span, timestamp *tout);
extern int PGTYPEStimestamp_sub_interval(timestamp *tin, interval *span, timestamp *tout);
#ifdef __cplusplus
}
#endif
#endif /* PGTYPES_TIMESTAMP */
| Add missing ecpg prototype for newly added functions. | Add missing ecpg prototype for newly added functions.
| C | apache-2.0 | kaknikhil/gpdb,Chibin/gpdb,Chibin/gpdb,kaknikhil/gpdb,rubikloud/gpdb,lisakowen/gpdb,kaknikhil/gpdb,adam8157/gpdb,arcivanov/postgres-xl,randomtask1155/gpdb,janebeckman/gpdb,foyzur/gpdb,rubikloud/gpdb,jmcatamney/gpdb,janebeckman/gpdb,yuanzhao/gpdb,xuegang/gpdb,ashwinstar/gpdb,Quikling/gpdb,pavanvd/postgres-xl,rvs/gpdb,lintzc/gpdb,postmind-net/postgres-xl,atris/gpdb,cjcjameson/gpdb,Quikling/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,zeroae/postgres-xl,janebeckman/gpdb,lpetrov-pivotal/gpdb,jmcatamney/gpdb,Chibin/gpdb,adam8157/gpdb,janebeckman/gpdb,royc1/gpdb,randomtask1155/gpdb,Quikling/gpdb,snaga/postgres-xl,atris/gpdb,rubikloud/gpdb,0x0FFF/gpdb,rubikloud/gpdb,snaga/postgres-xl,CraigHarris/gpdb,lintzc/gpdb,yuanzhao/gpdb,xuegang/gpdb,oberstet/postgres-xl,0x0FFF/gpdb,Chibin/gpdb,yuanzhao/gpdb,cjcjameson/gpdb,ovr/postgres-xl,kaknikhil/gpdb,royc1/gpdb,cjcjameson/gpdb,kaknikhil/gpdb,tpostgres-projects/tPostgres,chrishajas/gpdb,Quikling/gpdb,rubikloud/gpdb,edespino/gpdb,chrishajas/gpdb,randomtask1155/gpdb,royc1/gpdb,lpetrov-pivotal/gpdb,edespino/gpdb,techdragon/Postgres-XL,xuegang/gpdb,zaksoup/gpdb,0x0FFF/gpdb,ahachete/gpdb,Quikling/gpdb,rvs/gpdb,techdragon/Postgres-XL,kmjungersen/PostgresXL,xuegang/gpdb,tangp3/gpdb,kmjungersen/PostgresXL,rvs/gpdb,lisakowen/gpdb,arcivanov/postgres-xl,yazun/postgres-xl,foyzur/gpdb,zeroae/postgres-xl,xinzweb/gpdb,xinzweb/gpdb,CraigHarris/gpdb,xuegang/gpdb,snaga/postgres-xl,randomtask1155/gpdb,CraigHarris/gpdb,rvs/gpdb,Chibin/gpdb,0x0FFF/gpdb,oberstet/postgres-xl,pavanvd/postgres-xl,Postgres-XL/Postgres-XL,tpostgres-projects/tPostgres,zeroae/postgres-xl,kaknikhil/gpdb,kaknikhil/gpdb,jmcatamney/gpdb,lisakowen/gpdb,tangp3/gpdb,zeroae/postgres-xl,chrishajas/gpdb,cjcjameson/gpdb,cjcjameson/gpdb,lpetrov-pivotal/gpdb,ahachete/gpdb,lisakowen/gpdb,pavanvd/postgres-xl,CraigHarris/gpdb,greenplum-db/gpdb,rubikloud/gpdb,edespino/gpdb,Chibin/gpdb,lintzc/gpdb,yuanzhao/gpdb,Chibin/gpdb,xuegang/gpdb,tpostgres-projects/tPostgres,rvs/gpdb,oberstet/postgres-xl,ovr/postgres-xl,foyzur/gpdb,greenplum-db/gpdb,xuegang/gpdb,0x0FFF/gpdb,xuegang/gpdb,50wu/gpdb,janebeckman/gpdb,adam8157/gpdb,lintzc/gpdb,zaksoup/gpdb,rubikloud/gpdb,xinzweb/gpdb,edespino/gpdb,adam8157/gpdb,atris/gpdb,CraigHarris/gpdb,ahachete/gpdb,edespino/gpdb,chrishajas/gpdb,greenplum-db/gpdb,CraigHarris/gpdb,ashwinstar/gpdb,arcivanov/postgres-xl,kmjungersen/PostgresXL,50wu/gpdb,edespino/gpdb,foyzur/gpdb,atris/gpdb,janebeckman/gpdb,randomtask1155/gpdb,yazun/postgres-xl,ahachete/gpdb,CraigHarris/gpdb,greenplum-db/gpdb,atris/gpdb,yuanzhao/gpdb,greenplum-db/gpdb,royc1/gpdb,royc1/gpdb,50wu/gpdb,lpetrov-pivotal/gpdb,ovr/postgres-xl,Quikling/gpdb,kaknikhil/gpdb,randomtask1155/gpdb,lpetrov-pivotal/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,arcivanov/postgres-xl,zaksoup/gpdb,50wu/gpdb,Quikling/gpdb,foyzur/gpdb,lisakowen/gpdb,cjcjameson/gpdb,janebeckman/gpdb,yuanzhao/gpdb,lintzc/gpdb,postmind-net/postgres-xl,pavanvd/postgres-xl,kmjungersen/PostgresXL,0x0FFF/gpdb,randomtask1155/gpdb,yazun/postgres-xl,edespino/gpdb,postmind-net/postgres-xl,greenplum-db/gpdb,ashwinstar/gpdb,ahachete/gpdb,ahachete/gpdb,0x0FFF/gpdb,lintzc/gpdb,adam8157/gpdb,ashwinstar/gpdb,zaksoup/gpdb,chrishajas/gpdb,yuanzhao/gpdb,adam8157/gpdb,tpostgres-projects/tPostgres,techdragon/Postgres-XL,lpetrov-pivotal/gpdb,chrishajas/gpdb,kmjungersen/PostgresXL,cjcjameson/gpdb,atris/gpdb,Postgres-XL/Postgres-XL,zaksoup/gpdb,lintzc/gpdb,adam8157/gpdb,xinzweb/gpdb,randomtask1155/gpdb,lintzc/gpdb,lisakowen/gpdb,lisakowen/gpdb,xinzweb/gpdb,ahachete/gpdb,zeroae/postgres-xl,royc1/gpdb,cjcjameson/gpdb,yazun/postgres-xl,edespino/gpdb,rvs/gpdb,foyzur/gpdb,rvs/gpdb,kaknikhil/gpdb,rvs/gpdb,atris/gpdb,tangp3/gpdb,lisakowen/gpdb,foyzur/gpdb,50wu/gpdb,tpostgres-projects/tPostgres,ashwinstar/gpdb,techdragon/Postgres-XL,atris/gpdb,xinzweb/gpdb,jmcatamney/gpdb,snaga/postgres-xl,ashwinstar/gpdb,rvs/gpdb,CraigHarris/gpdb,lpetrov-pivotal/gpdb,rubikloud/gpdb,yuanzhao/gpdb,ahachete/gpdb,Postgres-XL/Postgres-XL,chrishajas/gpdb,janebeckman/gpdb,50wu/gpdb,tangp3/gpdb,xuegang/gpdb,zaksoup/gpdb,yazun/postgres-xl,50wu/gpdb,yuanzhao/gpdb,janebeckman/gpdb,janebeckman/gpdb,pavanvd/postgres-xl,snaga/postgres-xl,kaknikhil/gpdb,postmind-net/postgres-xl,postmind-net/postgres-xl,lintzc/gpdb,ovr/postgres-xl,xinzweb/gpdb,greenplum-db/gpdb,Quikling/gpdb,Chibin/gpdb,adam8157/gpdb,jmcatamney/gpdb,cjcjameson/gpdb,foyzur/gpdb,oberstet/postgres-xl,jmcatamney/gpdb,rvs/gpdb,50wu/gpdb,Quikling/gpdb,edespino/gpdb,Postgres-XL/Postgres-XL,Quikling/gpdb,tangp3/gpdb,royc1/gpdb,edespino/gpdb,techdragon/Postgres-XL,xinzweb/gpdb,yuanzhao/gpdb,lpetrov-pivotal/gpdb,zaksoup/gpdb,cjcjameson/gpdb,0x0FFF/gpdb,Chibin/gpdb,Chibin/gpdb,tangp3/gpdb,tangp3/gpdb,arcivanov/postgres-xl,CraigHarris/gpdb,ovr/postgres-xl,royc1/gpdb,chrishajas/gpdb,ashwinstar/gpdb,zaksoup/gpdb,Postgres-XL/Postgres-XL,oberstet/postgres-xl,arcivanov/postgres-xl,tangp3/gpdb | c | ## Code Before:
typedef int64 timestamp;
typedef int64 TimestampTz;
#else
typedef double timestamp;
typedef double TimestampTz;
#endif
#ifdef __cplusplus
extern "C"
{
#endif
extern timestamp PGTYPEStimestamp_from_asc(char *, char **);
extern char *PGTYPEStimestamp_to_asc(timestamp);
extern int PGTYPEStimestamp_sub(timestamp *, timestamp *, interval *);
extern int PGTYPEStimestamp_fmt_asc(timestamp *, char *, int, char *);
extern void PGTYPEStimestamp_current(timestamp *);
extern int PGTYPEStimestamp_defmt_asc(char *, char *, timestamp *);
#ifdef __cplusplus
}
#endif
#endif /* PGTYPES_TIMESTAMP */
## Instruction:
Add missing ecpg prototype for newly added functions.
## Code After:
typedef int64 timestamp;
typedef int64 TimestampTz;
#else
typedef double timestamp;
typedef double TimestampTz;
#endif
#ifdef __cplusplus
extern "C"
{
#endif
extern timestamp PGTYPEStimestamp_from_asc(char *, char **);
extern char *PGTYPEStimestamp_to_asc(timestamp);
extern int PGTYPEStimestamp_sub(timestamp *, timestamp *, interval *);
extern int PGTYPEStimestamp_fmt_asc(timestamp *, char *, int, char *);
extern void PGTYPEStimestamp_current(timestamp *);
extern int PGTYPEStimestamp_defmt_asc(char *, char *, timestamp *);
extern int PGTYPEStimestamp_add_interval(timestamp *tin, interval *span, timestamp *tout);
extern int PGTYPEStimestamp_sub_interval(timestamp *tin, interval *span, timestamp *tout);
#ifdef __cplusplus
}
#endif
#endif /* PGTYPES_TIMESTAMP */
|
5ecb6e7c56aa12019c4ca2c47bdd87c49981ad78 | setup.py | setup.py | from setuptools import setup, find_packages
install_requires=['django>=1.5', 'django-easysettings', 'pytz']
try:
import importlib
except ImportError:
install_requires.append('importlib')
setup(
name='django-password-policies',
version=__import__('password_policies').__version__,
description='A Django application to implent password policies.',
long_description="""\
django-password-policies is an application for the Django framework that
provides unicode-aware password policies on password changes and resets
and a mechanism to force password changes.
""",
author='Tarak Blah',
author_email='[email protected]',
url='https://github.com/tarak/django-password-policies',
include_package_data=True,
packages=find_packages(),
zip_safe=False,
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
'License :: OSI Approved :: BSD License',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Utilities'
],
install_requires=install_requires,
test_suite='tests.runtests',
)
| from setuptools import setup, find_packages
install_requires=['django>=1.5', 'django-easysettings', 'pytz']
try:
import importlib
except ImportError:
install_requires.append('importlib')
setup(
name='django-password-policies',
version=__import__('password_policies').__version__,
description='A Django application to implent password policies.',
long_description="""\
django-password-policies is an application for the Django framework that
provides unicode-aware password policies on password changes and resets
and a mechanism to force password changes.
""",
author='Tarak Blah',
author_email='[email protected]',
url='https://github.com/tarak/django-password-policies',
include_package_data=True,
packages=find_packages(),
zip_safe=False,
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Framework :: Django',
'License :: OSI Approved :: BSD License',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Utilities'
],
install_requires=install_requires,
test_suite='tests.runtests',
)
| Add the Language classifiers for 3.x and 2.x | Add the Language classifiers for 3.x and 2.x
| Python | bsd-3-clause | tarak/django-password-policies,tarak/django-password-policies | python | ## Code Before:
from setuptools import setup, find_packages
install_requires=['django>=1.5', 'django-easysettings', 'pytz']
try:
import importlib
except ImportError:
install_requires.append('importlib')
setup(
name='django-password-policies',
version=__import__('password_policies').__version__,
description='A Django application to implent password policies.',
long_description="""\
django-password-policies is an application for the Django framework that
provides unicode-aware password policies on password changes and resets
and a mechanism to force password changes.
""",
author='Tarak Blah',
author_email='[email protected]',
url='https://github.com/tarak/django-password-policies',
include_package_data=True,
packages=find_packages(),
zip_safe=False,
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
'License :: OSI Approved :: BSD License',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Utilities'
],
install_requires=install_requires,
test_suite='tests.runtests',
)
## Instruction:
Add the Language classifiers for 3.x and 2.x
## Code After:
from setuptools import setup, find_packages
install_requires=['django>=1.5', 'django-easysettings', 'pytz']
try:
import importlib
except ImportError:
install_requires.append('importlib')
setup(
name='django-password-policies',
version=__import__('password_policies').__version__,
description='A Django application to implent password policies.',
long_description="""\
django-password-policies is an application for the Django framework that
provides unicode-aware password policies on password changes and resets
and a mechanism to force password changes.
""",
author='Tarak Blah',
author_email='[email protected]',
url='https://github.com/tarak/django-password-policies',
include_package_data=True,
packages=find_packages(),
zip_safe=False,
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Framework :: Django',
'License :: OSI Approved :: BSD License',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Utilities'
],
install_requires=install_requires,
test_suite='tests.runtests',
)
|
869d096f659a70c1c0df21e067b6ea346e1ca655 | compute_engine_scripts/ct_master/install.sh | compute_engine_scripts/ct_master/install.sh | set -x
# Create required dirs.
mkdir --parents /b/skia-repo/
mkdir --parents /b/storage/
# Add env vars to ~/.bashrc
echo 'export GOROOT=/usr/lib/go' >> ~/.bashrc
echo 'export GOPATH=/b/skia-repo/go/' >> ~/.bashrc
echo 'export PATH=$GOPATH/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
# Install necessary packages.
sudo apt-get update
sudo apt-get --assume-yes upgrade
sudo apt-get --assume-yes install golang-go python-django python-setuptools lua5.2
sudo easy_install -U pip
sudo pip install -U crcmod
# Checkout the Skia infra repo.
cd /b/skia-repo
GOPATH=/b/skia-repo/go/ go get -u -t go.skia.org/infra/...
| set -x
# Create required dirs.
mkdir --parents /b/skia-repo/
mkdir --parents /b/storage/
# Add env vars to ~/.bashrc
echo 'export GOROOT=/usr/local/go' >> ~/.bashrc
echo 'export GOPATH=/b/skia-repo/go/' >> ~/.bashrc
echo 'export PATH=$GOPATH/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
# Install necessary packages.
sudo apt-get update
sudo apt-get --assume-yes upgrade
sudo apt-get --assume-yes install python-django python-setuptools lua5.2
sudo easy_install -U pip
sudo pip install -U crcmod
# Install golang.
GO_VERSION=go1.8.linux-amd64
wget https://storage.googleapis.com/golang/$GO_VERSION.tar.gz
tar -zxvf $GO_VERSION.tar.gz
sudo mv go /usr/local/$GO_VERSION
sudo ln -s /usr/local/$GO_VERSION /usr/local/go
sudo ln -s /usr/local/$GO_VERSION/bin/go /usr/bin/go
rm $GO_VERSION.tar.gz
# Checkout the Skia infra repo.
cd /b/skia-repo
GOPATH=/b/skia-repo/go/ go get -u -t go.skia.org/infra/...
| Install golang 1.8 on skia-ct-master | Install golang 1.8 on skia-ct-master
BUG=skia:6700
Change-Id: Idb0e35b68616be8d2b5d941af47da157f1d5785b
Reviewed-on: https://skia-review.googlesource.com/18139
Reviewed-by: Ben Wagner <[email protected]>
| Shell | bsd-3-clause | google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot | shell | ## Code Before:
set -x
# Create required dirs.
mkdir --parents /b/skia-repo/
mkdir --parents /b/storage/
# Add env vars to ~/.bashrc
echo 'export GOROOT=/usr/lib/go' >> ~/.bashrc
echo 'export GOPATH=/b/skia-repo/go/' >> ~/.bashrc
echo 'export PATH=$GOPATH/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
# Install necessary packages.
sudo apt-get update
sudo apt-get --assume-yes upgrade
sudo apt-get --assume-yes install golang-go python-django python-setuptools lua5.2
sudo easy_install -U pip
sudo pip install -U crcmod
# Checkout the Skia infra repo.
cd /b/skia-repo
GOPATH=/b/skia-repo/go/ go get -u -t go.skia.org/infra/...
## Instruction:
Install golang 1.8 on skia-ct-master
BUG=skia:6700
Change-Id: Idb0e35b68616be8d2b5d941af47da157f1d5785b
Reviewed-on: https://skia-review.googlesource.com/18139
Reviewed-by: Ben Wagner <[email protected]>
## Code After:
set -x
# Create required dirs.
mkdir --parents /b/skia-repo/
mkdir --parents /b/storage/
# Add env vars to ~/.bashrc
echo 'export GOROOT=/usr/local/go' >> ~/.bashrc
echo 'export GOPATH=/b/skia-repo/go/' >> ~/.bashrc
echo 'export PATH=$GOPATH/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
# Install necessary packages.
sudo apt-get update
sudo apt-get --assume-yes upgrade
sudo apt-get --assume-yes install python-django python-setuptools lua5.2
sudo easy_install -U pip
sudo pip install -U crcmod
# Install golang.
GO_VERSION=go1.8.linux-amd64
wget https://storage.googleapis.com/golang/$GO_VERSION.tar.gz
tar -zxvf $GO_VERSION.tar.gz
sudo mv go /usr/local/$GO_VERSION
sudo ln -s /usr/local/$GO_VERSION /usr/local/go
sudo ln -s /usr/local/$GO_VERSION/bin/go /usr/bin/go
rm $GO_VERSION.tar.gz
# Checkout the Skia infra repo.
cd /b/skia-repo
GOPATH=/b/skia-repo/go/ go get -u -t go.skia.org/infra/...
|
bd0b983eeb44927e1334816d282d897a9e31444e | app/views/platforms/index.html.slim | app/views/platforms/index.html.slim | .container
.platforms
- @platforms.each do |platform|
.platform
h3
= link_to platform.name, platform_path(platform)
div
.info
span Last Activity
div
= timeago_tag platform.traces.order(:created_at).last.created_at
.info
span Applications
div
= platform.applications.count
| .container
.platforms
- @platforms.each do |platform|
.platform
h3
= link_to platform.name, platform_path(platform)
div
.info
span Last Activity
div
- if platform.traces.any?
= timeago_tag platform.traces.order(:created_at).last.created_at
- else
span None
.info
span Applications
div
= platform.applications.count
| Fix index view when no traces exist | Fix index view when no traces exist
| Slim | agpl-3.0 | jgraichen/mnemosyne-server,jgraichen/mnemosyne-server,jgraichen/mnemosyne-server | slim | ## Code Before:
.container
.platforms
- @platforms.each do |platform|
.platform
h3
= link_to platform.name, platform_path(platform)
div
.info
span Last Activity
div
= timeago_tag platform.traces.order(:created_at).last.created_at
.info
span Applications
div
= platform.applications.count
## Instruction:
Fix index view when no traces exist
## Code After:
.container
.platforms
- @platforms.each do |platform|
.platform
h3
= link_to platform.name, platform_path(platform)
div
.info
span Last Activity
div
- if platform.traces.any?
= timeago_tag platform.traces.order(:created_at).last.created_at
- else
span None
.info
span Applications
div
= platform.applications.count
|
fd7c53dffb3670826479c830e262ca27f2f3debc | polyfills/setImmediate/config.json | polyfills/setImmediate/config.json | {
"browsers": {
"chrome": "*",
"firefox": "*",
"opera": "*",
"safari": "*",
"ie": "* - 9",
"ios_saf": "*",
"ios_chr": "*",
"android": "*",
"op_mob": "*",
"ie_mob": "*",
"firefox_mob": "*"
},
"docs": "https://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate",
"repo": "https://github.com/YuzuJS/setImmediate"
}
| {
"browsers": {
"chrome": "<= 31",
"firefox": "<= 28",
"opera": "<= 19",
"safari": "<= 7",
"ie": "*",
"ios_saf": "<= 7.1",
"ios_chr": "<= 7.1",
"android": "<= 4.4",
"op_mob": "*",
"ie_mob": "*",
"firefox_mob": "<= 28",
"bb": "<= 10",
"op_mini": "*"
},
"docs": "https://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate",
"repo": "https://github.com/YuzuJS/setImmediate"
}
| Add ranges for every browser version which does not have Promise natively. | Add ranges for every browser version which does not have Promise natively.
| JSON | mit | mcshaz/polyfill-service,kdzwinel/polyfill-service,mcshaz/polyfill-service,JakeChampion/polyfill-service,mcshaz/polyfill-service,JakeChampion/polyfill-service,kdzwinel/polyfill-service,jonathan-fielding/polyfill-service,jonathan-fielding/polyfill-service,jonathan-fielding/polyfill-service,kdzwinel/polyfill-service | json | ## Code Before:
{
"browsers": {
"chrome": "*",
"firefox": "*",
"opera": "*",
"safari": "*",
"ie": "* - 9",
"ios_saf": "*",
"ios_chr": "*",
"android": "*",
"op_mob": "*",
"ie_mob": "*",
"firefox_mob": "*"
},
"docs": "https://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate",
"repo": "https://github.com/YuzuJS/setImmediate"
}
## Instruction:
Add ranges for every browser version which does not have Promise natively.
## Code After:
{
"browsers": {
"chrome": "<= 31",
"firefox": "<= 28",
"opera": "<= 19",
"safari": "<= 7",
"ie": "*",
"ios_saf": "<= 7.1",
"ios_chr": "<= 7.1",
"android": "<= 4.4",
"op_mob": "*",
"ie_mob": "*",
"firefox_mob": "<= 28",
"bb": "<= 10",
"op_mini": "*"
},
"docs": "https://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate",
"repo": "https://github.com/YuzuJS/setImmediate"
}
|
003a099a4fb114985327b48fce62d2d16e83c81d | lib/title.rb | lib/title.rb | require 'title/version'
require 'rails/engine'
require 'title/engine'
require 'helpers/title/title_helper'
module Title
# Your code goes here...
end
| app = File.expand_path('../../app', __FILE__)
$LOAD_PATH.unshift(app) unless $LOAD_PATH.include?(app)
require 'title/version'
require 'rails/engine'
require 'title/engine'
require 'helpers/title/title_helper'
module Title
# Your code goes here...
end
| Add app back into load path | Add app back into load path
I bet this is an API change in Rails sometime but this is an easy fix.
Maybe I'll come back to it later.
| Ruby | mit | calebthompson/title | ruby | ## Code Before:
require 'title/version'
require 'rails/engine'
require 'title/engine'
require 'helpers/title/title_helper'
module Title
# Your code goes here...
end
## Instruction:
Add app back into load path
I bet this is an API change in Rails sometime but this is an easy fix.
Maybe I'll come back to it later.
## Code After:
app = File.expand_path('../../app', __FILE__)
$LOAD_PATH.unshift(app) unless $LOAD_PATH.include?(app)
require 'title/version'
require 'rails/engine'
require 'title/engine'
require 'helpers/title/title_helper'
module Title
# Your code goes here...
end
|
60d1246cb7339c8c6f114d0e77fcbdb777956fb7 | Library/Homebrew/utils/shebang.rb | Library/Homebrew/utils/shebang.rb |
module Utils
# Helper functions for manipulating shebang lines.
#
# @api private
module Shebang
module_function
# Specification on how to rewrite a given shebang.
#
# @api private
class RewriteInfo
attr_reader :regex, :max_length, :replacement
def initialize(regex, max_length, replacement)
@regex = regex
@max_length = max_length
@replacement = replacement
end
end
# Rewrite shebang for the given `paths` using the given `rewrite_info`.
#
# @example
# rewrite_shebang detected_python_shebang, bin/"script.py"
#
# @api public
def rewrite_shebang(rewrite_info, *paths)
paths.each do |f|
f = Pathname(f)
next unless f.file?
next unless rewrite_info.regex.match?(f.read(rewrite_info.max_length))
Utils::Inreplace.inreplace f.to_s, rewrite_info.regex, "#!#{rewrite_info.replacement}"
end
end
end
end
|
module Utils
# Helper functions for manipulating shebang lines.
#
# @api private
module Shebang
extend T::Sig
module_function
# Specification on how to rewrite a given shebang.
#
# @api private
class RewriteInfo
extend T::Sig
attr_reader :regex, :max_length, :replacement
sig { params(regex: Regexp, max_length: Integer, replacement: T.any(String, Pathname)).void }
def initialize(regex, max_length, replacement)
@regex = regex
@max_length = max_length
@replacement = replacement
end
end
# Rewrite shebang for the given `paths` using the given `rewrite_info`.
#
# @example
# rewrite_shebang detected_python_shebang, bin/"script.py"
#
# @api public
sig { params(rewrite_info: RewriteInfo, paths: T::Array[T.any(String, Pathname)]).void }
def rewrite_shebang(rewrite_info, *paths)
paths.each do |f|
f = Pathname(f)
next unless f.file?
next unless rewrite_info.regex.match?(f.read(rewrite_info.max_length))
Utils::Inreplace.inreplace f.to_s, rewrite_info.regex, "#!#{rewrite_info.replacement}"
end
end
end
end
| Add type signatures to `Utils::Shebang`. | Add type signatures to `Utils::Shebang`.
| Ruby | bsd-2-clause | EricFromCanada/brew,nandub/brew,EricFromCanada/brew,konqui/brew,claui/brew,nandub/brew,claui/brew,sjackman/homebrew,JCount/brew,MikeMcQuaid/brew,MikeMcQuaid/brew,nandub/brew,vitorgalvao/brew,claui/brew,EricFromCanada/brew,konqui/brew,nandub/brew,konqui/brew,claui/brew,vitorgalvao/brew,JCount/brew,Homebrew/brew,EricFromCanada/brew,Homebrew/brew,JCount/brew,JCount/brew,reitermarkus/brew,vitorgalvao/brew,reitermarkus/brew,sjackman/homebrew,Homebrew/brew,sjackman/homebrew,sjackman/homebrew,MikeMcQuaid/brew,Homebrew/brew,MikeMcQuaid/brew,reitermarkus/brew,vitorgalvao/brew,reitermarkus/brew,konqui/brew | ruby | ## Code Before:
module Utils
# Helper functions for manipulating shebang lines.
#
# @api private
module Shebang
module_function
# Specification on how to rewrite a given shebang.
#
# @api private
class RewriteInfo
attr_reader :regex, :max_length, :replacement
def initialize(regex, max_length, replacement)
@regex = regex
@max_length = max_length
@replacement = replacement
end
end
# Rewrite shebang for the given `paths` using the given `rewrite_info`.
#
# @example
# rewrite_shebang detected_python_shebang, bin/"script.py"
#
# @api public
def rewrite_shebang(rewrite_info, *paths)
paths.each do |f|
f = Pathname(f)
next unless f.file?
next unless rewrite_info.regex.match?(f.read(rewrite_info.max_length))
Utils::Inreplace.inreplace f.to_s, rewrite_info.regex, "#!#{rewrite_info.replacement}"
end
end
end
end
## Instruction:
Add type signatures to `Utils::Shebang`.
## Code After:
module Utils
# Helper functions for manipulating shebang lines.
#
# @api private
module Shebang
extend T::Sig
module_function
# Specification on how to rewrite a given shebang.
#
# @api private
class RewriteInfo
extend T::Sig
attr_reader :regex, :max_length, :replacement
sig { params(regex: Regexp, max_length: Integer, replacement: T.any(String, Pathname)).void }
def initialize(regex, max_length, replacement)
@regex = regex
@max_length = max_length
@replacement = replacement
end
end
# Rewrite shebang for the given `paths` using the given `rewrite_info`.
#
# @example
# rewrite_shebang detected_python_shebang, bin/"script.py"
#
# @api public
sig { params(rewrite_info: RewriteInfo, paths: T::Array[T.any(String, Pathname)]).void }
def rewrite_shebang(rewrite_info, *paths)
paths.each do |f|
f = Pathname(f)
next unless f.file?
next unless rewrite_info.regex.match?(f.read(rewrite_info.max_length))
Utils::Inreplace.inreplace f.to_s, rewrite_info.regex, "#!#{rewrite_info.replacement}"
end
end
end
end
|
cea0e33dd1a7186c392c851cb04b8ed4860ae96e | bokeh/src/main/scala/models/widgets/Layouts.scala | bokeh/src/main/scala/models/widgets/Layouts.scala | package io.continuum.bokeh
package widgets
@model abstract class Layout extends Widget {
object width extends Field[Int]
object height extends Field[Int]
}
@model class HBox extends Layout {
object children extends Field[List[Widget]]
}
@model class VBox extends Layout {
object children extends Field[List[Widget]]
}
| package io.continuum.bokeh
package widgets
@model abstract class Layout extends Widget {
object width extends Field[Int]
object height extends Field[Int]
}
@model abstract class BaseBox extends Layout {
object children extends Field[List[Widget]]
}
@model class HBox extends BaseBox
@model class VBox extends BaseBox
| Make {H,V}Box inherit from BaseBox | Make {H,V}Box inherit from BaseBox
| Scala | mit | bokeh/bokeh-scala,bokeh/bokeh-scala | scala | ## Code Before:
package io.continuum.bokeh
package widgets
@model abstract class Layout extends Widget {
object width extends Field[Int]
object height extends Field[Int]
}
@model class HBox extends Layout {
object children extends Field[List[Widget]]
}
@model class VBox extends Layout {
object children extends Field[List[Widget]]
}
## Instruction:
Make {H,V}Box inherit from BaseBox
## Code After:
package io.continuum.bokeh
package widgets
@model abstract class Layout extends Widget {
object width extends Field[Int]
object height extends Field[Int]
}
@model abstract class BaseBox extends Layout {
object children extends Field[List[Widget]]
}
@model class HBox extends BaseBox
@model class VBox extends BaseBox
|
28c35f432f73b0b710cc5f6a823e11bca53265b0 | Cython/Includes/cpython/float.pxd | Cython/Includes/cpython/float.pxd | cdef extern from "Python.h":
############################################################################
# 7.2.3
############################################################################
# PyFloatObject
#
# This subtype of PyObject represents a Python floating point object.
# PyTypeObject PyFloat_Type
#
# This instance of PyTypeObject represents the Python floating
# point type. This is the same object as float and
# types.FloatType.
bint PyFloat_Check(object p)
# Return true if its argument is a PyFloatObject or a subtype of
# PyFloatObject.
bint PyFloat_CheckExact(object p)
# Return true if its argument is a PyFloatObject, but not a
# subtype of PyFloatObject.
object PyFloat_FromString(object str, char **pend)
# Return value: New reference.
# Create a PyFloatObject object based on the string value in str,
# or NULL on failure. The pend argument is ignored. It remains
# only for backward compatibility.
object PyFloat_FromDouble(double v)
# Return value: New reference.
# Create a PyFloatObject object from v, or NULL on failure.
double PyFloat_AsDouble(object pyfloat) except? -1
# Return a C double representation of the contents of pyfloat.
double PyFloat_AS_DOUBLE(object pyfloat)
# Return a C double representation of the contents of pyfloat, but
# without error checking.
| cdef extern from "Python.h":
"""
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj)
#else
#define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj, NULL)
#endif
"""
############################################################################
# 7.2.3
############################################################################
# PyFloatObject
#
# This subtype of PyObject represents a Python floating point object.
# PyTypeObject PyFloat_Type
#
# This instance of PyTypeObject represents the Python floating
# point type. This is the same object as float and
# types.FloatType.
bint PyFloat_Check(object p)
# Return true if its argument is a PyFloatObject or a subtype of
# PyFloatObject.
bint PyFloat_CheckExact(object p)
# Return true if its argument is a PyFloatObject, but not a
# subtype of PyFloatObject.
object PyFloat_FromString "__Pyx_PyFloat_FromString" (object str)
# Return value: New reference.
# Create a PyFloatObject object based on the string value in str,
# or NULL on failure. The pend argument is ignored. It remains
# only for backward compatibility.
object PyFloat_FromDouble(double v)
# Return value: New reference.
# Create a PyFloatObject object from v, or NULL on failure.
double PyFloat_AsDouble(object pyfloat) except? -1
# Return a C double representation of the contents of pyfloat.
double PyFloat_AS_DOUBLE(object pyfloat)
# Return a C double representation of the contents of pyfloat, but
# without error checking.
| Change the declaration of PyFloat_FromString to the Py3 signature and provide a fallback for Py2. | Change the declaration of PyFloat_FromString to the Py3 signature and provide a fallback for Py2.
Closes https://github.com/cython/cython/issues/3909
| Cython | apache-2.0 | scoder/cython,cython/cython,da-woods/cython,scoder/cython,cython/cython,da-woods/cython,cython/cython,scoder/cython,da-woods/cython,da-woods/cython,scoder/cython,cython/cython | cython | ## Code Before:
cdef extern from "Python.h":
############################################################################
# 7.2.3
############################################################################
# PyFloatObject
#
# This subtype of PyObject represents a Python floating point object.
# PyTypeObject PyFloat_Type
#
# This instance of PyTypeObject represents the Python floating
# point type. This is the same object as float and
# types.FloatType.
bint PyFloat_Check(object p)
# Return true if its argument is a PyFloatObject or a subtype of
# PyFloatObject.
bint PyFloat_CheckExact(object p)
# Return true if its argument is a PyFloatObject, but not a
# subtype of PyFloatObject.
object PyFloat_FromString(object str, char **pend)
# Return value: New reference.
# Create a PyFloatObject object based on the string value in str,
# or NULL on failure. The pend argument is ignored. It remains
# only for backward compatibility.
object PyFloat_FromDouble(double v)
# Return value: New reference.
# Create a PyFloatObject object from v, or NULL on failure.
double PyFloat_AsDouble(object pyfloat) except? -1
# Return a C double representation of the contents of pyfloat.
double PyFloat_AS_DOUBLE(object pyfloat)
# Return a C double representation of the contents of pyfloat, but
# without error checking.
## Instruction:
Change the declaration of PyFloat_FromString to the Py3 signature and provide a fallback for Py2.
Closes https://github.com/cython/cython/issues/3909
## Code After:
cdef extern from "Python.h":
"""
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj)
#else
#define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj, NULL)
#endif
"""
############################################################################
# 7.2.3
############################################################################
# PyFloatObject
#
# This subtype of PyObject represents a Python floating point object.
# PyTypeObject PyFloat_Type
#
# This instance of PyTypeObject represents the Python floating
# point type. This is the same object as float and
# types.FloatType.
bint PyFloat_Check(object p)
# Return true if its argument is a PyFloatObject or a subtype of
# PyFloatObject.
bint PyFloat_CheckExact(object p)
# Return true if its argument is a PyFloatObject, but not a
# subtype of PyFloatObject.
object PyFloat_FromString "__Pyx_PyFloat_FromString" (object str)
# Return value: New reference.
# Create a PyFloatObject object based on the string value in str,
# or NULL on failure. The pend argument is ignored. It remains
# only for backward compatibility.
object PyFloat_FromDouble(double v)
# Return value: New reference.
# Create a PyFloatObject object from v, or NULL on failure.
double PyFloat_AsDouble(object pyfloat) except? -1
# Return a C double representation of the contents of pyfloat.
double PyFloat_AS_DOUBLE(object pyfloat)
# Return a C double representation of the contents of pyfloat, but
# without error checking.
|
f1f4f276a08e09e737f89581be6cbde07ab5c3b2 | plugins/providers/virtualbox/plugin.rb | plugins/providers/virtualbox/plugin.rb | require "vagrant"
module VagrantPlugins
module ProviderVirtualBox
class Plugin < Vagrant.plugin("2")
name "VirtualBox provider"
description <<-EOF
The VirtualBox provider allows Vagrant to manage and control
VirtualBox-based virtual machines.
EOF
provider(:virtualbox) do
require File.expand_path("../provider", __FILE__)
Provider
end
config(:virtualbox, :provider => :virtualbox) do
require File.expand_path("../config", __FILE__)
Config
end
end
autoload :Action, File.expand_path("../action", __FILE__)
# Drop some autoloads in here to optimize the performance of loading
# our drivers only when they are needed.
module Driver
autoload :Meta, File.expand_path("../driver/meta", __FILE__)
autoload :Version_4_0, File.expand_path("../driver/version_4_0", __FILE__)
autoload :Version_4_1, File.expand_path("../driver/version_4_1", __FILE__)
autoload :Version_4_2, File.expand_path("../driver/version_4_2", __FILE__)
end
module Model
autoload :ForwardedPort, File.expand_path("../model/forwarded_port", __FILE__)
end
module Util
autoload :CompileForwardedPorts, File.expand_path("../util/compile_forwarded_ports", __FILE__)
end
end
end
| require "vagrant"
module VagrantPlugins
module ProviderVirtualBox
class Plugin < Vagrant.plugin("2")
name "VirtualBox provider"
description <<-EOF
The VirtualBox provider allows Vagrant to manage and control
VirtualBox-based virtual machines.
EOF
provider(:virtualbox) do
require File.expand_path("../provider", __FILE__)
Provider
end
config(:virtualbox, :provider) do
require File.expand_path("../config", __FILE__)
Config
end
end
autoload :Action, File.expand_path("../action", __FILE__)
# Drop some autoloads in here to optimize the performance of loading
# our drivers only when they are needed.
module Driver
autoload :Meta, File.expand_path("../driver/meta", __FILE__)
autoload :Version_4_0, File.expand_path("../driver/version_4_0", __FILE__)
autoload :Version_4_1, File.expand_path("../driver/version_4_1", __FILE__)
autoload :Version_4_2, File.expand_path("../driver/version_4_2", __FILE__)
end
module Model
autoload :ForwardedPort, File.expand_path("../model/forwarded_port", __FILE__)
end
module Util
autoload :CompileForwardedPorts, File.expand_path("../util/compile_forwarded_ports", __FILE__)
end
end
end
| Set the virtualbox config scope | Set the virtualbox config scope
| Ruby | mit | Endika/vagrant,gitebra/vagrant,chrisvire/vagrant,jberends/vagrant,theist/vagrant,wkolean/vagrant,theist/vagrant,janek-warchol/vagrant,h4ck3rm1k3/vagrant,muhanadra/vagrant,h4ck3rm1k3/vagrant,otagi/vagrant,crashlytics/vagrant,jhoblitt/vagrant,bshurts/vagrant,tbarrongh/vagrant,iNecas/vagrant,kamazee/vagrant,rivy/vagrant,kamigerami/vagrant,marxarelli/vagrant,jtopper/vagrant,krig/vagrant,johntron/vagrant,lukebakken/vagrant,signed8bit/vagrant,sax/vagrant,jhoblitt/vagrant,bdwyertech/vagrant,rivy/vagrant,aneeshusa/vagrant,gitebra/vagrant,chrisvire/vagrant,clinstid/vagrant,aneeshusa/vagrant,janek-warchol/vagrant,Endika/vagrant,PatOShea/vagrant,gitebra/vagrant,chrisroberts/vagrant,genome21/vagrant,sax/vagrant,legal90/vagrant,patrys/vagrant,senglin/vagrant,patrys/vagrant,pwnall/vagrant,nickryand/vagrant,jean/vagrant,apertoso/vagrant,benizi/vagrant,sni/vagrant,shtouff/vagrant,tknerr/vagrant,tschortsch/vagrant,muhanadra/vagrant,genome21/vagrant,kamigerami/vagrant,sferik/vagrant,kalabiyau/vagrant,jberends/vagrant,jkburges/vagrant,tknerr/vagrant,PatOShea/vagrant,mkuzmin/vagrant,carlosefr/vagrant,legal90/vagrant,lukebakken/vagrant,senglin/vagrant,kamazee/vagrant,chrisroberts/vagrant,krig/vagrant,stephancom/vagrant,tjanez/vagrant,Endika/vagrant,mkuzmin/vagrant,blueyed/vagrant,Chhunlong/vagrant,mitchellh/vagrant,lonniev/vagrant,darkn3rd/vagrant,gajdaw/vagrant,chrisroberts/vagrant,gbarberi/vagrant,Ninir/vagrant,gpkfr/vagrant,marxarelli/vagrant,tjanez/vagrant,janek-warchol/vagrant,mwarren/vagrant,philoserf/vagrant,muhanadra/vagrant,philwrenn/vagrant,PatrickLang/vagrant,miguel250/vagrant,dharmab/vagrant,legal90/vagrant,tbriggs-curse/vagrant,theist/vagrant,myrjola/vagrant,loren-osborn/vagrant,MiLk/vagrant,bryson/vagrant,juiceinc/vagrant,nickryand/vagrant,myrjola/vagrant,ArloL/vagrant,doy/vagrant,sax/vagrant,dharmab/vagrant,sni/vagrant,petems/vagrant,aneeshusa/vagrant,iNecas/vagrant,philoserf/vagrant,genome21/vagrant,p0deje/vagrant,modulexcite/vagrant,dharmab/vagrant,taliesins/vagrant,p0deje/vagrant,mitchellh/vagrant,tomfanning/vagrant,jhoblitt/vagrant,teotihuacanada/vagrant,miguel250/vagrant,BlakeMesdag/vagrant,Chhunlong/vagrant,rivy/vagrant,jean/vagrant,jberends/vagrant,apertoso/vagrant,pwnall/vagrant,tbriggs-curse/vagrant,tknerr/vagrant,patrys/vagrant,blueyed/vagrant,sideci-sample/sideci-sample-vagrant,cgvarela/vagrant,Chhunlong/vagrant,TheBigBear/vagrant,lonniev/vagrant,mitchellh/vagrant,darkn3rd/vagrant,tomfanning/vagrant,BlakeMesdag/vagrant,dustymabe/vagrant,dharmab/vagrant,zsjohny/vagrant,bryson/vagrant,philwrenn/vagrant,pwnall/vagrant,cgvarela/vagrant,vamegh/vagrant,PatOShea/vagrant,miguel250/vagrant,jean/vagrant,jkburges/vagrant,channui/vagrant,modulexcite/vagrant,petems/vagrant,jmanero/vagrant,legal90/vagrant,mwrock/vagrant,jmanero/vagrant,wangfakang/vagrant,signed8bit/vagrant,Chhed13/vagrant,fnewberg/vagrant,marxarelli/vagrant,mpoeter/vagrant,zsjohny/vagrant,tbarrongh/vagrant,stephancom/vagrant,bheuvel/vagrant,benh57/vagrant,loren-osborn/vagrant,Ninir/vagrant,Endika/vagrant,dustymabe/vagrant,fnewberg/vagrant,kamazee/vagrant,tbarrongh/vagrant,tjanez/vagrant,PatOShea/vagrant,otagi/vagrant,kamigerami/vagrant,jtopper/vagrant,sideci-sample/sideci-sample-vagrant,PatrickLang/vagrant,dhoer/vagrant,dhoer/vagrant,aaam/vagrant,tbriggs-curse/vagrant,bshurts/vagrant,shtouff/vagrant,petems/vagrant,cgvarela/vagrant,ferventcoder/vagrant,kalabiyau/vagrant,invernizzi-at-google/vagrant,mpoeter/vagrant,evverx/vagrant,mkuzmin/vagrant,jfchevrette/vagrant,muhanadra/vagrant,channui/vagrant,fnewberg/vagrant,loren-osborn/vagrant,wkolean/vagrant,Avira/vagrant,taliesins/vagrant,bheuvel/vagrant,sni/vagrant,glensc/vagrant,benh57/vagrant,carlosefr/vagrant,miguel250/vagrant,fnewberg/vagrant,gpkfr/vagrant,justincampbell/vagrant,krig/vagrant,benizi/vagrant,bryson/vagrant,petems/vagrant,Chhed13/vagrant,nickryand/vagrant,dustymabe/vagrant,lukebakken/vagrant,gbarberi/vagrant,teotihuacanada/vagrant,vamegh/vagrant,crashlytics/vagrant,bryson/vagrant,Sgoettschkes/vagrant,bheuvel/vagrant,modulexcite/vagrant,gbarberi/vagrant,vamegh/vagrant,kalabiyau/vagrant,TheBigBear/vagrant,pwnall/vagrant,jean/vagrant,gajdaw/vagrant,signed8bit/vagrant,gpkfr/vagrant,otagi/vagrant,cgvarela/vagrant,philoserf/vagrant,sferik/vagrant,bshurts/vagrant,sni/vagrant,zsjohny/vagrant,TheBigBear/vagrant,Chhed13/vagrant,MiLk/vagrant,genome21/vagrant,mwarren/vagrant,rivy/vagrant,mpoeter/vagrant,Avira/vagrant,bdwyertech/vagrant,marxarelli/vagrant,ArloL/vagrant,mpoeter/vagrant,juiceinc/vagrant,apertoso/vagrant,johntron/vagrant,crashlytics/vagrant,Avira/vagrant,wangfakang/vagrant,aneeshusa/vagrant,shtouff/vagrant,gpkfr/vagrant,blueyed/vagrant,tschortsch/vagrant,channui/vagrant,jfchevrette/vagrant,denisbr/vagrant,tbriggs-curse/vagrant,krig/vagrant,philwrenn/vagrant,mitchellh/vagrant,jfchevrette/vagrant,signed8bit/vagrant,clinstid/vagrant,vamegh/vagrant,obnoxxx/vagrant,h4ck3rm1k3/vagrant,ianmiell/vagrant,justincampbell/vagrant,wangfakang/vagrant,mwrock/vagrant,ferventcoder/vagrant,p0deje/vagrant,senglin/vagrant,johntron/vagrant,johntron/vagrant,blueyed/vagrant,juiceinc/vagrant,ArloL/vagrant,wangfakang/vagrant,obnoxxx/vagrant,tbarrongh/vagrant,tjanez/vagrant,Avira/vagrant,ianmiell/vagrant,aaam/vagrant,justincampbell/vagrant,gajdaw/vagrant,teotihuacanada/vagrant,carlosefr/vagrant,h4ck3rm1k3/vagrant,kamazee/vagrant,crashlytics/vagrant,benizi/vagrant,jtopper/vagrant,chrisroberts/vagrant,jberends/vagrant,darkn3rd/vagrant,wkolean/vagrant,Ninir/vagrant,jkburges/vagrant,tschortsch/vagrant,tomfanning/vagrant,glensc/vagrant,myrjola/vagrant,mkuzmin/vagrant,PatrickLang/vagrant,myrjola/vagrant,gitebra/vagrant,otagi/vagrant,invernizzi-at-google/vagrant,stephancom/vagrant,aaam/vagrant,tschortsch/vagrant,invernizzi-at-google/vagrant,nickryand/vagrant,bdwyertech/vagrant,ferventcoder/vagrant,jmanero/vagrant,gbarberi/vagrant,stephancom/vagrant,juiceinc/vagrant,taliesins/vagrant,chrisvire/vagrant,dhoer/vagrant,jmanero/vagrant,dhoer/vagrant,modulexcite/vagrant,sferik/vagrant,TheBigBear/vagrant,denisbr/vagrant,chrisvire/vagrant,doy/vagrant,Chhunlong/vagrant,apertoso/vagrant,philoserf/vagrant,tknerr/vagrant,philwrenn/vagrant,teotihuacanada/vagrant,mwrock/vagrant,kamigerami/vagrant,bheuvel/vagrant,bdwyertech/vagrant,lonniev/vagrant,jhoblitt/vagrant,doy/vagrant,shtouff/vagrant,kalabiyau/vagrant,ianmiell/vagrant,doy/vagrant,aaam/vagrant,ArloL/vagrant,jtopper/vagrant,ferventcoder/vagrant,sideci-sample/sideci-sample-vagrant,obnoxxx/vagrant,bshurts/vagrant,lonniev/vagrant,taliesins/vagrant,Sgoettschkes/vagrant,tomfanning/vagrant,Sgoettschkes/vagrant,mwrock/vagrant,janek-warchol/vagrant,zsjohny/vagrant,PatrickLang/vagrant,senglin/vagrant,benh57/vagrant,iNecas/vagrant,jfchevrette/vagrant,sax/vagrant,jkburges/vagrant,evverx/vagrant,mwarren/vagrant,dustymabe/vagrant,lukebakken/vagrant,benh57/vagrant,justincampbell/vagrant,clinstid/vagrant,evverx/vagrant,wkolean/vagrant,BlakeMesdag/vagrant,theist/vagrant,Chhed13/vagrant,denisbr/vagrant,invernizzi-at-google/vagrant,denisbr/vagrant,Sgoettschkes/vagrant,patrys/vagrant,darkn3rd/vagrant,ianmiell/vagrant,benizi/vagrant,carlosefr/vagrant,loren-osborn/vagrant,mwarren/vagrant,MiLk/vagrant | ruby | ## Code Before:
require "vagrant"
module VagrantPlugins
module ProviderVirtualBox
class Plugin < Vagrant.plugin("2")
name "VirtualBox provider"
description <<-EOF
The VirtualBox provider allows Vagrant to manage and control
VirtualBox-based virtual machines.
EOF
provider(:virtualbox) do
require File.expand_path("../provider", __FILE__)
Provider
end
config(:virtualbox, :provider => :virtualbox) do
require File.expand_path("../config", __FILE__)
Config
end
end
autoload :Action, File.expand_path("../action", __FILE__)
# Drop some autoloads in here to optimize the performance of loading
# our drivers only when they are needed.
module Driver
autoload :Meta, File.expand_path("../driver/meta", __FILE__)
autoload :Version_4_0, File.expand_path("../driver/version_4_0", __FILE__)
autoload :Version_4_1, File.expand_path("../driver/version_4_1", __FILE__)
autoload :Version_4_2, File.expand_path("../driver/version_4_2", __FILE__)
end
module Model
autoload :ForwardedPort, File.expand_path("../model/forwarded_port", __FILE__)
end
module Util
autoload :CompileForwardedPorts, File.expand_path("../util/compile_forwarded_ports", __FILE__)
end
end
end
## Instruction:
Set the virtualbox config scope
## Code After:
require "vagrant"
module VagrantPlugins
module ProviderVirtualBox
class Plugin < Vagrant.plugin("2")
name "VirtualBox provider"
description <<-EOF
The VirtualBox provider allows Vagrant to manage and control
VirtualBox-based virtual machines.
EOF
provider(:virtualbox) do
require File.expand_path("../provider", __FILE__)
Provider
end
config(:virtualbox, :provider) do
require File.expand_path("../config", __FILE__)
Config
end
end
autoload :Action, File.expand_path("../action", __FILE__)
# Drop some autoloads in here to optimize the performance of loading
# our drivers only when they are needed.
module Driver
autoload :Meta, File.expand_path("../driver/meta", __FILE__)
autoload :Version_4_0, File.expand_path("../driver/version_4_0", __FILE__)
autoload :Version_4_1, File.expand_path("../driver/version_4_1", __FILE__)
autoload :Version_4_2, File.expand_path("../driver/version_4_2", __FILE__)
end
module Model
autoload :ForwardedPort, File.expand_path("../model/forwarded_port", __FILE__)
end
module Util
autoload :CompileForwardedPorts, File.expand_path("../util/compile_forwarded_ports", __FILE__)
end
end
end
|
6d1a61a1e56bbd27ed983096a4d659311b9d039c | src/client/formatters/html.coffee | src/client/formatters/html.coffee |
fs = require('fs')
exports.init = ->
extensions: ['html']
assetType: 'html'
contentType: 'text/html'
compile: (path, options, cb) ->
input = fs.readFileSync(path, 'utf8')
# If passing optional headers for main view
input = input.replace('<SocketStream>', options.headers) if options && options.headers
cb(input) |
fs = require('fs')
exports.init = ->
extensions: ['html']
assetType: 'html'
contentType: 'text/html'
compile: (path, options, cb) ->
input = fs.readFileSync(path, 'utf8')
# If passing optional headers for main view
if options && options.headers
input = input.replace('<SocketStream>', options.headers)
input = input.replace('<SocketStream/>', options.headers)
cb(input) | Make <SocketStream> tag xml compliant | Make <SocketStream> tag xml compliant
| CoffeeScript | mit | socketstream/socketstream,baiyanghese/socketstream,RomanMinkin/ss-grunt-test,baiyanghese/socketstream,jmptrader/socketstream,RomanMinkin/ss-grunt-test,socketstream/socketstream,ListnPlay/socketstream,jmptrader/socketstream,evanlh/socketstream,ListnPlay/socketstream,evanlh/socketstream | coffeescript | ## Code Before:
fs = require('fs')
exports.init = ->
extensions: ['html']
assetType: 'html'
contentType: 'text/html'
compile: (path, options, cb) ->
input = fs.readFileSync(path, 'utf8')
# If passing optional headers for main view
input = input.replace('<SocketStream>', options.headers) if options && options.headers
cb(input)
## Instruction:
Make <SocketStream> tag xml compliant
## Code After:
fs = require('fs')
exports.init = ->
extensions: ['html']
assetType: 'html'
contentType: 'text/html'
compile: (path, options, cb) ->
input = fs.readFileSync(path, 'utf8')
# If passing optional headers for main view
if options && options.headers
input = input.replace('<SocketStream>', options.headers)
input = input.replace('<SocketStream/>', options.headers)
cb(input) |
780a2900500b744b226747e5358f8d3d655e0e18 | lib/db.js | lib/db.js | var mysql = require('mysql'),
config = require('../config'),
Promise = require('promise');
var pool = mysql.createPool({
host: config.mysql.host,
database: config.mysql.db,
user: config.mysql.user,
password: config.mysql.pass
});
pool.callback_query = pool.query
pool.query = function query() {
var args = Array.prototype.slice.call(arguments, 0);
return new Promise(function(resolve, reject) {
args.push(function callback(err, res) {
if (err) { reject(err); }
resolve(res);
});
pool.callback_query.apply(pool, args);
});
}
module.exports = pool;
| var mysql = require('mysql'),
config = require('../config'),
Promise = require('promise');
var pool = mysql.createPool({
host: config.mysql.host,
database: config.mysql.db,
user: config.mysql.user,
password: config.mysql.pass
});
pool.callback_query = pool.query
pool.query = Promise.denodeify(pool.query);
module.exports = pool;
| Use denodeify in place of custom equivalent | Use denodeify in place of custom equivalent
| JavaScript | mit | iFixit/pulldasher,iFixit/pulldasher,iFixit/pulldasher,iFixit/pulldasher | javascript | ## Code Before:
var mysql = require('mysql'),
config = require('../config'),
Promise = require('promise');
var pool = mysql.createPool({
host: config.mysql.host,
database: config.mysql.db,
user: config.mysql.user,
password: config.mysql.pass
});
pool.callback_query = pool.query
pool.query = function query() {
var args = Array.prototype.slice.call(arguments, 0);
return new Promise(function(resolve, reject) {
args.push(function callback(err, res) {
if (err) { reject(err); }
resolve(res);
});
pool.callback_query.apply(pool, args);
});
}
module.exports = pool;
## Instruction:
Use denodeify in place of custom equivalent
## Code After:
var mysql = require('mysql'),
config = require('../config'),
Promise = require('promise');
var pool = mysql.createPool({
host: config.mysql.host,
database: config.mysql.db,
user: config.mysql.user,
password: config.mysql.pass
});
pool.callback_query = pool.query
pool.query = Promise.denodeify(pool.query);
module.exports = pool;
|
85cd16a724aedf58bc4424f4f8398ebcbedaffdc | update-project-references.sh | update-project-references.sh |
set -e
VERSION=$(grep '<Version>.*</Version>' src/CommonProperties.xml | sed -e 's/<\/\?Version>//g' | sed 's/ //g')
for proj in $(find src/Google.Cloud.Functions.Templates/templates -name '*proj')
do
sed -i -e "s/Include=\"Google.Cloud.Functions.Invoker\" Version=\".*\"/Include=\"Google.Cloud.Functions.Invoker\" Version=\"$VERSION\"/g" $proj
done
for proj in $(find examples -name '*proj')
do
sed -i -e "s/Include=\"Google.Cloud.Functions.Invoker\" Version=\".*\"/Include=\"Google.Cloud.Functions.Invoker\" Version=\"$VERSION\"/g" $proj
sed -i -e "s/Include=\"Google.Cloud.Functions.Invoker.Testing\" Version=\".*\"/Include=\"Google.Cloud.Functions.Invoker.Testing\" Version=\"$VERSION\"/g" $proj
done
|
set -e
VERSION=$(grep '<Version>.*</Version>' src/CommonProperties.xml | sed -e 's/<\/\?Version>//g' | sed 's/ //g')
for proj in $(find src/Google.Cloud.Functions.Templates/templates -name '*proj')
do
sed -i -e "s/Include=\"Google.Cloud.Functions.Hosting\" Version=\".*\"/Include=\"Google.Cloud.Functions.Hosting\" Version=\"$VERSION\"/g" $proj
done
for proj in $(find examples -name '*proj')
do
sed -i -e "s/Include=\"Google.Cloud.Functions.Hosting\" Version=\".*\"/Include=\"Google.Cloud.Functions.Hosting\" Version=\"$VERSION\"/g" $proj
sed -i -e "s/Include=\"Google.Cloud.Functions.Testing\" Version=\".*\"/Include=\"Google.Cloud.Functions.Testing\" Version=\"$VERSION\"/g" $proj
done
| Update tooling references to Invoker | Update tooling references to Invoker
| Shell | apache-2.0 | GoogleCloudPlatform/functions-framework-dotnet,GoogleCloudPlatform/functions-framework-dotnet | shell | ## Code Before:
set -e
VERSION=$(grep '<Version>.*</Version>' src/CommonProperties.xml | sed -e 's/<\/\?Version>//g' | sed 's/ //g')
for proj in $(find src/Google.Cloud.Functions.Templates/templates -name '*proj')
do
sed -i -e "s/Include=\"Google.Cloud.Functions.Invoker\" Version=\".*\"/Include=\"Google.Cloud.Functions.Invoker\" Version=\"$VERSION\"/g" $proj
done
for proj in $(find examples -name '*proj')
do
sed -i -e "s/Include=\"Google.Cloud.Functions.Invoker\" Version=\".*\"/Include=\"Google.Cloud.Functions.Invoker\" Version=\"$VERSION\"/g" $proj
sed -i -e "s/Include=\"Google.Cloud.Functions.Invoker.Testing\" Version=\".*\"/Include=\"Google.Cloud.Functions.Invoker.Testing\" Version=\"$VERSION\"/g" $proj
done
## Instruction:
Update tooling references to Invoker
## Code After:
set -e
VERSION=$(grep '<Version>.*</Version>' src/CommonProperties.xml | sed -e 's/<\/\?Version>//g' | sed 's/ //g')
for proj in $(find src/Google.Cloud.Functions.Templates/templates -name '*proj')
do
sed -i -e "s/Include=\"Google.Cloud.Functions.Hosting\" Version=\".*\"/Include=\"Google.Cloud.Functions.Hosting\" Version=\"$VERSION\"/g" $proj
done
for proj in $(find examples -name '*proj')
do
sed -i -e "s/Include=\"Google.Cloud.Functions.Hosting\" Version=\".*\"/Include=\"Google.Cloud.Functions.Hosting\" Version=\"$VERSION\"/g" $proj
sed -i -e "s/Include=\"Google.Cloud.Functions.Testing\" Version=\".*\"/Include=\"Google.Cloud.Functions.Testing\" Version=\"$VERSION\"/g" $proj
done
|
ff0a1efa7467737de4ce25fe89fcacd58cb57f4f | gradle.properties | gradle.properties | android.enableD8=true
#
# Library Descriptors
#
GROUP=com.nextfaze.devfun
VERSION_NAME=0.2.0
VERSION_SNAPSHOT=true
LIB_DESCRIPTION=Annotation based developer targeted library. Call any function from anywhere from a nice UI or web interface.
#
# POM
#
POM_URL=https://github.com/NextFaze/dev-fun
POM_ISSUES_URL=https://github.com/NextFaze/dev-fun/issues
#
# Publishing (override in ~/.gradle/gradle.properties)
#
DEVFUN_BINTRAY_USER=
DEVFUN_BINTRAY_KEY=
DEVFUN_MAVEN_USER=
DEVFUN_MAVEN_PASSWORD=
#
# Publishing for local/artifactory publishing (leave blank if deploying to Bintray/Maven)
#
DEVFUN_PUBLISH_URL=
DEVFUN_PUBLISH_URL_SNAPSHOT=
DEVFUN_PUBLISH_USER=
DEVFUN_PUBLISH_PASSWORD=
| GROUP=com.nextfaze.devfun
VERSION_NAME=0.2.0
VERSION_SNAPSHOT=true
LIB_DESCRIPTION=Annotation based developer targeted library. Call any function from anywhere from a nice UI or web interface.
#
# POM
#
POM_URL=https://github.com/NextFaze/dev-fun
POM_ISSUES_URL=https://github.com/NextFaze/dev-fun/issues
#
# Publishing (override in ~/.gradle/gradle.properties)
#
DEVFUN_BINTRAY_USER=
DEVFUN_BINTRAY_KEY=
DEVFUN_MAVEN_USER=
DEVFUN_MAVEN_PASSWORD=
#
# Publishing for local/artifactory publishing (leave blank if deploying to Bintray/Maven)
#
DEVFUN_PUBLISH_URL=
DEVFUN_PUBLISH_URL_SNAPSHOT=
DEVFUN_PUBLISH_USER=
DEVFUN_PUBLISH_PASSWORD=
| Remove explicit D8 flag as it's on by default with Android Gradle 3.1.0+ | Remove explicit D8 flag as it's on by default with Android Gradle 3.1.0+
| INI | apache-2.0 | NextFaze/dev-fun,NextFaze/dev-fun,NextFaze/dev-fun | ini | ## Code Before:
android.enableD8=true
#
# Library Descriptors
#
GROUP=com.nextfaze.devfun
VERSION_NAME=0.2.0
VERSION_SNAPSHOT=true
LIB_DESCRIPTION=Annotation based developer targeted library. Call any function from anywhere from a nice UI or web interface.
#
# POM
#
POM_URL=https://github.com/NextFaze/dev-fun
POM_ISSUES_URL=https://github.com/NextFaze/dev-fun/issues
#
# Publishing (override in ~/.gradle/gradle.properties)
#
DEVFUN_BINTRAY_USER=
DEVFUN_BINTRAY_KEY=
DEVFUN_MAVEN_USER=
DEVFUN_MAVEN_PASSWORD=
#
# Publishing for local/artifactory publishing (leave blank if deploying to Bintray/Maven)
#
DEVFUN_PUBLISH_URL=
DEVFUN_PUBLISH_URL_SNAPSHOT=
DEVFUN_PUBLISH_USER=
DEVFUN_PUBLISH_PASSWORD=
## Instruction:
Remove explicit D8 flag as it's on by default with Android Gradle 3.1.0+
## Code After:
GROUP=com.nextfaze.devfun
VERSION_NAME=0.2.0
VERSION_SNAPSHOT=true
LIB_DESCRIPTION=Annotation based developer targeted library. Call any function from anywhere from a nice UI or web interface.
#
# POM
#
POM_URL=https://github.com/NextFaze/dev-fun
POM_ISSUES_URL=https://github.com/NextFaze/dev-fun/issues
#
# Publishing (override in ~/.gradle/gradle.properties)
#
DEVFUN_BINTRAY_USER=
DEVFUN_BINTRAY_KEY=
DEVFUN_MAVEN_USER=
DEVFUN_MAVEN_PASSWORD=
#
# Publishing for local/artifactory publishing (leave blank if deploying to Bintray/Maven)
#
DEVFUN_PUBLISH_URL=
DEVFUN_PUBLISH_URL_SNAPSHOT=
DEVFUN_PUBLISH_USER=
DEVFUN_PUBLISH_PASSWORD=
|
65cc2c1290ed0d84b00e32ba4e46384906445744 | MediaAdminBundle/Resources/public/coffee/WysiwygSelectView.coffee | MediaAdminBundle/Resources/public/coffee/WysiwygSelectView.coffee | WysiwygSelectView = OrchestraView.extend(
events:
'click #sendToTiny': 'sendToTiny'
'change #media_crop_format' : 'changeCropFormat'
initialize: (options) ->
@options = @reduceOption(options, [
'domContainer'
'html'
'thumbnails'
'original'
])
@loadTemplates [
'OpenOrchestraMediaAdminBundle:BackOffice:Underscore/Include/previewImageView',
]
return
render: (options) ->
@setElement $(@options.html).append(@renderTemplate('OpenOrchestraMediaAdminBundle:BackOffice:Underscore/Include/previewImageView'
src: @options.original
))
@options.domContainer.html @$el
changeCropFormat: (event) ->
format = $(event.currentTarget).val()
image = @options.thumbnails[format] || @options.original
$('#preview_thumbnail', @$el).attr 'src', image
sendToTiny: (event) ->
event.preventDefault()
modalContainer = @$el.closest(".mediaModalContainer")
editorId = modalContainer.data("input")
tinymce.get(editorId).execCommand(
'mceInsertContent',
false,
'<img src="' + $('#preview_thumbnail', @$el).attr('src') + '"/>'
)
modalContainer.find('.mediaModalClose').click()
)
| WysiwygSelectView = OrchestraView.extend(
events:
'click #sendToTiny': 'sendToTiny'
'change #media_crop_format' : 'changeCropFormat'
initialize: (options) ->
@options = @reduceOption(options, [
'domContainer'
'html'
'thumbnails'
'original'
])
@loadTemplates [
'OpenOrchestraMediaAdminBundle:BackOffice:Underscore/Include/previewImageView',
]
return
render: (options) ->
@setElement $(@options.html).append(@renderTemplate('OpenOrchestraMediaAdminBundle:BackOffice:Underscore/Include/previewImageView'
src: @options.original
))
@options.domContainer.html @$el
changeCropFormat: (event) ->
format = $(event.currentTarget).val()
image = @options.thumbnails[format] || @options.original
$('#preview_thumbnail', @$el).attr 'src', image
sendToTiny: (event) ->
event.preventDefault()
modalContainer = @$el.closest(".mediaModalContainer")
editorId = modalContainer.data("input")
tinymce.get(editorId).execCommand(
'mceInsertContent',
false,
'<img class="tinymce-media" src="' + $('#preview_thumbnail', @$el).attr('src') + '"/>'
)
modalContainer.find('.mediaModalClose').click()
)
| Fix media url problem in tinymce | Fix media url problem in tinymce
| CoffeeScript | apache-2.0 | open-orchestra/open-orchestra-cms-bundle,open-orchestra/open-orchestra-cms-bundle,open-orchestra/open-orchestra-cms-bundle,open-orchestra/open-orchestra-media-admin-bundle,open-orchestra/open-orchestra-media-admin-bundle,open-orchestra/open-orchestra-media-admin-bundle | coffeescript | ## Code Before:
WysiwygSelectView = OrchestraView.extend(
events:
'click #sendToTiny': 'sendToTiny'
'change #media_crop_format' : 'changeCropFormat'
initialize: (options) ->
@options = @reduceOption(options, [
'domContainer'
'html'
'thumbnails'
'original'
])
@loadTemplates [
'OpenOrchestraMediaAdminBundle:BackOffice:Underscore/Include/previewImageView',
]
return
render: (options) ->
@setElement $(@options.html).append(@renderTemplate('OpenOrchestraMediaAdminBundle:BackOffice:Underscore/Include/previewImageView'
src: @options.original
))
@options.domContainer.html @$el
changeCropFormat: (event) ->
format = $(event.currentTarget).val()
image = @options.thumbnails[format] || @options.original
$('#preview_thumbnail', @$el).attr 'src', image
sendToTiny: (event) ->
event.preventDefault()
modalContainer = @$el.closest(".mediaModalContainer")
editorId = modalContainer.data("input")
tinymce.get(editorId).execCommand(
'mceInsertContent',
false,
'<img src="' + $('#preview_thumbnail', @$el).attr('src') + '"/>'
)
modalContainer.find('.mediaModalClose').click()
)
## Instruction:
Fix media url problem in tinymce
## Code After:
WysiwygSelectView = OrchestraView.extend(
events:
'click #sendToTiny': 'sendToTiny'
'change #media_crop_format' : 'changeCropFormat'
initialize: (options) ->
@options = @reduceOption(options, [
'domContainer'
'html'
'thumbnails'
'original'
])
@loadTemplates [
'OpenOrchestraMediaAdminBundle:BackOffice:Underscore/Include/previewImageView',
]
return
render: (options) ->
@setElement $(@options.html).append(@renderTemplate('OpenOrchestraMediaAdminBundle:BackOffice:Underscore/Include/previewImageView'
src: @options.original
))
@options.domContainer.html @$el
changeCropFormat: (event) ->
format = $(event.currentTarget).val()
image = @options.thumbnails[format] || @options.original
$('#preview_thumbnail', @$el).attr 'src', image
sendToTiny: (event) ->
event.preventDefault()
modalContainer = @$el.closest(".mediaModalContainer")
editorId = modalContainer.data("input")
tinymce.get(editorId).execCommand(
'mceInsertContent',
false,
'<img class="tinymce-media" src="' + $('#preview_thumbnail', @$el).attr('src') + '"/>'
)
modalContainer.find('.mediaModalClose').click()
)
|
959310ddd1d54621beefe993422a0d090410039e | _config.yml | _config.yml | markdown: kramdown
name: U.S. Open Data
url: http://usopendata.org
permalink: pretty
paginate: 5
paginate_path: "blog/page:num"
exclude: [".gitignore", "README.md", "_drafts"]
# https://gist.github.com/ravasthi/1834570
authors:
waldoj:
name: Waldo Jaquith
twitter: waldojaquith
github: waldoj
maxogden:
name: Max Ogden
twitter: maxogden
github: maxogden
compleatang:
name: Casey Kuhlman
twitter: compleatang
github: compleatang
GovInTrenches:
name: Christopher Whitaker
twitter: GovInTrenches
github: GovInTrenches
| markdown: kramdown
name: U.S. Open Data
url: http://usopendata.org
permalink: pretty
paginate: 5
paginate_path: "blog/page:num"
exclude: [".gitignore", "README.md", "_drafts"]
# https://gist.github.com/ravasthi/1834570
authors:
waldoj:
name: Waldo Jaquith
twitter: waldojaquith
github: waldoj
maxogden:
name: Max Ogden
twitter: maxogden
github: maxogden
compleatang:
name: Casey Kuhlman
twitter: compleatang
github: compleatang
GovInTrenches:
name: Christopher Whitaker
twitter: GovInTrenches
github: GovInTrenches
karissa:
name: Karissa McKelvey
twitter: o_Orissa
github: karissa
| Add Karissa to authors list | Add Karissa to authors list | YAML | mit | opendata/usopendata.org,opendata/usopendata.org | yaml | ## Code Before:
markdown: kramdown
name: U.S. Open Data
url: http://usopendata.org
permalink: pretty
paginate: 5
paginate_path: "blog/page:num"
exclude: [".gitignore", "README.md", "_drafts"]
# https://gist.github.com/ravasthi/1834570
authors:
waldoj:
name: Waldo Jaquith
twitter: waldojaquith
github: waldoj
maxogden:
name: Max Ogden
twitter: maxogden
github: maxogden
compleatang:
name: Casey Kuhlman
twitter: compleatang
github: compleatang
GovInTrenches:
name: Christopher Whitaker
twitter: GovInTrenches
github: GovInTrenches
## Instruction:
Add Karissa to authors list
## Code After:
markdown: kramdown
name: U.S. Open Data
url: http://usopendata.org
permalink: pretty
paginate: 5
paginate_path: "blog/page:num"
exclude: [".gitignore", "README.md", "_drafts"]
# https://gist.github.com/ravasthi/1834570
authors:
waldoj:
name: Waldo Jaquith
twitter: waldojaquith
github: waldoj
maxogden:
name: Max Ogden
twitter: maxogden
github: maxogden
compleatang:
name: Casey Kuhlman
twitter: compleatang
github: compleatang
GovInTrenches:
name: Christopher Whitaker
twitter: GovInTrenches
github: GovInTrenches
karissa:
name: Karissa McKelvey
twitter: o_Orissa
github: karissa
|
89fb9a67fdfd91192b3113d195e049d8d07e8d39 | examples/basic/index.js | examples/basic/index.js | import React from "react";
import ReactDOM from "react-dom";
import { Formik, Field, Form } from "formik";
const sleep = ms => new Promise(r => setTimeout(r, ms));
const Basic = () => (
<div>
<h1>Sign Up</h1>
<Formik
initialValues={{
firstName: "",
lastName: "",
email: ""
}}
onSubmit={async values => {
await sleep(500);
alert(JSON.stringify(values, null, 2));
}}
>
<Form>
<label htmlFor="firstName">First Name</label>
<Field name="firstName" placeholder="Jane" />
<label htmlFor="lastName">Last Name</label>
<Field name="lastName" placeholder="Doe" />
<label htmlFor="email">Email</label>
<Field name="email" placeholder="[email protected]" type="email" />
<button type="submit">Submit</button>
</Form>
</Formik>
</div>
);
ReactDOM.render(<Basic />, document.getElementById("root"));
| import React from 'react';
import ReactDOM from 'react-dom';
import { Formik, Field, Form } from 'formik';
const Basic = () => (
<div>
<h1>Sign Up</h1>
<Formik
initialValues={{
firstName: '',
lastName: '',
email: '',
}}
onSubmit={async values => {
await new Promise(r => setTimeout(r, 500));
alert(JSON.stringify(values, null, 2));
}}
>
<Form>
<label htmlFor="firstName">First Name</label>
<Field id="firstName" name="firstName" placeholder="Jane" />
<label htmlFor="lastName">Last Name</label>
<Field id="lastName" name="lastName" placeholder="Doe" />
<label htmlFor="email">Email</label>
<Field
id="email"
name="email"
placeholder="[email protected]"
type="email"
/>
<button type="submit">Submit</button>
</Form>
</Formik>
</div>
);
ReactDOM.render(<Basic />, document.getElementById('root'));
| Make basic example more a11y | Make basic example more a11y
| JavaScript | apache-2.0 | jaredpalmer/formik,jaredpalmer/formik,jaredpalmer/formik | javascript | ## Code Before:
import React from "react";
import ReactDOM from "react-dom";
import { Formik, Field, Form } from "formik";
const sleep = ms => new Promise(r => setTimeout(r, ms));
const Basic = () => (
<div>
<h1>Sign Up</h1>
<Formik
initialValues={{
firstName: "",
lastName: "",
email: ""
}}
onSubmit={async values => {
await sleep(500);
alert(JSON.stringify(values, null, 2));
}}
>
<Form>
<label htmlFor="firstName">First Name</label>
<Field name="firstName" placeholder="Jane" />
<label htmlFor="lastName">Last Name</label>
<Field name="lastName" placeholder="Doe" />
<label htmlFor="email">Email</label>
<Field name="email" placeholder="[email protected]" type="email" />
<button type="submit">Submit</button>
</Form>
</Formik>
</div>
);
ReactDOM.render(<Basic />, document.getElementById("root"));
## Instruction:
Make basic example more a11y
## Code After:
import React from 'react';
import ReactDOM from 'react-dom';
import { Formik, Field, Form } from 'formik';
const Basic = () => (
<div>
<h1>Sign Up</h1>
<Formik
initialValues={{
firstName: '',
lastName: '',
email: '',
}}
onSubmit={async values => {
await new Promise(r => setTimeout(r, 500));
alert(JSON.stringify(values, null, 2));
}}
>
<Form>
<label htmlFor="firstName">First Name</label>
<Field id="firstName" name="firstName" placeholder="Jane" />
<label htmlFor="lastName">Last Name</label>
<Field id="lastName" name="lastName" placeholder="Doe" />
<label htmlFor="email">Email</label>
<Field
id="email"
name="email"
placeholder="[email protected]"
type="email"
/>
<button type="submit">Submit</button>
</Form>
</Formik>
</div>
);
ReactDOM.render(<Basic />, document.getElementById('root'));
|
762a22338afe26ff9135dbc5c2660162b9d676d0 | index.html | index.html | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<link rel="stylesheet" href="/css/taw.min.css">
</head>
<body>
<main>
<h1>Visualizing TAW</h1>
</main>
<!-- Scripts -->
<script src="/js/taw.min.js"></script>
</body>
</html>
| <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<link rel="stylesheet" href="/css/taw.min.css">
</head>
<body>
<main>
<h1>Visualizing TAW</h1>
<section id="maps">
<h2>Seeing Movement</h2>
<div class="viz"></div>
<div class="map-control">
<a href="#"><span class="arrow prev"></span></a>
<h1></h1>
<a href="#"><span class="arrow next"></span></a>
</div>
<div class="total">
<button class="btn">Show Totals</button>
</div>
</section>
<section id="charts">
<h2>Seeing Workers</h2>
<div class="chart-container">
<div>
<div class="head-text">
<p>It's also possible to visualize several dimensions of the personal data about individual workers.</p>
</div>
<div class="worker-info-container"></div>
</div>
<div class="viz"></div>
<div class="total">
<button class="btn">Show All</button>
</div>
</div>
</section>
</main>
<!-- Scripts -->
<script src="/js/taw.min.js"></script>
</body>
</html>
| Restructure markup to organize page | Restructure markup to organize page
* Makes it easier to place viz among other elements
| HTML | mit | umd-mith/taw_viz,umd-mith/taw_viz | html | ## Code Before:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<link rel="stylesheet" href="/css/taw.min.css">
</head>
<body>
<main>
<h1>Visualizing TAW</h1>
</main>
<!-- Scripts -->
<script src="/js/taw.min.js"></script>
</body>
</html>
## Instruction:
Restructure markup to organize page
* Makes it easier to place viz among other elements
## Code After:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<link rel="stylesheet" href="/css/taw.min.css">
</head>
<body>
<main>
<h1>Visualizing TAW</h1>
<section id="maps">
<h2>Seeing Movement</h2>
<div class="viz"></div>
<div class="map-control">
<a href="#"><span class="arrow prev"></span></a>
<h1></h1>
<a href="#"><span class="arrow next"></span></a>
</div>
<div class="total">
<button class="btn">Show Totals</button>
</div>
</section>
<section id="charts">
<h2>Seeing Workers</h2>
<div class="chart-container">
<div>
<div class="head-text">
<p>It's also possible to visualize several dimensions of the personal data about individual workers.</p>
</div>
<div class="worker-info-container"></div>
</div>
<div class="viz"></div>
<div class="total">
<button class="btn">Show All</button>
</div>
</div>
</section>
</main>
<!-- Scripts -->
<script src="/js/taw.min.js"></script>
</body>
</html>
|
df51311e55b1a6a6052e7d2e2bc9b7d84d26f9f8 | ckanext/nhm/theme/templates/package/snippets/resource_view_full_text_search.html | ckanext/nhm/theme/templates/package/snippets/resource_view_full_text_search.html | {# Added to resource_view_filters.html - full text search #}
{% set placeholder = _('Enter search text') %}
{% set q = request.str_GET.get('q') or '' %}
{% set action = h.url_for(controller='package', action='resource_read', id=package['name'], resource_id=resource['id'], view_id=resource_view['id'], filters=filter) %}
<form class="module-content search-form" method="get">
<div class="search-input control-group">
<input type="text" class="search" name="q" autocomplete="off" value="{{ q }}" placeholder="{% block search_placeholder %}{{ placeholder }}{% endblock %}" />
<input type="hidden" name="view_id" value="{{ resource_view['id'] }}" />
{% if filters %}
<input type="hidden" name="filters" value="{{ filters }}" />
{% endif %}
<button type="submit">
<i class="icon-search"></i>
<span>{{ _('Search') }}</span>
</button>
</div>
</form>
| {# Added to resource_view_filters.html - full text search #}
{% set placeholder = _('Enter search text') %}
{% set q = request.str_GET.get('q') or '' %}
{% set action = h.url_for(controller='package', action='resource_read', id=package['name'], resource_id=resource['id'], view_id=resource_view['id'], filters=filter) %}
<form class="module-content search-form" method="get">
<div class="search-input control-group">
<input type="text" class="search" name="q" autocomplete="off" value="{{ q.decode('utf-8') }}" placeholder="{% block search_placeholder %}{{ placeholder }}{% endblock %}" />
<input type="hidden" name="view_id" value="{{ resource_view['id'] }}" />
{% if filters %}
<input type="hidden" name="filters" value="{{ filters }}" />
{% endif %}
<button type="submit">
<i class="icon-search"></i>
<span>{{ _('Search') }}</span>
</button>
</div>
</form>
| Allow the full text search form to use utf-8 data | Allow the full text search form to use utf-8 data
| HTML | mit | NaturalHistoryMuseum/ckanext-nhm,NaturalHistoryMuseum/ckanext-nhm,NaturalHistoryMuseum/ckanext-nhm | html | ## Code Before:
{# Added to resource_view_filters.html - full text search #}
{% set placeholder = _('Enter search text') %}
{% set q = request.str_GET.get('q') or '' %}
{% set action = h.url_for(controller='package', action='resource_read', id=package['name'], resource_id=resource['id'], view_id=resource_view['id'], filters=filter) %}
<form class="module-content search-form" method="get">
<div class="search-input control-group">
<input type="text" class="search" name="q" autocomplete="off" value="{{ q }}" placeholder="{% block search_placeholder %}{{ placeholder }}{% endblock %}" />
<input type="hidden" name="view_id" value="{{ resource_view['id'] }}" />
{% if filters %}
<input type="hidden" name="filters" value="{{ filters }}" />
{% endif %}
<button type="submit">
<i class="icon-search"></i>
<span>{{ _('Search') }}</span>
</button>
</div>
</form>
## Instruction:
Allow the full text search form to use utf-8 data
## Code After:
{# Added to resource_view_filters.html - full text search #}
{% set placeholder = _('Enter search text') %}
{% set q = request.str_GET.get('q') or '' %}
{% set action = h.url_for(controller='package', action='resource_read', id=package['name'], resource_id=resource['id'], view_id=resource_view['id'], filters=filter) %}
<form class="module-content search-form" method="get">
<div class="search-input control-group">
<input type="text" class="search" name="q" autocomplete="off" value="{{ q.decode('utf-8') }}" placeholder="{% block search_placeholder %}{{ placeholder }}{% endblock %}" />
<input type="hidden" name="view_id" value="{{ resource_view['id'] }}" />
{% if filters %}
<input type="hidden" name="filters" value="{{ filters }}" />
{% endif %}
<button type="submit">
<i class="icon-search"></i>
<span>{{ _('Search') }}</span>
</button>
</div>
</form>
|
8bba950e9836b4e1068be74efce2d3dbf5003fda | app/assets/javascripts/effective_ckeditor/before_init.js.erb | app/assets/javascripts/effective_ckeditor/before_init.js.erb | window['CKEDITOR_BASEPATH'] = "/assets/ckeditor/";
window.CKEDITOR_ASSETS_MAPPING = {
<% if Rails.application.assets.present? %>
<% Rails.application.assets.each_logical_path(->(path, _){ (path.include?('ckeditor/plugins/') || path.include?('ckeditor/skins/') || path.include?('effective/snippets/') || path.include?('effective/templates/') || path.include?('ckeditor/contents.css')) && !path.include?('effective_ckeditor')}) do |asset| %>
"<%= asset %>": "<%= asset_path(asset) %>",
<% end %>
<% end %>
}
window.CKEDITOR_GETURL = function( resource ) {
// If this is not a full or absolute path.
if ( resource.indexOf( ':/' ) == -1 && resource.indexOf( '/' ) !== 0 )
resource = this.basePath + resource;
// Add the timestamp, except for directories.
if ( resource.charAt( resource.length - 1 ) != '/' ) {
var url = resource.match( /^(.*?:\/\/[^\/]*)\/assets\/(.+)/ );
if(url) resource = (CKEDITOR_ASSETS_MAPPING[url[2]] || '/assets/' + url[2]);
}
return resource;
}
| window['CKEDITOR_BASEPATH'] = "/assets/ckeditor/";
window.CKEDITOR_ASSETS_MAPPING = {
<% (Rails.application.assets || environment).each_logical_path(->(path, _) { (path.include?('ckeditor/plugins/') || path.include?('ckeditor/skins/') || path.include?('effective/snippets/') || path.include?('effective/templates/') || path.include?('ckeditor/contents.css')) && !path.include?('effective_ckeditor')}) do |asset| %>
"<%= asset %>": "<%= asset_path(asset) %>",
<% end %>
}
window.CKEDITOR_GETURL = function( resource ) {
// If this is not a full or absolute path.
if ( resource.indexOf( ':/' ) == -1 && resource.indexOf( '/' ) !== 0 )
resource = this.basePath + resource;
// Add the timestamp, except for directories.
if ( resource.charAt( resource.length - 1 ) != '/' ) {
var url = resource.match( /^(.*?:\/\/[^\/]*)\/assets\/(.+)/ );
if(url) resource = (CKEDITOR_ASSETS_MAPPING[url[2]] || '/assets/' + url[2]);
}
return resource;
}
| Work with newer version of sprockets | Work with newer version of sprockets
| HTML+ERB | mit | code-and-effect/effective_ckeditor,code-and-effect/effective_ckeditor,code-and-effect/effective_ckeditor,code-and-effect/effective_ckeditor | html+erb | ## Code Before:
window['CKEDITOR_BASEPATH'] = "/assets/ckeditor/";
window.CKEDITOR_ASSETS_MAPPING = {
<% if Rails.application.assets.present? %>
<% Rails.application.assets.each_logical_path(->(path, _){ (path.include?('ckeditor/plugins/') || path.include?('ckeditor/skins/') || path.include?('effective/snippets/') || path.include?('effective/templates/') || path.include?('ckeditor/contents.css')) && !path.include?('effective_ckeditor')}) do |asset| %>
"<%= asset %>": "<%= asset_path(asset) %>",
<% end %>
<% end %>
}
window.CKEDITOR_GETURL = function( resource ) {
// If this is not a full or absolute path.
if ( resource.indexOf( ':/' ) == -1 && resource.indexOf( '/' ) !== 0 )
resource = this.basePath + resource;
// Add the timestamp, except for directories.
if ( resource.charAt( resource.length - 1 ) != '/' ) {
var url = resource.match( /^(.*?:\/\/[^\/]*)\/assets\/(.+)/ );
if(url) resource = (CKEDITOR_ASSETS_MAPPING[url[2]] || '/assets/' + url[2]);
}
return resource;
}
## Instruction:
Work with newer version of sprockets
## Code After:
window['CKEDITOR_BASEPATH'] = "/assets/ckeditor/";
window.CKEDITOR_ASSETS_MAPPING = {
<% (Rails.application.assets || environment).each_logical_path(->(path, _) { (path.include?('ckeditor/plugins/') || path.include?('ckeditor/skins/') || path.include?('effective/snippets/') || path.include?('effective/templates/') || path.include?('ckeditor/contents.css')) && !path.include?('effective_ckeditor')}) do |asset| %>
"<%= asset %>": "<%= asset_path(asset) %>",
<% end %>
}
window.CKEDITOR_GETURL = function( resource ) {
// If this is not a full or absolute path.
if ( resource.indexOf( ':/' ) == -1 && resource.indexOf( '/' ) !== 0 )
resource = this.basePath + resource;
// Add the timestamp, except for directories.
if ( resource.charAt( resource.length - 1 ) != '/' ) {
var url = resource.match( /^(.*?:\/\/[^\/]*)\/assets\/(.+)/ );
if(url) resource = (CKEDITOR_ASSETS_MAPPING[url[2]] || '/assets/' + url[2]);
}
return resource;
}
|
5a2c4b1c2ed12496c12735f62ead947af45bb993 | recipes/emacs/meta.yaml | recipes/emacs/meta.yaml | package:
name: emacs
version: 24.4
source:
fn: emacs-24.4.tar.xz
url: http://ftp.gnu.org/gnu/emacs/emacs-24.4.tar.xz
md5: ad487658ad7421ad8d7b5152192eb945
build:
number: 2 # [osx]
number: 1 # [linux32]
detect_binary_files_with_prefix: true
requirements:
build:
- libxml2
- ncurses
- dbus # [osx]
- jpeg # [linux]
- libpng # [linux]
- libtiff # [linux]
- giflib # [linux]
- gcc # [linux]
- freetype # [linux]
run:
- libxml2
- ncurses
- dbus # [osx]
- jpeg # [linux]
- libpng # [linux]
- libtiff # [linux]
- giflib # [linux]
- freetype # [linux]
test:
commands:
- emacs --help
- emacs --kill
about:
home: http://www.gnu.org/software/emacs/
license: GPL
summary: "GNU Emacs is an extensible, customizable text editor—and more."
|
package:
name: emacs
version: 24.5
source:
fn: emacs-24.5.tar.xz
url: http://ftp.gnu.org/gnu/emacs/emacs-24.5.tar.xz
sha1: 9d65d74506628cec19483204454aee25de5616e6
build:
number: 0
skip: # [win]
detect_binary_files_with_prefix: true
requirements:
build:
- libxml2
- ncurses
- dbus # [osx]
- jpeg # [linux]
- libpng # [linux]
- libtiff # [linux]
- giflib # [linux]
- gcc # [linux]
- freetype # [linux]
run:
- libxml2
- ncurses
- dbus # [osx]
- jpeg # [linux]
- libpng # [linux]
- libtiff # [linux]
- giflib # [linux]
- freetype # [linux]
test:
commands:
- emacs --help
- emacs --kill
about:
home: http://www.gnu.org/software/emacs/
license: GPL
summary: "GNU Emacs is an extensible, customizable text editor—and more."
extra:
recipe-maintainers:
- asmeurer
| Update and cleanup emacs recipe | Update and cleanup emacs recipe
| YAML | bsd-3-clause | barkls/staged-recipes,cpaulik/staged-recipes,vamega/staged-recipes,mariusvniekerk/staged-recipes,blowekamp/staged-recipes,synapticarbors/staged-recipes,goanpeca/staged-recipes,ceholden/staged-recipes,jakirkham/staged-recipes,grlee77/staged-recipes,mcernak/staged-recipes,jjhelmus/staged-recipes,igortg/staged-recipes,larray-project/staged-recipes,johanneskoester/staged-recipes,dharhas/staged-recipes,synapticarbors/staged-recipes,sannykr/staged-recipes,bmabey/staged-recipes,pmlandwehr/staged-recipes,nicoddemus/staged-recipes,gqmelo/staged-recipes,jerowe/staged-recipes,chrisburr/staged-recipes,NOAA-ORR-ERD/staged-recipes,rvalieris/staged-recipes,goanpeca/staged-recipes,scopatz/staged-recipes,pstjohn/staged-recipes,ocefpaf/staged-recipes,conda-forge/staged-recipes,barkls/staged-recipes,ReimarBauer/staged-recipes,johanneskoester/staged-recipes,khallock/staged-recipes,isuruf/staged-recipes,chohner/staged-recipes,dfroger/staged-recipes,birdsarah/staged-recipes,Savvysherpa/staged-recipes,sannykr/staged-recipes,dschreij/staged-recipes,nicoddemus/staged-recipes,pstjohn/staged-recipes,asmeurer/staged-recipes,jcb91/staged-recipes,hadim/staged-recipes,petrushy/staged-recipes,valgur/staged-recipes,SylvainCorlay/staged-recipes,birdsarah/staged-recipes,sodre/staged-recipes,caspervdw/staged-recipes,stuertz/staged-recipes,jochym/staged-recipes,Cashalow/staged-recipes,hbredin/staged-recipes,jakirkham/staged-recipes,glemaitre/staged-recipes,patricksnape/staged-recipes,hbredin/staged-recipes,Cashalow/staged-recipes,khallock/staged-recipes,cpaulik/staged-recipes,mcs07/staged-recipes,rvalieris/staged-recipes,grlee77/staged-recipes,SylvainCorlay/staged-recipes,NOAA-ORR-ERD/staged-recipes,atedstone/staged-recipes,igortg/staged-recipes,benvandyke/staged-recipes,koverholt/staged-recipes,shadowwalkersb/staged-recipes,atedstone/staged-recipes,pmlandwehr/staged-recipes,asmeurer/staged-recipes,stuertz/staged-recipes,vamega/staged-recipes,scopatz/staged-recipes,tylere/staged-recipes,planetarypy/staged-recipes,koverholt/staged-recipes,kwilcox/staged-recipes,ceholden/staged-recipes,gqmelo/staged-recipes,bmabey/staged-recipes,jochym/staged-recipes,ReimarBauer/staged-recipes,planetarypy/staged-recipes,Juanlu001/staged-recipes,jerowe/staged-recipes,rmcgibbo/staged-recipes,valgur/staged-recipes,rmcgibbo/staged-recipes,Juanlu001/staged-recipes,glemaitre/staged-recipes,Savvysherpa/staged-recipes,sodre/staged-recipes,dharhas/staged-recipes,larray-project/staged-recipes,blowekamp/staged-recipes,hadim/staged-recipes,kwilcox/staged-recipes,caspervdw/staged-recipes,hajapy/staged-recipes,johannesring/staged-recipes,basnijholt/staged-recipes,basnijholt/staged-recipes,patricksnape/staged-recipes,guillochon/staged-recipes,mcs07/staged-recipes,shadowwalkersb/staged-recipes,mcernak/staged-recipes,dfroger/staged-recipes,sodre/staged-recipes,mariusvniekerk/staged-recipes,guillochon/staged-recipes,benvandyke/staged-recipes,isuruf/staged-recipes,JohnGreeley/staged-recipes,conda-forge/staged-recipes,dschreij/staged-recipes,johannesring/staged-recipes,tylere/staged-recipes,chrisburr/staged-recipes,jcb91/staged-recipes,chohner/staged-recipes,JohnGreeley/staged-recipes,ocefpaf/staged-recipes,petrushy/staged-recipes,jjhelmus/staged-recipes,hajapy/staged-recipes | yaml | ## Code Before:
package:
name: emacs
version: 24.4
source:
fn: emacs-24.4.tar.xz
url: http://ftp.gnu.org/gnu/emacs/emacs-24.4.tar.xz
md5: ad487658ad7421ad8d7b5152192eb945
build:
number: 2 # [osx]
number: 1 # [linux32]
detect_binary_files_with_prefix: true
requirements:
build:
- libxml2
- ncurses
- dbus # [osx]
- jpeg # [linux]
- libpng # [linux]
- libtiff # [linux]
- giflib # [linux]
- gcc # [linux]
- freetype # [linux]
run:
- libxml2
- ncurses
- dbus # [osx]
- jpeg # [linux]
- libpng # [linux]
- libtiff # [linux]
- giflib # [linux]
- freetype # [linux]
test:
commands:
- emacs --help
- emacs --kill
about:
home: http://www.gnu.org/software/emacs/
license: GPL
summary: "GNU Emacs is an extensible, customizable text editor—and more."
## Instruction:
Update and cleanup emacs recipe
## Code After:
package:
name: emacs
version: 24.5
source:
fn: emacs-24.5.tar.xz
url: http://ftp.gnu.org/gnu/emacs/emacs-24.5.tar.xz
sha1: 9d65d74506628cec19483204454aee25de5616e6
build:
number: 0
skip: # [win]
detect_binary_files_with_prefix: true
requirements:
build:
- libxml2
- ncurses
- dbus # [osx]
- jpeg # [linux]
- libpng # [linux]
- libtiff # [linux]
- giflib # [linux]
- gcc # [linux]
- freetype # [linux]
run:
- libxml2
- ncurses
- dbus # [osx]
- jpeg # [linux]
- libpng # [linux]
- libtiff # [linux]
- giflib # [linux]
- freetype # [linux]
test:
commands:
- emacs --help
- emacs --kill
about:
home: http://www.gnu.org/software/emacs/
license: GPL
summary: "GNU Emacs is an extensible, customizable text editor—and more."
extra:
recipe-maintainers:
- asmeurer
|
a4e3d13df6a6f48974f541de0b5b061e8078ba9a | src/test/fuzz/fees.cpp | src/test/fuzz/fees.cpp | // Copyright (c) 2020 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <amount.h>
#include <optional.h>
#include <policy/fees.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <cstdint>
#include <string>
#include <vector>
void test_one_input(const std::vector<uint8_t>& buffer)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
const CFeeRate minimal_incremental_fee{ConsumeMoney(fuzzed_data_provider)};
FeeFilterRounder fee_filter_rounder{minimal_incremental_fee};
while (fuzzed_data_provider.ConsumeBool()) {
const CAmount current_minimum_fee = ConsumeMoney(fuzzed_data_provider);
const CAmount rounded_fee = fee_filter_rounder.round(current_minimum_fee);
assert(MoneyRange(rounded_fee));
}
}
| // Copyright (c) 2020 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <amount.h>
#include <optional.h>
#include <policy/fees.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <util/fees.h>
#include <cstdint>
#include <string>
#include <vector>
void test_one_input(const std::vector<uint8_t>& buffer)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
const CFeeRate minimal_incremental_fee{ConsumeMoney(fuzzed_data_provider)};
FeeFilterRounder fee_filter_rounder{minimal_incremental_fee};
while (fuzzed_data_provider.ConsumeBool()) {
const CAmount current_minimum_fee = ConsumeMoney(fuzzed_data_provider);
const CAmount rounded_fee = fee_filter_rounder.round(current_minimum_fee);
assert(MoneyRange(rounded_fee));
}
const FeeReason fee_reason = fuzzed_data_provider.PickValueInArray({FeeReason::NONE, FeeReason::HALF_ESTIMATE, FeeReason::FULL_ESTIMATE, FeeReason::DOUBLE_ESTIMATE, FeeReason::CONSERVATIVE, FeeReason::MEMPOOL_MIN, FeeReason::PAYTXFEE, FeeReason::FALLBACK, FeeReason::REQUIRED});
(void)StringForFeeReason(fee_reason);
}
| Add fuzzing coverage for StringForFeeReason(...) | tests: Add fuzzing coverage for StringForFeeReason(...)
| C++ | mit | practicalswift/bitcoin,instagibbs/bitcoin,tecnovert/particl-core,alecalve/bitcoin,Sjors/bitcoin,domob1812/namecore,sipsorcery/bitcoin,kallewoof/bitcoin,litecoin-project/litecoin,particl/particl-core,jambolo/bitcoin,prusnak/bitcoin,cdecker/bitcoin,MarcoFalke/bitcoin,prusnak/bitcoin,jlopp/statoshi,midnightmagic/bitcoin,rnicoll/bitcoin,rnicoll/dogecoin,ajtowns/bitcoin,namecoin/namecoin-core,fujicoin/fujicoin,namecoin/namecoin-core,apoelstra/bitcoin,domob1812/bitcoin,qtumproject/qtum,pataquets/namecoin-core,jnewbery/bitcoin,domob1812/namecore,ajtowns/bitcoin,MeshCollider/bitcoin,jnewbery/bitcoin,namecoin/namecore,EthanHeilman/bitcoin,fanquake/bitcoin,sstone/bitcoin,lateminer/bitcoin,achow101/bitcoin,mruddy/bitcoin,kallewoof/bitcoin,particl/particl-core,namecoin/namecoin-core,achow101/bitcoin,GroestlCoin/GroestlCoin,jlopp/statoshi,jamesob/bitcoin,EthanHeilman/bitcoin,achow101/bitcoin,AkioNak/bitcoin,yenliangl/bitcoin,ajtowns/bitcoin,yenliangl/bitcoin,pataquets/namecoin-core,jonasschnelli/bitcoin,anditto/bitcoin,dscotese/bitcoin,particl/particl-core,domob1812/bitcoin,litecoin-project/litecoin,instagibbs/bitcoin,Xekyo/bitcoin,AkioNak/bitcoin,bitcoin/bitcoin,particl/particl-core,prusnak/bitcoin,anditto/bitcoin,pstratem/bitcoin,jnewbery/bitcoin,Sjors/bitcoin,jonasschnelli/bitcoin,namecoin/namecore,sstone/bitcoin,ElementsProject/elements,EthanHeilman/bitcoin,instagibbs/bitcoin,dscotese/bitcoin,jambolo/bitcoin,instagibbs/bitcoin,anditto/bitcoin,lateminer/bitcoin,pstratem/bitcoin,domob1812/namecore,Xekyo/bitcoin,dscotese/bitcoin,GroestlCoin/bitcoin,achow101/bitcoin,bitcoinsSG/bitcoin,EthanHeilman/bitcoin,prusnak/bitcoin,mm-s/bitcoin,rnicoll/dogecoin,anditto/bitcoin,midnightmagic/bitcoin,mm-s/bitcoin,jamesob/bitcoin,andreaskern/bitcoin,n1bor/bitcoin,MeshCollider/bitcoin,apoelstra/bitcoin,pataquets/namecoin-core,andreaskern/bitcoin,sipsorcery/bitcoin,mruddy/bitcoin,qtumproject/qtum,litecoin-project/litecoin,alecalve/bitcoin,practicalswift/bitcoin,kallewoof/bitcoin,Xekyo/bitcoin,apoelstra/bitcoin,MarcoFalke/bitcoin,pataquets/namecoin-core,jonasschnelli/bitcoin,achow101/bitcoin,namecoin/namecoin-core,pataquets/namecoin-core,ElementsProject/elements,domob1812/namecore,kallewoof/bitcoin,JeremyRubin/bitcoin,ajtowns/bitcoin,andreaskern/bitcoin,namecoin/namecore,prusnak/bitcoin,domob1812/bitcoin,bitcoin/bitcoin,ajtowns/bitcoin,ElementsProject/elements,tecnovert/particl-core,domob1812/bitcoin,GroestlCoin/bitcoin,GroestlCoin/GroestlCoin,rnicoll/bitcoin,Sjors/bitcoin,MeshCollider/bitcoin,kallewoof/bitcoin,pstratem/bitcoin,anditto/bitcoin,bitcoinknots/bitcoin,particl/particl-core,prusnak/bitcoin,tecnovert/particl-core,MarcoFalke/bitcoin,Sjors/bitcoin,pstratem/bitcoin,AkioNak/bitcoin,ajtowns/bitcoin,dscotese/bitcoin,fanquake/bitcoin,jlopp/statoshi,midnightmagic/bitcoin,kallewoof/bitcoin,domob1812/namecore,tecnovert/particl-core,ElementsProject/elements,pataquets/namecoin-core,AkioNak/bitcoin,lateminer/bitcoin,GroestlCoin/GroestlCoin,fujicoin/fujicoin,dscotese/bitcoin,alecalve/bitcoin,GroestlCoin/GroestlCoin,jonasschnelli/bitcoin,bitcoinknots/bitcoin,mm-s/bitcoin,lateminer/bitcoin,sstone/bitcoin,ElementsProject/elements,practicalswift/bitcoin,fujicoin/fujicoin,bitcoinsSG/bitcoin,qtumproject/qtum,rnicoll/dogecoin,fujicoin/fujicoin,namecoin/namecoin-core,cdecker/bitcoin,litecoin-project/litecoin,alecalve/bitcoin,rnicoll/bitcoin,midnightmagic/bitcoin,sipsorcery/bitcoin,GroestlCoin/GroestlCoin,bitcoin/bitcoin,midnightmagic/bitcoin,yenliangl/bitcoin,rnicoll/dogecoin,JeremyRubin/bitcoin,domob1812/namecore,jlopp/statoshi,yenliangl/bitcoin,mruddy/bitcoin,mm-s/bitcoin,pstratem/bitcoin,lateminer/bitcoin,EthanHeilman/bitcoin,Xekyo/bitcoin,GroestlCoin/GroestlCoin,mruddy/bitcoin,particl/particl-core,andreaskern/bitcoin,rnicoll/bitcoin,litecoin-project/litecoin,namecoin/namecore,practicalswift/bitcoin,jamesob/bitcoin,AkioNak/bitcoin,apoelstra/bitcoin,practicalswift/bitcoin,jambolo/bitcoin,qtumproject/qtum,Xekyo/bitcoin,jambolo/bitcoin,sipsorcery/bitcoin,jnewbery/bitcoin,fanquake/bitcoin,domob1812/bitcoin,cdecker/bitcoin,midnightmagic/bitcoin,apoelstra/bitcoin,qtumproject/qtum,fujicoin/fujicoin,instagibbs/bitcoin,bitcoin/bitcoin,jambolo/bitcoin,sipsorcery/bitcoin,bitcoinknots/bitcoin,lateminer/bitcoin,ElementsProject/elements,GroestlCoin/bitcoin,practicalswift/bitcoin,MeshCollider/bitcoin,MeshCollider/bitcoin,sstone/bitcoin,fujicoin/fujicoin,jambolo/bitcoin,jlopp/statoshi,mruddy/bitcoin,fanquake/bitcoin,MarcoFalke/bitcoin,mm-s/bitcoin,fanquake/bitcoin,n1bor/bitcoin,bitcoinsSG/bitcoin,cdecker/bitcoin,pstratem/bitcoin,EthanHeilman/bitcoin,sstone/bitcoin,mruddy/bitcoin,dscotese/bitcoin,bitcoinknots/bitcoin,mm-s/bitcoin,rnicoll/dogecoin,jnewbery/bitcoin,yenliangl/bitcoin,litecoin-project/litecoin,Sjors/bitcoin,JeremyRubin/bitcoin,JeremyRubin/bitcoin,qtumproject/qtum,apoelstra/bitcoin,GroestlCoin/bitcoin,jamesob/bitcoin,rnicoll/bitcoin,rnicoll/bitcoin,jlopp/statoshi,n1bor/bitcoin,instagibbs/bitcoin,alecalve/bitcoin,bitcoinsSG/bitcoin,bitcoin/bitcoin,JeremyRubin/bitcoin,cdecker/bitcoin,n1bor/bitcoin,MarcoFalke/bitcoin,bitcoin/bitcoin,andreaskern/bitcoin,namecoin/namecore,anditto/bitcoin,Xekyo/bitcoin,MeshCollider/bitcoin,fanquake/bitcoin,bitcoinsSG/bitcoin,bitcoinknots/bitcoin,achow101/bitcoin,bitcoinsSG/bitcoin,n1bor/bitcoin,JeremyRubin/bitcoin,andreaskern/bitcoin,yenliangl/bitcoin,cdecker/bitcoin,GroestlCoin/bitcoin,AkioNak/bitcoin,alecalve/bitcoin,domob1812/bitcoin,tecnovert/particl-core,namecoin/namecore,sstone/bitcoin,qtumproject/qtum,n1bor/bitcoin,sipsorcery/bitcoin,jamesob/bitcoin,jonasschnelli/bitcoin,MarcoFalke/bitcoin,GroestlCoin/bitcoin,jamesob/bitcoin,namecoin/namecoin-core,tecnovert/particl-core | c++ | ## Code Before:
// Copyright (c) 2020 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <amount.h>
#include <optional.h>
#include <policy/fees.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <cstdint>
#include <string>
#include <vector>
void test_one_input(const std::vector<uint8_t>& buffer)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
const CFeeRate minimal_incremental_fee{ConsumeMoney(fuzzed_data_provider)};
FeeFilterRounder fee_filter_rounder{minimal_incremental_fee};
while (fuzzed_data_provider.ConsumeBool()) {
const CAmount current_minimum_fee = ConsumeMoney(fuzzed_data_provider);
const CAmount rounded_fee = fee_filter_rounder.round(current_minimum_fee);
assert(MoneyRange(rounded_fee));
}
}
## Instruction:
tests: Add fuzzing coverage for StringForFeeReason(...)
## Code After:
// Copyright (c) 2020 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <amount.h>
#include <optional.h>
#include <policy/fees.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <util/fees.h>
#include <cstdint>
#include <string>
#include <vector>
void test_one_input(const std::vector<uint8_t>& buffer)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
const CFeeRate minimal_incremental_fee{ConsumeMoney(fuzzed_data_provider)};
FeeFilterRounder fee_filter_rounder{minimal_incremental_fee};
while (fuzzed_data_provider.ConsumeBool()) {
const CAmount current_minimum_fee = ConsumeMoney(fuzzed_data_provider);
const CAmount rounded_fee = fee_filter_rounder.round(current_minimum_fee);
assert(MoneyRange(rounded_fee));
}
const FeeReason fee_reason = fuzzed_data_provider.PickValueInArray({FeeReason::NONE, FeeReason::HALF_ESTIMATE, FeeReason::FULL_ESTIMATE, FeeReason::DOUBLE_ESTIMATE, FeeReason::CONSERVATIVE, FeeReason::MEMPOOL_MIN, FeeReason::PAYTXFEE, FeeReason::FALLBACK, FeeReason::REQUIRED});
(void)StringForFeeReason(fee_reason);
}
|
990764ff9cd87477080dee1e26d3a40cf85e1cf9 | .atoum.php | .atoum.php | <?php
use mageekguy\atoum\reports;
$runner
->addTestsFromDirectory(__DIR__ . '/tests/units/classes')
->disallowUndefinedMethodInInterface()
;
$travis = getenv('TRAVIS');
if ($travis)
{
$script->addDefaultReport();
$coverallsToken = getenv('COVERALLS_REPO_TOKEN');
if ($coverallsToken)
{
$coverallsReport = new reports\asynchronous\coveralls(__DIR__ . '/classes', $coverallsToken);
$defaultFinder = $coverallsReport->getBranchFinder();
$coverallsReport
->setBranchFinder(function() use ($defaultFinder) {
if (($branch = getenv('TRAVIS_BRANCH')) === false)
{
$branch = $defaultFinder();
}
return $branch;
}
)
->setServiceName('travis-ci')
->setServiceJobId(getenv('TRAVIS_JOB_ID'))
->addDefaultWriter()
;
$runner->addReport($coverallsReport);
}
}
| <?php
use mageekguy\atoum\reports;
$runner
->addTestsFromDirectory(__DIR__ . '/tests/units/classes')
->disallowUndefinedMethodInInterface()
;
$travis = getenv('TRAVIS');
if ($travis)
{
$script->addDefaultReport();
$coverallsToken = getenv('COVERALLS_REPO_TOKEN');
if ($coverallsToken)
{
$coverallsReport = new reports\asynchronous\coveralls('classes', $coverallsToken);
$defaultFinder = $coverallsReport->getBranchFinder();
$coverallsReport
->setBranchFinder(function() use ($defaultFinder) {
if (($branch = getenv('TRAVIS_BRANCH')) === false)
{
$branch = $defaultFinder();
}
return $branch;
}
)
->setServiceName('travis-ci')
->setServiceJobId(getenv('TRAVIS_JOB_ID'))
->addDefaultWriter()
;
$runner->addReport($coverallsReport);
}
}
| Update source directory in coveralls configuration. | Update source directory in coveralls configuration.
| PHP | bsd-3-clause | estvoyage/net | php | ## Code Before:
<?php
use mageekguy\atoum\reports;
$runner
->addTestsFromDirectory(__DIR__ . '/tests/units/classes')
->disallowUndefinedMethodInInterface()
;
$travis = getenv('TRAVIS');
if ($travis)
{
$script->addDefaultReport();
$coverallsToken = getenv('COVERALLS_REPO_TOKEN');
if ($coverallsToken)
{
$coverallsReport = new reports\asynchronous\coveralls(__DIR__ . '/classes', $coverallsToken);
$defaultFinder = $coverallsReport->getBranchFinder();
$coverallsReport
->setBranchFinder(function() use ($defaultFinder) {
if (($branch = getenv('TRAVIS_BRANCH')) === false)
{
$branch = $defaultFinder();
}
return $branch;
}
)
->setServiceName('travis-ci')
->setServiceJobId(getenv('TRAVIS_JOB_ID'))
->addDefaultWriter()
;
$runner->addReport($coverallsReport);
}
}
## Instruction:
Update source directory in coveralls configuration.
## Code After:
<?php
use mageekguy\atoum\reports;
$runner
->addTestsFromDirectory(__DIR__ . '/tests/units/classes')
->disallowUndefinedMethodInInterface()
;
$travis = getenv('TRAVIS');
if ($travis)
{
$script->addDefaultReport();
$coverallsToken = getenv('COVERALLS_REPO_TOKEN');
if ($coverallsToken)
{
$coverallsReport = new reports\asynchronous\coveralls('classes', $coverallsToken);
$defaultFinder = $coverallsReport->getBranchFinder();
$coverallsReport
->setBranchFinder(function() use ($defaultFinder) {
if (($branch = getenv('TRAVIS_BRANCH')) === false)
{
$branch = $defaultFinder();
}
return $branch;
}
)
->setServiceName('travis-ci')
->setServiceJobId(getenv('TRAVIS_JOB_ID'))
->addDefaultWriter()
;
$runner->addReport($coverallsReport);
}
}
|
ad1b1cdf6a48a8c9d39714213570bf5b3e863824 | app/src/main/res/xml/preferences.xml | app/src/main/res/xml/preferences.xml | <?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="@string/activity_settings_category_general">
<EditTextPreference
android:key="@string/setting_device_name"
android:title="@string/activity_settings_pref_device_name" />
<EditTextPreference
android:key="@string/setting_transfer_directory"
android:title="@string/activity_settings_pref_transfer_directory" />
</PreferenceCategory>
</PreferenceScreen> | <?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="@string/activity_settings_category_general">
<EditTextPreference
android:key="@string/setting_device_name"
android:title="@string/activity_settings_pref_device_name" />
<EditTextPreference
android:key="@string/setting_transfer_directory"
android:title="@string/activity_settings_pref_transfer_directory" />
<SwitchPreference
android:key="@string/setting_behavior_receive"
android:title="@string/activity_settings_pref_behavior_receive"
android:summary="@string/activity_settings_pref_behavior_receive_summary"
android:defaultValue="true"/>
</PreferenceCategory>
</PreferenceScreen> | Add option for receiving transfers. | Add option for receiving transfers.
| XML | mit | nitroshare/nitroshare-android | xml | ## Code Before:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="@string/activity_settings_category_general">
<EditTextPreference
android:key="@string/setting_device_name"
android:title="@string/activity_settings_pref_device_name" />
<EditTextPreference
android:key="@string/setting_transfer_directory"
android:title="@string/activity_settings_pref_transfer_directory" />
</PreferenceCategory>
</PreferenceScreen>
## Instruction:
Add option for receiving transfers.
## Code After:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="@string/activity_settings_category_general">
<EditTextPreference
android:key="@string/setting_device_name"
android:title="@string/activity_settings_pref_device_name" />
<EditTextPreference
android:key="@string/setting_transfer_directory"
android:title="@string/activity_settings_pref_transfer_directory" />
<SwitchPreference
android:key="@string/setting_behavior_receive"
android:title="@string/activity_settings_pref_behavior_receive"
android:summary="@string/activity_settings_pref_behavior_receive_summary"
android:defaultValue="true"/>
</PreferenceCategory>
</PreferenceScreen> |
85263a3bb0708bebd5ed41c187715c952bfd588e | core/migrations/20220519154102_create_settings_table.php | core/migrations/20220519154102_create_settings_table.php | <?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreateSettingsTable extends AbstractMigration
{
public function change(): void
{
$table = $this->table('nl2_settings');
$table
->addColumn('name', 'string', ['length' => 64])
->addColumn('value', 'string', ['length' => 2048, 'null' => true]);
$table->create();
}
}
| <?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreateSettingsTable extends AbstractMigration
{
public function change(): void
{
$table = $this->table('nl2_settings');
$table
->addColumn('name', 'string', ['length' => 64])
->addColumn('value', 'string', ['length' => 2048, 'null' => true])
->addIndex('name', ['unique' => true]);
$table->create();
}
}
| Add unique constraint for nl2_settings during installation | Add unique constraint for nl2_settings during installation
| PHP | mit | NamelessMC/Nameless,NamelessMC/Nameless,NamelessMC/Nameless,NamelessMC/Nameless | php | ## Code Before:
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreateSettingsTable extends AbstractMigration
{
public function change(): void
{
$table = $this->table('nl2_settings');
$table
->addColumn('name', 'string', ['length' => 64])
->addColumn('value', 'string', ['length' => 2048, 'null' => true]);
$table->create();
}
}
## Instruction:
Add unique constraint for nl2_settings during installation
## Code After:
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreateSettingsTable extends AbstractMigration
{
public function change(): void
{
$table = $this->table('nl2_settings');
$table
->addColumn('name', 'string', ['length' => 64])
->addColumn('value', 'string', ['length' => 2048, 'null' => true])
->addIndex('name', ['unique' => true]);
$table->create();
}
}
|
0a0ebdde63628d9504ac9834ef20b996ab595d7d | stock_quant_package_product_packaging/models/stock_move_line.py | stock_quant_package_product_packaging/models/stock_move_line.py | from odoo import models
class StockMoveLine(models.Model):
_inherit = "stock.move.line"
def _action_done(self):
res = super()._action_done()
for line in self.filtered(lambda l: l.result_package_id):
line.result_package_id.auto_assign_packaging()
return res
| from odoo import models
class StockMoveLine(models.Model):
_inherit = "stock.move.line"
def _action_done(self):
res = super()._action_done()
# _action_done in stock module sometimes delete a move line, we
# have to check if it still exists before reading/writing on it
for line in self.exists().filtered(lambda l: l.result_package_id):
line.result_package_id.auto_assign_packaging()
return res
| Fix "record does not exist" when validating move line | Fix "record does not exist" when validating move line
When _action_done is called on a transfer, it may delete a part of
the move lines. The extension of `_action_done()` that assigns
a packaging fails with "Record does not exist or has been deleted".
Check if the if lines still exist before writing on them.
| Python | agpl-3.0 | BT-ojossen/stock-logistics-workflow,OCA/stock-logistics-workflow,BT-ojossen/stock-logistics-workflow,OCA/stock-logistics-workflow | python | ## Code Before:
from odoo import models
class StockMoveLine(models.Model):
_inherit = "stock.move.line"
def _action_done(self):
res = super()._action_done()
for line in self.filtered(lambda l: l.result_package_id):
line.result_package_id.auto_assign_packaging()
return res
## Instruction:
Fix "record does not exist" when validating move line
When _action_done is called on a transfer, it may delete a part of
the move lines. The extension of `_action_done()` that assigns
a packaging fails with "Record does not exist or has been deleted".
Check if the if lines still exist before writing on them.
## Code After:
from odoo import models
class StockMoveLine(models.Model):
_inherit = "stock.move.line"
def _action_done(self):
res = super()._action_done()
# _action_done in stock module sometimes delete a move line, we
# have to check if it still exists before reading/writing on it
for line in self.exists().filtered(lambda l: l.result_package_id):
line.result_package_id.auto_assign_packaging()
return res
|
2243b997aa970d764c833c02536f670709fc5912 | composer.json | composer.json | {
"name": "icanhazstring/systemctl-php",
"description": "PHP wrapper for systemctl",
"type": "library",
"require": {
"php": "^7.3",
"symfony/process": "^5.0"
},
"require-dev": {
"phpunit/phpunit": "^9.4.2",
"squizlabs/php_codesniffer": "^3.5.8",
"slevomat/coding-standard": "^6.4.1",
"phpstan/phpstan": "^0.12.51",
"phpspec/prophecy-phpunit": "^2.0.1"
},
"autoload": {
"psr-4": {
"icanhazstring\\SystemCtl\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"icanhazstring\\SystemCtl\\Test\\": "test/"
}
},
"license": "MIT",
"authors": [
{
"name": "icanhazstring",
"email": "[email protected]"
}
],
"scripts": {
"analyse": "vendor/bin/phpstan analyse --no-progress",
"test": "vendor/bin/phpunit",
"cs": "vendor/bin/phpcs"
}
}
| {
"name": "icanhazstring/systemctl-php",
"description": "PHP wrapper for systemctl",
"type": "library",
"require": {
"php": "^7.3",
"symfony/process": "^5.0"
},
"require-dev": {
"phpunit/phpunit": "^9.4.2",
"squizlabs/php_codesniffer": "^3.5.8",
"slevomat/coding-standard": "^6.4.1",
"phpstan/phpstan": "^0.12.51",
"phpspec/prophecy-phpunit": "^2.0.1"
},
"autoload": {
"psr-4": {
"icanhazstring\\SystemCtl\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"icanhazstring\\SystemCtl\\Test\\": "test/"
}
},
"license": "MIT",
"authors": [
{
"name": "icanhazstring",
"email": "[email protected]"
}
],
"extra": {
"branch-alias": {
"dev-master": "0.8.x-dev"
}
},
"scripts": {
"analyse": "vendor/bin/phpstan analyse --no-progress",
"test": "vendor/bin/phpunit",
"cs": "vendor/bin/phpcs"
}
}
| Add branch alias for dev-master | Add branch alias for dev-master
| JSON | mit | icanhazstring/systemctl-php | json | ## Code Before:
{
"name": "icanhazstring/systemctl-php",
"description": "PHP wrapper for systemctl",
"type": "library",
"require": {
"php": "^7.3",
"symfony/process": "^5.0"
},
"require-dev": {
"phpunit/phpunit": "^9.4.2",
"squizlabs/php_codesniffer": "^3.5.8",
"slevomat/coding-standard": "^6.4.1",
"phpstan/phpstan": "^0.12.51",
"phpspec/prophecy-phpunit": "^2.0.1"
},
"autoload": {
"psr-4": {
"icanhazstring\\SystemCtl\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"icanhazstring\\SystemCtl\\Test\\": "test/"
}
},
"license": "MIT",
"authors": [
{
"name": "icanhazstring",
"email": "[email protected]"
}
],
"scripts": {
"analyse": "vendor/bin/phpstan analyse --no-progress",
"test": "vendor/bin/phpunit",
"cs": "vendor/bin/phpcs"
}
}
## Instruction:
Add branch alias for dev-master
## Code After:
{
"name": "icanhazstring/systemctl-php",
"description": "PHP wrapper for systemctl",
"type": "library",
"require": {
"php": "^7.3",
"symfony/process": "^5.0"
},
"require-dev": {
"phpunit/phpunit": "^9.4.2",
"squizlabs/php_codesniffer": "^3.5.8",
"slevomat/coding-standard": "^6.4.1",
"phpstan/phpstan": "^0.12.51",
"phpspec/prophecy-phpunit": "^2.0.1"
},
"autoload": {
"psr-4": {
"icanhazstring\\SystemCtl\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"icanhazstring\\SystemCtl\\Test\\": "test/"
}
},
"license": "MIT",
"authors": [
{
"name": "icanhazstring",
"email": "[email protected]"
}
],
"extra": {
"branch-alias": {
"dev-master": "0.8.x-dev"
}
},
"scripts": {
"analyse": "vendor/bin/phpstan analyse --no-progress",
"test": "vendor/bin/phpunit",
"cs": "vendor/bin/phpcs"
}
}
|
152ac217d56280004102f1de355dfea2f6d74d66 | README.md | README.md | Yeoman generator for FSharp kata inspired by [generator-fsharp](https://github.com/fsprojects/generator-fsharp).

| Yeoman generator for FSharp kata inspired by [generator-fsharp](https://github.com/fsprojects/generator-fsharp).

## Installation
Install [Git](http://git-scm.com), [node.js](http://nodejs.org), [NuGet](http://www.nuget.org/), [F#](http://fsharp.org) and [Mono](http://mono-project.com/) for development on Windows/Linux/Mac OS X. Install FSharp on [Mac OS X](http://fsharp.org/use/mac/).
Install Yeoman:
npm install -g yo
Install the kata generator:
npm install -g generator-fsharp-kata
## Creating a kata project
In a new directory, generate the kata:
yo fsharp-kata
Change to the generated kata skeleton directory and execute:
./build.sh (Mac & Linux) or build.cmd (Windows)
| Add install and usage instructions | Add install and usage instructions | Markdown | apache-2.0 | pedromsantos/generator-fsharp-kata,pedromsantos/generator-fsharp-kata | markdown | ## Code Before:
Yeoman generator for FSharp kata inspired by [generator-fsharp](https://github.com/fsprojects/generator-fsharp).

## Instruction:
Add install and usage instructions
## Code After:
Yeoman generator for FSharp kata inspired by [generator-fsharp](https://github.com/fsprojects/generator-fsharp).

## Installation
Install [Git](http://git-scm.com), [node.js](http://nodejs.org), [NuGet](http://www.nuget.org/), [F#](http://fsharp.org) and [Mono](http://mono-project.com/) for development on Windows/Linux/Mac OS X. Install FSharp on [Mac OS X](http://fsharp.org/use/mac/).
Install Yeoman:
npm install -g yo
Install the kata generator:
npm install -g generator-fsharp-kata
## Creating a kata project
In a new directory, generate the kata:
yo fsharp-kata
Change to the generated kata skeleton directory and execute:
./build.sh (Mac & Linux) or build.cmd (Windows)
|
62286ab16dcf8326d3a6be1d039696467a30a350 | indico/modules/attachments/templates/_management_info_column.html | indico/modules/attachments/templates/_management_info_column.html | {% macro render_attachment_info(obj) -%}
<td class="i-table" data-text="{{ obj.attachment_count }}">
<span class="vertical-aligner">
<a href="#" class="icon-attachment"
title="{% trans %}Manage materials{% endtrans %}"
data-title="{% trans title=obj.title %}Manage materials for '{{ title }}'{% endtrans %}"
data-locator="{{ obj.locator|tojson|forceescape }}"
data-attachment-editor></a>
{% if not obj.attachment_count %}
<em>{% trans %}None{% endtrans %}</em>
{% else %}
<span class="label">
{% trans count=obj.attachment_count -%}
{{ count }} file
{%- pluralize -%}
{{ count }} files
{%- endtrans %}
</span>
{% endif %}
</span>
</td>
{%- endmacro %}
| {% macro render_attachment_info(obj) -%}
<td class="i-table" data-text="{{ obj.attachment_count }}">
<span class="vertical-aligner">
<a href="#" class="icon-attachment"
title="{% trans %}Manage materials{% endtrans %}"
data-title="{% trans title=obj.title %}Manage materials for '{{ title }}'{% endtrans %}"
data-locator="{{ obj.locator|tojson|forceescape }}"
data-attachment-editor>
{% if not obj.attachment_count %}
<em>{% trans %}None{% endtrans %}</em>
{% else %}
<span class="label">
{% trans count=obj.attachment_count -%}
{{ count }} file
{%- pluralize -%}
{{ count }} files
{%- endtrans %}
</span>
{% endif %}
</a>
</span>
</td>
{%- endmacro %}
| Add link to attachments column (contrib report) | Add link to attachments column (contrib report)
| HTML | mit | indico/indico,OmeGak/indico,pferreir/indico,ThiefMaster/indico,indico/indico,OmeGak/indico,mvidalgarcia/indico,pferreir/indico,mic4ael/indico,ThiefMaster/indico,OmeGak/indico,mvidalgarcia/indico,ThiefMaster/indico,OmeGak/indico,mvidalgarcia/indico,DirkHoffmann/indico,indico/indico,indico/indico,DirkHoffmann/indico,mvidalgarcia/indico,mic4ael/indico,mic4ael/indico,ThiefMaster/indico,DirkHoffmann/indico,mic4ael/indico,pferreir/indico,DirkHoffmann/indico,pferreir/indico | html | ## Code Before:
{% macro render_attachment_info(obj) -%}
<td class="i-table" data-text="{{ obj.attachment_count }}">
<span class="vertical-aligner">
<a href="#" class="icon-attachment"
title="{% trans %}Manage materials{% endtrans %}"
data-title="{% trans title=obj.title %}Manage materials for '{{ title }}'{% endtrans %}"
data-locator="{{ obj.locator|tojson|forceescape }}"
data-attachment-editor></a>
{% if not obj.attachment_count %}
<em>{% trans %}None{% endtrans %}</em>
{% else %}
<span class="label">
{% trans count=obj.attachment_count -%}
{{ count }} file
{%- pluralize -%}
{{ count }} files
{%- endtrans %}
</span>
{% endif %}
</span>
</td>
{%- endmacro %}
## Instruction:
Add link to attachments column (contrib report)
## Code After:
{% macro render_attachment_info(obj) -%}
<td class="i-table" data-text="{{ obj.attachment_count }}">
<span class="vertical-aligner">
<a href="#" class="icon-attachment"
title="{% trans %}Manage materials{% endtrans %}"
data-title="{% trans title=obj.title %}Manage materials for '{{ title }}'{% endtrans %}"
data-locator="{{ obj.locator|tojson|forceescape }}"
data-attachment-editor>
{% if not obj.attachment_count %}
<em>{% trans %}None{% endtrans %}</em>
{% else %}
<span class="label">
{% trans count=obj.attachment_count -%}
{{ count }} file
{%- pluralize -%}
{{ count }} files
{%- endtrans %}
</span>
{% endif %}
</a>
</span>
</td>
{%- endmacro %}
|
eba51643d97a797b4726f0480ce020e68db8c22f | init.php | init.php | <?php
date_default_timezone_set('Africa/Cairo');
require('src/PingLogger.php');
require('config.default.php');
@include('config.php');
$config = (object) array_merge($configDefault, $config);
require('auth.php');
| <?php
date_default_timezone_set('Africa/Cairo');
require('src/PingLogger.php');
require('config.default.php');
$config = array();
@include('config.php');
$config = (object) array_merge($configDefault, @$config);
require('auth.php');
| Fix notices when user config is not present. | Fix notices when user config is not present.
| PHP | apache-2.0 | zhibek/ping-logger,zhibek/ping-logger | php | ## Code Before:
<?php
date_default_timezone_set('Africa/Cairo');
require('src/PingLogger.php');
require('config.default.php');
@include('config.php');
$config = (object) array_merge($configDefault, $config);
require('auth.php');
## Instruction:
Fix notices when user config is not present.
## Code After:
<?php
date_default_timezone_set('Africa/Cairo');
require('src/PingLogger.php');
require('config.default.php');
$config = array();
@include('config.php');
$config = (object) array_merge($configDefault, @$config);
require('auth.php');
|
e0022bf9c4531799cfc1171232a3180f94f073aa | vamp-kubernetes/vamp_kube_copy_container.sh | vamp-kubernetes/vamp_kube_copy_container.sh |
green=$(tput setaf 2)
yellow=$(tput setaf 3)
reset=$(tput sgr0)
step() {
echo "${yellow}[STEP] $1${reset}"
}
ok() {
echo "${green}[OK] $1${reset}"
}
# save the locally published katana-kubernetes image
step "Saving katana-kubernetes to katana-kubernetes.tar."
docker save magneticio/vamp:katana-kubernetes > katana-kubernetes.tar
step "Retrieving minikube ip."
MINIKUBE_IP=$(minikube ip)
ok "Found minikube ip address: $MINIKUBE_IP."
# copy the katana-kubernetes.tar to minikube
step "Copying katana-kubernetes.tar to minikube virtual machine."
scp -i ~/.minikube/machines/minikube/id_rsa katana-kubernetes.tar \
docker@$MINIKUBE_IP:~/
# load the katana-kubernetes.tar in the minikube local docker
step "Loading katana-kubernetes.tar into minikube docker."
ssh -t -i ~/.minikube/machines/minikube/id_rsa docker@$MINIKUBE_IP \ \
"docker load -i katana-kubernetes.tar"
ok "Finished loading magnetnicio/vamp:katana-kubernetes to minikube."
|
green=$(tput setaf 2)
yellow=$(tput setaf 3)
reset=$(tput sgr0)
step() {
echo "${yellow}[STEP] $1${reset}"
}
ok() {
echo "${green}[OK] $1${reset}"
}
step "Building the magneticio/vamp:katana-kubernetes container."
../build.sh -b -i=vamp-kubernetes
ok "Finished building the magneticio/vamp:katana-kubernetes container."
# save the locally published katana-kubernetes image
step "Saving katana-kubernetes to katana-kubernetes.tar."
docker save magneticio/vamp:katana-kubernetes > katana-kubernetes.tar
step "Retrieving minikube ip."
MINIKUBE_IP=$(minikube ip)
ok "Found minikube ip address: $MINIKUBE_IP."
# copy the katana-kubernetes.tar to minikube
step "Copying katana-kubernetes.tar to minikube virtual machine."
scp -i ~/.minikube/machines/minikube/id_rsa katana-kubernetes.tar \
docker@$MINIKUBE_IP:~/
# load the katana-kubernetes.tar in the minikube local docker
step "Loading katana-kubernetes.tar into minikube docker."
ssh -t -i ~/.minikube/machines/minikube/id_rsa docker@$MINIKUBE_IP \ \
"docker load -i katana-kubernetes.tar"
ok "Finished loading magnetnicio/vamp:katana-kubernetes to minikube."
| Add build step to kubernetes container copy script | Add build step to kubernetes container copy script
| Shell | apache-2.0 | magnetic-ci/vamp-docker-images,magneticio/vamp-docker-images | shell | ## Code Before:
green=$(tput setaf 2)
yellow=$(tput setaf 3)
reset=$(tput sgr0)
step() {
echo "${yellow}[STEP] $1${reset}"
}
ok() {
echo "${green}[OK] $1${reset}"
}
# save the locally published katana-kubernetes image
step "Saving katana-kubernetes to katana-kubernetes.tar."
docker save magneticio/vamp:katana-kubernetes > katana-kubernetes.tar
step "Retrieving minikube ip."
MINIKUBE_IP=$(minikube ip)
ok "Found minikube ip address: $MINIKUBE_IP."
# copy the katana-kubernetes.tar to minikube
step "Copying katana-kubernetes.tar to minikube virtual machine."
scp -i ~/.minikube/machines/minikube/id_rsa katana-kubernetes.tar \
docker@$MINIKUBE_IP:~/
# load the katana-kubernetes.tar in the minikube local docker
step "Loading katana-kubernetes.tar into minikube docker."
ssh -t -i ~/.minikube/machines/minikube/id_rsa docker@$MINIKUBE_IP \ \
"docker load -i katana-kubernetes.tar"
ok "Finished loading magnetnicio/vamp:katana-kubernetes to minikube."
## Instruction:
Add build step to kubernetes container copy script
## Code After:
green=$(tput setaf 2)
yellow=$(tput setaf 3)
reset=$(tput sgr0)
step() {
echo "${yellow}[STEP] $1${reset}"
}
ok() {
echo "${green}[OK] $1${reset}"
}
step "Building the magneticio/vamp:katana-kubernetes container."
../build.sh -b -i=vamp-kubernetes
ok "Finished building the magneticio/vamp:katana-kubernetes container."
# save the locally published katana-kubernetes image
step "Saving katana-kubernetes to katana-kubernetes.tar."
docker save magneticio/vamp:katana-kubernetes > katana-kubernetes.tar
step "Retrieving minikube ip."
MINIKUBE_IP=$(minikube ip)
ok "Found minikube ip address: $MINIKUBE_IP."
# copy the katana-kubernetes.tar to minikube
step "Copying katana-kubernetes.tar to minikube virtual machine."
scp -i ~/.minikube/machines/minikube/id_rsa katana-kubernetes.tar \
docker@$MINIKUBE_IP:~/
# load the katana-kubernetes.tar in the minikube local docker
step "Loading katana-kubernetes.tar into minikube docker."
ssh -t -i ~/.minikube/machines/minikube/id_rsa docker@$MINIKUBE_IP \ \
"docker load -i katana-kubernetes.tar"
ok "Finished loading magnetnicio/vamp:katana-kubernetes to minikube."
|
9fd0699054c1604a9eda8c82175af93a72099847 | app/src/components/Navbar/Navbar.jsx | app/src/components/Navbar/Navbar.jsx | import React, {Component} from 'react';
import './Navbar.css';
class Navbar extends Component{
render(){
return(
<div className="topnav">
<a href="https://github.com/Roshanjossey/first-contributions/blob/master/README.md">Get Started</a>
<a href="#about">About</a>
</div>
)
}
}
export default Navbar;
| import React, {Component} from 'react';
import './Navbar.css';
class Navbar extends Component{
render(){
return(
<div className="topnav">
<a href="https://twitter.com/1stContribution" target="_blank">twitter</a>
<a href="https://firstcontributions.herokuapp.com" target="_blank">slack</a>
</div>
)
}
}
export default Navbar;
| Change links in navbar to point to slach and twitter | Change links in navbar to point to slach and twitter
| JSX | mit | lauratavares/first-contributions,Shhzdmrz/first-contributions,Shhzdmrz/first-contributions,dichaves/first-contributions,RickHaan/first-contributions,Abhishekchakru/first-contributions,FearTheFrail/first-contributions,RickHaan/first-contributions,dichaves/first-contributions,lauratavares/first-contributions,Abhishekchakru/first-contributions,FearTheFrail/first-contributions | jsx | ## Code Before:
import React, {Component} from 'react';
import './Navbar.css';
class Navbar extends Component{
render(){
return(
<div className="topnav">
<a href="https://github.com/Roshanjossey/first-contributions/blob/master/README.md">Get Started</a>
<a href="#about">About</a>
</div>
)
}
}
export default Navbar;
## Instruction:
Change links in navbar to point to slach and twitter
## Code After:
import React, {Component} from 'react';
import './Navbar.css';
class Navbar extends Component{
render(){
return(
<div className="topnav">
<a href="https://twitter.com/1stContribution" target="_blank">twitter</a>
<a href="https://firstcontributions.herokuapp.com" target="_blank">slack</a>
</div>
)
}
}
export default Navbar;
|
c3863e11abfc840e79836260c637a22b09c77c9b | libs/Format/HTMLFile/ContentTypes/Markdown/CommonMarkConverter.php | libs/Format/HTMLFile/ContentTypes/Markdown/CommonMarkConverter.php | <?php namespace Todaymade\Daux\Format\HTMLFile\ContentTypes\Markdown;
use Todaymade\Daux\Config;
class CommonMarkConverter extends \Todaymade\Daux\Format\HTML\ContentTypes\Markdown\CommonMarkConverter
{
protected function getLinkRenderer(Config $config)
{
return new LinkRenderer($config);
}
}
| <?php namespace Todaymade\Daux\Format\HTMLFile\ContentTypes\Markdown;
use League\CommonMark\Normalizer\UniqueSlugNormalizerInterface;
use Todaymade\Daux\Config;
class CommonMarkConverter extends \Todaymade\Daux\Format\HTML\ContentTypes\Markdown\CommonMarkConverter
{
/**
* Create a new Markdown converter pre-configured for CommonMark
*
* @param array<string, mixed> $config
*/
public function __construct(array $config = [])
{
// As we are using a single page, we must make sure permalinks don't collide
$config['slug_normalizer']['unique'] = UniqueSlugNormalizerInterface::PER_ENVIRONMENT;
parent::__construct($config);
}
protected function getLinkRenderer(Config $config)
{
return new LinkRenderer($config);
}
}
| Make sure permalinks are unique in singlepage | Make sure permalinks are unique in singlepage
| PHP | mit | dauxio/daux.io,dauxio/daux.io,dauxio/daux.io | php | ## Code Before:
<?php namespace Todaymade\Daux\Format\HTMLFile\ContentTypes\Markdown;
use Todaymade\Daux\Config;
class CommonMarkConverter extends \Todaymade\Daux\Format\HTML\ContentTypes\Markdown\CommonMarkConverter
{
protected function getLinkRenderer(Config $config)
{
return new LinkRenderer($config);
}
}
## Instruction:
Make sure permalinks are unique in singlepage
## Code After:
<?php namespace Todaymade\Daux\Format\HTMLFile\ContentTypes\Markdown;
use League\CommonMark\Normalizer\UniqueSlugNormalizerInterface;
use Todaymade\Daux\Config;
class CommonMarkConverter extends \Todaymade\Daux\Format\HTML\ContentTypes\Markdown\CommonMarkConverter
{
/**
* Create a new Markdown converter pre-configured for CommonMark
*
* @param array<string, mixed> $config
*/
public function __construct(array $config = [])
{
// As we are using a single page, we must make sure permalinks don't collide
$config['slug_normalizer']['unique'] = UniqueSlugNormalizerInterface::PER_ENVIRONMENT;
parent::__construct($config);
}
protected function getLinkRenderer(Config $config)
{
return new LinkRenderer($config);
}
}
|
4f4a469af510071868c179eb16fe76033f90288f | website/mcapp.projects/src/app/project/experiments/experiment/components/workflow/mc-processes-workflow.html | website/mcapp.projects/src/app/project/experiments/experiment/components/workflow/mc-processes-workflow.html | <div>
<div layout="row" style="margin-right:15px; padding-top: 10px">
<div flex="{{$ctrl.workspaceSize}}" style="min-height:75vh">
<mc-workflow-toolbar></mc-workflow-toolbar>
<mc-processes-workflow-graph ng-show="$ctrl.showGraphView"
processes="$ctrl.processes"
highlight-processes="$ctrl.highlightProcesses">
</mc-processes-workflow-graph>
<mc-processes-workflow-outline ng-show="!$ctrl.showGraphView"
highlight-processes="$ctrl.highlightProcesses"
dataset="$ctrl.dataset"
processes="$ctrl.processes">
</mc-processes-workflow-outline>
</div>
<span flex style="border-left: solid 2px grey; margin-left: 8px" ng-if="$ctrl.showSidebar"></span>
<div flex="30" ng-if="$ctrl.showSidebar">
<mc-processes-workflow-sidebar></mc-processes-workflow-sidebar>
</div>
</div>
</div>
| <div>
<div layout="row" style="margin-right:15px; padding-top: 10px">
<div flex="{{$ctrl.workspaceSize}}" style="min-height:75vh">
<mc-workflow-toolbar></mc-workflow-toolbar>
<mc-processes-workflow-graph ng-show="$ctrl.showGraphView"
processes="$ctrl.processes"
highlight-processes="$ctrl.highlightProcesses">
</mc-processes-workflow-graph>
<mc-processes-workflow-outline ng-show="!$ctrl.showGraphView"
highlight-processes="$ctrl.highlightProcesses"
dataset="$ctrl.dataset"
processes="$ctrl.processes">
</mc-processes-workflow-outline>
</div>
<span flex style="border-left: solid 2px grey; margin-left: 8px" ng-if="$ctrl.showSidebar"></span>
<div flex="30" ng-if="$ctrl.showSidebar" style="z-index:5">
<mc-processes-workflow-sidebar></mc-processes-workflow-sidebar>
</div>
</div>
</div>
| Set z-index of element so that its above the graph canvas | Set z-index of element so that its above the graph canvas
| HTML | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | html | ## Code Before:
<div>
<div layout="row" style="margin-right:15px; padding-top: 10px">
<div flex="{{$ctrl.workspaceSize}}" style="min-height:75vh">
<mc-workflow-toolbar></mc-workflow-toolbar>
<mc-processes-workflow-graph ng-show="$ctrl.showGraphView"
processes="$ctrl.processes"
highlight-processes="$ctrl.highlightProcesses">
</mc-processes-workflow-graph>
<mc-processes-workflow-outline ng-show="!$ctrl.showGraphView"
highlight-processes="$ctrl.highlightProcesses"
dataset="$ctrl.dataset"
processes="$ctrl.processes">
</mc-processes-workflow-outline>
</div>
<span flex style="border-left: solid 2px grey; margin-left: 8px" ng-if="$ctrl.showSidebar"></span>
<div flex="30" ng-if="$ctrl.showSidebar">
<mc-processes-workflow-sidebar></mc-processes-workflow-sidebar>
</div>
</div>
</div>
## Instruction:
Set z-index of element so that its above the graph canvas
## Code After:
<div>
<div layout="row" style="margin-right:15px; padding-top: 10px">
<div flex="{{$ctrl.workspaceSize}}" style="min-height:75vh">
<mc-workflow-toolbar></mc-workflow-toolbar>
<mc-processes-workflow-graph ng-show="$ctrl.showGraphView"
processes="$ctrl.processes"
highlight-processes="$ctrl.highlightProcesses">
</mc-processes-workflow-graph>
<mc-processes-workflow-outline ng-show="!$ctrl.showGraphView"
highlight-processes="$ctrl.highlightProcesses"
dataset="$ctrl.dataset"
processes="$ctrl.processes">
</mc-processes-workflow-outline>
</div>
<span flex style="border-left: solid 2px grey; margin-left: 8px" ng-if="$ctrl.showSidebar"></span>
<div flex="30" ng-if="$ctrl.showSidebar" style="z-index:5">
<mc-processes-workflow-sidebar></mc-processes-workflow-sidebar>
</div>
</div>
</div>
|
1e7a7f2abdc407cee1b90ce9160ff7be2ecf9e0d | bash_profile.d/bepc_changed_vs_origin_master.sh | bash_profile.d/bepc_changed_vs_origin_master.sh | function bepc_changed_vs_origin_master() {
rspec_ensure_no_focus || return $?
local bepc_changed_vs_origin_master_FILE
local bepc_changed_vs_origin_master_FILES_EXISTING=()
for bepc_changed_vs_origin_master_FILE in `git_files_changed_vs_origin_master | grep features | grep ".feature$"`
do
if [ -f $bepc_changed_vs_origin_master_FILE ]; then
bepc_changed_vs_origin_master_FILES_EXISTING+=$bepc_changed_vs_origin_master_FILE
fi
done
if [ `echo $bepc_changed_vs_origin_master_FILES_EXISTING | wc -l` -gt 0 ]; then
echorun bepc `echo $bepc_changed_vs_origin_master_FILES_EXISTING | tr "\n" " "`
else
echo
echo "$0: nothing to run"
fi
}
| function bepc_changed_vs_origin_master() {
local bepc_changed_vs_origin_master_FILE
local bepc_changed_vs_origin_master_FILES_EXISTING=()
for bepc_changed_vs_origin_master_FILE in `git_files_changed_vs_origin_master | grep features | grep ".feature$"`
do
if [ -f $bepc_changed_vs_origin_master_FILE ]; then
bepc_changed_vs_origin_master_FILES_EXISTING+=$bepc_changed_vs_origin_master_FILE
fi
done
if [ `echo $bepc_changed_vs_origin_master_FILES_EXISTING | wc -l` -gt 0 ]; then
echorun bepc `echo $bepc_changed_vs_origin_master_FILES_EXISTING | tr "\n" " "`
else
echo
echo "$0: nothing to run"
fi
}
| Remove redundant spec check from cucumber alias | Remove redundant spec check from cucumber alias
| Shell | mit | pr0d1r2/plexus,pr0d1r2/plexus | shell | ## Code Before:
function bepc_changed_vs_origin_master() {
rspec_ensure_no_focus || return $?
local bepc_changed_vs_origin_master_FILE
local bepc_changed_vs_origin_master_FILES_EXISTING=()
for bepc_changed_vs_origin_master_FILE in `git_files_changed_vs_origin_master | grep features | grep ".feature$"`
do
if [ -f $bepc_changed_vs_origin_master_FILE ]; then
bepc_changed_vs_origin_master_FILES_EXISTING+=$bepc_changed_vs_origin_master_FILE
fi
done
if [ `echo $bepc_changed_vs_origin_master_FILES_EXISTING | wc -l` -gt 0 ]; then
echorun bepc `echo $bepc_changed_vs_origin_master_FILES_EXISTING | tr "\n" " "`
else
echo
echo "$0: nothing to run"
fi
}
## Instruction:
Remove redundant spec check from cucumber alias
## Code After:
function bepc_changed_vs_origin_master() {
local bepc_changed_vs_origin_master_FILE
local bepc_changed_vs_origin_master_FILES_EXISTING=()
for bepc_changed_vs_origin_master_FILE in `git_files_changed_vs_origin_master | grep features | grep ".feature$"`
do
if [ -f $bepc_changed_vs_origin_master_FILE ]; then
bepc_changed_vs_origin_master_FILES_EXISTING+=$bepc_changed_vs_origin_master_FILE
fi
done
if [ `echo $bepc_changed_vs_origin_master_FILES_EXISTING | wc -l` -gt 0 ]; then
echorun bepc `echo $bepc_changed_vs_origin_master_FILES_EXISTING | tr "\n" " "`
else
echo
echo "$0: nothing to run"
fi
}
|
7689e9dc3e499c4c3e5b963a68f035be2c43f777 | ext/hal/silabs/gecko/CMakeLists.txt | ext/hal/silabs/gecko/CMakeLists.txt | string(TOUPPER ${CONFIG_SOC_SERIES} SILABS_GECKO_DEVICE)
set(SILABS_GECKO_PART_NUMBER ${CONFIG_SOC_PART_NUMBER})
zephyr_include_directories(
Device/SiliconLabs/${SILABS_GECKO_DEVICE}/Include
emlib/inc
)
# The gecko SDK uses the cpu name to include the matching device header.
# See Device/SiliconLabs/$(SILABS_GECKO_DEVICE)/Include/em_device.h for an example.
zephyr_compile_definitions(
${SILABS_GECKO_PART_NUMBER}
)
zephyr_sources( emlib/src/em_system.c)
zephyr_sources_ifdef(CONFIG_HAS_CMU emlib/src/em_cmu.c)
zephyr_sources_ifdef(CONFIG_GPIO_GECKO emlib/src/em_gpio.c)
zephyr_sources_ifdef(CONFIG_SERIAL_HAS_DRIVER emlib/src/em_usart.c)
zephyr_sources_ifdef(CONFIG_SOC_SERIES_EFM32WG Device/SiliconLabs/EFM32WG/Source/system_efm32wg.c)
| string(TOUPPER ${CONFIG_SOC_SERIES} SILABS_GECKO_DEVICE)
set(SILABS_GECKO_PART_NUMBER ${CONFIG_SOC_PART_NUMBER})
zephyr_include_directories(
Device/SiliconLabs/${SILABS_GECKO_DEVICE}/Include
emlib/inc
)
# The gecko SDK uses the cpu name to include the matching device header.
# See Device/SiliconLabs/$(SILABS_GECKO_DEVICE)/Include/em_device.h for an example.
zephyr_compile_definitions(
${SILABS_GECKO_PART_NUMBER}
)
zephyr_sources( emlib/src/em_system.c)
zephyr_sources_ifdef(CONFIG_HAS_CMU emlib/src/em_cmu.c)
zephyr_sources_ifdef(CONFIG_GPIO_GECKO emlib/src/em_gpio.c)
zephyr_sources_ifdef(CONFIG_SERIAL_HAS_DRIVER emlib/src/em_usart.c)
zephyr_sources_ifdef(CONFIG_SOC_SERIES_EFM32WG Device/SiliconLabs/EFM32WG/Source/system_efm32wg.c)
zephyr_sources_ifdef(CONFIG_SOC_SERIES_EFR32FG1P Device/SiliconLabs/EFR32FG1P/Source/system_efr32fg1p.c)
| Integrate Silabs EFR32FG1P Gecko SDK into Zephyr | ext: Integrate Silabs EFR32FG1P Gecko SDK into Zephyr
This patch integrates EFR32FG1P support into the build
infrastructure of Zephyr.
Signed-off-by: Christian Taedcke <[email protected]>
| Text | apache-2.0 | zephyrproject-rtos/zephyr,explora26/zephyr,punitvara/zephyr,GiulianoFranchetto/zephyr,punitvara/zephyr,finikorg/zephyr,nashif/zephyr,explora26/zephyr,kraj/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,GiulianoFranchetto/zephyr,kraj/zephyr,finikorg/zephyr,kraj/zephyr,GiulianoFranchetto/zephyr,nashif/zephyr,explora26/zephyr,galak/zephyr,ldts/zephyr,explora26/zephyr,GiulianoFranchetto/zephyr,galak/zephyr,nashif/zephyr,Vudentz/zephyr,punitvara/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,Vudentz/zephyr,nashif/zephyr,galak/zephyr,nashif/zephyr,Vudentz/zephyr,punitvara/zephyr,galak/zephyr,galak/zephyr,kraj/zephyr,zephyrproject-rtos/zephyr,kraj/zephyr,finikorg/zephyr,GiulianoFranchetto/zephyr,ldts/zephyr,Vudentz/zephyr,ldts/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,explora26/zephyr,punitvara/zephyr,ldts/zephyr,Vudentz/zephyr,ldts/zephyr | text | ## Code Before:
string(TOUPPER ${CONFIG_SOC_SERIES} SILABS_GECKO_DEVICE)
set(SILABS_GECKO_PART_NUMBER ${CONFIG_SOC_PART_NUMBER})
zephyr_include_directories(
Device/SiliconLabs/${SILABS_GECKO_DEVICE}/Include
emlib/inc
)
# The gecko SDK uses the cpu name to include the matching device header.
# See Device/SiliconLabs/$(SILABS_GECKO_DEVICE)/Include/em_device.h for an example.
zephyr_compile_definitions(
${SILABS_GECKO_PART_NUMBER}
)
zephyr_sources( emlib/src/em_system.c)
zephyr_sources_ifdef(CONFIG_HAS_CMU emlib/src/em_cmu.c)
zephyr_sources_ifdef(CONFIG_GPIO_GECKO emlib/src/em_gpio.c)
zephyr_sources_ifdef(CONFIG_SERIAL_HAS_DRIVER emlib/src/em_usart.c)
zephyr_sources_ifdef(CONFIG_SOC_SERIES_EFM32WG Device/SiliconLabs/EFM32WG/Source/system_efm32wg.c)
## Instruction:
ext: Integrate Silabs EFR32FG1P Gecko SDK into Zephyr
This patch integrates EFR32FG1P support into the build
infrastructure of Zephyr.
Signed-off-by: Christian Taedcke <[email protected]>
## Code After:
string(TOUPPER ${CONFIG_SOC_SERIES} SILABS_GECKO_DEVICE)
set(SILABS_GECKO_PART_NUMBER ${CONFIG_SOC_PART_NUMBER})
zephyr_include_directories(
Device/SiliconLabs/${SILABS_GECKO_DEVICE}/Include
emlib/inc
)
# The gecko SDK uses the cpu name to include the matching device header.
# See Device/SiliconLabs/$(SILABS_GECKO_DEVICE)/Include/em_device.h for an example.
zephyr_compile_definitions(
${SILABS_GECKO_PART_NUMBER}
)
zephyr_sources( emlib/src/em_system.c)
zephyr_sources_ifdef(CONFIG_HAS_CMU emlib/src/em_cmu.c)
zephyr_sources_ifdef(CONFIG_GPIO_GECKO emlib/src/em_gpio.c)
zephyr_sources_ifdef(CONFIG_SERIAL_HAS_DRIVER emlib/src/em_usart.c)
zephyr_sources_ifdef(CONFIG_SOC_SERIES_EFM32WG Device/SiliconLabs/EFM32WG/Source/system_efm32wg.c)
zephyr_sources_ifdef(CONFIG_SOC_SERIES_EFR32FG1P Device/SiliconLabs/EFR32FG1P/Source/system_efr32fg1p.c)
|
3ea6db0c6258b325717087dcd5dbea0e1c459011 | META6.json | META6.json | {
"name" : "Net::Curl",
"license" : "MIT",
"version" : "0.1.0",
"perl" : "6.c",
"description" : "Perl 6 interface to libcurl, the free and easy-to-use client-side URL transfer library",
"depends" : [ ],
"provides" : {
"Net::Curl" : "lib/Net/Curl.pm6",
"Net::Curl::Easy" : "lib/Net/Curl/Easy.pm6",
"Net::Curl::NativeCall" : "lib/Net/Curl/NativeCall.pm6"
},
"source-url" : "git://github.com/azawawi/perl6-net-curl.git"
}
| {
"auth" : "github:azawawi",
"authors" : [ "Ahmad M. Zawawi" ],
"description" : "Perl 6 interface to libcurl, the free and easy-to-use client-side URL transfer library",
"depends" : [ ],
"license" : "MIT",
"name" : "Net::Curl",
"perl" : "6.*",
"provides" : {
"Net::Curl" : "lib/Net/Curl.pm6",
"Net::Curl::Easy" : "lib/Net/Curl/Easy.pm6",
"Net::Curl::NativeCall" : "lib/Net/Curl/NativeCall.pm6"
},
"source-url" : "git://github.com/azawawi/perl6-net-curl.git",
"tags" : [
"libcurl",
"Net",
"NativeCall"
],
"test-depends" : [
"Test"
],
"version" : "0.1.0"
}
| Update META.json: sort keys, add missing fields, depend on 6.* | Update META.json: sort keys, add missing fields, depend on 6.*
| JSON | mit | azawawi/perl6-net-curl | json | ## Code Before:
{
"name" : "Net::Curl",
"license" : "MIT",
"version" : "0.1.0",
"perl" : "6.c",
"description" : "Perl 6 interface to libcurl, the free and easy-to-use client-side URL transfer library",
"depends" : [ ],
"provides" : {
"Net::Curl" : "lib/Net/Curl.pm6",
"Net::Curl::Easy" : "lib/Net/Curl/Easy.pm6",
"Net::Curl::NativeCall" : "lib/Net/Curl/NativeCall.pm6"
},
"source-url" : "git://github.com/azawawi/perl6-net-curl.git"
}
## Instruction:
Update META.json: sort keys, add missing fields, depend on 6.*
## Code After:
{
"auth" : "github:azawawi",
"authors" : [ "Ahmad M. Zawawi" ],
"description" : "Perl 6 interface to libcurl, the free and easy-to-use client-side URL transfer library",
"depends" : [ ],
"license" : "MIT",
"name" : "Net::Curl",
"perl" : "6.*",
"provides" : {
"Net::Curl" : "lib/Net/Curl.pm6",
"Net::Curl::Easy" : "lib/Net/Curl/Easy.pm6",
"Net::Curl::NativeCall" : "lib/Net/Curl/NativeCall.pm6"
},
"source-url" : "git://github.com/azawawi/perl6-net-curl.git",
"tags" : [
"libcurl",
"Net",
"NativeCall"
],
"test-depends" : [
"Test"
],
"version" : "0.1.0"
}
|
5f95b5b6dc233e1f75b4a564474491f4bd265362 | src/Common/BlockEditor/Blocks/EditorBlock.php | src/Common/BlockEditor/Blocks/EditorBlock.php | <?php
namespace Common\BlockEditor\Blocks;
use Frontend\Core\Engine\TwigTemplate;
abstract class EditorBlock
{
/** @var TwigTemplate */
private $template;
public function __construct(TwigTemplate $template)
{
$this->template = $template;
}
final public function getName(): string
{
return static::class;
}
/**
* @return array The config must contain the key "class" with the JS class for the editor
*/
abstract public function getConfig(): array;
/**
* @see https://github.com/editor-js/editorjs-php#configuration-file
*/
abstract public function getValidation(): array;
abstract public function parse(array $data): string;
}
| <?php
namespace Common\BlockEditor\Blocks;
use Frontend\Core\Engine\TwigTemplate;
abstract class EditorBlock
{
/** @var TwigTemplate */
private $template;
public function __construct(TwigTemplate $template)
{
$this->template = $template;
}
final public function getName(): string
{
return static::class;
}
/**
* @return array The config must contain the key "class" with the JS class for the editor
*/
abstract public function getConfig(): array;
/**
* @see https://github.com/editor-js/editorjs-php#configuration-file
*/
abstract public function getValidation(): array;
/** The path to the JS file with the config needed to make this block work in the editor */
abstract public function getJavaScriptPath(): string;
abstract public function parse(array $data): string;
}
| Add extra method so we know what JS files to load | Add extra method so we know what JS files to load
| PHP | mit | justcarakas/forkcms,justcarakas/forkcms,justcarakas/forkcms | php | ## Code Before:
<?php
namespace Common\BlockEditor\Blocks;
use Frontend\Core\Engine\TwigTemplate;
abstract class EditorBlock
{
/** @var TwigTemplate */
private $template;
public function __construct(TwigTemplate $template)
{
$this->template = $template;
}
final public function getName(): string
{
return static::class;
}
/**
* @return array The config must contain the key "class" with the JS class for the editor
*/
abstract public function getConfig(): array;
/**
* @see https://github.com/editor-js/editorjs-php#configuration-file
*/
abstract public function getValidation(): array;
abstract public function parse(array $data): string;
}
## Instruction:
Add extra method so we know what JS files to load
## Code After:
<?php
namespace Common\BlockEditor\Blocks;
use Frontend\Core\Engine\TwigTemplate;
abstract class EditorBlock
{
/** @var TwigTemplate */
private $template;
public function __construct(TwigTemplate $template)
{
$this->template = $template;
}
final public function getName(): string
{
return static::class;
}
/**
* @return array The config must contain the key "class" with the JS class for the editor
*/
abstract public function getConfig(): array;
/**
* @see https://github.com/editor-js/editorjs-php#configuration-file
*/
abstract public function getValidation(): array;
/** The path to the JS file with the config needed to make this block work in the editor */
abstract public function getJavaScriptPath(): string;
abstract public function parse(array $data): string;
}
|
4a2ea02e2e235434b7e742391e7f5d27e1632e97 | plugin.rb | plugin.rb |
enabled_site_setting :signatures_enabled
DiscoursePluginRegistry.serialized_current_user_fields << "see_signatures"
DiscoursePluginRegistry.serialized_current_user_fields << "signature_url"
DiscoursePluginRegistry.serialized_current_user_fields << "signature_raw"
after_initialize do
User.register_custom_field_type('see_signatures', :boolean)
User.register_custom_field_type('signature_url', :text)
User.register_custom_field_type('signature_raw', :text)
if SiteSetting.signatures_enabled then
add_to_serializer(:post, :user_signature, false) {
if SiteSetting.signatures_advanced_mode then
object.user.custom_fields['signature_raw']
else
object.user.custom_fields['signature_url']
end
}
# I guess this should be the default @ discourse. PR maybe?
add_to_serializer(:user, :custom_fields, false) {
if object.custom_fields == nil then
{}
else
object.custom_fields
end
}
end
end
register_asset "javascripts/discourse/templates/connectors/user-custom-preferences/signature-preferences.hbs"
register_asset "stylesheets/common/signatures.scss"
|
enabled_site_setting :signatures_enabled
DiscoursePluginRegistry.serialized_current_user_fields << "see_signatures"
DiscoursePluginRegistry.serialized_current_user_fields << "signature_url"
DiscoursePluginRegistry.serialized_current_user_fields << "signature_raw"
after_initialize do
User.register_custom_field_type('see_signatures', :boolean)
User.register_custom_field_type('signature_url', :text)
User.register_custom_field_type('signature_raw', :text)
if SiteSetting.signatures_enabled then
add_to_serializer(:post, :user_signature, false) {
if SiteSetting.signatures_advanced_mode then
object.user.custom_fields['signature_raw'] if object.user
else
object.user.custom_fields['signature_url'] if object.user
end
}
# I guess this should be the default @ discourse. PR maybe?
add_to_serializer(:user, :custom_fields, false) {
if object.custom_fields == nil then
{}
else
object.custom_fields
end
}
end
end
register_asset "javascripts/discourse/templates/connectors/user-custom-preferences/signature-preferences.hbs"
register_asset "stylesheets/common/signatures.scss"
| Fix error on Akismet admin screen | Fix error on Akismet admin screen
| Ruby | mit | Autsider/signatures,xfalcox/discourse-signatures,xfalcox/discourse-signatures,Autsider/signatures,xfalcox/discourse-signatures,Autsider/signatures | ruby | ## Code Before:
enabled_site_setting :signatures_enabled
DiscoursePluginRegistry.serialized_current_user_fields << "see_signatures"
DiscoursePluginRegistry.serialized_current_user_fields << "signature_url"
DiscoursePluginRegistry.serialized_current_user_fields << "signature_raw"
after_initialize do
User.register_custom_field_type('see_signatures', :boolean)
User.register_custom_field_type('signature_url', :text)
User.register_custom_field_type('signature_raw', :text)
if SiteSetting.signatures_enabled then
add_to_serializer(:post, :user_signature, false) {
if SiteSetting.signatures_advanced_mode then
object.user.custom_fields['signature_raw']
else
object.user.custom_fields['signature_url']
end
}
# I guess this should be the default @ discourse. PR maybe?
add_to_serializer(:user, :custom_fields, false) {
if object.custom_fields == nil then
{}
else
object.custom_fields
end
}
end
end
register_asset "javascripts/discourse/templates/connectors/user-custom-preferences/signature-preferences.hbs"
register_asset "stylesheets/common/signatures.scss"
## Instruction:
Fix error on Akismet admin screen
## Code After:
enabled_site_setting :signatures_enabled
DiscoursePluginRegistry.serialized_current_user_fields << "see_signatures"
DiscoursePluginRegistry.serialized_current_user_fields << "signature_url"
DiscoursePluginRegistry.serialized_current_user_fields << "signature_raw"
after_initialize do
User.register_custom_field_type('see_signatures', :boolean)
User.register_custom_field_type('signature_url', :text)
User.register_custom_field_type('signature_raw', :text)
if SiteSetting.signatures_enabled then
add_to_serializer(:post, :user_signature, false) {
if SiteSetting.signatures_advanced_mode then
object.user.custom_fields['signature_raw'] if object.user
else
object.user.custom_fields['signature_url'] if object.user
end
}
# I guess this should be the default @ discourse. PR maybe?
add_to_serializer(:user, :custom_fields, false) {
if object.custom_fields == nil then
{}
else
object.custom_fields
end
}
end
end
register_asset "javascripts/discourse/templates/connectors/user-custom-preferences/signature-preferences.hbs"
register_asset "stylesheets/common/signatures.scss"
|
cf8b84caf4a1231e24af1e0d7b9771e662faa420 | src/PhpTabs/Share/ChannelRoute.php | src/PhpTabs/Share/ChannelRoute.php | <?php
/*
* This file is part of the PhpTabs package.
*
* Copyright (c) landrok at github.com/landrok
*
* For the full copyright and license information, please see
* <https://github.com/stdtabs/phptabs/blob/master/LICENSE>.
*/
namespace PhpTabs\Share;
class ChannelRoute
{
const PARAMETER_CHANNEL_1 = "channel-1";
const PARAMETER_CHANNEL_2 = "channel-2";
const NULL_VALUE = -1;
private $channelId;
private $channel1;
private $channel2;
/**
* @param int $channelId
*/
public function __construct($channelId)
{
$this->channelId = $channelId;
}
/**
* @return int
*/
public function getChannelId()
{
return $this->channelId;
}
/**
* @return \PhpTabs\Music\Channel
*/
public function getChannel1()
{
return $this->channel1;
}
/**
* @param \PhpTabs\Music\Channel $channel1
*/
public function setChannel1($channel1)
{
$this->channel1 = $channel1;
}
/**
* @return \PhpTabs\Music\Channel
*/
public function getChannel2()
{
return $this->channel2;
}
/**
* @param \PhpTabs\Music\Channel $channel2
*/
public function setChannel2($channel2)
{
$this->channel2 = $channel2;
}
}
| <?php
/*
* This file is part of the PhpTabs package.
*
* Copyright (c) landrok at github.com/landrok
*
* For the full copyright and license information, please see
* <https://github.com/stdtabs/phptabs/blob/master/LICENSE>.
*/
namespace PhpTabs\Share;
class ChannelRoute
{
const PARAMETER_CHANNEL_1 = "channel-1";
const PARAMETER_CHANNEL_2 = "channel-2";
const NULL_VALUE = -1;
private $channelId;
private $channel1;
private $channel2;
/**
* @param int $channelId
*/
public function __construct($channelId)
{
$this->channelId = $channelId;
}
/**
* @return int
*/
public function getChannelId()
{
return $this->channelId;
}
/**
* @return int
*/
public function getChannel1()
{
return $this->channel1;
}
/**
* @param int $channel1
*/
public function setChannel1($channel1)
{
$this->channel1 = $channel1;
}
/**
* @return int
*/
public function getChannel2()
{
return $this->channel2;
}
/**
* @param int $channel2
*/
public function setChannel2($channel2)
{
$this->channel2 = $channel2;
}
}
| Fix PHPDoc wrong type annotation | Fix PHPDoc wrong type annotation
| PHP | lgpl-2.1 | stdtabs/phptabs | php | ## Code Before:
<?php
/*
* This file is part of the PhpTabs package.
*
* Copyright (c) landrok at github.com/landrok
*
* For the full copyright and license information, please see
* <https://github.com/stdtabs/phptabs/blob/master/LICENSE>.
*/
namespace PhpTabs\Share;
class ChannelRoute
{
const PARAMETER_CHANNEL_1 = "channel-1";
const PARAMETER_CHANNEL_2 = "channel-2";
const NULL_VALUE = -1;
private $channelId;
private $channel1;
private $channel2;
/**
* @param int $channelId
*/
public function __construct($channelId)
{
$this->channelId = $channelId;
}
/**
* @return int
*/
public function getChannelId()
{
return $this->channelId;
}
/**
* @return \PhpTabs\Music\Channel
*/
public function getChannel1()
{
return $this->channel1;
}
/**
* @param \PhpTabs\Music\Channel $channel1
*/
public function setChannel1($channel1)
{
$this->channel1 = $channel1;
}
/**
* @return \PhpTabs\Music\Channel
*/
public function getChannel2()
{
return $this->channel2;
}
/**
* @param \PhpTabs\Music\Channel $channel2
*/
public function setChannel2($channel2)
{
$this->channel2 = $channel2;
}
}
## Instruction:
Fix PHPDoc wrong type annotation
## Code After:
<?php
/*
* This file is part of the PhpTabs package.
*
* Copyright (c) landrok at github.com/landrok
*
* For the full copyright and license information, please see
* <https://github.com/stdtabs/phptabs/blob/master/LICENSE>.
*/
namespace PhpTabs\Share;
class ChannelRoute
{
const PARAMETER_CHANNEL_1 = "channel-1";
const PARAMETER_CHANNEL_2 = "channel-2";
const NULL_VALUE = -1;
private $channelId;
private $channel1;
private $channel2;
/**
* @param int $channelId
*/
public function __construct($channelId)
{
$this->channelId = $channelId;
}
/**
* @return int
*/
public function getChannelId()
{
return $this->channelId;
}
/**
* @return int
*/
public function getChannel1()
{
return $this->channel1;
}
/**
* @param int $channel1
*/
public function setChannel1($channel1)
{
$this->channel1 = $channel1;
}
/**
* @return int
*/
public function getChannel2()
{
return $this->channel2;
}
/**
* @param int $channel2
*/
public function setChannel2($channel2)
{
$this->channel2 = $channel2;
}
}
|
8b0dfac1cf30df61bfcb569037296549519d538d | .eslintrc.yml | .eslintrc.yml | env:
browser: true
es6: true
node: true
extends: 'eslint:recommended'
parserOptions:
ecmaFeatures:
experimentalObjectRestSpread: true
jsx: true
sourceType: module
plugins:
- react
- node
rules:
indent:
- error
- 4
linebreak-style:
- error
- unix
quotes:
- error
- single
semi:
- error
- never
| env:
browser: true
es6: true
node: true
extends: 'eslint:recommended'
parserOptions:
ecmaFeatures:
experimentalObjectRestSpread: true
jsx: true
sourceType: module
plugins:
- react
- node
rules:
indent:
- error
- 4
- SwitchCase: 1
linebreak-style:
- error
- unix
quotes:
- error
- single
semi:
- error
- never
| Allow indention of cases in switch | Allow indention of cases in switch
| YAML | mit | jschirrmacher/cosmoteer-mod-editor,jschirrmacher/cosmoteer-mod-editor | yaml | ## Code Before:
env:
browser: true
es6: true
node: true
extends: 'eslint:recommended'
parserOptions:
ecmaFeatures:
experimentalObjectRestSpread: true
jsx: true
sourceType: module
plugins:
- react
- node
rules:
indent:
- error
- 4
linebreak-style:
- error
- unix
quotes:
- error
- single
semi:
- error
- never
## Instruction:
Allow indention of cases in switch
## Code After:
env:
browser: true
es6: true
node: true
extends: 'eslint:recommended'
parserOptions:
ecmaFeatures:
experimentalObjectRestSpread: true
jsx: true
sourceType: module
plugins:
- react
- node
rules:
indent:
- error
- 4
- SwitchCase: 1
linebreak-style:
- error
- unix
quotes:
- error
- single
semi:
- error
- never
|
79d9dfed782c8d6ca770ede22685aafae0010dee | app/templates/README.md | app/templates/README.md |
> <%= props.description %>
## Install
```sh
$ npm install --save <%= slugname %>
```
## Usage
```js
var <%= safeSlugname %> = require('<%= slugname %>');
<%= safeSlugname %>('Rainbow');
```<% if (props.cli) { %>
```sh
$ npm install --global <%= slugname %>
$ <%= slugname %> --help
```<% } %><% if (props.browser) { %>
```sh
# creates a browser.js
$ npm run browser
```<% } %>
## License
<%= props.license %> © [<%= props.authorName %>](<%= props.authorUrl %>)
[npm-url]: https://npmjs.org/package/<%= slugname %>
[npm-image]: https://badge.fury.io/js/<%= slugname %>.svg
[travis-url]: https://travis-ci.org/<%= props.githubUsername %>/<%= slugname %>
[travis-image]: https://travis-ci.org/<%= props.githubUsername %>/<%= slugname %>.svg?branch=master
[daviddm-url]: https://david-dm.org/<%= props.githubUsername %>/<%= slugname %>.svg?theme=shields.io
[daviddm-image]: https://david-dm.org/<%= props.githubUsername %>/<%= slugname %>
|
> <%= props.description %>
## Install
```sh
$ npm install --save <%= slugname %>
```
## Usage
```js
var <%= safeSlugname %> = require('<%= slugname %>');
<%= safeSlugname %>('Rainbow');
```<% if (props.cli) { %>
```sh
$ npm install --global <%= slugname %>
$ <%= slugname %> --help
```<% } %><% if (props.browser) { %>
```sh
# creates a browser.js
$ npm run browser
```<% } %>
## License
<%= props.license %> © [<%= props.authorName %>](<%= props.authorUrl %>)
[npm-image]: https://badge.fury.io/js/<%= slugname %>.svg
[npm-url]: https://npmjs.org/package/<%= slugname %>
[travis-image]: https://travis-ci.org/<%= props.githubUsername %>/<%= slugname %>.svg?branch=master
[travis-url]: https://travis-ci.org/<%= props.githubUsername %>/<%= slugname %>
[daviddm-image]: https://david-dm.org/<%= props.githubUsername %>/<%= slugname %>.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/<%= props.githubUsername %>/<%= slugname %>
| Make variable names match each other | Make variable names match each other
| Markdown | mit | iamstarkov/generator-node,amitport/generator-node,rhettl/generator-node,zckrs/generator-node,davewasmer/generator-node,thehobbit85/generator-node,yeoman/generator-node,RobertJGabriel/generator-node,canercandan/generator-node,stevemao/generator-node | markdown | ## Code Before:
> <%= props.description %>
## Install
```sh
$ npm install --save <%= slugname %>
```
## Usage
```js
var <%= safeSlugname %> = require('<%= slugname %>');
<%= safeSlugname %>('Rainbow');
```<% if (props.cli) { %>
```sh
$ npm install --global <%= slugname %>
$ <%= slugname %> --help
```<% } %><% if (props.browser) { %>
```sh
# creates a browser.js
$ npm run browser
```<% } %>
## License
<%= props.license %> © [<%= props.authorName %>](<%= props.authorUrl %>)
[npm-url]: https://npmjs.org/package/<%= slugname %>
[npm-image]: https://badge.fury.io/js/<%= slugname %>.svg
[travis-url]: https://travis-ci.org/<%= props.githubUsername %>/<%= slugname %>
[travis-image]: https://travis-ci.org/<%= props.githubUsername %>/<%= slugname %>.svg?branch=master
[daviddm-url]: https://david-dm.org/<%= props.githubUsername %>/<%= slugname %>.svg?theme=shields.io
[daviddm-image]: https://david-dm.org/<%= props.githubUsername %>/<%= slugname %>
## Instruction:
Make variable names match each other
## Code After:
> <%= props.description %>
## Install
```sh
$ npm install --save <%= slugname %>
```
## Usage
```js
var <%= safeSlugname %> = require('<%= slugname %>');
<%= safeSlugname %>('Rainbow');
```<% if (props.cli) { %>
```sh
$ npm install --global <%= slugname %>
$ <%= slugname %> --help
```<% } %><% if (props.browser) { %>
```sh
# creates a browser.js
$ npm run browser
```<% } %>
## License
<%= props.license %> © [<%= props.authorName %>](<%= props.authorUrl %>)
[npm-image]: https://badge.fury.io/js/<%= slugname %>.svg
[npm-url]: https://npmjs.org/package/<%= slugname %>
[travis-image]: https://travis-ci.org/<%= props.githubUsername %>/<%= slugname %>.svg?branch=master
[travis-url]: https://travis-ci.org/<%= props.githubUsername %>/<%= slugname %>
[daviddm-image]: https://david-dm.org/<%= props.githubUsername %>/<%= slugname %>.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/<%= props.githubUsername %>/<%= slugname %>
|
8e1d535317f15ef6b7d6e2f3398a22cb2f647e50 | Sources/Sugar/Helpers/SecondsConverter.swift | Sources/Sugar/Helpers/SecondsConverter.swift | import Foundation
public extension Int {
public var minsInSecs: Int {
return self * 60
}
public var hoursInSecs: Int {
return self.minsInSecs * 60
}
public var daysInSecs: Int {
return self.hoursInSecs * 24
}
public var weeksInSecs: Int {
return self.daysInSecs * 7
}
}
public extension TimeInterval {
public var minsInSecs: TimeInterval {
return self * 60
}
public var hoursInSecs: TimeInterval {
return self.minsInSecs * 60
}
public var daysInSecs: TimeInterval {
return self.hoursInSecs * 24
}
public var weeksInSecs: TimeInterval {
return self.daysInSecs * 7
}
}
| public extension Numeric {
public var minsInSecs: Self {
return self * 60
}
public var hoursInSecs: Self {
return self.minsInSecs * 60
}
public var daysInSecs: Self {
return self.hoursInSecs * 24
}
public var weeksInSecs: Self {
return self.daysInSecs * 7
}
}
| Use Numeric over Int and TimeInterval | Use Numeric over Int and TimeInterval
| Swift | mit | nodes-vapor/sugar | swift | ## Code Before:
import Foundation
public extension Int {
public var minsInSecs: Int {
return self * 60
}
public var hoursInSecs: Int {
return self.minsInSecs * 60
}
public var daysInSecs: Int {
return self.hoursInSecs * 24
}
public var weeksInSecs: Int {
return self.daysInSecs * 7
}
}
public extension TimeInterval {
public var minsInSecs: TimeInterval {
return self * 60
}
public var hoursInSecs: TimeInterval {
return self.minsInSecs * 60
}
public var daysInSecs: TimeInterval {
return self.hoursInSecs * 24
}
public var weeksInSecs: TimeInterval {
return self.daysInSecs * 7
}
}
## Instruction:
Use Numeric over Int and TimeInterval
## Code After:
public extension Numeric {
public var minsInSecs: Self {
return self * 60
}
public var hoursInSecs: Self {
return self.minsInSecs * 60
}
public var daysInSecs: Self {
return self.hoursInSecs * 24
}
public var weeksInSecs: Self {
return self.daysInSecs * 7
}
}
|
921218359702113e6dd37c96112ac4c3a0e958f9 | templates/base.html | templates/base.html | <!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Get Hexagrams and Trigrams">
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-old-ie-min.css">
<![endif]-->
<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-min.css">
<!--<![endif]-->
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">
<style>
p {
margin-left: 10px;
}
</style>
</head>
<body>
{% block body %}
{% endblock %}
</body> | <!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0; minimal-ui">
<meta name="description" content="Get Hexagrams and Trigrams">
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-old-ie-min.css">
<![endif]-->
<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-min.css">
<!--<![endif]-->
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">
<style>
p {
margin-left: 10px;
}
</style>
</head>
<body>
{% block body %}
{% endblock %}
</body> | Add minimal-ui property to hide address bar | Add minimal-ui property to hide address bar
| HTML | mit | urschrei/hexagrams,urschrei/hexagrams | html | ## Code Before:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Get Hexagrams and Trigrams">
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-old-ie-min.css">
<![endif]-->
<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-min.css">
<!--<![endif]-->
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">
<style>
p {
margin-left: 10px;
}
</style>
</head>
<body>
{% block body %}
{% endblock %}
</body>
## Instruction:
Add minimal-ui property to hide address bar
## Code After:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0; minimal-ui">
<meta name="description" content="Get Hexagrams and Trigrams">
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-old-ie-min.css">
<![endif]-->
<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-min.css">
<!--<![endif]-->
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">
<style>
p {
margin-left: 10px;
}
</style>
</head>
<body>
{% block body %}
{% endblock %}
</body> |
ef696998d558518d07782333d162b15262864ce6 | lib/suspenders/generators/production/manifest_generator.rb | lib/suspenders/generators/production/manifest_generator.rb | require_relative "../base"
module Suspenders
module Production
class ManifestGenerator < Generators::Base
def render_manifest
expand_json(
"app.json",
name: app_name.dasherize,
scripts: {},
env: {
APPLICATION_HOST: { required: true },
AUTO_MIGRATE_DB: { value: "true" },
EMAIL_RECIPIENTS: { required: true },
HEROKU_APP_NAME: { required: true },
HEROKU_PARENT_APP_NAME: { required: true },
RACK_ENV: { required: true },
SECRET_KEY_BASE: { generator: "secret" },
},
addons: ["heroku-postgresql"],
)
end
end
end
end
| require_relative "../base"
module Suspenders
module Production
class ManifestGenerator < Generators::Base
def render_manifest
expand_json(
"app.json",
name: app_name.dasherize,
scripts: {},
env: {
APPLICATION_HOST: { required: true },
AUTO_MIGRATE_DB: { value: "true" },
EMAIL_RECIPIENTS: { required: true },
HEROKU_APP_NAME: { required: true },
HEROKU_PARENT_APP_NAME: { required: true },
RACK_ENV: { required: true },
SECRET_KEY_BASE: { generator: "secret" },
},
addons: ["heroku-postgresql", "heroku-redis"],
)
end
end
end
end
| Install redis on heroku for sidekiq | Install redis on heroku for sidekiq
| Ruby | mit | welaika/welaika-suspenders,welaika/welaika-suspenders,welaika/welaika-suspenders | ruby | ## Code Before:
require_relative "../base"
module Suspenders
module Production
class ManifestGenerator < Generators::Base
def render_manifest
expand_json(
"app.json",
name: app_name.dasherize,
scripts: {},
env: {
APPLICATION_HOST: { required: true },
AUTO_MIGRATE_DB: { value: "true" },
EMAIL_RECIPIENTS: { required: true },
HEROKU_APP_NAME: { required: true },
HEROKU_PARENT_APP_NAME: { required: true },
RACK_ENV: { required: true },
SECRET_KEY_BASE: { generator: "secret" },
},
addons: ["heroku-postgresql"],
)
end
end
end
end
## Instruction:
Install redis on heroku for sidekiq
## Code After:
require_relative "../base"
module Suspenders
module Production
class ManifestGenerator < Generators::Base
def render_manifest
expand_json(
"app.json",
name: app_name.dasherize,
scripts: {},
env: {
APPLICATION_HOST: { required: true },
AUTO_MIGRATE_DB: { value: "true" },
EMAIL_RECIPIENTS: { required: true },
HEROKU_APP_NAME: { required: true },
HEROKU_PARENT_APP_NAME: { required: true },
RACK_ENV: { required: true },
SECRET_KEY_BASE: { generator: "secret" },
},
addons: ["heroku-postgresql", "heroku-redis"],
)
end
end
end
end
|
ae1d897b5b9f74957047d07f98f0baa72557a530 | test/app.js | test/app.js | 'use strict';
var path = require('path');
var assert = require('yeoman-assert');
var helpers = require('yeoman-generator').test;
describe('generator-ocaml:app', function () {
before(function (done) {
helpers.run(path.join(__dirname, '../generators/app'))
.withOptions({someOption: true})
.withPrompts({someAnswer: true})
.on('end', done);
});
it('creates files', function () {
assert.file([
'dummyfile.txt'
]);
});
});
| 'use strict';
var path = require('path')
,assert = require('yeoman-assert')
,helpers = require('yeoman-generator').test
,os = require('os');
describe('generator-ocaml:app', function () {
before(function (done) {
var prompts = {
pkgName: 'an-awesome-ocaml-module',
pkgDescription: 'An awesome OCaml module.',
pkgVersion: '0.1.0',
authorName: 'Matheus Brasil',
authorEmail: '[email protected]',
userName: 'mabrasil',
license: 'MIT',
confirm: true
};
helpers.run(path.join(__dirname, '../generators/app'))
.withOptions({someOption: true})
.withPrompts({someAnswer: true})
.on('end', done);
});
it('creates files', function () {
assert.file([
'dummyfile.txt'
]);
});
});
| Set prompting info for tests | Set prompting info for tests
| JavaScript | mit | mabrasil/generator-ocaml | javascript | ## Code Before:
'use strict';
var path = require('path');
var assert = require('yeoman-assert');
var helpers = require('yeoman-generator').test;
describe('generator-ocaml:app', function () {
before(function (done) {
helpers.run(path.join(__dirname, '../generators/app'))
.withOptions({someOption: true})
.withPrompts({someAnswer: true})
.on('end', done);
});
it('creates files', function () {
assert.file([
'dummyfile.txt'
]);
});
});
## Instruction:
Set prompting info for tests
## Code After:
'use strict';
var path = require('path')
,assert = require('yeoman-assert')
,helpers = require('yeoman-generator').test
,os = require('os');
describe('generator-ocaml:app', function () {
before(function (done) {
var prompts = {
pkgName: 'an-awesome-ocaml-module',
pkgDescription: 'An awesome OCaml module.',
pkgVersion: '0.1.0',
authorName: 'Matheus Brasil',
authorEmail: '[email protected]',
userName: 'mabrasil',
license: 'MIT',
confirm: true
};
helpers.run(path.join(__dirname, '../generators/app'))
.withOptions({someOption: true})
.withPrompts({someAnswer: true})
.on('end', done);
});
it('creates files', function () {
assert.file([
'dummyfile.txt'
]);
});
});
|
310cebbe1f4a4d92c8f181d7e4de9cc4f75a14dc | indra/assemblers/__init__.py | indra/assemblers/__init__.py | try:
from pysb_assembler import PysbAssembler
except ImportError:
pass
try:
from graph_assembler import GraphAssembler
except ImportError:
pass
try:
from sif_assembler import SifAssembler
except ImportError:
pass
try:
from cx_assembler import CxAssembler
except ImportError:
pass
try:
from english_assembler import EnglishAssembler
except ImportError:
pass
try:
from sbgn_assembler import SBGNAssembler
except ImportError:
pass
try:
from index_card_assembler import IndexCardAssembler
except ImportError:
pass
| try:
from indra.assemblers.pysb_assembler import PysbAssembler
except ImportError:
pass
try:
from indra.assemblers.graph_assembler import GraphAssembler
except ImportError:
pass
try:
from indra.assemblers.sif_assembler import SifAssembler
except ImportError:
pass
try:
from indra.assemblers.cx_assembler import CxAssembler
except ImportError:
pass
try:
from indra.assemblers.english_assembler import EnglishAssembler
except ImportError:
pass
try:
from indra.assemblers.sbgn_assembler import SBGNAssembler
except ImportError:
pass
try:
from indra.assemblers.index_card_assembler import IndexCardAssembler
except ImportError:
pass
| Update to absolute imports in assemblers | Update to absolute imports in assemblers
| Python | bsd-2-clause | johnbachman/indra,bgyori/indra,sorgerlab/belpy,sorgerlab/indra,pvtodorov/indra,pvtodorov/indra,pvtodorov/indra,johnbachman/indra,bgyori/indra,jmuhlich/indra,pvtodorov/indra,sorgerlab/indra,jmuhlich/indra,johnbachman/belpy,johnbachman/belpy,sorgerlab/belpy,johnbachman/indra,sorgerlab/belpy,johnbachman/belpy,jmuhlich/indra,bgyori/indra,sorgerlab/indra | python | ## Code Before:
try:
from pysb_assembler import PysbAssembler
except ImportError:
pass
try:
from graph_assembler import GraphAssembler
except ImportError:
pass
try:
from sif_assembler import SifAssembler
except ImportError:
pass
try:
from cx_assembler import CxAssembler
except ImportError:
pass
try:
from english_assembler import EnglishAssembler
except ImportError:
pass
try:
from sbgn_assembler import SBGNAssembler
except ImportError:
pass
try:
from index_card_assembler import IndexCardAssembler
except ImportError:
pass
## Instruction:
Update to absolute imports in assemblers
## Code After:
try:
from indra.assemblers.pysb_assembler import PysbAssembler
except ImportError:
pass
try:
from indra.assemblers.graph_assembler import GraphAssembler
except ImportError:
pass
try:
from indra.assemblers.sif_assembler import SifAssembler
except ImportError:
pass
try:
from indra.assemblers.cx_assembler import CxAssembler
except ImportError:
pass
try:
from indra.assemblers.english_assembler import EnglishAssembler
except ImportError:
pass
try:
from indra.assemblers.sbgn_assembler import SBGNAssembler
except ImportError:
pass
try:
from indra.assemblers.index_card_assembler import IndexCardAssembler
except ImportError:
pass
|
85ccdedf5f13d15f58405a2bfed06e725de41b34 | app/controllers/home_controller.rb | app/controllers/home_controller.rb | class HomeController < ApplicationController
layout 'relaunch'
def index
unless user_signed_in? || admin_user_signed_in?
expires_in 1.hour, public: true
end
render
end
end
| class HomeController < ApplicationController
layout 'relaunch'
def index
=begin
Find a way to cache this:
unless user_signed_in? || admin_user_signed_in?
expires_in 1.hour, public: true
end
=end
render
end
end
| Remove caching from home index action. | Remove caching from home index action.
| Ruby | agpl-3.0 | sozialhelden/wheelmap,sozialhelden/wheelmap,sozialhelden/wheelmap,sozialhelden/wheelmap,sozialhelden/wheelmap | ruby | ## Code Before:
class HomeController < ApplicationController
layout 'relaunch'
def index
unless user_signed_in? || admin_user_signed_in?
expires_in 1.hour, public: true
end
render
end
end
## Instruction:
Remove caching from home index action.
## Code After:
class HomeController < ApplicationController
layout 'relaunch'
def index
=begin
Find a way to cache this:
unless user_signed_in? || admin_user_signed_in?
expires_in 1.hour, public: true
end
=end
render
end
end
|
b952700fe49749638e314c2df52205bdb3bac7f6 | doc/user_guide.rst | doc/user_guide.rst |
.. _user_guide:
User guide: table of contents
==============================
.. sidebar:: **Download for offline viewing**
Download the `user guide and examples
<https://github.com/INCF/pybids/archive/gh-pages.zip>`_.
.. include:: includes/big_toc_css.rst
.. nice layout in the toc
.. include:: tune_toc.rst
.. toctree::
:numbered:
introduction.rst
grabbids/index.rst
analysis/index.rst
reports/index.rst
|
.. _user_guide:
User guide: table of contents
==============================
.. sidebar:: **Download for offline viewing**
Download the `user guide and examples
<https://github.com/INCF/pybids/archive/gh-pages.zip>`_.
.. toctree::
:numbered:
introduction.rst
grabbids/index.rst
analysis/index.rst
reports/index.rst
| Fix User Guide font size. | Fix User Guide font size.
The includes were messing up the font size on this one page. Now it
should look.
| reStructuredText | mit | INCF/pybids | restructuredtext | ## Code Before:
.. _user_guide:
User guide: table of contents
==============================
.. sidebar:: **Download for offline viewing**
Download the `user guide and examples
<https://github.com/INCF/pybids/archive/gh-pages.zip>`_.
.. include:: includes/big_toc_css.rst
.. nice layout in the toc
.. include:: tune_toc.rst
.. toctree::
:numbered:
introduction.rst
grabbids/index.rst
analysis/index.rst
reports/index.rst
## Instruction:
Fix User Guide font size.
The includes were messing up the font size on this one page. Now it
should look.
## Code After:
.. _user_guide:
User guide: table of contents
==============================
.. sidebar:: **Download for offline viewing**
Download the `user guide and examples
<https://github.com/INCF/pybids/archive/gh-pages.zip>`_.
.. toctree::
:numbered:
introduction.rst
grabbids/index.rst
analysis/index.rst
reports/index.rst
|
e1d1c6910e2c28e471310731b149e1cc0f128bf1 | .travis.yml | .travis.yml | language: python
sudo: required
services:
- docker
env:
matrix:
- REDIS_VERSION=2.6
- REDIS_VERSION=2.8
- REDIS_VERSION=3.0
before_install:
- docker pull redis:$REDIS_VERSION
- docker run -d -p 6379:6379 redis
install:
- pip install tox
script:
- make test-tox
| language: python
sudo: required
services:
- docker
env:
matrix:
- REDIS_VERSION=2.6
- REDIS_VERSION=2.8
- REDIS_VERSION=3.0
before_install:
- docker pull redis:$REDIS_VERSION
- docker run -d -p 6379:6379 redis:$REDIS_VERSION
install:
- pip install tox
script:
- make test-tox
| Fix running of redis containers. | Fix running of redis containers.
They should be pinpointed to the version in the matrix. | YAML | lgpl-2.1 | josiahcarlson/rom | yaml | ## Code Before:
language: python
sudo: required
services:
- docker
env:
matrix:
- REDIS_VERSION=2.6
- REDIS_VERSION=2.8
- REDIS_VERSION=3.0
before_install:
- docker pull redis:$REDIS_VERSION
- docker run -d -p 6379:6379 redis
install:
- pip install tox
script:
- make test-tox
## Instruction:
Fix running of redis containers.
They should be pinpointed to the version in the matrix.
## Code After:
language: python
sudo: required
services:
- docker
env:
matrix:
- REDIS_VERSION=2.6
- REDIS_VERSION=2.8
- REDIS_VERSION=3.0
before_install:
- docker pull redis:$REDIS_VERSION
- docker run -d -p 6379:6379 redis:$REDIS_VERSION
install:
- pip install tox
script:
- make test-tox
|
9ec6a6d1aad7b623728bc65a6a836bc9ee21a9ce | src/main/java/com/gmail/nossr50/events/experience/McMMOPlayerLevelUpEvent.java | src/main/java/com/gmail/nossr50/events/experience/McMMOPlayerLevelUpEvent.java | package com.gmail.nossr50.events.experience;
import org.bukkit.entity.Player;
import com.gmail.nossr50.skills.utilities.SkillType;
/**
* Called when a user levels up in a skill
*/
public class McMMOPlayerLevelUpEvent extends McMMOPlayerExperienceEvent {
private int levelsGained;
public McMMOPlayerLevelUpEvent(Player player, SkillType skill) {
super(player, skill);
this.levelsGained = 1; // Always 1 for now as we call in the loop where the levelups are calculated, could change later!
}
/**
* @return The number of levels gained in this event
*/
public int getLevelsGained() {
return levelsGained;
}
}
| package com.gmail.nossr50.events.experience;
import org.bukkit.entity.Player;
import com.gmail.nossr50.skills.utilities.SkillType;
/**
* Called when a user levels up in a skill
*/
public class McMMOPlayerLevelUpEvent extends McMMOPlayerExperienceEvent {
private int levelsGained;
public McMMOPlayerLevelUpEvent(Player player, SkillType skill) {
super(player, skill);
this.levelsGained = 1;
}
public McMMOPlayerLevelUpEvent(Player player, SkillType skill, int levelsGained) {
super(player, skill);
this.levelsGained = levelsGained;
}
/**
* @return The number of levels gained in this event
*/
public int getLevelsGained() {
return levelsGained;
}
/**
* @param levelsGained int number of levels gained in this event
*/
public void setLevelsGained(int levelsGained) {
this.levelsGained = levelsGained;
}
}
| Add constructor for adding multiple levels at once. Need to work out how to handle level-ups in order for this to be properly cancelled, however. | Add constructor for adding multiple levels at once. Need to work out how
to handle level-ups in order for this to be properly cancelled, however. | Java | agpl-3.0 | isokissa3/mcMMO,Maximvdw/mcMMO,jhonMalcom79/mcMMO_pers,virustotalop/mcMMO,EvilOlaf/mcMMO | java | ## Code Before:
package com.gmail.nossr50.events.experience;
import org.bukkit.entity.Player;
import com.gmail.nossr50.skills.utilities.SkillType;
/**
* Called when a user levels up in a skill
*/
public class McMMOPlayerLevelUpEvent extends McMMOPlayerExperienceEvent {
private int levelsGained;
public McMMOPlayerLevelUpEvent(Player player, SkillType skill) {
super(player, skill);
this.levelsGained = 1; // Always 1 for now as we call in the loop where the levelups are calculated, could change later!
}
/**
* @return The number of levels gained in this event
*/
public int getLevelsGained() {
return levelsGained;
}
}
## Instruction:
Add constructor for adding multiple levels at once. Need to work out how
to handle level-ups in order for this to be properly cancelled, however.
## Code After:
package com.gmail.nossr50.events.experience;
import org.bukkit.entity.Player;
import com.gmail.nossr50.skills.utilities.SkillType;
/**
* Called when a user levels up in a skill
*/
public class McMMOPlayerLevelUpEvent extends McMMOPlayerExperienceEvent {
private int levelsGained;
public McMMOPlayerLevelUpEvent(Player player, SkillType skill) {
super(player, skill);
this.levelsGained = 1;
}
public McMMOPlayerLevelUpEvent(Player player, SkillType skill, int levelsGained) {
super(player, skill);
this.levelsGained = levelsGained;
}
/**
* @return The number of levels gained in this event
*/
public int getLevelsGained() {
return levelsGained;
}
/**
* @param levelsGained int number of levels gained in this event
*/
public void setLevelsGained(int levelsGained) {
this.levelsGained = levelsGained;
}
}
|
99701c6e3be26e1a482595dad581dd91e4b99bb5 | lib/nehm/path_manager.rb | lib/nehm/path_manager.rb | module Nehm
##
# Path manager works with download paths
module PathManager
def self.default_dl_path
Cfg[:dl_path]
end
##
# Checks path for validation and returns it if valid
def self.get_path(path)
# Check path for existence
UI.term 'Invalid download path. Please enter correct path' unless Dir.exist?(path)
File.expand_path(path)
end
def self.set_dl_path
loop do
ask_sentence = 'Enter path to desirable download directory'
default_path = File.join(ENV['HOME'], '/Music')
if Dir.exist?(default_path)
ask_sentence << " (press Enter to set it to #{default_path.magenta})"
else
default_path = nil
end
path = UI.ask(ask_sentence + ':')
# If user press enter, set path to default
path = default_path if path == '' && default_path
if Dir.exist?(path)
Cfg[:dl_path] = File.expand_path(path)
UI.say "#{'Download directory set up to'.green} #{path.magenta}"
break
else
UI.error "This directory doesn't exist. Please enter correct path"
end
end
end
end
end
| module Nehm
##
# Path manager works with download paths
module PathManager
def self.default_dl_path
Cfg[:dl_path]
end
##
# Checks path for validation and returns it if valid
def self.get_path(path)
unless Dir.exist?(path)
UI.warning "This directory doesn't exist."
wish = UI.ask('Want to create it? (Y/n):')
wish = 'y' if wish == ''
if wish.downcase =~ /y/
UI.say "Creating directory: #{path}"
UI.newline
Dir.mkdir(File.expand_path(path), 0775)
else
UI.term
end
end
File.expand_path(path)
end
def self.set_dl_path
loop do
ask_sentence = 'Enter path to desirable download directory'
default_path = File.join(ENV['HOME'], '/Music')
if Dir.exist?(default_path)
ask_sentence << " (press Enter to set it to #{default_path.magenta})"
else
default_path = nil
end
path = UI.ask(ask_sentence + ':')
# If user press enter, set path to default
path = default_path if path == '' && default_path
if Dir.exist?(path)
Cfg[:dl_path] = File.expand_path(path)
UI.say "#{'Download directory set up to'.green} #{path.magenta}"
break
else
UI.error "This directory doesn't exist. Please enter correct path"
end
end
end
end
end
| Add creation a directory entered in `to` option | Add creation a directory entered in `to` option
| Ruby | mit | bogem/nehm | ruby | ## Code Before:
module Nehm
##
# Path manager works with download paths
module PathManager
def self.default_dl_path
Cfg[:dl_path]
end
##
# Checks path for validation and returns it if valid
def self.get_path(path)
# Check path for existence
UI.term 'Invalid download path. Please enter correct path' unless Dir.exist?(path)
File.expand_path(path)
end
def self.set_dl_path
loop do
ask_sentence = 'Enter path to desirable download directory'
default_path = File.join(ENV['HOME'], '/Music')
if Dir.exist?(default_path)
ask_sentence << " (press Enter to set it to #{default_path.magenta})"
else
default_path = nil
end
path = UI.ask(ask_sentence + ':')
# If user press enter, set path to default
path = default_path if path == '' && default_path
if Dir.exist?(path)
Cfg[:dl_path] = File.expand_path(path)
UI.say "#{'Download directory set up to'.green} #{path.magenta}"
break
else
UI.error "This directory doesn't exist. Please enter correct path"
end
end
end
end
end
## Instruction:
Add creation a directory entered in `to` option
## Code After:
module Nehm
##
# Path manager works with download paths
module PathManager
def self.default_dl_path
Cfg[:dl_path]
end
##
# Checks path for validation and returns it if valid
def self.get_path(path)
unless Dir.exist?(path)
UI.warning "This directory doesn't exist."
wish = UI.ask('Want to create it? (Y/n):')
wish = 'y' if wish == ''
if wish.downcase =~ /y/
UI.say "Creating directory: #{path}"
UI.newline
Dir.mkdir(File.expand_path(path), 0775)
else
UI.term
end
end
File.expand_path(path)
end
def self.set_dl_path
loop do
ask_sentence = 'Enter path to desirable download directory'
default_path = File.join(ENV['HOME'], '/Music')
if Dir.exist?(default_path)
ask_sentence << " (press Enter to set it to #{default_path.magenta})"
else
default_path = nil
end
path = UI.ask(ask_sentence + ':')
# If user press enter, set path to default
path = default_path if path == '' && default_path
if Dir.exist?(path)
Cfg[:dl_path] = File.expand_path(path)
UI.say "#{'Download directory set up to'.green} #{path.magenta}"
break
else
UI.error "This directory doesn't exist. Please enter correct path"
end
end
end
end
end
|
f899f8185095d3184df76b52855476a864a5b18e | .travis.yml | .travis.yml | language: rust
rust:
- nightly
addons:
apt:
packages:
- tree
install:
- git clone --depth 1 https://github.com/steveklabnik/rustbook.git
- cd rustbook && cargo build --release && cd ..
script:
- rustbook/target/release/rustbook build text/ book/
after_success:
- tree book
- zip -r too-many-lists book
| language: rust
rust:
- nightly
addons:
apt:
packages:
- tree
install:
- git clone --depth 1 https://github.com/steveklabnik/rustbook.git
- cd rustbook && cargo build --release && cd ..
script:
- rustbook/target/release/rustbook build text/ book/
after_success:
- tree book
- zip -r too-many-lists.zip book
deploy:
provider: releases
api_key: "$GH_DEPLOY_TOKEN"
file: "too-many-lists.zip"
skip_cleanup: true
on:
tags: true
| Add Travis to Github Release deploy config | Add Travis to Github Release deploy config | YAML | mit | rust-unofficial/too-many-lists,Gankro/too-many-lists | yaml | ## Code Before:
language: rust
rust:
- nightly
addons:
apt:
packages:
- tree
install:
- git clone --depth 1 https://github.com/steveklabnik/rustbook.git
- cd rustbook && cargo build --release && cd ..
script:
- rustbook/target/release/rustbook build text/ book/
after_success:
- tree book
- zip -r too-many-lists book
## Instruction:
Add Travis to Github Release deploy config
## Code After:
language: rust
rust:
- nightly
addons:
apt:
packages:
- tree
install:
- git clone --depth 1 https://github.com/steveklabnik/rustbook.git
- cd rustbook && cargo build --release && cd ..
script:
- rustbook/target/release/rustbook build text/ book/
after_success:
- tree book
- zip -r too-many-lists.zip book
deploy:
provider: releases
api_key: "$GH_DEPLOY_TOKEN"
file: "too-many-lists.zip"
skip_cleanup: true
on:
tags: true
|
1ad775f5e4fb9dd70071b87b887744171cd17e63 | src/xc2bit/build.rs | src/xc2bit/build.rs | use std::io::Write;
fn main() {
let out_dir = std::env::var("OUT_DIR").unwrap();
let destination = std::path::Path::new(&out_dir).join("reftests.rs");
let mut f = std::fs::File::create(&destination).unwrap();
let files = std::fs::read_dir("../../tests/xc2bit/reftests").unwrap();
for file in files {
let path = file.expect("failed to get path").path();
if path.extension().expect("bogus reftest filename (doesn't have extension)") == "jed" {
let path = path.canonicalize().unwrap();
let id_string = path.file_name().unwrap().to_str().unwrap().chars().map(|x| match x {
'A'...'Z' | 'a'...'z' | '0'...'9' => x,
_ => '_',
}).collect::<String>();
write!(f, r#"
#[test]
fn reftest_{}() {{
run_one_reftest("{}");
}}
"#, id_string, path.to_str().unwrap()).unwrap();
}
}
}
| use std::io::Write;
fn main() {
let out_dir = std::env::var("OUT_DIR").unwrap();
let destination = std::path::Path::new(&out_dir).join("reftests.rs");
let mut f = std::fs::File::create(&destination).unwrap();
let root_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap();
let reftests_dir = std::path::Path::new(&root_dir).join("../../tests/xc2bit/reftests");
let files = std::fs::read_dir(reftests_dir).unwrap();
for file in files {
let path = file.expect("failed to get path").path();
if path.extension().expect("bogus reftest filename (doesn't have extension)") == "jed" {
let path = path.canonicalize().unwrap();
let id_string = path.file_name().unwrap().to_str().unwrap().chars().map(|x| match x {
'A'...'Z' | 'a'...'z' | '0'...'9' => x,
_ => '_',
}).collect::<String>();
write!(f, r#"
#[test]
fn reftest_{}() {{
run_one_reftest("{}");
}}
"#, id_string, path.to_str().unwrap()).unwrap();
}
}
}
| Use CARGO_MANIFEST_DIR rather than assuming the cwd | xc2bit: Use CARGO_MANIFEST_DIR rather than assuming the cwd
| Rust | lgpl-2.1 | rqou/openfpga,rqou/openfpga,rqou/openfpga,azonenberg/openfpga,azonenberg/openfpga,azonenberg/openfpga,azonenberg/openfpga,rqou/openfpga,azonenberg/openfpga,rqou/openfpga | rust | ## Code Before:
use std::io::Write;
fn main() {
let out_dir = std::env::var("OUT_DIR").unwrap();
let destination = std::path::Path::new(&out_dir).join("reftests.rs");
let mut f = std::fs::File::create(&destination).unwrap();
let files = std::fs::read_dir("../../tests/xc2bit/reftests").unwrap();
for file in files {
let path = file.expect("failed to get path").path();
if path.extension().expect("bogus reftest filename (doesn't have extension)") == "jed" {
let path = path.canonicalize().unwrap();
let id_string = path.file_name().unwrap().to_str().unwrap().chars().map(|x| match x {
'A'...'Z' | 'a'...'z' | '0'...'9' => x,
_ => '_',
}).collect::<String>();
write!(f, r#"
#[test]
fn reftest_{}() {{
run_one_reftest("{}");
}}
"#, id_string, path.to_str().unwrap()).unwrap();
}
}
}
## Instruction:
xc2bit: Use CARGO_MANIFEST_DIR rather than assuming the cwd
## Code After:
use std::io::Write;
fn main() {
let out_dir = std::env::var("OUT_DIR").unwrap();
let destination = std::path::Path::new(&out_dir).join("reftests.rs");
let mut f = std::fs::File::create(&destination).unwrap();
let root_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap();
let reftests_dir = std::path::Path::new(&root_dir).join("../../tests/xc2bit/reftests");
let files = std::fs::read_dir(reftests_dir).unwrap();
for file in files {
let path = file.expect("failed to get path").path();
if path.extension().expect("bogus reftest filename (doesn't have extension)") == "jed" {
let path = path.canonicalize().unwrap();
let id_string = path.file_name().unwrap().to_str().unwrap().chars().map(|x| match x {
'A'...'Z' | 'a'...'z' | '0'...'9' => x,
_ => '_',
}).collect::<String>();
write!(f, r#"
#[test]
fn reftest_{}() {{
run_one_reftest("{}");
}}
"#, id_string, path.to_str().unwrap()).unwrap();
}
}
}
|
a27dad11160f1d5cecbbb4dec9e0bc6448f09461 | app/serializers/spree_signifyd/credit_card_serializer.rb | app/serializers/spree_signifyd/credit_card_serializer.rb | require 'active_model/serializer'
module SpreeSignifyd
class CreditCardSerializer < ActiveModel::Serializer
self.root = false
attributes :cardHolderName, :last4, :expiryMonth, :expiryYear
def cardHolderName
"#{object.first_name} #{object.last_name}"
end
def last4
object.last_digits
end
def expiryMonth
object.month
end
def expiryYear
object.year
end
end
end
| require 'active_model/serializer'
module SpreeSignifyd
class CreditCardSerializer < ActiveModel::Serializer
self.root = false
attributes :cardHolderName, :last4
# this is how to conditionally include attributes in AMS
def attributes(*args)
hash = super
hash[:expiryMonth] = object.month if object.month
hash[:expiryYear] = object.year if object.year
hash
end
def cardHolderName
"#{object.first_name} #{object.last_name}"
end
def last4
object.last_digits
end
end
end
| Make CreditCard expiryMonth and expiryYear optional | Make CreditCard expiryMonth and expiryYear optional
These are about to become numbers, null is not a number.
| Ruby | bsd-3-clause | solidusio/solidus_signifyd,solidusio/solidus_signifyd | ruby | ## Code Before:
require 'active_model/serializer'
module SpreeSignifyd
class CreditCardSerializer < ActiveModel::Serializer
self.root = false
attributes :cardHolderName, :last4, :expiryMonth, :expiryYear
def cardHolderName
"#{object.first_name} #{object.last_name}"
end
def last4
object.last_digits
end
def expiryMonth
object.month
end
def expiryYear
object.year
end
end
end
## Instruction:
Make CreditCard expiryMonth and expiryYear optional
These are about to become numbers, null is not a number.
## Code After:
require 'active_model/serializer'
module SpreeSignifyd
class CreditCardSerializer < ActiveModel::Serializer
self.root = false
attributes :cardHolderName, :last4
# this is how to conditionally include attributes in AMS
def attributes(*args)
hash = super
hash[:expiryMonth] = object.month if object.month
hash[:expiryYear] = object.year if object.year
hash
end
def cardHolderName
"#{object.first_name} #{object.last_name}"
end
def last4
object.last_digits
end
end
end
|
6aca94f42c4278d78a8b1b76f35999b0287200a4 | dashboard/client/dashboard.html | dashboard/client/dashboard.html | <template name="dashboard">
<p>Placeholder</p>
<form id="elasticsearch-host" method="post">
<input type="text" name="host" placeholder="https://elasticsearch.host:port">
<button type="submit" name="set-elasticsearch-host">
Set host
</button>
</form>
</template>
| <template name="dashboard">
<h1>API Umbrella Dashboard</h1>
<form id="elasticsearch-host" method="post">
<input type="text" name="host" placeholder="https://elasticsearch.host:port">
<button type="submit" name="set-elasticsearch-host">
Set host
</button>
</form>
</template>
| Replace placeholder text with header | Replace placeholder text with header
| HTML | mit | apinf/api-umbrella-dashboard,apinf/api-umbrella-dashboard | html | ## Code Before:
<template name="dashboard">
<p>Placeholder</p>
<form id="elasticsearch-host" method="post">
<input type="text" name="host" placeholder="https://elasticsearch.host:port">
<button type="submit" name="set-elasticsearch-host">
Set host
</button>
</form>
</template>
## Instruction:
Replace placeholder text with header
## Code After:
<template name="dashboard">
<h1>API Umbrella Dashboard</h1>
<form id="elasticsearch-host" method="post">
<input type="text" name="host" placeholder="https://elasticsearch.host:port">
<button type="submit" name="set-elasticsearch-host">
Set host
</button>
</form>
</template>
|
3816cbbda6a19e551330c0b3fe6faac1301de342 | gradle.properties | gradle.properties | jacocoVersion=0.7.7.201606060606
| jacocoVersion=0.7.7.201606060606
android.enableD8=true | Enable d8 next-gen dex compiler | Enable d8 next-gen dex compiler
| INI | apache-2.0 | kruton/connectbot,lotan/connectbot,kruton/connectbot,alescdb/connectbot,connectbot/connectbot,lotan/connectbot,kruton/connectbot,iiordanov/BSSH,connectbot/connectbot,lotan/connectbot,alescdb/connectbot,alescdb/connectbot,iiordanov/BSSH,iiordanov/BSSH,connectbot/connectbot | ini | ## Code Before:
jacocoVersion=0.7.7.201606060606
## Instruction:
Enable d8 next-gen dex compiler
## Code After:
jacocoVersion=0.7.7.201606060606
android.enableD8=true |
416575ca3cc684925be0391b43b98a9fa1d9f909 | ObjectTracking/testTrack.py | ObjectTracking/testTrack.py |
from SimpleCV import ColorSegmentation, Image, Camera, VirtualCamera, Display
# Open reference video
cam=VirtualCamera('/media/bat/DATA/Baptiste/Nautilab/kite_project/zenith-wind-power-read-only/KiteControl-Qt/videos/kiteFlying.avi','video')
# Select reference image
img=cam.getFrame(50)
modelImage = img.crop(255, 180, 70, 20)
modelImage = Image('kite_detail.jpg')
ts = []
disp=Display()
for i in range(0,50):
img = cam.getImage()
while (disp.isNotDone()):
img = cam.getImage()
bb = (255, 180, 70, 20)
ts = img.track("camshift",ts,modelImage,bb, num_frames = 1)
# now here in first loop iteration since ts is empty,
# img0 and bb will be considered.
# New tracking object will be created and added in ts (TrackSet)
# After first iteration, ts is not empty and hence the previous
# image frames and bounding box will be taken from ts and img0
# and bb will be ignored.
ts.drawPath()
img.show()
|
from SimpleCV import ColorSegmentation, Image, Camera, VirtualCamera, Display, Color
# Open reference video
cam=VirtualCamera('/media/bat/DATA/Baptiste/Nautilab/kite_project/zenith-wind-power-read-only/KiteControl-Qt/videos/kiteFlying.avi','video')
# Select reference image
img=cam.getFrame(50)
modelImage = img.crop(255, 180, 70, 20)
modelImage = Image('kite_detail.jpg')
ts = []
disp=Display()
for i in range(0,50):
img = cam.getImage()
while (disp.isNotDone()):
img = cam.getImage()
bb = (255, 180, 70, 20)
ts = img.track("camshift",ts,modelImage,bb, num_frames = 1)
modelImage = Image('kite_detail.jpg')
# now here in first loop iteration since ts is empty,
# img0 and bb will be considered.
# New tracking object will be created and added in ts (TrackSet)
# After first iteration, ts is not empty and hence the previous
# image frames and bounding box will be taken from ts and img0
# and bb will be ignored.
ts.draw()
ts.drawBB()
ts.showCoordinates()
img.show()
| Save the image of the selection (to be able to reinitialise later) | Save the image of the selection (to be able to reinitialise later)
| Python | mit | baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite | python | ## Code Before:
from SimpleCV import ColorSegmentation, Image, Camera, VirtualCamera, Display
# Open reference video
cam=VirtualCamera('/media/bat/DATA/Baptiste/Nautilab/kite_project/zenith-wind-power-read-only/KiteControl-Qt/videos/kiteFlying.avi','video')
# Select reference image
img=cam.getFrame(50)
modelImage = img.crop(255, 180, 70, 20)
modelImage = Image('kite_detail.jpg')
ts = []
disp=Display()
for i in range(0,50):
img = cam.getImage()
while (disp.isNotDone()):
img = cam.getImage()
bb = (255, 180, 70, 20)
ts = img.track("camshift",ts,modelImage,bb, num_frames = 1)
# now here in first loop iteration since ts is empty,
# img0 and bb will be considered.
# New tracking object will be created and added in ts (TrackSet)
# After first iteration, ts is not empty and hence the previous
# image frames and bounding box will be taken from ts and img0
# and bb will be ignored.
ts.drawPath()
img.show()
## Instruction:
Save the image of the selection (to be able to reinitialise later)
## Code After:
from SimpleCV import ColorSegmentation, Image, Camera, VirtualCamera, Display, Color
# Open reference video
cam=VirtualCamera('/media/bat/DATA/Baptiste/Nautilab/kite_project/zenith-wind-power-read-only/KiteControl-Qt/videos/kiteFlying.avi','video')
# Select reference image
img=cam.getFrame(50)
modelImage = img.crop(255, 180, 70, 20)
modelImage = Image('kite_detail.jpg')
ts = []
disp=Display()
for i in range(0,50):
img = cam.getImage()
while (disp.isNotDone()):
img = cam.getImage()
bb = (255, 180, 70, 20)
ts = img.track("camshift",ts,modelImage,bb, num_frames = 1)
modelImage = Image('kite_detail.jpg')
# now here in first loop iteration since ts is empty,
# img0 and bb will be considered.
# New tracking object will be created and added in ts (TrackSet)
# After first iteration, ts is not empty and hence the previous
# image frames and bounding box will be taken from ts and img0
# and bb will be ignored.
ts.draw()
ts.drawBB()
ts.showCoordinates()
img.show()
|
2aa96a57964299a9c7a21d0aa2570d411f25d23b | db/migrate/20121211151950_add_slider_taxons_and_apply_them.rb | db/migrate/20121211151950_add_slider_taxons_and_apply_them.rb | class AddSliderTaxonsAndApplyThem < ActiveRecord::Migration
def up
tags = Spree::Taxonomy.create(:name => 'Tags')
slider = Spree::Taxon.create({:taxonomy_id => tags.id, :name => 'Slider'})
featured = Spree::Taxon.create({:taxonomy_id => tags.id, :name => 'Featured'})
latest = Spree::Taxon.create({:taxonomy_id => tags.id, :name => 'Latest'})
products = Spree::Product.all
if products[6]
products[0..6].each do |product|
product.taxons << slider
end
end
if products[16]
products[4..16].each do |product|
product.taxons << featured
end
products[0..12].each do |product|
product.taxons << latest
end
end
end
def down
Spree::Taxonomy.where(:name => 'Tags').destroy_all
end
end
| class AddSliderTaxonsAndApplyThem < ActiveRecord::Migration
def up
tags = Spree::Taxonomy.create(:name => 'Tags')
slider = Spree::Taxon.create({:taxonomy_id => tags.id, :parent_id => tags.root.id, :name => 'Slider'})
featured = Spree::Taxon.create({:taxonomy_id => tags.id, :parent_id => tags.root.id, :name => 'Featured'})
latest = Spree::Taxon.create({:taxonomy_id => tags.id, :parent_id => tags.root.id, :name => 'Latest'})
products = Spree::Product.all
if products[6]
products[0..6].each do |product|
product.taxons << slider
end
end
if products[16]
products[4..16].each do |product|
product.taxons << featured
end
products[0..12].each do |product|
product.taxons << latest
end
end
end
def down
Spree::Taxonomy.where(:name => 'Tags').destroy_all
end
end
| Set parent_id when creating Slider, Featured, and Latest | Set parent_id when creating Slider, Featured, and Latest
Since parent_id wasn't set to Tags taxonomy root id,
these Taxons were not appearing in the admin, and
were not being destroyed when the Tags taxonomy was
destroyed.
Fixes #112
| Ruby | bsd-3-clause | samuels410/spree_fancy,samuels410/spree_fancy | ruby | ## Code Before:
class AddSliderTaxonsAndApplyThem < ActiveRecord::Migration
def up
tags = Spree::Taxonomy.create(:name => 'Tags')
slider = Spree::Taxon.create({:taxonomy_id => tags.id, :name => 'Slider'})
featured = Spree::Taxon.create({:taxonomy_id => tags.id, :name => 'Featured'})
latest = Spree::Taxon.create({:taxonomy_id => tags.id, :name => 'Latest'})
products = Spree::Product.all
if products[6]
products[0..6].each do |product|
product.taxons << slider
end
end
if products[16]
products[4..16].each do |product|
product.taxons << featured
end
products[0..12].each do |product|
product.taxons << latest
end
end
end
def down
Spree::Taxonomy.where(:name => 'Tags').destroy_all
end
end
## Instruction:
Set parent_id when creating Slider, Featured, and Latest
Since parent_id wasn't set to Tags taxonomy root id,
these Taxons were not appearing in the admin, and
were not being destroyed when the Tags taxonomy was
destroyed.
Fixes #112
## Code After:
class AddSliderTaxonsAndApplyThem < ActiveRecord::Migration
def up
tags = Spree::Taxonomy.create(:name => 'Tags')
slider = Spree::Taxon.create({:taxonomy_id => tags.id, :parent_id => tags.root.id, :name => 'Slider'})
featured = Spree::Taxon.create({:taxonomy_id => tags.id, :parent_id => tags.root.id, :name => 'Featured'})
latest = Spree::Taxon.create({:taxonomy_id => tags.id, :parent_id => tags.root.id, :name => 'Latest'})
products = Spree::Product.all
if products[6]
products[0..6].each do |product|
product.taxons << slider
end
end
if products[16]
products[4..16].each do |product|
product.taxons << featured
end
products[0..12].each do |product|
product.taxons << latest
end
end
end
def down
Spree::Taxonomy.where(:name => 'Tags').destroy_all
end
end
|
dbdae0e9070c8dbbead88338effb870c82b08aa6 | core/src/test/scala/hyperion/CoreAppSpec.scala | core/src/test/scala/hyperion/CoreAppSpec.scala | package hyperion
import akka.testkit.TestProbe
import scala.concurrent.duration.DurationInt
class CoreAppSpec extends BaseAkkaSpec {
val app = new CoreApp(system)
"Creating the CoreApp" should {
"result in creating the necessary top-level actors" in {
// Assert
TestProbe().expectActor("/user/receiver", 500 milliseconds) should not be empty
}
}
}
| package hyperion
import akka.testkit.TestProbe
import scala.concurrent.duration.DurationInt
class CoreAppSpec extends BaseAkkaSpec {
"Creating the CoreApp" should {
"result in creating the necessary top-level actors" in {
// Act
new CoreApp(system)
// Assert
TestProbe().expectActor("/user/launcher-actor", 500 milliseconds) should not be empty
}
}
}
| Fix test: expect the Actor to appear | Fix test: expect the Actor to appear
| Scala | mit | mthmulders/hyperion | scala | ## Code Before:
package hyperion
import akka.testkit.TestProbe
import scala.concurrent.duration.DurationInt
class CoreAppSpec extends BaseAkkaSpec {
val app = new CoreApp(system)
"Creating the CoreApp" should {
"result in creating the necessary top-level actors" in {
// Assert
TestProbe().expectActor("/user/receiver", 500 milliseconds) should not be empty
}
}
}
## Instruction:
Fix test: expect the Actor to appear
## Code After:
package hyperion
import akka.testkit.TestProbe
import scala.concurrent.duration.DurationInt
class CoreAppSpec extends BaseAkkaSpec {
"Creating the CoreApp" should {
"result in creating the necessary top-level actors" in {
// Act
new CoreApp(system)
// Assert
TestProbe().expectActor("/user/launcher-actor", 500 milliseconds) should not be empty
}
}
}
|
961c799b7ddca97ad148e0ed76f004a3d62c9e50 | docker-compose.yml | docker-compose.yml | version: '3.3'
services:
lunamultiplayer:
build:
context: ./
dockerfile: Dockerfile_Server
args:
# set to desired version, available versions: https://github.com/LunaMultiplayer/LunaMultiplayer/releases
- LMP_VERSION=0.25.0
container_name: lunamultiplayer
environment:
- TZ=CET
ports:
- '8800:8800/udp'
# uncomment to enabler website
# - '8900:8900'
volumes:
- '/opt/LMPServer/Config:/LMPServer/Config'
- '/opt/LMPServer/Universe:/LMPServer/Universe'
- '/opt/LMPServer/Plugins:/LMPServer/Plugins'
- '/opt/LMPServer/logs:/LMPServer/logs'
restart: unless-stopped
| version: '3.3'
services:
lunamultiplayer:
image: lunamultiplayer:local
build:
context: ./
dockerfile: Dockerfile_Server
args:
# set to desired version, available versions: https://github.com/LunaMultiplayer/LunaMultiplayer/releases
- LMP_VERSION=0.25.0
container_name: lunamultiplayer
environment:
- TZ=CET
ports:
- '8800:8800/udp'
# uncomment to enabler website
# - '8900:8900'
volumes:
- '/opt/LMPServer/Config:/LMPServer/Config'
- '/opt/LMPServer/Universe:/LMPServer/Universe'
- '/opt/LMPServer/Plugins:/LMPServer/Plugins'
- '/opt/LMPServer/logs:/LMPServer/logs'
restart: unless-stopped
| Add image name for local builds | DockerCompose: Add image name for local builds
| YAML | mit | gavazquez/LunaMultiPlayer,gavazquez/LunaMultiPlayer,gavazquez/LunaMultiPlayer,DaggerES/LunaMultiPlayer | yaml | ## Code Before:
version: '3.3'
services:
lunamultiplayer:
build:
context: ./
dockerfile: Dockerfile_Server
args:
# set to desired version, available versions: https://github.com/LunaMultiplayer/LunaMultiplayer/releases
- LMP_VERSION=0.25.0
container_name: lunamultiplayer
environment:
- TZ=CET
ports:
- '8800:8800/udp'
# uncomment to enabler website
# - '8900:8900'
volumes:
- '/opt/LMPServer/Config:/LMPServer/Config'
- '/opt/LMPServer/Universe:/LMPServer/Universe'
- '/opt/LMPServer/Plugins:/LMPServer/Plugins'
- '/opt/LMPServer/logs:/LMPServer/logs'
restart: unless-stopped
## Instruction:
DockerCompose: Add image name for local builds
## Code After:
version: '3.3'
services:
lunamultiplayer:
image: lunamultiplayer:local
build:
context: ./
dockerfile: Dockerfile_Server
args:
# set to desired version, available versions: https://github.com/LunaMultiplayer/LunaMultiplayer/releases
- LMP_VERSION=0.25.0
container_name: lunamultiplayer
environment:
- TZ=CET
ports:
- '8800:8800/udp'
# uncomment to enabler website
# - '8900:8900'
volumes:
- '/opt/LMPServer/Config:/LMPServer/Config'
- '/opt/LMPServer/Universe:/LMPServer/Universe'
- '/opt/LMPServer/Plugins:/LMPServer/Plugins'
- '/opt/LMPServer/logs:/LMPServer/logs'
restart: unless-stopped
|
aa7bdaaf82d9c880a2562c716cd15d4a6f301f83 | .travis.yml | .travis.yml | language: java
jdk:
- oraclejdk8
- oraclejdk7
- openjdk7
before_script:
- cd src
script:
- mvn clean test
| language: java
jdk:
- oraclejdk8
- oraclejdk7
- openjdk7
before_script:
- cd example-hello-wps
script:
- mvn clean test
| Fix copy and paste error. | Fix copy and paste error.
| YAML | apache-2.0 | marcjansen/geoserver-wps-archetype | yaml | ## Code Before:
language: java
jdk:
- oraclejdk8
- oraclejdk7
- openjdk7
before_script:
- cd src
script:
- mvn clean test
## Instruction:
Fix copy and paste error.
## Code After:
language: java
jdk:
- oraclejdk8
- oraclejdk7
- openjdk7
before_script:
- cd example-hello-wps
script:
- mvn clean test
|
3bb71bfd7a2b979a6e2047f2ace6eda7a3546592 | .travis.yml | .travis.yml | language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.1.1
before_install:
- gem update --system
- gem --version
before_script:
- sudo apt-get update -qq
- sudo apt-get install -qq zip unzip
- echo `whereis zip`
- echo `whereis unzip`
| language: ruby
rvm:
- 2.0.0
- 2.1.10
- 2.2.5
- 2.3.1
before_install:
- gem update --system
- gem --version
before_script:
- sudo apt-get update -qq
- sudo apt-get install -qq zip unzip
- echo `whereis zip`
- echo `whereis unzip`
| Test on Ruby 2.2 and 2.3, drop 1.9.3 | Test on Ruby 2.2 and 2.3, drop 1.9.3
| YAML | mit | orien/zip-zip | yaml | ## Code Before:
language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.1.1
before_install:
- gem update --system
- gem --version
before_script:
- sudo apt-get update -qq
- sudo apt-get install -qq zip unzip
- echo `whereis zip`
- echo `whereis unzip`
## Instruction:
Test on Ruby 2.2 and 2.3, drop 1.9.3
## Code After:
language: ruby
rvm:
- 2.0.0
- 2.1.10
- 2.2.5
- 2.3.1
before_install:
- gem update --system
- gem --version
before_script:
- sudo apt-get update -qq
- sudo apt-get install -qq zip unzip
- echo `whereis zip`
- echo `whereis unzip`
|
d1e94fef2342ca67ec7b1120bd9fc415c5203ac1 | app/partials/home.html | app/partials/home.html | <p>Player List</p>
<ul>
<li class="drag-item" style="-webkit-user-select:none;cursor:move;" lvl-draggable="true" ng-repeat="player in players.list"
data-name="{{player.name}}" data-rank="{{player.rank}}">
<div class="player-name">Player Name: {{player.name}}</div>
<div class="player-rank">Player Rank: {{player.rank}}</div>
</li>
</ul>
<ul class="drop-list" x-lvl-drop-target="true" x-on-drop="dropped(dragEl, dropEl)">
</ul> | <p>Player List</p>
<ul>
<li class="drag-item" lvl-draggable="true" ng-repeat="player in players.list"
data-name="{{player.name}}" data-rank="{{player.rank}}">
<div class="player-name">Player Name: {{player.name}}</div>
<div class="player-rank">Player Rank: {{player.rank}}</div>
</li>
</ul>
<ul class="drop-list" x-lvl-drop-target="true" x-on-drop="dropped(dragEl, dropEl)">
</ul> | Remove inline styles from player list | Remove inline styles from player list
| HTML | mit | paulmatthews/poNG | html | ## Code Before:
<p>Player List</p>
<ul>
<li class="drag-item" style="-webkit-user-select:none;cursor:move;" lvl-draggable="true" ng-repeat="player in players.list"
data-name="{{player.name}}" data-rank="{{player.rank}}">
<div class="player-name">Player Name: {{player.name}}</div>
<div class="player-rank">Player Rank: {{player.rank}}</div>
</li>
</ul>
<ul class="drop-list" x-lvl-drop-target="true" x-on-drop="dropped(dragEl, dropEl)">
</ul>
## Instruction:
Remove inline styles from player list
## Code After:
<p>Player List</p>
<ul>
<li class="drag-item" lvl-draggable="true" ng-repeat="player in players.list"
data-name="{{player.name}}" data-rank="{{player.rank}}">
<div class="player-name">Player Name: {{player.name}}</div>
<div class="player-rank">Player Rank: {{player.rank}}</div>
</li>
</ul>
<ul class="drop-list" x-lvl-drop-target="true" x-on-drop="dropped(dragEl, dropEl)">
</ul> |
c972d1085ee66fa9f273f728bb37460c413eebc5 | README.md | README.md |
> A simple CSS prototyping framework
Mistype is a set of styles that helps you to design a new site. It's a simple
CSS prototyping framework, put in a 2.52 kB file.
## Download
- [**ZIP package**](https://github.com/zdroid/mistype/archive/master.zip)
- **Bower:** `bower install mistype`
## Components
- **Scaffolding:** base element styles
- **Grid:** mobile-first container, row and columns
- **Utilities:** float and display utilities, including clearfix
- **Media queries:** examples of media queries for responsive design
**Tip:** I recommend you to use
[Sanitize.css](https://github.com/zdroid/santiize.css) (Normalize.css fork) or
Normalize.css besides Mistype.
## Template
Template lies in `template.html`. You can find some additional styles in it.
## Browser support
- **Chrome** (latest)
- **Firefox** (latest)
- **Opera** (latest)
- **Safari 6+**
- **Internet Explorer 9+**
## License
MIT © [Zlatan Vasović](https://github.com/zdroid)
|
> A simple CSS prototyping framework
Mistype is a set of styles that helps you to design a new site. It's a simple
CSS prototyping framework, put in a 2.5 kB file.
## Download
- [**ZIP package**](https://github.com/zdroid/mistype/archive/master.zip)
- **Bower:** `bower install mistype`
## Components
- **Scaffolding:** base element styles
- **Grid:** mobile-first container, row and columns
- **Utilities:** float and display utilities, including clearfix
- **Media queries:** examples of media queries for responsive design
**Tip:** I recommend you to use
[Codify.css](https://github.com/zdroid/codify.css) (Normalize.css fork) or
Normalize.css besides Mistype.
## Template
Template lies in `template.html`. You can find some additional styles in it.
## Browser support
- **Chrome** (latest)
- **Firefox** (latest)
- **Opera** (latest)
- **Edge** (latest)
- **Safari 7+**
- **Internet Explorer 10+**
## License
MIT © [Zlatan Vasović](https://github.com/zdroid)
| Update browser support list and links | Update browser support list and links
| Markdown | mit | ZDroid/mistype | markdown | ## Code Before:
> A simple CSS prototyping framework
Mistype is a set of styles that helps you to design a new site. It's a simple
CSS prototyping framework, put in a 2.52 kB file.
## Download
- [**ZIP package**](https://github.com/zdroid/mistype/archive/master.zip)
- **Bower:** `bower install mistype`
## Components
- **Scaffolding:** base element styles
- **Grid:** mobile-first container, row and columns
- **Utilities:** float and display utilities, including clearfix
- **Media queries:** examples of media queries for responsive design
**Tip:** I recommend you to use
[Sanitize.css](https://github.com/zdroid/santiize.css) (Normalize.css fork) or
Normalize.css besides Mistype.
## Template
Template lies in `template.html`. You can find some additional styles in it.
## Browser support
- **Chrome** (latest)
- **Firefox** (latest)
- **Opera** (latest)
- **Safari 6+**
- **Internet Explorer 9+**
## License
MIT © [Zlatan Vasović](https://github.com/zdroid)
## Instruction:
Update browser support list and links
## Code After:
> A simple CSS prototyping framework
Mistype is a set of styles that helps you to design a new site. It's a simple
CSS prototyping framework, put in a 2.5 kB file.
## Download
- [**ZIP package**](https://github.com/zdroid/mistype/archive/master.zip)
- **Bower:** `bower install mistype`
## Components
- **Scaffolding:** base element styles
- **Grid:** mobile-first container, row and columns
- **Utilities:** float and display utilities, including clearfix
- **Media queries:** examples of media queries for responsive design
**Tip:** I recommend you to use
[Codify.css](https://github.com/zdroid/codify.css) (Normalize.css fork) or
Normalize.css besides Mistype.
## Template
Template lies in `template.html`. You can find some additional styles in it.
## Browser support
- **Chrome** (latest)
- **Firefox** (latest)
- **Opera** (latest)
- **Edge** (latest)
- **Safari 7+**
- **Internet Explorer 10+**
## License
MIT © [Zlatan Vasović](https://github.com/zdroid)
|
40d9822320955cca54ecf4069fdc769c37257454 | docs/developer/sample-data.rst | docs/developer/sample-data.rst | Sample data
===========
"Alice" dataset is a structure for the test data that is used for development. Relationships in the dataset are shown below.
String in a circle means username. Password should be generated equal to the username.
.. image:: ../images/testdata-alice.png
| Sample data
===========
"Alice" dataset is a structure for the test data that is used for development. Relationships in the dataset are shown below.
String in a circle means username.
.. image:: ../images/testdata-alice.png
| Fix Alice dataset docs (WAL-485) | Fix Alice dataset docs (WAL-485)
| reStructuredText | mit | opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor | restructuredtext | ## Code Before:
Sample data
===========
"Alice" dataset is a structure for the test data that is used for development. Relationships in the dataset are shown below.
String in a circle means username. Password should be generated equal to the username.
.. image:: ../images/testdata-alice.png
## Instruction:
Fix Alice dataset docs (WAL-485)
## Code After:
Sample data
===========
"Alice" dataset is a structure for the test data that is used for development. Relationships in the dataset are shown below.
String in a circle means username.
.. image:: ../images/testdata-alice.png
|
a920d661a7925e90b035468e7e307d5b5027ac2f | src/Lily/Application/MiddlewareApplication.php | src/Lily/Application/MiddlewareApplication.php | <?php
namespace Lily\Application;
class MiddlewareApplication
{
private $application;
private $middleware;
public function __construct(array $pipeline)
{
$this->handler = array_shift($pipeline);
$this->middleware = $pipeline;
}
private function handler()
{
return $this->handler;
}
private function middleware()
{
return $this->middleware;
}
public function __invoke($request)
{
$handler = $this->handler();
foreach ($this->middleware() as $_mw) {
$handler = $_mw($handler);
}
return $handler($request);
}
}
| <?php
namespace Lily\Application;
class MiddlewareApplication
{
private $handler;
private $middleware;
public function __construct(array $pipeline)
{
$this->handler = array_shift($pipeline);
$this->middleware = $pipeline;
}
private function handler()
{
return $this->handler;
}
private function middleware()
{
return $this->middleware;
}
public function __invoke($request)
{
$handler = $this->handler();
foreach ($this->middleware() as $_mw) {
$handler = $_mw($handler);
}
return $handler($request);
}
}
| Rename private variable to $handler | Rename private variable to $handler | PHP | mit | lukemorton/lily,lukemorton/lily,DrPheltRight/lily,DrPheltRight/lily | php | ## Code Before:
<?php
namespace Lily\Application;
class MiddlewareApplication
{
private $application;
private $middleware;
public function __construct(array $pipeline)
{
$this->handler = array_shift($pipeline);
$this->middleware = $pipeline;
}
private function handler()
{
return $this->handler;
}
private function middleware()
{
return $this->middleware;
}
public function __invoke($request)
{
$handler = $this->handler();
foreach ($this->middleware() as $_mw) {
$handler = $_mw($handler);
}
return $handler($request);
}
}
## Instruction:
Rename private variable to $handler
## Code After:
<?php
namespace Lily\Application;
class MiddlewareApplication
{
private $handler;
private $middleware;
public function __construct(array $pipeline)
{
$this->handler = array_shift($pipeline);
$this->middleware = $pipeline;
}
private function handler()
{
return $this->handler;
}
private function middleware()
{
return $this->middleware;
}
public function __invoke($request)
{
$handler = $this->handler();
foreach ($this->middleware() as $_mw) {
$handler = $_mw($handler);
}
return $handler($request);
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.