commit
stringlengths
40
40
old_file
stringlengths
4
184
new_file
stringlengths
4
184
old_contents
stringlengths
1
3.6k
new_contents
stringlengths
5
3.38k
subject
stringlengths
15
778
message
stringlengths
16
6.74k
lang
stringclasses
201 values
license
stringclasses
13 values
repos
stringlengths
6
116k
config
stringclasses
201 values
content
stringlengths
137
7.24k
diff
stringlengths
26
5.55k
diff_length
int64
1
123
relative_diff_length
float64
0.01
89
n_lines_added
int64
0
108
n_lines_deleted
int64
0
106
563d5704a0e50e85ff5249fd3fde15a824fa74dc
V/V/Controllers/ContactsViewController.swift
V/V/Controllers/ContactsViewController.swift
// // ContactsViewController.swift // V // // Created by Dulio Denis on 7/5/16. // Copyright © 2016 Dulio Denis. All rights reserved. // import UIKit import CoreData import Contacts import ContactsUI class ContactsViewController: UIViewController, ContextViewController { // in order to fulfill the ContextVC Protocol var context: NSManagedObjectContext? private let tableView = UITableView(frame: CGRectZero, style: .Plain) private let cellIdentifier = "ContactCell" override func viewDidLoad() { super.viewDidLoad() title = "All Contacts" navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(named: "add"), style: .Plain, target: self, action: "newContact") // Account for the Navigation Bar automaticallyAdjustsScrollViewInsets = false tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: cellIdentifier) tableView.tableFooterView = UIView(frame: CGRectZero) fillViewWith(tableView) } func newContact() { print("New Contact") } }
// // ContactsViewController.swift // V // // Created by Dulio Denis on 7/5/16. // Copyright © 2016 Dulio Denis. All rights reserved. // import UIKit import CoreData import Contacts import ContactsUI class ContactsViewController: UIViewController, ContextViewController { // in order to fulfill the ContextVC Protocol var context: NSManagedObjectContext? private let tableView = UITableView(frame: CGRectZero, style: .Plain) private let cellIdentifier = "ContactCell" override func viewDidLoad() { super.viewDidLoad() navigationController?.navigationBar.topItem?.title = "All Contacts" navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(named: "add"), style: .Plain, target: self, action: "newContact") // Account for the Navigation Bar automaticallyAdjustsScrollViewInsets = false tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: cellIdentifier) tableView.tableFooterView = UIView(frame: CGRectZero) fillViewWith(tableView) } func newContact() { print("New Contact") } }
Set the title to the ContactsVC
Set the title to the ContactsVC
Swift
mit
duliodenis/v
swift
## Code Before: // // ContactsViewController.swift // V // // Created by Dulio Denis on 7/5/16. // Copyright © 2016 Dulio Denis. All rights reserved. // import UIKit import CoreData import Contacts import ContactsUI class ContactsViewController: UIViewController, ContextViewController { // in order to fulfill the ContextVC Protocol var context: NSManagedObjectContext? private let tableView = UITableView(frame: CGRectZero, style: .Plain) private let cellIdentifier = "ContactCell" override func viewDidLoad() { super.viewDidLoad() title = "All Contacts" navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(named: "add"), style: .Plain, target: self, action: "newContact") // Account for the Navigation Bar automaticallyAdjustsScrollViewInsets = false tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: cellIdentifier) tableView.tableFooterView = UIView(frame: CGRectZero) fillViewWith(tableView) } func newContact() { print("New Contact") } } ## Instruction: Set the title to the ContactsVC ## Code After: // // ContactsViewController.swift // V // // Created by Dulio Denis on 7/5/16. // Copyright © 2016 Dulio Denis. All rights reserved. // import UIKit import CoreData import Contacts import ContactsUI class ContactsViewController: UIViewController, ContextViewController { // in order to fulfill the ContextVC Protocol var context: NSManagedObjectContext? private let tableView = UITableView(frame: CGRectZero, style: .Plain) private let cellIdentifier = "ContactCell" override func viewDidLoad() { super.viewDidLoad() navigationController?.navigationBar.topItem?.title = "All Contacts" navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(named: "add"), style: .Plain, target: self, action: "newContact") // Account for the Navigation Bar automaticallyAdjustsScrollViewInsets = false tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: cellIdentifier) tableView.tableFooterView = UIView(frame: CGRectZero) fillViewWith(tableView) } func newContact() { print("New Contact") } }
// // ContactsViewController.swift // V // // Created by Dulio Denis on 7/5/16. // Copyright © 2016 Dulio Denis. All rights reserved. // import UIKit import CoreData import Contacts import ContactsUI class ContactsViewController: UIViewController, ContextViewController { // in order to fulfill the ContextVC Protocol var context: NSManagedObjectContext? private let tableView = UITableView(frame: CGRectZero, style: .Plain) private let cellIdentifier = "ContactCell" override func viewDidLoad() { super.viewDidLoad() - title = "All Contacts" + navigationController?.navigationBar.topItem?.title = "All Contacts" navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(named: "add"), style: .Plain, target: self, action: "newContact") // Account for the Navigation Bar automaticallyAdjustsScrollViewInsets = false tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: cellIdentifier) tableView.tableFooterView = UIView(frame: CGRectZero) fillViewWith(tableView) } func newContact() { print("New Contact") } }
2
0.046512
1
1
4184d968668ebd590d927aea7ecbaf7088473cb5
bot/action/util/reply_markup/inline_keyboard/button.py
bot/action/util/reply_markup/inline_keyboard/button.py
class InlineKeyboardButton: def __init__(self, data: dict): self.data = data @staticmethod def switch_inline_query(text: str, query: str = "", current_chat: bool = True): switch_inline_query_key = "switch_inline_query_current_chat" if current_chat else "switch_inline_query" return InlineKeyboardButton({ "text": text, switch_inline_query_key: query })
class InlineKeyboardButton: def __init__(self, data: dict): self.data = data @staticmethod def create(text: str, url: str = None, callback_data: str = None, switch_inline_query: str = None, switch_inline_query_current_chat: str = None): data = { "text": text } if url is not None: data["url"] = url if callback_data is not None: data["callback_data"] = callback_data if switch_inline_query is not None: data["switch_inline_query"] = switch_inline_query if switch_inline_query_current_chat is not None: data["switch_inline_query_current_chat"] = switch_inline_query_current_chat return InlineKeyboardButton(data) @staticmethod def switch_inline_query(text: str, query: str = "", current_chat: bool = True): switch_inline_query_key = "switch_inline_query_current_chat" if current_chat else "switch_inline_query" return InlineKeyboardButton({ "text": text, switch_inline_query_key: query })
Add create static method to InlineKeyboardButton with all possible parameters
Add create static method to InlineKeyboardButton with all possible parameters
Python
agpl-3.0
alvarogzp/telegram-bot,alvarogzp/telegram-bot
python
## Code Before: class InlineKeyboardButton: def __init__(self, data: dict): self.data = data @staticmethod def switch_inline_query(text: str, query: str = "", current_chat: bool = True): switch_inline_query_key = "switch_inline_query_current_chat" if current_chat else "switch_inline_query" return InlineKeyboardButton({ "text": text, switch_inline_query_key: query }) ## Instruction: Add create static method to InlineKeyboardButton with all possible parameters ## Code After: class InlineKeyboardButton: def __init__(self, data: dict): self.data = data @staticmethod def create(text: str, url: str = None, callback_data: str = None, switch_inline_query: str = None, switch_inline_query_current_chat: str = None): data = { "text": text } if url is not None: data["url"] = url if callback_data is not None: data["callback_data"] = callback_data if switch_inline_query is not None: data["switch_inline_query"] = switch_inline_query if switch_inline_query_current_chat is not None: data["switch_inline_query_current_chat"] = switch_inline_query_current_chat return InlineKeyboardButton(data) @staticmethod def switch_inline_query(text: str, query: str = "", current_chat: bool = True): switch_inline_query_key = "switch_inline_query_current_chat" if current_chat else "switch_inline_query" return InlineKeyboardButton({ "text": text, switch_inline_query_key: query })
class InlineKeyboardButton: def __init__(self, data: dict): self.data = data + + @staticmethod + def create(text: str, + url: str = None, + callback_data: str = None, + switch_inline_query: str = None, + switch_inline_query_current_chat: str = None): + data = { + "text": text + } + if url is not None: + data["url"] = url + if callback_data is not None: + data["callback_data"] = callback_data + if switch_inline_query is not None: + data["switch_inline_query"] = switch_inline_query + if switch_inline_query_current_chat is not None: + data["switch_inline_query_current_chat"] = switch_inline_query_current_chat + return InlineKeyboardButton(data) @staticmethod def switch_inline_query(text: str, query: str = "", current_chat: bool = True): switch_inline_query_key = "switch_inline_query_current_chat" if current_chat else "switch_inline_query" return InlineKeyboardButton({ "text": text, switch_inline_query_key: query })
19
1.727273
19
0
14263550bed541fce2ab4f01a3e389872b82f58d
pan-domain-auth-verification/src/main/scala/com/gu/pandomainauth/package.scala
pan-domain-auth-verification/src/main/scala/com/gu/pandomainauth/package.scala
package com.gu package object pandomainauth { case class PublicKey(key: String) case class PrivateKey(key: String) case class Secret(secret: String) }
package com.gu package object pandomainauth { case class PublicKey(key: String) extends AnyVal case class PrivateKey(key: String) extends AnyVal case class Secret(secret: String) extends AnyVal }
Use AnyVal to automatically unwrap at compile time
Use AnyVal to automatically unwrap at compile time
Scala
apache-2.0
guardian/pan-domain-authentication,guardian/pan-domain-authentication,guardian/pan-domain-authentication,guardian/pan-domain-authentication
scala
## Code Before: package com.gu package object pandomainauth { case class PublicKey(key: String) case class PrivateKey(key: String) case class Secret(secret: String) } ## Instruction: Use AnyVal to automatically unwrap at compile time ## Code After: package com.gu package object pandomainauth { case class PublicKey(key: String) extends AnyVal case class PrivateKey(key: String) extends AnyVal case class Secret(secret: String) extends AnyVal }
package com.gu package object pandomainauth { - case class PublicKey(key: String) + case class PublicKey(key: String) extends AnyVal ? +++++++++++++++ - case class PrivateKey(key: String) + case class PrivateKey(key: String) extends AnyVal ? +++++++++++++++ - case class Secret(secret: String) + case class Secret(secret: String) extends AnyVal ? +++++++++++++++ }
6
0.857143
3
3
8509033597fcc3b9774d304bcff82f1cad107183
src/MartaBernach/MusicStore/FrontendBundle/Resources/views/Main/album.html.twig
src/MartaBernach/MusicStore/FrontendBundle/Resources/views/Main/album.html.twig
{% extends 'MartaBernachMusicStoreFrontendBundle:Main:index.html.twig' %} {% block content %} <h2>{{ album.band }} - {{ album.name }}</h2> <ul class="list-group"> <li class="list-group-item"> <b>Rok wydania:</b> {{ album.releaseDate|date("Y") }} </li> {% if album.genres is not empty %} <li class="list-group-item"> <h4>Gatunki:</h4> <ul class="list-group"> {% for genre in album.genres %} <li class="list-group-item"> {{ genre }} </li> {% endfor %} </ul> </li> {% endif %} {% if album.tracks is not empty %} <li class="list-group-item"> <h4>Piosenki:</h4> <ul class="list-group"> {% for track in album.tracks %} <li class="list-group-item"> {{ track.rank }}. {{ track.name }} <span class="badge">{{ track.duration|date("i:s") }}</span> </li> {% endfor %} </ul> </li> {% endif %} <li class="list-group-item"> <h4>Opis:</h4> {{ album.summary }} </li> </ul> {% endblock %}
{% extends 'MartaBernachMusicStoreFrontendBundle:Main:index.html.twig' %} {% block content %} <h2><a href="{{ path('front_band', {'slug': album.band.slug}) }}">{{ album.band.name }}</a> - {{ album.name }}</h2> <ul class="list-group"> <li class="list-group-item"> <b>Rok wydania:</b> {{ album.releaseDate|date("Y") }} </li> {% if album.genres is not empty %} <li class="list-group-item"> <h4>Gatunki:</h4> <ul class="list-group"> {% for genre in album.genres %} <li class="list-group-item"> {{ genre }} </li> {% endfor %} </ul> </li> {% endif %} {% if album.tracks is not empty %} <li class="list-group-item"> <h4>Piosenki:</h4> <ul class="list-group"> {% for track in album.tracks %} <li class="list-group-item"> {{ track.rank }}. {{ track.name }} <span class="badge">{{ track.duration|date("i:s") }}</span> </li> {% endfor %} </ul> </li> {% endif %} <li class="list-group-item"> <h4>Opis:</h4> {{ album.summary }} </li> </ul> {% endblock %}
Add link to band on album page
Add link to band on album page
Twig
mit
karminowa/martas-music-store,karminowa/martas-music-store
twig
## Code Before: {% extends 'MartaBernachMusicStoreFrontendBundle:Main:index.html.twig' %} {% block content %} <h2>{{ album.band }} - {{ album.name }}</h2> <ul class="list-group"> <li class="list-group-item"> <b>Rok wydania:</b> {{ album.releaseDate|date("Y") }} </li> {% if album.genres is not empty %} <li class="list-group-item"> <h4>Gatunki:</h4> <ul class="list-group"> {% for genre in album.genres %} <li class="list-group-item"> {{ genre }} </li> {% endfor %} </ul> </li> {% endif %} {% if album.tracks is not empty %} <li class="list-group-item"> <h4>Piosenki:</h4> <ul class="list-group"> {% for track in album.tracks %} <li class="list-group-item"> {{ track.rank }}. {{ track.name }} <span class="badge">{{ track.duration|date("i:s") }}</span> </li> {% endfor %} </ul> </li> {% endif %} <li class="list-group-item"> <h4>Opis:</h4> {{ album.summary }} </li> </ul> {% endblock %} ## Instruction: Add link to band on album page ## Code After: {% extends 'MartaBernachMusicStoreFrontendBundle:Main:index.html.twig' %} {% block content %} <h2><a href="{{ path('front_band', {'slug': album.band.slug}) }}">{{ album.band.name }}</a> - {{ album.name }}</h2> <ul class="list-group"> <li class="list-group-item"> <b>Rok wydania:</b> {{ album.releaseDate|date("Y") }} </li> {% if album.genres is not empty %} <li class="list-group-item"> <h4>Gatunki:</h4> <ul class="list-group"> {% for genre in album.genres %} <li class="list-group-item"> {{ genre }} </li> {% endfor %} </ul> </li> {% endif %} {% if album.tracks is not empty %} <li class="list-group-item"> <h4>Piosenki:</h4> <ul class="list-group"> {% for track in album.tracks %} <li class="list-group-item"> {{ track.rank }}. {{ track.name }} <span class="badge">{{ track.duration|date("i:s") }}</span> </li> {% endfor %} </ul> </li> {% endif %} <li class="list-group-item"> <h4>Opis:</h4> {{ album.summary }} </li> </ul> {% endblock %}
{% extends 'MartaBernachMusicStoreFrontendBundle:Main:index.html.twig' %} {% block content %} - <h2>{{ album.band }} - {{ album.name }}</h2> + <h2><a href="{{ path('front_band', {'slug': album.band.slug}) }}">{{ album.band.name }}</a> - {{ album.name }}</h2> <ul class="list-group"> <li class="list-group-item"> <b>Rok wydania:</b> {{ album.releaseDate|date("Y") }} </li> {% if album.genres is not empty %} <li class="list-group-item"> <h4>Gatunki:</h4> <ul class="list-group"> {% for genre in album.genres %} <li class="list-group-item"> {{ genre }} </li> {% endfor %} </ul> </li> {% endif %} {% if album.tracks is not empty %} <li class="list-group-item"> <h4>Piosenki:</h4> <ul class="list-group"> {% for track in album.tracks %} <li class="list-group-item"> {{ track.rank }}. {{ track.name }} <span class="badge">{{ track.duration|date("i:s") }}</span> </li> {% endfor %} </ul> </li> {% endif %} <li class="list-group-item"> <h4>Opis:</h4> {{ album.summary }} </li> </ul> {% endblock %}
2
0.052632
1
1
f71689b0b26748eb4f9f2719b70c7096995224ad
src/Listabierta/Bundle/MunicipalesBundle/Resources/views/Mail/candidacy_vote_address.html.twig
src/Listabierta/Bundle/MunicipalesBundle/Resources/views/Mail/candidacy_vote_address.html.twig
Hola <b>{{ name }},<br /> <br /> Puedes proporcionar este enlace público de votacion a los votantes para que procedan rellenando el formulario que les aparecerá:<br /><br /> <br /> <a href="http://municipales2015.listabierta.org/{{ address_slug }}/vota">http://municipales2015.listabierta.org/{{ address_slug }}/vota</a> <br />
{{ 'mail.candidacy_vote_address.hello'|trans }} <b>{{ name }}</b>,<br /> <br /> {{ 'mail.candidacy_vote_address.can_public'|trans }}:<br /><br /> <br /> <a href="{{ path('town_candidacy_vote_step1', { 'address' : address_slug }) }}" title="{{ 'town.step1.header'|trans }}">{{ path('town_candidacy_vote_step1', { 'address' : address_slug }) }}</a> <br />
Update mail candidacy vote address template
Update mail candidacy vote address template
Twig
agpl-3.0
listabierta/census-ahoraencomun,listabierta/census-ahoraencomun,listabierta/census-ahoraencomun,listabierta/census-ahoraencomun
twig
## Code Before: Hola <b>{{ name }},<br /> <br /> Puedes proporcionar este enlace público de votacion a los votantes para que procedan rellenando el formulario que les aparecerá:<br /><br /> <br /> <a href="http://municipales2015.listabierta.org/{{ address_slug }}/vota">http://municipales2015.listabierta.org/{{ address_slug }}/vota</a> <br /> ## Instruction: Update mail candidacy vote address template ## Code After: {{ 'mail.candidacy_vote_address.hello'|trans }} <b>{{ name }}</b>,<br /> <br /> {{ 'mail.candidacy_vote_address.can_public'|trans }}:<br /><br /> <br /> <a href="{{ path('town_candidacy_vote_step1', { 'address' : address_slug }) }}" title="{{ 'town.step1.header'|trans }}">{{ path('town_candidacy_vote_step1', { 'address' : address_slug }) }}</a> <br />
- Hola <b>{{ name }},<br /> + {{ 'mail.candidacy_vote_address.hello'|trans }} <b>{{ name }}</b>,<br /> <br /> + {{ 'mail.candidacy_vote_address.can_public'|trans }}:<br /><br /> - Puedes proporcionar este enlace público de votacion a los votantes para que procedan - rellenando el formulario que les aparecerá:<br /><br /> <br /> - <a href="http://municipales2015.listabierta.org/{{ address_slug }}/vota">http://municipales2015.listabierta.org/{{ address_slug }}/vota</a> + <a href="{{ path('town_candidacy_vote_step1', { 'address' : address_slug }) }}" title="{{ 'town.step1.header'|trans }}">{{ path('town_candidacy_vote_step1', { 'address' : address_slug }) }}</a> <br />
7
1
3
4
629655bf7e5b665b07822721297655c40bda69c9
lib/ckeditor_tiki/tikistyles.js
lib/ckeditor_tiki/tikistyles.js
/* * $Id$ * (c) Copyright 2002-2016 by authors of the Tiki Wiki CMS Groupware Project * * All Rights Reserved. See copyright.txt for details and a complete list of authors. * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. * * Ckeditor styles definition for Tiki 6 */ CKEDITOR.stylesSet.add('tikistyles', [ {name:'Normal',element:'p'}, {name:'Title Bar',element:'div',attributes:{'class':'titlebar'}}, {name:'Simple Box',element:'div',attributes:{'class':'simplebox'}}, {name:'Code',element:'div',attributes:{'class':'code'}} ]);
/* * $Id$ * (c) Copyright 2002-2016 by authors of the Tiki Wiki CMS Groupware Project * * All Rights Reserved. See copyright.txt for details and a complete list of authors. * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. * * Ckeditor styles definition for Tiki 6 */ /* If your changes here do not make any change in the wysiwyg editor, the reason is, ckeditor stores things in your browser cache. * Good news: most users can see your modifications, it's just you. * During the time when you wish to try changes here, uncomment the following line. You may need to reload a page with an open editor the first time. * Then comment it again because it kills ckeditor performance. */ /* CKEDITOR.timestamp= +new Date; */ CKEDITOR.stylesSet.add('tikistyles', [ {name:'Normal',element:'p'}, {name:'Title Bar',element:'div',attributes:{'class':'titlebar'}}, {name:'Simple Box',element:'div',attributes:{'class':'simplebox'}}, {name:'Code',element:'div',attributes:{'class':'code'}} ]);
Add useful info in source
Add useful info in source git-svn-id: a7fabbc6a7c54ea5c67cbd16bd322330fd10cc35@61378 b456876b-0849-0410-b77d-98878d47e9d5
JavaScript
lgpl-2.1
oregional/tiki,oregional/tiki,oregional/tiki,oregional/tiki,tikiorg/tiki,tikiorg/tiki,tikiorg/tiki,tikiorg/tiki
javascript
## Code Before: /* * $Id$ * (c) Copyright 2002-2016 by authors of the Tiki Wiki CMS Groupware Project * * All Rights Reserved. See copyright.txt for details and a complete list of authors. * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. * * Ckeditor styles definition for Tiki 6 */ CKEDITOR.stylesSet.add('tikistyles', [ {name:'Normal',element:'p'}, {name:'Title Bar',element:'div',attributes:{'class':'titlebar'}}, {name:'Simple Box',element:'div',attributes:{'class':'simplebox'}}, {name:'Code',element:'div',attributes:{'class':'code'}} ]); ## Instruction: Add useful info in source git-svn-id: a7fabbc6a7c54ea5c67cbd16bd322330fd10cc35@61378 b456876b-0849-0410-b77d-98878d47e9d5 ## Code After: /* * $Id$ * (c) Copyright 2002-2016 by authors of the Tiki Wiki CMS Groupware Project * * All Rights Reserved. See copyright.txt for details and a complete list of authors. * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. * * Ckeditor styles definition for Tiki 6 */ /* If your changes here do not make any change in the wysiwyg editor, the reason is, ckeditor stores things in your browser cache. * Good news: most users can see your modifications, it's just you. * During the time when you wish to try changes here, uncomment the following line. You may need to reload a page with an open editor the first time. * Then comment it again because it kills ckeditor performance. */ /* CKEDITOR.timestamp= +new Date; */ CKEDITOR.stylesSet.add('tikistyles', [ {name:'Normal',element:'p'}, {name:'Title Bar',element:'div',attributes:{'class':'titlebar'}}, {name:'Simple Box',element:'div',attributes:{'class':'simplebox'}}, {name:'Code',element:'div',attributes:{'class':'code'}} ]);
/* * $Id$ * (c) Copyright 2002-2016 by authors of the Tiki Wiki CMS Groupware Project * * All Rights Reserved. See copyright.txt for details and a complete list of authors. * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. * * Ckeditor styles definition for Tiki 6 */ + /* If your changes here do not make any change in the wysiwyg editor, the reason is, ckeditor stores things in your browser cache. + * Good news: most users can see your modifications, it's just you. + * During the time when you wish to try changes here, uncomment the following line. You may need to reload a page with an open editor the first time. + * Then comment it again because it kills ckeditor performance. + */ + /* + CKEDITOR.timestamp= +new Date; + */ CKEDITOR.stylesSet.add('tikistyles', [ {name:'Normal',element:'p'}, {name:'Title Bar',element:'div',attributes:{'class':'titlebar'}}, {name:'Simple Box',element:'div',attributes:{'class':'simplebox'}}, {name:'Code',element:'div',attributes:{'class':'code'}} ]);
8
0.421053
8
0
ce8dca20b8c364fa079330d41a0daff6a8842e0c
ir/be/test/mux.c
ir/be/test/mux.c
int f(int a, int b) { return a && b ? 11 : 42; } int x = 2, y = 3; int main(void) { int ret = 23 < f(x,y); printf("%d\n", ret); return ret; }
/*$ -march=pentium3 $*/ int f(int a, int b) { return a && b ? 11 : 42; } int x = 2, y = 3; int main(void) { int ret = 23 < f(x,y); printf("%d\n", ret); return ret; }
Use march=pentium3 to use if-conv
Use march=pentium3 to use if-conv [r21671]
C
lgpl-2.1
davidgiven/libfirm,jonashaag/libfirm,killbug2004/libfirm,killbug2004/libfirm,8l/libfirm,libfirm/libfirm,8l/libfirm,MatzeB/libfirm,8l/libfirm,libfirm/libfirm,MatzeB/libfirm,MatzeB/libfirm,8l/libfirm,davidgiven/libfirm,libfirm/libfirm,killbug2004/libfirm,davidgiven/libfirm,8l/libfirm,jonashaag/libfirm,MatzeB/libfirm,killbug2004/libfirm,8l/libfirm,killbug2004/libfirm,davidgiven/libfirm,jonashaag/libfirm,killbug2004/libfirm,killbug2004/libfirm,jonashaag/libfirm,jonashaag/libfirm,jonashaag/libfirm,MatzeB/libfirm,8l/libfirm,davidgiven/libfirm,davidgiven/libfirm,davidgiven/libfirm,libfirm/libfirm,jonashaag/libfirm,MatzeB/libfirm,libfirm/libfirm,MatzeB/libfirm
c
## Code Before: int f(int a, int b) { return a && b ? 11 : 42; } int x = 2, y = 3; int main(void) { int ret = 23 < f(x,y); printf("%d\n", ret); return ret; } ## Instruction: Use march=pentium3 to use if-conv [r21671] ## Code After: /*$ -march=pentium3 $*/ int f(int a, int b) { return a && b ? 11 : 42; } int x = 2, y = 3; int main(void) { int ret = 23 < f(x,y); printf("%d\n", ret); return ret; }
+ /*$ -march=pentium3 $*/ int f(int a, int b) { return a && b ? 11 : 42; } int x = 2, y = 3; int main(void) { int ret = 23 < f(x,y); printf("%d\n", ret); return ret; }
1
0.083333
1
0
67ced813f639ca0571f3f146668b45617cc989e6
utils/context.js
utils/context.js
'use strict'; var _ = require('lodash'); var path = require('path'); var convert = require(path.resolve(__dirname, './convert.js')); var context = { getDefaults: getDefaults }; function getDefaults(name, module) { var folderName = convert.moduleToFolder(module); return _.clone({ module: module, camelName: _.camelCase(name), controller: _.upperFirst(_.camelCase(name)) + 'Controller', directive: _.camelCase(name), directiveUrl: folderName + _.kebabCase(name) + '.directive.html', kebabName: _.kebabCase(name), moduleClass: _.kebabCase(module), route: _.camelCase(name) + 'Route', service: _.camelCase(name) + 'Service', state: module.replace('app.modules.', ''), templateUrl: folderName + _.kebabCase(name) + '.html' }); } module.exports = context;
'use strict'; var _ = require('lodash'); var path = require('path'); var convert = require(path.resolve(__dirname, './convert.js')); var context = { getDefaults: getDefaults }; function getDefaults(name, module) { var folderName = convert.moduleToFolder(module); return _.clone({ module: module, camelName: _.camelCase(name), controller: _getController(name, module), directive: _.camelCase(name), directiveUrl: folderName + _.kebabCase(name) + '.directive.html', kebabName: _.kebabCase(name), moduleClass: _.kebabCase(module), route: _.camelCase(name) + 'Route', service: _.camelCase(name) + 'Service', state: module.replace('app.modules.', ''), templateUrl: folderName + _.kebabCase(name) + '.html' }); } function _getController(name, module) { module = module.replace(/app\..*?\./, ''); return _.upperFirst(_.camelCase(module)) + 'Controller'; } module.exports = context;
Set <controller> name scoped by modules 'namespace'
Set <controller> name scoped by modules 'namespace'
JavaScript
mit
sysgarage/generator-sys-angular,sysgarage/generator-sys-angular
javascript
## Code Before: 'use strict'; var _ = require('lodash'); var path = require('path'); var convert = require(path.resolve(__dirname, './convert.js')); var context = { getDefaults: getDefaults }; function getDefaults(name, module) { var folderName = convert.moduleToFolder(module); return _.clone({ module: module, camelName: _.camelCase(name), controller: _.upperFirst(_.camelCase(name)) + 'Controller', directive: _.camelCase(name), directiveUrl: folderName + _.kebabCase(name) + '.directive.html', kebabName: _.kebabCase(name), moduleClass: _.kebabCase(module), route: _.camelCase(name) + 'Route', service: _.camelCase(name) + 'Service', state: module.replace('app.modules.', ''), templateUrl: folderName + _.kebabCase(name) + '.html' }); } module.exports = context; ## Instruction: Set <controller> name scoped by modules 'namespace' ## Code After: 'use strict'; var _ = require('lodash'); var path = require('path'); var convert = require(path.resolve(__dirname, './convert.js')); var context = { getDefaults: getDefaults }; function getDefaults(name, module) { var folderName = convert.moduleToFolder(module); return _.clone({ module: module, camelName: _.camelCase(name), controller: _getController(name, module), directive: _.camelCase(name), directiveUrl: folderName + _.kebabCase(name) + '.directive.html', kebabName: _.kebabCase(name), moduleClass: _.kebabCase(module), route: _.camelCase(name) + 'Route', service: _.camelCase(name) + 'Service', state: module.replace('app.modules.', ''), templateUrl: folderName + _.kebabCase(name) + '.html' }); } function _getController(name, module) { module = module.replace(/app\..*?\./, ''); return _.upperFirst(_.camelCase(module)) + 'Controller'; } module.exports = context;
'use strict'; var _ = require('lodash'); var path = require('path'); var convert = require(path.resolve(__dirname, './convert.js')); var context = { getDefaults: getDefaults }; function getDefaults(name, module) { var folderName = convert.moduleToFolder(module); return _.clone({ module: module, camelName: _.camelCase(name), - controller: _.upperFirst(_.camelCase(name)) + 'Controller', + controller: _getController(name, module), directive: _.camelCase(name), directiveUrl: folderName + _.kebabCase(name) + '.directive.html', kebabName: _.kebabCase(name), moduleClass: _.kebabCase(module), route: _.camelCase(name) + 'Route', service: _.camelCase(name) + 'Service', state: module.replace('app.modules.', ''), templateUrl: folderName + _.kebabCase(name) + '.html' }); } + function _getController(name, module) { + module = module.replace(/app\..*?\./, ''); + return _.upperFirst(_.camelCase(module)) + 'Controller'; + } + module.exports = context;
7
0.259259
6
1
5a1a1b4cd67215ea9cd07fdad7715d4ce34c1316
test/Role/Events/AbstractEventTest.php
test/Role/Events/AbstractEventTest.php
<?php namespace CultuurNet\UDB3\Role\Events; use PHPUnit\Framework\TestCase; use ValueObjects\Identity\UUID; class AbstractEventTest extends TestCase { /** * @var UUID */ protected $uuid; /** * @var AbstractEvent */ protected $event; protected function setUp() { $this->uuid = new UUID(); $this->event = $this->getMockForAbstractClass( AbstractEvent::class, [$this->uuid] ); } /** * @test */ public function it_stores_a_uuid() { $this->assertEquals($this->uuid, $this->event->getUuid()); } /** * @test */ public function it_can_serialize() { $actualArray = $this->event->serialize(); $expectedArray = ['uuid' => $this->uuid->toNative()]; $this->assertEquals($expectedArray, $actualArray); } /** * @test */ public function it_can_deserialize() { $data = ['uuid' => $this->uuid->toNative()]; $actualEvent = $this->event->deserialize($data); $expectedEvent = $this->event; $this->assertEquals($actualEvent, $expectedEvent); } }
<?php namespace CultuurNet\UDB3\Role\Events; use PHPUnit\Framework\TestCase; use ValueObjects\Identity\UUID; class AbstractEventTest extends TestCase { /** * @var UUID */ protected $uuid; /** * @var AbstractEvent */ protected $event; protected function setUp() { $this->uuid = new UUID(); $this->event = $this->getMockForAbstractClass( AbstractEvent::class, [$this->uuid] ); } /** * @test */ public function it_stores_a_uuid() { $this->assertEquals($this->uuid, $this->event->getUuid()); } /** * @test */ public function it_can_serialize() { $actualArray = $this->event->serialize(); $expectedArray = ['uuid' => $this->uuid->toNative()]; $this->assertEquals($expectedArray, $actualArray); } }
Fix test broken by removed deserialize() method
Fix test broken by removed deserialize() method
PHP
apache-2.0
cultuurnet/udb3-php
php
## Code Before: <?php namespace CultuurNet\UDB3\Role\Events; use PHPUnit\Framework\TestCase; use ValueObjects\Identity\UUID; class AbstractEventTest extends TestCase { /** * @var UUID */ protected $uuid; /** * @var AbstractEvent */ protected $event; protected function setUp() { $this->uuid = new UUID(); $this->event = $this->getMockForAbstractClass( AbstractEvent::class, [$this->uuid] ); } /** * @test */ public function it_stores_a_uuid() { $this->assertEquals($this->uuid, $this->event->getUuid()); } /** * @test */ public function it_can_serialize() { $actualArray = $this->event->serialize(); $expectedArray = ['uuid' => $this->uuid->toNative()]; $this->assertEquals($expectedArray, $actualArray); } /** * @test */ public function it_can_deserialize() { $data = ['uuid' => $this->uuid->toNative()]; $actualEvent = $this->event->deserialize($data); $expectedEvent = $this->event; $this->assertEquals($actualEvent, $expectedEvent); } } ## Instruction: Fix test broken by removed deserialize() method ## Code After: <?php namespace CultuurNet\UDB3\Role\Events; use PHPUnit\Framework\TestCase; use ValueObjects\Identity\UUID; class AbstractEventTest extends TestCase { /** * @var UUID */ protected $uuid; /** * @var AbstractEvent */ protected $event; protected function setUp() { $this->uuid = new UUID(); $this->event = $this->getMockForAbstractClass( AbstractEvent::class, [$this->uuid] ); } /** * @test */ public function it_stores_a_uuid() { $this->assertEquals($this->uuid, $this->event->getUuid()); } /** * @test */ public function it_can_serialize() { $actualArray = $this->event->serialize(); $expectedArray = ['uuid' => $this->uuid->toNative()]; $this->assertEquals($expectedArray, $actualArray); } }
<?php namespace CultuurNet\UDB3\Role\Events; use PHPUnit\Framework\TestCase; use ValueObjects\Identity\UUID; class AbstractEventTest extends TestCase { /** * @var UUID */ protected $uuid; /** * @var AbstractEvent */ protected $event; protected function setUp() { $this->uuid = new UUID(); $this->event = $this->getMockForAbstractClass( AbstractEvent::class, [$this->uuid] ); } /** * @test */ public function it_stores_a_uuid() { $this->assertEquals($this->uuid, $this->event->getUuid()); } /** * @test */ public function it_can_serialize() { $actualArray = $this->event->serialize(); $expectedArray = ['uuid' => $this->uuid->toNative()]; $this->assertEquals($expectedArray, $actualArray); } - - /** - * @test - */ - public function it_can_deserialize() - { - $data = ['uuid' => $this->uuid->toNative()]; - $actualEvent = $this->event->deserialize($data); - $expectedEvent = $this->event; - - $this->assertEquals($actualEvent, $expectedEvent); - } }
12
0.196721
0
12
b9731cd09b2f2b77f74e5106962814f758965138
.github/workflows/maven.yml
.github/workflows/maven.yml
name: CI with Maven on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: runs-on: ${{ matrix.os }} # Steps represent a sequence of tasks that will be executed as part of the job strategy: fail-fast: false matrix: # test against latest update of each major Java version, as well as specific updates of LTS versions: os: [ubuntu-16.04, windows-latest] java: [ 8, 11 ] WLP_VERSION: [ 20.0.0.3, 20.0.0.6 ] steps: - name: Setup Java ${{ matrix.java }} uses: joschi/setup-jdk@v2 with: java-version: ${{ matrix.java }} - name: Checkout ci.ant uses: actions/checkout@v2 - name: Run tests with maven run: mvn verify -Ponline-its -Dinvoker.streamLogs=true -DwlpVersion=$WLP_VERSION -DwlpLicense=$WLP_LICENSE -e
name: CI with Maven on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: runs-on: ${{ matrix.os }} # Steps represent a sequence of tasks that will be executed as part of the job strategy: fail-fast: false matrix: # test against latest update of each major Java version, as well as specific updates of LTS versions: os: [ubuntu-16.04, windows-latest] java: [ 8, 11 ] include: - WLP_VERSION: 20.0.0_03 WLP_LICENSE: L-CTUR-BLWMST - WLP_VERSION: 20.0.0_06 WLP_LICENSE: L-CTUR-BPKJTD steps: - name: Setup Java ${{ matrix.java }} uses: joschi/setup-jdk@v2 with: java-version: ${{ matrix.java }} - name: Checkout ci.ant uses: actions/checkout@v2 - name: Run tests with maven run: mvn verify -Ponline-its -D"invoker.streamLogs"=true -DwlpVersion="${{ matrix.WLP_VERSION }}" -DwlpLicense="${{ matrix.WLP_LICENSE }}" -e
Add WLP licenses and update run command with env vars.
Add WLP licenses and update run command with env vars.
YAML
apache-2.0
WASdev/ci.ant
yaml
## Code Before: name: CI with Maven on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: runs-on: ${{ matrix.os }} # Steps represent a sequence of tasks that will be executed as part of the job strategy: fail-fast: false matrix: # test against latest update of each major Java version, as well as specific updates of LTS versions: os: [ubuntu-16.04, windows-latest] java: [ 8, 11 ] WLP_VERSION: [ 20.0.0.3, 20.0.0.6 ] steps: - name: Setup Java ${{ matrix.java }} uses: joschi/setup-jdk@v2 with: java-version: ${{ matrix.java }} - name: Checkout ci.ant uses: actions/checkout@v2 - name: Run tests with maven run: mvn verify -Ponline-its -Dinvoker.streamLogs=true -DwlpVersion=$WLP_VERSION -DwlpLicense=$WLP_LICENSE -e ## Instruction: Add WLP licenses and update run command with env vars. ## Code After: name: CI with Maven on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: runs-on: ${{ matrix.os }} # Steps represent a sequence of tasks that will be executed as part of the job strategy: fail-fast: false matrix: # test against latest update of each major Java version, as well as specific updates of LTS versions: os: [ubuntu-16.04, windows-latest] java: [ 8, 11 ] include: - WLP_VERSION: 20.0.0_03 WLP_LICENSE: L-CTUR-BLWMST - WLP_VERSION: 20.0.0_06 WLP_LICENSE: L-CTUR-BPKJTD steps: - name: Setup Java ${{ matrix.java }} uses: joschi/setup-jdk@v2 with: java-version: ${{ matrix.java }} - name: Checkout ci.ant uses: actions/checkout@v2 - name: Run tests with maven run: mvn verify -Ponline-its -D"invoker.streamLogs"=true -DwlpVersion="${{ matrix.WLP_VERSION }}" -DwlpLicense="${{ matrix.WLP_LICENSE }}" -e
name: CI with Maven on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: runs-on: ${{ matrix.os }} # Steps represent a sequence of tasks that will be executed as part of the job strategy: fail-fast: false matrix: # test against latest update of each major Java version, as well as specific updates of LTS versions: os: [ubuntu-16.04, windows-latest] java: [ 8, 11 ] + include: + - WLP_VERSION: 20.0.0_03 + WLP_LICENSE: L-CTUR-BLWMST - WLP_VERSION: [ 20.0.0.3, 20.0.0.6 ] ? -- ^^^^^ ----- -- + - WLP_VERSION: 20.0.0_06 ? ++++ ^ + WLP_LICENSE: L-CTUR-BPKJTD steps: - name: Setup Java ${{ matrix.java }} uses: joschi/setup-jdk@v2 with: java-version: ${{ matrix.java }} - name: Checkout ci.ant uses: actions/checkout@v2 - name: Run tests with maven - run: mvn verify -Ponline-its -Dinvoker.streamLogs=true -DwlpVersion=$WLP_VERSION -DwlpLicense=$WLP_LICENSE -e + run: mvn verify -Ponline-its -D"invoker.streamLogs"=true -DwlpVersion="${{ matrix.WLP_VERSION }}" -DwlpLicense="${{ matrix.WLP_LICENSE }}" -e ? + + + ++++++++++ ++++ + ++++++++++ ++++
8
0.258065
6
2
ecccfceb60dcd628eb026966dba1e912bd4b74e8
src/main/resources/springrtsru/pages/BaseContentPage.html
src/main/resources/springrtsru/pages/BaseContentPage.html
<?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml" lang="ru" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd"> <body> <wicket:extend> <!--<div class="container">--> <!--<div class="base-contents">--> <wicket:child/> <!--</div>--> <!--</div>--> </wicket:extend> </body> </html>
<?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml" lang="ru" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd"> <body> <wicket:extend> <div class="container-fluid"> <div class="row"> <wicket:child/> </div> </div> </wicket:extend> </body> </html>
Use fluid container (fit to full screen)
Use fluid container (fit to full screen)
HTML
unlicense
spring-rts-ru/springrts-ru-website,Eltario/springrts-ru-website,Eltario/springrts-ru-website,spring-rts-ru/springrts-ru-website
html
## Code Before: <?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml" lang="ru" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd"> <body> <wicket:extend> <!--<div class="container">--> <!--<div class="base-contents">--> <wicket:child/> <!--</div>--> <!--</div>--> </wicket:extend> </body> </html> ## Instruction: Use fluid container (fit to full screen) ## Code After: <?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml" lang="ru" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd"> <body> <wicket:extend> <div class="container-fluid"> <div class="row"> <wicket:child/> </div> </div> </wicket:extend> </body> </html>
<?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml" lang="ru" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd"> <body> <wicket:extend> - <!--<div class="container">--> ? ---- --- + <div class="container-fluid"> ? ++++++ - <!--<div class="base-contents">--> + <div class="row"> <wicket:child/> - <!--</div>--> ? ---- --- + </div> - <!--</div>--> + </div> </wicket:extend> </body> </html>
8
0.571429
4
4
478d731771bf7889d944ccc175fec0bdadaed57e
includes/ThanksLogFormatter.php
includes/ThanksLogFormatter.php
<?php /** * This class formats log entries for thanks */ class ThanksLogFormatter extends LogFormatter { /** * @inheritDoc * @suppress SecurityCheck-DoubleEscaped Problem with makeUserLink, see T201565 */ protected function getMessageParameters() { $params = parent::getMessageParameters(); // Convert target from a pageLink to a userLink since the target is // actually a user, not a page. $recipient = User::newFromName( $this->entry->getTarget()->getText(), false ); $params[2] = Message::rawParam( $this->makeUserLink( $recipient ) ); $params[3] = $recipient->getName(); return $params; } public function getPreloadTitles() { // Add the recipient's user talk page to LinkBatch return [ Title::makeTitle( NS_USER_TALK, $this->entry->getTarget()->getText() ) ]; } }
<?php /** * This class formats log entries for thanks */ class ThanksLogFormatter extends LogFormatter { /** * @inheritDoc */ protected function getMessageParameters() { $params = parent::getMessageParameters(); // Convert target from a pageLink to a userLink since the target is // actually a user, not a page. $recipient = User::newFromName( $this->entry->getTarget()->getText(), false ); $params[2] = Message::rawParam( $this->makeUserLink( $recipient ) ); $params[3] = $recipient->getName(); return $params; } public function getPreloadTitles() { // Add the recipient's user talk page to LinkBatch return [ Title::makeTitle( NS_USER_TALK, $this->entry->getTarget()->getText() ) ]; } }
Remove unneccessary @suppress after phan-taint-check-plugin upgrade
Remove unneccessary @suppress after phan-taint-check-plugin upgrade Bug: T201565 Change-Id: Ib35e55e5bebbb7dc6ca8ef4f08b519ec2065037b
PHP
mit
wikimedia/mediawiki-extensions-Thanks,wikimedia/mediawiki-extensions-Thanks,wikimedia/mediawiki-extensions-Thanks
php
## Code Before: <?php /** * This class formats log entries for thanks */ class ThanksLogFormatter extends LogFormatter { /** * @inheritDoc * @suppress SecurityCheck-DoubleEscaped Problem with makeUserLink, see T201565 */ protected function getMessageParameters() { $params = parent::getMessageParameters(); // Convert target from a pageLink to a userLink since the target is // actually a user, not a page. $recipient = User::newFromName( $this->entry->getTarget()->getText(), false ); $params[2] = Message::rawParam( $this->makeUserLink( $recipient ) ); $params[3] = $recipient->getName(); return $params; } public function getPreloadTitles() { // Add the recipient's user talk page to LinkBatch return [ Title::makeTitle( NS_USER_TALK, $this->entry->getTarget()->getText() ) ]; } } ## Instruction: Remove unneccessary @suppress after phan-taint-check-plugin upgrade Bug: T201565 Change-Id: Ib35e55e5bebbb7dc6ca8ef4f08b519ec2065037b ## Code After: <?php /** * This class formats log entries for thanks */ class ThanksLogFormatter extends LogFormatter { /** * @inheritDoc */ protected function getMessageParameters() { $params = parent::getMessageParameters(); // Convert target from a pageLink to a userLink since the target is // actually a user, not a page. $recipient = User::newFromName( $this->entry->getTarget()->getText(), false ); $params[2] = Message::rawParam( $this->makeUserLink( $recipient ) ); $params[3] = $recipient->getName(); return $params; } public function getPreloadTitles() { // Add the recipient's user talk page to LinkBatch return [ Title::makeTitle( NS_USER_TALK, $this->entry->getTarget()->getText() ) ]; } }
<?php /** * This class formats log entries for thanks */ class ThanksLogFormatter extends LogFormatter { /** * @inheritDoc - * @suppress SecurityCheck-DoubleEscaped Problem with makeUserLink, see T201565 */ protected function getMessageParameters() { $params = parent::getMessageParameters(); // Convert target from a pageLink to a userLink since the target is // actually a user, not a page. $recipient = User::newFromName( $this->entry->getTarget()->getText(), false ); $params[2] = Message::rawParam( $this->makeUserLink( $recipient ) ); $params[3] = $recipient->getName(); return $params; } public function getPreloadTitles() { // Add the recipient's user talk page to LinkBatch return [ Title::makeTitle( NS_USER_TALK, $this->entry->getTarget()->getText() ) ]; } }
1
0.041667
0
1
6b1b7be26b5b721424e8d2f23e51903e31d6d6ed
phpunit_browser/README.md
phpunit_browser/README.md
Run PHPUnit in Browser ====================== **Purpose**<br /> Run PHPUnit in browser **Example**<br /> 1. Clone this project into your <webroot>/test. 2. Type the following in your browser: http://localhost/test/phpunit_browser.php 3. The script will load PersonTest.php (which uses Person.php) 4. You should see the following output (or similar) in your browser: ``` PHPUnit 3.7.10 by Sebastian Bergmann. . Time: 0 seconds, Memory: 3.00Mb OK (1 test, 1 assertion) ```
Run PHPUnit in Browser ====================== **Purpose**<br /> Run PHPUnit in browser **Example**<br /> 1. Clone this project into your <webroot>/test. 2. Type the following in your browser: http://localhost/test/phpunit_browser.php 3. The script will load PersonTest.php (which uses Person.php) 4. You should see the following output (or similar) in your browser: ``` PHPUnit 3.7.10 by Sebastian Bergmann. Configuration read from D:\localhost\www\test\phpunit.xml . Time: 0 seconds, Memory: 3.00Mb OK (1 test, 1 assertion) ```
Add output on config file
Add output on config file
Markdown
bsd-2-clause
zionsg/standalone-php-scripts,zionsg/standalone-php-scripts
markdown
## Code Before: Run PHPUnit in Browser ====================== **Purpose**<br /> Run PHPUnit in browser **Example**<br /> 1. Clone this project into your <webroot>/test. 2. Type the following in your browser: http://localhost/test/phpunit_browser.php 3. The script will load PersonTest.php (which uses Person.php) 4. You should see the following output (or similar) in your browser: ``` PHPUnit 3.7.10 by Sebastian Bergmann. . Time: 0 seconds, Memory: 3.00Mb OK (1 test, 1 assertion) ``` ## Instruction: Add output on config file ## Code After: Run PHPUnit in Browser ====================== **Purpose**<br /> Run PHPUnit in browser **Example**<br /> 1. Clone this project into your <webroot>/test. 2. Type the following in your browser: http://localhost/test/phpunit_browser.php 3. The script will load PersonTest.php (which uses Person.php) 4. You should see the following output (or similar) in your browser: ``` PHPUnit 3.7.10 by Sebastian Bergmann. Configuration read from D:\localhost\www\test\phpunit.xml . Time: 0 seconds, Memory: 3.00Mb OK (1 test, 1 assertion) ```
Run PHPUnit in Browser ====================== **Purpose**<br /> Run PHPUnit in browser **Example**<br /> 1. Clone this project into your <webroot>/test. 2. Type the following in your browser: http://localhost/test/phpunit_browser.php 3. The script will load PersonTest.php (which uses Person.php) 4. You should see the following output (or similar) in your browser: ``` - PHPUnit 3.7.10 by Sebastian Bergmann. ? -- + PHPUnit 3.7.10 by Sebastian Bergmann. + + Configuration read from D:\localhost\www\test\phpunit.xml . Time: 0 seconds, Memory: 3.00Mb OK (1 test, 1 assertion) ```
4
0.181818
3
1
3bec6113fc517d44585f63ae567939637f1b5dc4
lib/peek/views/faraday.rb
lib/peek/views/faraday.rb
require 'atomic' module Peek module Views class Faraday < View def initialize(options = {}) @duration = Atomic.new(0) @calls = Atomic.new(0) @requests = Atomic.new([].freeze) setup_subscribers end def formatted_duration ms = @duration.value * 1000 if ms >= 1000 "%.2fms" % ms else "%.0fms" % ms end end def results { :duration => formatted_duration, :calls => @calls.value } end private def setup_subscribers # Reset each counter when a new request starts before_request do @duration.value = 0 @calls.value = 0 @requests.value = [].freeze end subscribe(/request.faraday/) do |name, start, finish, id, payload| duration = (finish - start) @duration.update { |value| value + duration } @calls.update { |value| value + 1 } @requests.update { |value| (value + [{:method => env[:method].to_s.upcase, :path => env[:url].to_s, :duration => '%.2f' % duration, :callstack => clean_backtrace}]).freeze } end end end end end
require 'atomic' module Peek module Views class Faraday < View def initialize(options = {}) @duration = Atomic.new(0) @calls = Atomic.new(0) @requests = Atomic.new([].freeze) setup_subscribers end def formatted_duration ms = @duration.value * 1000 if ms >= 1000 "%.2fms" % ms else "%.0fms" % ms end end def results { :duration => formatted_duration, :calls => @calls.value, :requests => @requests.value } end private def setup_subscribers # Reset each counter when a new request starts before_request do @duration.value = 0 @calls.value = 0 @requests.value = [].freeze end subscribe(/request.faraday/) do |name, start, finish, id, payload| duration = (finish - start) @duration.update { |value| value + duration } @calls.update { |value| value + 1 } @requests.update { |value| (value + [{:method => env[:method].to_s.upcase, :path => env[:url].to_s, :duration => '%.2f' % duration, :callstack => clean_backtrace}]).freeze } end end end end end
Include request data in the results.
Include request data in the results.
Ruby
mit
grk/peek-faraday
ruby
## Code Before: require 'atomic' module Peek module Views class Faraday < View def initialize(options = {}) @duration = Atomic.new(0) @calls = Atomic.new(0) @requests = Atomic.new([].freeze) setup_subscribers end def formatted_duration ms = @duration.value * 1000 if ms >= 1000 "%.2fms" % ms else "%.0fms" % ms end end def results { :duration => formatted_duration, :calls => @calls.value } end private def setup_subscribers # Reset each counter when a new request starts before_request do @duration.value = 0 @calls.value = 0 @requests.value = [].freeze end subscribe(/request.faraday/) do |name, start, finish, id, payload| duration = (finish - start) @duration.update { |value| value + duration } @calls.update { |value| value + 1 } @requests.update { |value| (value + [{:method => env[:method].to_s.upcase, :path => env[:url].to_s, :duration => '%.2f' % duration, :callstack => clean_backtrace}]).freeze } end end end end end ## Instruction: Include request data in the results. ## Code After: require 'atomic' module Peek module Views class Faraday < View def initialize(options = {}) @duration = Atomic.new(0) @calls = Atomic.new(0) @requests = Atomic.new([].freeze) setup_subscribers end def formatted_duration ms = @duration.value * 1000 if ms >= 1000 "%.2fms" % ms else "%.0fms" % ms end end def results { :duration => formatted_duration, :calls => @calls.value, :requests => @requests.value } end private def setup_subscribers # Reset each counter when a new request starts before_request do @duration.value = 0 @calls.value = 0 @requests.value = [].freeze end subscribe(/request.faraday/) do |name, start, finish, id, payload| duration = (finish - start) @duration.update { |value| value + duration } @calls.update { |value| value + 1 } @requests.update { |value| (value + [{:method => env[:method].to_s.upcase, :path => env[:url].to_s, :duration => '%.2f' % duration, :callstack => clean_backtrace}]).freeze } end end end end end
require 'atomic' module Peek module Views class Faraday < View def initialize(options = {}) @duration = Atomic.new(0) @calls = Atomic.new(0) @requests = Atomic.new([].freeze) setup_subscribers end def formatted_duration ms = @duration.value * 1000 if ms >= 1000 "%.2fms" % ms else "%.0fms" % ms end end def results - { :duration => formatted_duration, :calls => @calls.value } + { :duration => formatted_duration, :calls => @calls.value, :requests => @requests.value } ? ++++++++++++++++++++++++++++++ end private def setup_subscribers # Reset each counter when a new request starts before_request do @duration.value = 0 @calls.value = 0 @requests.value = [].freeze end subscribe(/request.faraday/) do |name, start, finish, id, payload| duration = (finish - start) @duration.update { |value| value + duration } @calls.update { |value| value + 1 } @requests.update { |value| (value + [{:method => env[:method].to_s.upcase, :path => env[:url].to_s, :duration => '%.2f' % duration, :callstack => clean_backtrace}]).freeze } end end end end end
2
0.043478
1
1
fc2fc91373a355bd8b1c9d599adff2e02d83c76c
.travis.yml
.travis.yml
language: go sudo: false go: - "1.16" - "1.17" - "1.18" - "tip" before_install: - export PATH=$HOME/gopath/bin:$PATH - go get github.com/mattn/goveralls script: - go test -race ./... - go test -coverprofile=coverage.out -cover ./... - goveralls -coverprofile=coverage.out -service=travis-ci matrix: allow_failures: - go: tip git: depth: 10
language: go sudo: false go: - "1.16" - "1.17" - "1.18" - "tip" before_install: - export PATH=$HOME/gopath/bin:$PATH - go install github.com/mattn/goveralls@latest script: - go test -race ./... - go test -coverprofile=coverage.out -cover ./... - goveralls -coverprofile=coverage.out -service=travis-ci matrix: allow_failures: - go: tip git: depth: 10
Use go install with version suffix
Use go install with version suffix
YAML
mit
oklahomer/go-sarah
yaml
## Code Before: language: go sudo: false go: - "1.16" - "1.17" - "1.18" - "tip" before_install: - export PATH=$HOME/gopath/bin:$PATH - go get github.com/mattn/goveralls script: - go test -race ./... - go test -coverprofile=coverage.out -cover ./... - goveralls -coverprofile=coverage.out -service=travis-ci matrix: allow_failures: - go: tip git: depth: 10 ## Instruction: Use go install with version suffix ## Code After: language: go sudo: false go: - "1.16" - "1.17" - "1.18" - "tip" before_install: - export PATH=$HOME/gopath/bin:$PATH - go install github.com/mattn/goveralls@latest script: - go test -race ./... - go test -coverprofile=coverage.out -cover ./... - goveralls -coverprofile=coverage.out -service=travis-ci matrix: allow_failures: - go: tip git: depth: 10
language: go sudo: false go: - "1.16" - "1.17" - "1.18" - "tip" before_install: - export PATH=$HOME/gopath/bin:$PATH - - go get github.com/mattn/goveralls ? ^^ + - go install github.com/mattn/goveralls@latest ? ^^^ +++ +++++++ script: - go test -race ./... - go test -coverprofile=coverage.out -cover ./... - goveralls -coverprofile=coverage.out -service=travis-ci matrix: allow_failures: - go: tip git: depth: 10
2
0.083333
1
1
cf03026a27f8f7d35430807d2295bf062c4e0ca9
master/skia_master_scripts/android_factory.py
master/skia_master_scripts/android_factory.py
from skia_master_scripts import factory as skia_factory class AndroidFactory(skia_factory.SkiaFactory): """Overrides for Android builds.""" def Build(self, clobber=None): """Build and return the complete BuildFactory. clobber: boolean indicating whether we should clean before building """ if clobber is None: clobber = self._default_clobber if clobber: self._skia_cmd_obj.AddClean() self._skia_cmd_obj.AddRun( run_command='../android/bin/android_make all -d xoom %s' % ( self._make_flags), description='BuildAll') return self._factory
from skia_master_scripts import factory as skia_factory class AndroidFactory(skia_factory.SkiaFactory): """Overrides for Android builds.""" def Build(self, clobber=None): """Build and return the complete BuildFactory. clobber: boolean indicating whether we should clean before building """ if clobber is None: clobber = self._default_clobber if clobber: self._skia_cmd_obj.AddClean() self._skia_cmd_obj.AddRunCommand( command='../android/bin/android_make all -d nexus_s %s' % ( self._make_flags), description='BuildAll') self.PushBinaryToDeviceAndRun(binary_name='tests', description='RunTests') return self._factory def PushBinaryToDeviceAndRun(self, binary_name, description, timeout=None): """Adds a build step: push a binary file to the USB-connected Android device and run it. binary_name: which binary to run on the device description: text description (e.g., 'RunTests') timeout: timeout in seconds, or None to use the default timeout """ path_to_adb = self.TargetPathJoin('..', 'android', 'bin', 'linux', 'adb') command_list = [ '%s root' % path_to_adb, '%s remount' % path_to_adb, '%s push out/%s/%s /system/bin/%s' % ( path_to_adb, self._configuration, binary_name, binary_name), '%s logcat -c' % path_to_adb, '%s shell %s' % (path_to_adb, binary_name), '%s logcat -d' % path_to_adb, ] self._skia_cmd_obj.AddRunCommandList( command_list=command_list, description=description)
Add RunTests step for Android buildbots
Add RunTests step for Android buildbots Requires https://codereview.appspot.com/5966078 ('Add AddRunCommandList(), a cleaner way of running multiple shell commands as a single buildbot step') to work. Review URL: https://codereview.appspot.com/5975072 git-svn-id: 32fc27f4dcfb6c0385cd9719852b95fe6680452d@3594 2bbb7eff-a529-9590-31e7-b0007b416f81
Python
bsd-3-clause
google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot
python
## Code Before: from skia_master_scripts import factory as skia_factory class AndroidFactory(skia_factory.SkiaFactory): """Overrides for Android builds.""" def Build(self, clobber=None): """Build and return the complete BuildFactory. clobber: boolean indicating whether we should clean before building """ if clobber is None: clobber = self._default_clobber if clobber: self._skia_cmd_obj.AddClean() self._skia_cmd_obj.AddRun( run_command='../android/bin/android_make all -d xoom %s' % ( self._make_flags), description='BuildAll') return self._factory ## Instruction: Add RunTests step for Android buildbots Requires https://codereview.appspot.com/5966078 ('Add AddRunCommandList(), a cleaner way of running multiple shell commands as a single buildbot step') to work. Review URL: https://codereview.appspot.com/5975072 git-svn-id: 32fc27f4dcfb6c0385cd9719852b95fe6680452d@3594 2bbb7eff-a529-9590-31e7-b0007b416f81 ## Code After: from skia_master_scripts import factory as skia_factory class AndroidFactory(skia_factory.SkiaFactory): """Overrides for Android builds.""" def Build(self, clobber=None): """Build and return the complete BuildFactory. clobber: boolean indicating whether we should clean before building """ if clobber is None: clobber = self._default_clobber if clobber: self._skia_cmd_obj.AddClean() self._skia_cmd_obj.AddRunCommand( command='../android/bin/android_make all -d nexus_s %s' % ( self._make_flags), description='BuildAll') self.PushBinaryToDeviceAndRun(binary_name='tests', description='RunTests') return self._factory def PushBinaryToDeviceAndRun(self, binary_name, description, timeout=None): """Adds a build step: push a binary file to the USB-connected Android device and run it. binary_name: which binary to run on the device description: text description (e.g., 'RunTests') timeout: timeout in seconds, or None to use the default timeout """ path_to_adb = self.TargetPathJoin('..', 'android', 'bin', 'linux', 'adb') command_list = [ '%s root' % path_to_adb, '%s remount' % path_to_adb, '%s push out/%s/%s /system/bin/%s' % ( path_to_adb, self._configuration, binary_name, binary_name), '%s logcat -c' % path_to_adb, '%s shell %s' % (path_to_adb, binary_name), '%s logcat -d' % path_to_adb, ] self._skia_cmd_obj.AddRunCommandList( command_list=command_list, description=description)
from skia_master_scripts import factory as skia_factory class AndroidFactory(skia_factory.SkiaFactory): """Overrides for Android builds.""" def Build(self, clobber=None): """Build and return the complete BuildFactory. clobber: boolean indicating whether we should clean before building """ if clobber is None: clobber = self._default_clobber if clobber: self._skia_cmd_obj.AddClean() - self._skia_cmd_obj.AddRun( + self._skia_cmd_obj.AddRunCommand( ? +++++++ - run_command='../android/bin/android_make all -d xoom %s' % ( ? ---- ^^^ + command='../android/bin/android_make all -d nexus_s %s' % ( ? ++ ^^^^ self._make_flags), description='BuildAll') + self.PushBinaryToDeviceAndRun(binary_name='tests', description='RunTests') + return self._factory + + def PushBinaryToDeviceAndRun(self, binary_name, description, timeout=None): + """Adds a build step: push a binary file to the USB-connected Android + device and run it. + + binary_name: which binary to run on the device + description: text description (e.g., 'RunTests') + timeout: timeout in seconds, or None to use the default timeout + """ + path_to_adb = self.TargetPathJoin('..', 'android', 'bin', 'linux', 'adb') + command_list = [ + '%s root' % path_to_adb, + '%s remount' % path_to_adb, + '%s push out/%s/%s /system/bin/%s' % ( + path_to_adb, self._configuration, binary_name, binary_name), + '%s logcat -c' % path_to_adb, + '%s shell %s' % (path_to_adb, binary_name), + '%s logcat -d' % path_to_adb, + ] + self._skia_cmd_obj.AddRunCommandList( + command_list=command_list, description=description)
27
1.227273
25
2
936b2cd2f7584b89ec50cfa8136521915d7d07d8
.travis.yml
.travis.yml
language: node_js node_js: "0.12" script: npm run travisci after_script: - codeclimate-test-reporter < coverage/lcov.info addons: code_climate: repo_token: 5a70e5fe98733645a6ed95bec6279111f14fdd17b297f1e2bfc038528320e9bb
language: node_js node_js: "0.12" script: npm run travisci after_script: - codeclimate-test-reporter < coverage/lcov.info addons: code_climate: repo_token: 5a70e5fe98733645a6ed95bec6279111f14fdd17b297f1e2bfc038528320e9bb
Fix YAML indentation. For Real.
Fix YAML indentation. For Real.
YAML
mit
NatLibFi/loglevel-message-prefix
yaml
## Code Before: language: node_js node_js: "0.12" script: npm run travisci after_script: - codeclimate-test-reporter < coverage/lcov.info addons: code_climate: repo_token: 5a70e5fe98733645a6ed95bec6279111f14fdd17b297f1e2bfc038528320e9bb ## Instruction: Fix YAML indentation. For Real. ## Code After: language: node_js node_js: "0.12" script: npm run travisci after_script: - codeclimate-test-reporter < coverage/lcov.info addons: code_climate: repo_token: 5a70e5fe98733645a6ed95bec6279111f14fdd17b297f1e2bfc038528320e9bb
language: node_js - node_js: "0.12" ? -- + node_js: "0.12" - script: npm run travisci ? -- + script: npm run travisci - after_script: ? -- + after_script: - - codeclimate-test-reporter < coverage/lcov.info ? -- + - codeclimate-test-reporter < coverage/lcov.info - addons: ? -- + addons: - code_climate: ? -- + code_climate: - repo_token: 5a70e5fe98733645a6ed95bec6279111f14fdd17b297f1e2bfc038528320e9bb ? -- + repo_token: 5a70e5fe98733645a6ed95bec6279111f14fdd17b297f1e2bfc038528320e9bb
14
1.75
7
7
355eb8debb6147dfc6207b8863dbb45551558681
lib/task-data/tasks/install-windows-2012.js
lib/task-data/tasks/install-windows-2012.js
// Copyright 2016, EMC, Inc. 'use strict'; module.exports = { friendlyName: 'Install Windows', injectableName: 'Task.Os.Install.Win', implementsTask: 'Task.Base.Os.Install', options: { osType: 'windows', //readonly option, should avoid change it profile: 'windows.ipxe', version: null, hostname: 'localhost', domain: 'rackhd', password: "RackHDRocks!", rootSshKey: null, username: "onrack", "networkDevices": [], dnsServers: [], installDisk: null, smbUser: null, smbPassword: null, smbRepo: "\\\\{{ config.apiServerAddress }}\\windowsServer2012",// the samba mount point repo :'{{file.server}}/winpe', productkey: "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX" }, properties: { os: { windows: { type: 'server' } } } };
// Copyright 2016, EMC, Inc. 'use strict'; module.exports = { friendlyName: 'Install Windows', injectableName: 'Task.Os.Install.Win', implementsTask: 'Task.Base.Os.Install', options: { osType: 'windows', //readonly option, should avoid change it profile: 'windows.ipxe', version: null, hostname: 'localhost', domain: 'rackhd', password: "RackHDRocks!", rootSshKey: null, username: "onrack", "networkDevices": [], dnsServers: [], installDisk: null, smbUser: null, smbPassword: null, smbRepo: "\\\\{{ config.apiServerAddress }}\\windowsServer2012",// the samba mount point repo :'{{file.server}}/winpe', productkey: "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX", firewallDisable: false }, properties: { os: { windows: { type: 'server' } } } };
Include firewallDisable option to allow ping function to test static IP
Include firewallDisable option to allow ping function to test static IP
JavaScript
apache-2.0
nortonluo/on-tasks,AlaricChan/on-tasks,AlaricChan/on-tasks,bbcyyb/on-tasks,nortonluo/on-tasks,bbcyyb/on-tasks
javascript
## Code Before: // Copyright 2016, EMC, Inc. 'use strict'; module.exports = { friendlyName: 'Install Windows', injectableName: 'Task.Os.Install.Win', implementsTask: 'Task.Base.Os.Install', options: { osType: 'windows', //readonly option, should avoid change it profile: 'windows.ipxe', version: null, hostname: 'localhost', domain: 'rackhd', password: "RackHDRocks!", rootSshKey: null, username: "onrack", "networkDevices": [], dnsServers: [], installDisk: null, smbUser: null, smbPassword: null, smbRepo: "\\\\{{ config.apiServerAddress }}\\windowsServer2012",// the samba mount point repo :'{{file.server}}/winpe', productkey: "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX" }, properties: { os: { windows: { type: 'server' } } } }; ## Instruction: Include firewallDisable option to allow ping function to test static IP ## Code After: // Copyright 2016, EMC, Inc. 'use strict'; module.exports = { friendlyName: 'Install Windows', injectableName: 'Task.Os.Install.Win', implementsTask: 'Task.Base.Os.Install', options: { osType: 'windows', //readonly option, should avoid change it profile: 'windows.ipxe', version: null, hostname: 'localhost', domain: 'rackhd', password: "RackHDRocks!", rootSshKey: null, username: "onrack", "networkDevices": [], dnsServers: [], installDisk: null, smbUser: null, smbPassword: null, smbRepo: "\\\\{{ config.apiServerAddress }}\\windowsServer2012",// the samba mount point repo :'{{file.server}}/winpe', productkey: "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX", firewallDisable: false }, properties: { os: { windows: { type: 'server' } } } };
// Copyright 2016, EMC, Inc. 'use strict'; module.exports = { friendlyName: 'Install Windows', injectableName: 'Task.Os.Install.Win', implementsTask: 'Task.Base.Os.Install', options: { osType: 'windows', //readonly option, should avoid change it profile: 'windows.ipxe', version: null, hostname: 'localhost', domain: 'rackhd', password: "RackHDRocks!", rootSshKey: null, username: "onrack", "networkDevices": [], dnsServers: [], installDisk: null, smbUser: null, smbPassword: null, smbRepo: "\\\\{{ config.apiServerAddress }}\\windowsServer2012",// the samba mount point repo :'{{file.server}}/winpe', - productkey: "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX" + productkey: "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX", ? + - + firewallDisable: false }, properties: { os: { windows: { type: 'server' } } } };
4
0.111111
2
2
efbd0e1885ca1f89304d8c1509879b1494bb7a23
.travis.yml
.travis.yml
dist: xenial language: go go: "1.13.x" env: - GO111MODULE=on cache: directories: - $GOPATH/pkg/mod - $HOME/.cache/go-build install: true before_script: - GO111MODULE=off go get -u github.com/golangci/golangci-lint/cmd/golangci-lint script: - golangci-lint run - go test -race ./... deploy: - provider: script skip_cleanup: true script: curl -sL https://git.io/goreleaser | bash on: tags: true condition: $TRAVIS_OS_NAME = linux
dist: xenial language: go go: "1.13.x" env: - GO111MODULE=on cache: directories: - $GOPATH/pkg/mod - $HOME/.cache/go-build install: true before_script: - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.17.1 script: - golangci-lint run - go test -race ./... deploy: - provider: script skip_cleanup: true script: curl -sL https://git.io/goreleaser | bash on: tags: true condition: $TRAVIS_OS_NAME = linux
Revert "install golangci-lint from source for go 1.13"
Revert "install golangci-lint from source for go 1.13" This reverts commit d4a2971b6cbce4a538646230c986770c2238e66b.
YAML
mit
cenkalti/rain
yaml
## Code Before: dist: xenial language: go go: "1.13.x" env: - GO111MODULE=on cache: directories: - $GOPATH/pkg/mod - $HOME/.cache/go-build install: true before_script: - GO111MODULE=off go get -u github.com/golangci/golangci-lint/cmd/golangci-lint script: - golangci-lint run - go test -race ./... deploy: - provider: script skip_cleanup: true script: curl -sL https://git.io/goreleaser | bash on: tags: true condition: $TRAVIS_OS_NAME = linux ## Instruction: Revert "install golangci-lint from source for go 1.13" This reverts commit d4a2971b6cbce4a538646230c986770c2238e66b. ## Code After: dist: xenial language: go go: "1.13.x" env: - GO111MODULE=on cache: directories: - $GOPATH/pkg/mod - $HOME/.cache/go-build install: true before_script: - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.17.1 script: - golangci-lint run - go test -race ./... deploy: - provider: script skip_cleanup: true script: curl -sL https://git.io/goreleaser | bash on: tags: true condition: $TRAVIS_OS_NAME = linux
dist: xenial language: go go: "1.13.x" env: - GO111MODULE=on cache: directories: - $GOPATH/pkg/mod - $HOME/.cache/go-build install: true before_script: - - GO111MODULE=off go get -u github.com/golangci/golangci-lint/cmd/golangci-lint + - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.17.1 script: - golangci-lint run - go test -race ./... deploy: - provider: script skip_cleanup: true script: curl -sL https://git.io/goreleaser | bash on: tags: true condition: $TRAVIS_OS_NAME = linux
2
0.090909
1
1
7a3e4237c0883f55e4fef88089f72b25b80dbc78
.travis.yml
.travis.yml
language: node_js node_js: - 0.10 sudo: false cache: directories: - bower_components - node_modules before_script: - node_modules/.bin/bower install --config.interactive=false
language: node_js node_js: - 0.10 sudo: false cache: directories: - bower_components - node_modules before_script: - npm install -g bower broccoli-cli - bower install --config.interactive=false - broccoli build release
Install bower and broccoli-cli globally in Travis
Install bower and broccoli-cli globally in Travis
YAML
mit
astrifex/astrifex,astrifex/astrifex
yaml
## Code Before: language: node_js node_js: - 0.10 sudo: false cache: directories: - bower_components - node_modules before_script: - node_modules/.bin/bower install --config.interactive=false ## Instruction: Install bower and broccoli-cli globally in Travis ## Code After: language: node_js node_js: - 0.10 sudo: false cache: directories: - bower_components - node_modules before_script: - npm install -g bower broccoli-cli - bower install --config.interactive=false - broccoli build release
language: node_js node_js: - 0.10 sudo: false cache: directories: - bower_components - node_modules before_script: + - npm install -g bower broccoli-cli - - node_modules/.bin/bower install --config.interactive=false ? ------------------ + - bower install --config.interactive=false + - broccoli build release
4
0.285714
3
1
e5d199250ee1ae4f30cd0440e42a759367e3fb60
recipes/plyer/recipe.sh
recipes/plyer/recipe.sh
VERSION_plyer=${VERSION_plyer:-master} URL_plyer=https://github.com/plyer/plyer/archive/$VERSION_plyer.zip DEPS_plyer=(pyjnius android) MD5_plyer= BUILD_plyer=$BUILD_PATH/plyer/$(get_directory $URL_plyer) RECIPE_plyer=$RECIPES_PATH/plyer function prebuild_plyer() { true } function shouldbuild_plyer() { if [ -d "$SITEPACKAGES_PATH/plyer" ]; then DO_BUILD=0 fi } function build_plyer() { cd $BUILD_plyer push_arm try $HOSTPYTHON setup.py install -O2 pop_arm } function postbuild_plyer() { true }
VERSION_plyer=${VERSION_plyer:-master} URL_plyer=https://github.com/plyer/plyer/zipball/$VERSION_plyer/plyer-$VERSION_plyer.zip DEPS_plyer=(pyjnius android) MD5_plyer= BUILD_plyer=$BUILD_PATH/plyer/$(get_directory $URL_plyer) RECIPE_plyer=$RECIPES_PATH/plyer function prebuild_plyer() { true } function shouldbuild_plyer() { if [ -d "$SITEPACKAGES_PATH/plyer" ]; then DO_BUILD=0 fi } function build_plyer() { cd $BUILD_plyer push_arm try $HOSTPYTHON setup.py install -O2 pop_arm } function postbuild_plyer() { true }
Revert "fix plyer archive location"
Revert "fix plyer archive location" This reverts commit 15426977d7f1d42a5e45d66e66b60402e8e74171.
Shell
mit
lc-soft/python-for-android,cbenhagen/python-for-android,kived/python-for-android,wexi/python-for-android,bob-the-hamster/python-for-android,olymk2/python-for-android,olymk2/python-for-android,Cheaterman/python-for-android,alanjds/python-for-android,ravsa/python-for-android,wexi/python-for-android,renpytom/python-for-android,ibobalo/python-for-android,germn/python-for-android,PKRoma/python-for-android,codingang/python-for-android,kivatu/python-for-android,kivatu/python-for-android,pybee/Python-Android-support,ASMfreaK/python-for-android,kivy/python-for-android,dongguangming/python-for-android,ASMfreaK/python-for-android,dongguangming/python-for-android,wexi/python-for-android,kerr-huang/python-for-android,EMATech/python-for-android,renpytom/python-for-android,dongguangming/python-for-android,dl1ksv/python-for-android,ravsa/python-for-android,gonboy/python-for-android,bob-the-hamster/python-for-android,codingang/python-for-android,dvenkatsagar/python-for-android,inclement/python-for-android,lc-soft/python-for-android,codingang/python-for-android,renpytom/python-for-android,manashmndl/python-for-android,alanjds/python-for-android,dl1ksv/python-for-android,tsdl2013/python-for-android,olymk2/python-for-android,ehealthafrica-ci/python-for-android,kivatu/python-for-android,ravsa/python-for-android,ckudzu/python-for-android,kerr-huang/python-for-android,ckudzu/python-for-android,ckudzu/python-for-android,Cheaterman/python-for-android,germn/python-for-android,joliet0l/python-for-android,germn/python-for-android,rnixx/python-for-android,gonboy/python-for-android,Stocarson/python-for-android,Stocarson/python-for-android,alanjds/python-for-android,dvenkatsagar/python-for-android,ehealthafrica-ci/python-for-android,Cheaterman/python-for-android,ehealthafrica-ci/python-for-android,dl1ksv/python-for-android,inclement/python-for-android,rnixx/python-for-android,PKRoma/python-for-android,gonboy/python-for-android,rnixx/python-for-android,niavlys/python-for-android,kived/python-for-android,alanjds/python-for-android,rnixx/python-for-android,dl1ksv/python-for-android,renpytom/python-for-android,manashmndl/python-for-android,chozabu/p4a-ctypes,cbenhagen/python-for-android,lc-soft/python-for-android,ehealthafrica-ci/python-for-android,rnixx/python-for-android,dvenkatsagar/python-for-android,joliet0l/python-for-android,kronenpj/python-for-android,manashmndl/python-for-android,eHealthAfrica/python-for-android,kived/python-for-android,niavlys/python-for-android,chozabu/p4a-ctypes,olymk2/python-for-android,ehealthafrica-ci/python-for-android,kerr-huang/python-for-android,manashmndl/python-for-android,ckudzu/python-for-android,Cheaterman/python-for-android,gonboy/python-for-android,bob-the-hamster/python-for-android,kronenpj/python-for-android,alanjds/python-for-android,PKRoma/python-for-android,ibobalo/python-for-android,eHealthAfrica/python-for-android,ravsa/python-for-android,kived/python-for-android,wexi/python-for-android,niavlys/python-for-android,lc-soft/python-for-android,manashmndl/python-for-android,renpytom/python-for-android,PKRoma/python-for-android,Stocarson/python-for-android,niavlys/python-for-android,dl1ksv/python-for-android,joliet0l/python-for-android,bob-the-hamster/python-for-android,ASMfreaK/python-for-android,joliet0l/python-for-android,dongguangming/python-for-android,joliet0l/python-for-android,ravsa/python-for-android,kronenpj/python-for-android,wexi/python-for-android,Cheaterman/python-for-android,cbenhagen/python-for-android,joliet0l/python-for-android,renpytom/python-for-android,manashmndl/python-for-android,tsdl2013/python-for-android,chozabu/p4a-ctypes,kerr-huang/python-for-android,kivy/python-for-android,inclement/python-for-android,dongguangming/python-for-android,manashmndl/python-for-android,dl1ksv/python-for-android,ibobalo/python-for-android,tsdl2013/python-for-android,ravsa/python-for-android,ckudzu/python-for-android,eHealthAfrica/python-for-android,ASMfreaK/python-for-android,Cheaterman/python-for-android,ASMfreaK/python-for-android,codingang/python-for-android,tsdl2013/python-for-android,ASMfreaK/python-for-android,ibobalo/python-for-android,inclement/python-for-android,ravsa/python-for-android,lc-soft/python-for-android,Stocarson/python-for-android,kivatu/python-for-android,alanjds/python-for-android,olymk2/python-for-android,EMATech/python-for-android,eHealthAfrica/python-for-android,olymk2/python-for-android,niavlys/python-for-android,codingang/python-for-android,chozabu/p4a-ctypes,EMATech/python-for-android,tsdl2013/python-for-android,codingang/python-for-android,ckudzu/python-for-android,Stocarson/python-for-android,Cheaterman/python-for-android,rnixx/python-for-android,ibobalo/python-for-android,ckudzu/python-for-android,kivatu/python-for-android,kivatu/python-for-android,Cheaterman/python-for-android,Stocarson/python-for-android,bob-the-hamster/python-for-android,EMATech/python-for-android,ehealthafrica-ci/python-for-android,gonboy/python-for-android,wexi/python-for-android,codingang/python-for-android,codingang/python-for-android,tsdl2013/python-for-android,gonboy/python-for-android,cbenhagen/python-for-android,chozabu/p4a-ctypes,kivatu/python-for-android,joliet0l/python-for-android,PKRoma/python-for-android,olymk2/python-for-android,dvenkatsagar/python-for-android,olymk2/python-for-android,kerr-huang/python-for-android,cbenhagen/python-for-android,kived/python-for-android,manashmndl/python-for-android,dongguangming/python-for-android,ckudzu/python-for-android,EMATech/python-for-android,kivy/python-for-android,lc-soft/python-for-android,tsdl2013/python-for-android,ibobalo/python-for-android,gonboy/python-for-android,germn/python-for-android,dl1ksv/python-for-android,kivy/python-for-android,inclement/python-for-android,kronenpj/python-for-android,kronenpj/python-for-android,dvenkatsagar/python-for-android,germn/python-for-android,EMATech/python-for-android,dvenkatsagar/python-for-android,Stocarson/python-for-android,dongguangming/python-for-android,ehealthafrica-ci/python-for-android,tsdl2013/python-for-android,EMATech/python-for-android,kerr-huang/python-for-android,eHealthAfrica/python-for-android,inclement/python-for-android,germn/python-for-android,bob-the-hamster/python-for-android,ravsa/python-for-android,joliet0l/python-for-android,eHealthAfrica/python-for-android,dl1ksv/python-for-android,niavlys/python-for-android,alanjds/python-for-android,chozabu/p4a-ctypes,Stocarson/python-for-android,kived/python-for-android,kerr-huang/python-for-android,ehealthafrica-ci/python-for-android,niavlys/python-for-android,dongguangming/python-for-android,ASMfreaK/python-for-android,EMATech/python-for-android,eHealthAfrica/python-for-android,gonboy/python-for-android,dvenkatsagar/python-for-android,cbenhagen/python-for-android,pybee/Python-Android-support,dvenkatsagar/python-for-android,kivy/python-for-android,niavlys/python-for-android,ASMfreaK/python-for-android,chozabu/p4a-ctypes
shell
## Code Before: VERSION_plyer=${VERSION_plyer:-master} URL_plyer=https://github.com/plyer/plyer/archive/$VERSION_plyer.zip DEPS_plyer=(pyjnius android) MD5_plyer= BUILD_plyer=$BUILD_PATH/plyer/$(get_directory $URL_plyer) RECIPE_plyer=$RECIPES_PATH/plyer function prebuild_plyer() { true } function shouldbuild_plyer() { if [ -d "$SITEPACKAGES_PATH/plyer" ]; then DO_BUILD=0 fi } function build_plyer() { cd $BUILD_plyer push_arm try $HOSTPYTHON setup.py install -O2 pop_arm } function postbuild_plyer() { true } ## Instruction: Revert "fix plyer archive location" This reverts commit 15426977d7f1d42a5e45d66e66b60402e8e74171. ## Code After: VERSION_plyer=${VERSION_plyer:-master} URL_plyer=https://github.com/plyer/plyer/zipball/$VERSION_plyer/plyer-$VERSION_plyer.zip DEPS_plyer=(pyjnius android) MD5_plyer= BUILD_plyer=$BUILD_PATH/plyer/$(get_directory $URL_plyer) RECIPE_plyer=$RECIPES_PATH/plyer function prebuild_plyer() { true } function shouldbuild_plyer() { if [ -d "$SITEPACKAGES_PATH/plyer" ]; then DO_BUILD=0 fi } function build_plyer() { cd $BUILD_plyer push_arm try $HOSTPYTHON setup.py install -O2 pop_arm } function postbuild_plyer() { true }
VERSION_plyer=${VERSION_plyer:-master} - URL_plyer=https://github.com/plyer/plyer/archive/$VERSION_plyer.zip ? ^^^^ ^ + URL_plyer=https://github.com/plyer/plyer/zipball/$VERSION_plyer/plyer-$VERSION_plyer.zip ? ++++ ++++++++++++++++ ^^^^ ^^ DEPS_plyer=(pyjnius android) MD5_plyer= BUILD_plyer=$BUILD_PATH/plyer/$(get_directory $URL_plyer) RECIPE_plyer=$RECIPES_PATH/plyer function prebuild_plyer() { true } function shouldbuild_plyer() { if [ -d "$SITEPACKAGES_PATH/plyer" ]; then DO_BUILD=0 fi } function build_plyer() { cd $BUILD_plyer push_arm try $HOSTPYTHON setup.py install -O2 pop_arm } function postbuild_plyer() { true }
2
0.068966
1
1
2f176c1254d0344715ed035a56c8b22a37ca0ac1
app/page/SignUp.php
app/page/SignUp.php
<?php namespace Page; class SignUp { public function index() { if ($this->input->hasPost('username')) { $this->addUser(); } $this->load->storeView('SignUp'); $this->load->layout('Fresh'); } public function addUser() { $username = $this->input->post('username'); $password = $this->input->post('password'); $rpassword = $this->input->post('rpassword'); $msg = $this->load->library('Message'); $valid = $this->load->library('Validation'); if ($password !== $rpassword) { $msg->error('Your retype password is not match with the password you entered.'); } if (!$valid->username($username)) { $msg->error('Your username is not valid, only use alphabet (a-z), number (0-9),'. ' and symbol (_.-). The character length must between 5-16 characters'); } if (!$valid->password($password)) { $msg->error('Your password is not valid, only use alphabet (a-z), number (0-9),'. ' and symbol (@#!$*&~;:,?_.-). The character length must between 5-16 characters'); } if ($msg->count('error') > 0) { return; } $msg->success('Your account has been created successfully.'. ' Enter with your username and password', true); $this->router->redirect('user/signin'); } } ?>
<?php namespace Page; class SignUp { public function index() { if ($this->input->hasPost('username')) { $this->addUser(); } $this->load->storeView('SignUp'); $this->load->layout('Fresh'); } public function addUser() { $username = $this->input->post('username'); $password = $this->input->post('password'); $rpassword = $this->input->post('rpassword'); $this->load->library('Validation'); if ($password !== $rpassword) { $this->message->error('Your retype password is not match with the password you entered.'); } if (!$this->validation->username($username)) { $this->message->error('Your username is not valid, only use alphabet (a-z), number (0-9),'. ' and symbol (_.-). The character length must between 5-16 characters'); } if (!$this->validation->password($password)) { $this->message->error('Your password is not valid, only use alphabet (a-z), number (0-9),'. ' and symbol (@#!$*&~;:,?_.-). The character length must between 5-16 characters'); } if ($this->message->count('error') > 0) { return; } $this->message->success('Your account has been created successfully.'. ' Enter with your username and password', true); $this->router->redirect('user/signin'); } } ?>
Fix sign up to use new load system
Fix sign up to use new load system
PHP
mit
hernantas/MangaReader,hernantas/MangaReader,hernantas/MangaReader
php
## Code Before: <?php namespace Page; class SignUp { public function index() { if ($this->input->hasPost('username')) { $this->addUser(); } $this->load->storeView('SignUp'); $this->load->layout('Fresh'); } public function addUser() { $username = $this->input->post('username'); $password = $this->input->post('password'); $rpassword = $this->input->post('rpassword'); $msg = $this->load->library('Message'); $valid = $this->load->library('Validation'); if ($password !== $rpassword) { $msg->error('Your retype password is not match with the password you entered.'); } if (!$valid->username($username)) { $msg->error('Your username is not valid, only use alphabet (a-z), number (0-9),'. ' and symbol (_.-). The character length must between 5-16 characters'); } if (!$valid->password($password)) { $msg->error('Your password is not valid, only use alphabet (a-z), number (0-9),'. ' and symbol (@#!$*&~;:,?_.-). The character length must between 5-16 characters'); } if ($msg->count('error') > 0) { return; } $msg->success('Your account has been created successfully.'. ' Enter with your username and password', true); $this->router->redirect('user/signin'); } } ?> ## Instruction: Fix sign up to use new load system ## Code After: <?php namespace Page; class SignUp { public function index() { if ($this->input->hasPost('username')) { $this->addUser(); } $this->load->storeView('SignUp'); $this->load->layout('Fresh'); } public function addUser() { $username = $this->input->post('username'); $password = $this->input->post('password'); $rpassword = $this->input->post('rpassword'); $this->load->library('Validation'); if ($password !== $rpassword) { $this->message->error('Your retype password is not match with the password you entered.'); } if (!$this->validation->username($username)) { $this->message->error('Your username is not valid, only use alphabet (a-z), number (0-9),'. ' and symbol (_.-). The character length must between 5-16 characters'); } if (!$this->validation->password($password)) { $this->message->error('Your password is not valid, only use alphabet (a-z), number (0-9),'. ' and symbol (@#!$*&~;:,?_.-). The character length must between 5-16 characters'); } if ($this->message->count('error') > 0) { return; } $this->message->success('Your account has been created successfully.'. ' Enter with your username and password', true); $this->router->redirect('user/signin'); } } ?>
<?php namespace Page; class SignUp { public function index() { if ($this->input->hasPost('username')) { $this->addUser(); } $this->load->storeView('SignUp'); $this->load->layout('Fresh'); } public function addUser() { $username = $this->input->post('username'); $password = $this->input->post('password'); $rpassword = $this->input->post('rpassword'); - $msg = $this->load->library('Message'); - $valid = $this->load->library('Validation'); ? --------- + $this->load->library('Validation'); if ($password !== $rpassword) { - $msg->error('Your retype password is not match with the password you entered.'); + $this->message->error('Your retype password is not match with the password you entered.'); ? ++++++ + ++ + } - if (!$valid->username($username)) + if (!$this->validation->username($username)) ? ++++++ +++++ { - $msg->error('Your username is not valid, only use alphabet (a-z), number (0-9),'. + $this->message->error('Your username is not valid, only use alphabet (a-z), number (0-9),'. ? ++++++ + ++ + ' and symbol (_.-). The character length must between 5-16 characters'); } - if (!$valid->password($password)) + if (!$this->validation->password($password)) ? ++++++ +++++ { - $msg->error('Your password is not valid, only use alphabet (a-z), number (0-9),'. + $this->message->error('Your password is not valid, only use alphabet (a-z), number (0-9),'. ? ++++++ + ++ + ' and symbol (@#!$*&~;:,?_.-). The character length must between 5-16 characters'); } - if ($msg->count('error') > 0) + if ($this->message->count('error') > 0) ? ++++++ + ++ + { return; } - $msg->success('Your account has been created successfully.'. + $this->message->success('Your account has been created successfully.'. ? ++++++ + ++ + ' Enter with your username and password', true); $this->router->redirect('user/signin'); } } ?>
17
0.309091
8
9
cb299697fea45483abcca7ca7ee7e1d07aadf477
app/exporters/publishing_api_manual_with_sections_withdrawer.rb
app/exporters/publishing_api_manual_with_sections_withdrawer.rb
class PublishingApiManualWithSectionsWithdrawer def call(manual, _ = nil) PublishingAPIWithdrawer.new( entity: manual, ).call manual.sections.each do |document| PublishingAPIWithdrawer.new( entity: document, ).call end end end
class PublishingApiManualWithSectionsWithdrawer def call(manual, _ = nil) PublishingAPIWithdrawer.new( entity: manual, ).call manual.sections.each do |section| PublishingAPIWithdrawer.new( entity: section, ).call end end end
Rename document -> section in PublishingApiManualWithSectionsWithdrawer
Rename document -> section in PublishingApiManualWithSectionsWithdrawer
Ruby
mit
alphagov/manuals-publisher,alphagov/manuals-publisher,alphagov/manuals-publisher
ruby
## Code Before: class PublishingApiManualWithSectionsWithdrawer def call(manual, _ = nil) PublishingAPIWithdrawer.new( entity: manual, ).call manual.sections.each do |document| PublishingAPIWithdrawer.new( entity: document, ).call end end end ## Instruction: Rename document -> section in PublishingApiManualWithSectionsWithdrawer ## Code After: class PublishingApiManualWithSectionsWithdrawer def call(manual, _ = nil) PublishingAPIWithdrawer.new( entity: manual, ).call manual.sections.each do |section| PublishingAPIWithdrawer.new( entity: section, ).call end end end
class PublishingApiManualWithSectionsWithdrawer def call(manual, _ = nil) PublishingAPIWithdrawer.new( entity: manual, ).call - manual.sections.each do |document| ? ^ ---- - + manual.sections.each do |section| ? ^^^^^ PublishingAPIWithdrawer.new( - entity: document, ? ^ ---- - + entity: section, ? ^^^^^ ).call end end end
4
0.307692
2
2
62636dbb85f26e1ef37e274bf1f4fc1683719dfd
src/index.js
src/index.js
import request from 'request-promise'; import uts46 from 'idna-uts46'; const returnValues = { free: 'FREE', not_valid: 'NOT_VALID', occupied: 'OCCUPIED', }; export default function isFree(domain) { const idnEncodedDomain = uts46.toAscii(domain); const requestUrl = `http://free.iis.se/free?q=${idnEncodedDomain}`; return request(requestUrl) .then((data) => { const domainAvailability = data.split(' ')[0]; const result = returnValues[domainAvailability]; if (result) { return result; } return Promise.reject(new Error('Unknown error')); }); }
import fetch from 'node-fetch'; import uts46 from 'idna-uts46'; const returnValues = { free: 'FREE', not_valid: 'NOT_VALID', occupied: 'OCCUPIED', }; export default function isFree(domain) { const idnEncodedDomain = uts46.toAscii(domain); const requestUrl = `http://free.iis.se/free?q=${idnEncodedDomain}`; return fetch(requestUrl) .then((res) => { if (res.ok) { return res.text(); } return Promise.reject(new Error(res.statusText)); }) .then((body) => { const domainAvailability = body.split(' ')[0]; const result = returnValues[domainAvailability]; if (result) { return result; } return Promise.reject(new Error('Unknown error')); }); }
Refactor using node-fetch instead of request-promise
Refactor using node-fetch instead of request-promise
JavaScript
mit
kpalmvik/se-free
javascript
## Code Before: import request from 'request-promise'; import uts46 from 'idna-uts46'; const returnValues = { free: 'FREE', not_valid: 'NOT_VALID', occupied: 'OCCUPIED', }; export default function isFree(domain) { const idnEncodedDomain = uts46.toAscii(domain); const requestUrl = `http://free.iis.se/free?q=${idnEncodedDomain}`; return request(requestUrl) .then((data) => { const domainAvailability = data.split(' ')[0]; const result = returnValues[domainAvailability]; if (result) { return result; } return Promise.reject(new Error('Unknown error')); }); } ## Instruction: Refactor using node-fetch instead of request-promise ## Code After: import fetch from 'node-fetch'; import uts46 from 'idna-uts46'; const returnValues = { free: 'FREE', not_valid: 'NOT_VALID', occupied: 'OCCUPIED', }; export default function isFree(domain) { const idnEncodedDomain = uts46.toAscii(domain); const requestUrl = `http://free.iis.se/free?q=${idnEncodedDomain}`; return fetch(requestUrl) .then((res) => { if (res.ok) { return res.text(); } return Promise.reject(new Error(res.statusText)); }) .then((body) => { const domainAvailability = body.split(' ')[0]; const result = returnValues[domainAvailability]; if (result) { return result; } return Promise.reject(new Error('Unknown error')); }); }
- import request from 'request-promise'; + import fetch from 'node-fetch'; import uts46 from 'idna-uts46'; const returnValues = { free: 'FREE', not_valid: 'NOT_VALID', occupied: 'OCCUPIED', }; export default function isFree(domain) { const idnEncodedDomain = uts46.toAscii(domain); const requestUrl = `http://free.iis.se/free?q=${idnEncodedDomain}`; - return request(requestUrl) ? ^ ---- + return fetch(requestUrl) ? ^ ++ + .then((res) => { + if (res.ok) { + return res.text(); + } + + return Promise.reject(new Error(res.statusText)); + }) - .then((data) => { ? ^^^ + .then((body) => { ? ++ ^ - const domainAvailability = data.split(' ')[0]; ? ^^^ + const domainAvailability = body.split(' ')[0]; ? ++ ^ const result = returnValues[domainAvailability]; if (result) { return result; } return Promise.reject(new Error('Unknown error')); }); }
15
0.6
11
4
2f64464027fde6b01ad6eab54b6888d71ae4f0a6
.travis.yml
.travis.yml
rvm: - 1.9.2 - 1.9.3 - jruby-19mode before_install: - gem update --system - gem install minitest-rails jdk: - openjdk6 gemfile: - gemfiles/rails3.0.gemfile - gemfiles/rails3.1.gemfile - gemfiles/rails3.2.gemfile branches: only: - master
rvm: - 1.9.2 - 1.9.3 - jruby-19mode before_install: - gem update --system - gem install minitest-rails sass-rails coffee-rails therubyrhino uglifier jquery-rails jdk: - openjdk6 gemfile: - gemfiles/rails3.0.gemfile - gemfiles/rails3.1.gemfile - gemfiles/rails3.2.gemfile branches: only: - master
Make sure the gems that the rails apps are going to need are in place ahead of time
Make sure the gems that the rails apps are going to need are in place ahead of time
YAML
mit
compwron/factory_girl_rails,compwron/factory_girl_rails,thoughtbot/factory_girl_rails,victor95pc/factory_girl_rails,t4deu/factory_girl_rails,blairanderson/factory_girl_rails,victor95pc/factory_girl_rails,ar-shestopal/factory_girl_rails,thoughtbot/factory_girl_rails,ar-shestopal/factory_girl_rails,JuanitoFatas/factory_girl_rails,JuanitoFatas/factory_girl_rails,blairanderson/factory_girl_rails,alsemyonov/factory_girl_rails,t4deu/factory_girl_rails,alsemyonov/factory_girl_rails
yaml
## Code Before: rvm: - 1.9.2 - 1.9.3 - jruby-19mode before_install: - gem update --system - gem install minitest-rails jdk: - openjdk6 gemfile: - gemfiles/rails3.0.gemfile - gemfiles/rails3.1.gemfile - gemfiles/rails3.2.gemfile branches: only: - master ## Instruction: Make sure the gems that the rails apps are going to need are in place ahead of time ## Code After: rvm: - 1.9.2 - 1.9.3 - jruby-19mode before_install: - gem update --system - gem install minitest-rails sass-rails coffee-rails therubyrhino uglifier jquery-rails jdk: - openjdk6 gemfile: - gemfiles/rails3.0.gemfile - gemfiles/rails3.1.gemfile - gemfiles/rails3.2.gemfile branches: only: - master
rvm: - 1.9.2 - 1.9.3 - jruby-19mode before_install: - gem update --system - - gem install minitest-rails + - gem install minitest-rails sass-rails coffee-rails therubyrhino uglifier jquery-rails jdk: - openjdk6 gemfile: - gemfiles/rails3.0.gemfile - gemfiles/rails3.1.gemfile - gemfiles/rails3.2.gemfile branches: only: - master
2
0.125
1
1
5f5a09acc6d2c811b8f2d98513ecf008a5dcf67a
README.md
README.md
Snack Overflow is a community of picky eaters. Always wanted to have a BLT but you are vegan or keep kosher? Snack overflow is the place for you. * Share recipes for people with specialized diets * Search for recipes by category (kosher, vegan, vegetarian, non-dairy, allergies, etc) or by ingredient * Join a communtiy of people facing the same dietary restrictions ### Wireframes * [Guest Landing Page](planning/wireframes/landing_page.pdf) * [Member Landing Page](planning/wireframes/landing_logged_in.pdf) * [Recipe List View](planning/wireframes/list_page.pdf) * [Show Recipe View](planning/wireframes/show_page.pdf) * [Add/Edit Recipe View](planning/wireframes/add_edit.pdf) * [Edit Profile View](planning/wireframes/edit_profile_page.pdf) ### Schema ![ERD](planning/erd/erd.png) ### User Stories See the [user stories readme](planning/user_stories.md) ### Contributing Fork this repository and hack away. Please look at the [contibuting readme](contributing.md) before making a pull request. ### News The latest news can be found on the [news readme](news.md)
Snack Overflow is a community of picky eaters. Always wanted to have a BLT but you are vegan or keep kosher? Snack overflow is the place for you. * Share recipes for people with specialized diets * Search for recipes by category (kosher, vegan, vegetarian, non-dairy, allergies, etc) or by ingredient * Join a communtiy of people facing the same dietary restrictions ### Wireframes * [Guest Landing Page](planning/wireframes/landing_page.pdf) * [Member Landing Page](planning/wireframes/landing_logged_in.pdf) * [Recipe List View](planning/wireframes/list_page.pdf) * [Show Recipe View](planning/wireframes/show_page.pdf) * [Add/Edit Recipe View](planning/wireframes/add_edit.pdf) * [Edit Profile View](planning/wireframes/edit_profile_page.pdf) ### Schema ![ERD](planning/erd/erd.png) ### User Stories See the [user stories readme](planning/user_stories.md) ### Dependencies External Dependencies: * node ~ 5.4.1 * npm ~ 3.7.3 * Postgesql 9.5 ### Installation Clone the repository, navigate to the app folder in the terminal and run: ```bash npm install ``` This will install all the npm modules needed to run the server ### Contributing Fork this repository and hack away. Please look at the [contibuting readme](contributing.md) before making a pull request. ### News The latest news can be found on the [news readme](news.md)
Add dependencies and installation section to readme
Add dependencies and installation section to readme
Markdown
mit
harryganz/snackoverflow
markdown
## Code Before: Snack Overflow is a community of picky eaters. Always wanted to have a BLT but you are vegan or keep kosher? Snack overflow is the place for you. * Share recipes for people with specialized diets * Search for recipes by category (kosher, vegan, vegetarian, non-dairy, allergies, etc) or by ingredient * Join a communtiy of people facing the same dietary restrictions ### Wireframes * [Guest Landing Page](planning/wireframes/landing_page.pdf) * [Member Landing Page](planning/wireframes/landing_logged_in.pdf) * [Recipe List View](planning/wireframes/list_page.pdf) * [Show Recipe View](planning/wireframes/show_page.pdf) * [Add/Edit Recipe View](planning/wireframes/add_edit.pdf) * [Edit Profile View](planning/wireframes/edit_profile_page.pdf) ### Schema ![ERD](planning/erd/erd.png) ### User Stories See the [user stories readme](planning/user_stories.md) ### Contributing Fork this repository and hack away. Please look at the [contibuting readme](contributing.md) before making a pull request. ### News The latest news can be found on the [news readme](news.md) ## Instruction: Add dependencies and installation section to readme ## Code After: Snack Overflow is a community of picky eaters. Always wanted to have a BLT but you are vegan or keep kosher? Snack overflow is the place for you. * Share recipes for people with specialized diets * Search for recipes by category (kosher, vegan, vegetarian, non-dairy, allergies, etc) or by ingredient * Join a communtiy of people facing the same dietary restrictions ### Wireframes * [Guest Landing Page](planning/wireframes/landing_page.pdf) * [Member Landing Page](planning/wireframes/landing_logged_in.pdf) * [Recipe List View](planning/wireframes/list_page.pdf) * [Show Recipe View](planning/wireframes/show_page.pdf) * [Add/Edit Recipe View](planning/wireframes/add_edit.pdf) * [Edit Profile View](planning/wireframes/edit_profile_page.pdf) ### Schema ![ERD](planning/erd/erd.png) ### User Stories See the [user stories readme](planning/user_stories.md) ### Dependencies External Dependencies: * node ~ 5.4.1 * npm ~ 3.7.3 * Postgesql 9.5 ### Installation Clone the repository, navigate to the app folder in the terminal and run: ```bash npm install ``` This will install all the npm modules needed to run the server ### Contributing Fork this repository and hack away. Please look at the [contibuting readme](contributing.md) before making a pull request. ### News The latest news can be found on the [news readme](news.md)
Snack Overflow is a community of picky eaters. Always wanted to have a BLT but you are vegan or keep kosher? Snack overflow is the place for you. * Share recipes for people with specialized diets * Search for recipes by category (kosher, vegan, vegetarian, non-dairy, allergies, etc) or by ingredient * Join a communtiy of people facing the same dietary restrictions ### Wireframes * [Guest Landing Page](planning/wireframes/landing_page.pdf) * [Member Landing Page](planning/wireframes/landing_logged_in.pdf) * [Recipe List View](planning/wireframes/list_page.pdf) * [Show Recipe View](planning/wireframes/show_page.pdf) * [Add/Edit Recipe View](planning/wireframes/add_edit.pdf) * [Edit Profile View](planning/wireframes/edit_profile_page.pdf) ### Schema ![ERD](planning/erd/erd.png) ### User Stories See the [user stories readme](planning/user_stories.md) + + ### Dependencies + + External Dependencies: + + * node ~ 5.4.1 + * npm ~ 3.7.3 + * Postgesql 9.5 + + ### Installation + + Clone the repository, navigate to the app folder in the terminal and run: + ```bash + npm install + ``` + This will install all the npm modules needed to run the server + ### Contributing Fork this repository and hack away. Please look at the [contibuting readme](contributing.md) before making a pull request. ### News The latest news can be found on the [news readme](news.md)
17
0.548387
17
0
056a46fed79f712c3c5114b2c52889a2f7c7d31a
client/lanes/models/mixins/HasCodeField.coffee
client/lanes/models/mixins/HasCodeField.coffee
Lanes.Models.Mixins.HasCodeField = { INVALID: /[^A-Z0-9a-z]/ included: -> this.prototype.INVALID_CODE_CLanes.RS ||= Lanes.Models.mixins.Lanes.sCodeField.INVALID initialize: -> this.on('change:code', this.upcaseCode ) upcaseCode: -> this.set('code', this.get('code').toUpperCase()) }
Lanes.Models.Mixins.HasCodeField = { INVALID: /[^A-Z0-9a-z]/ included: (klass)-> klass::INVALID_CODE_CHARS ||= Lanes.Models.mixins.Lanes.sCodeField.INVALID initialize: -> this.on('change:code', this.upcaseCode) upcaseCode: -> this.set('code', this.get('code').toUpperCase()) }
Fix regex gone wild overwritting.
Fix regex gone wild overwritting. Belived this was a side-effect of the mass renaming from Stockor to Lanes
CoffeeScript
mit
argosity/hippo,argosity/lanes,argosity/lanes,argosity/hippo,argosity/lanes,argosity/hippo
coffeescript
## Code Before: Lanes.Models.Mixins.HasCodeField = { INVALID: /[^A-Z0-9a-z]/ included: -> this.prototype.INVALID_CODE_CLanes.RS ||= Lanes.Models.mixins.Lanes.sCodeField.INVALID initialize: -> this.on('change:code', this.upcaseCode ) upcaseCode: -> this.set('code', this.get('code').toUpperCase()) } ## Instruction: Fix regex gone wild overwritting. Belived this was a side-effect of the mass renaming from Stockor to Lanes ## Code After: Lanes.Models.Mixins.HasCodeField = { INVALID: /[^A-Z0-9a-z]/ included: (klass)-> klass::INVALID_CODE_CHARS ||= Lanes.Models.mixins.Lanes.sCodeField.INVALID initialize: -> this.on('change:code', this.upcaseCode) upcaseCode: -> this.set('code', this.get('code').toUpperCase()) }
Lanes.Models.Mixins.HasCodeField = { INVALID: /[^A-Z0-9a-z]/ - included: -> + included: (klass)-> ? +++++++ - this.prototype.INVALID_CODE_CLanes.RS ||= Lanes.Models.mixins.Lanes.sCodeField.INVALID ? ^^^ ^^^^^^^^^^^ ^^^^^^ + klass::INVALID_CODE_CHARS ||= Lanes.Models.mixins.Lanes.sCodeField.INVALID ? ^^^ ^^^ ^^ initialize: -> - this.on('change:code', this.upcaseCode ) ? - + this.on('change:code', this.upcaseCode) upcaseCode: -> this.set('code', this.get('code').toUpperCase()) }
6
0.461538
3
3
ac0ef50c0ff9788491997e3c8bc50509c7a914bf
app/assets/javascripts/components/tags.js.jsx
app/assets/javascripts/components/tags.js.jsx
var Tags = React.createClass({ mixins: [FluxMixin], emptyCopy: function() { if(this.props.tags.length === 0) { return "No tags yet, create some below :-)"; } }, renderTags: function() { return ( <ul className="Tags--list"> { this.props.tags.map(function(tag) { return ( <Tag data={ tag } removeClickHandler={ this.handleTagRemoveClicked } key={ tag.id } /> ); }.bind(this)) } </ul> ); }, handleTagRemoveClicked: function(event, data) { this.getFlux().actions.list.removeTag({ listId: this.props.listId, tagToRemove: data.name }); }, render: function() { return ( <div className="container"> <div className="Tags u-border-beta u-p-1"> <h2>Tags</h2> <p className='u-t-muted'> { this.emptyCopy() } </p> { this.renderTags() } <TagSearchController listId={ this.props.listId } /> </div> </div> ); } });
var Tags = React.createClass({ mixins: [FluxMixin], emptyCopy: function() { if(this.props.tags.length === 0) { return "No tags yet, create some below :-)"; } }, renderTags: function() { return ( <ul className="Tags--list"> { this.props.tags.map(function(tag) { return ( <Tag data={ tag } tagClickHandler={ this.handleTagRemoveClicked } key={ tag.id } type='remove' /> ); }.bind(this)) } </ul> ); }, handleTagRemoveClicked: function(event, data) { this.getFlux().actions.list.removeTag({ listId: this.props.listId, tagToRemove: data.name }); }, render: function() { return ( <div className="container"> <div className="Tags u-bg-blue-xlight u-p-3"> <h2>Tags</h2> <p className='u-t-muted'> { this.emptyCopy() } </p> { this.renderTags() } <TagSearchController listId={ this.props.listId } /> </div> </div> ); } });
Use unified click handler in tags.
Use unified click handler in tags.
JSX
mit
kirillis/mytopten,krisimmig/mytopten,kirillis/mytopten,krisimmig/mytopten,kirillis/mytopten,krisimmig/mytopten
jsx
## Code Before: var Tags = React.createClass({ mixins: [FluxMixin], emptyCopy: function() { if(this.props.tags.length === 0) { return "No tags yet, create some below :-)"; } }, renderTags: function() { return ( <ul className="Tags--list"> { this.props.tags.map(function(tag) { return ( <Tag data={ tag } removeClickHandler={ this.handleTagRemoveClicked } key={ tag.id } /> ); }.bind(this)) } </ul> ); }, handleTagRemoveClicked: function(event, data) { this.getFlux().actions.list.removeTag({ listId: this.props.listId, tagToRemove: data.name }); }, render: function() { return ( <div className="container"> <div className="Tags u-border-beta u-p-1"> <h2>Tags</h2> <p className='u-t-muted'> { this.emptyCopy() } </p> { this.renderTags() } <TagSearchController listId={ this.props.listId } /> </div> </div> ); } }); ## Instruction: Use unified click handler in tags. ## Code After: var Tags = React.createClass({ mixins: [FluxMixin], emptyCopy: function() { if(this.props.tags.length === 0) { return "No tags yet, create some below :-)"; } }, renderTags: function() { return ( <ul className="Tags--list"> { this.props.tags.map(function(tag) { return ( <Tag data={ tag } tagClickHandler={ this.handleTagRemoveClicked } key={ tag.id } type='remove' /> ); }.bind(this)) } </ul> ); }, handleTagRemoveClicked: function(event, data) { this.getFlux().actions.list.removeTag({ listId: this.props.listId, tagToRemove: data.name }); }, render: function() { return ( <div className="container"> <div className="Tags u-bg-blue-xlight u-p-3"> <h2>Tags</h2> <p className='u-t-muted'> { this.emptyCopy() } </p> { this.renderTags() } <TagSearchController listId={ this.props.listId } /> </div> </div> ); } });
var Tags = React.createClass({ mixins: [FluxMixin], emptyCopy: function() { if(this.props.tags.length === 0) { return "No tags yet, create some below :-)"; } }, renderTags: function() { return ( <ul className="Tags--list"> { this.props.tags.map(function(tag) { return ( <Tag data={ tag } - removeClickHandler={ this.handleTagRemoveClicked } ? ^^^^^^ + tagClickHandler={ this.handleTagRemoveClicked } ? ^^^ key={ tag.id } + type='remove' /> ); }.bind(this)) } </ul> ); }, handleTagRemoveClicked: function(event, data) { this.getFlux().actions.list.removeTag({ listId: this.props.listId, tagToRemove: data.name }); }, render: function() { return ( <div className="container"> - <div className="Tags u-border-beta u-p-1"> ? ^^^^^ - ^ + <div className="Tags u-bg-blue-xlight u-p-3"> ? ^ ++ ++++++ ^ <h2>Tags</h2> <p className='u-t-muted'> { this.emptyCopy() } </p> { this.renderTags() } <TagSearchController listId={ this.props.listId } /> </div> </div> ); } });
5
0.104167
3
2
8353b135e9c40f524de3ae4a238cea3581de4fd7
framework/tests/JPetTaskLoaderTest/JPetTaskLoaderTest.cpp
framework/tests/JPetTaskLoaderTest/JPetTaskLoaderTest.cpp
BOOST_AUTO_TEST_SUITE(FirstSuite) BOOST_AUTO_TEST_CASE( my_test1 ) { BOOST_REQUIRE(1==0); } BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE(FirstSuite) BOOST_AUTO_TEST_CASE(defaultConstrutocTest) { /*JPetOptions::Options options = { {"inputFile", "data_files/cosm_barrel.hld.root"}, {"inputFileType", "hld"}, {"outputFile", "data_files/cosm_barrel.tslot.raw.out.root"}, {"outputFileType", "tslot.raw"}, {"firstEvent", "1"}, {"lastEvent", "10"}, {"progressBar", "false"} }; JPetTaskLoader taskLoader; taskLoader.init(options);*/ } BOOST_AUTO_TEST_SUITE_END()
Change unit test for JPetTaskLoader.
Change unit test for JPetTaskLoader. Former-commit-id: 1cbaa59c1010a96926acec93a2e313f482e62943
C++
apache-2.0
kmuzalewska/j-pet-framework,kmuzalewska/j-pet-framework,kmuzalewska/j-pet-framework,kmuzalewska/j-pet-framework,kmuzalewska/j-pet-framework
c++
## Code Before: BOOST_AUTO_TEST_SUITE(FirstSuite) BOOST_AUTO_TEST_CASE( my_test1 ) { BOOST_REQUIRE(1==0); } BOOST_AUTO_TEST_SUITE_END() ## Instruction: Change unit test for JPetTaskLoader. Former-commit-id: 1cbaa59c1010a96926acec93a2e313f482e62943 ## Code After: BOOST_AUTO_TEST_SUITE(FirstSuite) BOOST_AUTO_TEST_CASE(defaultConstrutocTest) { /*JPetOptions::Options options = { {"inputFile", "data_files/cosm_barrel.hld.root"}, {"inputFileType", "hld"}, {"outputFile", "data_files/cosm_barrel.tslot.raw.out.root"}, {"outputFileType", "tslot.raw"}, {"firstEvent", "1"}, {"lastEvent", "10"}, {"progressBar", "false"} }; JPetTaskLoader taskLoader; taskLoader.init(options);*/ } BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE(FirstSuite) - BOOST_AUTO_TEST_CASE( my_test1 ) + BOOST_AUTO_TEST_CASE(defaultConstrutocTest) { - BOOST_REQUIRE(1==0); + /*JPetOptions::Options options = { + {"inputFile", "data_files/cosm_barrel.hld.root"}, + {"inputFileType", "hld"}, + {"outputFile", "data_files/cosm_barrel.tslot.raw.out.root"}, + {"outputFileType", "tslot.raw"}, + {"firstEvent", "1"}, + {"lastEvent", "10"}, + {"progressBar", "false"} + }; + + JPetTaskLoader taskLoader; + taskLoader.init(options);*/ } BOOST_AUTO_TEST_SUITE_END()
15
1.666667
13
2
54b2518d099389ffb16a3d4d60129fe24fc63ce8
app/scripts/modules/templates/module_item.hbs
app/scripts/modules/templates/module_item.hbs
<td class="code"><a href="/modules/{{ModuleCode}}">{{ModuleCode}}</a></td> <td class="details"> <div class="pull-right"> <a class="ivle btn btn-primary btn-xs" data-code="{{ModuleCode}}" href="http://ivle.nus.edu.sg/lms/public/list_course_public.aspx?code={{ModuleCode}}" target="_blank"> <i class="fa fa-info-circle"></i>&nbsp;IVLE </a> <button class="add btn btn-xs btn-warning" data-code="{{ModuleCode}}" type="button"> <i class="fa fa-plus-circle"></i>&nbsp;Add </button> </div> <strong>{{ModuleTitle}}</strong> <div class="desc">{{ModuleDescription}}</div> {{#if Prerequisite}} <div><strong>Prerequisites:</strong>&nbsp;{{{parsedPrerequisite}}}</div> {{/if}} {{#if Preclusion}} <div><strong>Preclusions:</strong>&nbsp;{{{parsedPreclusion}}}</div> {{/if}} {{#if Workload}} <div><strong>Workload:</strong>&nbsp;{{Workload}}</div> {{/if}} </td> <td class="mc">{{ModuleCredit}}</td> <td class="exam"> {{#if examStr}} {{examStr}} {{else}} No Exam {{/if}} </td> <td class="department">{{Department}}</td>
<td class="code"><a href="/modules/{{ModuleCode}}">{{ModuleCode}}</a></td> <td class="details"> <div class="pull-right"> <a class="ivle btn btn-default btn-xs" data-code="{{ModuleCode}}" href="http://ivle.nus.edu.sg/lms/public/list_course_public.aspx?code={{ModuleCode}}" target="_blank"> <i class="fa fa-info-circle"></i>&nbsp;IVLE </a> <button class="add btn btn-primary btn-xs" data-code="{{ModuleCode}}" type="button"> <i class="fa fa-plus-circle"></i>&nbsp;Add </button> </div> <strong>{{ModuleTitle}}</strong> <div class="desc">{{ModuleDescription}}</div> {{#if Prerequisite}} <div><strong>Prerequisites:</strong>&nbsp;{{{parsedPrerequisite}}}</div> {{/if}} {{#if Preclusion}} <div><strong>Preclusions:</strong>&nbsp;{{{parsedPreclusion}}}</div> {{/if}} {{#if Workload}} <div><strong>Workload:</strong>&nbsp;{{Workload}}</div> {{/if}} </td> <td class="mc">{{ModuleCredit}}</td> <td class="exam"> {{#if examStr}} {{examStr}} {{else}} No Exam {{/if}} </td> <td class="department">{{Department}}</td>
Change button colors in modules listing to be consistent with add button on module page
Change button colors in modules listing to be consistent with add button on module page
Handlebars
mit
nathanajah/nusmods,zhouyichen/nusmods,mauris/nusmods,nusmodifications/nusmods,chunqi/nusmods,nathanajah/nusmods,Yunheng/nusmods,zhouyichen/nusmods,nusmodifications/nusmods,Yunheng/nusmods,zhouyichen/nusmods,Yunheng/nusmods,mauris/nusmods,mauris/nusmods,nathanajah/nusmods,zhouyichen/nusmods,mauris/nusmods,chunqi/nusmods,nathanajah/nusmods,chunqi/nusmods,nusmodifications/nusmods,nusmodifications/nusmods,Yunheng/nusmods,chunqi/nusmods,Yunheng/nusmods
handlebars
## Code Before: <td class="code"><a href="/modules/{{ModuleCode}}">{{ModuleCode}}</a></td> <td class="details"> <div class="pull-right"> <a class="ivle btn btn-primary btn-xs" data-code="{{ModuleCode}}" href="http://ivle.nus.edu.sg/lms/public/list_course_public.aspx?code={{ModuleCode}}" target="_blank"> <i class="fa fa-info-circle"></i>&nbsp;IVLE </a> <button class="add btn btn-xs btn-warning" data-code="{{ModuleCode}}" type="button"> <i class="fa fa-plus-circle"></i>&nbsp;Add </button> </div> <strong>{{ModuleTitle}}</strong> <div class="desc">{{ModuleDescription}}</div> {{#if Prerequisite}} <div><strong>Prerequisites:</strong>&nbsp;{{{parsedPrerequisite}}}</div> {{/if}} {{#if Preclusion}} <div><strong>Preclusions:</strong>&nbsp;{{{parsedPreclusion}}}</div> {{/if}} {{#if Workload}} <div><strong>Workload:</strong>&nbsp;{{Workload}}</div> {{/if}} </td> <td class="mc">{{ModuleCredit}}</td> <td class="exam"> {{#if examStr}} {{examStr}} {{else}} No Exam {{/if}} </td> <td class="department">{{Department}}</td> ## Instruction: Change button colors in modules listing to be consistent with add button on module page ## Code After: <td class="code"><a href="/modules/{{ModuleCode}}">{{ModuleCode}}</a></td> <td class="details"> <div class="pull-right"> <a class="ivle btn btn-default btn-xs" data-code="{{ModuleCode}}" href="http://ivle.nus.edu.sg/lms/public/list_course_public.aspx?code={{ModuleCode}}" target="_blank"> <i class="fa fa-info-circle"></i>&nbsp;IVLE </a> <button class="add btn btn-primary btn-xs" data-code="{{ModuleCode}}" type="button"> <i class="fa fa-plus-circle"></i>&nbsp;Add </button> </div> <strong>{{ModuleTitle}}</strong> <div class="desc">{{ModuleDescription}}</div> {{#if Prerequisite}} <div><strong>Prerequisites:</strong>&nbsp;{{{parsedPrerequisite}}}</div> {{/if}} {{#if Preclusion}} <div><strong>Preclusions:</strong>&nbsp;{{{parsedPreclusion}}}</div> {{/if}} {{#if Workload}} <div><strong>Workload:</strong>&nbsp;{{Workload}}</div> {{/if}} </td> <td class="mc">{{ModuleCredit}}</td> <td class="exam"> {{#if examStr}} {{examStr}} {{else}} No Exam {{/if}} </td> <td class="department">{{Department}}</td>
<td class="code"><a href="/modules/{{ModuleCode}}">{{ModuleCode}}</a></td> <td class="details"> <div class="pull-right"> - <a class="ivle btn btn-primary btn-xs" ? ^^^^ ^^ + <a class="ivle btn btn-default btn-xs" ? ^^^ ^^^ data-code="{{ModuleCode}}" href="http://ivle.nus.edu.sg/lms/public/list_course_public.aspx?code={{ModuleCode}}" target="_blank"> <i class="fa fa-info-circle"></i>&nbsp;IVLE </a> - <button class="add btn btn-xs btn-warning" ? ^^ ^^^^^^^ + <button class="add btn btn-primary btn-xs" ? ^^^^^^^ ^^ data-code="{{ModuleCode}}" type="button"> <i class="fa fa-plus-circle"></i>&nbsp;Add </button> </div> <strong>{{ModuleTitle}}</strong> <div class="desc">{{ModuleDescription}}</div> {{#if Prerequisite}} <div><strong>Prerequisites:</strong>&nbsp;{{{parsedPrerequisite}}}</div> {{/if}} {{#if Preclusion}} <div><strong>Preclusions:</strong>&nbsp;{{{parsedPreclusion}}}</div> {{/if}} {{#if Workload}} <div><strong>Workload:</strong>&nbsp;{{Workload}}</div> {{/if}} </td> <td class="mc">{{ModuleCredit}}</td> <td class="exam"> {{#if examStr}} {{examStr}} {{else}} No Exam {{/if}} </td> <td class="department">{{Department}}</td>
4
0.108108
2
2
2074c33249e9950dd5b3cee88cb1561d8e229c0f
app/src/main/res/drawable/bg_course_purchase_promo_code_submit.xml
app/src/main/res/drawable/bg_course_purchase_promo_code_submit.xml
<?xml version="1.0" encoding="utf-8"?> <ripple android:color="?android:attr/colorControlHighlight" xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/promo_code_layer_list"> <layer-list> <item android:id="@+id/idle_state"> <shape android:shape="rectangle"> <corners android:radius="8dp" /> <solid android:color="@color/color_overlay_violet" /> <stroke android:width="1dp" android:color="@color/color_overlay_violet_alpha_12" /> </shape> </item> <item android:id="@+id/loading_state"> <shape android:shape="rectangle"> <corners android:radius="8dp" /> <stroke android:width="1dp" android:color="@color/color_overlay_violet_alpha_12" /> </shape> </item> <item android:id="@+id/invalid_state"> <shape android:shape="rectangle"> <corners android:radius="8dp" /> <solid android:color="@color/color_overlay_red_alpha_12" /> </shape> </item> <item android:id="@+id/valid_state"> <shape android:shape="rectangle"> <corners android:radius="8dp" /> <solid android:color="@color/color_overlay_green_alpha_12" /> </shape> </item> </layer-list> </item> </ripple>
<?xml version="1.0" encoding="utf-8"?> <ripple android:color="?android:attr/colorControlHighlight" xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/promo_code_layer_list"> <layer-list> <item android:id="@+id/idle_state"> <shape android:shape="rectangle"> <corners android:radius="8dp" /> <solid android:color="@color/color_overlay_violet" /> </shape> </item> <item android:id="@+id/loading_state"> <shape android:shape="rectangle"> <corners android:radius="8dp" /> <stroke android:width="1dp" android:color="@color/color_overlay_violet" /> </shape> </item> <item android:id="@+id/invalid_state"> <shape android:shape="rectangle"> <corners android:radius="8dp" /> <solid android:color="@color/color_overlay_red_alpha_12" /> </shape> </item> <item android:id="@+id/valid_state"> <shape android:shape="rectangle"> <corners android:radius="8dp" /> <solid android:color="@color/color_overlay_green_alpha_12" /> </shape> </item> </layer-list> </item> </ripple>
Fix stroke color in loading state
Fix stroke color in loading state
XML
apache-2.0
StepicOrg/stepic-android,StepicOrg/stepik-android,StepicOrg/stepic-android,StepicOrg/stepik-android,StepicOrg/stepik-android,StepicOrg/stepic-android
xml
## Code Before: <?xml version="1.0" encoding="utf-8"?> <ripple android:color="?android:attr/colorControlHighlight" xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/promo_code_layer_list"> <layer-list> <item android:id="@+id/idle_state"> <shape android:shape="rectangle"> <corners android:radius="8dp" /> <solid android:color="@color/color_overlay_violet" /> <stroke android:width="1dp" android:color="@color/color_overlay_violet_alpha_12" /> </shape> </item> <item android:id="@+id/loading_state"> <shape android:shape="rectangle"> <corners android:radius="8dp" /> <stroke android:width="1dp" android:color="@color/color_overlay_violet_alpha_12" /> </shape> </item> <item android:id="@+id/invalid_state"> <shape android:shape="rectangle"> <corners android:radius="8dp" /> <solid android:color="@color/color_overlay_red_alpha_12" /> </shape> </item> <item android:id="@+id/valid_state"> <shape android:shape="rectangle"> <corners android:radius="8dp" /> <solid android:color="@color/color_overlay_green_alpha_12" /> </shape> </item> </layer-list> </item> </ripple> ## Instruction: Fix stroke color in loading state ## Code After: <?xml version="1.0" encoding="utf-8"?> <ripple android:color="?android:attr/colorControlHighlight" xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/promo_code_layer_list"> <layer-list> <item android:id="@+id/idle_state"> <shape android:shape="rectangle"> <corners android:radius="8dp" /> <solid android:color="@color/color_overlay_violet" /> </shape> </item> <item android:id="@+id/loading_state"> <shape android:shape="rectangle"> <corners android:radius="8dp" /> <stroke android:width="1dp" android:color="@color/color_overlay_violet" /> </shape> </item> <item android:id="@+id/invalid_state"> <shape android:shape="rectangle"> <corners android:radius="8dp" /> <solid android:color="@color/color_overlay_red_alpha_12" /> </shape> </item> <item android:id="@+id/valid_state"> <shape android:shape="rectangle"> <corners android:radius="8dp" /> <solid android:color="@color/color_overlay_green_alpha_12" /> </shape> </item> </layer-list> </item> </ripple>
<?xml version="1.0" encoding="utf-8"?> <ripple android:color="?android:attr/colorControlHighlight" xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/promo_code_layer_list"> <layer-list> <item android:id="@+id/idle_state"> <shape android:shape="rectangle"> <corners android:radius="8dp" /> <solid android:color="@color/color_overlay_violet" /> - <stroke - android:width="1dp" - android:color="@color/color_overlay_violet_alpha_12" /> </shape> </item> <item android:id="@+id/loading_state"> <shape android:shape="rectangle"> <corners android:radius="8dp" /> <stroke android:width="1dp" - android:color="@color/color_overlay_violet_alpha_12" /> ? --------- + android:color="@color/color_overlay_violet" /> </shape> </item> <item android:id="@+id/invalid_state"> <shape android:shape="rectangle"> <corners android:radius="8dp" /> <solid android:color="@color/color_overlay_red_alpha_12" /> </shape> </item> <item android:id="@+id/valid_state"> <shape android:shape="rectangle"> <corners android:radius="8dp" /> <solid android:color="@color/color_overlay_green_alpha_12" /> </shape> </item> </layer-list> </item> </ripple>
5
0.125
1
4
54f07b60261de30132af387a66e682bc9a0a670e
console/server/README.md
console/server/README.md
1. [Purpose](#1-purpose)<br/> 2. [REST API](#2-rest-api)<br> # 1. Purpose Darzee's reverse proxy server was created to both serve web UI and to overcome browser's limitations that occurred while developing. Some of the cases are: </br> * Serve web interface; </br> * Change Prometheus configuration; </br> * Reload Prometheus; </br> It's described as "Reverse Proxy Server" in the figure below. ![](screenshots/architecture_overview.png) # 2. REST API | Method | Type | Arguments type | | Description | | --- | --- | --- | --- | --- | | `/savefile` | **POST** | `multipart/form-data` | `filename` - name of saving file, </br> `fileContent` - content of saving file | Saves file on specified path defined in **PROMETHEUS_CONFIGURATION_FOLDER_PATH** within [.env](.env) file. | | `/reloadprometheus` | **POST** | `application/json` | `ipAddress` - IPv4 address of Prometheus, </br> `port` - Prometheus' exposing port | Reloads Prometheus on specified address. That was done because Prometheus' reload from the web UI is being blocked by browser in a preflight request stage. | | /* | **GET** | `static files` | - | Serves HTML files for the web UI. |
1. [Purpose](#1-purpose)<br/> 2. [REST API](#2-rest-api)<br> # 1. Purpose Darzee's reverse proxy server was created to both serve web UI and to overcome browser's limitations that occurred while developing. Some of the cases are: </br> * Serve web interface; </br> * Change Prometheus configuration; </br> * Reload Prometheus; </br> It's described as "Reverse Proxy Server" in the figure below. ![](../../screenshots/architecture_overview.png) # 2. REST API | Method | Type | Arguments' type | Arguments | Description | | --- | --- | --- | --- | --- | | `/savefile` | **POST** | `multipart/form-data` | `filename` - name of saving file, </br> `fileContent` - content of saving file | Saves file on specified path defined in **PROMETHEUS_CONFIGURATION_FOLDER_PATH** within [.env](.env) file. | | `/reloadprometheus` | **POST** | `application/json` | `ipAddress` - IPv4 address of Prometheus, </br> `port` - Prometheus' exposing port | Reloads Prometheus on specified address. That was done because Prometheus' reload from the web UI is being blocked by browser in a preflight request stage. | | `/*` | **GET** | `static files` | - | Serves HTML files for the web UI. |
Fix link for architecture overview figure.
Fix link for architecture overview figure.
Markdown
mit
emc-mongoose/console,emc-mongoose/console,emc-mongoose/console
markdown
## Code Before: 1. [Purpose](#1-purpose)<br/> 2. [REST API](#2-rest-api)<br> # 1. Purpose Darzee's reverse proxy server was created to both serve web UI and to overcome browser's limitations that occurred while developing. Some of the cases are: </br> * Serve web interface; </br> * Change Prometheus configuration; </br> * Reload Prometheus; </br> It's described as "Reverse Proxy Server" in the figure below. ![](screenshots/architecture_overview.png) # 2. REST API | Method | Type | Arguments type | | Description | | --- | --- | --- | --- | --- | | `/savefile` | **POST** | `multipart/form-data` | `filename` - name of saving file, </br> `fileContent` - content of saving file | Saves file on specified path defined in **PROMETHEUS_CONFIGURATION_FOLDER_PATH** within [.env](.env) file. | | `/reloadprometheus` | **POST** | `application/json` | `ipAddress` - IPv4 address of Prometheus, </br> `port` - Prometheus' exposing port | Reloads Prometheus on specified address. That was done because Prometheus' reload from the web UI is being blocked by browser in a preflight request stage. | | /* | **GET** | `static files` | - | Serves HTML files for the web UI. | ## Instruction: Fix link for architecture overview figure. ## Code After: 1. [Purpose](#1-purpose)<br/> 2. [REST API](#2-rest-api)<br> # 1. Purpose Darzee's reverse proxy server was created to both serve web UI and to overcome browser's limitations that occurred while developing. Some of the cases are: </br> * Serve web interface; </br> * Change Prometheus configuration; </br> * Reload Prometheus; </br> It's described as "Reverse Proxy Server" in the figure below. ![](../../screenshots/architecture_overview.png) # 2. REST API | Method | Type | Arguments' type | Arguments | Description | | --- | --- | --- | --- | --- | | `/savefile` | **POST** | `multipart/form-data` | `filename` - name of saving file, </br> `fileContent` - content of saving file | Saves file on specified path defined in **PROMETHEUS_CONFIGURATION_FOLDER_PATH** within [.env](.env) file. | | `/reloadprometheus` | **POST** | `application/json` | `ipAddress` - IPv4 address of Prometheus, </br> `port` - Prometheus' exposing port | Reloads Prometheus on specified address. That was done because Prometheus' reload from the web UI is being blocked by browser in a preflight request stage. | | `/*` | **GET** | `static files` | - | Serves HTML files for the web UI. |
1. [Purpose](#1-purpose)<br/> 2. [REST API](#2-rest-api)<br> # 1. Purpose Darzee's reverse proxy server was created to both serve web UI and to overcome browser's limitations that occurred while developing. Some of the cases are: </br> * Serve web interface; </br> * Change Prometheus configuration; </br> * Reload Prometheus; </br> It's described as "Reverse Proxy Server" in the figure below. - ![](screenshots/architecture_overview.png) + ![](../../screenshots/architecture_overview.png) ? ++++++ # 2. REST API - | Method | Type | Arguments type | | Description | + | Method | Type | Arguments' type | Arguments | Description | ? + +++++++++ | --- | --- | --- | --- | --- | | `/savefile` | **POST** | `multipart/form-data` | `filename` - name of saving file, </br> `fileContent` - content of saving file | Saves file on specified path defined in **PROMETHEUS_CONFIGURATION_FOLDER_PATH** within [.env](.env) file. | | `/reloadprometheus` | **POST** | `application/json` | `ipAddress` - IPv4 address of Prometheus, </br> `port` - Prometheus' exposing port | Reloads Prometheus on specified address. That was done because Prometheus' reload from the web UI is being blocked by browser in a preflight request stage. | - | /* | **GET** | `static files` | - | Serves HTML files for the web UI. | + | `/*` | **GET** | `static files` | - | Serves HTML files for the web UI. | ? + +
6
0.285714
3
3
abb824a37a838289ce5dc67ef73a49958cd72d7e
config/unicorn.rb
config/unicorn.rb
def load_file_if_exists(config, file) config.instance_eval(File.read(file)) if File.exist?(file) end load_file_if_exists(self, "/etc/govuk/unicorn.rb") working_directory File.dirname(File.dirname(__FILE__)) worker_processes 4 # Preload the entire app preload_app true before_fork do |server, worker| # The following is highly recomended for Rails + "preload_app true" # as there's no need for the master process to hold a connection. defined?(ActiveRecord::Base) and ActiveRecord::Base.connection.disconnect! # Force translations to be loaded into memory. I18n.t('activerecord') end after_fork do |server, worker| defined?(ActiveRecord::Base) and ActiveRecord::Base.establish_connection end
def load_file_if_exists(config, file) config.instance_eval(File.read(file)) if File.exist?(file) end load_file_if_exists(self, "/etc/govuk/unicorn.rb") working_directory File.dirname(File.dirname(__FILE__)) if ENV.has_key?("UNICORN_WORKER_PROCESSES") worker_processes = Integer(ENV["UNICORN_WORKER_PROCESSES"]) else worker_processes = 4 end # Preload the entire app preload_app true before_fork do |server, worker| # The following is highly recomended for Rails + "preload_app true" # as there's no need for the master process to hold a connection. defined?(ActiveRecord::Base) and ActiveRecord::Base.connection.disconnect! # Force translations to be loaded into memory. I18n.t('activerecord') end after_fork do |server, worker| defined?(ActiveRecord::Base) and ActiveRecord::Base.establish_connection end
Add UNICORN_WORKER_PROCESSES to config as this can vary
Add UNICORN_WORKER_PROCESSES to config as this can vary
Ruby
mit
alphagov/whitehall,alphagov/whitehall,alphagov/whitehall,alphagov/whitehall
ruby
## Code Before: def load_file_if_exists(config, file) config.instance_eval(File.read(file)) if File.exist?(file) end load_file_if_exists(self, "/etc/govuk/unicorn.rb") working_directory File.dirname(File.dirname(__FILE__)) worker_processes 4 # Preload the entire app preload_app true before_fork do |server, worker| # The following is highly recomended for Rails + "preload_app true" # as there's no need for the master process to hold a connection. defined?(ActiveRecord::Base) and ActiveRecord::Base.connection.disconnect! # Force translations to be loaded into memory. I18n.t('activerecord') end after_fork do |server, worker| defined?(ActiveRecord::Base) and ActiveRecord::Base.establish_connection end ## Instruction: Add UNICORN_WORKER_PROCESSES to config as this can vary ## Code After: def load_file_if_exists(config, file) config.instance_eval(File.read(file)) if File.exist?(file) end load_file_if_exists(self, "/etc/govuk/unicorn.rb") working_directory File.dirname(File.dirname(__FILE__)) if ENV.has_key?("UNICORN_WORKER_PROCESSES") worker_processes = Integer(ENV["UNICORN_WORKER_PROCESSES"]) else worker_processes = 4 end # Preload the entire app preload_app true before_fork do |server, worker| # The following is highly recomended for Rails + "preload_app true" # as there's no need for the master process to hold a connection. defined?(ActiveRecord::Base) and ActiveRecord::Base.connection.disconnect! # Force translations to be loaded into memory. I18n.t('activerecord') end after_fork do |server, worker| defined?(ActiveRecord::Base) and ActiveRecord::Base.establish_connection end
def load_file_if_exists(config, file) config.instance_eval(File.read(file)) if File.exist?(file) end load_file_if_exists(self, "/etc/govuk/unicorn.rb") working_directory File.dirname(File.dirname(__FILE__)) + + if ENV.has_key?("UNICORN_WORKER_PROCESSES") + worker_processes = Integer(ENV["UNICORN_WORKER_PROCESSES"]) + else - worker_processes 4 + worker_processes = 4 ? ++ ++ + end # Preload the entire app preload_app true before_fork do |server, worker| # The following is highly recomended for Rails + "preload_app true" # as there's no need for the master process to hold a connection. defined?(ActiveRecord::Base) and ActiveRecord::Base.connection.disconnect! # Force translations to be loaded into memory. I18n.t('activerecord') end after_fork do |server, worker| defined?(ActiveRecord::Base) and ActiveRecord::Base.establish_connection end
7
0.291667
6
1
e3eef6de49696e88efd5bbb8edd6a6f001008b38
app/styles/_layout/_l-header.scss
app/styles/_layout/_l-header.scss
@import '../variables'; @import '../mixins/action'; .pwa-header { background-color: $color-background-brighter; padding: 1rem 2vw; &-left { text-align: left; @media screen and (max-width: $media-screen-s) { text-align: center; width: 100%; } } &-right { text-align: right; @media screen and (max-width: $media-screen-s) { overflow-x: auto; padding-bottom: .5rem; } } &-logo { $size: 210px; max-width: $size; min-width: $size / 2; width: 100%; } &-menu { font-family: 'Bitter'; font-size: 1.1em; list-style: none; margin-right: 1vw; padding: 0; white-space: nowrap; } &-item { display: inline-block; margin: 0 .5vw; text-align: center; } &-link { @include action-link ( $color-foreground-darker, $color-brand, .2rem); } }
@import '../variables'; @import '../mixins/action'; .pwa-header { background-color: $color-background-brighter; padding: 1rem 2vw; &-left { text-align: left; @media screen and (max-width: $media-screen-s) { text-align: center; width: 100%; } } &-right { text-align: right; @media screen and (max-width: $media-screen-s) { overflow-x: auto; padding-bottom: .5rem; width: 100%; } } &-logo { $size: 210px; max-width: $size; min-width: $size / 2; width: 100%; } &-menu { font-family: 'Bitter'; font-size: 1.1em; list-style: none; margin-right: 1vw; padding: 0; white-space: nowrap; } &-item { display: inline-block; margin: 0 .5vw; text-align: center; } &-link { @include action-link ( $color-foreground-darker, $color-brand, .2rem); } }
Fix responsive overflow for header
Fix responsive overflow for header
SCSS
mit
manifoldjs/manifoldjs-site,manifoldjs/manifoldjs-site,manifoldjs/manifoldjs-site
scss
## Code Before: @import '../variables'; @import '../mixins/action'; .pwa-header { background-color: $color-background-brighter; padding: 1rem 2vw; &-left { text-align: left; @media screen and (max-width: $media-screen-s) { text-align: center; width: 100%; } } &-right { text-align: right; @media screen and (max-width: $media-screen-s) { overflow-x: auto; padding-bottom: .5rem; } } &-logo { $size: 210px; max-width: $size; min-width: $size / 2; width: 100%; } &-menu { font-family: 'Bitter'; font-size: 1.1em; list-style: none; margin-right: 1vw; padding: 0; white-space: nowrap; } &-item { display: inline-block; margin: 0 .5vw; text-align: center; } &-link { @include action-link ( $color-foreground-darker, $color-brand, .2rem); } } ## Instruction: Fix responsive overflow for header ## Code After: @import '../variables'; @import '../mixins/action'; .pwa-header { background-color: $color-background-brighter; padding: 1rem 2vw; &-left { text-align: left; @media screen and (max-width: $media-screen-s) { text-align: center; width: 100%; } } &-right { text-align: right; @media screen and (max-width: $media-screen-s) { overflow-x: auto; padding-bottom: .5rem; width: 100%; } } &-logo { $size: 210px; max-width: $size; min-width: $size / 2; width: 100%; } &-menu { font-family: 'Bitter'; font-size: 1.1em; list-style: none; margin-right: 1vw; padding: 0; white-space: nowrap; } &-item { display: inline-block; margin: 0 .5vw; text-align: center; } &-link { @include action-link ( $color-foreground-darker, $color-brand, .2rem); } }
@import '../variables'; @import '../mixins/action'; .pwa-header { background-color: $color-background-brighter; padding: 1rem 2vw; &-left { text-align: left; @media screen and (max-width: $media-screen-s) { text-align: center; width: 100%; } } &-right { text-align: right; @media screen and (max-width: $media-screen-s) { overflow-x: auto; padding-bottom: .5rem; + width: 100%; } } &-logo { $size: 210px; max-width: $size; min-width: $size / 2; width: 100%; } &-menu { font-family: 'Bitter'; font-size: 1.1em; list-style: none; margin-right: 1vw; padding: 0; white-space: nowrap; } &-item { display: inline-block; margin: 0 .5vw; text-align: center; } &-link { @include action-link ( $color-foreground-darker, $color-brand, .2rem); } }
1
0.019608
1
0
220513e2b980c1338b8e1a0231df7b6d6c1aaaeb
sources/us/pa/lehigh.json
sources/us/pa/lehigh.json
{ "coverage": { "US Census": { "geoid": "42077", "name": "Lehigh County", "state": "Pennsylvania" }, "country": "us", "state": "pa", "county": "Lehigh" }, "data": "https://services1.arcgis.com/XWDNR4PQlDQwrRCL/ArcGIS/rest/services/ATestParcel/FeatureServer/1", "protocol": "ESRI", "conform": { "format": "geojson", "number": "SITUS_ADDR", "street": [ "SITUS_FDPR", "SITUS_FNAM", "SITUS_FTYP", "SITUS_FDSU" ], "unit": "SITUS_UNIT", "city": "SITUS_CITY", "postcode": "SITUS_ZIP" } }
{ "coverage": { "US Census": { "geoid": "42077", "name": "Lehigh County", "state": "Pennsylvania" }, "country": "us", "state": "pa", "county": "Lehigh" }, "website": "https://www.lehighcounty.org/Departments/GIS", "contact": { "phone": "(610) 782-3000", "address": "17 South 7th St., Allentown, PA 18101" }, "data": "https://gis.lehighcounty.org/arcgis/rest/services/ParcelSDE/MapServer/0", "protocol": "ESRI", "conform": { "format": "geojson", "number": "SITUS_ADDR_NUM", "street": [ "SITUS_FDPRE", "SITUS_FNAME", "SITUS_FTYPE", "SITUS_FDSUF" ], "unit": "SITUS_UNIT_NUM", "city": "SITUS_CITY", "postcode": "SITUS_ZIP", "id": "PIN" } }
Update Lehigh County, PA: - update Esri REST service and fields - add contact information
Update Lehigh County, PA: - update Esri REST service and fields - add contact information
JSON
bsd-3-clause
openaddresses/openaddresses,openaddresses/openaddresses,openaddresses/openaddresses
json
## Code Before: { "coverage": { "US Census": { "geoid": "42077", "name": "Lehigh County", "state": "Pennsylvania" }, "country": "us", "state": "pa", "county": "Lehigh" }, "data": "https://services1.arcgis.com/XWDNR4PQlDQwrRCL/ArcGIS/rest/services/ATestParcel/FeatureServer/1", "protocol": "ESRI", "conform": { "format": "geojson", "number": "SITUS_ADDR", "street": [ "SITUS_FDPR", "SITUS_FNAM", "SITUS_FTYP", "SITUS_FDSU" ], "unit": "SITUS_UNIT", "city": "SITUS_CITY", "postcode": "SITUS_ZIP" } } ## Instruction: Update Lehigh County, PA: - update Esri REST service and fields - add contact information ## Code After: { "coverage": { "US Census": { "geoid": "42077", "name": "Lehigh County", "state": "Pennsylvania" }, "country": "us", "state": "pa", "county": "Lehigh" }, "website": "https://www.lehighcounty.org/Departments/GIS", "contact": { "phone": "(610) 782-3000", "address": "17 South 7th St., Allentown, PA 18101" }, "data": "https://gis.lehighcounty.org/arcgis/rest/services/ParcelSDE/MapServer/0", "protocol": "ESRI", "conform": { "format": "geojson", "number": "SITUS_ADDR_NUM", "street": [ "SITUS_FDPRE", "SITUS_FNAME", "SITUS_FTYPE", "SITUS_FDSUF" ], "unit": "SITUS_UNIT_NUM", "city": "SITUS_CITY", "postcode": "SITUS_ZIP", "id": "PIN" } }
{ "coverage": { "US Census": { "geoid": "42077", "name": "Lehigh County", "state": "Pennsylvania" }, "country": "us", "state": "pa", "county": "Lehigh" }, - "data": "https://services1.arcgis.com/XWDNR4PQlDQwrRCL/ArcGIS/rest/services/ATestParcel/FeatureServer/1", + "website": "https://www.lehighcounty.org/Departments/GIS", + "contact": { + "phone": "(610) 782-3000", + "address": "17 South 7th St., Allentown, PA 18101" + }, + "data": "https://gis.lehighcounty.org/arcgis/rest/services/ParcelSDE/MapServer/0", "protocol": "ESRI", "conform": { "format": "geojson", - "number": "SITUS_ADDR", + "number": "SITUS_ADDR_NUM", ? ++++ "street": [ - "SITUS_FDPR", + "SITUS_FDPRE", ? + - "SITUS_FNAM", + "SITUS_FNAME", ? + - "SITUS_FTYP", + "SITUS_FTYPE", ? + - "SITUS_FDSU" + "SITUS_FDSUF" ? + ], - "unit": "SITUS_UNIT", + "unit": "SITUS_UNIT_NUM", ? ++++ "city": "SITUS_CITY", - "postcode": "SITUS_ZIP" + "postcode": "SITUS_ZIP", ? + + "id": "PIN" } }
22
0.814815
14
8
05e8b8ba0e6395af13a9eef65fd84865622f59be
.config/fish/abbrs.fish
.config/fish/abbrs.fish
abbr -a g 'git' abbr -a gd 'git diff' abbr -a gco 'git checkout' abbr -a vv 'git branches -vv' abbr -a chex 'chmod +x' abbr -a md 'mkdir -p' abbr -a rf 'rm -rfIv' abbr -a rl 'source ~/.config/fish/config.fish' abbr -a s 'ls' abbr -a cinnamon-restart='cinnamon –replace -d :0.0> /dev/null 2>&1 &' abbr -a unset 'set --erase'
abbr -a g 'git' abbr -a gd 'git diff' abbr -a gco 'git checkout' abbr -a vv 'git branches -vv' abbr -a chex 'chmod +x' abbr -a md 'mkdir -p' abbr -a n 'nvim' abbr -a rf 'rm -rfv' abbr -a rl 'source ~/.config/fish/config.fish' abbr -a s 'ls' abbr -a cinnamon-restart='cinnamon –replace -d :0.0> /dev/null 2>&1 &' abbr -a unset 'set --erase'
Add abbr for nvim in fish
Add abbr for nvim in fish
fish
mit
aawc/dotfiles,aawc/dotfiles
fish
## Code Before: abbr -a g 'git' abbr -a gd 'git diff' abbr -a gco 'git checkout' abbr -a vv 'git branches -vv' abbr -a chex 'chmod +x' abbr -a md 'mkdir -p' abbr -a rf 'rm -rfIv' abbr -a rl 'source ~/.config/fish/config.fish' abbr -a s 'ls' abbr -a cinnamon-restart='cinnamon –replace -d :0.0> /dev/null 2>&1 &' abbr -a unset 'set --erase' ## Instruction: Add abbr for nvim in fish ## Code After: abbr -a g 'git' abbr -a gd 'git diff' abbr -a gco 'git checkout' abbr -a vv 'git branches -vv' abbr -a chex 'chmod +x' abbr -a md 'mkdir -p' abbr -a n 'nvim' abbr -a rf 'rm -rfv' abbr -a rl 'source ~/.config/fish/config.fish' abbr -a s 'ls' abbr -a cinnamon-restart='cinnamon –replace -d :0.0> /dev/null 2>&1 &' abbr -a unset 'set --erase'
abbr -a g 'git' abbr -a gd 'git diff' abbr -a gco 'git checkout' abbr -a vv 'git branches -vv' abbr -a chex 'chmod +x' abbr -a md 'mkdir -p' + abbr -a n 'nvim' - abbr -a rf 'rm -rfIv' ? - + abbr -a rf 'rm -rfv' abbr -a rl 'source ~/.config/fish/config.fish' abbr -a s 'ls' abbr -a cinnamon-restart='cinnamon –replace -d :0.0> /dev/null 2>&1 &' abbr -a unset 'set --erase'
3
0.25
2
1
0737dc0eadf584c02276c37396e6291d5073a632
web/router.ex
web/router.ex
defmodule Tokenizer.Router do @moduledoc """ The router provides a set of macros for generating routes that dispatch to specific controllers and actions. Those macros are named after HTTP verbs. More info at: https://hexdocs.pm/phoenix/Phoenix.Router.html """ use Tokenizer.Web, :router pipeline :api do plug :accepts, ["json"] plug :put_secure_browser_headers plug Tokenizer.HTTP.Plugs.Authorization end scope "/", Tokenizer.Controllers do pipe_through :api # Create card tokens post "/tokens", Token, :create # Create and get payment post "/payments", Payment, :create get "/payments/:id", Payment, :show # Complete payments # post "/payments/:id/auth", PaymentAuthorization, :authorize # post "/payments/:id/claim", Payment, :claim end end
defmodule Tokenizer.Router do @moduledoc """ The router provides a set of macros for generating routes that dispatch to specific controllers and actions. Those macros are named after HTTP verbs. More info at: https://hexdocs.pm/phoenix/Phoenix.Router.html """ use Tokenizer.Web, :router pipeline :public_api do plug :accepts, ["json"] plug :put_secure_browser_headers end pipeline :private_api do plug :accepts, ["json"] plug :put_secure_browser_headers plug Tokenizer.HTTP.Plugs.Authorization end scope "/tokens", Tokenizer.Controllers do pipe_through :public_api # Create card tokens post "/", Token, :create end scope "/", Tokenizer.Controllers do pipe_through :private_api # Create and get payment post "/payments", Payment, :create get "/payments/:id", Payment, :show # Complete payments # post "/payments/:id/auth", PaymentAuthorization, :authorize # post "/payments/:id/claim", Payment, :claim end end
Split API in two parts
Split API in two parts
Elixir
mit
Nebo15/tokenizer.api
elixir
## Code Before: defmodule Tokenizer.Router do @moduledoc """ The router provides a set of macros for generating routes that dispatch to specific controllers and actions. Those macros are named after HTTP verbs. More info at: https://hexdocs.pm/phoenix/Phoenix.Router.html """ use Tokenizer.Web, :router pipeline :api do plug :accepts, ["json"] plug :put_secure_browser_headers plug Tokenizer.HTTP.Plugs.Authorization end scope "/", Tokenizer.Controllers do pipe_through :api # Create card tokens post "/tokens", Token, :create # Create and get payment post "/payments", Payment, :create get "/payments/:id", Payment, :show # Complete payments # post "/payments/:id/auth", PaymentAuthorization, :authorize # post "/payments/:id/claim", Payment, :claim end end ## Instruction: Split API in two parts ## Code After: defmodule Tokenizer.Router do @moduledoc """ The router provides a set of macros for generating routes that dispatch to specific controllers and actions. Those macros are named after HTTP verbs. More info at: https://hexdocs.pm/phoenix/Phoenix.Router.html """ use Tokenizer.Web, :router pipeline :public_api do plug :accepts, ["json"] plug :put_secure_browser_headers end pipeline :private_api do plug :accepts, ["json"] plug :put_secure_browser_headers plug Tokenizer.HTTP.Plugs.Authorization end scope "/tokens", Tokenizer.Controllers do pipe_through :public_api # Create card tokens post "/", Token, :create end scope "/", Tokenizer.Controllers do pipe_through :private_api # Create and get payment post "/payments", Payment, :create get "/payments/:id", Payment, :show # Complete payments # post "/payments/:id/auth", PaymentAuthorization, :authorize # post "/payments/:id/claim", Payment, :claim end end
defmodule Tokenizer.Router do @moduledoc """ The router provides a set of macros for generating routes that dispatch to specific controllers and actions. Those macros are named after HTTP verbs. More info at: https://hexdocs.pm/phoenix/Phoenix.Router.html """ use Tokenizer.Web, :router - pipeline :api do + pipeline :public_api do ? +++++++ + plug :accepts, ["json"] + plug :put_secure_browser_headers + end + + pipeline :private_api do plug :accepts, ["json"] plug :put_secure_browser_headers plug Tokenizer.HTTP.Plugs.Authorization end - scope "/", Tokenizer.Controllers do + scope "/tokens", Tokenizer.Controllers do ? ++++++ - pipe_through :api + pipe_through :public_api ? +++++++ # Create card tokens - post "/tokens", Token, :create ? ------ + post "/", Token, :create + end + + scope "/", Tokenizer.Controllers do + pipe_through :private_api # Create and get payment post "/payments", Payment, :create get "/payments/:id", Payment, :show # Complete payments # post "/payments/:id/auth", PaymentAuthorization, :authorize # post "/payments/:id/claim", Payment, :claim end end
17
0.53125
13
4
3ba4d8227c3098da2cbc666390d7b0d7835c3bc3
app/Joindin/Model/Db/User.php
app/Joindin/Model/Db/User.php
<?php namespace Joindin\Model\Db; class User { protected $keyName = 'users'; protected $db; public function __construct() { $this->db = new \Joindin\Service\Db; } public function getUriFor($username) { $data = $this->db->getOneByKey($this->keyName, 'username', $username); return $data['uri']; } public function load($uri) { $data = $this->db->getOneByKey($this->keyName, 'uri', $uri); return $data; } public function saveSlugToDatabase($user) { $data = array( 'uri' => $user->getUri(), 'username' => $user->getUsername(), 'slug' => $user->getUsername(), 'verbose_uri' => $user->getVerboseUri() ); $mongoUser = $this->load($user->getUri()); if ($mongoUser) { // user is already known - update this record $data = array_merge($mongoUser, $data); } return $this->db->save($this->keyName, $data); } }
<?php namespace Joindin\Model\Db; use \Joindin\Service\Db as DbService; class User { protected $keyName = 'users'; protected $db; public function __construct() { $this->db = new DbService(); } public function getUriFor($username) { $data = $this->db->getOneByKey($this->keyName, 'username', $username); return $data['uri']; } public function load($uri) { $data = $this->db->getOneByKey($this->keyName, 'uri', $uri); return $data; } public function saveSlugToDatabase($user) { $data = array( 'uri' => $user->getUri(), 'username' => $user->getUsername(), 'slug' => $user->getUsername(), 'verbose_uri' => $user->getVerboseUri() ); $mongoUser = $this->load($user->getUri()); if ($mongoUser) { // user is already known - update this record $data = array_merge($mongoUser, $data); } return $this->db->save($this->keyName, $data); } }
Move fully qualified class name to a use statement
Move fully qualified class name to a use statement
PHP
bsd-3-clause
jan2442/joindin-web2,liam-wiltshire/joindin-web2,dstockto/joindin-web2,akrabat/joindin-web2,jozzya/joindin-web2,railto/joindin-web2,phoenixrises/joindin-web2,richsage/joindin-web2,dannym87/joindin-web2,cal-tec/joindin-web2,liam-wiltshire/joindin-web2,tdutrion/joindin-web2,shaunmza/joindin-web2,studio24/joindin-web2,liam-wiltshire/joindin-web2,railto/joindin-web2,waterada/joindin-web2,dannym87/joindin-web2,kazu9su/joindin-web2,heiglandreas/joindin-web2,aenglander/joindin-web2,akrabat/joindin-web2,jozzya/joindin-web2,lornajane/web2,tdutrion/joindin-web2,asgrim/joindin-web2,kazu9su/joindin-web2,phoenixrises/joindin-web2,heiglandreas/joindin-web2,dstockto/joindin-web2,rogeriopradoj/joindin-web2,lornajane/web2,jan2442/joindin-web2,cal-tec/joindin-web2,waterada/joindin-web2,heiglandreas/joindin-web2,EricHogue/joindin-web2,richsage/joindin-web2,akrabat/joindin-web2,jan2442/joindin-web2,joindin/joindin-web2,studio24/joindin-web2,asgrim/joindin-web2,railto/joindin-web2,EricHogue/joindin-web2,jan2442/joindin-web2,cal-tec/joindin-web2,richsage/joindin-web2,cal-tec/joindin-web2,EricHogue/joindin-web2,richsage/joindin-web2,kazu9su/joindin-web2,jozzya/joindin-web2,phoenixrises/joindin-web2,rogeriopradoj/joindin-web2,akrabat/joindin-web2,rogeriopradoj/joindin-web2,studio24/joindin-web2,joindin/joindin-web2,dstockto/joindin-web2,railto/joindin-web2,shaunmza/joindin-web2,rogeriopradoj/joindin-web2,dannym87/joindin-web2,studio24/joindin-web2,heiglandreas/joindin-web2,asgrim/joindin-web2,aenglander/joindin-web2,asgrim/joindin-web2,aenglander/joindin-web2,dannym87/joindin-web2,shaunmza/joindin-web2,lornajane/web2,waterada/joindin-web2,waterada/joindin-web2,EricHogue/joindin-web2,lornajane/web2,aenglander/joindin-web2,dstockto/joindin-web2,jozzya/joindin-web2,joindin/joindin-web2,liam-wiltshire/joindin-web2,tdutrion/joindin-web2,tdutrion/joindin-web2,joindin/joindin-web2,shaunmza/joindin-web2,phoenixrises/joindin-web2
php
## Code Before: <?php namespace Joindin\Model\Db; class User { protected $keyName = 'users'; protected $db; public function __construct() { $this->db = new \Joindin\Service\Db; } public function getUriFor($username) { $data = $this->db->getOneByKey($this->keyName, 'username', $username); return $data['uri']; } public function load($uri) { $data = $this->db->getOneByKey($this->keyName, 'uri', $uri); return $data; } public function saveSlugToDatabase($user) { $data = array( 'uri' => $user->getUri(), 'username' => $user->getUsername(), 'slug' => $user->getUsername(), 'verbose_uri' => $user->getVerboseUri() ); $mongoUser = $this->load($user->getUri()); if ($mongoUser) { // user is already known - update this record $data = array_merge($mongoUser, $data); } return $this->db->save($this->keyName, $data); } } ## Instruction: Move fully qualified class name to a use statement ## Code After: <?php namespace Joindin\Model\Db; use \Joindin\Service\Db as DbService; class User { protected $keyName = 'users'; protected $db; public function __construct() { $this->db = new DbService(); } public function getUriFor($username) { $data = $this->db->getOneByKey($this->keyName, 'username', $username); return $data['uri']; } public function load($uri) { $data = $this->db->getOneByKey($this->keyName, 'uri', $uri); return $data; } public function saveSlugToDatabase($user) { $data = array( 'uri' => $user->getUri(), 'username' => $user->getUsername(), 'slug' => $user->getUsername(), 'verbose_uri' => $user->getVerboseUri() ); $mongoUser = $this->load($user->getUri()); if ($mongoUser) { // user is already known - update this record $data = array_merge($mongoUser, $data); } return $this->db->save($this->keyName, $data); } }
<?php namespace Joindin\Model\Db; + + use \Joindin\Service\Db as DbService; class User { protected $keyName = 'users'; protected $db; public function __construct() { - $this->db = new \Joindin\Service\Db; ? ^^^^^^^^^ ^^^ + $this->db = new DbService(); ? ^^ ^^ } public function getUriFor($username) { $data = $this->db->getOneByKey($this->keyName, 'username', $username); return $data['uri']; } public function load($uri) { $data = $this->db->getOneByKey($this->keyName, 'uri', $uri); return $data; } public function saveSlugToDatabase($user) { $data = array( 'uri' => $user->getUri(), 'username' => $user->getUsername(), 'slug' => $user->getUsername(), 'verbose_uri' => $user->getVerboseUri() ); $mongoUser = $this->load($user->getUri()); if ($mongoUser) { // user is already known - update this record $data = array_merge($mongoUser, $data); } return $this->db->save($this->keyName, $data); } }
4
0.093023
3
1
952f506b5f81a47d7a2061b8bab31533f740311f
BMCredentials.podspec
BMCredentials.podspec
Pod::Spec.new do |s| s.name = "BMCredentials" s.version = "1.0.0" s.summary = "Only make your users sign in once for all their devices. Conveniently and securely stores user credentials and syncs with iCloud Keychain." s.homepage = "https://github.com/iosengineer/BMCredentials" s.license = 'MIT' s.author = { "Adam Iredale" => "adam@bionicmonocle.com" } s.source = { :git => "https://github.com/iosengineer/BMCredentials.git", :tag => s.version.to_s } s.social_media_url = 'https://twitter.com/iosengineer' s.platform = :ios, '7.1' s.ios.deployment_target = '7.0' s.requires_arc = true s.source_files = 'Classes' s.ios.exclude_files = 'Classes/osx' s.osx.exclude_files = 'Classes/ios' s.framework = 'Security' end
Pod::Spec.new do |s| s.name = "BMCredentials" s.version = "1.0.1" s.summary = "Only make your users sign in once for all their devices. Conveniently and securely stores user credentials and syncs with iCloud Keychain." s.homepage = "https://github.com/iosengineer/BMCredentials" s.license = 'MIT' s.author = { "Adam Iredale" => "@iosengineer" } s.source = { :git => "https://github.com/iosengineer/BMCredentials.git", :tag => s.version.to_s } s.social_media_url = 'https://twitter.com/iosengineer' s.platform = :ios, '7.1' s.ios.deployment_target = '7.0' s.requires_arc = true s.source_files = 'Classes' s.ios.exclude_files = 'Classes/osx' s.osx.exclude_files = 'Classes/ios' s.framework = 'Security' end
Update spec for bugfix version 1.0.1
Update spec for bugfix version 1.0.1
Ruby
mit
iosengineer/BMCredentials,iosengineer/BMCredentials,iosengineer/BMCredentials
ruby
## Code Before: Pod::Spec.new do |s| s.name = "BMCredentials" s.version = "1.0.0" s.summary = "Only make your users sign in once for all their devices. Conveniently and securely stores user credentials and syncs with iCloud Keychain." s.homepage = "https://github.com/iosengineer/BMCredentials" s.license = 'MIT' s.author = { "Adam Iredale" => "adam@bionicmonocle.com" } s.source = { :git => "https://github.com/iosengineer/BMCredentials.git", :tag => s.version.to_s } s.social_media_url = 'https://twitter.com/iosengineer' s.platform = :ios, '7.1' s.ios.deployment_target = '7.0' s.requires_arc = true s.source_files = 'Classes' s.ios.exclude_files = 'Classes/osx' s.osx.exclude_files = 'Classes/ios' s.framework = 'Security' end ## Instruction: Update spec for bugfix version 1.0.1 ## Code After: Pod::Spec.new do |s| s.name = "BMCredentials" s.version = "1.0.1" s.summary = "Only make your users sign in once for all their devices. Conveniently and securely stores user credentials and syncs with iCloud Keychain." s.homepage = "https://github.com/iosengineer/BMCredentials" s.license = 'MIT' s.author = { "Adam Iredale" => "@iosengineer" } s.source = { :git => "https://github.com/iosengineer/BMCredentials.git", :tag => s.version.to_s } s.social_media_url = 'https://twitter.com/iosengineer' s.platform = :ios, '7.1' s.ios.deployment_target = '7.0' s.requires_arc = true s.source_files = 'Classes' s.ios.exclude_files = 'Classes/osx' s.osx.exclude_files = 'Classes/ios' s.framework = 'Security' end
Pod::Spec.new do |s| s.name = "BMCredentials" - s.version = "1.0.0" ? ^ + s.version = "1.0.1" ? ^ s.summary = "Only make your users sign in once for all their devices. Conveniently and securely stores user credentials and syncs with iCloud Keychain." s.homepage = "https://github.com/iosengineer/BMCredentials" s.license = 'MIT' - s.author = { "Adam Iredale" => "adam@bionicmonocle.com" } ? ---- - --- --- ^^^^ + s.author = { "Adam Iredale" => "@iosengineer" } ? ++ + ^^ s.source = { :git => "https://github.com/iosengineer/BMCredentials.git", :tag => s.version.to_s } s.social_media_url = 'https://twitter.com/iosengineer' s.platform = :ios, '7.1' s.ios.deployment_target = '7.0' s.requires_arc = true s.source_files = 'Classes' s.ios.exclude_files = 'Classes/osx' s.osx.exclude_files = 'Classes/ios' s.framework = 'Security' end
4
0.190476
2
2
a13473d68f4233353e40c9f34305ebe3d18648d2
README.md
README.md
[![Backlog](https://badge.waffle.io/cegeka/dev-workflow-skeleton.svg?label=backlog&title=Backlog)](http://waffle.io/cegeka/dev-workflow-skeleton) [![In Progress](https://badge.waffle.io/cegeka/dev-workflow-skeleton.svg?label=in-progress&title=In-Progress)](http://waffle.io/cegeka/dev-workflow-skeleton) [![Done](https://badge.waffle.io/cegeka/dev-workflow-skeleton.svg?label=done&title=Done)](http://waffle.io/cegeka/dev-workflow-skeleton) The goal of this innovation center is to setup a small project that can be used to quickly bootstrap the development of new applications.
The goal of this innovation center is to setup a small project that can be used to quickly bootstrap the development of new applications.
Remove badges again, not working yet
Remove badges again, not working yet
Markdown
apache-2.0
cegeka/dev-workflow-skeleton,cegeka/dev-workflow-skeleton,cegeka/dev-workflow-skeleton,cegeka/dev-workflow-skeleton,cegeka/dev-workflow-skeleton
markdown
## Code Before: [![Backlog](https://badge.waffle.io/cegeka/dev-workflow-skeleton.svg?label=backlog&title=Backlog)](http://waffle.io/cegeka/dev-workflow-skeleton) [![In Progress](https://badge.waffle.io/cegeka/dev-workflow-skeleton.svg?label=in-progress&title=In-Progress)](http://waffle.io/cegeka/dev-workflow-skeleton) [![Done](https://badge.waffle.io/cegeka/dev-workflow-skeleton.svg?label=done&title=Done)](http://waffle.io/cegeka/dev-workflow-skeleton) The goal of this innovation center is to setup a small project that can be used to quickly bootstrap the development of new applications. ## Instruction: Remove badges again, not working yet ## Code After: The goal of this innovation center is to setup a small project that can be used to quickly bootstrap the development of new applications.
- - [![Backlog](https://badge.waffle.io/cegeka/dev-workflow-skeleton.svg?label=backlog&title=Backlog)](http://waffle.io/cegeka/dev-workflow-skeleton) [![In Progress](https://badge.waffle.io/cegeka/dev-workflow-skeleton.svg?label=in-progress&title=In-Progress)](http://waffle.io/cegeka/dev-workflow-skeleton) [![Done](https://badge.waffle.io/cegeka/dev-workflow-skeleton.svg?label=done&title=Done)](http://waffle.io/cegeka/dev-workflow-skeleton) The goal of this innovation center is to setup a small project that can be used to quickly bootstrap the development of new applications.
2
0.5
0
2
87c6a75cc3fc42e09fe1867915442daedb08b3a8
.travis.yml
.travis.yml
language: python python: - "3.6" sudo: false install: - pip install pipenv - pipenv shell - pipenv install --dev - pip install tox-travis script: tox after_success: - tox -e ci - scripts/discord-webhook.sh success $WEBHOOK_URL after_failure: - scripts/discord-webhook.sh failure $WEBHOOK_URL
language: python python: - "3.6" sudo: false install: - pip install pipenv - pipenv install --dev --system - pipenv run pip install tox-travis script: pipenv run tox after_success: - pipenv run tox -e ci - scripts/discord-webhook.sh success $WEBHOOK_URL after_failure: - scripts/discord-webhook.sh failure $WEBHOOK_URL
Use pipenv run instead of shell
ci: Use pipenv run instead of shell
YAML
mit
kevinkjt2000/discord-minecraft-server-status
yaml
## Code Before: language: python python: - "3.6" sudo: false install: - pip install pipenv - pipenv shell - pipenv install --dev - pip install tox-travis script: tox after_success: - tox -e ci - scripts/discord-webhook.sh success $WEBHOOK_URL after_failure: - scripts/discord-webhook.sh failure $WEBHOOK_URL ## Instruction: ci: Use pipenv run instead of shell ## Code After: language: python python: - "3.6" sudo: false install: - pip install pipenv - pipenv install --dev --system - pipenv run pip install tox-travis script: pipenv run tox after_success: - pipenv run tox -e ci - scripts/discord-webhook.sh success $WEBHOOK_URL after_failure: - scripts/discord-webhook.sh failure $WEBHOOK_URL
language: python python: - "3.6" sudo: false install: - pip install pipenv - - pipenv shell - - pipenv install --dev + - pipenv install --dev --system ? +++++++++ - - pip install tox-travis + - pipenv run pip install tox-travis ? +++++++++++ - script: tox + script: pipenv run tox after_success: - - tox -e ci + - pipenv run tox -e ci - scripts/discord-webhook.sh success $WEBHOOK_URL after_failure: - scripts/discord-webhook.sh failure $WEBHOOK_URL
9
0.6
4
5
ff4972c1eb1b5de439b841c7fadcd4f8692a54ef
README.md
README.md
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1345344.svg)](https://doi.org/10.5281/zenodo.1345344) # r-cytoscape.js: Update **August 27, 2018** The r-cytoscape.js package has been updated to a new code base making use of the latest cytoscape.js. The code is very bleeding edge. Testing and documentation are still being finalized. Users can grab the the lastest version of r-cytoscape.js 0.0.7 from the [releases](https://github.com/cytoscape/cyjShiny/releases) and install with devtools::install(). # cyjShiny cytoscape.js as a shiny widget, with an API based on RCyjs (and ancestrally, RCy3) For more information, please visit the cyjShiny [Wiki](https://github.com/paul-shannon/cyjShiny/wiki). ![model](ygModelImage.png)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1345344.svg)](https://doi.org/10.5281/zenodo.1345344) # cyjShiny cytoscape.js as a shiny widget, with an API based on RCyjs (and ancestrally, RCy3) For more information, please visit the cyjShiny [Wiki](https://github.com/paul-shannon/cyjShiny/wiki). ![model](ygModelImage.png) # r-cytoscape.js: Update **August 27, 2018** The r-cytoscape.js package has been updated to a new code base making use of the latest cytoscape.js. The code is very bleeding edge. Testing and documentation are still being finalized. Users can grab the the lastest version of r-cytoscape.js 0.0.7 from the [releases](https://github.com/cytoscape/cyjShiny/releases) and install with devtools::install().
Downgrade information about previous implementation
Downgrade information about previous implementation
Markdown
apache-2.0
cytoscape/r-cytoscape.js,cytoscape/r-cytoscape.js
markdown
## Code Before: [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1345344.svg)](https://doi.org/10.5281/zenodo.1345344) # r-cytoscape.js: Update **August 27, 2018** The r-cytoscape.js package has been updated to a new code base making use of the latest cytoscape.js. The code is very bleeding edge. Testing and documentation are still being finalized. Users can grab the the lastest version of r-cytoscape.js 0.0.7 from the [releases](https://github.com/cytoscape/cyjShiny/releases) and install with devtools::install(). # cyjShiny cytoscape.js as a shiny widget, with an API based on RCyjs (and ancestrally, RCy3) For more information, please visit the cyjShiny [Wiki](https://github.com/paul-shannon/cyjShiny/wiki). ![model](ygModelImage.png) ## Instruction: Downgrade information about previous implementation ## Code After: [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1345344.svg)](https://doi.org/10.5281/zenodo.1345344) # cyjShiny cytoscape.js as a shiny widget, with an API based on RCyjs (and ancestrally, RCy3) For more information, please visit the cyjShiny [Wiki](https://github.com/paul-shannon/cyjShiny/wiki). ![model](ygModelImage.png) # r-cytoscape.js: Update **August 27, 2018** The r-cytoscape.js package has been updated to a new code base making use of the latest cytoscape.js. The code is very bleeding edge. Testing and documentation are still being finalized. Users can grab the the lastest version of r-cytoscape.js 0.0.7 from the [releases](https://github.com/cytoscape/cyjShiny/releases) and install with devtools::install().
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1345344.svg)](https://doi.org/10.5281/zenodo.1345344) - - # r-cytoscape.js: Update **August 27, 2018** - - The r-cytoscape.js package has been updated to a new code base making use of the latest cytoscape.js. The code is very bleeding edge. Testing and documentation are still being finalized. Users can grab the the lastest version of r-cytoscape.js 0.0.7 from the [releases](https://github.com/cytoscape/cyjShiny/releases) and install with devtools::install(). # cyjShiny cytoscape.js as a shiny widget, with an API based on RCyjs (and ancestrally, RCy3) For more information, please visit the cyjShiny [Wiki](https://github.com/paul-shannon/cyjShiny/wiki). ![model](ygModelImage.png) + + # r-cytoscape.js: Update **August 27, 2018** + + The r-cytoscape.js package has been updated to a new code base making use of the latest cytoscape.js. The code is very bleeding edge. Testing and documentation are still being finalized. Users can grab the the lastest version of r-cytoscape.js 0.0.7 from the [releases](https://github.com/cytoscape/cyjShiny/releases) and install with devtools::install().
8
0.615385
4
4
db5db27b52fbda40181eabc0dd4d036042e24e1c
reports.d/43-ntp.sh
reports.d/43-ntp.sh
echo "NTP Statistics" if [ -n "$(which ntpq)" ]; then echo "$(ntpq -p)" else echo "ntpq not installed" fi echo if [ -n "$(which ntpstat)" ]; then echo "$(ntpstat)" else echo "ntpstat not installed" fi
echo "NTP Statistics" if [ -n "$(which ntpq)" ]; then echo "$(ntpq -p 2>&1)" fi echo if [ -n "$(which chronyc)" ]; then echo "$(chronyc sources)" fi
Remove ntpstat command, add chronyc
Remove ntpstat command, add chronyc
Shell
mit
onesimus-systems/sysreporter
shell
## Code Before: echo "NTP Statistics" if [ -n "$(which ntpq)" ]; then echo "$(ntpq -p)" else echo "ntpq not installed" fi echo if [ -n "$(which ntpstat)" ]; then echo "$(ntpstat)" else echo "ntpstat not installed" fi ## Instruction: Remove ntpstat command, add chronyc ## Code After: echo "NTP Statistics" if [ -n "$(which ntpq)" ]; then echo "$(ntpq -p 2>&1)" fi echo if [ -n "$(which chronyc)" ]; then echo "$(chronyc sources)" fi
echo "NTP Statistics" if [ -n "$(which ntpq)" ]; then - echo "$(ntpq -p)" + echo "$(ntpq -p 2>&1)" ? +++++ - else - echo "ntpq not installed" fi echo - if [ -n "$(which ntpstat)" ]; then ? ^^^^^^ + if [ -n "$(which chronyc)" ]; then ? ++++ ^^ + echo "$(chronyc sources)" - echo "$(ntpstat)" - else - echo "ntpstat not installed" fi
10
0.666667
3
7
e528d5178b8533c377e75ed7f7be6479d5d74340
lib/templates/json/production_package.json
lib/templates/json/production_package.json
{ "name": "<%= name %>", "version": "0.1.0", "description": "<%= name %> application built with Electron", "author": "<%= author %>", "license": "MIT", "main": "javascripts/main/index.js", "dependencies": { } }
{ "name": "<%= name %>", "version": "0.1.0", "description": "<%= name %> application built with Electron", "author": { "name": "<%= author %>", "email": "" }, "license": "MIT", "main": "javascripts/main/index.js", "dependencies": { } }
Update production package.json to contain author email
Update production package.json to contain author email
JSON
mit
railsware/bozon,railsware/bozon
json
## Code Before: { "name": "<%= name %>", "version": "0.1.0", "description": "<%= name %> application built with Electron", "author": "<%= author %>", "license": "MIT", "main": "javascripts/main/index.js", "dependencies": { } } ## Instruction: Update production package.json to contain author email ## Code After: { "name": "<%= name %>", "version": "0.1.0", "description": "<%= name %> application built with Electron", "author": { "name": "<%= author %>", "email": "" }, "license": "MIT", "main": "javascripts/main/index.js", "dependencies": { } }
{ "name": "<%= name %>", "version": "0.1.0", "description": "<%= name %> application built with Electron", + "author": { - "author": "<%= author %>", ? ^^^^^ + "name": "<%= author %>", ? ++ + ^^ + "email": "" + }, "license": "MIT", "main": "javascripts/main/index.js", "dependencies": { } }
5
0.454545
4
1
a02aab5aa47b6488c285a480cb6ee66b0ed215af
main.cpp
main.cpp
int main() { int *a; int *n = a; a = n; *n = 5; return 0; }
int main() { int input; if (scanf("%d", &input) == 1) { if (input == 2) { int *a; int *n = a; a = n; *n = 5; } else { printf("OK\n"); } } return 0; }
Add a special condition so that static analyzers could write the exact condition when problem happens
Add a special condition so that static analyzers could write the exact condition when problem happens
C++
mit
mmenshchikov/bugdetection_uninitialized_value,mmenshchikov/bugdetection_uninitialized_value
c++
## Code Before: int main() { int *a; int *n = a; a = n; *n = 5; return 0; } ## Instruction: Add a special condition so that static analyzers could write the exact condition when problem happens ## Code After: int main() { int input; if (scanf("%d", &input) == 1) { if (input == 2) { int *a; int *n = a; a = n; *n = 5; } else { printf("OK\n"); } } return 0; }
int main() { - int *a; + int input; + if (scanf("%d", &input) == 1) + { + if (input == 2) + { + int *a; - int *n = a; + int *n = a; ? ++++++++ - a = n; - *n = 5; + a = n; + *n = 5; + } + else + { + printf("OK\n"); + } + } return 0; }
19
2.111111
15
4
accaed5f8fdad18e5ad404661b8754aaf9bd4b9c
package.json
package.json
{ "name": "linter-erlc", "version": "0.3.1", "linter-package": true, "main": "./lib/init", "description": "Bare Minimum Erlang lint package", "repository": "https://github.com/AtomLinter/linter-erlc", "license": "MIT", "engines": { "atom": ">=1.0.0 <2.0.0" }, "dependencies": { "atom-linter": "^10.0.0", "atom-package-deps": "^4.0.1", "tmp": "^0.0.33" }, "providedServices": { "linter": { "versions": { "1.0.0": "provideLinter" } } }, "package-deps": [ "linter", "language-erlang" ] }
{ "private": true, "name": "linter-erlc", "version": "0.3.1", "linter-package": true, "main": "./lib/init", "description": "Bare Minimum Erlang lint package", "repository": "https://github.com/AtomLinter/linter-erlc", "license": "MIT", "engines": { "atom": ">=1.0.0 <2.0.0" }, "dependencies": { "atom-linter": "^10.0.0", "atom-package-deps": "^4.0.1", "tmp": "^0.0.33" }, "providedServices": { "linter": { "versions": { "1.0.0": "provideLinter" } } }, "package-deps": [ "linter", "language-erlang" ] }
Set the project to private for NPM
Set the project to private for NPM Make sure NPM never publishes this by accident and disables some meaningless checks.
JSON
mit
AtomLinter/linter-erlc
json
## Code Before: { "name": "linter-erlc", "version": "0.3.1", "linter-package": true, "main": "./lib/init", "description": "Bare Minimum Erlang lint package", "repository": "https://github.com/AtomLinter/linter-erlc", "license": "MIT", "engines": { "atom": ">=1.0.0 <2.0.0" }, "dependencies": { "atom-linter": "^10.0.0", "atom-package-deps": "^4.0.1", "tmp": "^0.0.33" }, "providedServices": { "linter": { "versions": { "1.0.0": "provideLinter" } } }, "package-deps": [ "linter", "language-erlang" ] } ## Instruction: Set the project to private for NPM Make sure NPM never publishes this by accident and disables some meaningless checks. ## Code After: { "private": true, "name": "linter-erlc", "version": "0.3.1", "linter-package": true, "main": "./lib/init", "description": "Bare Minimum Erlang lint package", "repository": "https://github.com/AtomLinter/linter-erlc", "license": "MIT", "engines": { "atom": ">=1.0.0 <2.0.0" }, "dependencies": { "atom-linter": "^10.0.0", "atom-package-deps": "^4.0.1", "tmp": "^0.0.33" }, "providedServices": { "linter": { "versions": { "1.0.0": "provideLinter" } } }, "package-deps": [ "linter", "language-erlang" ] }
{ + "private": true, "name": "linter-erlc", "version": "0.3.1", "linter-package": true, "main": "./lib/init", "description": "Bare Minimum Erlang lint package", "repository": "https://github.com/AtomLinter/linter-erlc", "license": "MIT", "engines": { "atom": ">=1.0.0 <2.0.0" }, "dependencies": { "atom-linter": "^10.0.0", "atom-package-deps": "^4.0.1", "tmp": "^0.0.33" }, "providedServices": { "linter": { "versions": { "1.0.0": "provideLinter" } } }, "package-deps": [ "linter", "language-erlang" ] }
1
0.035714
1
0
e5d2c6404fe8250bf18381af78d5e3ba5c94c224
visualization/app/codeCharta/state/store/fileSettings/attributeTypes/attributeTypes.reducer.ts
visualization/app/codeCharta/state/store/fileSettings/attributeTypes/attributeTypes.reducer.ts
import { AttributeTypesAction, AttributeTypesActions, setAttributeTypes, UpdateAttributeTypeAction } from "./attributeTypes.actions" import { AttributeTypes } from "../../../../codeCharta.model" const clone = require("rfdc")() export function attributeTypes(state: AttributeTypes = setAttributeTypes().payload, action: AttributeTypesAction): AttributeTypes { switch (action.type) { case AttributeTypesActions.SET_ATTRIBUTE_TYPES: return clone(action.payload) case AttributeTypesActions.UPDATE_ATTRIBUTE_TYPE: return updateAttributeType(state, action) default: return state } } function updateAttributeType(state: AttributeTypes, action: UpdateAttributeTypeAction) { const copy = clone(state) if (copy[action.payload.category]) { copy[action.payload.category][action.payload.name] = action.payload.type } return copy }
import { AttributeTypesAction, AttributeTypesActions, setAttributeTypes, UpdateAttributeTypeAction } from "./attributeTypes.actions" import { AttributeTypes } from "../../../../codeCharta.model" const clone = require("rfdc")() export function attributeTypes(state: AttributeTypes = setAttributeTypes().payload, action: AttributeTypesAction): AttributeTypes { switch (action.type) { case AttributeTypesActions.SET_ATTRIBUTE_TYPES: return clone(action.payload) case AttributeTypesActions.UPDATE_ATTRIBUTE_TYPE: return updateAttributeType(state, action) default: return state } } function updateAttributeType(state: AttributeTypes, action: UpdateAttributeTypeAction): AttributeTypes { return { ...state, [action.payload.category]: { ...state[action.payload.category], [action.payload.name]: action.payload.type } } }
Refactor use shallow clone instead of deep clone
Refactor use shallow clone instead of deep clone
TypeScript
bsd-3-clause
MaibornWolff/codecharta,MaibornWolff/codecharta,MaibornWolff/codecharta,MaibornWolff/codecharta,MaibornWolff/codecharta,MaibornWolff/codecharta,MaibornWolff/codecharta,MaibornWolff/codecharta
typescript
## Code Before: import { AttributeTypesAction, AttributeTypesActions, setAttributeTypes, UpdateAttributeTypeAction } from "./attributeTypes.actions" import { AttributeTypes } from "../../../../codeCharta.model" const clone = require("rfdc")() export function attributeTypes(state: AttributeTypes = setAttributeTypes().payload, action: AttributeTypesAction): AttributeTypes { switch (action.type) { case AttributeTypesActions.SET_ATTRIBUTE_TYPES: return clone(action.payload) case AttributeTypesActions.UPDATE_ATTRIBUTE_TYPE: return updateAttributeType(state, action) default: return state } } function updateAttributeType(state: AttributeTypes, action: UpdateAttributeTypeAction) { const copy = clone(state) if (copy[action.payload.category]) { copy[action.payload.category][action.payload.name] = action.payload.type } return copy } ## Instruction: Refactor use shallow clone instead of deep clone ## Code After: import { AttributeTypesAction, AttributeTypesActions, setAttributeTypes, UpdateAttributeTypeAction } from "./attributeTypes.actions" import { AttributeTypes } from "../../../../codeCharta.model" const clone = require("rfdc")() export function attributeTypes(state: AttributeTypes = setAttributeTypes().payload, action: AttributeTypesAction): AttributeTypes { switch (action.type) { case AttributeTypesActions.SET_ATTRIBUTE_TYPES: return clone(action.payload) case AttributeTypesActions.UPDATE_ATTRIBUTE_TYPE: return updateAttributeType(state, action) default: return state } } function updateAttributeType(state: AttributeTypes, action: UpdateAttributeTypeAction): AttributeTypes { return { ...state, [action.payload.category]: { ...state[action.payload.category], [action.payload.name]: action.payload.type } } }
import { AttributeTypesAction, AttributeTypesActions, setAttributeTypes, UpdateAttributeTypeAction } from "./attributeTypes.actions" import { AttributeTypes } from "../../../../codeCharta.model" const clone = require("rfdc")() export function attributeTypes(state: AttributeTypes = setAttributeTypes().payload, action: AttributeTypesAction): AttributeTypes { switch (action.type) { case AttributeTypesActions.SET_ATTRIBUTE_TYPES: return clone(action.payload) case AttributeTypesActions.UPDATE_ATTRIBUTE_TYPE: return updateAttributeType(state, action) default: return state } } - function updateAttributeType(state: AttributeTypes, action: UpdateAttributeTypeAction) { + function updateAttributeType(state: AttributeTypes, action: UpdateAttributeTypeAction): AttributeTypes { ? ++++++++++++++++ + return { ...state, [action.payload.category]: { ...state[action.payload.category], [action.payload.name]: action.payload.type } } - const copy = clone(state) - if (copy[action.payload.category]) { - copy[action.payload.category][action.payload.name] = action.payload.type - } - return copy }
8
0.363636
2
6
5f687da12aa3c567734490fa8de03c32170d9758
README.md
README.md
<a href="http://drone.cloud-api.info/github.com/rackerlabs/anchor"><img src="http://drone.cloud-api.info/github.com/rackerlabs/anchor/status.svg?branch=master" /></a>&nbsp;<a href="https://anchor.readthedocs.org"><img src="https://readthedocs.org/projects/anchor/badge/?version=latest" /></a> Anchor ======== Anchor provides an easy way to quickly view your Rackspace cloud server distribution between host servers. In addition you can use the API to ask whether the new server that has just been built shares a host with another server in your account. This provides insight into which of your server(s) would be affected if a specific host server has an issue causing downtime. To view the API documentation you can visit https://anchor.readthedocs.org
<a href="http://drone.cloud-api.info/github.com/rackerlabs/anchor"><img src="http://drone.cloud-api.info/github.com/rackerlabs/anchor/status.svg?branch=master" /></a>&nbsp;<a href="https://anchor.readthedocs.org"><img src="https://readthedocs.org/projects/anchor/badge/?version=latest" /></a> Anchor ======== Anchor provides an easy way to quickly view your Rackspace cloud server distribution between host servers by Data Center. In addition you can utilize an API to ask whether the new server that has just been built shares a host with another server in your account. This provides insight into which of your server(s) would be affected if a specific host server has an issue causing downtime. To view the API documentation you can visit https://anchor.readthedocs.org
Update readme to make it flow better
Update readme to make it flow better
Markdown
apache-2.0
oldarmyc/anchor,oldarmyc/anchor,oldarmyc/anchor
markdown
## Code Before: <a href="http://drone.cloud-api.info/github.com/rackerlabs/anchor"><img src="http://drone.cloud-api.info/github.com/rackerlabs/anchor/status.svg?branch=master" /></a>&nbsp;<a href="https://anchor.readthedocs.org"><img src="https://readthedocs.org/projects/anchor/badge/?version=latest" /></a> Anchor ======== Anchor provides an easy way to quickly view your Rackspace cloud server distribution between host servers. In addition you can use the API to ask whether the new server that has just been built shares a host with another server in your account. This provides insight into which of your server(s) would be affected if a specific host server has an issue causing downtime. To view the API documentation you can visit https://anchor.readthedocs.org ## Instruction: Update readme to make it flow better ## Code After: <a href="http://drone.cloud-api.info/github.com/rackerlabs/anchor"><img src="http://drone.cloud-api.info/github.com/rackerlabs/anchor/status.svg?branch=master" /></a>&nbsp;<a href="https://anchor.readthedocs.org"><img src="https://readthedocs.org/projects/anchor/badge/?version=latest" /></a> Anchor ======== Anchor provides an easy way to quickly view your Rackspace cloud server distribution between host servers by Data Center. In addition you can utilize an API to ask whether the new server that has just been built shares a host with another server in your account. This provides insight into which of your server(s) would be affected if a specific host server has an issue causing downtime. To view the API documentation you can visit https://anchor.readthedocs.org
<a href="http://drone.cloud-api.info/github.com/rackerlabs/anchor"><img src="http://drone.cloud-api.info/github.com/rackerlabs/anchor/status.svg?branch=master" /></a>&nbsp;<a href="https://anchor.readthedocs.org"><img src="https://readthedocs.org/projects/anchor/badge/?version=latest" /></a> Anchor ======== - Anchor provides an easy way to quickly view your Rackspace cloud server distribution between host servers. + Anchor provides an easy way to quickly view your Rackspace cloud server distribution between host servers by Data Center. ? +++++++++++++++ - In addition you can use the API to ask whether the new server that has just been built shares a host with another server in your account. This provides insight into which of your server(s) would be affected if a specific host server has an issue causing downtime. ? ^^^^^^ + In addition you can utilize an API to ask whether the new server that has just been built shares a host with another server in your account. This provides insight into which of your server(s) would be affected if a specific host server has an issue causing downtime. ? ^^^^^^^^^ To view the API documentation you can visit https://anchor.readthedocs.org
4
0.4
2
2
60094f1b0c1517f823b47bf1f2f22340dc259cd3
lib/fucking_scripts_digital_ocean/scp.rb
lib/fucking_scripts_digital_ocean/scp.rb
module FuckingScriptsDigitalOcean class SCP FILENAME = "fss.tar.gz" def initialize(server, opts) @server, @opts = server, opts end def to_server create_local_archive scp_files_to_server extract_remote_archive remove_local_archive end private def create_local_archive includes = @opts.fetch(:files) + @opts.fetch(:scripts) `tar -czf #{FILENAME} #{includes.join(" ")}` end def scp_files_to_server @server.scp(FILENAME, ".") end def extract_remote_archive @server.ssh("tar -xzf #{FILENAME}") end def remove_local_archive `rm -f #{FILENAME}` end end end
module FuckingScriptsDigitalOcean class SCP FILENAME = "fss.tar.gz" def initialize(server, opts) @server, @opts = server, opts end def to_server create_local_archive scp_files_to_server extract_remote_archive remove_local_archive end private def create_local_archive files = @opts[:files] || [] scripts = @opts[:scripts] || [] includes = files + scripts if includes.empty? raise "Both files and scripts are empty. You should provide some" end `tar -czf #{FILENAME} #{includes.join(" ")}` end def scp_files_to_server @server.scp(FILENAME, ".") end def extract_remote_archive @server.ssh("tar -xzf #{FILENAME}") end def remove_local_archive `rm -f #{FILENAME}` end end end
Allow user to optionally skip either files or scripts
Allow user to optionally skip either files or scripts
Ruby
mit
phuongnd08/simple_provision
ruby
## Code Before: module FuckingScriptsDigitalOcean class SCP FILENAME = "fss.tar.gz" def initialize(server, opts) @server, @opts = server, opts end def to_server create_local_archive scp_files_to_server extract_remote_archive remove_local_archive end private def create_local_archive includes = @opts.fetch(:files) + @opts.fetch(:scripts) `tar -czf #{FILENAME} #{includes.join(" ")}` end def scp_files_to_server @server.scp(FILENAME, ".") end def extract_remote_archive @server.ssh("tar -xzf #{FILENAME}") end def remove_local_archive `rm -f #{FILENAME}` end end end ## Instruction: Allow user to optionally skip either files or scripts ## Code After: module FuckingScriptsDigitalOcean class SCP FILENAME = "fss.tar.gz" def initialize(server, opts) @server, @opts = server, opts end def to_server create_local_archive scp_files_to_server extract_remote_archive remove_local_archive end private def create_local_archive files = @opts[:files] || [] scripts = @opts[:scripts] || [] includes = files + scripts if includes.empty? raise "Both files and scripts are empty. You should provide some" end `tar -czf #{FILENAME} #{includes.join(" ")}` end def scp_files_to_server @server.scp(FILENAME, ".") end def extract_remote_archive @server.ssh("tar -xzf #{FILENAME}") end def remove_local_archive `rm -f #{FILENAME}` end end end
module FuckingScriptsDigitalOcean class SCP FILENAME = "fss.tar.gz" def initialize(server, opts) @server, @opts = server, opts end def to_server create_local_archive scp_files_to_server extract_remote_archive remove_local_archive end private def create_local_archive - includes = @opts.fetch(:files) + @opts.fetch(:scripts) + files = @opts[:files] || [] + scripts = @opts[:scripts] || [] + includes = files + scripts + + if includes.empty? + raise "Both files and scripts are empty. You should provide some" + end + `tar -czf #{FILENAME} #{includes.join(" ")}` end def scp_files_to_server @server.scp(FILENAME, ".") end def extract_remote_archive @server.ssh("tar -xzf #{FILENAME}") end def remove_local_archive `rm -f #{FILENAME}` end end end
9
0.257143
8
1
8118dcf15e59fdd32471a7e303af66ca90e09e5c
build-android-release.sh
build-android-release.sh
echo "Building Android release APK" cordova build android --release jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../keys/evothings.keystore platforms/android/build/outputs/apk/android-release-unsigned.apk evothings_alias jarsigner -verify -verbose platforms/android/build/outputs/apk/android-release-unsigned.apk zipalign -v 4 platforms/android/build/outputs/apk/android-release-unsigned.apk ./EvothingsViewer.apk
echo "Building Android release APK" cordova build android --release jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../keys/evothings.keystore platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk evothings_alias jarsigner -verify -verbose platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk zipalign -v 4 platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk ./EvothingsViewer.apk
Fix for new paths in Cordova 8
Fix for new paths in Cordova 8
Shell
apache-2.0
evothings/evothings-viewer,evothings/evothings-viewer,evothings/evothings-viewer,evothings/evothings-viewer
shell
## Code Before: echo "Building Android release APK" cordova build android --release jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../keys/evothings.keystore platforms/android/build/outputs/apk/android-release-unsigned.apk evothings_alias jarsigner -verify -verbose platforms/android/build/outputs/apk/android-release-unsigned.apk zipalign -v 4 platforms/android/build/outputs/apk/android-release-unsigned.apk ./EvothingsViewer.apk ## Instruction: Fix for new paths in Cordova 8 ## Code After: echo "Building Android release APK" cordova build android --release jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../keys/evothings.keystore platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk evothings_alias jarsigner -verify -verbose platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk zipalign -v 4 platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk ./EvothingsViewer.apk
echo "Building Android release APK" cordova build android --release - jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../keys/evothings.keystore platforms/android/build/outputs/apk/android-release-unsigned.apk evothings_alias ? ^^^^^^ + jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../keys/evothings.keystore platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk evothings_alias ? ++++ ++++ ^^^^^^ - jarsigner -verify -verbose platforms/android/build/outputs/apk/android-release-unsigned.apk ? ^^^^^^ + jarsigner -verify -verbose platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk ? ++++ ++++ ^^^^^^ - zipalign -v 4 platforms/android/build/outputs/apk/android-release-unsigned.apk ./EvothingsViewer.apk ? ^^^^^^ + zipalign -v 4 platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk ./EvothingsViewer.apk ? ++++ ++++ ^^^^^^
6
1.2
3
3
0867054258e231b2ce9b028c5ce2bc3a26bca7be
gamernews/apps/threadedcomments/views.py
gamernews/apps/threadedcomments/views.py
from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext from django.contrib.auth.decorators import login_required from django.utils.translation import ugettext as _ from django.views.generic.list import ListView from core.models import Account as User from django_comments.models import Comment from news.models import Blob, BlobInstance from .models import ThreadedComment def single_comment(request, id): comment = get_object_or_404(ThreadedComment, id=id) variables = RequestContext(request, {'comment': comment}) return render_to_response('comments/single.html', variables) def comment_posted( request ): if request.GET['c']: comment_id, blob_id = request.GET['c'].split( ':' ) blob = Blob.objects.get( pk=blob_id ) if post: return HttpResponseRedirect( blob.get_absolute_url() ) return HttpResponseRedirect( "/" )
from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext from django.contrib.auth.decorators import login_required from django.utils.translation import ugettext as _ from django.views.generic.list import ListView from core.models import Account as User from django_comments.models import Comment from news.models import Blob, BlobInstance from .models import ThreadedComment def single_comment(request, id): comment = get_object_or_404(ThreadedComment, id=id) variables = RequestContext(request, {'comment': comment}) return render_to_response('comments/single.html', variables) def comment_posted(request): if request.GET['c']: comment_id, blob_id = request.GET['c'] comment = Comment.objects.get( pk=comment_id ) blob = Blob.objects.get(pk=blob_id) if blob: return HttpResponseRedirect( blob.get_absolute_url() ) return HttpResponseRedirect( "/" )
Remove name, url and email from comment form
Remove name, url and email from comment form
Python
mit
underlost/GamerNews,underlost/GamerNews
python
## Code Before: from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext from django.contrib.auth.decorators import login_required from django.utils.translation import ugettext as _ from django.views.generic.list import ListView from core.models import Account as User from django_comments.models import Comment from news.models import Blob, BlobInstance from .models import ThreadedComment def single_comment(request, id): comment = get_object_or_404(ThreadedComment, id=id) variables = RequestContext(request, {'comment': comment}) return render_to_response('comments/single.html', variables) def comment_posted( request ): if request.GET['c']: comment_id, blob_id = request.GET['c'].split( ':' ) blob = Blob.objects.get( pk=blob_id ) if post: return HttpResponseRedirect( blob.get_absolute_url() ) return HttpResponseRedirect( "/" ) ## Instruction: Remove name, url and email from comment form ## Code After: from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext from django.contrib.auth.decorators import login_required from django.utils.translation import ugettext as _ from django.views.generic.list import ListView from core.models import Account as User from django_comments.models import Comment from news.models import Blob, BlobInstance from .models import ThreadedComment def single_comment(request, id): comment = get_object_or_404(ThreadedComment, id=id) variables = RequestContext(request, {'comment': comment}) return render_to_response('comments/single.html', variables) def comment_posted(request): if request.GET['c']: comment_id, blob_id = request.GET['c'] comment = Comment.objects.get( pk=comment_id ) blob = Blob.objects.get(pk=blob_id) if blob: return HttpResponseRedirect( blob.get_absolute_url() ) return HttpResponseRedirect( "/" )
from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext from django.contrib.auth.decorators import login_required from django.utils.translation import ugettext as _ from django.views.generic.list import ListView from core.models import Account as User from django_comments.models import Comment from news.models import Blob, BlobInstance from .models import ThreadedComment def single_comment(request, id): comment = get_object_or_404(ThreadedComment, id=id) variables = RequestContext(request, {'comment': comment}) return render_to_response('comments/single.html', variables) - def comment_posted( request ): ? - - + def comment_posted(request): if request.GET['c']: - comment_id, blob_id = request.GET['c'].split( ':' ) ? - ------------- + comment_id, blob_id = request.GET['c'] + comment = Comment.objects.get( pk=comment_id ) - blob = Blob.objects.get( pk=blob_id ) ? - - + blob = Blob.objects.get(pk=blob_id) - if post: ? ^ ^^ + if blob: ? ^^ ^ return HttpResponseRedirect( blob.get_absolute_url() ) return HttpResponseRedirect( "/" )
9
0.36
5
4
33a5e57a9330bc8b02bceb25a8fcd9d92a6c4c7b
coffee/cilantro/models/concept.coffee
coffee/cilantro/models/concept.coffee
define ['../core', './field'], (c, field) -> class ConceptModel extends c.Backbone.Model parse: (resp) -> @fields = [] # Parse and attach field model instances to concept for attrs in resp.fields @fields.push(new field.FieldModel attrs, parse: true) return resp class ConceptCollection extends c.Backbone.Collection model: ConceptModel url: -> c.getSessionUrl('concepts') initialize: -> super c.subscribe c.SESSION_OPENED, => @fetch(reset: true) c.subscribe c.SESSION_CLOSED, => @reset() @on 'reset', @resolve search: (query, handler) -> c.Backbone.ajax url: c._.result @, 'url' data: query: query dataType: 'json' success: (resp) -> handler(resp) { ConceptModel, ConceptCollection }
define ['../core', './field'], (c, field) -> class ConceptModel extends c.Backbone.Model parse: (resp) -> @fields = [] # Parse and attach field model instances to concept for attrs in resp.fields @fields.push(new field.FieldModel attrs, parse: true) return resp class ConceptCollection extends c.Backbone.Collection model: ConceptModel url: -> c.getSessionUrl('concepts') constructor: -> @queryable = new c.Backbone.Collection @viewable = new c.Backbone.Collection super initialize: -> super c.subscribe c.SESSION_OPENED, => @fetch(reset: true) c.subscribe c.SESSION_CLOSED, => @reset() @on 'reset', @resolve # Update the sub-collections with the specific sets of models @on 'reset', -> @queryable.set @filter (m) -> m.get('queryview')? @viewable.set @filter (m) -> m.get('formatter_name')? search: (query, handler) -> c.Backbone.ajax url: c._.result @, 'url' data: query: query dataType: 'json' success: (resp) -> handler(resp) { ConceptModel, ConceptCollection }
Add local sub-collections to ConceptCollection
Add local sub-collections to ConceptCollection This differentiates between _queryable_ vs. _viewable_ concepts for the query and results views, respectively.
CoffeeScript
bsd-2-clause
chop-dbhi/cilantro,chop-dbhi/cilantro,chop-dbhi/cilantro
coffeescript
## Code Before: define ['../core', './field'], (c, field) -> class ConceptModel extends c.Backbone.Model parse: (resp) -> @fields = [] # Parse and attach field model instances to concept for attrs in resp.fields @fields.push(new field.FieldModel attrs, parse: true) return resp class ConceptCollection extends c.Backbone.Collection model: ConceptModel url: -> c.getSessionUrl('concepts') initialize: -> super c.subscribe c.SESSION_OPENED, => @fetch(reset: true) c.subscribe c.SESSION_CLOSED, => @reset() @on 'reset', @resolve search: (query, handler) -> c.Backbone.ajax url: c._.result @, 'url' data: query: query dataType: 'json' success: (resp) -> handler(resp) { ConceptModel, ConceptCollection } ## Instruction: Add local sub-collections to ConceptCollection This differentiates between _queryable_ vs. _viewable_ concepts for the query and results views, respectively. ## Code After: define ['../core', './field'], (c, field) -> class ConceptModel extends c.Backbone.Model parse: (resp) -> @fields = [] # Parse and attach field model instances to concept for attrs in resp.fields @fields.push(new field.FieldModel attrs, parse: true) return resp class ConceptCollection extends c.Backbone.Collection model: ConceptModel url: -> c.getSessionUrl('concepts') constructor: -> @queryable = new c.Backbone.Collection @viewable = new c.Backbone.Collection super initialize: -> super c.subscribe c.SESSION_OPENED, => @fetch(reset: true) c.subscribe c.SESSION_CLOSED, => @reset() @on 'reset', @resolve # Update the sub-collections with the specific sets of models @on 'reset', -> @queryable.set @filter (m) -> m.get('queryview')? @viewable.set @filter (m) -> m.get('formatter_name')? search: (query, handler) -> c.Backbone.ajax url: c._.result @, 'url' data: query: query dataType: 'json' success: (resp) -> handler(resp) { ConceptModel, ConceptCollection }
define ['../core', './field'], (c, field) -> class ConceptModel extends c.Backbone.Model parse: (resp) -> @fields = [] # Parse and attach field model instances to concept for attrs in resp.fields @fields.push(new field.FieldModel attrs, parse: true) return resp class ConceptCollection extends c.Backbone.Collection model: ConceptModel url: -> c.getSessionUrl('concepts') + constructor: -> + @queryable = new c.Backbone.Collection + @viewable = new c.Backbone.Collection + super + initialize: -> super c.subscribe c.SESSION_OPENED, => @fetch(reset: true) c.subscribe c.SESSION_CLOSED, => @reset() + @on 'reset', @resolve + # Update the sub-collections with the specific sets of models + @on 'reset', -> + @queryable.set @filter (m) -> m.get('queryview')? + @viewable.set @filter (m) -> m.get('formatter_name')? search: (query, handler) -> c.Backbone.ajax url: c._.result @, 'url' data: query: query dataType: 'json' success: (resp) -> handler(resp) { ConceptModel, ConceptCollection }
10
0.30303
10
0
b6cade2c2d1c7a76d665db53e7569900ec5bacb8
doc/cla/corporate/jarsa.md
doc/cla/corporate/jarsa.md
México,2015-09-23 Jarsa agrees to the terms of the Odoo Corporate Contributor License Agreement v1.0. I declare that I am authorized and able to make this agreement and sign this declaration. Signed, Alan Ramos alan.ramos@jarsa.com.mx https://github.com/alan16 List of contributors: Alan Ramos alan.ramos@jarsa.com.mx https://github.com/alan196 Luis Triana luis.triana@jarsa.com.mx https://github.com/xluiisx
México,2015-09-23 Jarsa agrees to the terms of the Odoo Corporate Contributor License Agreement v1.0. I declare that I am authorized and able to make this agreement and sign this declaration. Signed, Alan Ramos alan.ramos@jarsa.com.mx https://github.com/alan196 List of contributors: Alan Ramos alan.ramos@jarsa.com.mx https://github.com/alan196 Luis Triana luis.triana@jarsa.com.mx https://github.com/xluiisx Luis Triana luistriana.28@gmail.com
Fix typo and add another e-mail to CLA
[CLA]: Fix typo and add another e-mail to CLA
Markdown
agpl-3.0
Endika/OpenUpgrade,provaleks/o8,glovebx/odoo,markeTIC/OCB,diagramsoftware/odoo,Daniel-CA/odoo,microcom/odoo,tvibliani/odoo,glovebx/odoo,tvibliani/odoo,bplancher/odoo,datenbetrieb/odoo,ygol/odoo,makinacorpus/odoo,Noviat/odoo,Endika/odoo,Noviat/odoo,BT-ojossen/odoo,ehirt/odoo,rubencabrera/odoo,Antiun/odoo,NeovaHealth/odoo,optima-ict/odoo,Antiun/odoo,NeovaHealth/odoo,MarcosCommunity/odoo,grap/OpenUpgrade,odootr/odoo,eino-makitalo/odoo,spadae22/odoo,stephen144/odoo,grap/OpenUpgrade,microcom/odoo,shingonoide/odoo,provaleks/o8,BT-rmartin/odoo,OpenUpgrade/OpenUpgrade,Antiun/odoo,mustafat/odoo-1,storm-computers/odoo,Antiun/odoo,MarcosCommunity/odoo,hassoon3/odoo,dfang/odoo,alexcuellar/odoo,leorochael/odoo,QianBIG/odoo,Endika/OpenUpgrade,MarcosCommunity/odoo,markeTIC/OCB,Endika/odoo,spadae22/odoo,Elico-Corp/odoo_OCB,Noviat/odoo,sergio-incaser/odoo,MarcosCommunity/odoo,diagramsoftware/odoo,BT-rmartin/odoo,leorochael/odoo,spadae22/odoo,leorochael/odoo,vnsofthe/odoo,datenbetrieb/odoo,synconics/odoo,QianBIG/odoo,Adel-Magebinary/odoo,optima-ict/odoo,spadae22/odoo,makinacorpus/odoo,dfang/odoo,leorochael/odoo,draugiskisprendimai/odoo,alexcuellar/odoo,Nowheresly/odoo,sysadminmatmoz/OCB,grap/OpenUpgrade,alexcuellar/odoo,OpenUpgrade/OpenUpgrade,NeovaHealth/odoo,hip-odoo/odoo,Adel-Magebinary/odoo,synconics/odoo,makinacorpus/odoo,datenbetrieb/odoo,microcom/odoo,BT-rmartin/odoo,hassoon3/odoo,jfpla/odoo,BT-ojossen/odoo,tvibliani/odoo,ehirt/odoo,bplancher/odoo,provaleks/o8,ygol/odoo,alexcuellar/odoo,Endika/OpenUpgrade,dfang/odoo,odootr/odoo,markeTIC/OCB,BT-ojossen/odoo,Nowheresly/odoo,factorlibre/OCB,hassoon3/odoo,Endika/odoo,vnsofthe/odoo,Adel-Magebinary/odoo,ehirt/odoo,draugiskisprendimai/odoo,hip-odoo/odoo,storm-computers/odoo,jiangzhixiao/odoo,jiangzhixiao/odoo,leorochael/odoo,odootr/odoo,shingonoide/odoo,OpenUpgrade/OpenUpgrade,shingonoide/odoo,markeTIC/OCB,diagramsoftware/odoo,mustafat/odoo-1,Elico-Corp/odoo_OCB,datenbetrieb/odoo,grap/OpenUpgrade,rubencabrera/odoo,sysadminmatmoz/OCB,ehirt/odoo,microcom/odoo,eino-makitalo/odoo,optima-ict/odoo,mustafat/odoo-1,hip-odoo/odoo,Daniel-CA/odoo,Endika/odoo,Daniel-CA/odoo,tvibliani/odoo,grap/OpenUpgrade,eino-makitalo/odoo,laslabs/odoo,jiangzhixiao/odoo,markeTIC/OCB,MarcosCommunity/odoo,CatsAndDogsbvba/odoo,odootr/odoo,funkring/fdoo,hassoon3/odoo,tvibliani/odoo,makinacorpus/odoo,Endika/OpenUpgrade,Adel-Magebinary/odoo,Elico-Corp/odoo_OCB,draugiskisprendimai/odoo,sysadminmatmoz/OCB,provaleks/o8,jfpla/odoo,BT-rmartin/odoo,dfang/odoo,provaleks/o8,CatsAndDogsbvba/odoo,stephen144/odoo,spadae22/odoo,vnsofthe/odoo,storm-computers/odoo,glovebx/odoo,bplancher/odoo,BT-rmartin/odoo,eino-makitalo/odoo,mustafat/odoo-1,OpenUpgrade/OpenUpgrade,Antiun/odoo,makinacorpus/odoo,NeovaHealth/odoo,factorlibre/OCB,funkring/fdoo,storm-computers/odoo,BT-ojossen/odoo,ygol/odoo,provaleks/o8,Elico-Corp/odoo_OCB,mustafat/odoo-1,stephen144/odoo,Noviat/odoo,odootr/odoo,Noviat/odoo,ygol/odoo,ygol/odoo,spadae22/odoo,diagramsoftware/odoo,funkring/fdoo,jfpla/odoo,synconics/odoo,factorlibre/OCB,sysadminmatmoz/OCB,sysadminmatmoz/OCB,markeTIC/OCB,funkring/fdoo,MarcosCommunity/odoo,BT-ojossen/odoo,laslabs/odoo,glovebx/odoo,rubencabrera/odoo,jfpla/odoo,jfpla/odoo,draugiskisprendimai/odoo,optima-ict/odoo,Endika/OpenUpgrade,Nowheresly/odoo,CatsAndDogsbvba/odoo,shingonoide/odoo,sergio-incaser/odoo,sysadminmatmoz/OCB,funkring/fdoo,makinacorpus/odoo,ygol/odoo,Endika/odoo,OpenUpgrade/OpenUpgrade,ehirt/odoo,odootr/odoo,CatsAndDogsbvba/odoo,leorochael/odoo,factorlibre/OCB,eino-makitalo/odoo,hassoon3/odoo,odootr/odoo,draugiskisprendimai/odoo,factorlibre/OCB,Endika/OpenUpgrade,NeovaHealth/odoo,Elico-Corp/odoo_OCB,synconics/odoo,bplancher/odoo,synconics/odoo,jiangzhixiao/odoo,dfang/odoo,CatsAndDogsbvba/odoo,draugiskisprendimai/odoo,jiangzhixiao/odoo,stephen144/odoo,OpenUpgrade/OpenUpgrade,hip-odoo/odoo,stephen144/odoo,optima-ict/odoo,mustafat/odoo-1,diagramsoftware/odoo,stephen144/odoo,funkring/fdoo,vnsofthe/odoo,Daniel-CA/odoo,BT-rmartin/odoo,datenbetrieb/odoo,sergio-incaser/odoo,BT-ojossen/odoo,sergio-incaser/odoo,mustafat/odoo-1,laslabs/odoo,Endika/odoo,bplancher/odoo,Adel-Magebinary/odoo,glovebx/odoo,Elico-Corp/odoo_OCB,dfang/odoo,funkring/fdoo,Daniel-CA/odoo,rubencabrera/odoo,jiangzhixiao/odoo,MarcosCommunity/odoo,jfpla/odoo,Noviat/odoo,microcom/odoo,provaleks/o8,grap/OpenUpgrade,Nowheresly/odoo,jiangzhixiao/odoo,synconics/odoo,Daniel-CA/odoo,Nowheresly/odoo,CatsAndDogsbvba/odoo,Nowheresly/odoo,glovebx/odoo,factorlibre/OCB,draugiskisprendimai/odoo,rubencabrera/odoo,Daniel-CA/odoo,Endika/odoo,ehirt/odoo,spadae22/odoo,leorochael/odoo,vnsofthe/odoo,sergio-incaser/odoo,makinacorpus/odoo,OpenUpgrade/OpenUpgrade,MarcosCommunity/odoo,alexcuellar/odoo,optima-ict/odoo,microcom/odoo,hassoon3/odoo,rubencabrera/odoo,laslabs/odoo,Adel-Magebinary/odoo,tvibliani/odoo,laslabs/odoo,datenbetrieb/odoo,shingonoide/odoo,Adel-Magebinary/odoo,grap/OpenUpgrade,Nowheresly/odoo,Antiun/odoo,shingonoide/odoo,eino-makitalo/odoo,vnsofthe/odoo,rubencabrera/odoo,factorlibre/OCB,alexcuellar/odoo,datenbetrieb/odoo,storm-computers/odoo,hip-odoo/odoo,NeovaHealth/odoo,synconics/odoo,laslabs/odoo,shingonoide/odoo,CatsAndDogsbvba/odoo,Antiun/odoo,BT-ojossen/odoo,Endika/OpenUpgrade,QianBIG/odoo,hip-odoo/odoo,eino-makitalo/odoo,tvibliani/odoo,NeovaHealth/odoo,glovebx/odoo,QianBIG/odoo,jfpla/odoo,markeTIC/OCB,storm-computers/odoo,alexcuellar/odoo,Noviat/odoo,vnsofthe/odoo,QianBIG/odoo,sergio-incaser/odoo,BT-rmartin/odoo,ehirt/odoo,sysadminmatmoz/OCB,diagramsoftware/odoo,QianBIG/odoo,ygol/odoo,diagramsoftware/odoo,bplancher/odoo
markdown
## Code Before: México,2015-09-23 Jarsa agrees to the terms of the Odoo Corporate Contributor License Agreement v1.0. I declare that I am authorized and able to make this agreement and sign this declaration. Signed, Alan Ramos alan.ramos@jarsa.com.mx https://github.com/alan16 List of contributors: Alan Ramos alan.ramos@jarsa.com.mx https://github.com/alan196 Luis Triana luis.triana@jarsa.com.mx https://github.com/xluiisx ## Instruction: [CLA]: Fix typo and add another e-mail to CLA ## Code After: México,2015-09-23 Jarsa agrees to the terms of the Odoo Corporate Contributor License Agreement v1.0. I declare that I am authorized and able to make this agreement and sign this declaration. Signed, Alan Ramos alan.ramos@jarsa.com.mx https://github.com/alan196 List of contributors: Alan Ramos alan.ramos@jarsa.com.mx https://github.com/alan196 Luis Triana luis.triana@jarsa.com.mx https://github.com/xluiisx Luis Triana luistriana.28@gmail.com
México,2015-09-23 Jarsa agrees to the terms of the Odoo Corporate Contributor License Agreement v1.0. I declare that I am authorized and able to make this agreement and sign this declaration. Signed, - Alan Ramos alan.ramos@jarsa.com.mx https://github.com/alan16 + Alan Ramos alan.ramos@jarsa.com.mx https://github.com/alan196 ? + List of contributors: Alan Ramos alan.ramos@jarsa.com.mx https://github.com/alan196 Luis Triana luis.triana@jarsa.com.mx https://github.com/xluiisx + Luis Triana luistriana.28@gmail.com
3
0.214286
2
1
02dc0e9418994b8a3a4508e781406f0fb9dfffa6
reversesshfs.sh
reversesshfs.sh
echo $$ > `dirname \`realpath $0\``/reversesshfs.pid . `dirname \`realpath $0\``/config.source ssh $remote_server "sudo mkdir -p $remote_mountpoint" ssh $remote_server "sudo chown ubuntu:ubuntu $remote_mountpoint" while true ; do ssh -R $remote_port:localhost:22 $remote_server \ "sshfs -p $remote_port $extra_args $drobo_user@localhost:/mnt/DroboFS/Shares/$share_name $remote_mountpoint" sleep 10 done
echo $$ > `dirname \`realpath $0\``/reversesshfs.pid . `dirname \`realpath $0\``/config.source ssh $remote_server "sudo mkdir -p $remote_mountpoint" while true ; do ssh -R $remote_port:localhost:22 $remote_server \ "sudo sshfs -p $remote_port $extra_args $drobo_user@localhost:/mnt/DroboFS/Shares/$share_name $remote_mountpoint" sleep 10 done
Use sudo to run sshfs
Use sudo to run sshfs
Shell
mit
tkanemoto/drobofs-reverse-sshfs-service
shell
## Code Before: echo $$ > `dirname \`realpath $0\``/reversesshfs.pid . `dirname \`realpath $0\``/config.source ssh $remote_server "sudo mkdir -p $remote_mountpoint" ssh $remote_server "sudo chown ubuntu:ubuntu $remote_mountpoint" while true ; do ssh -R $remote_port:localhost:22 $remote_server \ "sshfs -p $remote_port $extra_args $drobo_user@localhost:/mnt/DroboFS/Shares/$share_name $remote_mountpoint" sleep 10 done ## Instruction: Use sudo to run sshfs ## Code After: echo $$ > `dirname \`realpath $0\``/reversesshfs.pid . `dirname \`realpath $0\``/config.source ssh $remote_server "sudo mkdir -p $remote_mountpoint" while true ; do ssh -R $remote_port:localhost:22 $remote_server \ "sudo sshfs -p $remote_port $extra_args $drobo_user@localhost:/mnt/DroboFS/Shares/$share_name $remote_mountpoint" sleep 10 done
echo $$ > `dirname \`realpath $0\``/reversesshfs.pid . `dirname \`realpath $0\``/config.source ssh $remote_server "sudo mkdir -p $remote_mountpoint" - ssh $remote_server "sudo chown ubuntu:ubuntu $remote_mountpoint" while true ; do ssh -R $remote_port:localhost:22 $remote_server \ - "sshfs -p $remote_port $extra_args $drobo_user@localhost:/mnt/DroboFS/Shares/$share_name $remote_mountpoint" + "sudo sshfs -p $remote_port $extra_args $drobo_user@localhost:/mnt/DroboFS/Shares/$share_name $remote_mountpoint" ? +++++ sleep 10 done
3
0.25
1
2
0543f03b58d980e06dc377ab7a6352806a680cdc
erpnext/hr/doctype/employee_separation/employee_separation_list.js
erpnext/hr/doctype/employee_separation/employee_separation_list.js
frappe.listview_settings['Employee Separation'] = { add_fields: ["boarding_status", "employee_name", "date_of_joining", "department"], filters:[["boarding_status","=", "Pending"]], get_indicator: function(doc) { return [__(doc.boarding_status), frappe.utils.guess_colour(doc.boarding_status), "status,=," + doc.boarding_status]; } };
frappe.listview_settings['Employee Separation'] = { add_fields: ["boarding_status", "employee_name", "department"], filters:[["boarding_status","=", "Pending"]], get_indicator: function(doc) { return [__(doc.boarding_status), frappe.utils.guess_colour(doc.boarding_status), "status,=," + doc.boarding_status]; } };
Remove date_of_joining from field list
fix: Remove date_of_joining from field list
JavaScript
agpl-3.0
gsnbng/erpnext,gsnbng/erpnext,gsnbng/erpnext,gsnbng/erpnext
javascript
## Code Before: frappe.listview_settings['Employee Separation'] = { add_fields: ["boarding_status", "employee_name", "date_of_joining", "department"], filters:[["boarding_status","=", "Pending"]], get_indicator: function(doc) { return [__(doc.boarding_status), frappe.utils.guess_colour(doc.boarding_status), "status,=," + doc.boarding_status]; } }; ## Instruction: fix: Remove date_of_joining from field list ## Code After: frappe.listview_settings['Employee Separation'] = { add_fields: ["boarding_status", "employee_name", "department"], filters:[["boarding_status","=", "Pending"]], get_indicator: function(doc) { return [__(doc.boarding_status), frappe.utils.guess_colour(doc.boarding_status), "status,=," + doc.boarding_status]; } };
frappe.listview_settings['Employee Separation'] = { - add_fields: ["boarding_status", "employee_name", "date_of_joining", "department"], ? ------------------- + add_fields: ["boarding_status", "employee_name", "department"], filters:[["boarding_status","=", "Pending"]], get_indicator: function(doc) { return [__(doc.boarding_status), frappe.utils.guess_colour(doc.boarding_status), "status,=," + doc.boarding_status]; } };
2
0.285714
1
1
b6b2726bf52e7e0f9150672e18007bce6dab7c82
lib/rsvp.js
lib/rsvp.js
import Promise from "./rsvp/promise"; import EventTarget from "./rsvp/events"; import denodeify from "./rsvp/node"; import all from "./rsvp/all"; import race from "./rsvp/race"; import hash from "./rsvp/hash"; import rethrow from "./rsvp/rethrow"; import defer from "./rsvp/defer"; import { config, configure } from "./rsvp/config"; import map from "./rsvp/map"; import resolve from "./rsvp/resolve"; import reject from "./rsvp/reject"; import asap from "./rsvp/asap"; import filter from "./rsvp/filter"; config.async = asap; // default async is asap; function async(callback, arg) { config.async(callback, arg); } function on() { config.on.apply(config, arguments); } function off() { config.off.apply(config, arguments); } export { Promise, EventTarget, all, race, hash, rethrow, defer, denodeify, configure, on, off, resolve, reject, async, map, filter };
import Promise from "./rsvp/promise"; import EventTarget from "./rsvp/events"; import denodeify from "./rsvp/node"; import all from "./rsvp/all"; import race from "./rsvp/race"; import hash from "./rsvp/hash"; import rethrow from "./rsvp/rethrow"; import defer from "./rsvp/defer"; import { config, configure } from "./rsvp/config"; import map from "./rsvp/map"; import resolve from "./rsvp/resolve"; import reject from "./rsvp/reject"; import asap from "./rsvp/asap"; import filter from "./rsvp/filter"; config.async = asap; // default async is asap; function async(callback, arg) { config.async(callback, arg); } function on() { config.on.apply(config, arguments); } function off() { config.off.apply(config, arguments); } // Set up instrumentation through `window.__PROMISE_INTRUMENTATION__` if (typeof window !== 'undefined' && typeof window.__PROMISE_INSTRUMENTATION__ === 'object') { var callbacks = window.__PROMISE_INSTRUMENTATION__; configure('instrument', true); for (var eventName in callbacks) { if (callbacks.hasOwnProperty(eventName)) { on(eventName, callbacks[eventName]); } } } export { Promise, EventTarget, all, race, hash, rethrow, defer, denodeify, configure, on, off, resolve, reject, async, map, filter };
Add window.__PROMISE_INSTRUMENTATION__ flag to register RSVP.on callbacks
Add window.__PROMISE_INSTRUMENTATION__ flag to register RSVP.on callbacks
JavaScript
mit
tildeio/rsvp.js,twokul/rsvp.js,tildeio/rsvp.js,imshibaji/rsvp.js,alpapad/rsvp.js,alpapad/rsvp.js,waraujodesign/rsvp,seanpdoyle/rsvp.js,waraujodesign/rsvp,imshibaji/rsvp.js,twokul/rsvp.js,Rich-Harris/rsvp.js,seanpdoyle/rsvp.js,Rich-Harris/rsvp.js,MSch/rsvp.js,MSch/rsvp.js
javascript
## Code Before: import Promise from "./rsvp/promise"; import EventTarget from "./rsvp/events"; import denodeify from "./rsvp/node"; import all from "./rsvp/all"; import race from "./rsvp/race"; import hash from "./rsvp/hash"; import rethrow from "./rsvp/rethrow"; import defer from "./rsvp/defer"; import { config, configure } from "./rsvp/config"; import map from "./rsvp/map"; import resolve from "./rsvp/resolve"; import reject from "./rsvp/reject"; import asap from "./rsvp/asap"; import filter from "./rsvp/filter"; config.async = asap; // default async is asap; function async(callback, arg) { config.async(callback, arg); } function on() { config.on.apply(config, arguments); } function off() { config.off.apply(config, arguments); } export { Promise, EventTarget, all, race, hash, rethrow, defer, denodeify, configure, on, off, resolve, reject, async, map, filter }; ## Instruction: Add window.__PROMISE_INSTRUMENTATION__ flag to register RSVP.on callbacks ## Code After: import Promise from "./rsvp/promise"; import EventTarget from "./rsvp/events"; import denodeify from "./rsvp/node"; import all from "./rsvp/all"; import race from "./rsvp/race"; import hash from "./rsvp/hash"; import rethrow from "./rsvp/rethrow"; import defer from "./rsvp/defer"; import { config, configure } from "./rsvp/config"; import map from "./rsvp/map"; import resolve from "./rsvp/resolve"; import reject from "./rsvp/reject"; import asap from "./rsvp/asap"; import filter from "./rsvp/filter"; config.async = asap; // default async is asap; function async(callback, arg) { config.async(callback, arg); } function on() { config.on.apply(config, arguments); } function off() { config.off.apply(config, arguments); } // Set up instrumentation through `window.__PROMISE_INTRUMENTATION__` if (typeof window !== 'undefined' && typeof window.__PROMISE_INSTRUMENTATION__ === 'object') { var callbacks = window.__PROMISE_INSTRUMENTATION__; configure('instrument', true); for (var eventName in callbacks) { if (callbacks.hasOwnProperty(eventName)) { on(eventName, callbacks[eventName]); } } } export { Promise, EventTarget, all, race, hash, rethrow, defer, denodeify, configure, on, off, resolve, reject, async, map, filter };
import Promise from "./rsvp/promise"; import EventTarget from "./rsvp/events"; import denodeify from "./rsvp/node"; import all from "./rsvp/all"; import race from "./rsvp/race"; import hash from "./rsvp/hash"; import rethrow from "./rsvp/rethrow"; import defer from "./rsvp/defer"; import { config, configure } from "./rsvp/config"; import map from "./rsvp/map"; import resolve from "./rsvp/resolve"; import reject from "./rsvp/reject"; import asap from "./rsvp/asap"; import filter from "./rsvp/filter"; config.async = asap; // default async is asap; function async(callback, arg) { config.async(callback, arg); } function on() { config.on.apply(config, arguments); } function off() { config.off.apply(config, arguments); } + // Set up instrumentation through `window.__PROMISE_INTRUMENTATION__` + if (typeof window !== 'undefined' && typeof window.__PROMISE_INSTRUMENTATION__ === 'object') { + var callbacks = window.__PROMISE_INSTRUMENTATION__; + configure('instrument', true); + for (var eventName in callbacks) { + if (callbacks.hasOwnProperty(eventName)) { + on(eventName, callbacks[eventName]); + } + } + } + export { Promise, EventTarget, all, race, hash, rethrow, defer, denodeify, configure, on, off, resolve, reject, async, map, filter };
11
0.366667
11
0
399d6129b928fa4726e39f3ab3c72b7ddb80d8e1
logreader/test/server.yaml
logreader/test/server.yaml
--- traces: - trace: - url: /api/v1/get_all - span: /api/v1/get/1 - span: /api/v1/get/2 - span: /api/v1/get/3 - span: /api/v1/get/4 - span: /api/v1/get/5 - span: /api/v1/get/6 - span: /api/v1/get/7
--- traces: - trace: - url: /api/articles - span: /api/auth - span: /api/titles - span: /api/images - span: /api/correct - span: /api/compose
Test yaml file has been updated with a bit more readable endpoint names.
Test yaml file has been updated with a bit more readable endpoint names.
YAML
bsd-2-clause
varnish/zipnish,varnish/zipnish,varnish/varnish-microservice-monitor,varnish/varnish-microservice-monitor,varnish/varnish-microservice-monitor,varnish/zipnish,varnish/zipnish,varnish/zipnish,varnish/varnish-microservice-monitor,varnish/varnish-microservice-monitor
yaml
## Code Before: --- traces: - trace: - url: /api/v1/get_all - span: /api/v1/get/1 - span: /api/v1/get/2 - span: /api/v1/get/3 - span: /api/v1/get/4 - span: /api/v1/get/5 - span: /api/v1/get/6 - span: /api/v1/get/7 ## Instruction: Test yaml file has been updated with a bit more readable endpoint names. ## Code After: --- traces: - trace: - url: /api/articles - span: /api/auth - span: /api/titles - span: /api/images - span: /api/correct - span: /api/compose
--- traces: - trace: - - url: /api/v1/get_all + - url: /api/articles + - span: /api/auth + - span: /api/titles - - span: /api/v1/get/1 ? ^^^ ^^^ + - span: /api/images ? ^^^ ^ - - span: /api/v1/get/2 ? ^^^^ -- + - span: /api/correct ? ^^^^ + - - span: /api/v1/get/3 ? ^^^^ --- + - span: /api/compose ? ^^^^^^ - - span: /api/v1/get/4 - - span: /api/v1/get/5 - - span: /api/v1/get/6 - - span: /api/v1/get/7
14
1.272727
6
8
86006b41483fdcfc3a37d2842e646fa94fc1e942
.travis.yml
.travis.yml
language: rust sudo: false cache: cargo # kcov dependencies (coverage) addons: apt: packages: - libcurl4-openssl-dev - libelf-dev - libdw-dev - binutils-dev - cmake sources: - kalakris-cmake # Test the trains rust: - stable - beta - nightly # build whitelist branches: only: - master - develop - /^release/.*$/ # Allowed failures on non-stable trains matrix: allow_failures: - rust: beta - rust: nightly # Load travis-cargo before_script: - cargo install cargo-travis; export PATH=$HOME/.cargo/bin:$PATH # Document, measure code coverage, upload to coveralls.io after_success: - cargo doc - cargo coveralls # Disable build notifications notifications: email: false
language: rust sudo: false cache: cargo # kcov dependencies (coverage) addons: apt: packages: - libcurl4-openssl-dev - libelf-dev - libdw-dev - zlib1g-dev - libiberty-dev - binutils-dev - cmake sources: - kalakris-cmake # Test the trains rust: - stable - beta - nightly # Allowed failures on non-stable trains matrix: allow_failures: - rust: beta - rust: nightly # Load travis-cargo before_script: - cargo install cargo-travis; export PATH=$HOME/.cargo/bin:$PATH # Document, measure code coverage, upload to coveralls.io after_success: - cargo doc - cargo coveralls # Disable build notifications notifications: email: false
Build all the branches on Travis
Build all the branches on Travis
YAML
apache-2.0
jzhu98/telescope
yaml
## Code Before: language: rust sudo: false cache: cargo # kcov dependencies (coverage) addons: apt: packages: - libcurl4-openssl-dev - libelf-dev - libdw-dev - binutils-dev - cmake sources: - kalakris-cmake # Test the trains rust: - stable - beta - nightly # build whitelist branches: only: - master - develop - /^release/.*$/ # Allowed failures on non-stable trains matrix: allow_failures: - rust: beta - rust: nightly # Load travis-cargo before_script: - cargo install cargo-travis; export PATH=$HOME/.cargo/bin:$PATH # Document, measure code coverage, upload to coveralls.io after_success: - cargo doc - cargo coveralls # Disable build notifications notifications: email: false ## Instruction: Build all the branches on Travis ## Code After: language: rust sudo: false cache: cargo # kcov dependencies (coverage) addons: apt: packages: - libcurl4-openssl-dev - libelf-dev - libdw-dev - zlib1g-dev - libiberty-dev - binutils-dev - cmake sources: - kalakris-cmake # Test the trains rust: - stable - beta - nightly # Allowed failures on non-stable trains matrix: allow_failures: - rust: beta - rust: nightly # Load travis-cargo before_script: - cargo install cargo-travis; export PATH=$HOME/.cargo/bin:$PATH # Document, measure code coverage, upload to coveralls.io after_success: - cargo doc - cargo coveralls # Disable build notifications notifications: email: false
language: rust sudo: false cache: cargo # kcov dependencies (coverage) addons: apt: packages: - libcurl4-openssl-dev - libelf-dev - libdw-dev + - zlib1g-dev + - libiberty-dev - binutils-dev - cmake sources: - kalakris-cmake # Test the trains rust: - stable - beta - nightly - - # build whitelist - branches: - only: - - master - - develop - - /^release/.*$/ # Allowed failures on non-stable trains matrix: allow_failures: - rust: beta - rust: nightly # Load travis-cargo before_script: - cargo install cargo-travis; export PATH=$HOME/.cargo/bin:$PATH # Document, measure code coverage, upload to coveralls.io after_success: - cargo doc - cargo coveralls # Disable build notifications notifications: email: false
9
0.191489
2
7
856225eebd5662c216632733705fb5da1c1045e6
app/stylesheets/partials/content/_application.sass
app/stylesheets/partials/content/_application.sass
@import 'partials/content/invoice' @import 'partials/content/accounting' // Overview +overview-icon-48('store') +overview-icon-48('accounting') +overview-icon-48('invoicing') +overview-icon-48('basic_claims_data') +overview-icon-48('user_settings')
@import 'partials/content/invoice' @import 'partials/content/accounting' // Overview ul.overview-list.level-1 >li min-height: 9em +overview-icon-48('store') +overview-icon-48('accounting') +overview-icon-48('invoicing') +overview-icon-48('basic_claims_data') +overview-icon-48('user_settings')
Set min-height for overview items to 9em.
Set min-height for overview items to 9em.
Sass
agpl-3.0
silvermind/bookyt,xuewenfei/bookyt,xuewenfei/bookyt,wtag/bookyt,hauledev/bookyt,wtag/bookyt,silvermind/bookyt,hauledev/bookyt,gaapt/bookyt,hauledev/bookyt,huerlisi/bookyt,hauledev/bookyt,wtag/bookyt,huerlisi/bookyt,silvermind/bookyt,gaapt/bookyt,huerlisi/bookyt,silvermind/bookyt,gaapt/bookyt,xuewenfei/bookyt,gaapt/bookyt
sass
## Code Before: @import 'partials/content/invoice' @import 'partials/content/accounting' // Overview +overview-icon-48('store') +overview-icon-48('accounting') +overview-icon-48('invoicing') +overview-icon-48('basic_claims_data') +overview-icon-48('user_settings') ## Instruction: Set min-height for overview items to 9em. ## Code After: @import 'partials/content/invoice' @import 'partials/content/accounting' // Overview ul.overview-list.level-1 >li min-height: 9em +overview-icon-48('store') +overview-icon-48('accounting') +overview-icon-48('invoicing') +overview-icon-48('basic_claims_data') +overview-icon-48('user_settings')
@import 'partials/content/invoice' @import 'partials/content/accounting' // Overview + ul.overview-list.level-1 >li + min-height: 9em + +overview-icon-48('store') +overview-icon-48('accounting') +overview-icon-48('invoicing') +overview-icon-48('basic_claims_data') +overview-icon-48('user_settings')
3
0.333333
3
0
4c0fb22be7954dc9bbc73d202affe5544c39be44
app/collections/courses.js
app/collections/courses.js
Courses = new Mongo.Collection("courses"); Courses.schema = new SimpleSchema({ name: {type: String}, description: {type: String, optional: true}, listserv: {type: String, regEx: SimpleSchema.RegEx.Email, optional: true}, active: {type: Boolean}, htas: {type: [String], regEx: SimpleSchema.RegEx.Id, optional: true}, tas: {type: [String], regEx: SimpleSchema.RegEx.Id, optional: true}, createdAt: {type: Number} }); Courses.attachSchema(Courses.schema); Courses.allow({ insert: function() { return false; }, update: function() { return false; }, remove: function() { return false; } }); Courses.deny({ insert: function() { return true; }, update: function() { return true; }, remove: function() { return true; } });
Courses = new Mongo.Collection("courses"); Courses.schema = new SimpleSchema({ name: {type: String}, description: {type: String, optional: true}, listserv: {type: String, regEx: SimpleSchema.RegEx.Email, optional: true}, active: {type: Boolean}, htas: {type: [String], regEx: SimpleSchema.RegEx.Id, optional: true}, tas: {type: [String], regEx: SimpleSchema.RegEx.Id, optional: true}, settings: {type: Object, optional: true}, "settings.signupGap": {type: Number, defaultValue: 0, optional: true}, createdAt: {type: Number} }); Courses.attachSchema(Courses.schema); Courses.allow({ insert: function() { return false; }, update: function() { return false; }, remove: function() { return false; } }); Courses.deny({ insert: function() { return true; }, update: function() { return true; }, remove: function() { return true; } });
Update course schema to make settings optional
Update course schema to make settings optional
JavaScript
mit
etremel/signmeup,gregcarlin/signmeup,athyuttamre/signmeup,etremel/signmeup,signmeup/signmeup,gregcarlin/signmeup,gregcarlin/signmeup,signmeup/signmeup,etremel/signmeup,athyuttamre/signmeup
javascript
## Code Before: Courses = new Mongo.Collection("courses"); Courses.schema = new SimpleSchema({ name: {type: String}, description: {type: String, optional: true}, listserv: {type: String, regEx: SimpleSchema.RegEx.Email, optional: true}, active: {type: Boolean}, htas: {type: [String], regEx: SimpleSchema.RegEx.Id, optional: true}, tas: {type: [String], regEx: SimpleSchema.RegEx.Id, optional: true}, createdAt: {type: Number} }); Courses.attachSchema(Courses.schema); Courses.allow({ insert: function() { return false; }, update: function() { return false; }, remove: function() { return false; } }); Courses.deny({ insert: function() { return true; }, update: function() { return true; }, remove: function() { return true; } }); ## Instruction: Update course schema to make settings optional ## Code After: Courses = new Mongo.Collection("courses"); Courses.schema = new SimpleSchema({ name: {type: String}, description: {type: String, optional: true}, listserv: {type: String, regEx: SimpleSchema.RegEx.Email, optional: true}, active: {type: Boolean}, htas: {type: [String], regEx: SimpleSchema.RegEx.Id, optional: true}, tas: {type: [String], regEx: SimpleSchema.RegEx.Id, optional: true}, settings: {type: Object, optional: true}, "settings.signupGap": {type: Number, defaultValue: 0, optional: true}, createdAt: {type: Number} }); Courses.attachSchema(Courses.schema); Courses.allow({ insert: function() { return false; }, update: function() { return false; }, remove: function() { return false; } }); Courses.deny({ insert: function() { return true; }, update: function() { return true; }, remove: function() { return true; } });
Courses = new Mongo.Collection("courses"); Courses.schema = new SimpleSchema({ name: {type: String}, description: {type: String, optional: true}, listserv: {type: String, regEx: SimpleSchema.RegEx.Email, optional: true}, active: {type: Boolean}, htas: {type: [String], regEx: SimpleSchema.RegEx.Id, optional: true}, tas: {type: [String], regEx: SimpleSchema.RegEx.Id, optional: true}, + + settings: {type: Object, optional: true}, + "settings.signupGap": {type: Number, defaultValue: 0, optional: true}, createdAt: {type: Number} }); Courses.attachSchema(Courses.schema); Courses.allow({ insert: function() { return false; }, update: function() { return false; }, remove: function() { return false; } }); Courses.deny({ insert: function() { return true; }, update: function() { return true; }, remove: function() { return true; } });
3
0.111111
3
0
cb1c053bd5207074f26bed99806a18f04086bb9b
docs/plugins.md
docs/plugins.md
Writing Plugins =============== The PluginRegistry class is responsible for loading plugins and their metadata. Plugins are expected to be Python modules with an `__init__.py` file that provides a `getMetaData()` and a `register()` function. Plugins are loaded from all configured plugin paths. The `register()` function is expected to return one or a list of objects that should be registered. Registration happens by the PluginRegistry based on plugin type. The `getMetaData()` function should return a dictionary object containing metadata for the plugin. Application-specific overrides ------------------------------ The plugin metadata system allows overriding values based on the current application. To use this, include a key with the application name in it, then provide the overridden values of metadata values as elements in a dictionary. The dictionary object that will be returned by `getMetaData()` will have the relevant values replaced with the application specific values. Plugin Types ------------ Plugin types are registered using the `addType()` method of PluginRegistry. The following plugin types are registered by objects in the Uranium framework: - mesh_writer - mesh_reader - logger - storage_device - tool - view - extension - backend - input_device
Writing Plugins =============== The PluginRegistry class is responsible for loading plugins and their metadata. Plugins are expected to be Python modules with an `__init__.py` file that provides a `getMetaData()` and a `register()` function. Plugins are loaded from all configured plugin paths. The `register()` function is expected to return one or a list of objects that should be registered. Registration happens by the PluginRegistry based on plugin type. The `getMetaData()` function should return a dictionary object containing metadata for the plugin. Application-specific overrides ------------------------------ The plugin metadata system allows overriding values based on the current application. To use this, include a key with the application name in it, then provide the overridden values of metadata values as elements in a dictionary. The dictionary object that will be returned by `getMetaData()` will have the relevant values replaced with the application specific values. Plugin About Data ----------------- Each plugin can provide meta data about the actual plugin. This should be provided by a dictionary assigned to the key 'plugin' in the plugin's meta data. The currently supported keys are 'name', 'author', 'description' and 'version'. Plugin Types ------------ Plugin types are registered using the `addType()` method of PluginRegistry. The following plugin types are registered by objects in the Uranium framework: - mesh_writer - mesh_reader - logger - storage_device - tool - view - extension - backend - input_device
Add documentation about plugin about data
Add documentation about plugin about data
Markdown
agpl-3.0
onitake/Uranium,onitake/Uranium
markdown
## Code Before: Writing Plugins =============== The PluginRegistry class is responsible for loading plugins and their metadata. Plugins are expected to be Python modules with an `__init__.py` file that provides a `getMetaData()` and a `register()` function. Plugins are loaded from all configured plugin paths. The `register()` function is expected to return one or a list of objects that should be registered. Registration happens by the PluginRegistry based on plugin type. The `getMetaData()` function should return a dictionary object containing metadata for the plugin. Application-specific overrides ------------------------------ The plugin metadata system allows overriding values based on the current application. To use this, include a key with the application name in it, then provide the overridden values of metadata values as elements in a dictionary. The dictionary object that will be returned by `getMetaData()` will have the relevant values replaced with the application specific values. Plugin Types ------------ Plugin types are registered using the `addType()` method of PluginRegistry. The following plugin types are registered by objects in the Uranium framework: - mesh_writer - mesh_reader - logger - storage_device - tool - view - extension - backend - input_device ## Instruction: Add documentation about plugin about data ## Code After: Writing Plugins =============== The PluginRegistry class is responsible for loading plugins and their metadata. Plugins are expected to be Python modules with an `__init__.py` file that provides a `getMetaData()` and a `register()` function. Plugins are loaded from all configured plugin paths. The `register()` function is expected to return one or a list of objects that should be registered. Registration happens by the PluginRegistry based on plugin type. The `getMetaData()` function should return a dictionary object containing metadata for the plugin. Application-specific overrides ------------------------------ The plugin metadata system allows overriding values based on the current application. To use this, include a key with the application name in it, then provide the overridden values of metadata values as elements in a dictionary. The dictionary object that will be returned by `getMetaData()` will have the relevant values replaced with the application specific values. Plugin About Data ----------------- Each plugin can provide meta data about the actual plugin. This should be provided by a dictionary assigned to the key 'plugin' in the plugin's meta data. The currently supported keys are 'name', 'author', 'description' and 'version'. Plugin Types ------------ Plugin types are registered using the `addType()` method of PluginRegistry. The following plugin types are registered by objects in the Uranium framework: - mesh_writer - mesh_reader - logger - storage_device - tool - view - extension - backend - input_device
Writing Plugins =============== The PluginRegistry class is responsible for loading plugins and their metadata. Plugins are expected to be Python modules with an `__init__.py` file that provides a `getMetaData()` and a `register()` function. Plugins are loaded from all configured plugin paths. The `register()` function is expected to return one or a list of objects that should be registered. Registration happens by the PluginRegistry based on plugin type. The `getMetaData()` function should return a dictionary object containing metadata for the plugin. Application-specific overrides ------------------------------ The plugin metadata system allows overriding values based on the current application. To use this, include a key with the application name in it, then provide the overridden values of metadata values as elements in a dictionary. The dictionary object that will be returned by `getMetaData()` will have the relevant values replaced with the application specific values. + Plugin About Data + ----------------- + Each plugin can provide meta data about the actual plugin. This should be + provided by a dictionary assigned to the key 'plugin' in the plugin's meta data. + The currently supported keys are 'name', 'author', 'description' and 'version'. + Plugin Types ------------ Plugin types are registered using the `addType()` method of PluginRegistry. The following plugin types are registered by objects in the Uranium framework: - mesh_writer - mesh_reader - logger - storage_device - tool - view - extension - backend - input_device
6
0.166667
6
0
e2f004662b1a0d9dfd5c90dc1e54e84b9a5e7361
lib/cartodbmapclient.js
lib/cartodbmapclient.js
'use strict'; var request = require('request'); class CartoDBMapClient { constructor(user, apiKey) { this.user = user; this.apiKey = apiKey; this.baseURL = 'https://' + this.user + '.cartodb.com/'; } createNamedMap(options) { this.existsNamedMap(options.name).then(function() { }); } existsNamedMap(name) { var promise = new Promise(function(reject, resolve) { request({ method: 'GET', uri: this.baseURL + 'tiles/template/' + name, qs: { 'api_key': this.apiKey, }, json: {} }, function(error, response, body) { if(error) { reject(error); } resolve({ notExists: response.status === 404, exists: response.status === 200, data: body }); }); }); return promise; } getGroupID(name) { var promise = new Promise(function(reject, resolve) { request({ method: 'POST', uri: this.baseURL + 'tiles/template/' + name, qs: { 'api_key': this.apiKey, }, json: {} }, function(error, response, body) { if(error) { reject(error); } resolve(body); }); }); return promise; } } module.exports = CartoDBMapClient;
'use strict'; var request = require('request'); class CartoDBMapClient { constructor(user, apiKey) { this.user = user; this.apiKey = apiKey; this.baseURL = 'https://' + this.user + '.cartodb.com/'; } createNamedMap(options) { this.existsNamedMap(options.name).then(function() { }); } existsNamedMap(name) { var $this = this; var promise = new Promise(function(resolve, reject) { request({ method: 'GET', uri: $this.baseURL + 'tiles/template/' + name, qs: { 'api_key': $this.apiKey, }, json: {} }, function(error, response, body) { if(error) { reject(error); } resolve({ exists: response.statusCode !== 404, data: body }); }); }); return promise; } getGroupID(name) { var $this = this; var promise = new Promise(function(resolve, reject) { request({ method: 'POST', uri: $this.baseURL + 'tiles/template/' + name, qs: { 'api_key': $this.apiKey, }, json: {} }, function(error, response, body) { if(error) { reject(error); } resolve(body); }); }); return promise; } } module.exports = CartoDBMapClient;
Fix promises params and this references
Fix promises params and this references
JavaScript
mit
gkudos/node-cartodb-map-api
javascript
## Code Before: 'use strict'; var request = require('request'); class CartoDBMapClient { constructor(user, apiKey) { this.user = user; this.apiKey = apiKey; this.baseURL = 'https://' + this.user + '.cartodb.com/'; } createNamedMap(options) { this.existsNamedMap(options.name).then(function() { }); } existsNamedMap(name) { var promise = new Promise(function(reject, resolve) { request({ method: 'GET', uri: this.baseURL + 'tiles/template/' + name, qs: { 'api_key': this.apiKey, }, json: {} }, function(error, response, body) { if(error) { reject(error); } resolve({ notExists: response.status === 404, exists: response.status === 200, data: body }); }); }); return promise; } getGroupID(name) { var promise = new Promise(function(reject, resolve) { request({ method: 'POST', uri: this.baseURL + 'tiles/template/' + name, qs: { 'api_key': this.apiKey, }, json: {} }, function(error, response, body) { if(error) { reject(error); } resolve(body); }); }); return promise; } } module.exports = CartoDBMapClient; ## Instruction: Fix promises params and this references ## Code After: 'use strict'; var request = require('request'); class CartoDBMapClient { constructor(user, apiKey) { this.user = user; this.apiKey = apiKey; this.baseURL = 'https://' + this.user + '.cartodb.com/'; } createNamedMap(options) { this.existsNamedMap(options.name).then(function() { }); } existsNamedMap(name) { var $this = this; var promise = new Promise(function(resolve, reject) { request({ method: 'GET', uri: $this.baseURL + 'tiles/template/' + name, qs: { 'api_key': $this.apiKey, }, json: {} }, function(error, response, body) { if(error) { reject(error); } resolve({ exists: response.statusCode !== 404, data: body }); }); }); return promise; } getGroupID(name) { var $this = this; var promise = new Promise(function(resolve, reject) { request({ method: 'POST', uri: $this.baseURL + 'tiles/template/' + name, qs: { 'api_key': $this.apiKey, }, json: {} }, function(error, response, body) { if(error) { reject(error); } resolve(body); }); }); return promise; } } module.exports = CartoDBMapClient;
'use strict'; var request = require('request'); class CartoDBMapClient { constructor(user, apiKey) { this.user = user; this.apiKey = apiKey; this.baseURL = 'https://' + this.user + '.cartodb.com/'; } createNamedMap(options) { this.existsNamedMap(options.name).then(function() { }); } existsNamedMap(name) { + var $this = this; - var promise = new Promise(function(reject, resolve) { ? -------- + var promise = new Promise(function(resolve, reject) { ? ++++++++ request({ method: 'GET', - uri: this.baseURL + 'tiles/template/' + name, + uri: $this.baseURL + 'tiles/template/' + name, ? + qs: { - 'api_key': this.apiKey, + 'api_key': $this.apiKey, ? + }, json: {} }, function(error, response, body) { if(error) { reject(error); } resolve({ - notExists: response.status === 404, - exists: response.status === 200, ? ^ ^ ^ + exists: response.statusCode !== 404, ? ++++ ^ ^ ^ data: body }); }); }); return promise; } getGroupID(name) { + var $this = this; - var promise = new Promise(function(reject, resolve) { ? -------- + var promise = new Promise(function(resolve, reject) { ? ++++++++ request({ method: 'POST', - uri: this.baseURL + 'tiles/template/' + name, + uri: $this.baseURL + 'tiles/template/' + name, ? + qs: { - 'api_key': this.apiKey, + 'api_key': $this.apiKey, ? + }, json: {} }, function(error, response, body) { if(error) { reject(error); } resolve(body); }); }); return promise; } } module.exports = CartoDBMapClient;
17
0.278689
9
8
93c86afefd0ad838171af52456f0281a55e91fbb
spec/spec_helper.rb
spec/spec_helper.rb
ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' require 'rspec/autorun' require 'spree/testing_support/factories' require 'spree/testing_support/preferences' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f } ActiveSupport::Notifications.subscribe("sql.active_record") do |_, _, _, _, details| if details[:sql] =~ /INSERT INTO "spree_countries"/ puts caller.join("\n") puts "*" * 50 end end RSpec.configure do |config| config.include Spree::TestingSupport::Preferences config.fixture_path = "#{::Rails.root}/spec/fixtures" config.use_transactional_fixtures = false config.before(:each) do if example.metadata[:js] DatabaseCleaner.strategy = :truncation else DatabaseCleaner.strategy = :transaction end end config.before(:each) do DatabaseCleaner.start end config.after(:each) do DatabaseCleaner.clean end config.infer_base_class_for_anonymous_controllers = false config.order = "random" end
ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' require 'rspec/autorun' require 'spree/testing_support/factories' require 'spree/testing_support/preferences' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f } # ActiveSupport::Notifications.subscribe("sql.active_record") do |_, _, _, _, details| # if details[:sql] =~ /INSERT INTO "spree_states"/ # puts caller.join("\n") # puts "*" * 50 # end # end RSpec.configure do |config| config.include Spree::TestingSupport::Preferences config.fixture_path = "#{::Rails.root}/spec/fixtures" config.use_transactional_fixtures = false config.before(:each) do if example.metadata[:js] DatabaseCleaner.strategy = :truncation else DatabaseCleaner.strategy = :transaction end end config.before(:each) do DatabaseCleaner.start end config.after(:each) do DatabaseCleaner.clean end config.infer_base_class_for_anonymous_controllers = false config.order = "random" end
Comment out SQL logging magic for now
Comment out SQL logging magic for now
Ruby
bsd-3-clause
njaw/spree,njaw/spree,njaw/spree
ruby
## Code Before: ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' require 'rspec/autorun' require 'spree/testing_support/factories' require 'spree/testing_support/preferences' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f } ActiveSupport::Notifications.subscribe("sql.active_record") do |_, _, _, _, details| if details[:sql] =~ /INSERT INTO "spree_countries"/ puts caller.join("\n") puts "*" * 50 end end RSpec.configure do |config| config.include Spree::TestingSupport::Preferences config.fixture_path = "#{::Rails.root}/spec/fixtures" config.use_transactional_fixtures = false config.before(:each) do if example.metadata[:js] DatabaseCleaner.strategy = :truncation else DatabaseCleaner.strategy = :transaction end end config.before(:each) do DatabaseCleaner.start end config.after(:each) do DatabaseCleaner.clean end config.infer_base_class_for_anonymous_controllers = false config.order = "random" end ## Instruction: Comment out SQL logging magic for now ## Code After: ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' require 'rspec/autorun' require 'spree/testing_support/factories' require 'spree/testing_support/preferences' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f } # ActiveSupport::Notifications.subscribe("sql.active_record") do |_, _, _, _, details| # if details[:sql] =~ /INSERT INTO "spree_states"/ # puts caller.join("\n") # puts "*" * 50 # end # end RSpec.configure do |config| config.include Spree::TestingSupport::Preferences config.fixture_path = "#{::Rails.root}/spec/fixtures" config.use_transactional_fixtures = false config.before(:each) do if example.metadata[:js] DatabaseCleaner.strategy = :truncation else DatabaseCleaner.strategy = :transaction end end config.before(:each) do DatabaseCleaner.start end config.after(:each) do DatabaseCleaner.clean end config.infer_base_class_for_anonymous_controllers = false config.order = "random" end
ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' require 'rspec/autorun' require 'spree/testing_support/factories' require 'spree/testing_support/preferences' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f } - ActiveSupport::Notifications.subscribe("sql.active_record") do |_, _, _, _, details| + # ActiveSupport::Notifications.subscribe("sql.active_record") do |_, _, _, _, details| ? ++ - if details[:sql] =~ /INSERT INTO "spree_countries"/ ? ^^^^ ^^ + # if details[:sql] =~ /INSERT INTO "spree_states"/ ? ++ ^ ^^ - puts caller.join("\n") + # puts caller.join("\n") ? ++ - puts "*" * 50 + # puts "*" * 50 ? ++ - end + # end ? ++ - end + # end ? ++ RSpec.configure do |config| config.include Spree::TestingSupport::Preferences config.fixture_path = "#{::Rails.root}/spec/fixtures" config.use_transactional_fixtures = false config.before(:each) do if example.metadata[:js] DatabaseCleaner.strategy = :truncation else DatabaseCleaner.strategy = :transaction end end config.before(:each) do DatabaseCleaner.start end config.after(:each) do DatabaseCleaner.clean end config.infer_base_class_for_anonymous_controllers = false config.order = "random" end
12
0.27907
6
6
7632101602c4b894ca78036435aedbcf8776cf5e
Profideo/FormulaInterpreterBundle/Excel/ExpressionLanguage/ExpressionFunction/RoundExpressionFunction.php
Profideo/FormulaInterpreterBundle/Excel/ExpressionLanguage/ExpressionFunction/RoundExpressionFunction.php
<?php namespace Profideo\FormulaInterpreterBundle\Excel\ExpressionLanguage\ExpressionFunction; /** * Represents the "ROUND" function that can be used in an expression. */ class RoundExpressionFunction extends ExpressionFunction { /** * @return string */ protected function getCompilerFunction() { return sprintf('%s(%s, %s)', $this->getName(), func_get_arg(0), func_get_arg(1)); } /** * @return float */ protected function getEvaluatorFunction() { return round(func_get_arg(1), func_get_arg(2), PHP_ROUND_HALF_UP); } /** * {@inheritdoc} */ protected function getMinArguments() { return 2; } /** * {@inheritdoc} */ protected function getMaxArguments() { return 2; } }
<?php namespace Profideo\FormulaInterpreterBundle\Excel\ExpressionLanguage\ExpressionFunction; use Profideo\FormulaInterpreterBundle\Excel\ExpressionLanguage\ExpressionError; /** * Represents the "ROUND" function that can be used in an expression. */ class RoundExpressionFunction extends ExpressionFunction { /** * @return string */ protected function getCompilerFunction() { return sprintf('%s(%s, %s)', $this->getName(), func_get_arg(0), func_get_arg(1)); } /** * @return float */ protected function getEvaluatorFunction() { $args = func_get_args(); if (! is_numeric($args[1])) { throw new ExpressionError( sprintf('The function %s expects numeric as parameter 1 but "%s" given', $this->getName(), gettype($args[1])) ); } if (! is_int($args[2])) { throw new ExpressionError( sprintf('The function %s expects integer as parameter 2 but "%s" given', $this->getName(), gettype($args[2])) ); } return round($args[1], $args[2], PHP_ROUND_HALF_UP); } /** * {@inheritdoc} */ protected function getMinArguments() { return 2; } /** * {@inheritdoc} */ protected function getMaxArguments() { return 2; } }
Add checks for ROUND function
Add checks for ROUND function
PHP
apache-2.0
Profideo/formula-interpretor
php
## Code Before: <?php namespace Profideo\FormulaInterpreterBundle\Excel\ExpressionLanguage\ExpressionFunction; /** * Represents the "ROUND" function that can be used in an expression. */ class RoundExpressionFunction extends ExpressionFunction { /** * @return string */ protected function getCompilerFunction() { return sprintf('%s(%s, %s)', $this->getName(), func_get_arg(0), func_get_arg(1)); } /** * @return float */ protected function getEvaluatorFunction() { return round(func_get_arg(1), func_get_arg(2), PHP_ROUND_HALF_UP); } /** * {@inheritdoc} */ protected function getMinArguments() { return 2; } /** * {@inheritdoc} */ protected function getMaxArguments() { return 2; } } ## Instruction: Add checks for ROUND function ## Code After: <?php namespace Profideo\FormulaInterpreterBundle\Excel\ExpressionLanguage\ExpressionFunction; use Profideo\FormulaInterpreterBundle\Excel\ExpressionLanguage\ExpressionError; /** * Represents the "ROUND" function that can be used in an expression. */ class RoundExpressionFunction extends ExpressionFunction { /** * @return string */ protected function getCompilerFunction() { return sprintf('%s(%s, %s)', $this->getName(), func_get_arg(0), func_get_arg(1)); } /** * @return float */ protected function getEvaluatorFunction() { $args = func_get_args(); if (! is_numeric($args[1])) { throw new ExpressionError( sprintf('The function %s expects numeric as parameter 1 but "%s" given', $this->getName(), gettype($args[1])) ); } if (! is_int($args[2])) { throw new ExpressionError( sprintf('The function %s expects integer as parameter 2 but "%s" given', $this->getName(), gettype($args[2])) ); } return round($args[1], $args[2], PHP_ROUND_HALF_UP); } /** * {@inheritdoc} */ protected function getMinArguments() { return 2; } /** * {@inheritdoc} */ protected function getMaxArguments() { return 2; } }
<?php namespace Profideo\FormulaInterpreterBundle\Excel\ExpressionLanguage\ExpressionFunction; + + use Profideo\FormulaInterpreterBundle\Excel\ExpressionLanguage\ExpressionError; /** * Represents the "ROUND" function that can be used in an expression. */ class RoundExpressionFunction extends ExpressionFunction { /** * @return string */ protected function getCompilerFunction() { return sprintf('%s(%s, %s)', $this->getName(), func_get_arg(0), func_get_arg(1)); } /** * @return float */ protected function getEvaluatorFunction() { + $args = func_get_args(); + + if (! is_numeric($args[1])) { + throw new ExpressionError( + sprintf('The function %s expects numeric as parameter 1 but "%s" given', $this->getName(), gettype($args[1])) + ); + } + + if (! is_int($args[2])) { + throw new ExpressionError( + sprintf('The function %s expects integer as parameter 2 but "%s" given', $this->getName(), gettype($args[2])) + ); + } + - return round(func_get_arg(1), func_get_arg(2), PHP_ROUND_HALF_UP); ? ^^^^^^^^^ ^ ^ ^^^^^^^^^ ^ ^ + return round($args[1], $args[2], PHP_ROUND_HALF_UP); ? ^ ^^ ^ ^ ^^ ^ } /** * {@inheritdoc} */ protected function getMinArguments() { return 2; } /** * {@inheritdoc} */ protected function getMaxArguments() { return 2; } }
18
0.439024
17
1
f80c11efb4bcbca6d20cdbbc1a552ebb04aa8302
api/config/settings/production.py
api/config/settings/production.py
import os import dj_database_url from .base import * # BASE_NAME and BASE_DOMAIN are intentionally unset # They are only needed to seed data in staging and local BASE_URL = "https://voterengagement.com" ############################################################################### # Core SECRET_KEY = os.environ['SECRET_KEY'] ALLOWED_HOSTS = [ '127.0.0.1', 'localhost', # TODO: Prevent access from herokuapp.com when domain is registered # '.voterengagement.com', '.herokuapp.com', ] ############################################################################### # Static files STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' ############################################################################### # Database DATABASES = {} DATABASES['default'] = dj_database_url.config()
import os import dj_database_url from .base import * # BASE_NAME and BASE_DOMAIN are intentionally unset # They are only needed to seed data in staging and local BASE_URL = "https://voterengagement.com" ############################################################################### # Core SECRET_KEY = os.environ['SECRET_KEY'] ALLOWED_HOSTS = [ '127.0.0.1', 'localhost', '.citizenlabs.org', ] ############################################################################### # Static files STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' ############################################################################### # Database DATABASES = {} DATABASES['default'] = dj_database_url.config()
Allow citizenlabs.org as a host
Allow citizenlabs.org as a host
Python
mit
citizenlabsgr/voter-engagement,citizenlabsgr/voter-engagement,citizenlabsgr/voter-engagement,citizenlabsgr/voter-engagement,citizenlabsgr/voter-engagement
python
## Code Before: import os import dj_database_url from .base import * # BASE_NAME and BASE_DOMAIN are intentionally unset # They are only needed to seed data in staging and local BASE_URL = "https://voterengagement.com" ############################################################################### # Core SECRET_KEY = os.environ['SECRET_KEY'] ALLOWED_HOSTS = [ '127.0.0.1', 'localhost', # TODO: Prevent access from herokuapp.com when domain is registered # '.voterengagement.com', '.herokuapp.com', ] ############################################################################### # Static files STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' ############################################################################### # Database DATABASES = {} DATABASES['default'] = dj_database_url.config() ## Instruction: Allow citizenlabs.org as a host ## Code After: import os import dj_database_url from .base import * # BASE_NAME and BASE_DOMAIN are intentionally unset # They are only needed to seed data in staging and local BASE_URL = "https://voterengagement.com" ############################################################################### # Core SECRET_KEY = os.environ['SECRET_KEY'] ALLOWED_HOSTS = [ '127.0.0.1', 'localhost', '.citizenlabs.org', ] ############################################################################### # Static files STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' ############################################################################### # Database DATABASES = {} DATABASES['default'] = dj_database_url.config()
import os import dj_database_url from .base import * # BASE_NAME and BASE_DOMAIN are intentionally unset # They are only needed to seed data in staging and local BASE_URL = "https://voterengagement.com" ############################################################################### # Core SECRET_KEY = os.environ['SECRET_KEY'] ALLOWED_HOSTS = [ '127.0.0.1', 'localhost', + '.citizenlabs.org', - # TODO: Prevent access from herokuapp.com when domain is registered - # '.voterengagement.com', - '.herokuapp.com', ] ############################################################################### # Static files STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' ############################################################################### # Database DATABASES = {} DATABASES['default'] = dj_database_url.config()
4
0.121212
1
3
fe9db9481789cdf1200b73f47d148651f79e7899
config/initializers/session_store.rb
config/initializers/session_store.rb
Rails.application.config.session_store :cookie_store, key: '_epets_session'
Rails.application.config.session_store :cookie_store, key: '_epets_session', expire_after: 2.weeks
Make session cookie last for two weeks to work around iOS bug
Make session cookie last for two weeks to work around iOS bug Mobile Safari has a tendency to use cached form values even when the cache control headers tell it otherwise. However the session cookie has expired so when the form is submitted the CSRF token is invalid. See rails/rails#21948 for further details. Fixes #451.
Ruby
mit
StatesOfJersey/e-petitions,joelanman/e-petitions,alphagov/e-petitions,StatesOfJersey/e-petitions,unboxed/e-petitions,oskarpearson/e-petitions,oskarpearson/e-petitions,unboxed/e-petitions,joelanman/e-petitions,StatesOfJersey/e-petitions,oskarpearson/e-petitions,joelanman/e-petitions,alphagov/e-petitions,unboxed/e-petitions,alphagov/e-petitions,StatesOfJersey/e-petitions,unboxed/e-petitions,alphagov/e-petitions
ruby
## Code Before: Rails.application.config.session_store :cookie_store, key: '_epets_session' ## Instruction: Make session cookie last for two weeks to work around iOS bug Mobile Safari has a tendency to use cached form values even when the cache control headers tell it otherwise. However the session cookie has expired so when the form is submitted the CSRF token is invalid. See rails/rails#21948 for further details. Fixes #451. ## Code After: Rails.application.config.session_store :cookie_store, key: '_epets_session', expire_after: 2.weeks
- Rails.application.config.session_store :cookie_store, key: '_epets_session' + Rails.application.config.session_store :cookie_store, key: '_epets_session', expire_after: 2.weeks ? +++++++++++++++++++++++
2
1
1
1
5854af946e7eb1136b951ec058d3a9952b11e0c8
test/commit-msg.js
test/commit-msg.js
import fs from 'fs' import test from 'tape' import sinon from 'sinon' import index, {formats} from '../src/commit-msg' test('index', t => { t.equal(typeof index, 'object', 'default export is an object') t.end() }) test('index.check()', t => { const readFileSync = sinon.stub(fs, 'readFileSync') const base = sinon.stub(formats, 'base') index.check('base', './test/fixtures/COMMIT_EDITMSG') t.throws(() => { index.check('nein')}, 'calls an existing format') t.assert(readFileSync.calledOnce, 'calls fs.readFileSync') t.assert(base.calledOnce, 'calls formats.base') formats.base.restore() t.end() }) test('formats', t => { t.equal(typeof formats, 'object', 'is an object') t.end() }) test('formats.base()', t => { const under = '..........' // 10 const equal = '..................................................' // 50 const over = '...................................................' // 51 t.equal(formats.base(under), true) t.equal(formats.base(equal), true) t.equal(formats.base(over), false) t.assert(typeof formats.base, 'is a function') t.end() })
import fs from 'fs' import test from 'tape' import sinon from 'sinon' import index, {formats} from '../src/commit-msg' test('index', t => { t.equal(typeof index, 'object', 'default export is an object') t.end() }) test('index.check()', t => { const readFileSync = sinon.stub(fs, 'readFileSync') const base = sinon.stub(formats, 'base') index.check('base', './test/fixtures/COMMIT_EDITMSG') t.throws(() => { index.check('nein')}, 'calls an existing format') t.assert(readFileSync.calledOnce, 'calls fs.readFileSync') t.assert(base.calledOnce, 'calls formats.base') formats.base.restore() t.end() }) test('formats', t => { t.equal(typeof formats, 'object', 'is an object') t.end() }) test('formats.base()', t => { const under = buildString(10) const equal = buildString(50) const over = buildString(51) t.equal(formats.base(under), true) t.equal(formats.base(equal), true) t.equal(formats.base(over), false) t.assert(typeof formats.base, 'is a function') t.end() }) function buildString (length) { let string = '' for (let i = 0; i < length; i++) { string += '_' } return string }
Use helper to create test strings
Use helper to create test strings
JavaScript
mit
mmwtsn/hs-commit-message,mmwtsn/hook-commit-msg
javascript
## Code Before: import fs from 'fs' import test from 'tape' import sinon from 'sinon' import index, {formats} from '../src/commit-msg' test('index', t => { t.equal(typeof index, 'object', 'default export is an object') t.end() }) test('index.check()', t => { const readFileSync = sinon.stub(fs, 'readFileSync') const base = sinon.stub(formats, 'base') index.check('base', './test/fixtures/COMMIT_EDITMSG') t.throws(() => { index.check('nein')}, 'calls an existing format') t.assert(readFileSync.calledOnce, 'calls fs.readFileSync') t.assert(base.calledOnce, 'calls formats.base') formats.base.restore() t.end() }) test('formats', t => { t.equal(typeof formats, 'object', 'is an object') t.end() }) test('formats.base()', t => { const under = '..........' // 10 const equal = '..................................................' // 50 const over = '...................................................' // 51 t.equal(formats.base(under), true) t.equal(formats.base(equal), true) t.equal(formats.base(over), false) t.assert(typeof formats.base, 'is a function') t.end() }) ## Instruction: Use helper to create test strings ## Code After: import fs from 'fs' import test from 'tape' import sinon from 'sinon' import index, {formats} from '../src/commit-msg' test('index', t => { t.equal(typeof index, 'object', 'default export is an object') t.end() }) test('index.check()', t => { const readFileSync = sinon.stub(fs, 'readFileSync') const base = sinon.stub(formats, 'base') index.check('base', './test/fixtures/COMMIT_EDITMSG') t.throws(() => { index.check('nein')}, 'calls an existing format') t.assert(readFileSync.calledOnce, 'calls fs.readFileSync') t.assert(base.calledOnce, 'calls formats.base') formats.base.restore() t.end() }) test('formats', t => { t.equal(typeof formats, 'object', 'is an object') t.end() }) test('formats.base()', t => { const under = buildString(10) const equal = buildString(50) const over = buildString(51) t.equal(formats.base(under), true) t.equal(formats.base(equal), true) t.equal(formats.base(over), false) t.assert(typeof formats.base, 'is a function') t.end() }) function buildString (length) { let string = '' for (let i = 0; i < length; i++) { string += '_' } return string }
import fs from 'fs' import test from 'tape' import sinon from 'sinon' import index, {formats} from '../src/commit-msg' test('index', t => { t.equal(typeof index, 'object', 'default export is an object') t.end() }) test('index.check()', t => { const readFileSync = sinon.stub(fs, 'readFileSync') const base = sinon.stub(formats, 'base') index.check('base', './test/fixtures/COMMIT_EDITMSG') t.throws(() => { index.check('nein')}, 'calls an existing format') t.assert(readFileSync.calledOnce, 'calls fs.readFileSync') t.assert(base.calledOnce, 'calls formats.base') formats.base.restore() t.end() }) test('formats', t => { t.equal(typeof formats, 'object', 'is an object') t.end() }) test('formats.base()', t => { - const under = '..........' // 10 - const equal = '..................................................' // 50 - const over = '...................................................' // 51 + const under = buildString(10) + const equal = buildString(50) + const over = buildString(51) t.equal(formats.base(under), true) t.equal(formats.base(equal), true) t.equal(formats.base(over), false) t.assert(typeof formats.base, 'is a function') t.end() }) + + function buildString (length) { + let string = '' + + for (let i = 0; i < length; i++) { + string += '_' + } + + return string + }
16
0.390244
13
3
1961cd1213bd0920514c554cddaf598aa1152ce5
tasks/browserSync.js
tasks/browserSync.js
var task = function(gulp, config) { 'use strict'; gulp.task('browserSync', function() { var path = require('path'); var fs = require('fs'); var browserSync = require('browser-sync').create(); var html5Regex = new RegExp('\/'+config.name+'\/(.*)$'); browserSync.init({ server: { // Serve both project root and dist to enable sourcemaps baseDir: [process.cwd(), config.dist.root], middleware: function (req, res, next) { var location; // Enable CORS res.setHeader('Access-Control-Allow-Origin', '*'); // Rewrite html5 urls var matches = html5Regex.exec(req.url); //console.log('req', req.url); var file = path.join(config.dist.root, req.url); //console.log('file', file); if (req.method === 'GET' && matches && !fs.existsSync(file)) { //console.log('no file -> hashbang!'); location = '/'+config.name+'/#!'+matches[1]; res.writeHead(302, {'Location': location}); res.end(); } else { //console.log('serve file'); next(); } }, directory: config.dirListings || false }, // Watch for updates in dist files: [config.dist.root+'/**/*'], // Disable input mirroring between connected browsers ghostMode: false, open: false }); }); }; module.exports = task;
var task = function(gulp, config) { 'use strict'; gulp.task('browserSync', function() { var path = require('path'); var fs = require('fs'); var browserSync = require('browser-sync').create(); var html5Regex = new RegExp('\/'+config.name+'\/(.*)$'); browserSync.init({ server: { // Serve both project root and dist to enable sourcemaps baseDir: [process.cwd(), config.dist.root], middleware: function (req, res, next) { var location; // Enable CORS res.setHeader('Access-Control-Allow-Origin', '*'); // Rewrite html5 urls var matches = html5Regex.exec(req.url); //console.log('req', req.url); var file = path.join(config.dist.root, req.url.split('?')[0]); //console.log('file', file); if (req.method === 'GET' && matches && !fs.existsSync(file)) { console.log('no file -> hashbang!', file); location = '/'+config.name+'/#!'+matches[1]; res.writeHead(302, {'Location': location}); res.end(); } else { console.log('serve file', file); next(); } }, directory: config.dirListings || false }, // Watch for updates in dist files: [config.dist.root+'/**/*'], // Disable input mirroring between connected browsers ghostMode: false, open: false }); }); }; module.exports = task;
Fix bug in serving partial css files
Fix bug in serving partial css files
JavaScript
mit
npolar/npdc-gulp
javascript
## Code Before: var task = function(gulp, config) { 'use strict'; gulp.task('browserSync', function() { var path = require('path'); var fs = require('fs'); var browserSync = require('browser-sync').create(); var html5Regex = new RegExp('\/'+config.name+'\/(.*)$'); browserSync.init({ server: { // Serve both project root and dist to enable sourcemaps baseDir: [process.cwd(), config.dist.root], middleware: function (req, res, next) { var location; // Enable CORS res.setHeader('Access-Control-Allow-Origin', '*'); // Rewrite html5 urls var matches = html5Regex.exec(req.url); //console.log('req', req.url); var file = path.join(config.dist.root, req.url); //console.log('file', file); if (req.method === 'GET' && matches && !fs.existsSync(file)) { //console.log('no file -> hashbang!'); location = '/'+config.name+'/#!'+matches[1]; res.writeHead(302, {'Location': location}); res.end(); } else { //console.log('serve file'); next(); } }, directory: config.dirListings || false }, // Watch for updates in dist files: [config.dist.root+'/**/*'], // Disable input mirroring between connected browsers ghostMode: false, open: false }); }); }; module.exports = task; ## Instruction: Fix bug in serving partial css files ## Code After: var task = function(gulp, config) { 'use strict'; gulp.task('browserSync', function() { var path = require('path'); var fs = require('fs'); var browserSync = require('browser-sync').create(); var html5Regex = new RegExp('\/'+config.name+'\/(.*)$'); browserSync.init({ server: { // Serve both project root and dist to enable sourcemaps baseDir: [process.cwd(), config.dist.root], middleware: function (req, res, next) { var location; // Enable CORS res.setHeader('Access-Control-Allow-Origin', '*'); // Rewrite html5 urls var matches = html5Regex.exec(req.url); //console.log('req', req.url); var file = path.join(config.dist.root, req.url.split('?')[0]); //console.log('file', file); if (req.method === 'GET' && matches && !fs.existsSync(file)) { console.log('no file -> hashbang!', file); location = '/'+config.name+'/#!'+matches[1]; res.writeHead(302, {'Location': location}); res.end(); } else { console.log('serve file', file); next(); } }, directory: config.dirListings || false }, // Watch for updates in dist files: [config.dist.root+'/**/*'], // Disable input mirroring between connected browsers ghostMode: false, open: false }); }); }; module.exports = task;
var task = function(gulp, config) { 'use strict'; gulp.task('browserSync', function() { - + var path = require('path'); var fs = require('fs'); var browserSync = require('browser-sync').create(); var html5Regex = new RegExp('\/'+config.name+'\/(.*)$'); browserSync.init({ server: { // Serve both project root and dist to enable sourcemaps baseDir: [process.cwd(), config.dist.root], middleware: function (req, res, next) { var location; // Enable CORS res.setHeader('Access-Control-Allow-Origin', '*'); // Rewrite html5 urls var matches = html5Regex.exec(req.url); //console.log('req', req.url); - var file = path.join(config.dist.root, req.url); + var file = path.join(config.dist.root, req.url.split('?')[0]); ? ++++++++++++++ //console.log('file', file); if (req.method === 'GET' && matches && !fs.existsSync(file)) { - //console.log('no file -> hashbang!'); ? -- + console.log('no file -> hashbang!', file); ? ++++++ location = '/'+config.name+'/#!'+matches[1]; res.writeHead(302, {'Location': location}); res.end(); } else { - //console.log('serve file'); ? -- + console.log('serve file', file); ? ++++++ next(); } }, directory: config.dirListings || false }, // Watch for updates in dist files: [config.dist.root+'/**/*'], // Disable input mirroring between connected browsers ghostMode: false, open: false }); }); }; module.exports = task;
8
0.177778
4
4
b4c0ab217626c922a662a1a294b6f8f51b66901d
README.md
README.md
gh-pages-demo ============= GitHub Pages Demonstration * [See the rendered demo page](http://haacked.github.io/gh-pages-demo/) * [See the raw code for that page](https://raw.githubusercontent.com/Haacked/gh-pages-demo/gh-pages/index.markdown)
GitHub Pages Demonstration ============= This repository is a bare-bones Jekyll site hosted on GitHub Pages. The goal is to help demonstrate some cool features you get when you host your site using GitHub pages. For example, your site has direct access to some GitHub metadata. No need to make extra requests to the GitHub API. * [See the rendered demo page](http://haacked.github.io/gh-pages-demo/) * [See the raw code for that page](https://raw.githubusercontent.com/Haacked/gh-pages-demo/gh-pages/index.markdown) I wrote a blog post that goes into more detail about this. [GitHub Data In Your Website](http://haacked.com/archive/2014/05/10/github-pages-tricks/)
Add link to blog post.
Add link to blog post.
Markdown
mit
Haacked/gh-pages-demo
markdown
## Code Before: gh-pages-demo ============= GitHub Pages Demonstration * [See the rendered demo page](http://haacked.github.io/gh-pages-demo/) * [See the raw code for that page](https://raw.githubusercontent.com/Haacked/gh-pages-demo/gh-pages/index.markdown) ## Instruction: Add link to blog post. ## Code After: GitHub Pages Demonstration ============= This repository is a bare-bones Jekyll site hosted on GitHub Pages. The goal is to help demonstrate some cool features you get when you host your site using GitHub pages. For example, your site has direct access to some GitHub metadata. No need to make extra requests to the GitHub API. * [See the rendered demo page](http://haacked.github.io/gh-pages-demo/) * [See the raw code for that page](https://raw.githubusercontent.com/Haacked/gh-pages-demo/gh-pages/index.markdown) I wrote a blog post that goes into more detail about this. [GitHub Data In Your Website](http://haacked.com/archive/2014/05/10/github-pages-tricks/)
- gh-pages-demo + GitHub Pages Demonstration ============= - GitHub Pages Demonstration + This repository is a bare-bones Jekyll site hosted on GitHub Pages. The goal is to help demonstrate some cool features you get when you host your site using GitHub pages. For example, your site has direct access to some GitHub metadata. No need to make extra requests to the GitHub API. * [See the rendered demo page](http://haacked.github.io/gh-pages-demo/) * [See the raw code for that page](https://raw.githubusercontent.com/Haacked/gh-pages-demo/gh-pages/index.markdown) + + I wrote a blog post that goes into more detail about this. + + [GitHub Data In Your Website](http://haacked.com/archive/2014/05/10/github-pages-tricks/)
8
1.142857
6
2
04af59eeb0fbbea786c52ea5316b8de89235f041
packages/ye/yesod-sass.yaml
packages/ye/yesod-sass.yaml
homepage: '' changelog-type: '' hash: a64a09d99c5ad86f36653a2180baab4bfeca640991cd87b8256aa212dbdb302e test-bench-deps: {} maintainer: felipe.garay@usach.cl synopsis: A simple quasiquoter to include sass code in yesod changelog: '' basic-deps: shakespeare: ! '>=2.0 && <2.1' hsass: ! '>=0.2 && <0.3' yesod-core: ! '>=1.4 && <1.5' base: ! '>=4 && <5' text: -any data-default: -any template-haskell: -any all-versions: - '0.1.0.0' - '0.1.1.0' author: Felipe Garay latest: '0.1.1.0' description-type: haddock description: ! 'This is a simple quasiquoter to include sass code in yesod. You can use wsass to create a widget in the same way as lucius.' license-name: BSD3
homepage: '' changelog-type: '' hash: 6bb272928543d663a6e0658dcec12e40a88fba5e868f7ce3f29ec84e886bdfc0 test-bench-deps: {} maintainer: felipe.garay@usach.cl synopsis: A simple quasiquoter to include sass code in yesod changelog: '' basic-deps: shakespeare: ! '>=2.0 && <2.1' hsass: ! '>=0.3 && <0.4' yesod-core: ! '>=1.4 && <1.5' base: ! '>=4 && <5' text: -any data-default: -any template-haskell: -any all-versions: - '0.1.0.0' - '0.1.1.0' - '0.1.2.0' author: Felipe Garay latest: '0.1.2.0' description-type: haddock description: ! 'This is a simple quasiquoter to include sass code in yesod. You can use wsass to create a widget in the same way as lucius.' license-name: BSD3
Update from Hackage at 2015-07-16T01:19:22+0000
Update from Hackage at 2015-07-16T01:19:22+0000
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: '' changelog-type: '' hash: a64a09d99c5ad86f36653a2180baab4bfeca640991cd87b8256aa212dbdb302e test-bench-deps: {} maintainer: felipe.garay@usach.cl synopsis: A simple quasiquoter to include sass code in yesod changelog: '' basic-deps: shakespeare: ! '>=2.0 && <2.1' hsass: ! '>=0.2 && <0.3' yesod-core: ! '>=1.4 && <1.5' base: ! '>=4 && <5' text: -any data-default: -any template-haskell: -any all-versions: - '0.1.0.0' - '0.1.1.0' author: Felipe Garay latest: '0.1.1.0' description-type: haddock description: ! 'This is a simple quasiquoter to include sass code in yesod. You can use wsass to create a widget in the same way as lucius.' license-name: BSD3 ## Instruction: Update from Hackage at 2015-07-16T01:19:22+0000 ## Code After: homepage: '' changelog-type: '' hash: 6bb272928543d663a6e0658dcec12e40a88fba5e868f7ce3f29ec84e886bdfc0 test-bench-deps: {} maintainer: felipe.garay@usach.cl synopsis: A simple quasiquoter to include sass code in yesod changelog: '' basic-deps: shakespeare: ! '>=2.0 && <2.1' hsass: ! '>=0.3 && <0.4' yesod-core: ! '>=1.4 && <1.5' base: ! '>=4 && <5' text: -any data-default: -any template-haskell: -any all-versions: - '0.1.0.0' - '0.1.1.0' - '0.1.2.0' author: Felipe Garay latest: '0.1.2.0' description-type: haddock description: ! 'This is a simple quasiquoter to include sass code in yesod. You can use wsass to create a widget in the same way as lucius.' license-name: BSD3
homepage: '' changelog-type: '' - hash: a64a09d99c5ad86f36653a2180baab4bfeca640991cd87b8256aa212dbdb302e + hash: 6bb272928543d663a6e0658dcec12e40a88fba5e868f7ce3f29ec84e886bdfc0 test-bench-deps: {} maintainer: felipe.garay@usach.cl synopsis: A simple quasiquoter to include sass code in yesod changelog: '' basic-deps: shakespeare: ! '>=2.0 && <2.1' - hsass: ! '>=0.2 && <0.3' ? ^ ^ + hsass: ! '>=0.3 && <0.4' ? ^ ^ yesod-core: ! '>=1.4 && <1.5' base: ! '>=4 && <5' text: -any data-default: -any template-haskell: -any all-versions: - '0.1.0.0' - '0.1.1.0' + - '0.1.2.0' author: Felipe Garay - latest: '0.1.1.0' ? ^ + latest: '0.1.2.0' ? ^ description-type: haddock description: ! 'This is a simple quasiquoter to include sass code in yesod. You can use wsass to create a widget in the same way as lucius.' license-name: BSD3
7
0.259259
4
3
d260e4607e932d7e96cbee239cb4bfb1db2c0927
appveyor.yml
appveyor.yml
before_build: - cmd: ECHO this is batch build_script: - qmake
init: - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) before_build: - cmd: ECHO this is batch build_script: - qmake on_finish: - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
Add myself a way to RDP on the remote machine.
Add myself a way to RDP on the remote machine.
YAML
bsd-2-clause
wkoszek/flviz,wkoszek/flviz,wkoszek/flviz
yaml
## Code Before: before_build: - cmd: ECHO this is batch build_script: - qmake ## Instruction: Add myself a way to RDP on the remote machine. ## Code After: init: - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) before_build: - cmd: ECHO this is batch build_script: - qmake on_finish: - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
+ init: + - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) before_build: - cmd: ECHO this is batch build_script: - qmake + on_finish: + - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
4
1
4
0
3c3990afcf0b28145045ae78f4289f5075161a5e
lib/slack_coder/slack.ex
lib/slack_coder/slack.ex
defmodule SlackCoder.Slack do use Slack import SlackCoder.Slack.Helper alias SlackCoder.Config require Logger @online_message """ :slack: *Slack* :computer: *Coder* online! Reporting on any PRs since last online... """ def send_to(user, message) do send :slack, {user, String.strip(message)} end def handle_info({user, message}, slack, state) do user = user(slack, user) message = message_for(user, message) Logger.info "Sending message (#{user.name}): #{message}" send_message(message, Config.route_message(slack, user).id, slack) {:ok, state} end def handle_info(message, _slack, state) do Logger.warn "Got unhandled message: #{inspect message}" {:ok, state} end def handle_close(reason, slack, _state) do Logger.error inspect(reason) caretaker = user(slack, Application.get_env(:slack_coder, :caretaker)) send_message("Crashing: #{inspect reason}", Config.route_message(slack, caretaker).id, slack) {:error, reason} end def handle_connect(slack, state) do Process.register(self, :slack) channel = Config.channel(slack) if channel, do: send_message(@online_message, channel.id, slack) {:ok, state} end def handle_message(_message, _slack, state) do {:ok, state} end end
defmodule SlackCoder.Slack do use Slack import SlackCoder.Slack.Helper alias SlackCoder.Config require Logger @online_message """ :slack: *Slack* :computer: *Coder* online! Reporting on any PRs since last online... """ def send_to(user, message) when is_binary(user) do String.to_atom(user) |> send_message(message) end def send_to(user, message) do send :slack, {user, String.strip(message)} end def handle_info({user, message}, slack, state) do user = user(slack, user) message = message_for(user, message) Logger.info "Sending message (#{user.name}): #{message}" send_message(message, Config.route_message(slack, user).id, slack) {:ok, state} end def handle_info(message, _slack, state) do Logger.warn "Got unhandled message: #{inspect message}" {:ok, state} end def handle_close(reason, slack, _state) do Logger.error inspect(reason) caretaker = user(slack, Application.get_env(:slack_coder, :caretaker)) send_message("Crashing: #{inspect reason}", Config.route_message(slack, caretaker).id, slack) {:error, reason} end def handle_connect(slack, state) do Process.register(self, :slack) channel = Config.channel(slack) if channel, do: send_message(@online_message, channel.id, slack) {:ok, state} end def handle_message(_message, _slack, state) do {:ok, state} end end
Make sure user names are converted to atoms so that we can find them the user list.
Make sure user names are converted to atoms so that we can find them the user list.
Elixir
mit
mgwidmann/slack_coder,mgwidmann/slack_coder,mgwidmann/slack_coder,mgwidmann/slack_coder
elixir
## Code Before: defmodule SlackCoder.Slack do use Slack import SlackCoder.Slack.Helper alias SlackCoder.Config require Logger @online_message """ :slack: *Slack* :computer: *Coder* online! Reporting on any PRs since last online... """ def send_to(user, message) do send :slack, {user, String.strip(message)} end def handle_info({user, message}, slack, state) do user = user(slack, user) message = message_for(user, message) Logger.info "Sending message (#{user.name}): #{message}" send_message(message, Config.route_message(slack, user).id, slack) {:ok, state} end def handle_info(message, _slack, state) do Logger.warn "Got unhandled message: #{inspect message}" {:ok, state} end def handle_close(reason, slack, _state) do Logger.error inspect(reason) caretaker = user(slack, Application.get_env(:slack_coder, :caretaker)) send_message("Crashing: #{inspect reason}", Config.route_message(slack, caretaker).id, slack) {:error, reason} end def handle_connect(slack, state) do Process.register(self, :slack) channel = Config.channel(slack) if channel, do: send_message(@online_message, channel.id, slack) {:ok, state} end def handle_message(_message, _slack, state) do {:ok, state} end end ## Instruction: Make sure user names are converted to atoms so that we can find them the user list. ## Code After: defmodule SlackCoder.Slack do use Slack import SlackCoder.Slack.Helper alias SlackCoder.Config require Logger @online_message """ :slack: *Slack* :computer: *Coder* online! Reporting on any PRs since last online... """ def send_to(user, message) when is_binary(user) do String.to_atom(user) |> send_message(message) end def send_to(user, message) do send :slack, {user, String.strip(message)} end def handle_info({user, message}, slack, state) do user = user(slack, user) message = message_for(user, message) Logger.info "Sending message (#{user.name}): #{message}" send_message(message, Config.route_message(slack, user).id, slack) {:ok, state} end def handle_info(message, _slack, state) do Logger.warn "Got unhandled message: #{inspect message}" {:ok, state} end def handle_close(reason, slack, _state) do Logger.error inspect(reason) caretaker = user(slack, Application.get_env(:slack_coder, :caretaker)) send_message("Crashing: #{inspect reason}", Config.route_message(slack, caretaker).id, slack) {:error, reason} end def handle_connect(slack, state) do Process.register(self, :slack) channel = Config.channel(slack) if channel, do: send_message(@online_message, channel.id, slack) {:ok, state} end def handle_message(_message, _slack, state) do {:ok, state} end end
defmodule SlackCoder.Slack do use Slack import SlackCoder.Slack.Helper alias SlackCoder.Config require Logger @online_message """ :slack: *Slack* :computer: *Coder* online! Reporting on any PRs since last online... """ + + def send_to(user, message) when is_binary(user) do + String.to_atom(user) |> send_message(message) + end def send_to(user, message) do send :slack, {user, String.strip(message)} end def handle_info({user, message}, slack, state) do user = user(slack, user) message = message_for(user, message) Logger.info "Sending message (#{user.name}): #{message}" send_message(message, Config.route_message(slack, user).id, slack) {:ok, state} end def handle_info(message, _slack, state) do Logger.warn "Got unhandled message: #{inspect message}" {:ok, state} end def handle_close(reason, slack, _state) do Logger.error inspect(reason) caretaker = user(slack, Application.get_env(:slack_coder, :caretaker)) send_message("Crashing: #{inspect reason}", Config.route_message(slack, caretaker).id, slack) {:error, reason} end def handle_connect(slack, state) do Process.register(self, :slack) channel = Config.channel(slack) if channel, do: send_message(@online_message, channel.id, slack) {:ok, state} end def handle_message(_message, _slack, state) do {:ok, state} end end
4
0.088889
4
0
e2b382a69473dcfa6d93442f3ad3bc21ee6c90a0
examples/tic_ql_tabular_selfplay_all.py
examples/tic_ql_tabular_selfplay_all.py
''' In this example the Q-learning algorithm is used via self-play to learn the state-action values for all Tic-Tac-Toe positions. ''' from capstone.game.games import TicTacToe from capstone.game.utils import tic2pdf from capstone.rl import Environment, GameMDP from capstone.rl.learners import QLearningSelfPlay from capstone.rl.value_functions import TabularF game = TicTacToe() env = Environment(GameMDP(game)) qlearning = QLearningSelfPlay(env, n_episodes=1000, random_state=0) qlearning.learn() for move in game.legal_moves(): print('-' * 80) value = qlearning.qf[(game, move)] new_game = game.copy().make_move(move) print(value) print(new_game)
''' The Q-learning algorithm is used to learn the state-action values for all Tic-Tac-Toe positions by playing games against itself (self-play). ''' from capstone.game.games import TicTacToe from capstone.game.players import GreedyQF, RandPlayer from capstone.game.utils import play_series, tic2pdf from capstone.rl import Environment, GameMDP from capstone.rl.learners import QLearningSelfPlay game = TicTacToe() env = Environment(GameMDP(game)) qlearning = QLearningSelfPlay(env, n_episodes=100000, verbose=0) qlearning.learn() for move in game.legal_moves(): print('-' * 80) value = qlearning.qf[game, move] new_game = game.copy().make_move(move) print(value) print(new_game) players = [GreedyQF(qlearning.qf), RandPlayer()] play_series(TicTacToe(), players, n_matches=10000) # show number of unvisited state?
Fix Tic-Tac-Toe Q-learning tabular self-play example
Fix Tic-Tac-Toe Q-learning tabular self-play example
Python
mit
davidrobles/mlnd-capstone-code
python
## Code Before: ''' In this example the Q-learning algorithm is used via self-play to learn the state-action values for all Tic-Tac-Toe positions. ''' from capstone.game.games import TicTacToe from capstone.game.utils import tic2pdf from capstone.rl import Environment, GameMDP from capstone.rl.learners import QLearningSelfPlay from capstone.rl.value_functions import TabularF game = TicTacToe() env = Environment(GameMDP(game)) qlearning = QLearningSelfPlay(env, n_episodes=1000, random_state=0) qlearning.learn() for move in game.legal_moves(): print('-' * 80) value = qlearning.qf[(game, move)] new_game = game.copy().make_move(move) print(value) print(new_game) ## Instruction: Fix Tic-Tac-Toe Q-learning tabular self-play example ## Code After: ''' The Q-learning algorithm is used to learn the state-action values for all Tic-Tac-Toe positions by playing games against itself (self-play). ''' from capstone.game.games import TicTacToe from capstone.game.players import GreedyQF, RandPlayer from capstone.game.utils import play_series, tic2pdf from capstone.rl import Environment, GameMDP from capstone.rl.learners import QLearningSelfPlay game = TicTacToe() env = Environment(GameMDP(game)) qlearning = QLearningSelfPlay(env, n_episodes=100000, verbose=0) qlearning.learn() for move in game.legal_moves(): print('-' * 80) value = qlearning.qf[game, move] new_game = game.copy().make_move(move) print(value) print(new_game) players = [GreedyQF(qlearning.qf), RandPlayer()] play_series(TicTacToe(), players, n_matches=10000) # show number of unvisited state?
''' - In this example the Q-learning algorithm is used via self-play - to learn the state-action values for all Tic-Tac-Toe positions. + The Q-learning algorithm is used to learn the state-action values for all + Tic-Tac-Toe positions by playing games against itself (self-play). ''' from capstone.game.games import TicTacToe + from capstone.game.players import GreedyQF, RandPlayer - from capstone.game.utils import tic2pdf + from capstone.game.utils import play_series, tic2pdf ? +++++++++++++ from capstone.rl import Environment, GameMDP from capstone.rl.learners import QLearningSelfPlay - from capstone.rl.value_functions import TabularF game = TicTacToe() env = Environment(GameMDP(game)) - qlearning = QLearningSelfPlay(env, n_episodes=1000, random_state=0) ? ^^^ -- --- + qlearning = QLearningSelfPlay(env, n_episodes=100000, verbose=0) ? ++ ++ ^ qlearning.learn() for move in game.legal_moves(): print('-' * 80) - value = qlearning.qf[(game, move)] ? - - + value = qlearning.qf[game, move] new_game = game.copy().make_move(move) print(value) print(new_game) + + players = [GreedyQF(qlearning.qf), RandPlayer()] + play_series(TicTacToe(), players, n_matches=10000) + + # show number of unvisited state?
17
0.809524
11
6
ed69dd7849b8921917191d6a037d52043e44579f
algorithms/include/algorithms/quick_union_with_path_compression.h
algorithms/include/algorithms/quick_union_with_path_compression.h
/* This algorithm "Quick Union With Path Compression" solves the dynamic connectivity problem. Starting from an empty data structure, any sequence of M union-find ops on N objects makes ≤ c ( N + M lg* N ) array accesses. In reality log * function can be considered to be at the most 5. Thus in theory, this algorithm is not quite linear but in practice it is. */ namespace algorithms { class QuickUnionWithPathCompression { public: MYLIB_EXPORT QuickUnionWithPathCompression(size_t no_of_elements); MYLIB_EXPORT ~QuickUnionWithPathCompression() = default; MYLIB_EXPORT void Union(size_t elementA, size_t elementB); MYLIB_EXPORT bool Connected(size_t elementA, size_t elementB); private: size_t GetRoot(size_t element); inline bool IsIdInBounds(size_t element) { return element >= 0 && element < id_.size(); } private: std::vector<size_t> id_; std::vector<size_t> size_; }; } #endif //INCLUDE_ALGORITHMS_QUICK_UNION_WITH_PATH_COMPRESSION_H_
/* This algorithm "Quick Union With Path Compression" solves the dynamic connectivity problem. Starting from an empty data structure, any sequence of M union-find ops on N objects makes ≤ c ( N + M lg* N ) array accesses. In reality log * function can be considered to be at the most 5. Thus in theory, this algorithm is not quite linear but in practice it is. */ namespace algorithms { class QuickUnionWithPathCompression { public: MYLIB_EXPORT QuickUnionWithPathCompression(size_t no_of_elements); MYLIB_EXPORT ~QuickUnionWithPathCompression() = default; MYLIB_EXPORT void Union(size_t elementA, size_t elementB); MYLIB_EXPORT bool Connected(size_t elementA, size_t elementB); private: size_t GetRoot(size_t element); inline bool IsIdInBounds(size_t element) { return element < id_.size(); } private: std::vector<size_t> id_; std::vector<size_t> size_; }; } #endif //INCLUDE_ALGORITHMS_QUICK_UNION_WITH_PATH_COMPRESSION_H_
Remove unnecessary checking of size_t >= 0
Remove unnecessary checking of size_t >= 0
C
mit
TusharJadhav/algorithms,TusharJadhav/algorithms
c
## Code Before: /* This algorithm "Quick Union With Path Compression" solves the dynamic connectivity problem. Starting from an empty data structure, any sequence of M union-find ops on N objects makes ≤ c ( N + M lg* N ) array accesses. In reality log * function can be considered to be at the most 5. Thus in theory, this algorithm is not quite linear but in practice it is. */ namespace algorithms { class QuickUnionWithPathCompression { public: MYLIB_EXPORT QuickUnionWithPathCompression(size_t no_of_elements); MYLIB_EXPORT ~QuickUnionWithPathCompression() = default; MYLIB_EXPORT void Union(size_t elementA, size_t elementB); MYLIB_EXPORT bool Connected(size_t elementA, size_t elementB); private: size_t GetRoot(size_t element); inline bool IsIdInBounds(size_t element) { return element >= 0 && element < id_.size(); } private: std::vector<size_t> id_; std::vector<size_t> size_; }; } #endif //INCLUDE_ALGORITHMS_QUICK_UNION_WITH_PATH_COMPRESSION_H_ ## Instruction: Remove unnecessary checking of size_t >= 0 ## Code After: /* This algorithm "Quick Union With Path Compression" solves the dynamic connectivity problem. Starting from an empty data structure, any sequence of M union-find ops on N objects makes ≤ c ( N + M lg* N ) array accesses. In reality log * function can be considered to be at the most 5. Thus in theory, this algorithm is not quite linear but in practice it is. */ namespace algorithms { class QuickUnionWithPathCompression { public: MYLIB_EXPORT QuickUnionWithPathCompression(size_t no_of_elements); MYLIB_EXPORT ~QuickUnionWithPathCompression() = default; MYLIB_EXPORT void Union(size_t elementA, size_t elementB); MYLIB_EXPORT bool Connected(size_t elementA, size_t elementB); private: size_t GetRoot(size_t element); inline bool IsIdInBounds(size_t element) { return element < id_.size(); } private: std::vector<size_t> id_; std::vector<size_t> size_; }; } #endif //INCLUDE_ALGORITHMS_QUICK_UNION_WITH_PATH_COMPRESSION_H_
/* This algorithm "Quick Union With Path Compression" solves the dynamic connectivity problem. Starting from an empty data structure, any sequence of M union-find ops on N objects makes ≤ c ( N + M lg* N ) array accesses. In reality log * function can be considered to be at the most 5. Thus in theory, this algorithm is not quite linear but in practice it is. */ namespace algorithms { class QuickUnionWithPathCompression { public: MYLIB_EXPORT QuickUnionWithPathCompression(size_t no_of_elements); MYLIB_EXPORT ~QuickUnionWithPathCompression() = default; MYLIB_EXPORT void Union(size_t elementA, size_t elementB); MYLIB_EXPORT bool Connected(size_t elementA, size_t elementB); private: size_t GetRoot(size_t element); inline bool IsIdInBounds(size_t element) { - return element >= 0 && element < id_.size(); ? ---------------- + return element < id_.size(); } private: std::vector<size_t> id_; std::vector<size_t> size_; }; } #endif //INCLUDE_ALGORITHMS_QUICK_UNION_WITH_PATH_COMPRESSION_H_
2
0.064516
1
1
9d6b44313b7f2f2a5c2690939d942e3ce5b7cfc6
src/app/reducers/rootReducer.js
src/app/reducers/rootReducer.js
import {combineReducers} from "redux"; import entitiesReducer from "./entitiesReducer"; import tabReducer from "features/tabs/tabReducer"; import unitInfoReducer from "features/unitInfo/unitInfoReducer"; import pilotsReducer from "features/pilots/pilotsReducer"; import mechsReducer from "features/mechs/mechsReducer"; const rootReducer = combineReducers({ entities : entitiesReducer, unitInfo : unitInfoReducer, pilots : pilotsReducer, mechs : mechsReducer, tabs : tabReducer, }); export default rootReducer;
import {combineReducers} from "redux"; import {reduceReducers} from "common/utils/reducerUtils"; import entitiesReducer from "./entitiesReducer"; import tabReducer from "features/tabs/tabReducer"; import unitInfoReducer from "features/unitInfo/unitInfoReducer"; import pilotsReducer from "features/pilots/pilotsReducer"; import mechsReducer from "features/mechs/mechsReducer"; const combinedReducer = combineReducers({ entities : entitiesReducer, unitInfo : unitInfoReducer, pilots : pilotsReducer, mechs : mechsReducer, tabs : tabReducer, }); const rootReducer = reduceReducers( combinedReducer, ); export default rootReducer;
Update root reducer to wrap around combined reducer
Update root reducer to wrap around combined reducer
JavaScript
mit
markerikson/project-minimek,markerikson/project-minimek
javascript
## Code Before: import {combineReducers} from "redux"; import entitiesReducer from "./entitiesReducer"; import tabReducer from "features/tabs/tabReducer"; import unitInfoReducer from "features/unitInfo/unitInfoReducer"; import pilotsReducer from "features/pilots/pilotsReducer"; import mechsReducer from "features/mechs/mechsReducer"; const rootReducer = combineReducers({ entities : entitiesReducer, unitInfo : unitInfoReducer, pilots : pilotsReducer, mechs : mechsReducer, tabs : tabReducer, }); export default rootReducer; ## Instruction: Update root reducer to wrap around combined reducer ## Code After: import {combineReducers} from "redux"; import {reduceReducers} from "common/utils/reducerUtils"; import entitiesReducer from "./entitiesReducer"; import tabReducer from "features/tabs/tabReducer"; import unitInfoReducer from "features/unitInfo/unitInfoReducer"; import pilotsReducer from "features/pilots/pilotsReducer"; import mechsReducer from "features/mechs/mechsReducer"; const combinedReducer = combineReducers({ entities : entitiesReducer, unitInfo : unitInfoReducer, pilots : pilotsReducer, mechs : mechsReducer, tabs : tabReducer, }); const rootReducer = reduceReducers( combinedReducer, ); export default rootReducer;
import {combineReducers} from "redux"; + + import {reduceReducers} from "common/utils/reducerUtils"; import entitiesReducer from "./entitiesReducer"; import tabReducer from "features/tabs/tabReducer"; import unitInfoReducer from "features/unitInfo/unitInfoReducer"; import pilotsReducer from "features/pilots/pilotsReducer"; import mechsReducer from "features/mechs/mechsReducer"; - const rootReducer = combineReducers({ ? ^ ^^ + const combinedReducer = combineReducers({ ? ^ ^^^^^^ entities : entitiesReducer, unitInfo : unitInfoReducer, pilots : pilotsReducer, mechs : mechsReducer, tabs : tabReducer, }); + + const rootReducer = reduceReducers( + combinedReducer, + ); + export default rootReducer;
9
0.5
8
1
7fcb5b81f41088cdcb780e6c42dd529f8160ced5
src/js/app/global.js
src/js/app/global.js
import Helper from "./Helper"; const h = new Helper; export let userItems; if (h.detectEnvironment() === "development") { userItems = "./src/data/list.json"; } else if (h.detectEnvironment() === "production") { userItems = global.process.resourcesPath + "/app/src/data/list.json"; } else { throw `global | userItems: ${userItems}`; } export const settings = "./src/data/settings.json";
import Helper from "./Helper"; const h = new Helper; export let userItems; export let settings; if (h.detectEnvironment() === "development") { userItems = "./src/data/list.json"; settings = "./src/data/settings.json"; } else if (h.detectEnvironment() === "production") { userItems = global.process.resourcesPath + "/app/src/data/list.json"; settings = global.process.resourcesPath + "/app/src/data/settings.json"; } else { throw "Can't detect environment"; }
Fix wrong path to settings in production
Fix wrong path to settings in production
JavaScript
mpl-2.0
LosEagle/MediaWorld,LosEagle/MediaWorld
javascript
## Code Before: import Helper from "./Helper"; const h = new Helper; export let userItems; if (h.detectEnvironment() === "development") { userItems = "./src/data/list.json"; } else if (h.detectEnvironment() === "production") { userItems = global.process.resourcesPath + "/app/src/data/list.json"; } else { throw `global | userItems: ${userItems}`; } export const settings = "./src/data/settings.json"; ## Instruction: Fix wrong path to settings in production ## Code After: import Helper from "./Helper"; const h = new Helper; export let userItems; export let settings; if (h.detectEnvironment() === "development") { userItems = "./src/data/list.json"; settings = "./src/data/settings.json"; } else if (h.detectEnvironment() === "production") { userItems = global.process.resourcesPath + "/app/src/data/list.json"; settings = global.process.resourcesPath + "/app/src/data/settings.json"; } else { throw "Can't detect environment"; }
import Helper from "./Helper"; const h = new Helper; export let userItems; + export let settings; if (h.detectEnvironment() === "development") { userItems = "./src/data/list.json"; + settings = "./src/data/settings.json"; } else if (h.detectEnvironment() === "production") { userItems = global.process.resourcesPath + "/app/src/data/list.json"; + settings = global.process.resourcesPath + "/app/src/data/settings.json"; } else { - throw `global | userItems: ${userItems}`; + throw "Can't detect environment"; } - - export const settings = "./src/data/settings.json";
7
0.466667
4
3
5057b70a59c1a3c8301928c0297d4012bd96b21a
mapApp/views/index.py
mapApp/views/index.py
from django.shortcuts import render from mapApp.models import Incident, Theft, Hazard, Official, AlertArea from mapApp.forms import IncidentForm, HazardForm, TheftForm, GeofenceForm, EditForm import datetime def index(request, lat=None, lng=None, zoom=None): incidents = Incident.objects.select_related('point').all() now = datetime.datetime.now() context = { # Model data used by map 'collisions': incidents.filter(p_type__exact="collision"), 'nearmisses': incidents.filter(p_type__exact="nearmiss"), 'hazards': Hazard.objects.select_related('point').exclude(expires_date__lt=now), 'thefts': Theft.objects.select_related('point').all(), # 'officials': officialResult, "geofences": AlertArea.objects.filter(user=request.user.id), # Form data used by map "incidentForm": IncidentForm(), "hazardForm": HazardForm(), "theftForm": TheftForm(), "geofenceForm": GeofenceForm(), "editForm": EditForm() } # Add zoom and center data if present if not None in [lat, lng, zoom]: context['lat']= float(lat) context['lng']= float(lng) context['zoom']= int(zoom) return render(request, 'mapApp/index.html', context)
from django.shortcuts import render from mapApp.models import Incident, Theft, Hazard, Official, AlertArea from mapApp.forms import IncidentForm, HazardForm, TheftForm, GeofenceForm, EditForm import datetime def index(request, lat=None, lng=None, zoom=None): incidents = Incident.objects.select_related('point').all() now = datetime.datetime.now() context = { # Model data used by map 'collisions': incidents.filter(p_type__exact="collision"), 'nearmisses': incidents.filter(p_type__exact="nearmiss"), 'hazards': Hazard.objects.select_related('point').exclude(expires_date__lt=now).exclude(hazard_fixed=True), 'thefts': Theft.objects.select_related('point').all(), # 'officials': officialResult, "geofences": AlertArea.objects.filter(user=request.user.id), # Form data used by map "incidentForm": IncidentForm(), "hazardForm": HazardForm(), "theftForm": TheftForm(), "geofenceForm": GeofenceForm(), "editForm": EditForm() } # Add zoom and center data if present if not None in [lat, lng, zoom]: context['lat']= float(lat) context['lng']= float(lng) context['zoom']= int(zoom) return render(request, 'mapApp/index.html', context)
Remove expired hazards from main map
Remove expired hazards from main map
Python
mit
SPARLab/BikeMaps,SPARLab/BikeMaps,SPARLab/BikeMaps
python
## Code Before: from django.shortcuts import render from mapApp.models import Incident, Theft, Hazard, Official, AlertArea from mapApp.forms import IncidentForm, HazardForm, TheftForm, GeofenceForm, EditForm import datetime def index(request, lat=None, lng=None, zoom=None): incidents = Incident.objects.select_related('point').all() now = datetime.datetime.now() context = { # Model data used by map 'collisions': incidents.filter(p_type__exact="collision"), 'nearmisses': incidents.filter(p_type__exact="nearmiss"), 'hazards': Hazard.objects.select_related('point').exclude(expires_date__lt=now), 'thefts': Theft.objects.select_related('point').all(), # 'officials': officialResult, "geofences": AlertArea.objects.filter(user=request.user.id), # Form data used by map "incidentForm": IncidentForm(), "hazardForm": HazardForm(), "theftForm": TheftForm(), "geofenceForm": GeofenceForm(), "editForm": EditForm() } # Add zoom and center data if present if not None in [lat, lng, zoom]: context['lat']= float(lat) context['lng']= float(lng) context['zoom']= int(zoom) return render(request, 'mapApp/index.html', context) ## Instruction: Remove expired hazards from main map ## Code After: from django.shortcuts import render from mapApp.models import Incident, Theft, Hazard, Official, AlertArea from mapApp.forms import IncidentForm, HazardForm, TheftForm, GeofenceForm, EditForm import datetime def index(request, lat=None, lng=None, zoom=None): incidents = Incident.objects.select_related('point').all() now = datetime.datetime.now() context = { # Model data used by map 'collisions': incidents.filter(p_type__exact="collision"), 'nearmisses': incidents.filter(p_type__exact="nearmiss"), 'hazards': Hazard.objects.select_related('point').exclude(expires_date__lt=now).exclude(hazard_fixed=True), 'thefts': Theft.objects.select_related('point').all(), # 'officials': officialResult, "geofences": AlertArea.objects.filter(user=request.user.id), # Form data used by map "incidentForm": IncidentForm(), "hazardForm": HazardForm(), "theftForm": TheftForm(), "geofenceForm": GeofenceForm(), "editForm": EditForm() } # Add zoom and center data if present if not None in [lat, lng, zoom]: context['lat']= float(lat) context['lng']= float(lng) context['zoom']= int(zoom) return render(request, 'mapApp/index.html', context)
from django.shortcuts import render from mapApp.models import Incident, Theft, Hazard, Official, AlertArea from mapApp.forms import IncidentForm, HazardForm, TheftForm, GeofenceForm, EditForm import datetime def index(request, lat=None, lng=None, zoom=None): incidents = Incident.objects.select_related('point').all() now = datetime.datetime.now() context = { # Model data used by map 'collisions': incidents.filter(p_type__exact="collision"), 'nearmisses': incidents.filter(p_type__exact="nearmiss"), - 'hazards': Hazard.objects.select_related('point').exclude(expires_date__lt=now), + 'hazards': Hazard.objects.select_related('point').exclude(expires_date__lt=now).exclude(hazard_fixed=True), ? +++++++++++++++++++++++++++ 'thefts': Theft.objects.select_related('point').all(), # 'officials': officialResult, "geofences": AlertArea.objects.filter(user=request.user.id), # Form data used by map "incidentForm": IncidentForm(), "hazardForm": HazardForm(), "theftForm": TheftForm(), "geofenceForm": GeofenceForm(), "editForm": EditForm() } # Add zoom and center data if present if not None in [lat, lng, zoom]: context['lat']= float(lat) context['lng']= float(lng) context['zoom']= int(zoom) return render(request, 'mapApp/index.html', context)
2
0.057143
1
1
2778a83e7f77feb6b6acf04a2a557f6151bce352
src/pkg/tinysplinecxx-config.cmake.in
src/pkg/tinysplinecxx-config.cmake.in
@PACKAGE_INIT@ set_and_check(TINYSPLINECXX_INCLUDE_DIRS "@PACKAGE_TINYSPLINE_INSTALL_INCLUDE_DIR@") set_and_check(TINYSPLINECXX_LIBRARY_DIRS "@PACKAGE_TINYSPLINE_INSTALL_LIBRARY_DIR@") set_and_check(TINYSPLINECXX_BINARY_DIRS "@PACKAGE_TINYSPLINE_INSTALL_BINARY_DIR@") set(TINYSPLINECXX_VERSION "@TINYSPLINE_VERSION@") set(TINYSPLINECXX_DEFINITIONS "@TINYSPLINE_CXX_DEFINITIONS@") include("${CMAKE_CURRENT_LIST_DIR}/tinysplinecxx-targets.cmake") set(TINYSPLINECXX_LIBRARIES tinysplinecxx::tinysplinecxx) mark_as_advanced( TINYSPLINECXX_INCLUDE_DIRS TINYSPLINECXX_LIBRARY_DIRS TINYSPLINECXX_BINARY_DIRS TINYSPLINECXX_VERSION TINYSPLINECXX_DEFINITIONS TINYSPLINECXX_LIBRARIES) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(tinysplinecxx REQUIRED_VARS TINYSPLINECXX_INCLUDE_DIRS TINYSPLINECXX_LIBRARY_DIRS TINYSPLINECXX_BINARY_DIRS TINYSPLINECXX_LIBRARIES VERSION_VAR TINYSPLINE_VERSION)
@PACKAGE_INIT@ set_and_check(TINYSPLINECXX_INCLUDE_DIRS "@PACKAGE_TINYSPLINE_INSTALL_INCLUDE_DIR@") set_and_check(TINYSPLINECXX_LIBRARY_DIRS "@PACKAGE_TINYSPLINE_INSTALL_LIBRARY_DIR@") set(TINYSPLINECXX_BINARY_DIRS "@PACKAGE_TINYSPLINE_INSTALL_BINARY_DIR@") set(TINYSPLINECXX_VERSION "@TINYSPLINE_VERSION@") set(TINYSPLINECXX_DEFINITIONS "@TINYSPLINE_CXX_DEFINITIONS@") include("${CMAKE_CURRENT_LIST_DIR}/tinysplinecxx-targets.cmake") set(TINYSPLINECXX_LIBRARIES tinysplinecxx::tinysplinecxx) mark_as_advanced( TINYSPLINECXX_INCLUDE_DIRS TINYSPLINECXX_LIBRARY_DIRS TINYSPLINECXX_BINARY_DIRS TINYSPLINECXX_VERSION TINYSPLINECXX_DEFINITIONS TINYSPLINECXX_LIBRARIES) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(tinysplinecxx REQUIRED_VARS TINYSPLINECXX_INCLUDE_DIRS TINYSPLINECXX_LIBRARY_DIRS TINYSPLINECXX_BINARY_DIRS TINYSPLINECXX_LIBRARIES VERSION_VAR TINYSPLINE_VERSION)
Fix TINYSPLINECXX_BINARY_DIRS in CMake config file
Fix TINYSPLINECXX_BINARY_DIRS in CMake config file
unknown
mit
msteinbeck/tinyspline,msteinbeck/tinyspline,msteinbeck/tinyspline,msteinbeck/tinyspline,msteinbeck/tinyspline,msteinbeck/tinyspline,msteinbeck/tinyspline,retuxx/tinyspline,msteinbeck/tinyspline,retuxx/tinyspline,retuxx/tinyspline
unknown
## Code Before: @PACKAGE_INIT@ set_and_check(TINYSPLINECXX_INCLUDE_DIRS "@PACKAGE_TINYSPLINE_INSTALL_INCLUDE_DIR@") set_and_check(TINYSPLINECXX_LIBRARY_DIRS "@PACKAGE_TINYSPLINE_INSTALL_LIBRARY_DIR@") set_and_check(TINYSPLINECXX_BINARY_DIRS "@PACKAGE_TINYSPLINE_INSTALL_BINARY_DIR@") set(TINYSPLINECXX_VERSION "@TINYSPLINE_VERSION@") set(TINYSPLINECXX_DEFINITIONS "@TINYSPLINE_CXX_DEFINITIONS@") include("${CMAKE_CURRENT_LIST_DIR}/tinysplinecxx-targets.cmake") set(TINYSPLINECXX_LIBRARIES tinysplinecxx::tinysplinecxx) mark_as_advanced( TINYSPLINECXX_INCLUDE_DIRS TINYSPLINECXX_LIBRARY_DIRS TINYSPLINECXX_BINARY_DIRS TINYSPLINECXX_VERSION TINYSPLINECXX_DEFINITIONS TINYSPLINECXX_LIBRARIES) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(tinysplinecxx REQUIRED_VARS TINYSPLINECXX_INCLUDE_DIRS TINYSPLINECXX_LIBRARY_DIRS TINYSPLINECXX_BINARY_DIRS TINYSPLINECXX_LIBRARIES VERSION_VAR TINYSPLINE_VERSION) ## Instruction: Fix TINYSPLINECXX_BINARY_DIRS in CMake config file ## Code After: @PACKAGE_INIT@ set_and_check(TINYSPLINECXX_INCLUDE_DIRS "@PACKAGE_TINYSPLINE_INSTALL_INCLUDE_DIR@") set_and_check(TINYSPLINECXX_LIBRARY_DIRS "@PACKAGE_TINYSPLINE_INSTALL_LIBRARY_DIR@") set(TINYSPLINECXX_BINARY_DIRS "@PACKAGE_TINYSPLINE_INSTALL_BINARY_DIR@") set(TINYSPLINECXX_VERSION "@TINYSPLINE_VERSION@") set(TINYSPLINECXX_DEFINITIONS "@TINYSPLINE_CXX_DEFINITIONS@") include("${CMAKE_CURRENT_LIST_DIR}/tinysplinecxx-targets.cmake") set(TINYSPLINECXX_LIBRARIES tinysplinecxx::tinysplinecxx) mark_as_advanced( TINYSPLINECXX_INCLUDE_DIRS TINYSPLINECXX_LIBRARY_DIRS TINYSPLINECXX_BINARY_DIRS TINYSPLINECXX_VERSION TINYSPLINECXX_DEFINITIONS TINYSPLINECXX_LIBRARIES) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(tinysplinecxx REQUIRED_VARS TINYSPLINECXX_INCLUDE_DIRS TINYSPLINECXX_LIBRARY_DIRS TINYSPLINECXX_BINARY_DIRS TINYSPLINECXX_LIBRARIES VERSION_VAR TINYSPLINE_VERSION)
@PACKAGE_INIT@ set_and_check(TINYSPLINECXX_INCLUDE_DIRS "@PACKAGE_TINYSPLINE_INSTALL_INCLUDE_DIR@") set_and_check(TINYSPLINECXX_LIBRARY_DIRS "@PACKAGE_TINYSPLINE_INSTALL_LIBRARY_DIR@") - set_and_check(TINYSPLINECXX_BINARY_DIRS "@PACKAGE_TINYSPLINE_INSTALL_BINARY_DIR@") ? ---------- + set(TINYSPLINECXX_BINARY_DIRS "@PACKAGE_TINYSPLINE_INSTALL_BINARY_DIR@") set(TINYSPLINECXX_VERSION "@TINYSPLINE_VERSION@") set(TINYSPLINECXX_DEFINITIONS "@TINYSPLINE_CXX_DEFINITIONS@") include("${CMAKE_CURRENT_LIST_DIR}/tinysplinecxx-targets.cmake") set(TINYSPLINECXX_LIBRARIES tinysplinecxx::tinysplinecxx) mark_as_advanced( TINYSPLINECXX_INCLUDE_DIRS TINYSPLINECXX_LIBRARY_DIRS TINYSPLINECXX_BINARY_DIRS TINYSPLINECXX_VERSION TINYSPLINECXX_DEFINITIONS TINYSPLINECXX_LIBRARIES) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(tinysplinecxx REQUIRED_VARS TINYSPLINECXX_INCLUDE_DIRS TINYSPLINECXX_LIBRARY_DIRS TINYSPLINECXX_BINARY_DIRS TINYSPLINECXX_LIBRARIES VERSION_VAR TINYSPLINE_VERSION)
2
0.074074
1
1
fd0cb97366267bebc08af075d619bfbb9ab8ae38
packages/ma/MapWith.yaml
packages/ma/MapWith.yaml
homepage: '' changelog-type: markdown hash: b55c36b68c4a25f209b4013bb47d3184da9729df52e09ad45fb4473aaf3a850b test-bench-deps: base: -any maintainer: dj112358@outlook.com synopsis: 'mapWith: like fmap, but with additional arguments (isFirst, isLast, etc).' changelog: "# Revision history for MapWith\r\n\r\n## 0.1.0.0 -- 2020-06-24\r\n* First release\r\n" basic-deps: base: '>=4.9.1 && <4.15' all-versions: - 0.1.0.0 author: David James latest: 0.1.0.0 description-type: haddock description: |- fmap over Traversables (including lists), but pass additional parameters to the map function, such as isFirst, isLast, prevElt, nextElt, index from start or end, custom params. For examples see https://github.com/davjam/MapWith/blob/master/doc/examples.hs license-name: BSD-3-Clause
homepage: https://github.com/davjam/MapWith#readme changelog-type: markdown hash: 7ae1f42261f0f783f62bb76df2534cb02759788fdb987310783f3401fbc377fe test-bench-deps: base: -any maintainer: dj112358@outlook.com synopsis: 'mapWith: like fmap, but with additional arguments (isFirst, isLast, etc).' changelog: "# Revision history for MapWith\r\n\r\n## 0.1.0.0 -- 2020-06-24\r\n* First release\r\n" basic-deps: base: '>=4.9.1 && <4.15' all-versions: - 0.1.0.0 author: David James latest: 0.1.0.0 description-type: haddock description: |- fmap over Traversables (including lists), but pass additional parameters to the map function, such as isFirst, isLast, prevElt, nextElt, index from start or end, custom params. For examples see https://github.com/davjam/MapWith/blob/master/doc/examples.hs license-name: BSD-3-Clause
Update from Hackage at 2020-07-28T15:28:53Z
Update from Hackage at 2020-07-28T15:28:53Z
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: '' changelog-type: markdown hash: b55c36b68c4a25f209b4013bb47d3184da9729df52e09ad45fb4473aaf3a850b test-bench-deps: base: -any maintainer: dj112358@outlook.com synopsis: 'mapWith: like fmap, but with additional arguments (isFirst, isLast, etc).' changelog: "# Revision history for MapWith\r\n\r\n## 0.1.0.0 -- 2020-06-24\r\n* First release\r\n" basic-deps: base: '>=4.9.1 && <4.15' all-versions: - 0.1.0.0 author: David James latest: 0.1.0.0 description-type: haddock description: |- fmap over Traversables (including lists), but pass additional parameters to the map function, such as isFirst, isLast, prevElt, nextElt, index from start or end, custom params. For examples see https://github.com/davjam/MapWith/blob/master/doc/examples.hs license-name: BSD-3-Clause ## Instruction: Update from Hackage at 2020-07-28T15:28:53Z ## Code After: homepage: https://github.com/davjam/MapWith#readme changelog-type: markdown hash: 7ae1f42261f0f783f62bb76df2534cb02759788fdb987310783f3401fbc377fe test-bench-deps: base: -any maintainer: dj112358@outlook.com synopsis: 'mapWith: like fmap, but with additional arguments (isFirst, isLast, etc).' changelog: "# Revision history for MapWith\r\n\r\n## 0.1.0.0 -- 2020-06-24\r\n* First release\r\n" basic-deps: base: '>=4.9.1 && <4.15' all-versions: - 0.1.0.0 author: David James latest: 0.1.0.0 description-type: haddock description: |- fmap over Traversables (including lists), but pass additional parameters to the map function, such as isFirst, isLast, prevElt, nextElt, index from start or end, custom params. For examples see https://github.com/davjam/MapWith/blob/master/doc/examples.hs license-name: BSD-3-Clause
- homepage: '' + homepage: https://github.com/davjam/MapWith#readme changelog-type: markdown - hash: b55c36b68c4a25f209b4013bb47d3184da9729df52e09ad45fb4473aaf3a850b + hash: 7ae1f42261f0f783f62bb76df2534cb02759788fdb987310783f3401fbc377fe test-bench-deps: base: -any maintainer: dj112358@outlook.com synopsis: 'mapWith: like fmap, but with additional arguments (isFirst, isLast, etc).' changelog: "# Revision history for MapWith\r\n\r\n## 0.1.0.0 -- 2020-06-24\r\n* First release\r\n" basic-deps: base: '>=4.9.1 && <4.15' all-versions: - 0.1.0.0 author: David James latest: 0.1.0.0 description-type: haddock description: |- fmap over Traversables (including lists), but pass additional parameters to the map function, such as isFirst, isLast, prevElt, nextElt, index from start or end, custom params. For examples see https://github.com/davjam/MapWith/blob/master/doc/examples.hs license-name: BSD-3-Clause
4
0.190476
2
2
75ca68f4f89f18beb5b09c5f34b863f83899c2e8
localization/main.swift
localization/main.swift
import Foundation let count = CommandLine.arguments.count guard count > 1 else { abort() } let path = CommandLine.arguments[1] //Process.launchedProcess(launchPath: "\(path)/scripts/localization_extract", arguments: [path]).waitUntilExit() if CommandLine.arguments.contains("export") { exportLocalizationsFromSourceCode(path) } if CommandLine.arguments.contains("import") { importLocalizationsFromTWN(path) }
import Foundation let count = CommandLine.arguments.count guard count > 1 else { abort() } let path = CommandLine.arguments[1] if CommandLine.arguments.contains("export") { Process.launchedProcess(launchPath: "\(path)/scripts/localization_extract", arguments: [path]).waitUntilExit() exportLocalizationsFromSourceCode(path) } if CommandLine.arguments.contains("import") { importLocalizationsFromTWN(path) }
Revert "Revert "run localization_extract along with the export""
Revert "Revert "run localization_extract along with the export"" This reverts commit dd520ebe528fc80be404c21eb4b7af53478395cf.
Swift
mit
wikimedia/wikipedia-ios,wikimedia/wikipedia-ios,wikimedia/wikipedia-ios,montehurd/apps-ios-wikipedia,wikimedia/wikipedia-ios,julienbodet/wikipedia-ios,julienbodet/wikipedia-ios,josve05a/wikipedia-ios,wikimedia/wikipedia-ios,wikimedia/apps-ios-wikipedia,wikimedia/apps-ios-wikipedia,wikimedia/apps-ios-wikipedia,josve05a/wikipedia-ios,montehurd/apps-ios-wikipedia,julienbodet/wikipedia-ios,montehurd/apps-ios-wikipedia,josve05a/wikipedia-ios,wikimedia/apps-ios-wikipedia,montehurd/apps-ios-wikipedia,wikimedia/apps-ios-wikipedia,montehurd/apps-ios-wikipedia,julienbodet/wikipedia-ios,josve05a/wikipedia-ios,wikimedia/wikipedia-ios,wikimedia/apps-ios-wikipedia,julienbodet/wikipedia-ios,montehurd/apps-ios-wikipedia,josve05a/wikipedia-ios,julienbodet/wikipedia-ios,josve05a/wikipedia-ios,josve05a/wikipedia-ios,julienbodet/wikipedia-ios,wikimedia/wikipedia-ios,josve05a/wikipedia-ios,wikimedia/apps-ios-wikipedia,julienbodet/wikipedia-ios,montehurd/apps-ios-wikipedia,wikimedia/apps-ios-wikipedia,montehurd/apps-ios-wikipedia
swift
## Code Before: import Foundation let count = CommandLine.arguments.count guard count > 1 else { abort() } let path = CommandLine.arguments[1] //Process.launchedProcess(launchPath: "\(path)/scripts/localization_extract", arguments: [path]).waitUntilExit() if CommandLine.arguments.contains("export") { exportLocalizationsFromSourceCode(path) } if CommandLine.arguments.contains("import") { importLocalizationsFromTWN(path) } ## Instruction: Revert "Revert "run localization_extract along with the export"" This reverts commit dd520ebe528fc80be404c21eb4b7af53478395cf. ## Code After: import Foundation let count = CommandLine.arguments.count guard count > 1 else { abort() } let path = CommandLine.arguments[1] if CommandLine.arguments.contains("export") { Process.launchedProcess(launchPath: "\(path)/scripts/localization_extract", arguments: [path]).waitUntilExit() exportLocalizationsFromSourceCode(path) } if CommandLine.arguments.contains("import") { importLocalizationsFromTWN(path) }
import Foundation let count = CommandLine.arguments.count guard count > 1 else { abort() } let path = CommandLine.arguments[1] - //Process.launchedProcess(launchPath: "\(path)/scripts/localization_extract", arguments: [path]).waitUntilExit() - if CommandLine.arguments.contains("export") { + Process.launchedProcess(launchPath: "\(path)/scripts/localization_extract", arguments: [path]).waitUntilExit() exportLocalizationsFromSourceCode(path) } if CommandLine.arguments.contains("import") { importLocalizationsFromTWN(path) }
3
0.166667
1
2
dbd401be6bae38cf3590891b5a71f4c71c23cfdb
src/components/Header.js
src/components/Header.js
"use strict"; import React, { Component } from 'react'; // Bootstrap import { Grid, Row, Col, Navbar, NavItem, Nav } from 'react-bootstrap'; export default class Header extends Component { render() { return( <Navbar inverse fixedTop> <Navbar.Header> <Navbar.Brand> <img src='/assets/img/nyc-logo.png' /> </Navbar.Brand> <Navbar.Toggle /> </Navbar.Header> <Navbar.Collapse> <Nav> <NavItem eventKey={1} href="#">Back To Top</NavItem> </Nav> </Navbar.Collapse> </Navbar> ); } }
"use strict"; import React, { Component } from 'react'; // Bootstrap import { Grid, Row, Col, Navbar, NavItem, Nav } from 'react-bootstrap'; export default class Header extends Component { render() { return( <Navbar inverse fixedTop> <Navbar.Header> <Navbar.Brand> <img src='http://localhost:8081/assets/img/nyc-logo.png' /> </Navbar.Brand> <Navbar.Toggle /> </Navbar.Header> <Navbar.Collapse> <Nav> <NavItem eventKey={1} href="#">Back To Top</NavItem> </Nav> </Navbar.Collapse> </Navbar> ); } }
Fix link to nyc logo with temporary pointer to webpack-dev-server
Fix link to nyc logo with temporary pointer to webpack-dev-server
JavaScript
mit
codeforamerica/nyc-january-project,codeforamerica/nyc-january-project
javascript
## Code Before: "use strict"; import React, { Component } from 'react'; // Bootstrap import { Grid, Row, Col, Navbar, NavItem, Nav } from 'react-bootstrap'; export default class Header extends Component { render() { return( <Navbar inverse fixedTop> <Navbar.Header> <Navbar.Brand> <img src='/assets/img/nyc-logo.png' /> </Navbar.Brand> <Navbar.Toggle /> </Navbar.Header> <Navbar.Collapse> <Nav> <NavItem eventKey={1} href="#">Back To Top</NavItem> </Nav> </Navbar.Collapse> </Navbar> ); } } ## Instruction: Fix link to nyc logo with temporary pointer to webpack-dev-server ## Code After: "use strict"; import React, { Component } from 'react'; // Bootstrap import { Grid, Row, Col, Navbar, NavItem, Nav } from 'react-bootstrap'; export default class Header extends Component { render() { return( <Navbar inverse fixedTop> <Navbar.Header> <Navbar.Brand> <img src='http://localhost:8081/assets/img/nyc-logo.png' /> </Navbar.Brand> <Navbar.Toggle /> </Navbar.Header> <Navbar.Collapse> <Nav> <NavItem eventKey={1} href="#">Back To Top</NavItem> </Nav> </Navbar.Collapse> </Navbar> ); } }
"use strict"; import React, { Component } from 'react'; // Bootstrap import { Grid, Row, Col, Navbar, NavItem, Nav } from 'react-bootstrap'; export default class Header extends Component { render() { return( <Navbar inverse fixedTop> <Navbar.Header> <Navbar.Brand> - <img src='/assets/img/nyc-logo.png' /> + <img src='http://localhost:8081/assets/img/nyc-logo.png' /> ? +++++++++++++++++++++ </Navbar.Brand> <Navbar.Toggle /> </Navbar.Header> <Navbar.Collapse> <Nav> <NavItem eventKey={1} href="#">Back To Top</NavItem> </Nav> </Navbar.Collapse> </Navbar> ); } }
2
0.076923
1
1
28e57d92de79391295198d738a7ae85021efb7e2
javascript/app.js
javascript/app.js
render("contacts"); render("projects"); function render(template) { var source = document.getElementById(template + "-template").innerHTML; var destination = document.querySelector("." + template); destination.innerHTML = Handlebars.compile(source)(data[template]); } var action = document.getElementById("action"); var actions = ["collaborate", "create", "share", "build", "learn", "code", "teach", "dream"]; var i = 0; setInterval(function() { action.innerHTML = actions[i]; i = (i + 1) % actions.length; }, 1500); var bLazy = new Blazy({ selector: 'img' } );
render("contacts"); render("projects"); function render(template) { var source = document.getElementById(template + "-template").innerHTML; var destination = document.querySelector("." + template); destination.innerHTML = Handlebars.compile(source)(data[template]); } var action = document.getElementById("action"); var actions = ["collaborate", "create", "share", "build", "learn", "code", "teach", "dream"]; var i = 0; setInterval(function() { action.innerHTML = actions[i]; i = (i + 1) % actions.length; }, 1500); var bLazy = new Blazy({ selector: 'img', offset: 500 } );
Set the bLazy offset to 500px
Set the bLazy offset to 500px
JavaScript
mit
AlanMorel/alanmorelcom
javascript
## Code Before: render("contacts"); render("projects"); function render(template) { var source = document.getElementById(template + "-template").innerHTML; var destination = document.querySelector("." + template); destination.innerHTML = Handlebars.compile(source)(data[template]); } var action = document.getElementById("action"); var actions = ["collaborate", "create", "share", "build", "learn", "code", "teach", "dream"]; var i = 0; setInterval(function() { action.innerHTML = actions[i]; i = (i + 1) % actions.length; }, 1500); var bLazy = new Blazy({ selector: 'img' } ); ## Instruction: Set the bLazy offset to 500px ## Code After: render("contacts"); render("projects"); function render(template) { var source = document.getElementById(template + "-template").innerHTML; var destination = document.querySelector("." + template); destination.innerHTML = Handlebars.compile(source)(data[template]); } var action = document.getElementById("action"); var actions = ["collaborate", "create", "share", "build", "learn", "code", "teach", "dream"]; var i = 0; setInterval(function() { action.innerHTML = actions[i]; i = (i + 1) % actions.length; }, 1500); var bLazy = new Blazy({ selector: 'img', offset: 500 } );
render("contacts"); render("projects"); function render(template) { var source = document.getElementById(template + "-template").innerHTML; var destination = document.querySelector("." + template); destination.innerHTML = Handlebars.compile(source)(data[template]); } var action = document.getElementById("action"); var actions = ["collaborate", "create", "share", "build", "learn", "code", "teach", "dream"]; var i = 0; setInterval(function() { action.innerHTML = actions[i]; i = (i + 1) % actions.length; }, 1500); var bLazy = new Blazy({ - selector: 'img' + selector: 'img', ? + + offset: 500 } );
3
0.130435
2
1
71fd1b82f4bc9f009a80a0495fafc82c15aa58b3
setup.py
setup.py
import sys from distutils.core import setup from setuptools import find_packages from lehrex import __version__ if not sys.version_info >= (3, 5, 1): sys.exit('Only support Python version >=3.5.1.\n' 'Found version is {}'.format(sys.version)) setup( name='lehrex', author='Lukas Kluft', author_email='lukas.kluft@gmail.com', url='https://github.com/lkluft/lehrex', download_url='https://github.com/lkluft/lehrex/tarball/' + __version__, version=__version__, packages=find_packages(), license='MIT', description='Support the research during the Lehrexkursion.', classifiers=[ # See https://pypi.python.org/pypi?%3Aaction=list_classifiers 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', ], include_package_data=True, install_requires=[ 'matplotlib>=1.5.1', 'numpy>=1.10.4', ], )
import sys from distutils.core import setup from setuptools import find_packages from lehrex import __version__ if not sys.version_info >= (3, 5, 1): sys.exit('Only support Python version >=3.5.1.\n' 'Found version is {}'.format(sys.version)) setup( name='lehrex', author='Lukas Kluft', author_email='lukas.kluft@gmail.com', url='https://github.com/lkluft/lehrex', download_url='https://github.com/lkluft/lehrex/tarball/' + __version__, version=__version__, packages=find_packages(), license='MIT', description='Support the research during the Lehrexkursion.', classifiers=[ # See https://pypi.python.org/pypi?%3Aaction=list_classifiers 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', ], include_package_data=True, install_requires=[ 'matplotlib>=1.5.1', 'numpy>=1.10.4', 'nose', ], )
Add nose to list of dependencies.
Add nose to list of dependencies.
Python
mit
lkluft/lehrex
python
## Code Before: import sys from distutils.core import setup from setuptools import find_packages from lehrex import __version__ if not sys.version_info >= (3, 5, 1): sys.exit('Only support Python version >=3.5.1.\n' 'Found version is {}'.format(sys.version)) setup( name='lehrex', author='Lukas Kluft', author_email='lukas.kluft@gmail.com', url='https://github.com/lkluft/lehrex', download_url='https://github.com/lkluft/lehrex/tarball/' + __version__, version=__version__, packages=find_packages(), license='MIT', description='Support the research during the Lehrexkursion.', classifiers=[ # See https://pypi.python.org/pypi?%3Aaction=list_classifiers 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', ], include_package_data=True, install_requires=[ 'matplotlib>=1.5.1', 'numpy>=1.10.4', ], ) ## Instruction: Add nose to list of dependencies. ## Code After: import sys from distutils.core import setup from setuptools import find_packages from lehrex import __version__ if not sys.version_info >= (3, 5, 1): sys.exit('Only support Python version >=3.5.1.\n' 'Found version is {}'.format(sys.version)) setup( name='lehrex', author='Lukas Kluft', author_email='lukas.kluft@gmail.com', url='https://github.com/lkluft/lehrex', download_url='https://github.com/lkluft/lehrex/tarball/' + __version__, version=__version__, packages=find_packages(), license='MIT', description='Support the research during the Lehrexkursion.', classifiers=[ # See https://pypi.python.org/pypi?%3Aaction=list_classifiers 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', ], include_package_data=True, install_requires=[ 'matplotlib>=1.5.1', 'numpy>=1.10.4', 'nose', ], )
import sys from distutils.core import setup from setuptools import find_packages from lehrex import __version__ if not sys.version_info >= (3, 5, 1): sys.exit('Only support Python version >=3.5.1.\n' 'Found version is {}'.format(sys.version)) setup( name='lehrex', author='Lukas Kluft', author_email='lukas.kluft@gmail.com', url='https://github.com/lkluft/lehrex', download_url='https://github.com/lkluft/lehrex/tarball/' + __version__, version=__version__, packages=find_packages(), license='MIT', description='Support the research during the Lehrexkursion.', classifiers=[ # See https://pypi.python.org/pypi?%3Aaction=list_classifiers 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', ], include_package_data=True, install_requires=[ 'matplotlib>=1.5.1', 'numpy>=1.10.4', + 'nose', ], )
1
0.030303
1
0
c585aae7432af57f1818b3c6a8878f58e073723e
src/Log/Formatter/JsonFormatter.php
src/Log/Formatter/JsonFormatter.php
<?php declare(strict_types=1); /** * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * @link https://cakefoundation.org CakePHP(tm) Project * @since 4.3.0 * @license https://opensource.org/licenses/mit-license.php MIT License */ namespace Cake\Log\Formatter; class JsonFormatter extends AbstractFormatter { /** * Default config for this class * * @var array<string, mixed> */ protected $_defaultConfig = [ 'dateFormat' => DATE_ATOM, 'flags' => JSON_UNESCAPED_UNICODE, ]; /** * @param array<string, mixed> $config Formatter config */ public function __construct(array $config = []) { $this->setConfig($config); } /** * @inheritDoc */ public function format($level, string $message, array $context = []): string { $log = ['date' => date($this->_config['dateFormat']), 'level' => (string)$level, 'message' => $message]; return json_encode($log, $this->_config['flags']); } }
<?php declare(strict_types=1); /** * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * @link https://cakefoundation.org CakePHP(tm) Project * @since 4.3.0 * @license https://opensource.org/licenses/mit-license.php MIT License */ namespace Cake\Log\Formatter; class JsonFormatter extends AbstractFormatter { /** * Default config for this class * * @var array<string, mixed> */ protected $_defaultConfig = [ 'dateFormat' => DATE_ATOM, 'flags' => JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES, ]; /** * @param array<string, mixed> $config Formatter config */ public function __construct(array $config = []) { $this->setConfig($config); } /** * @inheritDoc */ public function format($level, string $message, array $context = []): string { $log = ['date' => date($this->_config['dateFormat']), 'level' => (string)$level, 'message' => $message]; return json_encode($log, $this->_config['flags']); } }
Disable slash escaping by default
Disable slash escaping by default
PHP
mit
ADmad/cakephp,ADmad/cakephp,cakephp/cakephp,ndm2/cakephp,ADmad/cakephp,CakeDC/cakephp,ADmad/cakephp,cakephp/cakephp,ndm2/cakephp,ndm2/cakephp,cakephp/cakephp,cakephp/cakephp,CakeDC/cakephp,CakeDC/cakephp,ndm2/cakephp,CakeDC/cakephp
php
## Code Before: <?php declare(strict_types=1); /** * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * @link https://cakefoundation.org CakePHP(tm) Project * @since 4.3.0 * @license https://opensource.org/licenses/mit-license.php MIT License */ namespace Cake\Log\Formatter; class JsonFormatter extends AbstractFormatter { /** * Default config for this class * * @var array<string, mixed> */ protected $_defaultConfig = [ 'dateFormat' => DATE_ATOM, 'flags' => JSON_UNESCAPED_UNICODE, ]; /** * @param array<string, mixed> $config Formatter config */ public function __construct(array $config = []) { $this->setConfig($config); } /** * @inheritDoc */ public function format($level, string $message, array $context = []): string { $log = ['date' => date($this->_config['dateFormat']), 'level' => (string)$level, 'message' => $message]; return json_encode($log, $this->_config['flags']); } } ## Instruction: Disable slash escaping by default ## Code After: <?php declare(strict_types=1); /** * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * @link https://cakefoundation.org CakePHP(tm) Project * @since 4.3.0 * @license https://opensource.org/licenses/mit-license.php MIT License */ namespace Cake\Log\Formatter; class JsonFormatter extends AbstractFormatter { /** * Default config for this class * * @var array<string, mixed> */ protected $_defaultConfig = [ 'dateFormat' => DATE_ATOM, 'flags' => JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES, ]; /** * @param array<string, mixed> $config Formatter config */ public function __construct(array $config = []) { $this->setConfig($config); } /** * @inheritDoc */ public function format($level, string $message, array $context = []): string { $log = ['date' => date($this->_config['dateFormat']), 'level' => (string)$level, 'message' => $message]; return json_encode($log, $this->_config['flags']); } }
<?php declare(strict_types=1); /** * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * @link https://cakefoundation.org CakePHP(tm) Project * @since 4.3.0 * @license https://opensource.org/licenses/mit-license.php MIT License */ namespace Cake\Log\Formatter; class JsonFormatter extends AbstractFormatter { /** * Default config for this class * * @var array<string, mixed> */ protected $_defaultConfig = [ 'dateFormat' => DATE_ATOM, - 'flags' => JSON_UNESCAPED_UNICODE, + 'flags' => JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES, ? +++++++++++++++++++++++++ ]; /** * @param array<string, mixed> $config Formatter config */ public function __construct(array $config = []) { $this->setConfig($config); } /** * @inheritDoc */ public function format($level, string $message, array $context = []): string { $log = ['date' => date($this->_config['dateFormat']), 'level' => (string)$level, 'message' => $message]; return json_encode($log, $this->_config['flags']); } }
2
0.041667
1
1
a79ffcd91aa7720703bf88895aa0665257850932
src/main/java/net/mcft/copy/betterstorage/addon/armourersworkshop/AWDataManager.java
src/main/java/net/mcft/copy/betterstorage/addon/armourersworkshop/AWDataManager.java
package net.mcft.copy.betterstorage.addon.armourersworkshop; import net.minecraft.entity.Entity; import riskyken.armourersWorkshop.api.client.render.IEquipmentRenderHandler; import riskyken.armourersWorkshop.api.client.render.IEquipmentRenderManager; import riskyken.armourersWorkshop.api.common.equipment.EnumEquipmentPart; import riskyken.armourersWorkshop.api.common.equipment.EnumEquipmentType; import riskyken.armourersWorkshop.api.common.equipment.IEquipmentDataHandler; import riskyken.armourersWorkshop.api.common.equipment.IEquipmentDataManager; public class AWDataManager implements IEquipmentDataManager, IEquipmentRenderManager { @Override public void onLoad(IEquipmentDataHandler dataHandler) { AWAddon.dataHandler = dataHandler; } @Override public void onLoad(IEquipmentRenderHandler renderHandler) { AWAddon.renderHandler = renderHandler; } @Override public void onRenderEquipment(Entity entity, EnumEquipmentType armourType) { } @Override public void onRenderEquipmentPart(Entity entity, EnumEquipmentPart armourPart) { } }
package net.mcft.copy.betterstorage.addon.armourersworkshop; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import riskyken.armourersWorkshop.api.client.render.IEquipmentRenderHandler; import riskyken.armourersWorkshop.api.client.render.IEquipmentRenderManager; import riskyken.armourersWorkshop.api.common.equipment.EnumEquipmentPart; import riskyken.armourersWorkshop.api.common.equipment.EnumEquipmentType; import riskyken.armourersWorkshop.api.common.equipment.IEquipmentDataHandler; import riskyken.armourersWorkshop.api.common.equipment.IEquipmentDataManager; import com.mojang.authlib.GameProfile; public class AWDataManager implements IEquipmentDataManager, IEquipmentRenderManager { @Override public void onLoad(IEquipmentDataHandler dataHandler) { AWAddon.dataHandler = dataHandler; } @Override public void onLoad(IEquipmentRenderHandler renderHandler) { AWAddon.renderHandler = renderHandler; } @Override public void onRenderEquipment(Entity entity, EnumEquipmentType armourType) { } @Override public void onRenderEquipmentPart(Entity entity, EnumEquipmentPart armourPart) { } @Override public void onRenderMannequin(TileEntity TileEntity, GameProfile gameProfile) { } }
Update to new Armourer's Workshop API
Update to new Armourer's Workshop API
Java
mit
TehStoneMan/BetterStorage,Adaptivity/BetterStorage,KingDarkLord/BetterStorage,CannibalVox/BetterStorage,TehStoneMan/BetterStorageToo,copygirl/BetterStorage,RX14/BetterStorage,Bunsan/BetterStorage,skyem123/BetterStorage,AnodeCathode/BetterStorage
java
## Code Before: package net.mcft.copy.betterstorage.addon.armourersworkshop; import net.minecraft.entity.Entity; import riskyken.armourersWorkshop.api.client.render.IEquipmentRenderHandler; import riskyken.armourersWorkshop.api.client.render.IEquipmentRenderManager; import riskyken.armourersWorkshop.api.common.equipment.EnumEquipmentPart; import riskyken.armourersWorkshop.api.common.equipment.EnumEquipmentType; import riskyken.armourersWorkshop.api.common.equipment.IEquipmentDataHandler; import riskyken.armourersWorkshop.api.common.equipment.IEquipmentDataManager; public class AWDataManager implements IEquipmentDataManager, IEquipmentRenderManager { @Override public void onLoad(IEquipmentDataHandler dataHandler) { AWAddon.dataHandler = dataHandler; } @Override public void onLoad(IEquipmentRenderHandler renderHandler) { AWAddon.renderHandler = renderHandler; } @Override public void onRenderEquipment(Entity entity, EnumEquipmentType armourType) { } @Override public void onRenderEquipmentPart(Entity entity, EnumEquipmentPart armourPart) { } } ## Instruction: Update to new Armourer's Workshop API ## Code After: package net.mcft.copy.betterstorage.addon.armourersworkshop; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import riskyken.armourersWorkshop.api.client.render.IEquipmentRenderHandler; import riskyken.armourersWorkshop.api.client.render.IEquipmentRenderManager; import riskyken.armourersWorkshop.api.common.equipment.EnumEquipmentPart; import riskyken.armourersWorkshop.api.common.equipment.EnumEquipmentType; import riskyken.armourersWorkshop.api.common.equipment.IEquipmentDataHandler; import riskyken.armourersWorkshop.api.common.equipment.IEquipmentDataManager; import com.mojang.authlib.GameProfile; public class AWDataManager implements IEquipmentDataManager, IEquipmentRenderManager { @Override public void onLoad(IEquipmentDataHandler dataHandler) { AWAddon.dataHandler = dataHandler; } @Override public void onLoad(IEquipmentRenderHandler renderHandler) { AWAddon.renderHandler = renderHandler; } @Override public void onRenderEquipment(Entity entity, EnumEquipmentType armourType) { } @Override public void onRenderEquipmentPart(Entity entity, EnumEquipmentPart armourPart) { } @Override public void onRenderMannequin(TileEntity TileEntity, GameProfile gameProfile) { } }
package net.mcft.copy.betterstorage.addon.armourersworkshop; import net.minecraft.entity.Entity; + import net.minecraft.tileentity.TileEntity; import riskyken.armourersWorkshop.api.client.render.IEquipmentRenderHandler; import riskyken.armourersWorkshop.api.client.render.IEquipmentRenderManager; import riskyken.armourersWorkshop.api.common.equipment.EnumEquipmentPart; import riskyken.armourersWorkshop.api.common.equipment.EnumEquipmentType; import riskyken.armourersWorkshop.api.common.equipment.IEquipmentDataHandler; import riskyken.armourersWorkshop.api.common.equipment.IEquipmentDataManager; + import com.mojang.authlib.GameProfile; + public class AWDataManager implements IEquipmentDataManager, IEquipmentRenderManager { @Override public void onLoad(IEquipmentDataHandler dataHandler) { AWAddon.dataHandler = dataHandler; } - + @Override public void onLoad(IEquipmentRenderHandler renderHandler) { AWAddon.renderHandler = renderHandler; } - - @Override - public void onRenderEquipment(Entity entity, EnumEquipmentType armourType) { - - } @Override + public void onRenderEquipment(Entity entity, EnumEquipmentType armourType) { } + + @Override - public void onRenderEquipmentPart(Entity entity, EnumEquipmentPart armourPart) { + public void onRenderEquipmentPart(Entity entity, EnumEquipmentPart armourPart) { } ? +++ - - } + + @Override + public void onRenderMannequin(TileEntity TileEntity, GameProfile gameProfile) { } + }
21
0.65625
12
9
77d0e1ca4fefd8cbe212403c16e41003ccdff484
app/assets/stylesheets/all/constructor.css.scss
app/assets/stylesheets/all/constructor.css.scss
$drop-area-height: 500px; .widgets-collection { ul.widgets { margin-bottom: 0; } } .constructor { .bootstrap-select { width: 100% !important; } .drop-area { min-height: $drop-area-height; ul { height: $drop-area-height; overflow: auto; } ul:empty { background: $panel-default-heading-bg; padding: 10px; border-radius: $border-radius-base; &::after { content: attr(data-empty-message); font-size: 2em; } } } }
$drop-area-height: 500px; .widgets-collection { ul.widgets { margin-bottom: 0; } } .constructor { .bootstrap-select { width: 100% !important; } .drop-area { min-height: $drop-area-height; ul { height: $drop-area-height; overflow: auto; } ul:empty { background: $panel-default-heading-bg; padding: 10px; border-radius: $border-radius-base; text-align: center; padding-top: $drop-area-height / 2 - 20; &::after { content: attr(data-empty-message); font-size: 2em; } } } }
Align placeholder text by center
Align placeholder text by center
SCSS
mit
supersid/railsbox,fastsupply/railsbox,wiserfirst/railsbox,andreychernih/railsbox,notch8/railsbox,notch8/railsbox,andreychernih/railsbox,notch8/railsbox,wiserfirst/railsbox,supersid/railsbox,notch8/railsbox,supersid/railsbox,supersid/railsbox,fastsupply/railsbox,andreychernih/railsbox,fastsupply/railsbox,wiserfirst/railsbox,fastsupply/railsbox,notch8/railsbox,wiserfirst/railsbox,fastsupply/railsbox,supersid/railsbox,wiserfirst/railsbox,andreychernih/railsbox,notch8/railsbox,supersid/railsbox,fastsupply/railsbox,andreychernih/railsbox,andreychernih/railsbox,wiserfirst/railsbox
scss
## Code Before: $drop-area-height: 500px; .widgets-collection { ul.widgets { margin-bottom: 0; } } .constructor { .bootstrap-select { width: 100% !important; } .drop-area { min-height: $drop-area-height; ul { height: $drop-area-height; overflow: auto; } ul:empty { background: $panel-default-heading-bg; padding: 10px; border-radius: $border-radius-base; &::after { content: attr(data-empty-message); font-size: 2em; } } } } ## Instruction: Align placeholder text by center ## Code After: $drop-area-height: 500px; .widgets-collection { ul.widgets { margin-bottom: 0; } } .constructor { .bootstrap-select { width: 100% !important; } .drop-area { min-height: $drop-area-height; ul { height: $drop-area-height; overflow: auto; } ul:empty { background: $panel-default-heading-bg; padding: 10px; border-radius: $border-radius-base; text-align: center; padding-top: $drop-area-height / 2 - 20; &::after { content: attr(data-empty-message); font-size: 2em; } } } }
$drop-area-height: 500px; .widgets-collection { ul.widgets { margin-bottom: 0; } } .constructor { .bootstrap-select { width: 100% !important; } .drop-area { min-height: $drop-area-height; ul { height: $drop-area-height; overflow: auto; } ul:empty { background: $panel-default-heading-bg; padding: 10px; border-radius: $border-radius-base; + text-align: center; + padding-top: $drop-area-height / 2 - 20; &::after { content: attr(data-empty-message); font-size: 2em; } } } }
2
0.060606
2
0
e92f56d7f616381b41b6b285af133528702bea02
app/helpers/application_helper.rb
app/helpers/application_helper.rb
module ApplicationHelper def get_title website_title = "NigoroJr" website_title = @page_title + " - " + website_title if @page_title return website_title end def get_login_status name = sprintf "%s (%s)", @logged_in_as.screen, @logged_in_as.username end def convert_to_markdown(text) markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, extensions = { fenced_code_blocks: true, tables: true, strikethrough: true, autolink: true, }) return markdown.render(text); end def get_about_on(user) article = Article.where(category: ArticlesController::CATEGORY_ABOUT, posted_by: user.username) return article.first end end
module ApplicationHelper def get_title website_title = "NigoroJr" website_title = @page_title + " - " + website_title if @page_title return website_title end def get_login_status name = sprintf "%s (%s)", @logged_in_as.screen, @logged_in_as.username end def convert_to_markdown(text) markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, extensions = { fenced_code_blocks: true, tables: true, strikethrough: true, autolink: true, }) return markdown.render(text); end def get_about_on(user) article = Article.where(category: ArticlesController::CATEGORY_ABOUT, posted_by: user.username) if session[:language].present? article = article.where(language: session[:language]) end return article.first end end
Allow user-about page per language
Allow user-about page per language
Ruby
apache-2.0
NigoroJr/nigorojr.com,NigoroJr/nigorojr.com
ruby
## Code Before: module ApplicationHelper def get_title website_title = "NigoroJr" website_title = @page_title + " - " + website_title if @page_title return website_title end def get_login_status name = sprintf "%s (%s)", @logged_in_as.screen, @logged_in_as.username end def convert_to_markdown(text) markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, extensions = { fenced_code_blocks: true, tables: true, strikethrough: true, autolink: true, }) return markdown.render(text); end def get_about_on(user) article = Article.where(category: ArticlesController::CATEGORY_ABOUT, posted_by: user.username) return article.first end end ## Instruction: Allow user-about page per language ## Code After: module ApplicationHelper def get_title website_title = "NigoroJr" website_title = @page_title + " - " + website_title if @page_title return website_title end def get_login_status name = sprintf "%s (%s)", @logged_in_as.screen, @logged_in_as.username end def convert_to_markdown(text) markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, extensions = { fenced_code_blocks: true, tables: true, strikethrough: true, autolink: true, }) return markdown.render(text); end def get_about_on(user) article = Article.where(category: ArticlesController::CATEGORY_ABOUT, posted_by: user.username) if session[:language].present? article = article.where(language: session[:language]) end return article.first end end
module ApplicationHelper def get_title website_title = "NigoroJr" website_title = @page_title + " - " + website_title if @page_title return website_title end def get_login_status name = sprintf "%s (%s)", @logged_in_as.screen, @logged_in_as.username end def convert_to_markdown(text) markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, extensions = { fenced_code_blocks: true, tables: true, strikethrough: true, autolink: true, }) return markdown.render(text); end def get_about_on(user) article = Article.where(category: ArticlesController::CATEGORY_ABOUT, posted_by: user.username) + if session[:language].present? + article = article.where(language: session[:language]) + end return article.first end end
3
0.103448
3
0
c946d9fd72baf08d0ad70484729e3aebac36994b
roles/controller/tasks/nova.yml
roles/controller/tasks/nova.yml
--- - name: nova controller service start scripts action: template src=etc/init/{{ item }}.conf dest=/etc/init/{{ item }}.conf with_items: - nova-api - nova-cert - nova-conductor - nova-consoleauth - nova-scheduler - name: nova controller services action: service name={{ item }} state=started with_items: - nova-api - nova-cert - nova-conductor - nova-consoleauth - nova-scheduler - name: obtain admin tenant-id shell: . ~/stackrc && keystone tenant-list | grep admin | awk '{print $2}' register: admin_tenant_id
--- - name: nova controller service start scripts action: template src=etc/init/{{ item }}.conf dest=/etc/init/{{ item }}.conf with_items: - nova-api - nova-cert - nova-conductor - nova-consoleauth - nova-scheduler - name: nova controller services action: service name={{ item }} state=started with_items: - nova-api - nova-cert - nova-conductor - nova-consoleauth - nova-scheduler
Remove unused 'obtain admin tenant-id' task.
Remove unused 'obtain admin tenant-id' task. This task/var is no longer used after monitoring changes, and was showing spurious changes in ansible runs.
YAML
mit
davidcusatis/ursula,mjbrewer/ursula,jwaibel/ursula,msambol/ursula,pgraziano/ursula,rongzhus/ursula,andrewrothstein/ursula,j2sol/ursula,blueboxjesse/ursula,rongzhus/ursula,nirajdp76/ursula,channus/ursula,pbannister/ursula,zrs233/ursula,allomov/ursula,masteinhauser/ursula,blueboxgroup/ursula,blueboxgroup/ursula,channus/ursula,mjbrewer/ursula,fancyhe/ursula,panxia6679/ursula,jwaibel/ursula,j2sol/ursula,wupeiran/ursula,pgraziano/ursula,MaheshIBM/ursula,persistent-ursula/ursula,persistent-ursula/ursula,blueboxjesse/ursula,pbannister/ursula,sivakom/ursula,allomov/ursula,masteinhauser/ursula,narengan/ursula,aldevigi/ursula,MaheshIBM/ursula,rongzhus/ursula,wupeiran/ursula,zrs233/ursula,edtubillara/ursula,andrewrothstein/ursula,jwaibel/ursula,davidcusatis/ursula,persistent-ursula/ursula,narengan/ursula,ddaskal/ursula,twaldrop/ursula,pgraziano/ursula,pgraziano/ursula,j2sol/ursula,greghaynes/ursula,wupeiran/ursula,rongzhus/ursula,msambol/ursula,edtubillara/ursula,lihkin213/ursula,channus/ursula,lihkin213/ursula,paulczar/ursula,greghaynes/ursula,blueboxjesse/ursula,kennjason/ursula,panxia6679/ursula,ryshah/ursula,EricCrosson/ursula,panxia6679/ursula,paulczar/ursula,davidcusatis/ursula,MaheshIBM/ursula,ddaskal/ursula,j2sol/ursula,panxia6679/ursula,lihkin213/ursula,zrs233/ursula,dlundquist/ursula,pbannister/ursula,fancyhe/ursula,narengan/ursula,aldevigi/ursula,sivakom/ursula,channus/ursula,fancyhe/ursula,paulczar/ursula,knandya/ursula,nirajdp76/ursula,blueboxgroup/ursula,zrs233/ursula,twaldrop/ursula,wupeiran/ursula,masteinhauser/ursula,knandya/ursula,aldevigi/ursula,EricCrosson/ursula,nirajdp76/ursula,sivakom/ursula,ddaskal/ursula,knandya/ursula,kennjason/ursula,fancyhe/ursula,kennjason/ursula,ryshah/ursula,andrewrothstein/ursula,mjbrewer/ursula,blueboxjesse/ursula,greghaynes/ursula,knandya/ursula,edtubillara/ursula,ryshah/ursula,dlundquist/ursula,ryshah/ursula,edtubillara/ursula,masteinhauser/ursula,narengan/ursula,allomov/ursula,nirajdp76/ursula,twaldrop/ursula,blueboxgroup/ursula,persistent-ursula/ursula,EricCrosson/ursula,twaldrop/ursula,dlundquist/ursula,ddaskal/ursula,msambol/ursula,lihkin213/ursula
yaml
## Code Before: --- - name: nova controller service start scripts action: template src=etc/init/{{ item }}.conf dest=/etc/init/{{ item }}.conf with_items: - nova-api - nova-cert - nova-conductor - nova-consoleauth - nova-scheduler - name: nova controller services action: service name={{ item }} state=started with_items: - nova-api - nova-cert - nova-conductor - nova-consoleauth - nova-scheduler - name: obtain admin tenant-id shell: . ~/stackrc && keystone tenant-list | grep admin | awk '{print $2}' register: admin_tenant_id ## Instruction: Remove unused 'obtain admin tenant-id' task. This task/var is no longer used after monitoring changes, and was showing spurious changes in ansible runs. ## Code After: --- - name: nova controller service start scripts action: template src=etc/init/{{ item }}.conf dest=/etc/init/{{ item }}.conf with_items: - nova-api - nova-cert - nova-conductor - nova-consoleauth - nova-scheduler - name: nova controller services action: service name={{ item }} state=started with_items: - nova-api - nova-cert - nova-conductor - nova-consoleauth - nova-scheduler
--- - name: nova controller service start scripts action: template src=etc/init/{{ item }}.conf dest=/etc/init/{{ item }}.conf with_items: - nova-api - nova-cert - nova-conductor - nova-consoleauth - nova-scheduler - name: nova controller services action: service name={{ item }} state=started with_items: - nova-api - nova-cert - nova-conductor - nova-consoleauth - nova-scheduler - - - name: obtain admin tenant-id - shell: . ~/stackrc && keystone tenant-list | grep admin | awk '{print $2}' - register: admin_tenant_id
4
0.181818
0
4
4ea883b0fb371da8f87d25bf3787d60b74443e19
roles/zookeeper/defaults/main.yml
roles/zookeeper/defaults/main.yml
zookeeper_service: zookeeper zookeeper_service_tags: "{{ zookeeper_service }}" zookeeper_env: dev zookeeper_ensemble: cluster1 zookeeper_container_name: "{{ zookeeper_service }}-{{ zookeeper_env }}-{{ zookeeper_ensemble }}-zkid{{ zk_id }}" zookeeper_data_volume: "zookeeperdata-{{ zookeeper_env }}-{{ zookeeper_ensemble }}-zkid{{ zk_id }}" zookeeper_docker_image: asteris/zookeeper zookeeper_docker_tag: latest zookeeper_docker_ports: "-p 2181:2181 -p 2888:2888 -p 3888:3888" zookeeper_docker_env: "/etc/default/{{ zookeeper_service }}"
zookeeper_service: zookeeper zookeeper_service_tags: "{{ zookeeper_service }}" zookeeper_ensemble: cluster1 zookeeper_container_name: "{{ zookeeper_service }}" zookeeper_data_volume: "{{ zookeeper_service }}-data-volume" zookeeper_image: asteris/zookeeper zookeeper_tag: latest zookeeper_ports: "-p 2181:2181 -p 2888:2888 -p 3888:3888" zookeeper_env: "/etc/default/{{ zookeeper_service }}"
Clean up zk default vars
Clean up zk default vars
YAML
apache-2.0
revpoint/microservices-infrastructure,ContainerSolutions/microservices-infrastructure,huodon/microservices-infrastructure,ddONGzaru/microservices-infrastructure,KaGeN101/mantl,CiscoCloud/microservices-infrastructure,mehulsbhatt/microservices-infrastructure,groknix/microservices-infrastructure,pinterb/microservices-infrastructure,revpoint/microservices-infrastructure,sehqlr/mantl,ianscrivener/microservices-infrastructure,TeaBough/microservices-infrastructure,kindlyops/microservices-infrastructure,ludovicc/microservices-infrastructure,chrislovecnm/microservices-infrastructure,gtcno/microservices-infrastructure,SillyMoo/microservices-infrastructure,huodon/microservices-infrastructure,futuro/microservices-infrastructure,ianscrivener/microservices-infrastructure,KaGeN101/mantl,bitium/mantl,stevendborrelli/mi-security,liangyali/microservices-infrastructure,bitium/mantl,abn/microservices-infrastructure,pinterb/microservices-infrastructure,benschumacher/microservices-infrastructure,arminc/microservices-infrastructure,noelbk/microservices-infrastructure,kindlyops/microservices-infrastructure,noelbk/microservices-infrastructure,gtcno/microservices-infrastructure,arminc/microservices-infrastructure,ianscrivener/microservices-infrastructure,CiscoCloud/mantl,revpoint/microservices-infrastructure,chrislovecnm/microservices-infrastructure,linearregression/microservices-infrastructure,arminc/microservices-infrastructure,cmgc/microservices-infrastructure,mehulsbhatt/microservices-infrastructure,benschumacher/microservices-infrastructure,benschumacher/microservices-infrastructure,chrislovecnm/microservices-infrastructure,kenjones-cisco/microservices-infrastructure,z00223295/microservices-infrastructure,ilboud/microservices-infrastructure,huodon/microservices-infrastructure,ContainerSolutions/microservices-infrastructure,phnmnl/mantl,benschumacher/microservices-infrastructure,CiscoCloud/mantl,pinterb/microservices-infrastructure,sehqlr/mantl,ilboud/microservices-infrastructure,sudhirpandey/microservices-infrastructure,mantl/mantl,kenjones-cisco/microservices-infrastructure,remmelt/microservices-infrastructure,chrislovecnm/microservices-infrastructure,sudhirpandey/microservices-infrastructure,ianscrivener/microservices-infrastructure,cmgc/microservices-infrastructure,Parkayun/microservices-infrastructure,ilboud/microservices-infrastructure,liangyali/microservices-infrastructure,SillyMoo/microservices-infrastructure,huodon/microservices-infrastructure,z00223295/microservices-infrastructure,datascienceinc/mantl,CiscoCloud/microservices-infrastructure,ianscrivener/microservices-infrastructure,ddONGzaru/microservices-infrastructure,linearregression/microservices-infrastructure,mehulsbhatt/microservices-infrastructure,eirslett/microservices-infrastructure,datascienceinc/mantl,Parkayun/microservices-infrastructure,abn/microservices-infrastructure,z00223295/microservices-infrastructure,futuro/microservices-infrastructure,abn/microservices-infrastructure,phnmnl/mantl,heww/microservices-infrastructure,chrislovecnm/microservices-infrastructure,cmgc/microservices-infrastructure,huodon/microservices-infrastructure,TeaBough/microservices-infrastructure,remmelt/microservices-infrastructure,eirslett/microservices-infrastructure,benschumacher/microservices-infrastructure,mantl/mantl,heww/microservices-infrastructure,stevendborrelli/mi-security,ludovicc/microservices-infrastructure,linearregression/microservices-infrastructure,eirslett/microservices-infrastructure
yaml
## Code Before: zookeeper_service: zookeeper zookeeper_service_tags: "{{ zookeeper_service }}" zookeeper_env: dev zookeeper_ensemble: cluster1 zookeeper_container_name: "{{ zookeeper_service }}-{{ zookeeper_env }}-{{ zookeeper_ensemble }}-zkid{{ zk_id }}" zookeeper_data_volume: "zookeeperdata-{{ zookeeper_env }}-{{ zookeeper_ensemble }}-zkid{{ zk_id }}" zookeeper_docker_image: asteris/zookeeper zookeeper_docker_tag: latest zookeeper_docker_ports: "-p 2181:2181 -p 2888:2888 -p 3888:3888" zookeeper_docker_env: "/etc/default/{{ zookeeper_service }}" ## Instruction: Clean up zk default vars ## Code After: zookeeper_service: zookeeper zookeeper_service_tags: "{{ zookeeper_service }}" zookeeper_ensemble: cluster1 zookeeper_container_name: "{{ zookeeper_service }}" zookeeper_data_volume: "{{ zookeeper_service }}-data-volume" zookeeper_image: asteris/zookeeper zookeeper_tag: latest zookeeper_ports: "-p 2181:2181 -p 2888:2888 -p 3888:3888" zookeeper_env: "/etc/default/{{ zookeeper_service }}"
zookeeper_service: zookeeper zookeeper_service_tags: "{{ zookeeper_service }}" - zookeeper_env: dev zookeeper_ensemble: cluster1 - zookeeper_container_name: "{{ zookeeper_service }}-{{ zookeeper_env }}-{{ zookeeper_ensemble }}-zkid{{ zk_id }}" - zookeeper_data_volume: "zookeeperdata-{{ zookeeper_env }}-{{ zookeeper_ensemble }}-zkid{{ zk_id }}" + zookeeper_container_name: "{{ zookeeper_service }}" + zookeeper_data_volume: "{{ zookeeper_service }}-data-volume" - zookeeper_docker_image: asteris/zookeeper ? ------- + zookeeper_image: asteris/zookeeper - zookeeper_docker_tag: latest ? ------- + zookeeper_tag: latest - zookeeper_docker_ports: "-p 2181:2181 -p 2888:2888 -p 3888:3888" ? ------- + zookeeper_ports: "-p 2181:2181 -p 2888:2888 -p 3888:3888" - zookeeper_docker_env: "/etc/default/{{ zookeeper_service }}" ? ------- + zookeeper_env: "/etc/default/{{ zookeeper_service }}"
13
1.083333
6
7
9a227b186108a0f7d6be3a9cdc91abbd392a8402
.github/release-drafter.yml
.github/release-drafter.yml
name-template: v$NEXT_PATCH_VERSION 🌈 tag-template: v$NEXT_PATCH_VERSION categories: - title: 🚀 Features label: feature - title: 🐛 Bug Fixes label: fix - title: 🧰 Maintenance label: chore change-template: '- $TITLE (#$NUMBER) - @$AUTHOR' template: | ## Changes $CHANGES ## Contributors Thanks a lot to our contributors for making this release possible: $CONTRIBUTORS
name-template: v$NEXT_PATCH_VERSION 🌈 tag-template: v$NEXT_PATCH_VERSION categories: - title: 🚀 Features label: feature - title: 🐛 Bug Fixes label: fix - title: 🧰 Maintenance label: chore - title: Dependencies and Libraries label: dependencies change-template: '- $TITLE (#$NUMBER) - @$AUTHOR' template: | ## Changes $CHANGES ## Contributors Thanks a lot to our contributors for making this release possible: $CONTRIBUTORS
Add dependencies section to release drafter
chore(tools): Add dependencies section to release drafter
YAML
apache-2.0
fossasia/open-event-android,fossasia/open-event-android,fossasia/rp15,fossasia/open-event-android
yaml
## Code Before: name-template: v$NEXT_PATCH_VERSION 🌈 tag-template: v$NEXT_PATCH_VERSION categories: - title: 🚀 Features label: feature - title: 🐛 Bug Fixes label: fix - title: 🧰 Maintenance label: chore change-template: '- $TITLE (#$NUMBER) - @$AUTHOR' template: | ## Changes $CHANGES ## Contributors Thanks a lot to our contributors for making this release possible: $CONTRIBUTORS ## Instruction: chore(tools): Add dependencies section to release drafter ## Code After: name-template: v$NEXT_PATCH_VERSION 🌈 tag-template: v$NEXT_PATCH_VERSION categories: - title: 🚀 Features label: feature - title: 🐛 Bug Fixes label: fix - title: 🧰 Maintenance label: chore - title: Dependencies and Libraries label: dependencies change-template: '- $TITLE (#$NUMBER) - @$AUTHOR' template: | ## Changes $CHANGES ## Contributors Thanks a lot to our contributors for making this release possible: $CONTRIBUTORS
name-template: v$NEXT_PATCH_VERSION 🌈 tag-template: v$NEXT_PATCH_VERSION categories: - title: 🚀 Features label: feature - title: 🐛 Bug Fixes label: fix - title: 🧰 Maintenance label: chore + - title: Dependencies and Libraries + label: dependencies change-template: '- $TITLE (#$NUMBER) - @$AUTHOR' template: | ## Changes $CHANGES ## Contributors Thanks a lot to our contributors for making this release possible: $CONTRIBUTORS
2
0.105263
2
0
0c10896df49edd33e8db136daeaffd6c2c567ee6
CMakeLists.txt
CMakeLists.txt
cmake_minimum_required(VERSION 3.0) project(vcmp-python-plugin) add_subdirectory(pybind11) add_library(${PROJECT_NAME} SHARED main.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE pybind11::embed) math(EXPR _CMAKE_BITS "${CMAKE_SIZEOF_VOID_P} * 8") if(CMAKE_SYSTEM_NAME STREQUAL "Windows") set(OS_NAME "win") elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") set(OS_NAME "linux") endif() set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "${PROJECT_NAME}-${OS_NAME}${_CMAKE_BITS}") set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
cmake_minimum_required(VERSION 3.0) project(vcmp-python-plugin) add_subdirectory(pybind11) add_library(${PROJECT_NAME} SHARED main.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE pybind11::embed) math(EXPR _CMAKE_BITS "${CMAKE_SIZEOF_VOID_P} * 8") if(CMAKE_SYSTEM_NAME STREQUAL "Windows") set(OS_NAME "win") elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") set(OS_NAME "linux") endif() execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "import sys;print(''.join(str(v) for v in sys.version_info[:2]));" OUTPUT_VARIABLE PYTHON_VER) string(REGEX REPLACE "\n" "" PYTHON_VER ${PYTHON_VER}) set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "${PROJECT_NAME}-cpython${PYTHON_VER}-${OS_NAME}${_CMAKE_BITS}") set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
Add Python version info to output name.
Add Python version info to output name.
Text
mit
ysc3839/vcmp-python-plugin,ysc3839/vcmp-python-plugin,ysc3839/vcmp-python-plugin
text
## Code Before: cmake_minimum_required(VERSION 3.0) project(vcmp-python-plugin) add_subdirectory(pybind11) add_library(${PROJECT_NAME} SHARED main.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE pybind11::embed) math(EXPR _CMAKE_BITS "${CMAKE_SIZEOF_VOID_P} * 8") if(CMAKE_SYSTEM_NAME STREQUAL "Windows") set(OS_NAME "win") elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") set(OS_NAME "linux") endif() set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "${PROJECT_NAME}-${OS_NAME}${_CMAKE_BITS}") set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "") ## Instruction: Add Python version info to output name. ## Code After: cmake_minimum_required(VERSION 3.0) project(vcmp-python-plugin) add_subdirectory(pybind11) add_library(${PROJECT_NAME} SHARED main.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE pybind11::embed) math(EXPR _CMAKE_BITS "${CMAKE_SIZEOF_VOID_P} * 8") if(CMAKE_SYSTEM_NAME STREQUAL "Windows") set(OS_NAME "win") elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") set(OS_NAME "linux") endif() execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "import sys;print(''.join(str(v) for v in sys.version_info[:2]));" OUTPUT_VARIABLE PYTHON_VER) string(REGEX REPLACE "\n" "" PYTHON_VER ${PYTHON_VER}) set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "${PROJECT_NAME}-cpython${PYTHON_VER}-${OS_NAME}${_CMAKE_BITS}") set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
cmake_minimum_required(VERSION 3.0) project(vcmp-python-plugin) add_subdirectory(pybind11) add_library(${PROJECT_NAME} SHARED main.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE pybind11::embed) math(EXPR _CMAKE_BITS "${CMAKE_SIZEOF_VOID_P} * 8") if(CMAKE_SYSTEM_NAME STREQUAL "Windows") set(OS_NAME "win") elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") set(OS_NAME "linux") endif() + execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "import sys;print(''.join(str(v) for v in sys.version_info[:2]));" + OUTPUT_VARIABLE PYTHON_VER) + string(REGEX REPLACE "\n" "" PYTHON_VER ${PYTHON_VER}) + - set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "${PROJECT_NAME}-${OS_NAME}${_CMAKE_BITS}") + set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "${PROJECT_NAME}-cpython${PYTHON_VER}-${OS_NAME}${_CMAKE_BITS}") ? +++++++++++++++++++++ set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
6
0.315789
5
1
6f608d521539a6c6d492185c964853021ba4a5a3
lib/assembly.h
lib/assembly.h
/* ===-- assembly.h - compiler-rt assembler support macros -----------------=== * * The LLVM Compiler Infrastructure * * This file is distributed under the University of Illinois Open Source * License. See LICENSE.TXT for details. * * ===----------------------------------------------------------------------=== * * This file defines macros for use in compiler-rt assembler source. * This file is not part of the interface of this library. * * ===----------------------------------------------------------------------=== */ #ifndef COMPILERRT_ASSEMBLY_H #define COMPILERRT_ASSEMBLY_H // Define SYMBOL_NAME to add the appropriate symbol prefix; we can't use // USER_LABEL_PREFIX directly because of cpp brokenness. #if defined(__POWERPC__) || defined(__powerpc__) || defined(__ppc__) #define SYMBOL_NAME(name) name #define SEPARATOR @ #else #define SYMBOL_NAME(name) _##name #define SEPARATOR ; #endif #define DEFINE_COMPILERRT_FUNCTION(name) \ .globl SYMBOL_NAME(name) SEPARATOR \ SYMBOL_NAME(name): #define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \ .globl SYMBOL_NAME(name) SEPARATOR \ .private_extern SYMBOL_NAME(name) SEPARATOR \ SYMBOL_NAME(name): #endif /* COMPILERRT_ASSEMBLY_H */
/* ===-- assembly.h - compiler-rt assembler support macros -----------------=== * * The LLVM Compiler Infrastructure * * This file is distributed under the University of Illinois Open Source * License. See LICENSE.TXT for details. * * ===----------------------------------------------------------------------=== * * This file defines macros for use in compiler-rt assembler source. * This file is not part of the interface of this library. * * ===----------------------------------------------------------------------=== */ #ifndef COMPILERRT_ASSEMBLY_H #define COMPILERRT_ASSEMBLY_H // Define SYMBOL_NAME to add the appropriate symbol prefix; we can't use // USER_LABEL_PREFIX directly because of cpp brokenness. #if defined(__POWERPC__) || defined(__powerpc__) || defined(__ppc__) #define SYMBOL_NAME(name) name #define SEPARATOR @ #else #define SYMBOL_NAME(name) #__USER_LABEL_PREFIX__ ##name #define SEPARATOR ; #endif #define DEFINE_COMPILERRT_FUNCTION(name) \ .globl SYMBOL_NAME(name) SEPARATOR \ SYMBOL_NAME(name): #define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \ .globl SYMBOL_NAME(name) SEPARATOR \ .private_extern SYMBOL_NAME(name) SEPARATOR \ SYMBOL_NAME(name): #endif /* COMPILERRT_ASSEMBLY_H */
Use __USER_LABEL_PREFIX__ so that we don't add a _ prefix on ELF.
Use __USER_LABEL_PREFIX__ so that we don't add a _ prefix on ELF. git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@86542 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
c
## Code Before: /* ===-- assembly.h - compiler-rt assembler support macros -----------------=== * * The LLVM Compiler Infrastructure * * This file is distributed under the University of Illinois Open Source * License. See LICENSE.TXT for details. * * ===----------------------------------------------------------------------=== * * This file defines macros for use in compiler-rt assembler source. * This file is not part of the interface of this library. * * ===----------------------------------------------------------------------=== */ #ifndef COMPILERRT_ASSEMBLY_H #define COMPILERRT_ASSEMBLY_H // Define SYMBOL_NAME to add the appropriate symbol prefix; we can't use // USER_LABEL_PREFIX directly because of cpp brokenness. #if defined(__POWERPC__) || defined(__powerpc__) || defined(__ppc__) #define SYMBOL_NAME(name) name #define SEPARATOR @ #else #define SYMBOL_NAME(name) _##name #define SEPARATOR ; #endif #define DEFINE_COMPILERRT_FUNCTION(name) \ .globl SYMBOL_NAME(name) SEPARATOR \ SYMBOL_NAME(name): #define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \ .globl SYMBOL_NAME(name) SEPARATOR \ .private_extern SYMBOL_NAME(name) SEPARATOR \ SYMBOL_NAME(name): #endif /* COMPILERRT_ASSEMBLY_H */ ## Instruction: Use __USER_LABEL_PREFIX__ so that we don't add a _ prefix on ELF. git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@86542 91177308-0d34-0410-b5e6-96231b3b80d8 ## Code After: /* ===-- assembly.h - compiler-rt assembler support macros -----------------=== * * The LLVM Compiler Infrastructure * * This file is distributed under the University of Illinois Open Source * License. See LICENSE.TXT for details. * * ===----------------------------------------------------------------------=== * * This file defines macros for use in compiler-rt assembler source. * This file is not part of the interface of this library. * * ===----------------------------------------------------------------------=== */ #ifndef COMPILERRT_ASSEMBLY_H #define COMPILERRT_ASSEMBLY_H // Define SYMBOL_NAME to add the appropriate symbol prefix; we can't use // USER_LABEL_PREFIX directly because of cpp brokenness. #if defined(__POWERPC__) || defined(__powerpc__) || defined(__ppc__) #define SYMBOL_NAME(name) name #define SEPARATOR @ #else #define SYMBOL_NAME(name) #__USER_LABEL_PREFIX__ ##name #define SEPARATOR ; #endif #define DEFINE_COMPILERRT_FUNCTION(name) \ .globl SYMBOL_NAME(name) SEPARATOR \ SYMBOL_NAME(name): #define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \ .globl SYMBOL_NAME(name) SEPARATOR \ .private_extern SYMBOL_NAME(name) SEPARATOR \ SYMBOL_NAME(name): #endif /* COMPILERRT_ASSEMBLY_H */
/* ===-- assembly.h - compiler-rt assembler support macros -----------------=== * * The LLVM Compiler Infrastructure * * This file is distributed under the University of Illinois Open Source * License. See LICENSE.TXT for details. * * ===----------------------------------------------------------------------=== * * This file defines macros for use in compiler-rt assembler source. * This file is not part of the interface of this library. * * ===----------------------------------------------------------------------=== */ #ifndef COMPILERRT_ASSEMBLY_H #define COMPILERRT_ASSEMBLY_H // Define SYMBOL_NAME to add the appropriate symbol prefix; we can't use // USER_LABEL_PREFIX directly because of cpp brokenness. #if defined(__POWERPC__) || defined(__powerpc__) || defined(__ppc__) #define SYMBOL_NAME(name) name #define SEPARATOR @ #else - #define SYMBOL_NAME(name) _##name + #define SYMBOL_NAME(name) #__USER_LABEL_PREFIX__ ##name ? + +++++++++++++++++++++ #define SEPARATOR ; #endif #define DEFINE_COMPILERRT_FUNCTION(name) \ .globl SYMBOL_NAME(name) SEPARATOR \ SYMBOL_NAME(name): #define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \ .globl SYMBOL_NAME(name) SEPARATOR \ .private_extern SYMBOL_NAME(name) SEPARATOR \ SYMBOL_NAME(name): #endif /* COMPILERRT_ASSEMBLY_H */
2
0.047619
1
1
56f9e0d403402d7b3a210925a25fd110c597be4c
blueprints/ember-flexberry-data/index.js
blueprints/ember-flexberry-data/index.js
/*jshint node:true*/ module.exports = { description: 'Adds necessary packages to application', // locals: function(options) { // // Return custom template variables here. // return { // foo: options.entity.options.foo // }; // } afterInstall: function(options) { var _this = this; return this.addBowerPackagesToProject([ { name: 'localforage', target: '1.3.3' } ]).then(function() { return _this.addAddonsToProject({ packages: [ 'https://github.com/Flexberry/ember-localforage-adapter.git', { name: 'ember-browserify', target: '1.1.9' } ] }); }).then(function () { return _this.addPackagesToProject([ { name: 'dexie', target: '1.3.6' } ]); }); }, normalizeEntityName: function() {} };
/* globals module */ module.exports = { description: 'Adds necessary packages to application', // locals: function(options) { // // Return custom template variables here. // return { // foo: options.entity.options.foo // }; // } afterInstall: function(options) { var _this = this; return this.addBowerPackagesToProject([ { name: 'localforage', target: '1.3.3' } ]).then(function() { return _this.addAddonsToProject({ packages: [ 'https://github.com/Flexberry/ember-localforage-adapter.git', { name: 'ember-browserify', target: '1.1.9' } ] }); }).then(function () { return _this.addPackagesToProject([ { name: 'dexie', target: '1.3.6' } ]); }); }, normalizeEntityName: function() {} };
Fix `globals` label for jshint
Fix `globals` label for jshint in default blueprint
JavaScript
mit
Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-projections,Flexberry/ember-flexberry-projections
javascript
## Code Before: /*jshint node:true*/ module.exports = { description: 'Adds necessary packages to application', // locals: function(options) { // // Return custom template variables here. // return { // foo: options.entity.options.foo // }; // } afterInstall: function(options) { var _this = this; return this.addBowerPackagesToProject([ { name: 'localforage', target: '1.3.3' } ]).then(function() { return _this.addAddonsToProject({ packages: [ 'https://github.com/Flexberry/ember-localforage-adapter.git', { name: 'ember-browserify', target: '1.1.9' } ] }); }).then(function () { return _this.addPackagesToProject([ { name: 'dexie', target: '1.3.6' } ]); }); }, normalizeEntityName: function() {} }; ## Instruction: Fix `globals` label for jshint in default blueprint ## Code After: /* globals module */ module.exports = { description: 'Adds necessary packages to application', // locals: function(options) { // // Return custom template variables here. // return { // foo: options.entity.options.foo // }; // } afterInstall: function(options) { var _this = this; return this.addBowerPackagesToProject([ { name: 'localforage', target: '1.3.3' } ]).then(function() { return _this.addAddonsToProject({ packages: [ 'https://github.com/Flexberry/ember-localforage-adapter.git', { name: 'ember-browserify', target: '1.1.9' } ] }); }).then(function () { return _this.addPackagesToProject([ { name: 'dexie', target: '1.3.6' } ]); }); }, normalizeEntityName: function() {} };
- /*jshint node:true*/ + /* globals module */ module.exports = { description: 'Adds necessary packages to application', // locals: function(options) { // // Return custom template variables here. // return { // foo: options.entity.options.foo // }; // } afterInstall: function(options) { var _this = this; return this.addBowerPackagesToProject([ { name: 'localforage', target: '1.3.3' } ]).then(function() { return _this.addAddonsToProject({ packages: [ 'https://github.com/Flexberry/ember-localforage-adapter.git', { name: 'ember-browserify', target: '1.1.9' } ] }); }).then(function () { return _this.addPackagesToProject([ { name: 'dexie', target: '1.3.6' } ]); }); }, normalizeEntityName: function() {} };
2
0.064516
1
1
99cff4f733c43b74bd4195e0df8d9b57671f369e
agent-container/agent-config.json
agent-container/agent-config.json
{"author":"Amazon Web Services, Inc.","config":{"Cmd":["/agent"],"ArgsEscaped":true},"created":"~~timestamp~~","config":{"ExposedPorts":{"51678/tcp":{},"51679/tcp":{}},"Healthcheck":{"Test":["CMD","/agent","--healthcheck"]}},"history":[{"created":"~~timestamp~~","author":"Amazon Web Services, Inc.","created_by":"°o°","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:~~digest~~"]}}
{"author":"Amazon Web Services, Inc.","config":{"Cmd":["/agent"],"ArgsEscaped":true},"created":"~~timestamp~~","config":{"ExposedPorts":{"51678/tcp":{},"51679/tcp":{}},"Env":["PATH=/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Healthcheck":{"Test":["CMD","/agent","--healthcheck"]}},"history":[{"created":"~~timestamp~~","author":"Amazon Web Services, Inc.","created_by":"°o°","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:~~digest~~"]}}
Add env with required path for appmesh integration.
Add env with required path for appmesh integration.
JSON
apache-2.0
aws/amazon-ecs-agent,aws/amazon-ecs-agent,aws/amazon-ecs-agent,aws/amazon-ecs-agent
json
## Code Before: {"author":"Amazon Web Services, Inc.","config":{"Cmd":["/agent"],"ArgsEscaped":true},"created":"~~timestamp~~","config":{"ExposedPorts":{"51678/tcp":{},"51679/tcp":{}},"Healthcheck":{"Test":["CMD","/agent","--healthcheck"]}},"history":[{"created":"~~timestamp~~","author":"Amazon Web Services, Inc.","created_by":"°o°","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:~~digest~~"]}} ## Instruction: Add env with required path for appmesh integration. ## Code After: {"author":"Amazon Web Services, Inc.","config":{"Cmd":["/agent"],"ArgsEscaped":true},"created":"~~timestamp~~","config":{"ExposedPorts":{"51678/tcp":{},"51679/tcp":{}},"Env":["PATH=/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Healthcheck":{"Test":["CMD","/agent","--healthcheck"]}},"history":[{"created":"~~timestamp~~","author":"Amazon Web Services, Inc.","created_by":"°o°","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:~~digest~~"]}}
- {"author":"Amazon Web Services, Inc.","config":{"Cmd":["/agent"],"ArgsEscaped":true},"created":"~~timestamp~~","config":{"ExposedPorts":{"51678/tcp":{},"51679/tcp":{}},"Healthcheck":{"Test":["CMD","/agent","--healthcheck"]}},"history":[{"created":"~~timestamp~~","author":"Amazon Web Services, Inc.","created_by":"°o°","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:~~digest~~"]}} + {"author":"Amazon Web Services, Inc.","config":{"Cmd":["/agent"],"ArgsEscaped":true},"created":"~~timestamp~~","config":{"ExposedPorts":{"51678/tcp":{},"51679/tcp":{}},"Env":["PATH=/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Healthcheck":{"Test":["CMD","/agent","--healthcheck"]}},"history":[{"created":"~~timestamp~~","author":"Amazon Web Services, Inc.","created_by":"°o°","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:~~digest~~"]}} ? +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2
2
1
1
efc34b5f3b38d70fc64e6595c95a74a919a40938
dev/install.cmd
dev/install.cmd
@echo off echo Update environment... echo Update Ruby... call gem update --system echo Update Ruby Sass... call gem update sass echo Update Bourbon... call gem update bourbon call gem update neat call gem update bitters echo Update Grunt... call npm update grunt-cli -g echo Install project... call npm install --save-dev pause
@echo off echo Update Grunt... call npm update grunt-cli -g echo Install project... call npm install --save-dev pause
Remove Ruby update from unstall
Remove Ruby update from unstall
Batchfile
mit
ideus-team/html-framework,ideus-team/html-framework
batchfile
## Code Before: @echo off echo Update environment... echo Update Ruby... call gem update --system echo Update Ruby Sass... call gem update sass echo Update Bourbon... call gem update bourbon call gem update neat call gem update bitters echo Update Grunt... call npm update grunt-cli -g echo Install project... call npm install --save-dev pause ## Instruction: Remove Ruby update from unstall ## Code After: @echo off echo Update Grunt... call npm update grunt-cli -g echo Install project... call npm install --save-dev pause
@echo off - echo Update environment... - - echo Update Ruby... - call gem update --system - - echo Update Ruby Sass... - call gem update sass - - echo Update Bourbon... - call gem update bourbon - call gem update neat - call gem update bitters echo Update Grunt... call npm update grunt-cli -g echo Install project... call npm install --save-dev pause
12
0.571429
0
12
09554e9fad0ca9d565008433dc7bfc87781060cd
presto-main/src/test/java/com/facebook/presto/operator/aggregation/TestCountColumnAggregation.java
presto-main/src/test/java/com/facebook/presto/operator/aggregation/TestCountColumnAggregation.java
package com.facebook.presto.operator.aggregation; import com.facebook.presto.block.Block; import com.facebook.presto.block.BlockBuilder; import static com.facebook.presto.operator.aggregation.CountColumnAggregation.COUNT_COLUMN; import static com.facebook.presto.tuple.TupleInfo.SINGLE_LONG; public class TestCountColumnAggregation extends AbstractTestAggregationFunction { @Override public Block getSequenceBlock(int start, int length) { BlockBuilder blockBuilder = new BlockBuilder(SINGLE_LONG); for (int i = start; i < start + length; i++) { blockBuilder.append(i); } return blockBuilder.build(); } @Override public AggregationFunction getFunction() { return COUNT_COLUMN; } @Override public Number getExpectedValue(int start, int length) { if (length == 0) { return null; } return (long) length; } }
package com.facebook.presto.operator.aggregation; import com.facebook.presto.block.Block; import com.facebook.presto.block.BlockBuilder; import static com.facebook.presto.operator.aggregation.CountColumnAggregation.COUNT_COLUMN; import static com.facebook.presto.tuple.TupleInfo.SINGLE_LONG; public class TestCountColumnAggregation extends AbstractTestAggregationFunction { @Override public Block getSequenceBlock(int start, int length) { BlockBuilder blockBuilder = new BlockBuilder(SINGLE_LONG); for (int i = start; i < start + length; i++) { blockBuilder.append(i); } return blockBuilder.build(); } @Override public AggregationFunction getFunction() { return COUNT_COLUMN; } @Override public Number getExpectedValue(int start, int length) { return (long) length; } }
Fix broken tests for count column
Fix broken tests for count column
Java
apache-2.0
EvilMcJerkface/presto,ajoabraham/presto,yuananf/presto,wyukawa/presto,hulu/presto,chrisunder/presto,troels/nz-presto,hgschmie/presto,zhenxiao/presto,EvilMcJerkface/presto,wagnermarkd/presto,rockerbox/presto,harunurhan/presto,nileema/presto,cosinequanon/presto,Yaliang/presto,mode/presto,stewartpark/presto,fiedukow/presto,haitaoyao/presto,jiekechoo/presto,fengshao0907/presto,zofuthan/presto,jxiang/presto,nileema/presto,vermaravikant/presto,Jimexist/presto,mcanthony/presto,ebyhr/presto,wyukawa/presto,siddhartharay007/presto,mbeitchman/presto,harunurhan/presto,cawallin/presto,kined/presto,wangcan2014/presto,miniway/presto,deciament/presto,haitaoyao/presto,fipar/presto,chrisunder/presto,Jimexist/presto,raghavsethi/presto,idemura/presto,electrum/presto,zjshen/presto,smartnews/presto,wangcan2014/presto,RobinUS2/presto,11xor6/presto,twitter-forks/presto,hgschmie/presto,tellproject/presto,stewartpark/presto,sumanth232/presto,erichwang/presto,mcanthony/presto,saidalaoui/presto,xiangel/presto,sumitkgec/presto,dongjoon-hyun/presto,mandusm/presto,ebd2/presto,totticarter/presto,dain/presto,fengshao0907/presto,stagraqubole/presto,nakajijiji/presto,arhimondr/presto,avasilevskiy/presto,sumitkgec/presto,smartpcr/presto,wangcan2014/presto,ArturGajowy/presto,jiekechoo/presto,jf367/presto,ipros-team/presto,pwz3n0/presto,wagnermarkd/presto,RobinUS2/presto,bloomberg/presto,Svjard/presto,ajoabraham/presto,aleph-zero/presto,Teradata/presto,EvilMcJerkface/presto,zzhao0/presto,dongjoon-hyun/presto,nsabharwal/presto,zofuthan/presto,aglne/presto,takari/presto,mvp/presto,11xor6/presto,cosinequanon/presto,wagnermarkd/presto,shixuan-fan/presto,stagraqubole/presto,sdgdsffdsfff/presto,mbeitchman/presto,jekey/presto,mattyb149/presto,idemura/presto,toxeh/presto,wagnermarkd/presto,electrum/presto,Svjard/presto,gh351135612/presto,prateek1306/presto,EvilMcJerkface/presto,twitter-forks/presto,RobinUS2/presto,shixuan-fan/presto,shixuan-fan/presto,wangcan2014/presto,aglne/presto,miniway/presto,vermaravikant/presto,toyama0919/presto,miquelruiz/presto,kietly/presto,damiencarol/presto,cawallin/presto,aleph-zero/presto,siddhartharay007/presto,kaschaeffer/presto,ipros-team/presto,Praveen2112/presto,electrum/presto,mattyb149/presto,toxeh/presto,hulu/presto,smartnews/presto,jf367/presto,sunchao/presto,zhenyuy-fb/presto,wangcan2014/presto,mattyb149/presto,vishalsan/presto,cberner/presto,treasure-data/presto,mugglmenzel/presto,martint/presto,haitaoyao/presto,RobinUS2/presto,sopel39/presto,chrisunder/presto,XiaominZhang/presto,twitter-forks/presto,bloomberg/presto,zzhao0/presto,nvoron23/presto,erichwang/presto,Praveen2112/presto,damiencarol/presto,sopel39/presto,twitter-forks/presto,y-lan/presto,raghavsethi/presto,svstanev/presto,fiedukow/presto,ebd2/presto,wyukawa/presto,ipros-team/presto,denizdemir/presto,geraint0923/presto,zhenxiao/presto,deciament/presto,losipiuk/presto,wyukawa/presto,dabaitu/presto,nakajijiji/presto,Teradata/presto,youngwookim/presto,deciament/presto,zzhao0/presto,EvilMcJerkface/presto,joy-yao/presto,bd-dev-mobileum/presto,facebook/presto,tomz/presto,haozhun/presto,haitaoyao/presto,gcnonato/presto,bd-dev-mobileum/presto,mandusm/presto,dain/presto,Teradata/presto,nsabharwal/presto,albertocsm/presto,kingland/presto,aleph-zero/presto,dongjoon-hyun/presto,prateek1306/presto,dain/presto,ArturGajowy/presto,toyama0919/presto,suyucs/presto,mugglmenzel/presto,dongjoon-hyun/presto,arhimondr/presto,ipros-team/presto,harunurhan/presto,ArturGajowy/presto,kaschaeffer/presto,elonazoulay/presto,springning/presto,fipar/presto,fipar/presto,nvoron23/presto,mandusm/presto,martint/presto,zhenyuy-fb/presto,yuananf/presto,XiaominZhang/presto,erichwang/presto,Zoomdata/presto,prestodb/presto,aglne/presto,rockerbox/presto,kietly/presto,cosinequanon/presto,cberner/presto,facebook/presto,harunurhan/presto,prestodb/presto,electrum/presto,soz-fb/presto,bloomberg/presto,harunurhan/presto,martint/presto,ocono-tech/presto,mvp/presto,nakajijiji/presto,tellproject/presto,HackShare/Presto,Teradata/presto,jacobgao/presto,tellproject/presto,ArturGajowy/presto,Yaliang/presto,Zoomdata/presto,troels/nz-presto,ocono-tech/presto,kined/presto,Nasdaq/presto,aramesh117/presto,sumitkgec/presto,Zoomdata/presto,kaschaeffer/presto,jekey/presto,lingochamp/presto,hgschmie/presto,sopel39/presto,vermaravikant/presto,haitaoyao/presto,XiaominZhang/presto,jekey/presto,Myrthan/presto,pnowojski/presto,raghavsethi/presto,mugglmenzel/presto,treasure-data/presto,vishalsan/presto,nezihyigitbasi/presto,Praveen2112/presto,springning/presto,wyukawa/presto,xiangel/presto,treasure-data/presto,soz-fb/presto,prestodb/presto,toxeh/presto,jxiang/presto,DanielTing/presto,mandusm/presto,zhenyuy-fb/presto,tellproject/presto,bd-dev-mobileum/presto,soz-fb/presto,erichwang/presto,joy-yao/presto,kaschaeffer/presto,bd-dev-mobileum/presto,aramesh117/presto,ajoabraham/presto,facebook/presto,damiencarol/presto,cawallin/presto,albertocsm/presto,kietly/presto,shixuan-fan/presto,kaschaeffer/presto,wrmsr/presto,tellproject/presto,Nasdaq/presto,svstanev/presto,jiangyifangh/presto,Praveen2112/presto,jietang3/test,springning/presto,haozhun/presto,jiekechoo/presto,ocono-tech/presto,elonazoulay/presto,geraint0923/presto,sunchao/presto,xiangel/presto,kietly/presto,avasilevskiy/presto,wrmsr/presto,jiekechoo/presto,propene/presto,ptkool/presto,nsabharwal/presto,shixuan-fan/presto,damiencarol/presto,CHINA-JD/presto,mcanthony/presto,jacobgao/presto,CHINA-JD/presto,pnowojski/presto,vermaravikant/presto,Svjard/presto,zjshen/presto,martint/presto,zjshen/presto,nvoron23/presto,shubham166/presto,losipiuk/presto,tomz/presto,wagnermarkd/presto,sumitkgec/presto,denizdemir/presto,saidalaoui/presto,suyucs/presto,joshk/presto,losipiuk/presto,rockerbox/presto,chrisunder/presto,Jimexist/presto,TeradataCenterForHadoop/bootcamp,youngwookim/presto,tomz/presto,shubham166/presto,CHINA-JD/presto,ocono-tech/presto,frsyuki/presto,11xor6/presto,jiangyifangh/presto,Myrthan/presto,y-lan/presto,yuananf/presto,kingland/presto,Jimexist/presto,totticarter/presto,springning/presto,siddhartharay007/presto,zhenxiao/presto,nezihyigitbasi/presto,mugglmenzel/presto,ebyhr/presto,gh351135612/presto,takari/presto,mbeitchman/presto,jxiang/presto,nileema/presto,zzhao0/presto,wrmsr/presto,losipiuk/presto,nsabharwal/presto,Jimexist/presto,smartpcr/presto,sdgdsffdsfff/presto,treasure-data/presto,stewartpark/presto,tomz/presto,gcnonato/presto,sopel39/presto,pnowojski/presto,jxiang/presto,hulu/presto,pwz3n0/presto,yu-yamada/presto,jf367/presto,Nasdaq/presto,bloomberg/presto,zofuthan/presto,youngwookim/presto,tomz/presto,mandusm/presto,suyucs/presto,joy-yao/presto,miquelruiz/presto,xiangel/presto,DanielTing/presto,kined/presto,ebyhr/presto,yu-yamada/presto,avasilevskiy/presto,gh351135612/presto,pnowojski/presto,mpilman/presto,cosinequanon/presto,dabaitu/presto,jiangyifangh/presto,haozhun/presto,mcanthony/presto,mode/presto,joy-yao/presto,mono-plane/presto,fipar/presto,springning/presto,Nasdaq/presto,suyucs/presto,facebook/presto,ocono-tech/presto,kuzemchik/presto,toyama0919/presto,sunchao/presto,fengshao0907/presto,geraint0923/presto,dabaitu/presto,DanielTing/presto,DanielTing/presto,kuzemchik/presto,mvp/presto,wrmsr/presto,miniway/presto,haozhun/presto,y-lan/presto,treasure-data/presto,pwz3n0/presto,CHINA-JD/presto,elonazoulay/presto,yuananf/presto,deciament/presto,ptkool/presto,hulu/presto,XiaominZhang/presto,prateek1306/presto,smartpcr/presto,mattyb149/presto,kined/presto,kuzemchik/presto,losipiuk/presto,Svjard/presto,electrum/presto,zhenxiao/presto,toyama0919/presto,aramesh117/presto,vermaravikant/presto,fengshao0907/presto,zhenyuy-fb/presto,jekey/presto,jxiang/presto,Svjard/presto,erichwang/presto,mpilman/presto,nileema/presto,hgschmie/presto,Yaliang/presto,mcanthony/presto,avasilevskiy/presto,saidalaoui/presto,RobinUS2/presto,saidalaoui/presto,chrisunder/presto,kingland/presto,Teradata/presto,Myrthan/presto,smartpcr/presto,TeradataCenterForHadoop/bootcamp,miquelruiz/presto,ptkool/presto,raghavsethi/presto,11xor6/presto,cberner/presto,bloomberg/presto,totticarter/presto,gcnonato/presto,elonazoulay/presto,kingland/presto,propene/presto,sumanth232/presto,totticarter/presto,dain/presto,mbeitchman/presto,ipros-team/presto,miniway/presto,kined/presto,totticarter/presto,suyucs/presto,ebyhr/presto,sumanth232/presto,denizdemir/presto,takari/presto,zzhao0/presto,zofuthan/presto,ajoabraham/presto,idemura/presto,toxeh/presto,dongjoon-hyun/presto,kingland/presto,sunchao/presto,toyama0919/presto,aglne/presto,mpilman/presto,rockerbox/presto,mpilman/presto,Praveen2112/presto,aramesh117/presto,idemura/presto,raghavsethi/presto,deciament/presto,joshk/presto,TeradataCenterForHadoop/bootcamp,nvoron23/presto,joy-yao/presto,stewartpark/presto,aramesh117/presto,stewartpark/presto,prateek1306/presto,nakajijiji/presto,miquelruiz/presto,gh351135612/presto,soz-fb/presto,Zoomdata/presto,HackShare/Presto,ptkool/presto,dain/presto,geraint0923/presto,denizdemir/presto,mattyb149/presto,lingochamp/presto,pwz3n0/presto,hgschmie/presto,cawallin/presto,ebd2/presto,mpilman/presto,TeradataCenterForHadoop/bootcamp,kuzemchik/presto,mode/presto,idemura/presto,jacobgao/presto,cberner/presto,siddhartharay007/presto,mode/presto,ebd2/presto,yu-yamada/presto,Myrthan/presto,jekey/presto,zofuthan/presto,tellproject/presto,jiekechoo/presto,HackShare/Presto,ebd2/presto,vishalsan/presto,aleph-zero/presto,xiangel/presto,cawallin/presto,jiangyifangh/presto,martint/presto,dabaitu/presto,svstanev/presto,fiedukow/presto,prestodb/presto,joshk/presto,mbeitchman/presto,miniway/presto,cberner/presto,troels/nz-presto,y-lan/presto,Zoomdata/presto,youngwookim/presto,mpilman/presto,mvp/presto,jf367/presto,smartnews/presto,hulu/presto,jacobgao/presto,DanielTing/presto,nezihyigitbasi/presto,troels/nz-presto,twitter-forks/presto,ebyhr/presto,zjshen/presto,sopel39/presto,rockerbox/presto,fipar/presto,jf367/presto,propene/presto,cosinequanon/presto,frsyuki/presto,nezihyigitbasi/presto,ptkool/presto,shubham166/presto,yu-yamada/presto,kietly/presto,Myrthan/presto,mode/presto,aglne/presto,jietang3/test,sunchao/presto,zjshen/presto,albertocsm/presto,pwz3n0/presto,smartnews/presto,nsabharwal/presto,wrmsr/presto,lingochamp/presto,CHINA-JD/presto,facebook/presto,mono-plane/presto,toxeh/presto,sumanth232/presto,TeradataCenterForHadoop/bootcamp,prestodb/presto,fiedukow/presto,ajoabraham/presto,gcnonato/presto,sdgdsffdsfff/presto,treasure-data/presto,takari/presto,joshk/presto,troels/nz-presto,smartnews/presto,ArturGajowy/presto,siddhartharay007/presto,propene/presto,nakajijiji/presto,prestodb/presto,miquelruiz/presto,11xor6/presto,haozhun/presto,aleph-zero/presto,avasilevskiy/presto,lingochamp/presto,fengshao0907/presto,nezihyigitbasi/presto,bd-dev-mobileum/presto,wrmsr/presto,saidalaoui/presto,arhimondr/presto,y-lan/presto,jiangyifangh/presto,prateek1306/presto,youngwookim/presto,lingochamp/presto,propene/presto,nileema/presto,Yaliang/presto,mono-plane/presto,sumanth232/presto,damiencarol/presto,XiaominZhang/presto,gh351135612/presto,mvp/presto,albertocsm/presto,mono-plane/presto,fiedukow/presto,yu-yamada/presto,sumitkgec/presto,Yaliang/presto,arhimondr/presto,svstanev/presto,elonazoulay/presto,mugglmenzel/presto,soz-fb/presto,geraint0923/presto,Nasdaq/presto,yuananf/presto,zhenyuy-fb/presto,shubham166/presto,smartpcr/presto,svstanev/presto,kuzemchik/presto,albertocsm/presto,dabaitu/presto,arhimondr/presto,takari/presto
java
## Code Before: package com.facebook.presto.operator.aggregation; import com.facebook.presto.block.Block; import com.facebook.presto.block.BlockBuilder; import static com.facebook.presto.operator.aggregation.CountColumnAggregation.COUNT_COLUMN; import static com.facebook.presto.tuple.TupleInfo.SINGLE_LONG; public class TestCountColumnAggregation extends AbstractTestAggregationFunction { @Override public Block getSequenceBlock(int start, int length) { BlockBuilder blockBuilder = new BlockBuilder(SINGLE_LONG); for (int i = start; i < start + length; i++) { blockBuilder.append(i); } return blockBuilder.build(); } @Override public AggregationFunction getFunction() { return COUNT_COLUMN; } @Override public Number getExpectedValue(int start, int length) { if (length == 0) { return null; } return (long) length; } } ## Instruction: Fix broken tests for count column ## Code After: package com.facebook.presto.operator.aggregation; import com.facebook.presto.block.Block; import com.facebook.presto.block.BlockBuilder; import static com.facebook.presto.operator.aggregation.CountColumnAggregation.COUNT_COLUMN; import static com.facebook.presto.tuple.TupleInfo.SINGLE_LONG; public class TestCountColumnAggregation extends AbstractTestAggregationFunction { @Override public Block getSequenceBlock(int start, int length) { BlockBuilder blockBuilder = new BlockBuilder(SINGLE_LONG); for (int i = start; i < start + length; i++) { blockBuilder.append(i); } return blockBuilder.build(); } @Override public AggregationFunction getFunction() { return COUNT_COLUMN; } @Override public Number getExpectedValue(int start, int length) { return (long) length; } }
package com.facebook.presto.operator.aggregation; import com.facebook.presto.block.Block; import com.facebook.presto.block.BlockBuilder; import static com.facebook.presto.operator.aggregation.CountColumnAggregation.COUNT_COLUMN; import static com.facebook.presto.tuple.TupleInfo.SINGLE_LONG; public class TestCountColumnAggregation extends AbstractTestAggregationFunction { @Override public Block getSequenceBlock(int start, int length) { BlockBuilder blockBuilder = new BlockBuilder(SINGLE_LONG); for (int i = start; i < start + length; i++) { blockBuilder.append(i); } return blockBuilder.build(); } @Override public AggregationFunction getFunction() { return COUNT_COLUMN; } @Override public Number getExpectedValue(int start, int length) { - if (length == 0) { - return null; - } return (long) length; } }
3
0.081081
0
3
26b07bafec285d68529f209bf37a6caffa71d356
.travis.yml
.travis.yml
language: clojure notifications: irc: "jcsi.ms#qualityclj"
language: clojure notifications: irc: channels: - "jcsi.ms#qualityclj" use_notice: true
Use a notice instead of join/message.
Use a notice instead of join/message.
YAML
epl-1.0
quality-clojure/qualityclj
yaml
## Code Before: language: clojure notifications: irc: "jcsi.ms#qualityclj" ## Instruction: Use a notice instead of join/message. ## Code After: language: clojure notifications: irc: channels: - "jcsi.ms#qualityclj" use_notice: true
language: clojure notifications: + irc: + channels: - irc: "jcsi.ms#qualityclj" ? ^^^^ + - "jcsi.ms#qualityclj" ? ^^^^ + use_notice: true
5
1.666667
4
1
7e406575de559869a44064fc4b3a46cc5b3f7571
src/ResourceManagement/Batch/Batch.Tests/project.json
src/ResourceManagement/Batch/Batch.Tests/project.json
{ "version": "1.0.0-*", "description": "Batch.Tests Class Library", "authors": [ "Microsoft Corporation" ], "testRunner": "xunit", "frameworks": { "netcoreapp1.0": { "imports": ["dnxcore50", "portable-net45+win8"], "dependencies": { "Microsoft.NETCore.App": { "type": "platform", "version": "1.0.0" } } } }, "dependencies": { "Microsoft.Azure.Test.HttpRecorder": "[1.6.7-preview,2.0.0)", "Microsoft.Rest.ClientRuntime.Azure.TestFramework": "[1.3.5-preview,2.0.0)", "Microsoft.Rest.ClientRuntime.Azure": "[3.3.1,4.0.0)", "Microsoft.Azure.Management.Batch": "3.0.0", "Microsoft.Azure.Management.ResourceManager": "[1.1.3-preview,2.0.0)", "xunit": "2.2.0-beta2-build3300", "dotnet-test-xunit": "2.2.0-preview2-build1029" } }
{ "version": "1.0.0-*", "description": "Batch.Tests Class Library", "authors": [ "Microsoft Corporation" ], "buildOptions": { "delaySign": true, "publicSign": false, "keyFile": "../../../../tools/MSSharedLibKey.snk", "compile": "../../../../tools/DisableTestRunParallel.cs" }, "testRunner": "xunit", "frameworks": { "netcoreapp1.0": { "imports": ["dnxcore50", "portable-net45+win8"], "dependencies": { "Microsoft.NETCore.App": { "type": "platform", "version": "1.0.0" } } } }, "dependencies": { "Microsoft.Azure.Test.HttpRecorder": "[1.6.7-preview,2.0.0)", "Microsoft.Rest.ClientRuntime.Azure.TestFramework": "[1.3.5-preview,2.0.0)", "Microsoft.Rest.ClientRuntime.Azure": "[3.3.1,4.0.0)", "Microsoft.Azure.Management.Batch": "3.0.0", "Microsoft.Azure.Management.ResourceManager": "[1.1.3-preview,2.0.0)", "xunit": "2.2.0-beta2-build3300", "dotnet-test-xunit": "2.2.0-preview2-build1029" } }
Add build option to disable parallel test execution
Add build option to disable parallel test execution
JSON
mit
shahabhijeet/azure-sdk-for-net,yugangw-msft/azure-sdk-for-net,samtoubia/azure-sdk-for-net,markcowl/azure-sdk-for-net,jamestao/azure-sdk-for-net,pankajsn/azure-sdk-for-net,AsrOneSdk/azure-sdk-for-net,hyonholee/azure-sdk-for-net,yaakoviyun/azure-sdk-for-net,peshen/azure-sdk-for-net,btasdoven/azure-sdk-for-net,jamestao/azure-sdk-for-net,SiddharthChatrolaMs/azure-sdk-for-net,JasonYang-MSFT/azure-sdk-for-net,ayeletshpigelman/azure-sdk-for-net,peshen/azure-sdk-for-net,jhendrixMSFT/azure-sdk-for-net,ayeletshpigelman/azure-sdk-for-net,atpham256/azure-sdk-for-net,stankovski/azure-sdk-for-net,Yahnoosh/azure-sdk-for-net,jhendrixMSFT/azure-sdk-for-net,ScottHolden/azure-sdk-for-net,pilor/azure-sdk-for-net,ScottHolden/azure-sdk-for-net,pankajsn/azure-sdk-for-net,brjohnstmsft/azure-sdk-for-net,atpham256/azure-sdk-for-net,DheerendraRathor/azure-sdk-for-net,hyonholee/azure-sdk-for-net,nathannfan/azure-sdk-for-net,jackmagic313/azure-sdk-for-net,samtoubia/azure-sdk-for-net,jhendrixMSFT/azure-sdk-for-net,Yahnoosh/azure-sdk-for-net,samtoubia/azure-sdk-for-net,jamestao/azure-sdk-for-net,AsrOneSdk/azure-sdk-for-net,shutchings/azure-sdk-for-net,SiddharthChatrolaMs/azure-sdk-for-net,ScottHolden/azure-sdk-for-net,jackmagic313/azure-sdk-for-net,yaakoviyun/azure-sdk-for-net,AsrOneSdk/azure-sdk-for-net,AzureAutomationTeam/azure-sdk-for-net,pilor/azure-sdk-for-net,pankajsn/azure-sdk-for-net,djyou/azure-sdk-for-net,AzCiS/azure-sdk-for-net,brjohnstmsft/azure-sdk-for-net,peshen/azure-sdk-for-net,brjohnstmsft/azure-sdk-for-net,olydis/azure-sdk-for-net,btasdoven/azure-sdk-for-net,begoldsm/azure-sdk-for-net,djyou/azure-sdk-for-net,pilor/azure-sdk-for-net,AzCiS/azure-sdk-for-net,stankovski/azure-sdk-for-net,shutchings/azure-sdk-for-net,hyonholee/azure-sdk-for-net,olydis/azure-sdk-for-net,shahabhijeet/azure-sdk-for-net,AzureAutomationTeam/azure-sdk-for-net,yugangw-msft/azure-sdk-for-net,JasonYang-MSFT/azure-sdk-for-net,ayeletshpigelman/azure-sdk-for-net,AsrOneSdk/azure-sdk-for-net,brjohnstmsft/azure-sdk-for-net,jackmagic313/azure-sdk-for-net,yaakoviyun/azure-sdk-for-net,yugangw-msft/azure-sdk-for-net,btasdoven/azure-sdk-for-net,JasonYang-MSFT/azure-sdk-for-net,djyou/azure-sdk-for-net,begoldsm/azure-sdk-for-net,AzureAutomationTeam/azure-sdk-for-net,Yahnoosh/azure-sdk-for-net,olydis/azure-sdk-for-net,SiddharthChatrolaMs/azure-sdk-for-net,ayeletshpigelman/azure-sdk-for-net,mihymel/azure-sdk-for-net,atpham256/azure-sdk-for-net,hyonholee/azure-sdk-for-net,nathannfan/azure-sdk-for-net,jackmagic313/azure-sdk-for-net,hyonholee/azure-sdk-for-net,mihymel/azure-sdk-for-net,shutchings/azure-sdk-for-net,jackmagic313/azure-sdk-for-net,jamestao/azure-sdk-for-net,begoldsm/azure-sdk-for-net,samtoubia/azure-sdk-for-net,nathannfan/azure-sdk-for-net,shahabhijeet/azure-sdk-for-net,shahabhijeet/azure-sdk-for-net,mihymel/azure-sdk-for-net,DheerendraRathor/azure-sdk-for-net,brjohnstmsft/azure-sdk-for-net,DheerendraRathor/azure-sdk-for-net,AzCiS/azure-sdk-for-net
json
## Code Before: { "version": "1.0.0-*", "description": "Batch.Tests Class Library", "authors": [ "Microsoft Corporation" ], "testRunner": "xunit", "frameworks": { "netcoreapp1.0": { "imports": ["dnxcore50", "portable-net45+win8"], "dependencies": { "Microsoft.NETCore.App": { "type": "platform", "version": "1.0.0" } } } }, "dependencies": { "Microsoft.Azure.Test.HttpRecorder": "[1.6.7-preview,2.0.0)", "Microsoft.Rest.ClientRuntime.Azure.TestFramework": "[1.3.5-preview,2.0.0)", "Microsoft.Rest.ClientRuntime.Azure": "[3.3.1,4.0.0)", "Microsoft.Azure.Management.Batch": "3.0.0", "Microsoft.Azure.Management.ResourceManager": "[1.1.3-preview,2.0.0)", "xunit": "2.2.0-beta2-build3300", "dotnet-test-xunit": "2.2.0-preview2-build1029" } } ## Instruction: Add build option to disable parallel test execution ## Code After: { "version": "1.0.0-*", "description": "Batch.Tests Class Library", "authors": [ "Microsoft Corporation" ], "buildOptions": { "delaySign": true, "publicSign": false, "keyFile": "../../../../tools/MSSharedLibKey.snk", "compile": "../../../../tools/DisableTestRunParallel.cs" }, "testRunner": "xunit", "frameworks": { "netcoreapp1.0": { "imports": ["dnxcore50", "portable-net45+win8"], "dependencies": { "Microsoft.NETCore.App": { "type": "platform", "version": "1.0.0" } } } }, "dependencies": { "Microsoft.Azure.Test.HttpRecorder": "[1.6.7-preview,2.0.0)", "Microsoft.Rest.ClientRuntime.Azure.TestFramework": "[1.3.5-preview,2.0.0)", "Microsoft.Rest.ClientRuntime.Azure": "[3.3.1,4.0.0)", "Microsoft.Azure.Management.Batch": "3.0.0", "Microsoft.Azure.Management.ResourceManager": "[1.1.3-preview,2.0.0)", "xunit": "2.2.0-beta2-build3300", "dotnet-test-xunit": "2.2.0-preview2-build1029" } }
{ "version": "1.0.0-*", "description": "Batch.Tests Class Library", "authors": [ "Microsoft Corporation" ], + + "buildOptions": { + "delaySign": true, + "publicSign": false, + "keyFile": "../../../../tools/MSSharedLibKey.snk", + "compile": "../../../../tools/DisableTestRunParallel.cs" + }, "testRunner": "xunit", "frameworks": { "netcoreapp1.0": { "imports": ["dnxcore50", "portable-net45+win8"], "dependencies": { "Microsoft.NETCore.App": { "type": "platform", "version": "1.0.0" } } } }, "dependencies": { "Microsoft.Azure.Test.HttpRecorder": "[1.6.7-preview,2.0.0)", "Microsoft.Rest.ClientRuntime.Azure.TestFramework": "[1.3.5-preview,2.0.0)", "Microsoft.Rest.ClientRuntime.Azure": "[3.3.1,4.0.0)", "Microsoft.Azure.Management.Batch": "3.0.0", "Microsoft.Azure.Management.ResourceManager": "[1.1.3-preview,2.0.0)", "xunit": "2.2.0-beta2-build3300", "dotnet-test-xunit": "2.2.0-preview2-build1029" } }
7
0.259259
7
0
628c92772d72467b9d5172434a259936e7e5d613
type/model/dependency.go
type/model/dependency.go
package model // SourceCD // 0 = unknown // 1 = carthage // 2 = cocoapods // 3 = submodule // Dependency has project dependency and source distination. type Dependency struct { ProjectUUID string `json:"project_uuid"` DependentProjectUUID string `json:"dependent_project_uuid"` SourceCD int `json:"source_cd"` }
package model // SourceCD // 0 = unknown // 1 = carthage // 2 = cocoapods // 3 = submodule // Dependency has project dependency and source distination. type Dependency struct { ProjectUUID string `json:"project_uuid" gorm:"ForeignKey:UUID"` DependentProjectUUID string `json:"dependent_project_uuid" gorm:"ForeignKey:UUID"` SourceCD int `json:"source_cd"` }
Set foreign key information to Dependency
Set foreign key information to Dependency
Go
mit
torinos-io/api,torinos-io/api
go
## Code Before: package model // SourceCD // 0 = unknown // 1 = carthage // 2 = cocoapods // 3 = submodule // Dependency has project dependency and source distination. type Dependency struct { ProjectUUID string `json:"project_uuid"` DependentProjectUUID string `json:"dependent_project_uuid"` SourceCD int `json:"source_cd"` } ## Instruction: Set foreign key information to Dependency ## Code After: package model // SourceCD // 0 = unknown // 1 = carthage // 2 = cocoapods // 3 = submodule // Dependency has project dependency and source distination. type Dependency struct { ProjectUUID string `json:"project_uuid" gorm:"ForeignKey:UUID"` DependentProjectUUID string `json:"dependent_project_uuid" gorm:"ForeignKey:UUID"` SourceCD int `json:"source_cd"` }
package model // SourceCD // 0 = unknown // 1 = carthage // 2 = cocoapods // 3 = submodule // Dependency has project dependency and source distination. type Dependency struct { - ProjectUUID string `json:"project_uuid"` + ProjectUUID string `json:"project_uuid" gorm:"ForeignKey:UUID"` ? +++++++++++++++++++++++ - DependentProjectUUID string `json:"dependent_project_uuid"` + DependentProjectUUID string `json:"dependent_project_uuid" gorm:"ForeignKey:UUID"` ? +++++++++++++++++++++++ SourceCD int `json:"source_cd"` }
4
0.266667
2
2
c0291513220b954d9a5732f8b0bf365474db9160
spec/title-bar-spec.coffee
spec/title-bar-spec.coffee
TitleBar = require '../src/title-bar' describe "TitleBar", -> it 'updates the title based on document.title when the active pane item changes', -> titleBar = new TitleBar({ workspace: atom.workspace, themes: atom.themes, applicationDelegate: atom.applicationDelegate, }) expect(titleBar.element.querySelector('.title').textContent).toBe document.title initialTitle = document.title atom.workspace.getActivePane().activateItem({ getTitle: -> 'Test Title' }) expect(document.title).not.toBe(initialTitle) expect(titleBar.element.querySelector('.title').textContent).toBe document.title
TitleBar = require '../src/title-bar' describe "TitleBar", -> it "updates the title based on document.title when the active pane item changes", -> titleBar = new TitleBar({ workspace: atom.workspace, themes: atom.themes, applicationDelegate: atom.applicationDelegate, }) expect(titleBar.element.querySelector('.title').textContent).toBe document.title initialTitle = document.title atom.workspace.getActivePane().activateItem({ getTitle: -> 'Test Title' }) expect(document.title).not.toBe(initialTitle) expect(titleBar.element.querySelector('.title').textContent).toBe document.title it "can update the sheet offset for the current window based on its height", -> titleBar = new TitleBar({ workspace: atom.workspace, themes: atom.themes, applicationDelegate: atom.applicationDelegate, }) expect(-> titleBar.updateWindowSheetOffset() ).not.toThrow()
Test that updateWindowSheetOffset can be called
Test that updateWindowSheetOffset can be called Testing the wiring to themes isn't worth it, but this at least makes sure we don't break if Electron APIs change.
CoffeeScript
mit
stinsonga/atom,andrewleverette/atom,t9md/atom,FIT-CSE2410-A-Bombs/atom,brettle/atom,andrewleverette/atom,PKRoma/atom,decaffeinate-examples/atom,me-benni/atom,kevinrenaers/atom,Ingramz/atom,helber/atom,Arcanemagus/atom,helber/atom,t9md/atom,tjkr/atom,tjkr/atom,atom/atom,stinsonga/atom,PKRoma/atom,FIT-CSE2410-A-Bombs/atom,bolinfest/atom,ardeshirj/atom,Ingramz/atom,brumm/atom,gontadu/atom,Mokolea/atom,decaffeinate-examples/atom,andrewleverette/atom,AlexxNica/atom,rlugojr/atom,AdrianVovk/substance-ide,AlexxNica/atom,gontadu/atom,rlugojr/atom,AlexxNica/atom,ardeshirj/atom,bsmr-x-script/atom,stinsonga/atom,liuderchi/atom,bsmr-x-script/atom,Arcanemagus/atom,atom/atom,Ingramz/atom,liuderchi/atom,me-benni/atom,brettle/atom,PKRoma/atom,xream/atom,Mokolea/atom,rlugojr/atom,xream/atom,bsmr-x-script/atom,atom/atom,liuderchi/atom,brettle/atom,CraZySacX/atom,tjkr/atom,CraZySacX/atom,t9md/atom,me-benni/atom,AdrianVovk/substance-ide,liuderchi/atom,xream/atom,ardeshirj/atom,CraZySacX/atom,brumm/atom,gontadu/atom,bolinfest/atom,Arcanemagus/atom,sotayamashita/atom,decaffeinate-examples/atom,sotayamashita/atom,bolinfest/atom,decaffeinate-examples/atom,Mokolea/atom,sotayamashita/atom,kevinrenaers/atom,brumm/atom,FIT-CSE2410-A-Bombs/atom,AdrianVovk/substance-ide,kevinrenaers/atom,stinsonga/atom,helber/atom
coffeescript
## Code Before: TitleBar = require '../src/title-bar' describe "TitleBar", -> it 'updates the title based on document.title when the active pane item changes', -> titleBar = new TitleBar({ workspace: atom.workspace, themes: atom.themes, applicationDelegate: atom.applicationDelegate, }) expect(titleBar.element.querySelector('.title').textContent).toBe document.title initialTitle = document.title atom.workspace.getActivePane().activateItem({ getTitle: -> 'Test Title' }) expect(document.title).not.toBe(initialTitle) expect(titleBar.element.querySelector('.title').textContent).toBe document.title ## Instruction: Test that updateWindowSheetOffset can be called Testing the wiring to themes isn't worth it, but this at least makes sure we don't break if Electron APIs change. ## Code After: TitleBar = require '../src/title-bar' describe "TitleBar", -> it "updates the title based on document.title when the active pane item changes", -> titleBar = new TitleBar({ workspace: atom.workspace, themes: atom.themes, applicationDelegate: atom.applicationDelegate, }) expect(titleBar.element.querySelector('.title').textContent).toBe document.title initialTitle = document.title atom.workspace.getActivePane().activateItem({ getTitle: -> 'Test Title' }) expect(document.title).not.toBe(initialTitle) expect(titleBar.element.querySelector('.title').textContent).toBe document.title it "can update the sheet offset for the current window based on its height", -> titleBar = new TitleBar({ workspace: atom.workspace, themes: atom.themes, applicationDelegate: atom.applicationDelegate, }) expect(-> titleBar.updateWindowSheetOffset() ).not.toThrow()
TitleBar = require '../src/title-bar' describe "TitleBar", -> - it 'updates the title based on document.title when the active pane item changes', -> ? ^ ^ + it "updates the title based on document.title when the active pane item changes", -> ? ^ ^ titleBar = new TitleBar({ workspace: atom.workspace, themes: atom.themes, applicationDelegate: atom.applicationDelegate, }) expect(titleBar.element.querySelector('.title').textContent).toBe document.title initialTitle = document.title atom.workspace.getActivePane().activateItem({ getTitle: -> 'Test Title' }) expect(document.title).not.toBe(initialTitle) expect(titleBar.element.querySelector('.title').textContent).toBe document.title + + it "can update the sheet offset for the current window based on its height", -> + titleBar = new TitleBar({ + workspace: atom.workspace, + themes: atom.themes, + applicationDelegate: atom.applicationDelegate, + }) + expect(-> + titleBar.updateWindowSheetOffset() + ).not.toThrow()
12
0.631579
11
1