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
0d8c6bf191c3b1a212ad95d5372d7253add4a51d
alpha/apps/kaltura/lib/myKuserUtils.class.php
alpha/apps/kaltura/lib/myKuserUtils.class.php
<?php class myKuserUtils { const SPECIAL_CHARS = array('+', '=', '-', '@', ','); const NON_EXISTING_USER_ID = -1; const USERS_DELIMITER = ','; const DOT_CHAR = '.'; const SPACE_CHAR = ' '; public static function preparePusersToKusersFilter( $puserIdsCsv ) { $kuserIdsArr = array(); $puserIdsArr = explode(self::USERS_DELIMITER, $puserIdsCsv); $kuserArr = kuserPeer::getKuserByPartnerAndUids(kCurrentContext::getCurrentPartnerId(), $puserIdsArr); foreach($kuserArr as $kuser) { $kuserIdsArr[] = $kuser->getId(); } if(!empty($kuserIdsArr)) { return implode(self::USERS_DELIMITER, $kuserIdsArr); } return self::NON_EXISTING_USER_ID; // no result will be returned if no puser exists } public static function startsWithSpecialChar($str) { return $str && in_array($str[0], self::SPECIAL_CHARS); } public static function sanitizeFields(array $values) { $sanitizedValues = array(); foreach ($values as $val) { $sanitizedVal = str_replace(self::DOT_CHAR, self::SPACE_CHAR, $val); $sanitizedValues[] = $sanitizedVal; } return $sanitizedValues; } }
<?php class myKuserUtils { const NON_EXISTING_USER_ID = -1; const USERS_DELIMITER = ','; const DOT_CHAR = '.'; const SPACE_CHAR = ' '; public static function preparePusersToKusersFilter( $puserIdsCsv ) { $kuserIdsArr = array(); $puserIdsArr = explode(self::USERS_DELIMITER, $puserIdsCsv); $kuserArr = kuserPeer::getKuserByPartnerAndUids(kCurrentContext::getCurrentPartnerId(), $puserIdsArr); foreach($kuserArr as $kuser) { $kuserIdsArr[] = $kuser->getId(); } if(!empty($kuserIdsArr)) { return implode(self::USERS_DELIMITER, $kuserIdsArr); } return self::NON_EXISTING_USER_ID; // no result will be returned if no puser exists } public static function startsWithSpecialChar($str) { return $str && in_array($str[0], array('+', '=', '-', '@', ',')); } public static function sanitizeFields(array $values) { $sanitizedValues = array(); foreach ($values as $val) { $sanitizedVal = str_replace(self::DOT_CHAR, self::SPACE_CHAR, $val); $sanitizedValues[] = $sanitizedVal; } return $sanitizedValues; } }
Remove const that is not supported in older php versions
Remove const that is not supported in older php versions
PHP
agpl-3.0
kaltura/server,kaltura/server,kaltura/server,kaltura/server,kaltura/server,kaltura/server
php
## Code Before: <?php class myKuserUtils { const SPECIAL_CHARS = array('+', '=', '-', '@', ','); const NON_EXISTING_USER_ID = -1; const USERS_DELIMITER = ','; const DOT_CHAR = '.'; const SPACE_CHAR = ' '; public static function preparePusersToKusersFilter( $puserIdsCsv ) { $kuserIdsArr = array(); $puserIdsArr = explode(self::USERS_DELIMITER, $puserIdsCsv); $kuserArr = kuserPeer::getKuserByPartnerAndUids(kCurrentContext::getCurrentPartnerId(), $puserIdsArr); foreach($kuserArr as $kuser) { $kuserIdsArr[] = $kuser->getId(); } if(!empty($kuserIdsArr)) { return implode(self::USERS_DELIMITER, $kuserIdsArr); } return self::NON_EXISTING_USER_ID; // no result will be returned if no puser exists } public static function startsWithSpecialChar($str) { return $str && in_array($str[0], self::SPECIAL_CHARS); } public static function sanitizeFields(array $values) { $sanitizedValues = array(); foreach ($values as $val) { $sanitizedVal = str_replace(self::DOT_CHAR, self::SPACE_CHAR, $val); $sanitizedValues[] = $sanitizedVal; } return $sanitizedValues; } } ## Instruction: Remove const that is not supported in older php versions ## Code After: <?php class myKuserUtils { const NON_EXISTING_USER_ID = -1; const USERS_DELIMITER = ','; const DOT_CHAR = '.'; const SPACE_CHAR = ' '; public static function preparePusersToKusersFilter( $puserIdsCsv ) { $kuserIdsArr = array(); $puserIdsArr = explode(self::USERS_DELIMITER, $puserIdsCsv); $kuserArr = kuserPeer::getKuserByPartnerAndUids(kCurrentContext::getCurrentPartnerId(), $puserIdsArr); foreach($kuserArr as $kuser) { $kuserIdsArr[] = $kuser->getId(); } if(!empty($kuserIdsArr)) { return implode(self::USERS_DELIMITER, $kuserIdsArr); } return self::NON_EXISTING_USER_ID; // no result will be returned if no puser exists } public static function startsWithSpecialChar($str) { return $str && in_array($str[0], array('+', '=', '-', '@', ',')); } public static function sanitizeFields(array $values) { $sanitizedValues = array(); foreach ($values as $val) { $sanitizedVal = str_replace(self::DOT_CHAR, self::SPACE_CHAR, $val); $sanitizedValues[] = $sanitizedVal; } return $sanitizedValues; } }
<?php class myKuserUtils { - const SPECIAL_CHARS = array('+', '=', '-', '@', ','); const NON_EXISTING_USER_ID = -1; const USERS_DELIMITER = ','; const DOT_CHAR = '.'; const SPACE_CHAR = ' '; public static function preparePusersToKusersFilter( $puserIdsCsv ) { $kuserIdsArr = array(); $puserIdsArr = explode(self::USERS_DELIMITER, $puserIdsCsv); $kuserArr = kuserPeer::getKuserByPartnerAndUids(kCurrentContext::getCurrentPartnerId(), $puserIdsArr); foreach($kuserArr as $kuser) { $kuserIdsArr[] = $kuser->getId(); } if(!empty($kuserIdsArr)) { return implode(self::USERS_DELIMITER, $kuserIdsArr); } return self::NON_EXISTING_USER_ID; // no result will be returned if no puser exists } public static function startsWithSpecialChar($str) { - return $str && in_array($str[0], self::SPECIAL_CHARS); + return $str && in_array($str[0], array('+', '=', '-', '@', ',')); } public static function sanitizeFields(array $values) { $sanitizedValues = array(); foreach ($values as $val) { $sanitizedVal = str_replace(self::DOT_CHAR, self::SPACE_CHAR, $val); $sanitizedValues[] = $sanitizedVal; } return $sanitizedValues; } }
3
0.066667
1
2
9e90ab47a7b80b68a7c618fddcb5ecf6fd80b2e0
src/create_assignment/index.ts
src/create_assignment/index.ts
import { JupyterFrontEnd, JupyterFrontEndPlugin } from '@jupyterlab/application'; import { INotebookTracker } from '@jupyterlab/notebook'; import { BoxPanel } from '@lumino/widgets'; import { CreateAssignmentWidget } from './create_assignment_extension'; /** * Initialization data for the create_assignment extension. */ export const create_assignment_extension: JupyterFrontEndPlugin<void> = { id: 'create-assignment', autoStart: true, requires: [INotebookTracker], activate: activate_extension }; function activate_extension(app: JupyterFrontEnd, tracker: INotebookTracker) { console.log('Activating extension "create_assignment".'); const panel = new BoxPanel(); const createAssignmentWidget = new CreateAssignmentWidget(tracker); panel.addWidget(createAssignmentWidget); panel.id = 'nbgrader-create_assignemnt'; panel.title.label = 'Create Assignment'; panel.title.caption = 'nbgrader Create Assignment'; app.shell.add(panel, 'right'); console.log('Extension "create_assignment" activated.'); } export default create_assignment_extension;
import { JupyterFrontEnd, JupyterFrontEndPlugin } from '@jupyterlab/application'; import { INotebookTracker } from '@jupyterlab/notebook'; import { Panel, PanelLayout } from '@lumino/widgets'; import { CreateAssignmentWidget } from './create_assignment_extension'; /** * Initialization data for the create_assignment extension. */ export const create_assignment_extension: JupyterFrontEndPlugin<void> = { id: 'create-assignment', autoStart: true, requires: [INotebookTracker], activate: activate_extension }; function activate_extension(app: JupyterFrontEnd, tracker: INotebookTracker) { console.log('Activating extension "create_assignment".'); const panel = new Panel({layout: new PanelLayout({fitPolicy: 'set-min-size'})}); const createAssignmentWidget = new CreateAssignmentWidget(tracker); panel.addWidget(createAssignmentWidget); panel.id = 'nbgrader-create_assignemnt'; panel.title.label = 'Create Assignment'; panel.title.caption = 'nbgrader Create Assignment'; app.shell.add(panel, 'right'); console.log('Extension "create_assignment" activated.'); } export default create_assignment_extension;
Change create assignment panel from 'BoxPanel' to 'Panel'. Using BoxPanel the min size was changed to 0px, and the panel does not seem to open
Change create assignment panel from 'BoxPanel' to 'Panel'. Using BoxPanel the min size was changed to 0px, and the panel does not seem to open
TypeScript
bsd-3-clause
jupyter/nbgrader,jhamrick/nbgrader,jhamrick/nbgrader,jupyter/nbgrader,jupyter/nbgrader,jhamrick/nbgrader,jupyter/nbgrader,jupyter/nbgrader,jhamrick/nbgrader
typescript
## Code Before: import { JupyterFrontEnd, JupyterFrontEndPlugin } from '@jupyterlab/application'; import { INotebookTracker } from '@jupyterlab/notebook'; import { BoxPanel } from '@lumino/widgets'; import { CreateAssignmentWidget } from './create_assignment_extension'; /** * Initialization data for the create_assignment extension. */ export const create_assignment_extension: JupyterFrontEndPlugin<void> = { id: 'create-assignment', autoStart: true, requires: [INotebookTracker], activate: activate_extension }; function activate_extension(app: JupyterFrontEnd, tracker: INotebookTracker) { console.log('Activating extension "create_assignment".'); const panel = new BoxPanel(); const createAssignmentWidget = new CreateAssignmentWidget(tracker); panel.addWidget(createAssignmentWidget); panel.id = 'nbgrader-create_assignemnt'; panel.title.label = 'Create Assignment'; panel.title.caption = 'nbgrader Create Assignment'; app.shell.add(panel, 'right'); console.log('Extension "create_assignment" activated.'); } export default create_assignment_extension; ## Instruction: Change create assignment panel from 'BoxPanel' to 'Panel'. Using BoxPanel the min size was changed to 0px, and the panel does not seem to open ## Code After: import { JupyterFrontEnd, JupyterFrontEndPlugin } from '@jupyterlab/application'; import { INotebookTracker } from '@jupyterlab/notebook'; import { Panel, PanelLayout } from '@lumino/widgets'; import { CreateAssignmentWidget } from './create_assignment_extension'; /** * Initialization data for the create_assignment extension. */ export const create_assignment_extension: JupyterFrontEndPlugin<void> = { id: 'create-assignment', autoStart: true, requires: [INotebookTracker], activate: activate_extension }; function activate_extension(app: JupyterFrontEnd, tracker: INotebookTracker) { console.log('Activating extension "create_assignment".'); const panel = new Panel({layout: new PanelLayout({fitPolicy: 'set-min-size'})}); const createAssignmentWidget = new CreateAssignmentWidget(tracker); panel.addWidget(createAssignmentWidget); panel.id = 'nbgrader-create_assignemnt'; panel.title.label = 'Create Assignment'; panel.title.caption = 'nbgrader Create Assignment'; app.shell.add(panel, 'right'); console.log('Extension "create_assignment" activated.'); } export default create_assignment_extension;
import { JupyterFrontEnd, JupyterFrontEndPlugin } from '@jupyterlab/application'; import { INotebookTracker } from '@jupyterlab/notebook'; import { - BoxPanel + Panel, PanelLayout } from '@lumino/widgets'; import { CreateAssignmentWidget } from './create_assignment_extension'; /** * Initialization data for the create_assignment extension. */ export const create_assignment_extension: JupyterFrontEndPlugin<void> = { id: 'create-assignment', autoStart: true, requires: [INotebookTracker], activate: activate_extension }; function activate_extension(app: JupyterFrontEnd, tracker: INotebookTracker) { console.log('Activating extension "create_assignment".'); - const panel = new BoxPanel(); + const panel = new Panel({layout: new PanelLayout({fitPolicy: 'set-min-size'})}); const createAssignmentWidget = new CreateAssignmentWidget(tracker); panel.addWidget(createAssignmentWidget); panel.id = 'nbgrader-create_assignemnt'; panel.title.label = 'Create Assignment'; panel.title.caption = 'nbgrader Create Assignment'; app.shell.add(panel, 'right'); console.log('Extension "create_assignment" activated.'); } export default create_assignment_extension;
4
0.1
2
2
c58ea0edf1f5b885e4d9adaf621267c689726490
test/HasqlBroadcastSpec.hs
test/HasqlBroadcastSpec.hs
module HasqlBroadcastSpec (spec) where import Protolude import Data.Function (id) import Control.Concurrent.STM.TQueue import qualified Hasql.Query as H import qualified Hasql.Session as H import qualified Hasql.Decoders as HD import qualified Hasql.Encoders as HE import Test.Hspec import PostgRESTWS.Database import PostgRESTWS.Broadcast import PostgRESTWS.HasqlBroadcast spec :: Spec spec = describe "newHasqlBroadcaster" $ it "start listening on a database connection as we send an Open command" $ do conOrError <- acquire "postgres://localhost/postgrest_test" let con = either (panic . show) id conOrError multi <- liftIO $ newHasqlBroadcaster con atomically $ openChannelProducer multi "test" let statement = H.statement "SELECT EXISTS (SELECT 1 FROM pg_stat_activity WHERE query ~* 'LISTEN \"test\"')" HE.unit (HD.singleRow $ HD.value HD.bool) False query = H.query () statement resOrError <- H.run query con let result = either (panic . show) id resOrError result `shouldBe` True
module HasqlBroadcastSpec (spec) where import Protolude import Data.Function (id) import Control.Concurrent.STM.TQueue import qualified Hasql.Query as H import qualified Hasql.Session as H import qualified Hasql.Decoders as HD import qualified Hasql.Encoders as HE import Test.Hspec import PostgRESTWS.Database import PostgRESTWS.Broadcast import PostgRESTWS.HasqlBroadcast spec :: Spec spec = describe "newHasqlBroadcaster" $ do it "start listening on a database connection as we send an Open command" $ do conOrError <- acquire "postgres://localhost/postgrest_test" let con = either (panic . show) id conOrError multi <- liftIO $ newHasqlBroadcaster con atomically $ openChannelProducer multi "test" let statement = H.statement "SELECT EXISTS (SELECT 1 FROM pg_stat_activity WHERE query ~* 'LISTEN \"test\"')" HE.unit (HD.singleRow $ HD.value HD.bool) False query = H.query () statement resOrError <- H.run query con let result = either (panic . show) id resOrError result `shouldBe` True it "stops listening on a database connection as we send a Close command" $ do conOrError <- acquire "postgres://localhost/postgrest_test" let con = either (panic . show) id conOrError multi <- liftIO $ newHasqlBroadcaster con atomically $ closeChannelProducer multi "test" let statement = H.statement "SELECT EXISTS (SELECT 1 FROM pg_stat_activity WHERE query ~* 'UNLISTEN \"test\"')" HE.unit (HD.singleRow $ HD.value HD.bool) False query = H.query () statement resOrError <- H.run query con let result = either (panic . show) id resOrError result `shouldBe` True
Add test case for closing (unlisten) commands on the HasqlBroadcast
Add test case for closing (unlisten) commands on the HasqlBroadcast
Haskell
mit
diogob/postgrest-ws,diogob/postgrest-ws,diogob/postgrest-ws
haskell
## Code Before: module HasqlBroadcastSpec (spec) where import Protolude import Data.Function (id) import Control.Concurrent.STM.TQueue import qualified Hasql.Query as H import qualified Hasql.Session as H import qualified Hasql.Decoders as HD import qualified Hasql.Encoders as HE import Test.Hspec import PostgRESTWS.Database import PostgRESTWS.Broadcast import PostgRESTWS.HasqlBroadcast spec :: Spec spec = describe "newHasqlBroadcaster" $ it "start listening on a database connection as we send an Open command" $ do conOrError <- acquire "postgres://localhost/postgrest_test" let con = either (panic . show) id conOrError multi <- liftIO $ newHasqlBroadcaster con atomically $ openChannelProducer multi "test" let statement = H.statement "SELECT EXISTS (SELECT 1 FROM pg_stat_activity WHERE query ~* 'LISTEN \"test\"')" HE.unit (HD.singleRow $ HD.value HD.bool) False query = H.query () statement resOrError <- H.run query con let result = either (panic . show) id resOrError result `shouldBe` True ## Instruction: Add test case for closing (unlisten) commands on the HasqlBroadcast ## Code After: module HasqlBroadcastSpec (spec) where import Protolude import Data.Function (id) import Control.Concurrent.STM.TQueue import qualified Hasql.Query as H import qualified Hasql.Session as H import qualified Hasql.Decoders as HD import qualified Hasql.Encoders as HE import Test.Hspec import PostgRESTWS.Database import PostgRESTWS.Broadcast import PostgRESTWS.HasqlBroadcast spec :: Spec spec = describe "newHasqlBroadcaster" $ do it "start listening on a database connection as we send an Open command" $ do conOrError <- acquire "postgres://localhost/postgrest_test" let con = either (panic . show) id conOrError multi <- liftIO $ newHasqlBroadcaster con atomically $ openChannelProducer multi "test" let statement = H.statement "SELECT EXISTS (SELECT 1 FROM pg_stat_activity WHERE query ~* 'LISTEN \"test\"')" HE.unit (HD.singleRow $ HD.value HD.bool) False query = H.query () statement resOrError <- H.run query con let result = either (panic . show) id resOrError result `shouldBe` True it "stops listening on a database connection as we send a Close command" $ do conOrError <- acquire "postgres://localhost/postgrest_test" let con = either (panic . show) id conOrError multi <- liftIO $ newHasqlBroadcaster con atomically $ closeChannelProducer multi "test" let statement = H.statement "SELECT EXISTS (SELECT 1 FROM pg_stat_activity WHERE query ~* 'UNLISTEN \"test\"')" HE.unit (HD.singleRow $ HD.value HD.bool) False query = H.query () statement resOrError <- H.run query con let result = either (panic . show) id resOrError result `shouldBe` True
module HasqlBroadcastSpec (spec) where import Protolude import Data.Function (id) import Control.Concurrent.STM.TQueue import qualified Hasql.Query as H import qualified Hasql.Session as H import qualified Hasql.Decoders as HD import qualified Hasql.Encoders as HE import Test.Hspec import PostgRESTWS.Database import PostgRESTWS.Broadcast import PostgRESTWS.HasqlBroadcast spec :: Spec - spec = describe "newHasqlBroadcaster" $ + spec = describe "newHasqlBroadcaster" $ do ? +++ it "start listening on a database connection as we send an Open command" $ do conOrError <- acquire "postgres://localhost/postgrest_test" let con = either (panic . show) id conOrError multi <- liftIO $ newHasqlBroadcaster con atomically $ openChannelProducer multi "test" let statement = H.statement "SELECT EXISTS (SELECT 1 FROM pg_stat_activity WHERE query ~* 'LISTEN \"test\"')" HE.unit (HD.singleRow $ HD.value HD.bool) False query = H.query () statement resOrError <- H.run query con let result = either (panic . show) id resOrError result `shouldBe` True + + it "stops listening on a database connection as we send a Close command" $ do + conOrError <- acquire "postgres://localhost/postgrest_test" + let con = either (panic . show) id conOrError + multi <- liftIO $ newHasqlBroadcaster con + atomically $ closeChannelProducer multi "test" + + let statement = H.statement "SELECT EXISTS (SELECT 1 FROM pg_stat_activity WHERE query ~* 'UNLISTEN \"test\"')" + HE.unit (HD.singleRow $ HD.value HD.bool) False + query = H.query () statement + resOrError <- H.run query con + let result = either (panic . show) id resOrError + result `shouldBe` True
15
0.483871
14
1
211695fe39228a59d87f7cfeca2b7a6fd6bdd107
Ajuda/VC/JUWShelterViewController.swift
Ajuda/VC/JUWShelterViewController.swift
// // JUWShelterViewController.swift // Ajuda // // Created by Juwe Takeheshi on 9/21/17. // Copyright © 2017 Juwe Takeheshi. All rights reserved. // typealias OnResultsFound = (_ result: [JUWCollectionCenter])->() import UIKit class JUWShelterViewController: UIViewController { @IBOutlet var searchBar: UISearchBar! var searchController: UISearchController! var productSearch: String? var onResultsFound: OnResultsFound? override func viewDidLoad() { super.viewDidLoad() self.title = "Quiero ayudar con..." navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Cancelar", style: .plain, target: self, action: #selector(JUWShelterViewController.cancel(_:))) } @IBAction func cancel(_ sender: UIButton) { self.dismiss(animated: true, completion: nil) } } extension JUWShelterViewController: UISearchBarDelegate { func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) { productSearch = searchText } func searchBarSearchButtonClicked(_ searchBar: UISearchBar) { guard let product = productSearch else { return } JUWCollectionCenterManager().collectionCenters(whichNeed: product) { collectionCenters in self.onResultsFound?(collectionCenters) self.dismiss(animated: true, completion: nil) } } }
// // JUWShelterViewController.swift // Ajuda // // Created by Juwe Takeheshi on 9/21/17. // Copyright © 2017 Juwe Takeheshi. All rights reserved. // typealias OnResultsFound = (_ result: [JUWCollectionCenter])->() import UIKit class JUWShelterViewController: UIViewController { @IBOutlet var searchBar: UISearchBar! var searchController: UISearchController! var productSearch: String? var onResultsFound: OnResultsFound? override func viewDidLoad() { super.viewDidLoad() self.title = "Quiero ayudar con..." navigationItem.rightBarButtonItem = UIBarButtonItem( title: "Cancelar", style: .plain, target: self, action: #selector(JUWShelterViewController.cancel(_:)) ) } @IBAction func cancel(_ sender: UIButton) { self.dismiss(animated: true, completion: nil) } } extension JUWShelterViewController: UISearchBarDelegate { func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) { productSearch = searchText } func searchBarSearchButtonClicked(_ searchBar: UISearchBar) { guard let product = productSearch else { return } JUWCollectionCenterManager().collectionCenters(whichNeed: product) { collectionCenters in self.onResultsFound?(collectionCenters) self.dismiss(animated: true, completion: nil) } } }
Format to make code more readable
Format to make code more readable
Swift
mit
JuweTakeheshi/ajuda
swift
## Code Before: // // JUWShelterViewController.swift // Ajuda // // Created by Juwe Takeheshi on 9/21/17. // Copyright © 2017 Juwe Takeheshi. All rights reserved. // typealias OnResultsFound = (_ result: [JUWCollectionCenter])->() import UIKit class JUWShelterViewController: UIViewController { @IBOutlet var searchBar: UISearchBar! var searchController: UISearchController! var productSearch: String? var onResultsFound: OnResultsFound? override func viewDidLoad() { super.viewDidLoad() self.title = "Quiero ayudar con..." navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Cancelar", style: .plain, target: self, action: #selector(JUWShelterViewController.cancel(_:))) } @IBAction func cancel(_ sender: UIButton) { self.dismiss(animated: true, completion: nil) } } extension JUWShelterViewController: UISearchBarDelegate { func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) { productSearch = searchText } func searchBarSearchButtonClicked(_ searchBar: UISearchBar) { guard let product = productSearch else { return } JUWCollectionCenterManager().collectionCenters(whichNeed: product) { collectionCenters in self.onResultsFound?(collectionCenters) self.dismiss(animated: true, completion: nil) } } } ## Instruction: Format to make code more readable ## Code After: // // JUWShelterViewController.swift // Ajuda // // Created by Juwe Takeheshi on 9/21/17. // Copyright © 2017 Juwe Takeheshi. All rights reserved. // typealias OnResultsFound = (_ result: [JUWCollectionCenter])->() import UIKit class JUWShelterViewController: UIViewController { @IBOutlet var searchBar: UISearchBar! var searchController: UISearchController! var productSearch: String? var onResultsFound: OnResultsFound? override func viewDidLoad() { super.viewDidLoad() self.title = "Quiero ayudar con..." navigationItem.rightBarButtonItem = UIBarButtonItem( title: "Cancelar", style: .plain, target: self, action: #selector(JUWShelterViewController.cancel(_:)) ) } @IBAction func cancel(_ sender: UIButton) { self.dismiss(animated: true, completion: nil) } } extension JUWShelterViewController: UISearchBarDelegate { func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) { productSearch = searchText } func searchBarSearchButtonClicked(_ searchBar: UISearchBar) { guard let product = productSearch else { return } JUWCollectionCenterManager().collectionCenters(whichNeed: product) { collectionCenters in self.onResultsFound?(collectionCenters) self.dismiss(animated: true, completion: nil) } } }
// // JUWShelterViewController.swift // Ajuda // // Created by Juwe Takeheshi on 9/21/17. // Copyright © 2017 Juwe Takeheshi. All rights reserved. // typealias OnResultsFound = (_ result: [JUWCollectionCenter])->() import UIKit class JUWShelterViewController: UIViewController { @IBOutlet var searchBar: UISearchBar! var searchController: UISearchController! var productSearch: String? var onResultsFound: OnResultsFound? override func viewDidLoad() { super.viewDidLoad() self.title = "Quiero ayudar con..." - navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Cancelar", style: .plain, target: self, action: #selector(JUWShelterViewController.cancel(_:))) + navigationItem.rightBarButtonItem = UIBarButtonItem( + title: "Cancelar", + style: .plain, + target: self, + action: #selector(JUWShelterViewController.cancel(_:)) + ) } @IBAction func cancel(_ sender: UIButton) { self.dismiss(animated: true, completion: nil) } } extension JUWShelterViewController: UISearchBarDelegate { func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) { productSearch = searchText } func searchBarSearchButtonClicked(_ searchBar: UISearchBar) { guard let product = productSearch else { return } JUWCollectionCenterManager().collectionCenters(whichNeed: product) { collectionCenters in self.onResultsFound?(collectionCenters) self.dismiss(animated: true, completion: nil) } } }
7
0.152174
6
1
84c7b738a8bd9a4c63df5afe9c03e1d66ac17bd8
Resources/Private/Partials/Page/Navigation/Main.html
Resources/Private/Partials/Page/Navigation/Main.html
<div class="navbar navbar-{themeNavigationstyle} navbar-top{f:if(condition:logoFile,then:' navbar-has-image')}" role="navigation"> <div class="container"> <div class="navbar-header navbar-header-main"> <f:if condition="{logoFile}"> <f:then> <f:link.page pageUid="{rootPage}" class="navbar-brand navbar-brand-image"> <img src="{f:uri.image(src: logoFile)}" height="{logoHeight}" width="{logoWidth}" /> </f:link.page> </f:then> <f:else> <f:link.page pageUid="{rootPage}" class="navbar-brand">{siteTitle}</f:link.page> </f:else> </f:if> <button type="button" class="navbar-toggle navbar-toggle-menu" data-toggle="collapse" data-target=".navbar-collapse"> <span class="glyphicon glyphicon-list"></span> <span class="sr-only">Toggle navigation</span> </button> <span class="navbar-header-border-bottom"></span> </div> <div class="navbar-collapse collapse"> <f:cObject typoscriptObjectPath="lib.navigation.main" /> </div> </div> </div>
<div class="navbar navbar-{themeNavigationstyle} navbar-top{f:if(condition:logoFile,then:' navbar-has-image')}" role="navigation"> <div class="container"> <div class="navbar-header navbar-header-main"> <f:if condition="{logoFile}"> <f:then> <f:link.page pageUid="{rootPage}" class="navbar-brand navbar-brand-image"> <img src="{f:uri.image(src: logoFile)}" height="{logoHeight}" width="{logoWidth}" /> </f:link.page> </f:then> <f:else> <f:link.page pageUid="{rootPage}" class="navbar-brand">{siteTitle}</f:link.page> </f:else> </f:if> <f:if condition="{f:cObject(typoscriptObjectPath:'lib.navigation.main')}"> <button type="button" class="navbar-toggle navbar-toggle-menu" data-toggle="collapse" data-target=".navbar-collapse"> <span class="glyphicon glyphicon-list"></span> <span class="sr-only">Toggle navigation</span> </button> </f:if> <span class="navbar-header-border-bottom"></span> </div> <div class="navbar-collapse collapse"> <f:cObject typoscriptObjectPath="lib.navigation.main" /> </div> </div> </div>
Hide navigation toggle if no subpages exist.
Hide navigation toggle if no subpages exist.
HTML
mit
buxit/bootstrap_package,stweil/bootstrap_package,pekue/bootstrap_package,buxit/bootstrap_package,buxit/bootstrap_package,benjaminkott/bootstrap_package,juschue/bootstrap_package,nabossha/bootstrap_package,juschue/bootstrap_package,cedricziel/bootstrap_package-1,nabossha/bootstrap_package,stweil/bootstrap_package,MediaCluster/bootstrap_package,buxit/bootstrap_package,benjaminkott/bootstrap_package,webian/bootstrap_package,cedricziel/bootstrap_package-1,benjaminkott/bootstrap_package,maddy2101/bootstrap_package,nabossha/bootstrap_package,juschue/bootstrap_package,maddy2101/bootstrap_package,juschue/bootstrap_package,s-leger/bootstrap_package,MediaCluster/bootstrap_package,stweil/bootstrap_package,cedricziel/bootstrap_package-1,s-leger/bootstrap_package,maddy2101/bootstrap_package,webian/bootstrap_package,stweil/bootstrap_package,pekue/bootstrap_package,s-leger/bootstrap_package,nabossha/bootstrap_package,webian/bootstrap_package,benjaminkott/bootstrap_package,MediaCluster/bootstrap_package,pekue/bootstrap_package
html
## Code Before: <div class="navbar navbar-{themeNavigationstyle} navbar-top{f:if(condition:logoFile,then:' navbar-has-image')}" role="navigation"> <div class="container"> <div class="navbar-header navbar-header-main"> <f:if condition="{logoFile}"> <f:then> <f:link.page pageUid="{rootPage}" class="navbar-brand navbar-brand-image"> <img src="{f:uri.image(src: logoFile)}" height="{logoHeight}" width="{logoWidth}" /> </f:link.page> </f:then> <f:else> <f:link.page pageUid="{rootPage}" class="navbar-brand">{siteTitle}</f:link.page> </f:else> </f:if> <button type="button" class="navbar-toggle navbar-toggle-menu" data-toggle="collapse" data-target=".navbar-collapse"> <span class="glyphicon glyphicon-list"></span> <span class="sr-only">Toggle navigation</span> </button> <span class="navbar-header-border-bottom"></span> </div> <div class="navbar-collapse collapse"> <f:cObject typoscriptObjectPath="lib.navigation.main" /> </div> </div> </div> ## Instruction: Hide navigation toggle if no subpages exist. ## Code After: <div class="navbar navbar-{themeNavigationstyle} navbar-top{f:if(condition:logoFile,then:' navbar-has-image')}" role="navigation"> <div class="container"> <div class="navbar-header navbar-header-main"> <f:if condition="{logoFile}"> <f:then> <f:link.page pageUid="{rootPage}" class="navbar-brand navbar-brand-image"> <img src="{f:uri.image(src: logoFile)}" height="{logoHeight}" width="{logoWidth}" /> </f:link.page> </f:then> <f:else> <f:link.page pageUid="{rootPage}" class="navbar-brand">{siteTitle}</f:link.page> </f:else> </f:if> <f:if condition="{f:cObject(typoscriptObjectPath:'lib.navigation.main')}"> <button type="button" class="navbar-toggle navbar-toggle-menu" data-toggle="collapse" data-target=".navbar-collapse"> <span class="glyphicon glyphicon-list"></span> <span class="sr-only">Toggle navigation</span> </button> </f:if> <span class="navbar-header-border-bottom"></span> </div> <div class="navbar-collapse collapse"> <f:cObject typoscriptObjectPath="lib.navigation.main" /> </div> </div> </div>
<div class="navbar navbar-{themeNavigationstyle} navbar-top{f:if(condition:logoFile,then:' navbar-has-image')}" role="navigation"> <div class="container"> <div class="navbar-header navbar-header-main"> <f:if condition="{logoFile}"> <f:then> <f:link.page pageUid="{rootPage}" class="navbar-brand navbar-brand-image"> <img src="{f:uri.image(src: logoFile)}" height="{logoHeight}" width="{logoWidth}" /> </f:link.page> </f:then> <f:else> <f:link.page pageUid="{rootPage}" class="navbar-brand">{siteTitle}</f:link.page> </f:else> </f:if> + <f:if condition="{f:cObject(typoscriptObjectPath:'lib.navigation.main')}"> <button type="button" class="navbar-toggle navbar-toggle-menu" data-toggle="collapse" data-target=".navbar-collapse"> <span class="glyphicon glyphicon-list"></span> <span class="sr-only">Toggle navigation</span> </button> + </f:if> <span class="navbar-header-border-bottom"></span> </div> <div class="navbar-collapse collapse"> <f:cObject typoscriptObjectPath="lib.navigation.main" /> </div> </div> </div>
2
0.083333
2
0
1447b3ab9f7bd23a681f5620206bab75e47f4f27
.travis.yml
.travis.yml
language: elixir env: global: - ORIENTDB_USER=root - ORIENTDB_PASS=root matrix: - ORIENTDB_VERSION="2.1-rc6" elixir: - 1.0.5 otp_release: - 17.5 - 18.0 before_install: - chmod +x ./ci/ci.sh - ./ci/ci.sh - export PATH="$(pwd)/tmp:$PATH" script: - mix test.all
language: elixir env: global: - ORIENTDB_USER=root - ORIENTDB_PASS=root matrix: - ORIENTDB_VERSION="2.0.12" - ORIENTDB_VERSION="2.0.13" - ORIENTDB_VERSION="2.1.0" elixir: - 1.0.5 otp_release: - 17.5 - 18.0 before_install: - chmod +x ./ci/ci.sh - ./ci/ci.sh - export PATH="$(pwd)/tmp:$PATH" script: - mix test.all
Test 2.0.12, 2.0.13 and 2.1.0 on Travis
Test 2.0.12, 2.0.13 and 2.1.0 on Travis
YAML
apache-2.0
MyMedsAndMe/marco_polo
yaml
## Code Before: language: elixir env: global: - ORIENTDB_USER=root - ORIENTDB_PASS=root matrix: - ORIENTDB_VERSION="2.1-rc6" elixir: - 1.0.5 otp_release: - 17.5 - 18.0 before_install: - chmod +x ./ci/ci.sh - ./ci/ci.sh - export PATH="$(pwd)/tmp:$PATH" script: - mix test.all ## Instruction: Test 2.0.12, 2.0.13 and 2.1.0 on Travis ## Code After: language: elixir env: global: - ORIENTDB_USER=root - ORIENTDB_PASS=root matrix: - ORIENTDB_VERSION="2.0.12" - ORIENTDB_VERSION="2.0.13" - ORIENTDB_VERSION="2.1.0" elixir: - 1.0.5 otp_release: - 17.5 - 18.0 before_install: - chmod +x ./ci/ci.sh - ./ci/ci.sh - export PATH="$(pwd)/tmp:$PATH" script: - mix test.all
language: elixir env: global: - ORIENTDB_USER=root - ORIENTDB_PASS=root matrix: + - ORIENTDB_VERSION="2.0.12" + - ORIENTDB_VERSION="2.0.13" - - ORIENTDB_VERSION="2.1-rc6" ? ^^^^ + - ORIENTDB_VERSION="2.1.0" ? ^^ elixir: - 1.0.5 otp_release: - 17.5 - 18.0 before_install: - chmod +x ./ci/ci.sh - ./ci/ci.sh - export PATH="$(pwd)/tmp:$PATH" script: - mix test.all
4
0.173913
3
1
c24c76b4169976b76d9a5260e8e4c907d1c90161
app/controllers/terms_controller.rb
app/controllers/terms_controller.rb
class TermsController < ApplicationController def index end def accept current_user.person.accept! end def decline redirect_to signout_path end end
class TermsController < ApplicationController def index end def accept current_user.person.accept! end def decline current_user.destroy redirect_to signout_path end end
Destroy user if not agreed to terms
Destroy user if not agreed to terms
Ruby
unlicense
muhumar99/sharedearth,sharedearth-net/sharedearth-net,sharedearth-net/sharedearth-net,haseeb-ahmad/sharedearth-net,haseeb-ahmad/sharedearth-net,sharedearth-net/sharedearth-net,muhumar99/sharedearth,haseeb-ahmad/sharedearth-net,muhumar99/sharedearth
ruby
## Code Before: class TermsController < ApplicationController def index end def accept current_user.person.accept! end def decline redirect_to signout_path end end ## Instruction: Destroy user if not agreed to terms ## Code After: class TermsController < ApplicationController def index end def accept current_user.person.accept! end def decline current_user.destroy redirect_to signout_path end end
class TermsController < ApplicationController def index end def accept current_user.person.accept! end def decline + current_user.destroy redirect_to signout_path end end
1
0.076923
1
0
0f753f67c48b02b4ee7fdb67a416a5cc86f66e0b
LennardJones.py
LennardJones.py
from fluid import LJContainer NUM_PARTICLES = 108 TIME_STEP = 0.001 class LennardJones: def __init__(self, density, temperature): #Initialize the container container = LJContainer() #Equilibriate the system #Start measuring while self.t < run_length: #Calculate the forces #Integrate equations of motion t += TIME_STEP #Sample averages #Generate a plot of the energies (kinetic, potential, total) if __name__ == "__main__": LennardJones()
from fluid import LJContainer PARTICLES = 108.0 TEMPERATURE = 2.0 DENSITY = 1.0 TIME_STEP = 0.001 STEPS = 2000 class LennardJones: _t = 0 def __init__(self): #Initialize the container container = LJContainer(PARTICLES, DENSITY, TEMPERATURE) #Equilibriate the system #Start measuring while self._t < STEPS: #Calculate the forces #Integrate equations of motion self._t += TIME_STEP #Sample averages #Generate a plot of the energies (kinetic, potential, total) if __name__ == "__main__": LennardJones()
Modify simulation to use global parameters
Modify simulation to use global parameters
Python
mit
hkaju/LennardJones,hkaju/LennardJones,hkaju/LennardJones
python
## Code Before: from fluid import LJContainer NUM_PARTICLES = 108 TIME_STEP = 0.001 class LennardJones: def __init__(self, density, temperature): #Initialize the container container = LJContainer() #Equilibriate the system #Start measuring while self.t < run_length: #Calculate the forces #Integrate equations of motion t += TIME_STEP #Sample averages #Generate a plot of the energies (kinetic, potential, total) if __name__ == "__main__": LennardJones() ## Instruction: Modify simulation to use global parameters ## Code After: from fluid import LJContainer PARTICLES = 108.0 TEMPERATURE = 2.0 DENSITY = 1.0 TIME_STEP = 0.001 STEPS = 2000 class LennardJones: _t = 0 def __init__(self): #Initialize the container container = LJContainer(PARTICLES, DENSITY, TEMPERATURE) #Equilibriate the system #Start measuring while self._t < STEPS: #Calculate the forces #Integrate equations of motion self._t += TIME_STEP #Sample averages #Generate a plot of the energies (kinetic, potential, total) if __name__ == "__main__": LennardJones()
+ from fluid import LJContainer - NUM_PARTICLES = 108 ? ---- + PARTICLES = 108.0 ? ++ + TEMPERATURE = 2.0 + DENSITY = 1.0 TIME_STEP = 0.001 + STEPS = 2000 class LennardJones: - def __init__(self, density, temperature): + _t = 0 + + def __init__(self): #Initialize the container - container = LJContainer() + container = LJContainer(PARTICLES, DENSITY, TEMPERATURE) #Equilibriate the system #Start measuring - while self.t < run_length: ? ^^^^^^^^^^ + while self._t < STEPS: ? + ^^^^^ #Calculate the forces #Integrate equations of motion - t += TIME_STEP + self._t += TIME_STEP ? ++++++ #Sample averages #Generate a plot of the energies (kinetic, potential, total) if __name__ == "__main__": LennardJones()
16
0.761905
11
5
b981ad885a6f4e0a79506451157c1459141320f5
exception_handling_3.c
exception_handling_3.c
/* * Author: NagaChaitanya Vellanki * * TRY/THROW/CATCH/FINALLY - example * Reference: http://www.di.unipi.it/~nids/docs/longjump_try_trow_catch.html * */ #include <stdio.h> #include <stdlib.h> #include <setjmp.h> #define FOO_EXCEPTION (1) #define BAR_EXCEPTION (2) #define GOO_EXCEPTION (3) #define TRY do{ jmp_buf env; switch(setjmp(env)) { case 0: while(1) { #define CATCH(exception) break; case exception: #define FINALLY break; } default: #define END_TRY } }while(0) #define THROW(exception) longjmp(env, exception) int main(int argc, char *argv[]) { TRY { printf("In TRY statement\n"); THROW(GOO_EXCEPTION); printf("not reachable\n"); } CATCH(FOO_EXCEPTION) { printf("FOO exception caught\n"); } CATCH(BAR_EXCEPTION) { printf("BAR exception caught\n"); } CATCH(GOO_EXCEPTION) { printf("GOO exception caught\n"); } FINALLY { printf("Finally \n"); } END_TRY; exit(EXIT_SUCCESS); }
/* * Author: NagaChaitanya Vellanki * * TRY/THROW/CATCH/FINALLY - example * Reference: http://www.di.unipi.it/~nids/docs/longjump_try_trow_catch.html * * use gcc -E -P exception_handling_3.c to see the result of the preprocessing * step */ #include <stdio.h> #include <stdlib.h> #include <setjmp.h> #define FOO_EXCEPTION (1) #define BAR_EXCEPTION (2) #define GOO_EXCEPTION (3) #define TRY do{ jmp_buf env; switch(setjmp(env)) { case 0: while(1) { #define CATCH(exception) break; case exception: #define FINALLY break; } default: #define END_TRY } }while(0) #define THROW(exception) longjmp(env, exception) int main(int argc, char *argv[]) { TRY { printf("In TRY statement\n"); THROW(GOO_EXCEPTION); printf("not reachable\n"); } CATCH(FOO_EXCEPTION) { printf("FOO exception caught\n"); } CATCH(BAR_EXCEPTION) { printf("BAR exception caught\n"); } CATCH(GOO_EXCEPTION) { printf("GOO exception caught\n"); } FINALLY { printf("Finally \n"); } END_TRY; exit(EXIT_SUCCESS); }
Add command to see output of preprocessor
Add command to see output of preprocessor
C
isc
chaitanyav/cprograms,chaitanyav/cprograms
c
## Code Before: /* * Author: NagaChaitanya Vellanki * * TRY/THROW/CATCH/FINALLY - example * Reference: http://www.di.unipi.it/~nids/docs/longjump_try_trow_catch.html * */ #include <stdio.h> #include <stdlib.h> #include <setjmp.h> #define FOO_EXCEPTION (1) #define BAR_EXCEPTION (2) #define GOO_EXCEPTION (3) #define TRY do{ jmp_buf env; switch(setjmp(env)) { case 0: while(1) { #define CATCH(exception) break; case exception: #define FINALLY break; } default: #define END_TRY } }while(0) #define THROW(exception) longjmp(env, exception) int main(int argc, char *argv[]) { TRY { printf("In TRY statement\n"); THROW(GOO_EXCEPTION); printf("not reachable\n"); } CATCH(FOO_EXCEPTION) { printf("FOO exception caught\n"); } CATCH(BAR_EXCEPTION) { printf("BAR exception caught\n"); } CATCH(GOO_EXCEPTION) { printf("GOO exception caught\n"); } FINALLY { printf("Finally \n"); } END_TRY; exit(EXIT_SUCCESS); } ## Instruction: Add command to see output of preprocessor ## Code After: /* * Author: NagaChaitanya Vellanki * * TRY/THROW/CATCH/FINALLY - example * Reference: http://www.di.unipi.it/~nids/docs/longjump_try_trow_catch.html * * use gcc -E -P exception_handling_3.c to see the result of the preprocessing * step */ #include <stdio.h> #include <stdlib.h> #include <setjmp.h> #define FOO_EXCEPTION (1) #define BAR_EXCEPTION (2) #define GOO_EXCEPTION (3) #define TRY do{ jmp_buf env; switch(setjmp(env)) { case 0: while(1) { #define CATCH(exception) break; case exception: #define FINALLY break; } default: #define END_TRY } }while(0) #define THROW(exception) longjmp(env, exception) int main(int argc, char *argv[]) { TRY { printf("In TRY statement\n"); THROW(GOO_EXCEPTION); printf("not reachable\n"); } CATCH(FOO_EXCEPTION) { printf("FOO exception caught\n"); } CATCH(BAR_EXCEPTION) { printf("BAR exception caught\n"); } CATCH(GOO_EXCEPTION) { printf("GOO exception caught\n"); } FINALLY { printf("Finally \n"); } END_TRY; exit(EXIT_SUCCESS); }
/* * Author: NagaChaitanya Vellanki * * TRY/THROW/CATCH/FINALLY - example * Reference: http://www.di.unipi.it/~nids/docs/longjump_try_trow_catch.html * + * use gcc -E -P exception_handling_3.c to see the result of the preprocessing + * step */ #include <stdio.h> #include <stdlib.h> #include <setjmp.h> #define FOO_EXCEPTION (1) #define BAR_EXCEPTION (2) #define GOO_EXCEPTION (3) #define TRY do{ jmp_buf env; switch(setjmp(env)) { case 0: while(1) { #define CATCH(exception) break; case exception: #define FINALLY break; } default: #define END_TRY } }while(0) #define THROW(exception) longjmp(env, exception) int main(int argc, char *argv[]) { TRY { printf("In TRY statement\n"); THROW(GOO_EXCEPTION); printf("not reachable\n"); } CATCH(FOO_EXCEPTION) { printf("FOO exception caught\n"); } CATCH(BAR_EXCEPTION) { printf("BAR exception caught\n"); } CATCH(GOO_EXCEPTION) { printf("GOO exception caught\n"); } FINALLY { printf("Finally \n"); } END_TRY; exit(EXIT_SUCCESS); }
2
0.043478
2
0
a61e3c6e84a5f54176faebb86c7dffb332e70ea9
POLUtils/Translators.txt
POLUtils/Translators.txt
The various translations of POLUtils are provided by the following people: Language State Translator ---------- ------------------------- ------------------------------------- Dutch Installer Only Pebbles French Installer Only Kapibara from Phoenix German Full Andy Müller (Missingno from Fairy) Spanish Installer Only Kapibara from Phoenix
The various translations of POLUtils are provided by the following people: Language Installer Main Program Translator ---------- --------- ------------ ------------------------------------- Dutch Yes No Pebbles French Yes In Progress Kapibara from Phoenix German Yes Partial Andy Müller (Missingno from Fairy) Spanish Yes In Progress Kapibara from Phoenix If you want to contribute a translation not listed above, let me know at [email protected]!
Split up status info (translator vs main program).
Split up status info (translator vs main program).
Text
apache-2.0
Zastai/POLUtils
text
## Code Before: The various translations of POLUtils are provided by the following people: Language State Translator ---------- ------------------------- ------------------------------------- Dutch Installer Only Pebbles French Installer Only Kapibara from Phoenix German Full Andy Müller (Missingno from Fairy) Spanish Installer Only Kapibara from Phoenix ## Instruction: Split up status info (translator vs main program). ## Code After: The various translations of POLUtils are provided by the following people: Language Installer Main Program Translator ---------- --------- ------------ ------------------------------------- Dutch Yes No Pebbles French Yes In Progress Kapibara from Phoenix German Yes Partial Andy Müller (Missingno from Fairy) Spanish Yes In Progress Kapibara from Phoenix If you want to contribute a translation not listed above, let me know at [email protected]!
The various translations of POLUtils are provided by the following people: - Language State Translator + Language Installer Main Program Translator - ---------- ------------------------- ------------------------------------- ? ^^^^ + ---------- --------- ------------ ------------------------------------- ? ^ - Dutch Installer Only Pebbles ? ^^ ------ ---- + Dutch Yes No Pebbles ? ^^ +++++++ - French Installer Only Kapibara from Phoenix ? ^^ ----------- ^^ + French Yes In Progress Kapibara from Phoenix ? ^^ ++ ^^^^^^^^ - German Full Andy Müller (Missingno from Fairy) ? ^^^^ ^^^^^^^^^ + German Yes Partial Andy Müller (Missingno from Fairy) ? ^^^ ^^^^^^^ - Spanish Installer Only Kapibara from Phoenix ? ^^ ----------- ^^ + Spanish Yes In Progress Kapibara from Phoenix ? ^^ ++ ^^^^^^^^ + + If you want to contribute a translation not listed above, let me know at + [email protected]!
15
1.875
9
6
d862d8fb835d78cbe6fddd4ef7946ec682ac3de2
manifest.yml
manifest.yml
--- applications: - name: change-me memory: 512M buildpack: java_buildpack env: JBP_CONFIG_JAVA_MAIN: '{ arguments: "server paas.yaml" }' services: - change-me-db env: REGISTER: change-me REGISTER_DOMAIN: change-me.cloudapps.digital USER: change-me PASSWORD: change-me
--- applications: - name: change-me memory: 512M buildpack: java_buildpack services: - change-me-db env: JBP_CONFIG_JAVA_MAIN: '{ arguments: "server paas.yaml" }' REGISTER: change-me REGISTER_DOMAIN: change-me.cloudapps.digital USER: change-me PASSWORD: change-me
Fix setting of java main command line arguments
Fix setting of java main command line arguments We were setting `env` twice in this configuration. The definition later was overriding the former and deploys failed.
YAML
mit
openregister/openregister-java,openregister/openregister-java,openregister/openregister-java,openregister/openregister-java,openregister/openregister-java
yaml
## Code Before: --- applications: - name: change-me memory: 512M buildpack: java_buildpack env: JBP_CONFIG_JAVA_MAIN: '{ arguments: "server paas.yaml" }' services: - change-me-db env: REGISTER: change-me REGISTER_DOMAIN: change-me.cloudapps.digital USER: change-me PASSWORD: change-me ## Instruction: Fix setting of java main command line arguments We were setting `env` twice in this configuration. The definition later was overriding the former and deploys failed. ## Code After: --- applications: - name: change-me memory: 512M buildpack: java_buildpack services: - change-me-db env: JBP_CONFIG_JAVA_MAIN: '{ arguments: "server paas.yaml" }' REGISTER: change-me REGISTER_DOMAIN: change-me.cloudapps.digital USER: change-me PASSWORD: change-me
--- applications: - name: change-me memory: 512M buildpack: java_buildpack - env: - JBP_CONFIG_JAVA_MAIN: '{ arguments: "server paas.yaml" }' services: - change-me-db env: + JBP_CONFIG_JAVA_MAIN: '{ arguments: "server paas.yaml" }' REGISTER: change-me REGISTER_DOMAIN: change-me.cloudapps.digital USER: change-me PASSWORD: change-me
3
0.214286
1
2
1db2efa600f02b80a385cfe913532ba24c61a93a
package.json
package.json
{ "name": "bridge21-BWS-Starter", "version": "0.0.1", "description": "bridge21-BWS-starter node dependencies", "dependencies": { "public": "git+https://github.com/bridge21/bitcore-wallet-service.git#master" }, "repository": { "type": "git", "url": "https://github.com/bridge21/bws-starter" }, "homepage": "https://github.com/bridge21/bws-starter", "scripts": { "start": "./start.sh" } }
{ "name": "bridge21-BWS-Starter", "version": "0.0.1", "description": "bridge21-BWS-starter node dependencies", "dependencies": { "public": "git+https://github.com/bridge21/bitcore-wallet-service.git#watch-only-endpoints" }, "repository": { "type": "git", "url": "https://github.com/bridge21/bws-starter" }, "homepage": "https://github.com/bridge21/bws-starter", "scripts": { "start": "./start.sh" } }
Switch to the watch-only-endpoints branch
Switch to the watch-only-endpoints branch
JSON
mpl-2.0
Tectract/bws-starter
json
## Code Before: { "name": "bridge21-BWS-Starter", "version": "0.0.1", "description": "bridge21-BWS-starter node dependencies", "dependencies": { "public": "git+https://github.com/bridge21/bitcore-wallet-service.git#master" }, "repository": { "type": "git", "url": "https://github.com/bridge21/bws-starter" }, "homepage": "https://github.com/bridge21/bws-starter", "scripts": { "start": "./start.sh" } } ## Instruction: Switch to the watch-only-endpoints branch ## Code After: { "name": "bridge21-BWS-Starter", "version": "0.0.1", "description": "bridge21-BWS-starter node dependencies", "dependencies": { "public": "git+https://github.com/bridge21/bitcore-wallet-service.git#watch-only-endpoints" }, "repository": { "type": "git", "url": "https://github.com/bridge21/bws-starter" }, "homepage": "https://github.com/bridge21/bws-starter", "scripts": { "start": "./start.sh" } }
{ "name": "bridge21-BWS-Starter", "version": "0.0.1", "description": "bridge21-BWS-starter node dependencies", "dependencies": { - "public": "git+https://github.com/bridge21/bitcore-wallet-service.git#master" ? ^ --- - + "public": "git+https://github.com/bridge21/bitcore-wallet-service.git#watch-only-endpoints" ? ^ +++++++++++++++++ }, "repository": { "type": "git", "url": "https://github.com/bridge21/bws-starter" }, "homepage": "https://github.com/bridge21/bws-starter", "scripts": { "start": "./start.sh" } }
2
0.117647
1
1
20111b0cdb4600620bb9f2d8e06d329d4b4c4e79
completions/cd.fish
completions/cd.fish
function __fish_complete_plugin_cd -d "Completions for the plugin-cd command" set -l token (commandline -ct) set -l last_two_char (echo $token | sed 's/.*\(..\)/\1/') if test "$last_two_char" = ".." echo "$token/" else set -l base (echo $token | sed -e 's@^\(.*\)/[^/]*$@\1/@') set -l resolved_path (echo $token | sed -e 's@^\.$@:@;s@^\.\([^\.]\)@:\1@g;s@\([^\.]\)\.$@\1:@g' -e 's@\([^\.]\)\.\([^\.]\)@\1:\2@g' -e 's@\([^\.]\)\.\([^\.]\)@\1:\2@g' -e 's@\.\{2\}\(\.*\)@::\1@g' -e 's@\.@\/\.\.@g' -e 's@:@\.@g') if test -e $resolved_path; and not test -d $resolved_path return else printf "%s\n" (command ls -adp "$resolved_path"* | sed 's|.*/\([^/]*.\)$|\1|' | sed "s|^|$base|") end end end complete -c cd -e complete -f -c cd -a "(__fish_complete_plugin_cd)"
function __fish_complete_plugin_cd -d "Completions for the plugin-cd command" set -l token (commandline -ct) set -l last_two_char (echo $token | sed 's/.*\(..\)/\1/') if test "$last_two_char" = ".." echo "$token/" else set -l base (echo $token | rev | cut -d/ -s -f2- | rev ) test -n $base; and set -l base $base/ set -l resolved_path (echo $token | sed -e 's@^\.$@:@;s@^\.\([^\.]\)@:\1@g;s@\([^\.]\)\.$@\1:@g' -e 's@\([^\.]\)\.\([^\.]\)@\1:\2@g' -e 's@\([^\.]\)\.\([^\.]\)@\1:\2@g' -e 's@\.\{2\}\(\.*\)@::\1@g' -e 's@\.@\/\.\.@g' -e 's@:@\.@g') if test -e $resolved_path; and not test -d $resolved_path return else set -l path_test $resolved_path* if test -n "$path_test" printf "%s\n" (command ls -adp "$resolved_path"* | sed 's|.*/\([^/]*.\)$|\1|' | sed "s|^|$base|") end end end end complete -c cd -e complete -f -c cd -a "(__fish_complete_plugin_cd)"
Fix the complete error when file not exist
Fix the complete error when file not exist
fish
mit
oh-my-fish/plugin-cd
fish
## Code Before: function __fish_complete_plugin_cd -d "Completions for the plugin-cd command" set -l token (commandline -ct) set -l last_two_char (echo $token | sed 's/.*\(..\)/\1/') if test "$last_two_char" = ".." echo "$token/" else set -l base (echo $token | sed -e 's@^\(.*\)/[^/]*$@\1/@') set -l resolved_path (echo $token | sed -e 's@^\.$@:@;s@^\.\([^\.]\)@:\1@g;s@\([^\.]\)\.$@\1:@g' -e 's@\([^\.]\)\.\([^\.]\)@\1:\2@g' -e 's@\([^\.]\)\.\([^\.]\)@\1:\2@g' -e 's@\.\{2\}\(\.*\)@::\1@g' -e 's@\.@\/\.\.@g' -e 's@:@\.@g') if test -e $resolved_path; and not test -d $resolved_path return else printf "%s\n" (command ls -adp "$resolved_path"* | sed 's|.*/\([^/]*.\)$|\1|' | sed "s|^|$base|") end end end complete -c cd -e complete -f -c cd -a "(__fish_complete_plugin_cd)" ## Instruction: Fix the complete error when file not exist ## Code After: function __fish_complete_plugin_cd -d "Completions for the plugin-cd command" set -l token (commandline -ct) set -l last_two_char (echo $token | sed 's/.*\(..\)/\1/') if test "$last_two_char" = ".." echo "$token/" else set -l base (echo $token | rev | cut -d/ -s -f2- | rev ) test -n $base; and set -l base $base/ set -l resolved_path (echo $token | sed -e 's@^\.$@:@;s@^\.\([^\.]\)@:\1@g;s@\([^\.]\)\.$@\1:@g' -e 's@\([^\.]\)\.\([^\.]\)@\1:\2@g' -e 's@\([^\.]\)\.\([^\.]\)@\1:\2@g' -e 's@\.\{2\}\(\.*\)@::\1@g' -e 's@\.@\/\.\.@g' -e 's@:@\.@g') if test -e $resolved_path; and not test -d $resolved_path return else set -l path_test $resolved_path* if test -n "$path_test" printf "%s\n" (command ls -adp "$resolved_path"* | sed 's|.*/\([^/]*.\)$|\1|' | sed "s|^|$base|") end end end end complete -c cd -e complete -f -c cd -a "(__fish_complete_plugin_cd)"
function __fish_complete_plugin_cd -d "Completions for the plugin-cd command" set -l token (commandline -ct) set -l last_two_char (echo $token | sed 's/.*\(..\)/\1/') if test "$last_two_char" = ".." echo "$token/" else - set -l base (echo $token | sed -e 's@^\(.*\)/[^/]*$@\1/@') + set -l base (echo $token | rev | cut -d/ -s -f2- | rev ) + test -n $base; and set -l base $base/ set -l resolved_path (echo $token | sed -e 's@^\.$@:@;s@^\.\([^\.]\)@:\1@g;s@\([^\.]\)\.$@\1:@g' -e 's@\([^\.]\)\.\([^\.]\)@\1:\2@g' -e 's@\([^\.]\)\.\([^\.]\)@\1:\2@g' -e 's@\.\{2\}\(\.*\)@::\1@g' -e 's@\.@\/\.\.@g' -e 's@:@\.@g') if test -e $resolved_path; and not test -d $resolved_path return else + set -l path_test $resolved_path* + if test -n "$path_test" - printf "%s\n" (command ls -adp "$resolved_path"* | sed 's|.*/\([^/]*.\)$|\1|' | sed "s|^|$base|") + printf "%s\n" (command ls -adp "$resolved_path"* | sed 's|.*/\([^/]*.\)$|\1|' | sed "s|^|$base|") ? ++ + end end end end complete -c cd -e complete -f -c cd -a "(__fish_complete_plugin_cd)"
8
0.421053
6
2
eca69d314c990f7523742277cd104ef5371a49d2
test/dummy/app/assets/javascripts/application.js
test/dummy/app/assets/javascripts/application.js
// This is a manifest file that'll be compiled into including all the files listed below. // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically // be included in the compiled file accessible from http://example.com/assets/application.js // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // the compiled file. // //= require jquery //= require jquery_ujs //= require_tree .
// This is a manifest file that'll be compiled into including all the files listed below. // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically // be included in the compiled file accessible from http://example.com/assets/application.js // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // the compiled file. // //= require_tree .
Remove jQuery from the assets
Remove jQuery from the assets
JavaScript
mit
Soluciones/kpi,Soluciones/kpi,Soluciones/kpi
javascript
## Code Before: // This is a manifest file that'll be compiled into including all the files listed below. // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically // be included in the compiled file accessible from http://example.com/assets/application.js // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // the compiled file. // //= require jquery //= require jquery_ujs //= require_tree . ## Instruction: Remove jQuery from the assets ## Code After: // This is a manifest file that'll be compiled into including all the files listed below. // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically // be included in the compiled file accessible from http://example.com/assets/application.js // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // the compiled file. // //= require_tree .
// This is a manifest file that'll be compiled into including all the files listed below. // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically // be included in the compiled file accessible from http://example.com/assets/application.js // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // the compiled file. // - //= require jquery - //= require jquery_ujs //= require_tree .
2
0.222222
0
2
9b01745d00c92991a1f03ca6ca9b232ddf5ef11c
app/Resources/views/vstu.phtml
app/Resources/views/vstu.phtml
<? /** @var Application $this */ /** @var array $context */ ?> <? $anotherLang = $this->getCurrentLanguage() == 'ru' ? 'en' : 'ru'?> <h1><?= $this->translate('vstu_header') ?> <small><a href="/change-lang.php?lang=<?= $anotherLang ?>"><?= strtoupper($anotherLang) ?></a></small></h1> <? $total = 0 ?> <? foreach ($context['publications'] as $year => $list): ?> <h3><?= $year ?></h3> <ol> <? foreach ($list as $item): ?> <li><?= isset($item[$this->getCurrentLanguage()]) ? $item[$this->getCurrentLanguage()] : '-' ?></li> <? $total++ ?> <? endforeach ?> </ol> <? endforeach ?> <h3><?= $this->translate('Total') ?>: <big><?= $total ?></big></h3> <a href="https://elibrary.ru/author_counter_click.asp?id=<?= $this->getConfig('elibrary_id') ?>" target=_blank> <img src="https://elibrary.ru/author_counter.aspx?id=<?= $this->getConfig('elibrary_id') ?>" title="<?= $this->translate('elibrary_link') ?>" border="0" height="31" width="88"> </a>
<? /** @var Application $this */ /** @var array $context */ ?> <!DOCTYPE html> <html lang="<?= $this->getCurrentLanguage() ?>"> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta charset="UTF-8"> <meta name="author" content="Dmitry V. Romanov"> <title><?= $this->translate('vstu_header') ?></title> <style>h1, footer { text-align: center; }</style> </head> <body> <? $anotherLang = $this->getCurrentLanguage() == 'ru' ? 'en' : 'ru'?> <h1><?= $this->translate('vstu_header') ?> <small><a href="/change-lang.php?lang=<?= $anotherLang ?>"><?= strtoupper($anotherLang) ?></a></small></h1> <? $total = 0 ?> <? foreach ($context['publications'] as $year => $list): ?> <h3><?= $year ?></h3> <ol> <? foreach ($list as $item): ?> <li><?= isset($item[$this->getCurrentLanguage()]) ? $item[$this->getCurrentLanguage()] : '-' ?></li> <? $total++ ?> <? endforeach ?> </ol> <? endforeach ?> <h3><?= $this->translate('Total') ?>: <big><?= $total ?></big></h3> <footer> <a href="https://elibrary.ru/author_counter_click.asp?id=<?= $this->getConfig('elibrary_id') ?>" target=_blank> <img src="https://elibrary.ru/author_counter.aspx?id=<?= $this->getConfig('elibrary_id') ?>" title="<?= $this->translate('elibrary_link') ?>" border="0" height="31" width="88"> </a> </footer> </body>
Add title and center for page
Add title and center for page
HTML+PHP
mit
fortSQ/portfolio,fortSQ/portfolio,fortSQ/portfolio
html+php
## Code Before: <? /** @var Application $this */ /** @var array $context */ ?> <? $anotherLang = $this->getCurrentLanguage() == 'ru' ? 'en' : 'ru'?> <h1><?= $this->translate('vstu_header') ?> <small><a href="/change-lang.php?lang=<?= $anotherLang ?>"><?= strtoupper($anotherLang) ?></a></small></h1> <? $total = 0 ?> <? foreach ($context['publications'] as $year => $list): ?> <h3><?= $year ?></h3> <ol> <? foreach ($list as $item): ?> <li><?= isset($item[$this->getCurrentLanguage()]) ? $item[$this->getCurrentLanguage()] : '-' ?></li> <? $total++ ?> <? endforeach ?> </ol> <? endforeach ?> <h3><?= $this->translate('Total') ?>: <big><?= $total ?></big></h3> <a href="https://elibrary.ru/author_counter_click.asp?id=<?= $this->getConfig('elibrary_id') ?>" target=_blank> <img src="https://elibrary.ru/author_counter.aspx?id=<?= $this->getConfig('elibrary_id') ?>" title="<?= $this->translate('elibrary_link') ?>" border="0" height="31" width="88"> </a> ## Instruction: Add title and center for page ## Code After: <? /** @var Application $this */ /** @var array $context */ ?> <!DOCTYPE html> <html lang="<?= $this->getCurrentLanguage() ?>"> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta charset="UTF-8"> <meta name="author" content="Dmitry V. Romanov"> <title><?= $this->translate('vstu_header') ?></title> <style>h1, footer { text-align: center; }</style> </head> <body> <? $anotherLang = $this->getCurrentLanguage() == 'ru' ? 'en' : 'ru'?> <h1><?= $this->translate('vstu_header') ?> <small><a href="/change-lang.php?lang=<?= $anotherLang ?>"><?= strtoupper($anotherLang) ?></a></small></h1> <? $total = 0 ?> <? foreach ($context['publications'] as $year => $list): ?> <h3><?= $year ?></h3> <ol> <? foreach ($list as $item): ?> <li><?= isset($item[$this->getCurrentLanguage()]) ? $item[$this->getCurrentLanguage()] : '-' ?></li> <? $total++ ?> <? endforeach ?> </ol> <? endforeach ?> <h3><?= $this->translate('Total') ?>: <big><?= $total ?></big></h3> <footer> <a href="https://elibrary.ru/author_counter_click.asp?id=<?= $this->getConfig('elibrary_id') ?>" target=_blank> <img src="https://elibrary.ru/author_counter.aspx?id=<?= $this->getConfig('elibrary_id') ?>" title="<?= $this->translate('elibrary_link') ?>" border="0" height="31" width="88"> </a> </footer> </body>
<? /** @var Application $this */ /** @var array $context */ ?> + + <!DOCTYPE html> + <html lang="<?= $this->getCurrentLanguage() ?>"> + <head> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta charset="UTF-8"> + <meta name="author" content="Dmitry V. Romanov"> + <title><?= $this->translate('vstu_header') ?></title> + <style>h1, footer { text-align: center; }</style> + </head> + <body> <? $anotherLang = $this->getCurrentLanguage() == 'ru' ? 'en' : 'ru'?> <h1><?= $this->translate('vstu_header') ?> <small><a href="/change-lang.php?lang=<?= $anotherLang ?>"><?= strtoupper($anotherLang) ?></a></small></h1> <? $total = 0 ?> <? foreach ($context['publications'] as $year => $list): ?> <h3><?= $year ?></h3> <ol> <? foreach ($list as $item): ?> <li><?= isset($item[$this->getCurrentLanguage()]) ? $item[$this->getCurrentLanguage()] : '-' ?></li> <? $total++ ?> <? endforeach ?> </ol> <? endforeach ?> <h3><?= $this->translate('Total') ?>: <big><?= $total ?></big></h3> + <footer> - <a href="https://elibrary.ru/author_counter_click.asp?id=<?= $this->getConfig('elibrary_id') ?>" target=_blank> + <a href="https://elibrary.ru/author_counter_click.asp?id=<?= $this->getConfig('elibrary_id') ?>" target=_blank> ? ++++ - <img src="https://elibrary.ru/author_counter.aspx?id=<?= $this->getConfig('elibrary_id') ?>" title="<?= $this->translate('elibrary_link') ?>" border="0" height="31" width="88"> + <img src="https://elibrary.ru/author_counter.aspx?id=<?= $this->getConfig('elibrary_id') ?>" title="<?= $this->translate('elibrary_link') ?>" border="0" height="31" width="88"> ? ++++ - </a> + </a> + </footer> + + </body>
21
0.875
18
3
1847eeeaab18706b8b00e765250fabccbb227502
src/Bibliotheca.Client.Web/src/app/pages/logs/logs.page.html
src/Bibliotheca.Client.Web/src/app/pages/logs/logs.page.html
<!-- Header --> <app-header></app-header> <!-- Left sidebar --> <app-settings-menu active="projects"></app-settings-menu> <!-- Content Wrapper --> <div class="content-wrapper" style="min-height: 1126px;"> <!-- Main content --> <section class="content"> <!-- Start: actions --> <div class="box box-solid"> <div class="box-body"> <a [routerLink]="['/projects']" type="submit" class="btn btn-default btn-sm btn-flat">Back</a> </div> </div> <!-- End: actions --> <!-- Content --> <div class="box box-info"> <div class="box-header with-border"> <h3 class="box-title">Logs</h3> <div class="pull-right"> <button (click)="refresh()" type="button" class="btn btn-default">Refresh</button> </div> <div class="clearfix"></div> </div> <div class="box-body table-responsive no-padding"> <textarea readonly="readonly" style="margin: 20px; border: 0px; width: 80%; min-height: 600px;"> {{ logs.message }} </textarea> </div> </div> <!-- End Content --> </section> </div> <!-- Footer --> <app-footer></app-footer>
<!-- Header --> <app-header></app-header> <!-- Left sidebar --> <app-settings-menu active="projects"></app-settings-menu> <!-- Content Wrapper --> <div class="content-wrapper" style="min-height: 1126px;"> <!-- Main content --> <section class="content"> <!-- Start: actions --> <div class="box box-solid"> <div class="box-body"> <a [routerLink]="['/projects']" type="submit" class="btn btn-default btn-sm btn-flat">Back</a> </div> </div> <!-- End: actions --> <!-- Content --> <div class="box box-info"> <div class="box-header with-border"> <h3 class="box-title">Logs</h3> <div class="pull-right"> <button (click)="refresh()" type="button" class="btn btn-default">Refresh</button> </div> <div class="clearfix"></div> </div> <div class="box-body"> <textarea *ngIf="logs.message !== ''" readonly="readonly" style="border: 0px; width: 100%; min-height: 600px;">{{ logs.message }}</textarea> <div style="text-align: center; font-style: italic;" *ngIf="logs.message === ''">Log file is empty.</div> </div> </div> <!-- End Content --> </section> </div> <!-- Footer --> <app-footer></app-footer>
Add information about empty log file.
Add information about empty log file.
HTML
mit
BibliothecaTeam/Bibliotheca.Client,BibliothecaTeam/Bibliotheca.Client,BibliothecaTeam/Bibliotheca.Client
html
## Code Before: <!-- Header --> <app-header></app-header> <!-- Left sidebar --> <app-settings-menu active="projects"></app-settings-menu> <!-- Content Wrapper --> <div class="content-wrapper" style="min-height: 1126px;"> <!-- Main content --> <section class="content"> <!-- Start: actions --> <div class="box box-solid"> <div class="box-body"> <a [routerLink]="['/projects']" type="submit" class="btn btn-default btn-sm btn-flat">Back</a> </div> </div> <!-- End: actions --> <!-- Content --> <div class="box box-info"> <div class="box-header with-border"> <h3 class="box-title">Logs</h3> <div class="pull-right"> <button (click)="refresh()" type="button" class="btn btn-default">Refresh</button> </div> <div class="clearfix"></div> </div> <div class="box-body table-responsive no-padding"> <textarea readonly="readonly" style="margin: 20px; border: 0px; width: 80%; min-height: 600px;"> {{ logs.message }} </textarea> </div> </div> <!-- End Content --> </section> </div> <!-- Footer --> <app-footer></app-footer> ## Instruction: Add information about empty log file. ## Code After: <!-- Header --> <app-header></app-header> <!-- Left sidebar --> <app-settings-menu active="projects"></app-settings-menu> <!-- Content Wrapper --> <div class="content-wrapper" style="min-height: 1126px;"> <!-- Main content --> <section class="content"> <!-- Start: actions --> <div class="box box-solid"> <div class="box-body"> <a [routerLink]="['/projects']" type="submit" class="btn btn-default btn-sm btn-flat">Back</a> </div> </div> <!-- End: actions --> <!-- Content --> <div class="box box-info"> <div class="box-header with-border"> <h3 class="box-title">Logs</h3> <div class="pull-right"> <button (click)="refresh()" type="button" class="btn btn-default">Refresh</button> </div> <div class="clearfix"></div> </div> <div class="box-body"> <textarea *ngIf="logs.message !== ''" readonly="readonly" style="border: 0px; width: 100%; min-height: 600px;">{{ logs.message }}</textarea> <div style="text-align: center; font-style: italic;" *ngIf="logs.message === ''">Log file is empty.</div> </div> </div> <!-- End Content --> </section> </div> <!-- Footer --> <app-footer></app-footer>
<!-- Header --> <app-header></app-header> <!-- Left sidebar --> <app-settings-menu active="projects"></app-settings-menu> <!-- Content Wrapper --> <div class="content-wrapper" style="min-height: 1126px;"> <!-- Main content --> <section class="content"> <!-- Start: actions --> <div class="box box-solid"> <div class="box-body"> <a [routerLink]="['/projects']" type="submit" class="btn btn-default btn-sm btn-flat">Back</a> </div> </div> <!-- End: actions --> <!-- Content --> <div class="box box-info"> <div class="box-header with-border"> <h3 class="box-title">Logs</h3> <div class="pull-right"> <button (click)="refresh()" type="button" class="btn btn-default">Refresh</button> </div> <div class="clearfix"></div> </div> + <div class="box-body"> + <textarea *ngIf="logs.message !== ''" readonly="readonly" style="border: 0px; width: 100%; min-height: 600px;">{{ logs.message }}</textarea> + <div style="text-align: center; font-style: italic;" *ngIf="logs.message === ''">Log file is empty.</div> - <div class="box-body table-responsive no-padding"> - <textarea readonly="readonly" style="margin: 20px; border: 0px; width: 80%; min-height: 600px;"> - {{ logs.message }} - </textarea> </div> </div> <!-- End Content --> </section> </div> <!-- Footer --> <app-footer></app-footer>
7
0.152174
3
4
ce1d516b25b2dfea13fe7a7763ebdd7100a359a0
.github/workflows/ci.yml
.github/workflows/ci.yml
name: CI on: push: branches: ['*'] pull_request: branches: [main] jobs: lint: name: Static code analysis runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Use Node.js uses: actions/setup-node@v3 with: node-version: '16' - name: Install dependencies run: yarn --immutable env: HUSKY: 0 - name: Run tests run: yarn lint unit: name: Unit tests runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Use Node.js uses: actions/setup-node@v3 with: node-version: '16' - name: Install dependencies run: yarn --immutable env: HUSKY: 0 - name: Run tests run: yarn jest
name: CI on: push: branches: ['*'] pull_request: branches: [main] jobs: lint: name: Static code analysis runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Cache .yarn/cache uses: actions/cache@v3 env: cache-name: yarn-cache with: path: .yarn/cache key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-${{ env.cache-name }} - name: Use Node.js uses: actions/setup-node@v3 with: node-version: '16' - name: Install dependencies run: yarn --immutable env: HUSKY: 0 - name: Run tests run: yarn lint unit: name: Unit tests runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Cache .yarn/cache uses: actions/cache@v3 env: cache-name: yarn-cache with: path: .yarn/cache key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-${{ env.cache-name }} - name: Use Node.js uses: actions/setup-node@v3 with: node-version: '16' - name: Install dependencies run: yarn --immutable env: HUSKY: 0 - name: Run tests run: yarn jest
Implement caching Yarn cache in GitHub Actions
Implement caching Yarn cache in GitHub Actions
YAML
mit
wojtekmaj/react-calendar,wojtekmaj/react-calendar,wojtekmaj/react-calendar
yaml
## Code Before: name: CI on: push: branches: ['*'] pull_request: branches: [main] jobs: lint: name: Static code analysis runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Use Node.js uses: actions/setup-node@v3 with: node-version: '16' - name: Install dependencies run: yarn --immutable env: HUSKY: 0 - name: Run tests run: yarn lint unit: name: Unit tests runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Use Node.js uses: actions/setup-node@v3 with: node-version: '16' - name: Install dependencies run: yarn --immutable env: HUSKY: 0 - name: Run tests run: yarn jest ## Instruction: Implement caching Yarn cache in GitHub Actions ## Code After: name: CI on: push: branches: ['*'] pull_request: branches: [main] jobs: lint: name: Static code analysis runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Cache .yarn/cache uses: actions/cache@v3 env: cache-name: yarn-cache with: path: .yarn/cache key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-${{ env.cache-name }} - name: Use Node.js uses: actions/setup-node@v3 with: node-version: '16' - name: Install dependencies run: yarn --immutable env: HUSKY: 0 - name: Run tests run: yarn lint unit: name: Unit tests runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Cache .yarn/cache uses: actions/cache@v3 env: cache-name: yarn-cache with: path: .yarn/cache key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-${{ env.cache-name }} - name: Use Node.js uses: actions/setup-node@v3 with: node-version: '16' - name: Install dependencies run: yarn --immutable env: HUSKY: 0 - name: Run tests run: yarn jest
name: CI on: push: branches: ['*'] pull_request: branches: [main] jobs: lint: name: Static code analysis runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 + + - name: Cache .yarn/cache + uses: actions/cache@v3 + env: + cache-name: yarn-cache + with: + path: .yarn/cache + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-${{ env.cache-name }} - name: Use Node.js uses: actions/setup-node@v3 with: node-version: '16' - name: Install dependencies run: yarn --immutable env: HUSKY: 0 - name: Run tests run: yarn lint unit: name: Unit tests runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 + - name: Cache .yarn/cache + uses: actions/cache@v3 + env: + cache-name: yarn-cache + with: + path: .yarn/cache + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-${{ env.cache-name }} + - name: Use Node.js uses: actions/setup-node@v3 with: node-version: '16' - name: Install dependencies run: yarn --immutable env: HUSKY: 0 - name: Run tests run: yarn jest
20
0.392157
20
0
4772bdf0feca0f1cd1e356a43c621fd3642e466b
test/test_helper.rb
test/test_helper.rb
require "rails/all" require "measured" require "measured-rails" require "minitest/autorun" require "minitest/reporters" require "mocha/setup" require "pry" unless ENV["CI"] require File.expand_path("../dummy/config/environment", __FILE__) ActiveSupport.test_order = :random Minitest::Reporters.use! [Minitest::Reporters::ProgressReporter.new(color: true)] class ActiveSupport::TestCase def reset_db ActiveRecord::Base.subclasses.each do |model| model.delete_all end end end ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:" load File.dirname(__FILE__) + '/dummy/db/schema.rb'
require "rails/all" require "measured" require "measured-rails" require "minitest/autorun" require "minitest/reporters" require "mocha/setup" require "pry" unless ENV["CI"] require File.expand_path("../dummy/config/environment", __FILE__) ActiveSupport.test_order = :random # Prevent two reporters from printing # https://github.com/kern/minitest-reporters/issues/230 # https://github.com/rails/rails/issues/30491 Minitest.load_plugins Minitest.extensions.delete('rails') Minitest.extensions.unshift('rails') Minitest::Reporters.use! [Minitest::Reporters::ProgressReporter.new(color: true)] class ActiveSupport::TestCase def reset_db ActiveRecord::Base.subclasses.each do |model| model.delete_all end end end ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:" load File.dirname(__FILE__) + '/dummy/db/schema.rb'
Work around double test reporters from rails.
Work around double test reporters from rails.
Ruby
mit
Shopify/measured-rails
ruby
## Code Before: require "rails/all" require "measured" require "measured-rails" require "minitest/autorun" require "minitest/reporters" require "mocha/setup" require "pry" unless ENV["CI"] require File.expand_path("../dummy/config/environment", __FILE__) ActiveSupport.test_order = :random Minitest::Reporters.use! [Minitest::Reporters::ProgressReporter.new(color: true)] class ActiveSupport::TestCase def reset_db ActiveRecord::Base.subclasses.each do |model| model.delete_all end end end ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:" load File.dirname(__FILE__) + '/dummy/db/schema.rb' ## Instruction: Work around double test reporters from rails. ## Code After: require "rails/all" require "measured" require "measured-rails" require "minitest/autorun" require "minitest/reporters" require "mocha/setup" require "pry" unless ENV["CI"] require File.expand_path("../dummy/config/environment", __FILE__) ActiveSupport.test_order = :random # Prevent two reporters from printing # https://github.com/kern/minitest-reporters/issues/230 # https://github.com/rails/rails/issues/30491 Minitest.load_plugins Minitest.extensions.delete('rails') Minitest.extensions.unshift('rails') Minitest::Reporters.use! [Minitest::Reporters::ProgressReporter.new(color: true)] class ActiveSupport::TestCase def reset_db ActiveRecord::Base.subclasses.each do |model| model.delete_all end end end ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:" load File.dirname(__FILE__) + '/dummy/db/schema.rb'
require "rails/all" require "measured" require "measured-rails" require "minitest/autorun" require "minitest/reporters" require "mocha/setup" require "pry" unless ENV["CI"] require File.expand_path("../dummy/config/environment", __FILE__) ActiveSupport.test_order = :random + + # Prevent two reporters from printing + # https://github.com/kern/minitest-reporters/issues/230 + # https://github.com/rails/rails/issues/30491 + Minitest.load_plugins + Minitest.extensions.delete('rails') + Minitest.extensions.unshift('rails') Minitest::Reporters.use! [Minitest::Reporters::ProgressReporter.new(color: true)] class ActiveSupport::TestCase def reset_db ActiveRecord::Base.subclasses.each do |model| model.delete_all end end end ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:" load File.dirname(__FILE__) + '/dummy/db/schema.rb'
7
0.291667
7
0
f06729e178563de3a43290ee3b7621890210325d
projects/010_GCDDelights/010_ChallengeStarter/Pollster.playground/Contents.swift
projects/010_GCDDelights/010_ChallengeStarter/Pollster.playground/Contents.swift
import Foundation import XCPlayground XCPlaygroundPage.currentPage.needsIndefiniteExecution = true //: # Pollster //: __Challenge:__ Complete the following class to simulate a polling mechanism using `dispatch_after()` class Pollster { let callback: (String) -> () private var active: Bool = false private let isoloationQueue = dispatch_queue_create("com.raywenderlich.pollster.isolation", DISPATCH_QUEUE_SERIAL) init(callback: (String) -> ()) { self.callback = callback } func start() { print("Start polling") active = true dispatch_async(isoloationQueue) { self.makeRequest() } } func stop() { active = false print("Stop polling") } private func makeRequest() { if active { callback("\(NSDate())") let dispatchTime = dispatch_time(DISPATCH_TIME_NOW, Int64(Double(NSEC_PER_SEC) * 1)) dispatch_after(dispatchTime, isoloationQueue) { self.makeRequest() } } } } //: The following will test the completed class let pollster = Pollster(callback: { print($0) }) pollster.start() delay(5) { pollster.stop() delay(2) { print("Finished") XCPlaygroundPage.currentPage.finishExecution() } }
import Foundation import XCPlayground XCPlaygroundPage.currentPage.needsIndefiniteExecution = true //: # Pollster //: __Challenge:__ Complete the following class to simulate a polling mechanism using `dispatch_after()` class Pollster { let callback: (String) -> () init(callback: (String) -> ()) { self.callback = callback } func start() { print("Start polling") } func stop() { print("Stop polling") } private func makeRequest() { callback("\(NSDate())") } } //: The following will test the completed class let pollster = Pollster(callback: { print($0) }) pollster.start() delay(5) { pollster.stop() delay(2) { print("Finished") XCPlaygroundPage.currentPage.finishExecution() } }
Remove code to make starter project
010_Challenge: Remove code to make starter project
Swift
mit
sammyd/Concurrency-VideoSeries
swift
## Code Before: import Foundation import XCPlayground XCPlaygroundPage.currentPage.needsIndefiniteExecution = true //: # Pollster //: __Challenge:__ Complete the following class to simulate a polling mechanism using `dispatch_after()` class Pollster { let callback: (String) -> () private var active: Bool = false private let isoloationQueue = dispatch_queue_create("com.raywenderlich.pollster.isolation", DISPATCH_QUEUE_SERIAL) init(callback: (String) -> ()) { self.callback = callback } func start() { print("Start polling") active = true dispatch_async(isoloationQueue) { self.makeRequest() } } func stop() { active = false print("Stop polling") } private func makeRequest() { if active { callback("\(NSDate())") let dispatchTime = dispatch_time(DISPATCH_TIME_NOW, Int64(Double(NSEC_PER_SEC) * 1)) dispatch_after(dispatchTime, isoloationQueue) { self.makeRequest() } } } } //: The following will test the completed class let pollster = Pollster(callback: { print($0) }) pollster.start() delay(5) { pollster.stop() delay(2) { print("Finished") XCPlaygroundPage.currentPage.finishExecution() } } ## Instruction: 010_Challenge: Remove code to make starter project ## Code After: import Foundation import XCPlayground XCPlaygroundPage.currentPage.needsIndefiniteExecution = true //: # Pollster //: __Challenge:__ Complete the following class to simulate a polling mechanism using `dispatch_after()` class Pollster { let callback: (String) -> () init(callback: (String) -> ()) { self.callback = callback } func start() { print("Start polling") } func stop() { print("Stop polling") } private func makeRequest() { callback("\(NSDate())") } } //: The following will test the completed class let pollster = Pollster(callback: { print($0) }) pollster.start() delay(5) { pollster.stop() delay(2) { print("Finished") XCPlaygroundPage.currentPage.finishExecution() } }
import Foundation import XCPlayground XCPlaygroundPage.currentPage.needsIndefiniteExecution = true //: # Pollster //: __Challenge:__ Complete the following class to simulate a polling mechanism using `dispatch_after()` class Pollster { let callback: (String) -> () + - private var active: Bool = false - private let isoloationQueue = dispatch_queue_create("com.raywenderlich.pollster.isolation", DISPATCH_QUEUE_SERIAL) - init(callback: (String) -> ()) { self.callback = callback } func start() { print("Start polling") - active = true - dispatch_async(isoloationQueue) { - self.makeRequest() - } ? - + } func stop() { - active = false print("Stop polling") } private func makeRequest() { - if active { - callback("\(NSDate())") ? -- + callback("\(NSDate())") - let dispatchTime = dispatch_time(DISPATCH_TIME_NOW, Int64(Double(NSEC_PER_SEC) * 1)) - dispatch_after(dispatchTime, isoloationQueue) { - self.makeRequest() - } - } } } //: The following will test the completed class let pollster = Pollster(callback: { print($0) }) pollster.start() delay(5) { pollster.stop() delay(2) { print("Finished") XCPlaygroundPage.currentPage.finishExecution() } }
18
0.321429
3
15
b0e99ac86afdaccf7da128bac920fdf8aa7610d2
cookbooks/cumulus/test/integration/default/serverspec/license_spec.rb
cookbooks/cumulus/test/integration/default/serverspec/license_spec.rb
require 'serverspec' set :backend, :exec set :path, '/bin:/usr/bin:/sbin/usr/sbin' describe file('/etc/cumulus/.license.txt') do it { should be_file } its(:content) { should match(/Rocket Turtle!/) } its(:content) { should match(%r{/usr/cumulus/bin/cl-license -i http://localhost/test.lic}) } end
require 'serverspec' set :backend, :exec set :path, '/bin:/usr/bin:/sbin/usr/sbin' describe file('/etc/cumulus/.license.txt') do it { should be_file } its(:content) { should match(/Rocket Turtle!/) } its(:content) { should match(%r{/usr/cumulus/bin/cl-license -i file:///tmp/test.v1}) } end
Update test to reflect setup changes
Update test to reflect setup changes Fix the test to reflect the changes made to the test setup cookbook
Ruby
apache-2.0
Vanders/ifupdown2,Vanders/ifupdown2
ruby
## Code Before: require 'serverspec' set :backend, :exec set :path, '/bin:/usr/bin:/sbin/usr/sbin' describe file('/etc/cumulus/.license.txt') do it { should be_file } its(:content) { should match(/Rocket Turtle!/) } its(:content) { should match(%r{/usr/cumulus/bin/cl-license -i http://localhost/test.lic}) } end ## Instruction: Update test to reflect setup changes Fix the test to reflect the changes made to the test setup cookbook ## Code After: require 'serverspec' set :backend, :exec set :path, '/bin:/usr/bin:/sbin/usr/sbin' describe file('/etc/cumulus/.license.txt') do it { should be_file } its(:content) { should match(/Rocket Turtle!/) } its(:content) { should match(%r{/usr/cumulus/bin/cl-license -i file:///tmp/test.v1}) } end
require 'serverspec' set :backend, :exec set :path, '/bin:/usr/bin:/sbin/usr/sbin' describe file('/etc/cumulus/.license.txt') do it { should be_file } its(:content) { should match(/Rocket Turtle!/) } - its(:content) { should match(%r{/usr/cumulus/bin/cl-license -i http://localhost/test.lic}) } ? ^^^^ ^^^^^^^^ ^^^ + its(:content) { should match(%r{/usr/cumulus/bin/cl-license -i file:///tmp/test.v1}) } ? ^^^^ ^ ++ ^^ end
2
0.2
1
1
6e18192da18b6d1b9c6443981f007126ea7e6927
setup.py
setup.py
from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages from csdms.dakota import __version__, plugin_script package_name = 'csdms.dakota' setup(name=package_name, version=__version__, author='Mark Piper', author_email='[email protected]', license='MIT', description='Python API for Dakota', long_description=open('README.md').read(), namespace_packages=['csdms'], packages=find_packages(exclude=['*.tests']), entry_points={ 'console_scripts': [ plugin_script + ' = ' + package_name + '.run_plugin:main' ] } )
from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages from csdms.dakota import __version__, plugin_script setup(name='csdms-dakota', version=__version__, author='Mark Piper', author_email='[email protected]', license='MIT', description='Python API for Dakota', long_description=open('README.md').read(), namespace_packages=['csdms'], packages=find_packages(exclude=['*.tests']), entry_points={ 'console_scripts': [ plugin_script + ' = csdms.dakota.run_plugin:main' ] } )
Change package name to use hyphen
Change package name to use hyphen
Python
mit
csdms/dakota,csdms/dakota
python
## Code Before: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages from csdms.dakota import __version__, plugin_script package_name = 'csdms.dakota' setup(name=package_name, version=__version__, author='Mark Piper', author_email='[email protected]', license='MIT', description='Python API for Dakota', long_description=open('README.md').read(), namespace_packages=['csdms'], packages=find_packages(exclude=['*.tests']), entry_points={ 'console_scripts': [ plugin_script + ' = ' + package_name + '.run_plugin:main' ] } ) ## Instruction: Change package name to use hyphen ## Code After: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages from csdms.dakota import __version__, plugin_script setup(name='csdms-dakota', version=__version__, author='Mark Piper', author_email='[email protected]', license='MIT', description='Python API for Dakota', long_description=open('README.md').read(), namespace_packages=['csdms'], packages=find_packages(exclude=['*.tests']), entry_points={ 'console_scripts': [ plugin_script + ' = csdms.dakota.run_plugin:main' ] } )
from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages from csdms.dakota import __version__, plugin_script + setup(name='csdms-dakota', - package_name = 'csdms.dakota' - - setup(name=package_name, version=__version__, author='Mark Piper', author_email='[email protected]', license='MIT', description='Python API for Dakota', long_description=open('README.md').read(), namespace_packages=['csdms'], packages=find_packages(exclude=['*.tests']), entry_points={ 'console_scripts': [ - plugin_script + ' = ' + package_name + '.run_plugin:main' ? ^^^^^ - ----------- + plugin_script + ' = csdms.dakota.run_plugin:main' ? ^^^^^^^ ++ ] } )
6
0.272727
2
4
8a01315cc66b94e0b35cbcfe51a4adf19c3eb662
requirements.txt
requirements.txt
booleanOperations>=0.6.2 defcon>=0.2.0 fonttools>=3.2.1 Pillow>=3.4.2 pyclipper>=1.0.5 ufoLib>=2.0.0
booleanOperations==0.7.0 defcon==0.3.1 fonttools==3.9.1 Pillow==4.0.0 pyclipper==1.0.6 ufoLib==2.0.0
Update the versions of the dependencies and pin them
Update the versions of the dependencies and pin them
Text
apache-2.0
googlefonts/nototools,dougfelt/nototools,googlefonts/nototools,dougfelt/nototools,googlefonts/nototools,googlei18n/nototools,googlei18n/nototools,googlefonts/nototools,googlefonts/nototools,dougfelt/nototools,moyogo/nototools,googlei18n/nototools,moyogo/nototools,moyogo/nototools
text
## Code Before: booleanOperations>=0.6.2 defcon>=0.2.0 fonttools>=3.2.1 Pillow>=3.4.2 pyclipper>=1.0.5 ufoLib>=2.0.0 ## Instruction: Update the versions of the dependencies and pin them ## Code After: booleanOperations==0.7.0 defcon==0.3.1 fonttools==3.9.1 Pillow==4.0.0 pyclipper==1.0.6 ufoLib==2.0.0
- booleanOperations>=0.6.2 ? ^ ^ ^ + booleanOperations==0.7.0 ? ^ ^ ^ - defcon>=0.2.0 ? ^ ^ ^ + defcon==0.3.1 ? ^ ^ ^ - fonttools>=3.2.1 ? ^ ^ + fonttools==3.9.1 ? ^ ^ - Pillow>=3.4.2 + Pillow==4.0.0 - pyclipper>=1.0.5 ? ^ ^ + pyclipper==1.0.6 ? ^ ^ - ufoLib>=2.0.0 ? ^ + ufoLib==2.0.0 ? ^
12
2
6
6
5bb90727efb62525995caad3b52fd588d8b08298
pregnancy/urls.py
pregnancy/urls.py
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() import contractions.views urlpatterns = patterns('', # Examples: # url(r'^$', 'pregnancy.views.home', name='home'), # url(r'^pregnancy/', include('pregnancy.foo.urls')), url(r'^contractions/$', contractions.views.ContractionList.as_view(), name='ContractionList'), url(r'^update_intensity/(?P<pk>\d+)/$', contractions.views.UpdateIntensity.as_view(), name='UpdateIntensity'), url(r'^update_intensity2/(?P<pk>\d+)/$', contractions.views.UpdateIntensity2.as_view(), name='UpdateIntensity2'), url(r'^ContractionListTable/$', contractions.views.ContractionListTable.as_view(), name='ContractionListTable'), url(r'^StartContraction/$', contractions.views.StartContraction.as_view(), name='StartContraction'), url(r'^StopContraction/(?P<pk>\d+)/$', contractions.views.StopContraction.as_view(), name='StopContraction'), # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: url(r'^admin/', include(admin.site.urls)), )
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() import contractions.views urlpatterns = patterns('', # Examples: # url(r'^$', 'pregnancy.views.home', name='home'), # url(r'^pregnancy/', include('pregnancy.foo.urls')), url(r'^$', contractions.views.ContractionList.as_view(), name='ContractionList'), url(r'^contractions/$', contractions.views.ContractionList.as_view(), name='ContractionList'), url(r'^update_intensity/(?P<pk>\d+)/$', contractions.views.UpdateIntensity.as_view(), name='UpdateIntensity'), url(r'^update_intensity2/(?P<pk>\d+)/$', contractions.views.UpdateIntensity2.as_view(), name='UpdateIntensity2'), url(r'^ContractionListTable/$', contractions.views.ContractionListTable.as_view(), name='ContractionListTable'), url(r'^StartContraction/$', contractions.views.StartContraction.as_view(), name='StartContraction'), url(r'^StopContraction/(?P<pk>\d+)/$', contractions.views.StopContraction.as_view(), name='StopContraction'), # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: url(r'^admin/', include(admin.site.urls)), )
Update url to point / to the contractions app
Update url to point / to the contractions app
Python
bsd-2-clause
dreinhold/pregnancy,dreinhold/pregnancy,dreinhold/pregnancy
python
## Code Before: from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() import contractions.views urlpatterns = patterns('', # Examples: # url(r'^$', 'pregnancy.views.home', name='home'), # url(r'^pregnancy/', include('pregnancy.foo.urls')), url(r'^contractions/$', contractions.views.ContractionList.as_view(), name='ContractionList'), url(r'^update_intensity/(?P<pk>\d+)/$', contractions.views.UpdateIntensity.as_view(), name='UpdateIntensity'), url(r'^update_intensity2/(?P<pk>\d+)/$', contractions.views.UpdateIntensity2.as_view(), name='UpdateIntensity2'), url(r'^ContractionListTable/$', contractions.views.ContractionListTable.as_view(), name='ContractionListTable'), url(r'^StartContraction/$', contractions.views.StartContraction.as_view(), name='StartContraction'), url(r'^StopContraction/(?P<pk>\d+)/$', contractions.views.StopContraction.as_view(), name='StopContraction'), # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: url(r'^admin/', include(admin.site.urls)), ) ## Instruction: Update url to point / to the contractions app ## Code After: from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() import contractions.views urlpatterns = patterns('', # Examples: # url(r'^$', 'pregnancy.views.home', name='home'), # url(r'^pregnancy/', include('pregnancy.foo.urls')), url(r'^$', contractions.views.ContractionList.as_view(), name='ContractionList'), url(r'^contractions/$', contractions.views.ContractionList.as_view(), name='ContractionList'), url(r'^update_intensity/(?P<pk>\d+)/$', contractions.views.UpdateIntensity.as_view(), name='UpdateIntensity'), url(r'^update_intensity2/(?P<pk>\d+)/$', contractions.views.UpdateIntensity2.as_view(), name='UpdateIntensity2'), url(r'^ContractionListTable/$', contractions.views.ContractionListTable.as_view(), name='ContractionListTable'), url(r'^StartContraction/$', contractions.views.StartContraction.as_view(), name='StartContraction'), url(r'^StopContraction/(?P<pk>\d+)/$', contractions.views.StopContraction.as_view(), name='StopContraction'), # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: url(r'^admin/', include(admin.site.urls)), )
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() import contractions.views urlpatterns = patterns('', # Examples: # url(r'^$', 'pregnancy.views.home', name='home'), # url(r'^pregnancy/', include('pregnancy.foo.urls')), + url(r'^$', contractions.views.ContractionList.as_view(), name='ContractionList'), url(r'^contractions/$', contractions.views.ContractionList.as_view(), name='ContractionList'), url(r'^update_intensity/(?P<pk>\d+)/$', contractions.views.UpdateIntensity.as_view(), name='UpdateIntensity'), url(r'^update_intensity2/(?P<pk>\d+)/$', contractions.views.UpdateIntensity2.as_view(), name='UpdateIntensity2'), url(r'^ContractionListTable/$', contractions.views.ContractionListTable.as_view(), name='ContractionListTable'), url(r'^StartContraction/$', contractions.views.StartContraction.as_view(), name='StartContraction'), url(r'^StopContraction/(?P<pk>\d+)/$', contractions.views.StopContraction.as_view(), name='StopContraction'), # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: url(r'^admin/', include(admin.site.urls)), )
1
0.04
1
0
efdf04a3786d237d552959c8fcfde376e0f925c7
lib/yeoman/templates/lib/ansible/provision.yml
lib/yeoman/templates/lib/ansible/provision.yml
--- - hosts: "{{ stage }}" # Easy execution via: `ansible-playbook provision.yml -e stage=local` gather_facts: yes # Host specs required for templates roles: - prepare # (Required) Stop any existing evolution services - common # (Required) Base configuration - user # (Required) User for SSH/Ansible/Capistrano auth - apache # (Required) Web server (Soon: Nginx) - mysql # (Required) Database server (Soon: Maria) - php # (Required) PHP 5.3 - node # (Required) Tools for deployment (e.g. `bower`) - wp-cli # (Required) CLI for managing WordPress # Optional Features <% if (props.ssl) { %>- pound # (Optional) SSL support & decryption<% } %><% props.roles.map(function(role) { %> <%= role.checked ? '-' : '#' %> <%= role.value %><% }) %> <% if (props.newrelic) { %> - newrelic # (Optional) New Relic application/server monitoring <% } %><% if (props.datadog) { %> - { role: Datadog.datadog, sudo: yes, when: stage == 'production' } # (Optional) Datadog monitoring support <% } %> # /Optional Features - cleanup # (Required) Generate init.d for installed evolution services
--- - hosts: "{{ stage }}" # Easy execution via: `ansible-playbook provision.yml -e stage=local` gather_facts: yes # Host specs required for templates roles: - prepare # (Required) Stop any existing evolution services - common # (Required) Base configuration - user # (Required) User for SSH/Ansible/Capistrano auth - apache # (Required) Web server (Soon: Nginx) - mysql # (Required) Database server (Soon: Maria) - php # (Required) PHP 5.3 - node # (Required) Tools for deployment (e.g. `bower`) - wp-cli # (Required) CLI for managing WordPress # Optional Features <% if (props.ssl) { %>- pound # (Optional) SSL support & decryption<% } %><% props.roles.map(function(role) { %> <%= role.checked ? '-' : '#' %> <%= role.value %><% }) %> <% if (props.newrelic) { %> - { role: newrelic, sudo: yes, when: stage == 'production' } # (Optional) New Relic application/server monitoring <% } %><% if (props.datadog) { %> - { role: Datadog.datadog, sudo: yes, when: stage == 'production' } # (Optional) Datadog monitoring support <% } %> # /Optional Features - cleanup # (Required) Generate init.d for installed evolution services
Provision should run newrelic role ONLY for production
Provision should run newrelic role ONLY for production
YAML
mit
evolution/wordpress,jalevin/wordpress,evolution/wordpress,jalevin/wordpress,evolution/wordpress,jalevin/wordpress,evolution/wordpress,evolution/wordpress,jalevin/wordpress,jalevin/wordpress
yaml
## Code Before: --- - hosts: "{{ stage }}" # Easy execution via: `ansible-playbook provision.yml -e stage=local` gather_facts: yes # Host specs required for templates roles: - prepare # (Required) Stop any existing evolution services - common # (Required) Base configuration - user # (Required) User for SSH/Ansible/Capistrano auth - apache # (Required) Web server (Soon: Nginx) - mysql # (Required) Database server (Soon: Maria) - php # (Required) PHP 5.3 - node # (Required) Tools for deployment (e.g. `bower`) - wp-cli # (Required) CLI for managing WordPress # Optional Features <% if (props.ssl) { %>- pound # (Optional) SSL support & decryption<% } %><% props.roles.map(function(role) { %> <%= role.checked ? '-' : '#' %> <%= role.value %><% }) %> <% if (props.newrelic) { %> - newrelic # (Optional) New Relic application/server monitoring <% } %><% if (props.datadog) { %> - { role: Datadog.datadog, sudo: yes, when: stage == 'production' } # (Optional) Datadog monitoring support <% } %> # /Optional Features - cleanup # (Required) Generate init.d for installed evolution services ## Instruction: Provision should run newrelic role ONLY for production ## Code After: --- - hosts: "{{ stage }}" # Easy execution via: `ansible-playbook provision.yml -e stage=local` gather_facts: yes # Host specs required for templates roles: - prepare # (Required) Stop any existing evolution services - common # (Required) Base configuration - user # (Required) User for SSH/Ansible/Capistrano auth - apache # (Required) Web server (Soon: Nginx) - mysql # (Required) Database server (Soon: Maria) - php # (Required) PHP 5.3 - node # (Required) Tools for deployment (e.g. `bower`) - wp-cli # (Required) CLI for managing WordPress # Optional Features <% if (props.ssl) { %>- pound # (Optional) SSL support & decryption<% } %><% props.roles.map(function(role) { %> <%= role.checked ? '-' : '#' %> <%= role.value %><% }) %> <% if (props.newrelic) { %> - { role: newrelic, sudo: yes, when: stage == 'production' } # (Optional) New Relic application/server monitoring <% } %><% if (props.datadog) { %> - { role: Datadog.datadog, sudo: yes, when: stage == 'production' } # (Optional) Datadog monitoring support <% } %> # /Optional Features - cleanup # (Required) Generate init.d for installed evolution services
--- - hosts: "{{ stage }}" # Easy execution via: `ansible-playbook provision.yml -e stage=local` gather_facts: yes # Host specs required for templates roles: - prepare # (Required) Stop any existing evolution services - common # (Required) Base configuration - user # (Required) User for SSH/Ansible/Capistrano auth - apache # (Required) Web server (Soon: Nginx) - mysql # (Required) Database server (Soon: Maria) - php # (Required) PHP 5.3 - node # (Required) Tools for deployment (e.g. `bower`) - wp-cli # (Required) CLI for managing WordPress # Optional Features <% if (props.ssl) { %>- pound # (Optional) SSL support & decryption<% } %><% props.roles.map(function(role) { %> <%= role.checked ? '-' : '#' %> <%= role.value %><% }) %> - <% if (props.newrelic) { %> - newrelic # (Optional) New Relic application/server monitoring + <% if (props.newrelic) { %> - { role: newrelic, sudo: yes, when: stage == 'production' } # (Optional) New Relic application/server monitoring ? ++++++++ + +++++ ++++++++++++++++++++++++++++++++++ <% } %><% if (props.datadog) { %> - { role: Datadog.datadog, sudo: yes, when: stage == 'production' } # (Optional) Datadog monitoring support <% } %> # /Optional Features - cleanup # (Required) Generate init.d for installed evolution services
2
0.086957
1
1
14284277bc929d9e129f7cf73549da832d2b5186
.travis.yml
.travis.yml
language: go go: - 1.4 - 1.5 - 1.6 - tip env: - LIBWEBP_VERSION="0.4.1" - LIBWEBP_VERSION="0.4.2" - LIBWEBP_VERSION="0.4.3" - LIBWEBP_VERSION="0.5.0" cache: directories: - $HOME/cache sudo: false before_install: - LIBWEBP_PREFIX=$HOME/cache/libwebp-${LIBWEBP_VERSION} make libwebp - cd $HOME/gopath/src/github.com/harukasan/go-libwebp - export CGO_CFLAGS="-I $HOME/cache/libwebp-${LIBWEBP_VERSION}/include" - export CGO_LDFLAGS="-L $HOME/cache/libwebp-${LIBWEBP_VERSION}/lib" - export LD_LIBRARY_PATH=$HOME/cache/libwebp-${LIBWEBP_VERSION}/lib:$LD_LIBRARY_PATH
language: go go: - 1.4 - 1.5 - 1.6 - tip env: - LIBWEBP_VERSION="0.4.1" - LIBWEBP_VERSION="0.4.2" - LIBWEBP_VERSION="0.4.3" - LIBWEBP_VERSION="0.5.0" - LIBWEBP_VERSION="0.5.1" cache: directories: - $HOME/cache sudo: false before_install: - LIBWEBP_PREFIX=$HOME/cache/libwebp-${LIBWEBP_VERSION} make libwebp - cd $HOME/gopath/src/github.com/harukasan/go-libwebp - export CGO_CFLAGS="-I $HOME/cache/libwebp-${LIBWEBP_VERSION}/include" - export CGO_LDFLAGS="-L $HOME/cache/libwebp-${LIBWEBP_VERSION}/lib" - export LD_LIBRARY_PATH=$HOME/cache/libwebp-${LIBWEBP_VERSION}/lib:$LD_LIBRARY_PATH
Add libwebp 0.5.1 to test env.
Add libwebp 0.5.1 to test env.
YAML
bsd-2-clause
harukasan/go-libwebp
yaml
## Code Before: language: go go: - 1.4 - 1.5 - 1.6 - tip env: - LIBWEBP_VERSION="0.4.1" - LIBWEBP_VERSION="0.4.2" - LIBWEBP_VERSION="0.4.3" - LIBWEBP_VERSION="0.5.0" cache: directories: - $HOME/cache sudo: false before_install: - LIBWEBP_PREFIX=$HOME/cache/libwebp-${LIBWEBP_VERSION} make libwebp - cd $HOME/gopath/src/github.com/harukasan/go-libwebp - export CGO_CFLAGS="-I $HOME/cache/libwebp-${LIBWEBP_VERSION}/include" - export CGO_LDFLAGS="-L $HOME/cache/libwebp-${LIBWEBP_VERSION}/lib" - export LD_LIBRARY_PATH=$HOME/cache/libwebp-${LIBWEBP_VERSION}/lib:$LD_LIBRARY_PATH ## Instruction: Add libwebp 0.5.1 to test env. ## Code After: language: go go: - 1.4 - 1.5 - 1.6 - tip env: - LIBWEBP_VERSION="0.4.1" - LIBWEBP_VERSION="0.4.2" - LIBWEBP_VERSION="0.4.3" - LIBWEBP_VERSION="0.5.0" - LIBWEBP_VERSION="0.5.1" cache: directories: - $HOME/cache sudo: false before_install: - LIBWEBP_PREFIX=$HOME/cache/libwebp-${LIBWEBP_VERSION} make libwebp - cd $HOME/gopath/src/github.com/harukasan/go-libwebp - export CGO_CFLAGS="-I $HOME/cache/libwebp-${LIBWEBP_VERSION}/include" - export CGO_LDFLAGS="-L $HOME/cache/libwebp-${LIBWEBP_VERSION}/lib" - export LD_LIBRARY_PATH=$HOME/cache/libwebp-${LIBWEBP_VERSION}/lib:$LD_LIBRARY_PATH
language: go go: - 1.4 - 1.5 - 1.6 - tip env: - LIBWEBP_VERSION="0.4.1" - LIBWEBP_VERSION="0.4.2" - LIBWEBP_VERSION="0.4.3" - LIBWEBP_VERSION="0.5.0" + - LIBWEBP_VERSION="0.5.1" + cache: directories: - $HOME/cache sudo: false before_install: - LIBWEBP_PREFIX=$HOME/cache/libwebp-${LIBWEBP_VERSION} make libwebp - cd $HOME/gopath/src/github.com/harukasan/go-libwebp - export CGO_CFLAGS="-I $HOME/cache/libwebp-${LIBWEBP_VERSION}/include" - export CGO_LDFLAGS="-L $HOME/cache/libwebp-${LIBWEBP_VERSION}/lib" - export LD_LIBRARY_PATH=$HOME/cache/libwebp-${LIBWEBP_VERSION}/lib:$LD_LIBRARY_PATH
2
0.083333
2
0
9762b789a4e94d2f4ab7fbb553f1a3d08dcd07df
src/App/Body/AboutButton.js
src/App/Body/AboutButton.js
import React from 'react'; import { version } from 'root/package.json'; import RaisedButton from 'material-ui/lib/raised-button'; import FlatButton from 'material-ui/lib/flat-button'; import Dialog from 'material-ui/lib/dialog'; export default class AboutButton extends React.Component { state = { dialogIsOpen: false }; render() { const okButton = ( <FlatButton label="OK" primary onTouchTap={this.closeDialog} /> ); return ( <div style={style.container}> <RaisedButton label="About" onTouchTap={this.openDialog} /> <Dialog title="About this tool" open={this.state.dialogIsOpen} actions={[okButton]} onRequestClose={this.closeDialog} modal={false} > <p>CAPTIVA License Decoder (version {version})</p> <p> {'Concept and specifications by Jim Smith. Designed and implemented by '} <a href="https://www.linkedin.com/in/ksmithbaylor" target="_blank"> Kevin Smith </a>. </p> </Dialog> </div> ); } closeDialog = () => this.setState({ dialogIsOpen: false }); openDialog = () => this.setState({ dialogIsOpen: true }); } const style = { container: { display: 'inline-block', marginRight: '0.5em' } };
import React from 'react'; import { version } from 'root/package.json'; import RaisedButton from 'material-ui/lib/raised-button'; import FlatButton from 'material-ui/lib/flat-button'; import Dialog from 'material-ui/lib/dialog'; export default class AboutButton extends React.Component { state = { dialogIsOpen: false }; render() { const okButton = ( <FlatButton label="OK" primary onTouchTap={this.closeDialog} /> ); return ( <div style={style.container}> <RaisedButton label="About" onTouchTap={this.openDialog} /> <Dialog title="About this tool" open={this.state.dialogIsOpen} actions={[okButton]} onRequestClose={this.closeDialog} modal={false} > <p>Intelligent Capture License Decoder (version {version})</p> <p> {'Concept and specifications by Jim Smith. Designed and implemented by '} <a href="https://www.linkedin.com/in/ksmithbaylor" target="_blank"> Kevin Smith </a>. </p> </Dialog> </div> ); } closeDialog = () => this.setState({ dialogIsOpen: false }); openDialog = () => this.setState({ dialogIsOpen: true }); } const style = { container: { display: 'inline-block', marginRight: '0.5em' } };
Change one more CAPTIVA to Intelligent Capture
Change one more CAPTIVA to Intelligent Capture
JavaScript
cc0-1.0
ksmithbaylor/emc-license-summarizer,ksmithbaylor/emc-license-summarizer,ksmithbaylor/emc-license-summarizer
javascript
## Code Before: import React from 'react'; import { version } from 'root/package.json'; import RaisedButton from 'material-ui/lib/raised-button'; import FlatButton from 'material-ui/lib/flat-button'; import Dialog from 'material-ui/lib/dialog'; export default class AboutButton extends React.Component { state = { dialogIsOpen: false }; render() { const okButton = ( <FlatButton label="OK" primary onTouchTap={this.closeDialog} /> ); return ( <div style={style.container}> <RaisedButton label="About" onTouchTap={this.openDialog} /> <Dialog title="About this tool" open={this.state.dialogIsOpen} actions={[okButton]} onRequestClose={this.closeDialog} modal={false} > <p>CAPTIVA License Decoder (version {version})</p> <p> {'Concept and specifications by Jim Smith. Designed and implemented by '} <a href="https://www.linkedin.com/in/ksmithbaylor" target="_blank"> Kevin Smith </a>. </p> </Dialog> </div> ); } closeDialog = () => this.setState({ dialogIsOpen: false }); openDialog = () => this.setState({ dialogIsOpen: true }); } const style = { container: { display: 'inline-block', marginRight: '0.5em' } }; ## Instruction: Change one more CAPTIVA to Intelligent Capture ## Code After: import React from 'react'; import { version } from 'root/package.json'; import RaisedButton from 'material-ui/lib/raised-button'; import FlatButton from 'material-ui/lib/flat-button'; import Dialog from 'material-ui/lib/dialog'; export default class AboutButton extends React.Component { state = { dialogIsOpen: false }; render() { const okButton = ( <FlatButton label="OK" primary onTouchTap={this.closeDialog} /> ); return ( <div style={style.container}> <RaisedButton label="About" onTouchTap={this.openDialog} /> <Dialog title="About this tool" open={this.state.dialogIsOpen} actions={[okButton]} onRequestClose={this.closeDialog} modal={false} > <p>Intelligent Capture License Decoder (version {version})</p> <p> {'Concept and specifications by Jim Smith. Designed and implemented by '} <a href="https://www.linkedin.com/in/ksmithbaylor" target="_blank"> Kevin Smith </a>. </p> </Dialog> </div> ); } closeDialog = () => this.setState({ dialogIsOpen: false }); openDialog = () => this.setState({ dialogIsOpen: true }); } const style = { container: { display: 'inline-block', marginRight: '0.5em' } };
import React from 'react'; import { version } from 'root/package.json'; import RaisedButton from 'material-ui/lib/raised-button'; import FlatButton from 'material-ui/lib/flat-button'; import Dialog from 'material-ui/lib/dialog'; export default class AboutButton extends React.Component { state = { dialogIsOpen: false }; render() { const okButton = ( <FlatButton label="OK" primary onTouchTap={this.closeDialog} /> ); return ( <div style={style.container}> <RaisedButton label="About" onTouchTap={this.openDialog} /> <Dialog title="About this tool" open={this.state.dialogIsOpen} actions={[okButton]} onRequestClose={this.closeDialog} modal={false} > - <p>CAPTIVA License Decoder (version {version})</p> ? ^^^^^^ + <p>Intelligent Capture License Decoder (version {version})</p> ? ++++++++++++ ^^^^^^ <p> {'Concept and specifications by Jim Smith. Designed and implemented by '} <a href="https://www.linkedin.com/in/ksmithbaylor" target="_blank"> Kevin Smith </a>. </p> </Dialog> </div> ); } closeDialog = () => this.setState({ dialogIsOpen: false }); openDialog = () => this.setState({ dialogIsOpen: true }); } const style = { container: { display: 'inline-block', marginRight: '0.5em' } };
2
0.036364
1
1
440246366995a38ff61ae54429d252a3e48c84da
spec/factories.rb
spec/factories.rb
FactoryGirl.define do sequence(:email) { |n| "user-#{n}@example.com" } factory :user do email password 'abc123' end factory :entry do user body 'Entry body' end factory :import do user end factory :griddler_email, class: OpenStruct do to [{ full: "[email protected]", email: "[email protected]", token: "to_user", host: "example.com", name: nil }] from [{ email: "[email protected]" }] subject "Hello Trailmix" body "Today was great" end end
FactoryGirl.define do sequence(:email) { |n| "user-#{n}@example.com" } factory :user do email password 'abc123' end factory :entry do user date Time.zone.now body 'Entry body' end factory :import do user end factory :griddler_email, class: OpenStruct do to [{ full: "[email protected]", email: "[email protected]", token: "to_user", host: "example.com", name: nil }] from [{ email: "[email protected]" }] subject "Hello Trailmix" body "Today was great" end end
Add date to Entry factory
Add date to Entry factory
Ruby
mit
codecation/trailmix,codecation/trailmix,codecation/trailmix,codecation/trailmix
ruby
## Code Before: FactoryGirl.define do sequence(:email) { |n| "user-#{n}@example.com" } factory :user do email password 'abc123' end factory :entry do user body 'Entry body' end factory :import do user end factory :griddler_email, class: OpenStruct do to [{ full: "[email protected]", email: "[email protected]", token: "to_user", host: "example.com", name: nil }] from [{ email: "[email protected]" }] subject "Hello Trailmix" body "Today was great" end end ## Instruction: Add date to Entry factory ## Code After: FactoryGirl.define do sequence(:email) { |n| "user-#{n}@example.com" } factory :user do email password 'abc123' end factory :entry do user date Time.zone.now body 'Entry body' end factory :import do user end factory :griddler_email, class: OpenStruct do to [{ full: "[email protected]", email: "[email protected]", token: "to_user", host: "example.com", name: nil }] from [{ email: "[email protected]" }] subject "Hello Trailmix" body "Today was great" end end
FactoryGirl.define do sequence(:email) { |n| "user-#{n}@example.com" } factory :user do email password 'abc123' end factory :entry do user + date Time.zone.now body 'Entry body' end factory :import do user end factory :griddler_email, class: OpenStruct do to [{ full: "[email protected]", email: "[email protected]", token: "to_user", host: "example.com", name: nil }] from [{ email: "[email protected]" }] subject "Hello Trailmix" body "Today was great" end end
1
0.033333
1
0
282a145f1170811e06ced2edfe96b4bf21e91785
oauth2_server/app/views/site/clients/_edit.html.erb
oauth2_server/app/views/site/clients/_edit.html.erb
<section class="edit_form"> <%= render partial: 'form' %> </section> <section class="site_client_roles"> <%= render partial: 'relation/customs/index', locals: { subject: resource } %> </section> <section class="delete"> <%= render partial: 'destroy' %> </section>
<section class="edit_form"> <%= render partial: 'form' %> </section> <section class="site_client_roles"> <%= render partial: 'relation/customs/index', locals: { subject: resource } %> </section> <section class="logo"> <%= render partial: 'avatars/form', object: resource.actor, as: :avatarable %> </section> <section class="delete"> <%= render partial: 'destroy' %> </section>
Include logo form in site clients edit
Include logo form in site clients edit
HTML+ERB
mit
ging/social_stream,ging/social_stream,honorlin/social_stream,honorlin/social_stream,honorlin/social_stream,ging/social_stream,honorlin/social_stream
html+erb
## Code Before: <section class="edit_form"> <%= render partial: 'form' %> </section> <section class="site_client_roles"> <%= render partial: 'relation/customs/index', locals: { subject: resource } %> </section> <section class="delete"> <%= render partial: 'destroy' %> </section> ## Instruction: Include logo form in site clients edit ## Code After: <section class="edit_form"> <%= render partial: 'form' %> </section> <section class="site_client_roles"> <%= render partial: 'relation/customs/index', locals: { subject: resource } %> </section> <section class="logo"> <%= render partial: 'avatars/form', object: resource.actor, as: :avatarable %> </section> <section class="delete"> <%= render partial: 'destroy' %> </section>
<section class="edit_form"> <%= render partial: 'form' %> </section> <section class="site_client_roles"> <%= render partial: 'relation/customs/index', locals: { subject: resource } %> </section> + <section class="logo"> + <%= render partial: 'avatars/form', + object: resource.actor, + as: :avatarable %> + </section> + <section class="delete"> <%= render partial: 'destroy' %> </section>
6
0.461538
6
0
8ae0d59984225836c38ed9456324fa4bcd814d10
janus/vim/core/plugins.vim
janus/vim/core/plugins.vim
" Variables let s:no_python_support = "Vim is compiled without python support" let s:no_ruby_support = "Vim is compiled without ruby support" " Plugins that requires python support if !has("python") call janus#disable_plugin("gundo", s:no_python_support) endif " Plugins that requires ruby support if !has("ruby") call janus#disable_plugin("ruby", s:no_ruby_support) endif " Ack requires ack command if !executable("ack") && !executable("ack-grep") call janus#disable_plugin("ack", "The ack program is not installed") endif " Gist-vim requires curl if !executable("curl") call janus#disable_plugin("gist", "The curl program is not installed") endif " Tagbar requires ctags if !executable("ctags") call janus#disable_plugin("tagbar", "The ctags program is not installed") endif " nodejs does not protect itself " See #336 if exists("*DetectNode") call janus#disable_plugin("nodejs", "Nodejs already exists on your system.") endif
" Variables let s:no_python_support = "Vim is compiled without python support" let s:no_ruby_support = "Vim is compiled without ruby support" " Plugins that requires python support if !has("python") call janus#disable_plugin("gundo", s:no_python_support) endif " Plugins that requires ruby support if !has("ruby") call janus#disable_plugin("ruby", s:no_ruby_support) endif " Ack requires ack command if executable("ack") " use default config elseif executable("ack-grep") let g:ackprg="ack-grep -H --nocolor --nogroup --column" else call janus#disable_plugin("ack", "The ack program is not installed") endif " Gist-vim requires curl if !executable("curl") call janus#disable_plugin("gist", "The curl program is not installed") endif " Tagbar requires ctags if !executable("ctags") call janus#disable_plugin("tagbar", "The ctags program is not installed") endif " nodejs does not protect itself " See #336 if exists("*DetectNode") call janus#disable_plugin("nodejs", "Nodejs already exists on your system.") endif
Configure Ack plugin to use ack-grep when that one is available
Configure Ack plugin to use ack-grep when that one is available
VimL
mit
tantion/vim,tantion/vim
viml
## Code Before: " Variables let s:no_python_support = "Vim is compiled without python support" let s:no_ruby_support = "Vim is compiled without ruby support" " Plugins that requires python support if !has("python") call janus#disable_plugin("gundo", s:no_python_support) endif " Plugins that requires ruby support if !has("ruby") call janus#disable_plugin("ruby", s:no_ruby_support) endif " Ack requires ack command if !executable("ack") && !executable("ack-grep") call janus#disable_plugin("ack", "The ack program is not installed") endif " Gist-vim requires curl if !executable("curl") call janus#disable_plugin("gist", "The curl program is not installed") endif " Tagbar requires ctags if !executable("ctags") call janus#disable_plugin("tagbar", "The ctags program is not installed") endif " nodejs does not protect itself " See #336 if exists("*DetectNode") call janus#disable_plugin("nodejs", "Nodejs already exists on your system.") endif ## Instruction: Configure Ack plugin to use ack-grep when that one is available ## Code After: " Variables let s:no_python_support = "Vim is compiled without python support" let s:no_ruby_support = "Vim is compiled without ruby support" " Plugins that requires python support if !has("python") call janus#disable_plugin("gundo", s:no_python_support) endif " Plugins that requires ruby support if !has("ruby") call janus#disable_plugin("ruby", s:no_ruby_support) endif " Ack requires ack command if executable("ack") " use default config elseif executable("ack-grep") let g:ackprg="ack-grep -H --nocolor --nogroup --column" else call janus#disable_plugin("ack", "The ack program is not installed") endif " Gist-vim requires curl if !executable("curl") call janus#disable_plugin("gist", "The curl program is not installed") endif " Tagbar requires ctags if !executable("ctags") call janus#disable_plugin("tagbar", "The ctags program is not installed") endif " nodejs does not protect itself " See #336 if exists("*DetectNode") call janus#disable_plugin("nodejs", "Nodejs already exists on your system.") endif
" Variables let s:no_python_support = "Vim is compiled without python support" let s:no_ruby_support = "Vim is compiled without ruby support" " Plugins that requires python support if !has("python") call janus#disable_plugin("gundo", s:no_python_support) endif " Plugins that requires ruby support if !has("ruby") call janus#disable_plugin("ruby", s:no_ruby_support) endif " Ack requires ack command - if !executable("ack") && !executable("ack-grep") + if executable("ack") + " use default config + elseif executable("ack-grep") + let g:ackprg="ack-grep -H --nocolor --nogroup --column" + else call janus#disable_plugin("ack", "The ack program is not installed") endif " Gist-vim requires curl if !executable("curl") call janus#disable_plugin("gist", "The curl program is not installed") endif " Tagbar requires ctags if !executable("ctags") call janus#disable_plugin("tagbar", "The ctags program is not installed") endif " nodejs does not protect itself " See #336 if exists("*DetectNode") call janus#disable_plugin("nodejs", "Nodejs already exists on your system.") endif
6
0.176471
5
1
eacc66e5a9ab3310c75924dcb340e4944e9424d4
tests/specifications/external_spec_test.py
tests/specifications/external_spec_test.py
from fontbakery.checkrunner import Section from fontbakery.fonts_spec import spec_factory def check_filter(checkid, font=None, **iterargs): if checkid in ( "com.google.fonts/check/035", # ftxvalidator "com.google.fonts/check/036", # ots-sanitize "com.google.fonts/check/037", # Font Validator "com.google.fonts/check/038", # Fontforge "com.google.fonts/check/039", # Fontforge ): return False, "Skipping external tools." return True, None def test_external_specification(): """Test the creation of external specifications.""" specification = spec_factory(default_section=Section("Dalton Maag OpenType")) specification.set_check_filter(check_filter) specification.auto_register( globals(), spec_imports=['fontbakery.specifications.opentype']) assert len(specification.sections) > 1
from fontbakery.checkrunner import Section from fontbakery.fonts_spec import spec_factory def check_filter(checkid, font=None, **iterargs): if checkid in ( "com.google.fonts/check/035", # ftxvalidator "com.google.fonts/check/036", # ots-sanitize "com.google.fonts/check/037", # Font Validator "com.google.fonts/check/038", # Fontforge "com.google.fonts/check/039", # Fontforge ): return False, "Skipping external tools." return True, None def test_external_specification(): """Test the creation of external specifications.""" specification = spec_factory(default_section=Section("Dalton Maag OpenType")) specification.set_check_filter(check_filter) specification.auto_register( globals(), spec_imports=["fontbakery.specifications.opentype"]) # Probe some tests expected_tests = ["com.google.fonts/check/002", "com.google.fonts/check/180"] specification.test_expected_checks(expected_tests) # Probe tests we don't want assert "com.google.fonts/check/035" not in specification._check_registry.keys() assert len(specification.sections) > 1
Test for expected and unexpected checks
Test for expected and unexpected checks
Python
apache-2.0
googlefonts/fontbakery,graphicore/fontbakery,graphicore/fontbakery,googlefonts/fontbakery,googlefonts/fontbakery,moyogo/fontbakery,moyogo/fontbakery,moyogo/fontbakery,graphicore/fontbakery
python
## Code Before: from fontbakery.checkrunner import Section from fontbakery.fonts_spec import spec_factory def check_filter(checkid, font=None, **iterargs): if checkid in ( "com.google.fonts/check/035", # ftxvalidator "com.google.fonts/check/036", # ots-sanitize "com.google.fonts/check/037", # Font Validator "com.google.fonts/check/038", # Fontforge "com.google.fonts/check/039", # Fontforge ): return False, "Skipping external tools." return True, None def test_external_specification(): """Test the creation of external specifications.""" specification = spec_factory(default_section=Section("Dalton Maag OpenType")) specification.set_check_filter(check_filter) specification.auto_register( globals(), spec_imports=['fontbakery.specifications.opentype']) assert len(specification.sections) > 1 ## Instruction: Test for expected and unexpected checks ## Code After: from fontbakery.checkrunner import Section from fontbakery.fonts_spec import spec_factory def check_filter(checkid, font=None, **iterargs): if checkid in ( "com.google.fonts/check/035", # ftxvalidator "com.google.fonts/check/036", # ots-sanitize "com.google.fonts/check/037", # Font Validator "com.google.fonts/check/038", # Fontforge "com.google.fonts/check/039", # Fontforge ): return False, "Skipping external tools." return True, None def test_external_specification(): """Test the creation of external specifications.""" specification = spec_factory(default_section=Section("Dalton Maag OpenType")) specification.set_check_filter(check_filter) specification.auto_register( globals(), spec_imports=["fontbakery.specifications.opentype"]) # Probe some tests expected_tests = ["com.google.fonts/check/002", "com.google.fonts/check/180"] specification.test_expected_checks(expected_tests) # Probe tests we don't want assert "com.google.fonts/check/035" not in specification._check_registry.keys() assert len(specification.sections) > 1
from fontbakery.checkrunner import Section from fontbakery.fonts_spec import spec_factory def check_filter(checkid, font=None, **iterargs): if checkid in ( "com.google.fonts/check/035", # ftxvalidator "com.google.fonts/check/036", # ots-sanitize "com.google.fonts/check/037", # Font Validator "com.google.fonts/check/038", # Fontforge "com.google.fonts/check/039", # Fontforge ): return False, "Skipping external tools." return True, None def test_external_specification(): """Test the creation of external specifications.""" specification = spec_factory(default_section=Section("Dalton Maag OpenType")) specification.set_check_filter(check_filter) specification.auto_register( - globals(), spec_imports=['fontbakery.specifications.opentype']) ? ^ ^ + globals(), spec_imports=["fontbakery.specifications.opentype"]) ? ^ ^ + + # Probe some tests + expected_tests = ["com.google.fonts/check/002", "com.google.fonts/check/180"] + specification.test_expected_checks(expected_tests) + + # Probe tests we don't want + assert "com.google.fonts/check/035" not in specification._check_registry.keys() assert len(specification.sections) > 1
9
0.36
8
1
8c9e9e728e8ff93cbb50c514bb9e10ecef95131d
addon/utils/clear-requirejs.js
addon/utils/clear-requirejs.js
import Ember from 'ember'; const { getOwner, get } = Ember; /** * Unsee a requirejs module if it exists * @param {String} module The requirejs module name */ function requireUnsee(module) { if (requirejs.has(module)) { requirejs.unsee(module); } } export default function clearContainerCache(context, componentName) { const owner = getOwner(context); const config = owner.resolveRegistration('config:environment'); const appName = get(owner, 'base.name') || get(owner, 'application.name'); const modulePrefix = get(config, 'modulePrefix') || appName; const podModulePrefix = get(config, 'podModulePrefix'); // Invalidate regular module requireUnsee(`${modulePrefix}/components/${componentName}`); requireUnsee(`${modulePrefix}/templates/components/${componentName}`); // Invalidate pod modules requireUnsee(`${podModulePrefix}/components/${componentName}/component`); requireUnsee(`${podModulePrefix}/components/${componentName}/template`); }
import Ember from 'ember'; const { getOwner, get } = Ember; // Access requirejs global const requirejs = window.requirejs; /** * Unsee a requirejs module if it exists * @param {String} module The requirejs module name */ function requireUnsee(module) { if (requirejs.has(module)) { requirejs.unsee(module); } } export default function clearContainerCache(context, componentName) { const owner = getOwner(context); const config = owner.resolveRegistration('config:environment'); const appName = get(owner, 'base.name') || get(owner, 'application.name'); const modulePrefix = get(config, 'modulePrefix') || appName; const podModulePrefix = get(config, 'podModulePrefix'); // Invalidate regular module requireUnsee(`${modulePrefix}/components/${componentName}`); requireUnsee(`${modulePrefix}/templates/components/${componentName}`); // Invalidate pod modules requireUnsee(`${podModulePrefix}/components/${componentName}/component`); requireUnsee(`${podModulePrefix}/components/${componentName}/template`); }
Use window to access requirejs
Use window to access requirejs
JavaScript
mit
toranb/ember-cli-hot-loader,toranb/ember-cli-hot-loader
javascript
## Code Before: import Ember from 'ember'; const { getOwner, get } = Ember; /** * Unsee a requirejs module if it exists * @param {String} module The requirejs module name */ function requireUnsee(module) { if (requirejs.has(module)) { requirejs.unsee(module); } } export default function clearContainerCache(context, componentName) { const owner = getOwner(context); const config = owner.resolveRegistration('config:environment'); const appName = get(owner, 'base.name') || get(owner, 'application.name'); const modulePrefix = get(config, 'modulePrefix') || appName; const podModulePrefix = get(config, 'podModulePrefix'); // Invalidate regular module requireUnsee(`${modulePrefix}/components/${componentName}`); requireUnsee(`${modulePrefix}/templates/components/${componentName}`); // Invalidate pod modules requireUnsee(`${podModulePrefix}/components/${componentName}/component`); requireUnsee(`${podModulePrefix}/components/${componentName}/template`); } ## Instruction: Use window to access requirejs ## Code After: import Ember from 'ember'; const { getOwner, get } = Ember; // Access requirejs global const requirejs = window.requirejs; /** * Unsee a requirejs module if it exists * @param {String} module The requirejs module name */ function requireUnsee(module) { if (requirejs.has(module)) { requirejs.unsee(module); } } export default function clearContainerCache(context, componentName) { const owner = getOwner(context); const config = owner.resolveRegistration('config:environment'); const appName = get(owner, 'base.name') || get(owner, 'application.name'); const modulePrefix = get(config, 'modulePrefix') || appName; const podModulePrefix = get(config, 'podModulePrefix'); // Invalidate regular module requireUnsee(`${modulePrefix}/components/${componentName}`); requireUnsee(`${modulePrefix}/templates/components/${componentName}`); // Invalidate pod modules requireUnsee(`${podModulePrefix}/components/${componentName}/component`); requireUnsee(`${podModulePrefix}/components/${componentName}/template`); }
import Ember from 'ember'; const { getOwner, get } = Ember; + + // Access requirejs global + const requirejs = window.requirejs; /** * Unsee a requirejs module if it exists * @param {String} module The requirejs module name */ function requireUnsee(module) { if (requirejs.has(module)) { requirejs.unsee(module); } } export default function clearContainerCache(context, componentName) { const owner = getOwner(context); const config = owner.resolveRegistration('config:environment'); const appName = get(owner, 'base.name') || get(owner, 'application.name'); const modulePrefix = get(config, 'modulePrefix') || appName; const podModulePrefix = get(config, 'podModulePrefix'); // Invalidate regular module requireUnsee(`${modulePrefix}/components/${componentName}`); requireUnsee(`${modulePrefix}/templates/components/${componentName}`); // Invalidate pod modules requireUnsee(`${podModulePrefix}/components/${componentName}/component`); requireUnsee(`${podModulePrefix}/components/${componentName}/template`); }
3
0.103448
3
0
7fcf0efd09a3f9efe68c65b429174431f1efbbff
fancypages/templates/fancypages/dashboard/layout.html
fancypages/templates/fancypages/dashboard/layout.html
{% extends 'dashboard/layout.html' %} {% load compress %} {% load staticfiles %} {% block body_class %}fancypages{% endblock %} {% block mainstyles %} {% compress css %} <link rel='stylesheet' type='text/less' href="{% static "oscar/less/dashboard.less" %}" /> <link rel='stylesheet' type='text/less' href="{% static "fancypages/less/page-management.less" %}" /> {% endcompress %} {% endblock %} {% block extrascripts %} {{ block.super }} <script type="text/javascript" src="{% static "fancypages/js/wysihtml5/advanced.js" %}"></script> <script type="text/javascript" src="{% static "fancypages/js/wysihtml5/wysihtml5-0.3.0.min.js" %}"></script> {% compress js %} <script src="{% static "oscar/js/elastislide/jquery.elastislide.js" %}" type="text/javascript" charset="utf-8"></script> <script src="{% static "fancypages/js/dashboard.js" %}" type="text/javascript" charset="utf-8"></script> {% endcompress %} {% endblock %}
{% extends 'dashboard/layout.html' %} {% load compress %} {% load staticfiles %} {% block body_class %}fancypages{% endblock %} {% block mainstyles %} {{ block.super }} {% compress css %} <link rel='stylesheet' type='text/less' href="{% static "oscar/less/dashboard.less" %}" /> <link rel='stylesheet' type='text/less' href="{% static "fancypages/less/page-management.less" %}" /> {% endcompress %} {% endblock %} {% block extrascripts %} {{ block.super }} <script type="text/javascript" src="{% static "fancypages/js/wysihtml5/advanced.js" %}"></script> <script type="text/javascript" src="{% static "fancypages/js/wysihtml5/wysihtml5-0.3.0.min.js" %}"></script> {% compress js %} <script src="{% static "oscar/js/elastislide/jquery.elastislide.js" %}" type="text/javascript" charset="utf-8"></script> <script src="{% static "fancypages/js/dashboard.js" %}" type="text/javascript" charset="utf-8"></script> {% endcompress %} {% endblock %}
Fix template issue in dashboard
Fix template issue in dashboard
HTML
bsd-3-clause
tangentlabs/django-oscar-fancypages,tangentlabs/django-oscar-fancypages
html
## Code Before: {% extends 'dashboard/layout.html' %} {% load compress %} {% load staticfiles %} {% block body_class %}fancypages{% endblock %} {% block mainstyles %} {% compress css %} <link rel='stylesheet' type='text/less' href="{% static "oscar/less/dashboard.less" %}" /> <link rel='stylesheet' type='text/less' href="{% static "fancypages/less/page-management.less" %}" /> {% endcompress %} {% endblock %} {% block extrascripts %} {{ block.super }} <script type="text/javascript" src="{% static "fancypages/js/wysihtml5/advanced.js" %}"></script> <script type="text/javascript" src="{% static "fancypages/js/wysihtml5/wysihtml5-0.3.0.min.js" %}"></script> {% compress js %} <script src="{% static "oscar/js/elastislide/jquery.elastislide.js" %}" type="text/javascript" charset="utf-8"></script> <script src="{% static "fancypages/js/dashboard.js" %}" type="text/javascript" charset="utf-8"></script> {% endcompress %} {% endblock %} ## Instruction: Fix template issue in dashboard ## Code After: {% extends 'dashboard/layout.html' %} {% load compress %} {% load staticfiles %} {% block body_class %}fancypages{% endblock %} {% block mainstyles %} {{ block.super }} {% compress css %} <link rel='stylesheet' type='text/less' href="{% static "oscar/less/dashboard.less" %}" /> <link rel='stylesheet' type='text/less' href="{% static "fancypages/less/page-management.less" %}" /> {% endcompress %} {% endblock %} {% block extrascripts %} {{ block.super }} <script type="text/javascript" src="{% static "fancypages/js/wysihtml5/advanced.js" %}"></script> <script type="text/javascript" src="{% static "fancypages/js/wysihtml5/wysihtml5-0.3.0.min.js" %}"></script> {% compress js %} <script src="{% static "oscar/js/elastislide/jquery.elastislide.js" %}" type="text/javascript" charset="utf-8"></script> <script src="{% static "fancypages/js/dashboard.js" %}" type="text/javascript" charset="utf-8"></script> {% endcompress %} {% endblock %}
{% extends 'dashboard/layout.html' %} {% load compress %} {% load staticfiles %} {% block body_class %}fancypages{% endblock %} {% block mainstyles %} + {{ block.super }} {% compress css %} <link rel='stylesheet' type='text/less' href="{% static "oscar/less/dashboard.less" %}" /> <link rel='stylesheet' type='text/less' href="{% static "fancypages/less/page-management.less" %}" /> {% endcompress %} {% endblock %} {% block extrascripts %} {{ block.super }} <script type="text/javascript" src="{% static "fancypages/js/wysihtml5/advanced.js" %}"></script> <script type="text/javascript" src="{% static "fancypages/js/wysihtml5/wysihtml5-0.3.0.min.js" %}"></script> {% compress js %} <script src="{% static "oscar/js/elastislide/jquery.elastislide.js" %}" type="text/javascript" charset="utf-8"></script> <script src="{% static "fancypages/js/dashboard.js" %}" type="text/javascript" charset="utf-8"></script> {% endcompress %} {% endblock %}
1
0.045455
1
0
8cbcc4d4dcca0f784ac23830ae60bad4f5813b5a
src/main/java/com/querins/StockMarket/services/StockService.java
src/main/java/com/querins/StockMarket/services/StockService.java
package com.querins.StockMarket.services; import com.querins.StockMarket.model.Quote; import com.querins.StockMarket.model.Stock; import com.querins.StockMarket.repositories.StockRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.messaging.simp.SimpMessageSendingOperations; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.Random; /** * Created by roman on 26.08.17. */ @Service public class StockService { private SimpMessageSendingOperations template; private StockRepository repository; private static final Random r = new Random(); @Autowired public StockService(StockRepository repository, SimpMessageSendingOperations template) { this.repository = repository; this.template = template; } @Scheduled(fixedDelay = 1000) public void generateQuote() { for( Stock stock: repository.findAll() ) { BigDecimal price = new BigDecimal(r.nextDouble() * 100).setScale(2, RoundingMode.FLOOR); Quote quote = new Quote(stock, price ); template.convertAndSend("/topic.quotes", quote); } } }
package com.querins.StockMarket.services; import com.querins.StockMarket.model.Quote; import com.querins.StockMarket.model.Stock; import com.querins.StockMarket.repositories.StockRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.messaging.simp.SimpMessageSendingOperations; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.Random; /** * Created by roman on 26.08.17. */ @Service public class StockService { private SimpMessageSendingOperations template; private StockRepository repository; private static final Random r = new Random(); @Autowired public StockService(StockRepository repository, SimpMessageSendingOperations template) { this.repository = repository; this.template = template; if( this.repository.count() == 0 ) { this.repository.save(new Stock("Google", 2)); } } @Scheduled(fixedDelay = 1000) public void generateQuote() { for( Stock stock: repository.findAll() ) { BigDecimal price = new BigDecimal(r.nextDouble() * 100).setScale(2, RoundingMode.FLOOR); Quote quote = new Quote(stock, price ); template.convertAndSend("/topic.quotes", quote); } } }
Add some stock to repository if it's empty
Add some stock to repository if it's empty
Java
mit
Querins/StockMarket,Querins/StockMarket,Querins/StockMarket,Querins/StockMarket
java
## Code Before: package com.querins.StockMarket.services; import com.querins.StockMarket.model.Quote; import com.querins.StockMarket.model.Stock; import com.querins.StockMarket.repositories.StockRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.messaging.simp.SimpMessageSendingOperations; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.Random; /** * Created by roman on 26.08.17. */ @Service public class StockService { private SimpMessageSendingOperations template; private StockRepository repository; private static final Random r = new Random(); @Autowired public StockService(StockRepository repository, SimpMessageSendingOperations template) { this.repository = repository; this.template = template; } @Scheduled(fixedDelay = 1000) public void generateQuote() { for( Stock stock: repository.findAll() ) { BigDecimal price = new BigDecimal(r.nextDouble() * 100).setScale(2, RoundingMode.FLOOR); Quote quote = new Quote(stock, price ); template.convertAndSend("/topic.quotes", quote); } } } ## Instruction: Add some stock to repository if it's empty ## Code After: package com.querins.StockMarket.services; import com.querins.StockMarket.model.Quote; import com.querins.StockMarket.model.Stock; import com.querins.StockMarket.repositories.StockRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.messaging.simp.SimpMessageSendingOperations; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.Random; /** * Created by roman on 26.08.17. */ @Service public class StockService { private SimpMessageSendingOperations template; private StockRepository repository; private static final Random r = new Random(); @Autowired public StockService(StockRepository repository, SimpMessageSendingOperations template) { this.repository = repository; this.template = template; if( this.repository.count() == 0 ) { this.repository.save(new Stock("Google", 2)); } } @Scheduled(fixedDelay = 1000) public void generateQuote() { for( Stock stock: repository.findAll() ) { BigDecimal price = new BigDecimal(r.nextDouble() * 100).setScale(2, RoundingMode.FLOOR); Quote quote = new Quote(stock, price ); template.convertAndSend("/topic.quotes", quote); } } }
package com.querins.StockMarket.services; import com.querins.StockMarket.model.Quote; import com.querins.StockMarket.model.Stock; import com.querins.StockMarket.repositories.StockRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.messaging.simp.SimpMessageSendingOperations; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.Random; /** * Created by roman on 26.08.17. */ @Service public class StockService { private SimpMessageSendingOperations template; private StockRepository repository; private static final Random r = new Random(); @Autowired public StockService(StockRepository repository, SimpMessageSendingOperations template) { this.repository = repository; this.template = template; + if( this.repository.count() == 0 ) { + + this.repository.save(new Stock("Google", 2)); + + } + } @Scheduled(fixedDelay = 1000) public void generateQuote() { for( Stock stock: repository.findAll() ) { BigDecimal price = new BigDecimal(r.nextDouble() * 100).setScale(2, RoundingMode.FLOOR); Quote quote = new Quote(stock, price ); template.convertAndSend("/topic.quotes", quote); } } }
6
0.130435
6
0
7a3ade1377fc03ac67e4d5210d56a301be8cd600
cosmic-core/systemvm/scripts/config_auth.sh
cosmic-core/systemvm/scripts/config_auth.sh
BASE_DIR="/var/www/html/copy/template/" HTACCESS="$BASE_DIR/.htaccess" PASSWDFILE="/etc/httpd/.htpasswd" if [ -d /etc/apache2 ] then PASSWDFILE="/etc/apache2/.htpasswd" fi config_htaccess() { mkdir -p $BASE_DIR result=$? echo "Options -Indexes" > $HTACCESS let "result=$result+$?" echo "AuthType Basic" >> $HTACCESS let "result=$result+$?" echo "AuthName \"Authentication Required\"" >> $HTACCESS let "result=$result+$?" echo "AuthUserFile \"$PASSWDFILE\"" >> $HTACCESS let "result=$result+$?" echo "Require valid-user" >> $HTACCESS let "result=$result+$?" return $result } write_passwd() { local user=$1 local passwd=$2 htpasswd -bc $PASSWDFILE $user $passwd return $? } if [ $# -ne 2 ] ; then echo $"Usage: `basename $0` username password " exit 0 fi write_passwd $1 $2 if [ $? -ne 0 ] then echo "Failed to update password" exit 2 fi config_htaccess exit $?
BASE_DIR="/var/www/html/copy/template/" PASSWDFILE="/etc/nginx/upload.htpasswd" write_passwd() { local user=$1 local passwd=$2 htpasswd -bc $PASSWDFILE $user $passwd return $? } if [ $# -ne 2 ] ; then echo $"Usage: `basename $0` username password " exit 0 fi write_passwd $1 $2 if [ $? -ne 0 ] then echo "Failed to update password" exit 2 fi exit $?
Remove all Apache specific stuff
Remove all Apache specific stuff
Shell
apache-2.0
MissionCriticalCloud/cosmic,MissionCriticalCloud/cosmic,MissionCriticalCloud/cosmic,MissionCriticalCloud/cosmic,MissionCriticalCloud/cosmic
shell
## Code Before: BASE_DIR="/var/www/html/copy/template/" HTACCESS="$BASE_DIR/.htaccess" PASSWDFILE="/etc/httpd/.htpasswd" if [ -d /etc/apache2 ] then PASSWDFILE="/etc/apache2/.htpasswd" fi config_htaccess() { mkdir -p $BASE_DIR result=$? echo "Options -Indexes" > $HTACCESS let "result=$result+$?" echo "AuthType Basic" >> $HTACCESS let "result=$result+$?" echo "AuthName \"Authentication Required\"" >> $HTACCESS let "result=$result+$?" echo "AuthUserFile \"$PASSWDFILE\"" >> $HTACCESS let "result=$result+$?" echo "Require valid-user" >> $HTACCESS let "result=$result+$?" return $result } write_passwd() { local user=$1 local passwd=$2 htpasswd -bc $PASSWDFILE $user $passwd return $? } if [ $# -ne 2 ] ; then echo $"Usage: `basename $0` username password " exit 0 fi write_passwd $1 $2 if [ $? -ne 0 ] then echo "Failed to update password" exit 2 fi config_htaccess exit $? ## Instruction: Remove all Apache specific stuff ## Code After: BASE_DIR="/var/www/html/copy/template/" PASSWDFILE="/etc/nginx/upload.htpasswd" write_passwd() { local user=$1 local passwd=$2 htpasswd -bc $PASSWDFILE $user $passwd return $? } if [ $# -ne 2 ] ; then echo $"Usage: `basename $0` username password " exit 0 fi write_passwd $1 $2 if [ $? -ne 0 ] then echo "Failed to update password" exit 2 fi exit $?
BASE_DIR="/var/www/html/copy/template/" - HTACCESS="$BASE_DIR/.htaccess" - - PASSWDFILE="/etc/httpd/.htpasswd" ? ^^^ - + PASSWDFILE="/etc/nginx/upload.htpasswd" ? ^^^^^^^ +++ - if [ -d /etc/apache2 ] - then - PASSWDFILE="/etc/apache2/.htpasswd" - fi - - config_htaccess() { - mkdir -p $BASE_DIR - result=$? - echo "Options -Indexes" > $HTACCESS - let "result=$result+$?" - echo "AuthType Basic" >> $HTACCESS - let "result=$result+$?" - echo "AuthName \"Authentication Required\"" >> $HTACCESS - let "result=$result+$?" - echo "AuthUserFile \"$PASSWDFILE\"" >> $HTACCESS - let "result=$result+$?" - echo "Require valid-user" >> $HTACCESS - let "result=$result+$?" - return $result - } write_passwd() { local user=$1 local passwd=$2 htpasswd -bc $PASSWDFILE $user $passwd return $? } if [ $# -ne 2 ] ; then echo $"Usage: `basename $0` username password " exit 0 fi write_passwd $1 $2 if [ $? -ne 0 ] then echo "Failed to update password" exit 2 fi - - config_htaccess exit $?
26
0.553191
1
25
1caa3cb308afc1fd3ebd274449fe173459936e81
lib/kafka/pending_message.rb
lib/kafka/pending_message.rb
module Kafka class PendingMessage attr_reader :value, :key, :topic, :partition, :partition_key, :create_time, :bytesize def initialize(value, key, topic, partition, partition_key, create_time) @value = value @key = key @topic = topic @partition = partition @partition_key = partition_key @create_time = create_time @bytesize = key.to_s.bytesize + value.to_s.bytesize end end end
module Kafka class PendingMessage attr_reader :value, :key, :topic, :partition, :partition_key, :create_time, :bytesize def initialize(value, key, topic, partition, partition_key, create_time) @value = value @key = key @topic = topic @partition = partition @partition_key = partition_key @create_time = create_time @bytesize = key.to_s.bytesize + value.to_s.bytesize end def ==(other) @value == other.value && @key == other.key && @topic == other.topic && @partition == other.partition && @partition_key == other.partition_key && @create_time == other.create_time && @bytesize == other.bytesize end end end
Support equality checks for Kafka::PendingMessage
Support equality checks for Kafka::PendingMessage
Ruby
apache-2.0
zendesk/ruby-kafka,zendesk/ruby-kafka
ruby
## Code Before: module Kafka class PendingMessage attr_reader :value, :key, :topic, :partition, :partition_key, :create_time, :bytesize def initialize(value, key, topic, partition, partition_key, create_time) @value = value @key = key @topic = topic @partition = partition @partition_key = partition_key @create_time = create_time @bytesize = key.to_s.bytesize + value.to_s.bytesize end end end ## Instruction: Support equality checks for Kafka::PendingMessage ## Code After: module Kafka class PendingMessage attr_reader :value, :key, :topic, :partition, :partition_key, :create_time, :bytesize def initialize(value, key, topic, partition, partition_key, create_time) @value = value @key = key @topic = topic @partition = partition @partition_key = partition_key @create_time = create_time @bytesize = key.to_s.bytesize + value.to_s.bytesize end def ==(other) @value == other.value && @key == other.key && @topic == other.topic && @partition == other.partition && @partition_key == other.partition_key && @create_time == other.create_time && @bytesize == other.bytesize end end end
module Kafka class PendingMessage attr_reader :value, :key, :topic, :partition, :partition_key, :create_time, :bytesize def initialize(value, key, topic, partition, partition_key, create_time) @value = value @key = key @topic = topic @partition = partition @partition_key = partition_key @create_time = create_time @bytesize = key.to_s.bytesize + value.to_s.bytesize end + + def ==(other) + @value == other.value && + @key == other.key && + @topic == other.topic && + @partition == other.partition && + @partition_key == other.partition_key && + @create_time == other.create_time && + @bytesize == other.bytesize + end end end
10
0.666667
10
0
8f34d08c2b896b7bcc53422c0c46dca8dae6398e
config/initializers/spree.rb
config/initializers/spree.rb
Spree.config do |config| # Example: # Uncomment to stop tracking inventory levels in the application # config.track_inventory_levels = false end Spree.user_class = 'Spree::User'
Spree.config do |config| # Example: # Uncomment to stop tracking inventory levels in the application # config.track_inventory_levels = false config.layout = 'spree/layouts/spree_application' config.logo = 'logo/spree_50.png' config.admin_interface_logo = 'admin/logo.png' end Spree.user_class = 'Spree::User'
Fix Spree initializer for backward compability
Fix Spree initializer for backward compability
Ruby
bsd-3-clause
spark-solutions/spark-starter-kit,spark-solutions/spark-starter-kit,spark-solutions/spark-starter-kit
ruby
## Code Before: Spree.config do |config| # Example: # Uncomment to stop tracking inventory levels in the application # config.track_inventory_levels = false end Spree.user_class = 'Spree::User' ## Instruction: Fix Spree initializer for backward compability ## Code After: Spree.config do |config| # Example: # Uncomment to stop tracking inventory levels in the application # config.track_inventory_levels = false config.layout = 'spree/layouts/spree_application' config.logo = 'logo/spree_50.png' config.admin_interface_logo = 'admin/logo.png' end Spree.user_class = 'Spree::User'
Spree.config do |config| # Example: # Uncomment to stop tracking inventory levels in the application # config.track_inventory_levels = false + config.layout = 'spree/layouts/spree_application' + config.logo = 'logo/spree_50.png' + config.admin_interface_logo = 'admin/logo.png' end Spree.user_class = 'Spree::User'
3
0.428571
3
0
fdc1abaed2d3914fe2394bb818d9932c191821b4
bower.json
bower.json
{ "name": "ember-polymer", "dependencies": { "polymer": "Polymer/polymer#1.9.1", "paper-elements": "PolymerElements/paper-elements#1.0.7", "iron-icons": "PolymerElements/iron-icons#1.2.1", "webcomponentsjs": "0.7.24", "vaadin-date-picker": "^1.2.3" } }
{ "name": "ember-polymer", "dependencies": { "paper-button": "PolymerElements/paper-button#^2.0.0", "iron-icons": "PolymerElements/iron-icons#^2.0.1", "polymer": "^2.1.0", "webcomponentsjs": "^1.0.13", "vaadin-date-picker": "^2.0.5" } }
Update Polymer and custom elements to 2.0 🌹
Update Polymer and custom elements to 2.0 🌹
JSON
mit
dunnkers/ember-polymer,dunnkers/ember-polymer
json
## Code Before: { "name": "ember-polymer", "dependencies": { "polymer": "Polymer/polymer#1.9.1", "paper-elements": "PolymerElements/paper-elements#1.0.7", "iron-icons": "PolymerElements/iron-icons#1.2.1", "webcomponentsjs": "0.7.24", "vaadin-date-picker": "^1.2.3" } } ## Instruction: Update Polymer and custom elements to 2.0 🌹 ## Code After: { "name": "ember-polymer", "dependencies": { "paper-button": "PolymerElements/paper-button#^2.0.0", "iron-icons": "PolymerElements/iron-icons#^2.0.1", "polymer": "^2.1.0", "webcomponentsjs": "^1.0.13", "vaadin-date-picker": "^2.0.5" } }
{ "name": "ember-polymer", "dependencies": { - "polymer": "Polymer/polymer#1.9.1", - "paper-elements": "PolymerElements/paper-elements#1.0.7", ? ^^^^^ -- ^^^^^ -- ^ ^ + "paper-button": "PolymerElements/paper-button#^2.0.0", ? ^^^^^ ^^^^^ ^^ ^ - "iron-icons": "PolymerElements/iron-icons#1.2.1", ? ^ ^ + "iron-icons": "PolymerElements/iron-icons#^2.0.1", ? ^^ ^ + "polymer": "^2.1.0", - "webcomponentsjs": "0.7.24", ? ^^^^ + "webcomponentsjs": "^1.0.13", ? +++ ^^ - "vaadin-date-picker": "^1.2.3" ? -- ^ + "vaadin-date-picker": "^2.0.5" ? ^^^ } }
10
1
5
5
e3dcbe5fb142b7ce564a90cf127de418d0a62db3
src/sentry/runner/hacks.py
src/sentry/runner/hacks.py
from __future__ import absolute_import, print_function from sentry.http import get_server_hostname class AllowedHosts(object): # HACK: This is a fake stub for settings.ALLOWED_HOSTS # This is needing since ALLOWED_HOSTS is engrained # in Django internals, so we want this "tuple" to respond # to runtime changes based on our system.url-prefix Option def __iter__(self): yield get_server_hostname() or '*'
from __future__ import absolute_import, print_function from sentry.http import get_server_hostname class AllowedHosts(object): # HACK: This is a fake stub for settings.ALLOWED_HOSTS # This is needing since ALLOWED_HOSTS is engrained # in Django internals, so we want this "tuple" to respond # to runtime changes based on our system.url-prefix Option def __iter__(self): yield get_server_hostname() or '*' def __repr__(self): return repr(tuple(self))
Add a nice repr for AllowedHosts object so the admin makes sense
Add a nice repr for AllowedHosts object so the admin makes sense
Python
bsd-3-clause
fotinakis/sentry,daevaorn/sentry,beeftornado/sentry,daevaorn/sentry,ifduyue/sentry,alexm92/sentry,ifduyue/sentry,JamesMura/sentry,JamesMura/sentry,alexm92/sentry,jean/sentry,BuildingLink/sentry,JackDanger/sentry,gencer/sentry,nicholasserra/sentry,jean/sentry,ifduyue/sentry,mvaled/sentry,ifduyue/sentry,zenefits/sentry,zenefits/sentry,fotinakis/sentry,JamesMura/sentry,gencer/sentry,nicholasserra/sentry,gencer/sentry,mvaled/sentry,looker/sentry,looker/sentry,BuildingLink/sentry,mvaled/sentry,jean/sentry,beeftornado/sentry,mvaled/sentry,JackDanger/sentry,fotinakis/sentry,JamesMura/sentry,mitsuhiko/sentry,looker/sentry,daevaorn/sentry,JamesMura/sentry,mvaled/sentry,mitsuhiko/sentry,ifduyue/sentry,daevaorn/sentry,jean/sentry,nicholasserra/sentry,BuildingLink/sentry,zenefits/sentry,jean/sentry,zenefits/sentry,BuildingLink/sentry,zenefits/sentry,gencer/sentry,looker/sentry,fotinakis/sentry,mvaled/sentry,looker/sentry,JackDanger/sentry,BuildingLink/sentry,gencer/sentry,beeftornado/sentry,alexm92/sentry
python
## Code Before: from __future__ import absolute_import, print_function from sentry.http import get_server_hostname class AllowedHosts(object): # HACK: This is a fake stub for settings.ALLOWED_HOSTS # This is needing since ALLOWED_HOSTS is engrained # in Django internals, so we want this "tuple" to respond # to runtime changes based on our system.url-prefix Option def __iter__(self): yield get_server_hostname() or '*' ## Instruction: Add a nice repr for AllowedHosts object so the admin makes sense ## Code After: from __future__ import absolute_import, print_function from sentry.http import get_server_hostname class AllowedHosts(object): # HACK: This is a fake stub for settings.ALLOWED_HOSTS # This is needing since ALLOWED_HOSTS is engrained # in Django internals, so we want this "tuple" to respond # to runtime changes based on our system.url-prefix Option def __iter__(self): yield get_server_hostname() or '*' def __repr__(self): return repr(tuple(self))
from __future__ import absolute_import, print_function from sentry.http import get_server_hostname class AllowedHosts(object): # HACK: This is a fake stub for settings.ALLOWED_HOSTS # This is needing since ALLOWED_HOSTS is engrained # in Django internals, so we want this "tuple" to respond # to runtime changes based on our system.url-prefix Option def __iter__(self): yield get_server_hostname() or '*' + + def __repr__(self): + return repr(tuple(self))
3
0.25
3
0
b365df1d8331b39a84f1371f2c9207964625470d
cmake/usCTestScript_custom.cmake
cmake/usCTestScript_custom.cmake
find_program(CTEST_COVERAGE_COMMAND NAMES gcov) find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind) find_program(CTEST_GIT_COMMAND NAMES git) set(CTEST_SITE "bigeye") if(WIN32) set(CTEST_DASHBOARD_ROOT "C:/tmp/us") else() set(CTEST_DASHBOARD_ROOT "/tmp/us") set(CTEST_BUILD_FLAGS "-j") #set(CTEST_COMPILER "gcc-4.5") endif() set(CTEST_CONFIGURATION_TYPE Debug) set(CTEST_PARALLEL_LEVEL 4) set(US_TEST_SHARED 1) set(US_TEST_STATIC 1) set(US_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../") set(US_BUILD_CONFIGURATION ) foreach(i RANGE 7) list(APPEND US_BUILD_CONFIGURATION ${i}) endforeach() if(WIN32 AND NOT MINGW) set(US_CMAKE_GENERATOR "Visual Studio 9 2008" "Visual Studio 10" "Visual Studio 11" ) endif() include(${US_SOURCE_DIR}/cmake/usCTestScript.cmake)
find_program(CTEST_COVERAGE_COMMAND NAMES gcov) find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind) find_program(CTEST_GIT_COMMAND NAMES git) set(CTEST_SITE "bigeye") if(WIN32) set(CTEST_DASHBOARD_ROOT "C:/tmp/us") else() set(CTEST_DASHBOARD_ROOT "/tmp/us") set(CTEST_BUILD_FLAGS "-j") #set(CTEST_COMPILER "gcc-4.5") endif() set(CTEST_CONFIGURATION_TYPE Release) set(CTEST_BUILD_CONFIGURATION Release) set(CTEST_PARALLEL_LEVEL 4) set(US_TEST_SHARED 1) set(US_TEST_STATIC 1) set(US_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../") set(US_BUILD_CONFIGURATION ) foreach(i RANGE 7) list(APPEND US_BUILD_CONFIGURATION ${i}) endforeach() if(WIN32 AND NOT MINGW) set(US_CMAKE_GENERATOR "Visual Studio 9 2008" "Visual Studio 10" "Visual Studio 11" ) endif() include(${US_SOURCE_DIR}/cmake/usCTestScript.cmake)
Use Release configuration for ctest scripting.
Use Release configuration for ctest scripting.
CMake
apache-2.0
ksubramz/CppMicroServices,CppMicroServices/CppMicroServices,CppMicroServices/CppMicroServices,ksubramz/CppMicroServices,CppMicroServices/CppMicroServices,ksubramz/CppMicroServices,saschazelzer/CppMicroServices,CppMicroServices/CppMicroServices,ksubramz/CppMicroServices,ksubramz/CppMicroServices,saschazelzer/CppMicroServices,CppMicroServices/CppMicroServices
cmake
## Code Before: find_program(CTEST_COVERAGE_COMMAND NAMES gcov) find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind) find_program(CTEST_GIT_COMMAND NAMES git) set(CTEST_SITE "bigeye") if(WIN32) set(CTEST_DASHBOARD_ROOT "C:/tmp/us") else() set(CTEST_DASHBOARD_ROOT "/tmp/us") set(CTEST_BUILD_FLAGS "-j") #set(CTEST_COMPILER "gcc-4.5") endif() set(CTEST_CONFIGURATION_TYPE Debug) set(CTEST_PARALLEL_LEVEL 4) set(US_TEST_SHARED 1) set(US_TEST_STATIC 1) set(US_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../") set(US_BUILD_CONFIGURATION ) foreach(i RANGE 7) list(APPEND US_BUILD_CONFIGURATION ${i}) endforeach() if(WIN32 AND NOT MINGW) set(US_CMAKE_GENERATOR "Visual Studio 9 2008" "Visual Studio 10" "Visual Studio 11" ) endif() include(${US_SOURCE_DIR}/cmake/usCTestScript.cmake) ## Instruction: Use Release configuration for ctest scripting. ## Code After: find_program(CTEST_COVERAGE_COMMAND NAMES gcov) find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind) find_program(CTEST_GIT_COMMAND NAMES git) set(CTEST_SITE "bigeye") if(WIN32) set(CTEST_DASHBOARD_ROOT "C:/tmp/us") else() set(CTEST_DASHBOARD_ROOT "/tmp/us") set(CTEST_BUILD_FLAGS "-j") #set(CTEST_COMPILER "gcc-4.5") endif() set(CTEST_CONFIGURATION_TYPE Release) set(CTEST_BUILD_CONFIGURATION Release) set(CTEST_PARALLEL_LEVEL 4) set(US_TEST_SHARED 1) set(US_TEST_STATIC 1) set(US_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../") set(US_BUILD_CONFIGURATION ) foreach(i RANGE 7) list(APPEND US_BUILD_CONFIGURATION ${i}) endforeach() if(WIN32 AND NOT MINGW) set(US_CMAKE_GENERATOR "Visual Studio 9 2008" "Visual Studio 10" "Visual Studio 11" ) endif() include(${US_SOURCE_DIR}/cmake/usCTestScript.cmake)
find_program(CTEST_COVERAGE_COMMAND NAMES gcov) find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind) find_program(CTEST_GIT_COMMAND NAMES git) set(CTEST_SITE "bigeye") if(WIN32) set(CTEST_DASHBOARD_ROOT "C:/tmp/us") else() set(CTEST_DASHBOARD_ROOT "/tmp/us") set(CTEST_BUILD_FLAGS "-j") #set(CTEST_COMPILER "gcc-4.5") endif() - set(CTEST_CONFIGURATION_TYPE Debug) ? ^ ^^^ + set(CTEST_CONFIGURATION_TYPE Release) ? ^ ^^^^^ + set(CTEST_BUILD_CONFIGURATION Release) + set(CTEST_PARALLEL_LEVEL 4) set(US_TEST_SHARED 1) set(US_TEST_STATIC 1) set(US_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../") set(US_BUILD_CONFIGURATION ) foreach(i RANGE 7) list(APPEND US_BUILD_CONFIGURATION ${i}) endforeach() if(WIN32 AND NOT MINGW) set(US_CMAKE_GENERATOR "Visual Studio 9 2008" "Visual Studio 10" "Visual Studio 11" ) endif() include(${US_SOURCE_DIR}/cmake/usCTestScript.cmake)
4
0.111111
3
1
01f953fb315dcfee41d8150f929e2a260fdd9c9b
packages/shared/lib/errors.js
packages/shared/lib/errors.js
export const HTTP_ERROR_CODES = { ABORTED: -1, TIMEOUT: 0, UNPROCESSABLE_ENTITY: 422, UNAUTHORIZED: 401, UNLOCK: 403, TOO_MANY_REQUESTS: 429 }; export const API_CUSTOM_ERROR_CODES = { HUMAN_VERIFICATION_REQUIRED: 9001, AUTH_ACCOUNT_DISABLED: 10003, TOKEN_INVALID: 12087 }; export const EVENT_ERRORS = { MAIL: 1, CONTACTS: 2 };
export const HTTP_ERROR_CODES = { ABORTED: -1, TIMEOUT: 0, UNPROCESSABLE_ENTITY: 422, UNAUTHORIZED: 401, UNLOCK: 403, TOO_MANY_REQUESTS: 429 }; export const API_CUSTOM_ERROR_CODES = { APP_VERSION_BAD: 5003, HUMAN_VERIFICATION_REQUIRED: 9001, AUTH_ACCOUNT_DISABLED: 10003, TOKEN_INVALID: 12087 }; export const EVENT_ERRORS = { MAIL: 1, CONTACTS: 2 };
Add app version bad constant
Add app version bad constant
JavaScript
mit
ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient
javascript
## Code Before: export const HTTP_ERROR_CODES = { ABORTED: -1, TIMEOUT: 0, UNPROCESSABLE_ENTITY: 422, UNAUTHORIZED: 401, UNLOCK: 403, TOO_MANY_REQUESTS: 429 }; export const API_CUSTOM_ERROR_CODES = { HUMAN_VERIFICATION_REQUIRED: 9001, AUTH_ACCOUNT_DISABLED: 10003, TOKEN_INVALID: 12087 }; export const EVENT_ERRORS = { MAIL: 1, CONTACTS: 2 }; ## Instruction: Add app version bad constant ## Code After: export const HTTP_ERROR_CODES = { ABORTED: -1, TIMEOUT: 0, UNPROCESSABLE_ENTITY: 422, UNAUTHORIZED: 401, UNLOCK: 403, TOO_MANY_REQUESTS: 429 }; export const API_CUSTOM_ERROR_CODES = { APP_VERSION_BAD: 5003, HUMAN_VERIFICATION_REQUIRED: 9001, AUTH_ACCOUNT_DISABLED: 10003, TOKEN_INVALID: 12087 }; export const EVENT_ERRORS = { MAIL: 1, CONTACTS: 2 };
export const HTTP_ERROR_CODES = { ABORTED: -1, TIMEOUT: 0, UNPROCESSABLE_ENTITY: 422, UNAUTHORIZED: 401, UNLOCK: 403, TOO_MANY_REQUESTS: 429 }; export const API_CUSTOM_ERROR_CODES = { + APP_VERSION_BAD: 5003, HUMAN_VERIFICATION_REQUIRED: 9001, AUTH_ACCOUNT_DISABLED: 10003, TOKEN_INVALID: 12087 }; export const EVENT_ERRORS = { MAIL: 1, CONTACTS: 2 };
1
0.052632
1
0
da050e0319d5f53480df569fa2db7959671d898d
README.md
README.md
The **Ember Material Design** project is an implementation of Material Design in EmberJS. This project attempts to provide a set of reusable, well-tested and accessible UI components based on the Material Design system. This project is as close to a reference implementation of [Angular Material](http://material.angularjs.org) as I could make it. Most of the credit for this work belongs to that team. ## Demo Visit http://mike1234.com/ember-material-design to view the components in action. ## Installation Install the ember-cli addon into project ``` $ ember install:addon ember-material-design ```` This project uses SASS for compiling spreadsheets. Import them into your styles.scss ```sass @import "ember-material-design"; ```
The **Ember Material Design** project is an implementation of Material Design in EmberJS. This project attempts to provide a set of reusable, well-tested and accessible UI components based on the Material Design system. This project is as close to a reference implementation of [Angular Material](http://material.angularjs.org) as I could make it. Most of the credit for this work belongs to that team. ## Demo Visit [Demo Page](http://mike1234.com/ember-material-design) to view the components in action. ## Installation Install the ember-cli addon into project ``` $ ember install ember-material-design ``` This project uses SASS for compiling spreadsheets. Import them into your styles.scss. ```sass @import "ember-material-design"; ``` To use SASS, you will need to either install `broccoli-sass` or `ember-cli-sass`. ``` $ ember install ember-cli-sass ``` This project does not provide any vendor prefixes. It is highly recommended to use an autoprefixer. I prefer to use `ember-cli-autoprefixer` which can be installed as an addon very easily. ``` $ ember install ember-cli-autoprefixer ``` Any variables you want to set should be set prior to importing the `ember-material-design` stylesheet. For example, to change the `$primary` color: ```sass $primary: 'red'; @import "ember-material-design"; ```
Update readme to reflect autoprefixer and sass dependency suggestions
Update readme to reflect autoprefixer and sass dependency suggestions
Markdown
mit
mike1o1/ember-material-design,mike-north/ember-material-design,jhr007/ember-material-design,sumn2u/ember-material-design,mike1o1/ember-material-design,mike-north/ember-material-design,mize85/ember-material-design,sumn2u/ember-material-design,mize85/ember-material-design,jhr007/ember-material-design
markdown
## Code Before: The **Ember Material Design** project is an implementation of Material Design in EmberJS. This project attempts to provide a set of reusable, well-tested and accessible UI components based on the Material Design system. This project is as close to a reference implementation of [Angular Material](http://material.angularjs.org) as I could make it. Most of the credit for this work belongs to that team. ## Demo Visit http://mike1234.com/ember-material-design to view the components in action. ## Installation Install the ember-cli addon into project ``` $ ember install:addon ember-material-design ```` This project uses SASS for compiling spreadsheets. Import them into your styles.scss ```sass @import "ember-material-design"; ``` ## Instruction: Update readme to reflect autoprefixer and sass dependency suggestions ## Code After: The **Ember Material Design** project is an implementation of Material Design in EmberJS. This project attempts to provide a set of reusable, well-tested and accessible UI components based on the Material Design system. This project is as close to a reference implementation of [Angular Material](http://material.angularjs.org) as I could make it. Most of the credit for this work belongs to that team. ## Demo Visit [Demo Page](http://mike1234.com/ember-material-design) to view the components in action. ## Installation Install the ember-cli addon into project ``` $ ember install ember-material-design ``` This project uses SASS for compiling spreadsheets. Import them into your styles.scss. ```sass @import "ember-material-design"; ``` To use SASS, you will need to either install `broccoli-sass` or `ember-cli-sass`. ``` $ ember install ember-cli-sass ``` This project does not provide any vendor prefixes. It is highly recommended to use an autoprefixer. I prefer to use `ember-cli-autoprefixer` which can be installed as an addon very easily. ``` $ ember install ember-cli-autoprefixer ``` Any variables you want to set should be set prior to importing the `ember-material-design` stylesheet. For example, to change the `$primary` color: ```sass $primary: 'red'; @import "ember-material-design"; ```
The **Ember Material Design** project is an implementation of Material Design in EmberJS. This project attempts to provide a set of reusable, well-tested and accessible UI components based on the Material Design system. This project is as close to a reference implementation of [Angular Material](http://material.angularjs.org) as I could make it. Most of the credit for this work belongs to that team. + ## Demo - Visit http://mike1234.com/ember-material-design to view the components in action. + Visit [Demo Page](http://mike1234.com/ember-material-design) to view the components in action. ? ++++++++++++ + ## Installation Install the ember-cli addon into project ``` - $ ember install:addon ember-material-design ? ------ + $ ember install ember-material-design - ```` ? - + ``` - This project uses SASS for compiling spreadsheets. Import them into your styles.scss + This project uses SASS for compiling spreadsheets. Import them into your styles.scss. ? ++ + + ```sass + @import "ember-material-design"; + ``` + To use SASS, you will need to either install `broccoli-sass` or `ember-cli-sass`. + + ``` + $ ember install ember-cli-sass + ``` + + This project does not provide any vendor prefixes. It is highly recommended to use an autoprefixer. I prefer to use `ember-cli-autoprefixer` + which can be installed as an addon very easily. + + ``` + $ ember install ember-cli-autoprefixer + ``` + + Any variables you want to set should be set prior to importing the `ember-material-design` stylesheet. + + For example, to change the `$primary` color: + - ```sass ? - + ```sass + $primary: 'red'; + - @import "ember-material-design"; ? - + @import "ember-material-design"; - ``` ? - + ```
38
1.52
31
7
0d2a48c78ff81a2102432cb5afbcae9e49edfc63
packages/bi/BiobaseHTTPTools.yaml
packages/bi/BiobaseHTTPTools.yaml
homepage: '' changelog-type: '' hash: efba517554cfdbafd583fad9ad8267e76ceb4d9531a36d51f16a9d7506430d22 test-bench-deps: {} maintainer: [email protected] synopsis: Tools to query Bioinformatics HTTP services e.g. Entrez, Ensembl. changelog: '' basic-deps: bytestring: -any base: ! '>=4.5 && <5' text: -any BiobaseFasta: ! '>=0.2.0.0' containers: -any hxt: -any cmdargs: -any either-unwrap: -any BiobaseHTTP: ! '>=1.1.0' all-versions: - 1.0.0 author: Florian Eggenhofer latest: 1.0.0 description-type: haddock description: ! 'BiobaseHTTP provides tools to interface the Bioinformatics REST services, currently Entrez, Ensembl. Usage instructions can be found in the <https://github.com/eggzilla/BiobaseHTTPTools README> Currently following Tools are included: * FetchSequences: Retrieves sequence in fasta format * AccessionToTaxId: Converts NCBI accession number to taxonomy id * GeneIdToGOTerms: Retrieve GOterms for a Ensembl GeneId * GeneIdToUniProtId Retrieves UniProtId for a Ensembl GeneId' license-name: GPL-3.0-only
homepage: '' changelog-type: '' hash: bcee15edcac176830294f6618e751caaa6e3a6449638f719a10fc01578e32baa test-bench-deps: {} maintainer: [email protected] synopsis: Tools to query Bioinformatics HTTP services e.g. Entrez, Ensembl. changelog: '' basic-deps: bytestring: -any base: ! '>=4.5 && <5' text: -any BiobaseFasta: ==0.2.0.0 containers: -any hxt: -any cmdargs: -any either-unwrap: -any BiobaseHTTP: ! '>=1.1.0' all-versions: - 1.0.0 author: Florian Eggenhofer latest: 1.0.0 description-type: haddock description: |- BiobaseHTTP provides tools to interface the Bioinformatics REST services, currently Entrez, Ensembl. Usage instructions can be found in the <https://github.com/eggzilla/BiobaseHTTPTools README> Currently following Tools are included: * FetchSequences: Retrieves sequence in fasta format * AccessionToTaxId: Converts NCBI accession number to taxonomy id * GeneIdToGOTerms: Retrieve GOterms for a Ensembl GeneId * GeneIdToUniProtId Retrieves UniProtId for a Ensembl GeneId license-name: GPL-3.0-only
Update from Hackage at 2019-05-28T05:56:55Z
Update from Hackage at 2019-05-28T05:56:55Z
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: '' changelog-type: '' hash: efba517554cfdbafd583fad9ad8267e76ceb4d9531a36d51f16a9d7506430d22 test-bench-deps: {} maintainer: [email protected] synopsis: Tools to query Bioinformatics HTTP services e.g. Entrez, Ensembl. changelog: '' basic-deps: bytestring: -any base: ! '>=4.5 && <5' text: -any BiobaseFasta: ! '>=0.2.0.0' containers: -any hxt: -any cmdargs: -any either-unwrap: -any BiobaseHTTP: ! '>=1.1.0' all-versions: - 1.0.0 author: Florian Eggenhofer latest: 1.0.0 description-type: haddock description: ! 'BiobaseHTTP provides tools to interface the Bioinformatics REST services, currently Entrez, Ensembl. Usage instructions can be found in the <https://github.com/eggzilla/BiobaseHTTPTools README> Currently following Tools are included: * FetchSequences: Retrieves sequence in fasta format * AccessionToTaxId: Converts NCBI accession number to taxonomy id * GeneIdToGOTerms: Retrieve GOterms for a Ensembl GeneId * GeneIdToUniProtId Retrieves UniProtId for a Ensembl GeneId' license-name: GPL-3.0-only ## Instruction: Update from Hackage at 2019-05-28T05:56:55Z ## Code After: homepage: '' changelog-type: '' hash: bcee15edcac176830294f6618e751caaa6e3a6449638f719a10fc01578e32baa test-bench-deps: {} maintainer: [email protected] synopsis: Tools to query Bioinformatics HTTP services e.g. Entrez, Ensembl. changelog: '' basic-deps: bytestring: -any base: ! '>=4.5 && <5' text: -any BiobaseFasta: ==0.2.0.0 containers: -any hxt: -any cmdargs: -any either-unwrap: -any BiobaseHTTP: ! '>=1.1.0' all-versions: - 1.0.0 author: Florian Eggenhofer latest: 1.0.0 description-type: haddock description: |- BiobaseHTTP provides tools to interface the Bioinformatics REST services, currently Entrez, Ensembl. Usage instructions can be found in the <https://github.com/eggzilla/BiobaseHTTPTools README> Currently following Tools are included: * FetchSequences: Retrieves sequence in fasta format * AccessionToTaxId: Converts NCBI accession number to taxonomy id * GeneIdToGOTerms: Retrieve GOterms for a Ensembl GeneId * GeneIdToUniProtId Retrieves UniProtId for a Ensembl GeneId license-name: GPL-3.0-only
homepage: '' changelog-type: '' - hash: efba517554cfdbafd583fad9ad8267e76ceb4d9531a36d51f16a9d7506430d22 + hash: bcee15edcac176830294f6618e751caaa6e3a6449638f719a10fc01578e32baa test-bench-deps: {} maintainer: [email protected] synopsis: Tools to query Bioinformatics HTTP services e.g. Entrez, Ensembl. changelog: '' basic-deps: bytestring: -any base: ! '>=4.5 && <5' text: -any - BiobaseFasta: ! '>=0.2.0.0' ? ^^^^ - + BiobaseFasta: ==0.2.0.0 ? ^ containers: -any hxt: -any cmdargs: -any either-unwrap: -any BiobaseHTTP: ! '>=1.1.0' all-versions: - 1.0.0 author: Florian Eggenhofer latest: 1.0.0 description-type: haddock + description: |- - description: ! 'BiobaseHTTP provides tools to interface the Bioinformatics REST services, ? ------------ - - + BiobaseHTTP provides tools to interface the Bioinformatics REST services, currently Entrez, Ensembl. ? +++++++++++++++++++++++++++ - currently Entrez, Ensembl. - - Usage instructions can be found in the <https://github.com/eggzilla/BiobaseHTTPTools + Usage instructions can be found in the <https://github.com/eggzilla/BiobaseHTTPTools README> ? ++++++++ - README> - Currently following Tools are included: - * FetchSequences: - Retrieves sequence in fasta format - * AccessionToTaxId: - Converts NCBI accession number to taxonomy id - * GeneIdToGOTerms: - Retrieve GOterms for a Ensembl GeneId - * GeneIdToUniProtId - - Retrieves UniProtId for a Ensembl GeneId' ? - + Retrieves UniProtId for a Ensembl GeneId license-name: GPL-3.0-only
23
0.442308
6
17
25f9a33a2e69a3628dca95bcf99c17903134e5ee
metadata/org.metabrainz.android.yml
metadata/org.metabrainz.android.yml
Categories: - Internet - Multimedia License: GPL-3.0-or-later SourceCode: https://github.com/metabrainz/musicbrainz-android/ IssueTracker: http://tickets.musicbrainz.org/browse/MOBILE Donate: https://metabrainz.org/donate RepoType: git Repo: https://github.com/metabrainz/musicbrainz-android/ Builds: - versionName: '2.4' versionCode: 27 commit: v2.4 subdir: app gradle: - yes AutoUpdateMode: None UpdateCheckMode: Tags
Categories: - Internet - Multimedia License: GPL-3.0-or-later SourceCode: https://github.com/metabrainz/musicbrainz-android/ IssueTracker: http://tickets.musicbrainz.org/browse/MOBILE Donate: https://metabrainz.org/donate AutoName: MusicBrainz RepoType: git Repo: https://github.com/metabrainz/musicbrainz-android/ Builds: - versionName: '2.4' versionCode: 27 commit: v2.4 subdir: app gradle: - yes AutoUpdateMode: None UpdateCheckMode: Tags CurrentVersion: '2.4' CurrentVersionCode: 27
Update CV of MusicBrainz to 2.4 (27)
Update CV of MusicBrainz to 2.4 (27)
YAML
agpl-3.0
f-droid/fdroiddata,f-droid/fdroiddata
yaml
## Code Before: Categories: - Internet - Multimedia License: GPL-3.0-or-later SourceCode: https://github.com/metabrainz/musicbrainz-android/ IssueTracker: http://tickets.musicbrainz.org/browse/MOBILE Donate: https://metabrainz.org/donate RepoType: git Repo: https://github.com/metabrainz/musicbrainz-android/ Builds: - versionName: '2.4' versionCode: 27 commit: v2.4 subdir: app gradle: - yes AutoUpdateMode: None UpdateCheckMode: Tags ## Instruction: Update CV of MusicBrainz to 2.4 (27) ## Code After: Categories: - Internet - Multimedia License: GPL-3.0-or-later SourceCode: https://github.com/metabrainz/musicbrainz-android/ IssueTracker: http://tickets.musicbrainz.org/browse/MOBILE Donate: https://metabrainz.org/donate AutoName: MusicBrainz RepoType: git Repo: https://github.com/metabrainz/musicbrainz-android/ Builds: - versionName: '2.4' versionCode: 27 commit: v2.4 subdir: app gradle: - yes AutoUpdateMode: None UpdateCheckMode: Tags CurrentVersion: '2.4' CurrentVersionCode: 27
Categories: - Internet - Multimedia License: GPL-3.0-or-later SourceCode: https://github.com/metabrainz/musicbrainz-android/ IssueTracker: http://tickets.musicbrainz.org/browse/MOBILE Donate: https://metabrainz.org/donate + + AutoName: MusicBrainz RepoType: git Repo: https://github.com/metabrainz/musicbrainz-android/ Builds: - versionName: '2.4' versionCode: 27 commit: v2.4 subdir: app gradle: - yes AutoUpdateMode: None UpdateCheckMode: Tags + CurrentVersion: '2.4' + CurrentVersionCode: 27
4
0.190476
4
0
96f22912dc92880700cae88feea12c7af87edd48
spec/helpers-spec.coffee
spec/helpers-spec.coffee
describe 'helpers', -> helpers = require('../lib/helpers') beforeEach -> atom.notifications.clear() describe '::error', -> it 'adds an error notification', -> helpers.error(new Error()) expect(atom.notifications.getNotifications().length).toBe(1) describe '::shouldTriggerLinter', -> normalLinter = grammarScopes: ['*'] scope: 'file' lintOnFly: false lint: -> lintOnFly = grammarScopes: ['*'] scope: 'file' lintOnFly: true lint: -> bufferModifying = grammarScopes: ['*'] scope: 'file' lintOnFly: false lint: -> it 'accepts a wildcard grammarScope', -> expect(helpers.shouldTriggerLinter(normalLinter, false, ['*'])).toBe(true) it 'runs lintOnFly ones on both save and lintOnFly', -> expect(helpers.shouldTriggerLinter(lintOnFly, false, ['*'])).toBe(true) expect(helpers.shouldTriggerLinter(lintOnFly, true, ['*'])).toBe(true) it "doesn't run save ones on fly", -> expect(helpers.shouldTriggerLinter(normalLinter, true, ['*'])).toBe(false)
describe 'helpers', -> helpers = require('../lib/helpers') beforeEach -> atom.notifications.clear() describe '::showError', -> it 'adds an error notification', -> helpers.showError(new Error()) expect(atom.notifications.getNotifications().length).toBe(1) describe '::shouldTriggerLinter', -> normalLinter = grammarScopes: ['*'] scope: 'file' lintOnFly: false lint: -> lintOnFly = grammarScopes: ['*'] scope: 'file' lintOnFly: true lint: -> bufferModifying = grammarScopes: ['*'] scope: 'file' lintOnFly: false lint: -> it 'accepts a wildcard grammarScope', -> expect(helpers.shouldTriggerLinter(normalLinter, false, ['*'])).toBe(true) it 'runs lintOnFly ones on both save and lintOnFly', -> expect(helpers.shouldTriggerLinter(lintOnFly, false, ['*'])).toBe(true) expect(helpers.shouldTriggerLinter(lintOnFly, true, ['*'])).toBe(true) it "doesn't run save ones on fly", -> expect(helpers.shouldTriggerLinter(normalLinter, true, ['*'])).toBe(false)
Upgrade helper specs to match latest module
:arrow_up: Upgrade helper specs to match latest module
CoffeeScript
mit
steelbrain/linter,atom-community/linter,AtomLinter/Linter
coffeescript
## Code Before: describe 'helpers', -> helpers = require('../lib/helpers') beforeEach -> atom.notifications.clear() describe '::error', -> it 'adds an error notification', -> helpers.error(new Error()) expect(atom.notifications.getNotifications().length).toBe(1) describe '::shouldTriggerLinter', -> normalLinter = grammarScopes: ['*'] scope: 'file' lintOnFly: false lint: -> lintOnFly = grammarScopes: ['*'] scope: 'file' lintOnFly: true lint: -> bufferModifying = grammarScopes: ['*'] scope: 'file' lintOnFly: false lint: -> it 'accepts a wildcard grammarScope', -> expect(helpers.shouldTriggerLinter(normalLinter, false, ['*'])).toBe(true) it 'runs lintOnFly ones on both save and lintOnFly', -> expect(helpers.shouldTriggerLinter(lintOnFly, false, ['*'])).toBe(true) expect(helpers.shouldTriggerLinter(lintOnFly, true, ['*'])).toBe(true) it "doesn't run save ones on fly", -> expect(helpers.shouldTriggerLinter(normalLinter, true, ['*'])).toBe(false) ## Instruction: :arrow_up: Upgrade helper specs to match latest module ## Code After: describe 'helpers', -> helpers = require('../lib/helpers') beforeEach -> atom.notifications.clear() describe '::showError', -> it 'adds an error notification', -> helpers.showError(new Error()) expect(atom.notifications.getNotifications().length).toBe(1) describe '::shouldTriggerLinter', -> normalLinter = grammarScopes: ['*'] scope: 'file' lintOnFly: false lint: -> lintOnFly = grammarScopes: ['*'] scope: 'file' lintOnFly: true lint: -> bufferModifying = grammarScopes: ['*'] scope: 'file' lintOnFly: false lint: -> it 'accepts a wildcard grammarScope', -> expect(helpers.shouldTriggerLinter(normalLinter, false, ['*'])).toBe(true) it 'runs lintOnFly ones on both save and lintOnFly', -> expect(helpers.shouldTriggerLinter(lintOnFly, false, ['*'])).toBe(true) expect(helpers.shouldTriggerLinter(lintOnFly, true, ['*'])).toBe(true) it "doesn't run save ones on fly", -> expect(helpers.shouldTriggerLinter(normalLinter, true, ['*'])).toBe(false)
describe 'helpers', -> helpers = require('../lib/helpers') beforeEach -> atom.notifications.clear() - describe '::error', -> ? ^ + describe '::showError', -> ? ^^^^^ it 'adds an error notification', -> - helpers.error(new Error()) ? ^ + helpers.showError(new Error()) ? ^^^^^ expect(atom.notifications.getNotifications().length).toBe(1) describe '::shouldTriggerLinter', -> normalLinter = grammarScopes: ['*'] scope: 'file' lintOnFly: false lint: -> lintOnFly = grammarScopes: ['*'] scope: 'file' lintOnFly: true lint: -> bufferModifying = grammarScopes: ['*'] scope: 'file' lintOnFly: false lint: -> it 'accepts a wildcard grammarScope', -> expect(helpers.shouldTriggerLinter(normalLinter, false, ['*'])).toBe(true) it 'runs lintOnFly ones on both save and lintOnFly', -> expect(helpers.shouldTriggerLinter(lintOnFly, false, ['*'])).toBe(true) expect(helpers.shouldTriggerLinter(lintOnFly, true, ['*'])).toBe(true) it "doesn't run save ones on fly", -> expect(helpers.shouldTriggerLinter(normalLinter, true, ['*'])).toBe(false)
4
0.121212
2
2
a5a1688b8e46ea13dd781893b5626a6b13363179
app/lib/manual_section_indexable_formatter.rb
app/lib/manual_section_indexable_formatter.rb
class ManualSectionIndexableFormatter def initialize(section, manual) @section = section @manual = manual end def type "manual_section" end def id link end def indexable_attributes { title: "#{manual.title}: #{section.title}", description: section.summary, link: link, indexable_content: section.body, organisations: [manual.organisation_slug], } end private attr_reader :section, :manual def link section.slug end end
class ManualSectionIndexableFormatter def initialize(section, manual) @section = section @manual = manual end def type "manual_section" end def id link end def indexable_attributes { title: "#{manual.title}: #{section.title}", description: section.summary, link: link, indexable_content: section.body, organisations: [manual.organisation_slug], manual: manual.slug, } end private attr_reader :section, :manual def link section.slug end end
Send manual slug to to rummager for manual sections
Send manual slug to to rummager for manual sections So that search results can be scoped to sections within a manual.
Ruby
mit
ministryofjustice/specialist-publisher,ministryofjustice/specialist-publisher,alphagov/specialist-publisher-rebuild,alphagov/specialist-publisher-rebuild,ministryofjustice/specialist-publisher,alphagov/manuals-publisher,alphagov/specialist-publisher,alphagov/manuals-publisher,ministryofjustice/specialist-publisher,alphagov/manuals-publisher,alphagov/specialist-publisher,alphagov/specialist-publisher,alphagov/specialist-publisher-rebuild,alphagov/specialist-publisher-rebuild
ruby
## Code Before: class ManualSectionIndexableFormatter def initialize(section, manual) @section = section @manual = manual end def type "manual_section" end def id link end def indexable_attributes { title: "#{manual.title}: #{section.title}", description: section.summary, link: link, indexable_content: section.body, organisations: [manual.organisation_slug], } end private attr_reader :section, :manual def link section.slug end end ## Instruction: Send manual slug to to rummager for manual sections So that search results can be scoped to sections within a manual. ## Code After: class ManualSectionIndexableFormatter def initialize(section, manual) @section = section @manual = manual end def type "manual_section" end def id link end def indexable_attributes { title: "#{manual.title}: #{section.title}", description: section.summary, link: link, indexable_content: section.body, organisations: [manual.organisation_slug], manual: manual.slug, } end private attr_reader :section, :manual def link section.slug end end
class ManualSectionIndexableFormatter def initialize(section, manual) @section = section @manual = manual end def type "manual_section" end def id link end def indexable_attributes { title: "#{manual.title}: #{section.title}", description: section.summary, link: link, indexable_content: section.body, organisations: [manual.organisation_slug], + manual: manual.slug, } end private attr_reader :section, :manual def link section.slug end end
1
0.032258
1
0
c3745e7017c1788f4633d09ef4d29a37018b53d3
populus/cli/main.py
populus/cli/main.py
import click @click.group() def main(): """ Populus """ pass
import click CONTEXT_SETTINGS = dict( # Support -h as a shortcut for --help help_option_names=['-h', '--help'], ) @click.group(context_settings=CONTEXT_SETTINGS) def main(): """ Populus """ pass
Support -h as a shortcut for --help
CLI: Support -h as a shortcut for --help
Python
mit
pipermerriam/populus,euri10/populus,euri10/populus,pipermerriam/populus,euri10/populus
python
## Code Before: import click @click.group() def main(): """ Populus """ pass ## Instruction: CLI: Support -h as a shortcut for --help ## Code After: import click CONTEXT_SETTINGS = dict( # Support -h as a shortcut for --help help_option_names=['-h', '--help'], ) @click.group(context_settings=CONTEXT_SETTINGS) def main(): """ Populus """ pass
import click - @click.group() + CONTEXT_SETTINGS = dict( + # Support -h as a shortcut for --help + help_option_names=['-h', '--help'], + ) + + + @click.group(context_settings=CONTEXT_SETTINGS) def main(): """ Populus """ pass
8
0.888889
7
1
d59d22dacd0251ae9f1d833bce2d2c8a01827dae
client/actions/Event.js
client/actions/Event.js
import { createAction } from 'redux-actions' import { createEvent as createAPI, showEvent as showAPI } from '../api/Event' import Actions from '../constants/Actions' import errorUrls from '../constants/ErrorUrls' import ActionDispatch from '../utils/ActionDispatch' export const createEvent = createAction(Actions.Event.createEvent, createAPI) export const showEvent = (id) => { return ActionDispatch.executeApi(showAPI, id, createEvent, errorUrls.pageNotFound) }
import { createAction } from 'redux-actions' import { createEvent as createAPI, showEvent as showAPI } from '../api/Event' import Actions from '../constants/Actions' import errorUrls from '../constants/ErrorUrls' import ActionDispatch from '../utils/ActionDispatch' export const createEvent = createAction(Actions.Event.createEvent, createAPI) export const showEvent = (id) => { return ActionDispatch.executeApi(showAPI, id, createAction(Actions.Event.createEvent), errorUrls.pageNotFound) }
Fix called create API when show API success
Fix called create API when show API success
JavaScript
mit
shinosakarb/tebukuro-client
javascript
## Code Before: import { createAction } from 'redux-actions' import { createEvent as createAPI, showEvent as showAPI } from '../api/Event' import Actions from '../constants/Actions' import errorUrls from '../constants/ErrorUrls' import ActionDispatch from '../utils/ActionDispatch' export const createEvent = createAction(Actions.Event.createEvent, createAPI) export const showEvent = (id) => { return ActionDispatch.executeApi(showAPI, id, createEvent, errorUrls.pageNotFound) } ## Instruction: Fix called create API when show API success ## Code After: import { createAction } from 'redux-actions' import { createEvent as createAPI, showEvent as showAPI } from '../api/Event' import Actions from '../constants/Actions' import errorUrls from '../constants/ErrorUrls' import ActionDispatch from '../utils/ActionDispatch' export const createEvent = createAction(Actions.Event.createEvent, createAPI) export const showEvent = (id) => { return ActionDispatch.executeApi(showAPI, id, createAction(Actions.Event.createEvent), errorUrls.pageNotFound) }
import { createAction } from 'redux-actions' import { createEvent as createAPI, showEvent as showAPI } from '../api/Event' import Actions from '../constants/Actions' import errorUrls from '../constants/ErrorUrls' import ActionDispatch from '../utils/ActionDispatch' export const createEvent = createAction(Actions.Event.createEvent, createAPI) export const showEvent = (id) => { - return ActionDispatch.executeApi(showAPI, id, createEvent, errorUrls.pageNotFound) + return ActionDispatch.executeApi(showAPI, id, createAction(Actions.Event.createEvent), errorUrls.pageNotFound) ? +++++++++++++++ +++++++++++++ }
2
0.181818
1
1
5cd8e9c96657311df7f915ca7e6f2434618164dd
lib/sunspot/mongoid.rb
lib/sunspot/mongoid.rb
require 'sunspot' require 'mongoid' require 'sunspot/rails' # == Examples: # # class Post # include Mongoid::Document # field :title # # include Sunspot::Mongoid # searchable do # text :title # end # end # module Sunspot module Mongoid def self.included(base) base.class_eval do extend Sunspot::Rails::Searchable::ActsAsMethods extend Sunspot::Mongoid::ActsAsMethods Sunspot::Adapters::DataAccessor.register(DataAccessor, base) Sunspot::Adapters::InstanceAdapter.register(InstanceAdapter, base) end end module ActsAsMethods # ClassMethods isn't loaded until searchable is called so we need # call it, then extend our own ClassMethods. def searchable (opt = {}, &block) super extend ClassMethods end end module ClassMethods # The sunspot solr_index method is very dependent on ActiveRecord, so # we'll change it to work more efficiently with Mongoid. def solr_index(opt={}) Sunspot.index!(all) end end class InstanceAdapter < Sunspot::Adapters::InstanceAdapter def id @instance.id end end class DataAccessor < Sunspot::Adapters::DataAccessor def load(id) @clazz.find(id) rescue nil end def load_all(ids) @clazz.where(:_id.in => ids.map { |id| BSON::ObjectId.from_string(id) }) end end end end
require 'sunspot' require 'mongoid' require 'sunspot/rails' # == Examples: # # class Post # include Mongoid::Document # field :title # # include Sunspot::Mongoid # searchable do # text :title # end # end # module Sunspot module Mongoid def self.included(base) base.class_eval do extend Sunspot::Rails::Searchable::ActsAsMethods extend Sunspot::Mongoid::ActsAsMethods Sunspot::Adapters::DataAccessor.register(DataAccessor, base) Sunspot::Adapters::InstanceAdapter.register(InstanceAdapter, base) end end module ActsAsMethods # ClassMethods isn't loaded until searchable is called so we need # call it, then extend our own ClassMethods. def searchable (opt = {}, &block) super extend ClassMethods end end module ClassMethods # The sunspot solr_index method is very dependent on ActiveRecord, so # we'll change it to work more efficiently with Mongoid. def solr_index(opt={}) Sunspot.index!(all) end end class InstanceAdapter < Sunspot::Adapters::InstanceAdapter def id @instance.id end end class DataAccessor < Sunspot::Adapters::DataAccessor def load(id) @clazz.find(BSON::ObjectID.from_string(id)) rescue nil end def load_all(ids) @clazz.where(:_id.in => ids.map { |id| BSON::ObjectId.from_string(id) }) end end end end
Convert id to BSON before loading
Convert id to BSON before loading
Ruby
mit
polcompass/sunspot_mongoid2
ruby
## Code Before: require 'sunspot' require 'mongoid' require 'sunspot/rails' # == Examples: # # class Post # include Mongoid::Document # field :title # # include Sunspot::Mongoid # searchable do # text :title # end # end # module Sunspot module Mongoid def self.included(base) base.class_eval do extend Sunspot::Rails::Searchable::ActsAsMethods extend Sunspot::Mongoid::ActsAsMethods Sunspot::Adapters::DataAccessor.register(DataAccessor, base) Sunspot::Adapters::InstanceAdapter.register(InstanceAdapter, base) end end module ActsAsMethods # ClassMethods isn't loaded until searchable is called so we need # call it, then extend our own ClassMethods. def searchable (opt = {}, &block) super extend ClassMethods end end module ClassMethods # The sunspot solr_index method is very dependent on ActiveRecord, so # we'll change it to work more efficiently with Mongoid. def solr_index(opt={}) Sunspot.index!(all) end end class InstanceAdapter < Sunspot::Adapters::InstanceAdapter def id @instance.id end end class DataAccessor < Sunspot::Adapters::DataAccessor def load(id) @clazz.find(id) rescue nil end def load_all(ids) @clazz.where(:_id.in => ids.map { |id| BSON::ObjectId.from_string(id) }) end end end end ## Instruction: Convert id to BSON before loading ## Code After: require 'sunspot' require 'mongoid' require 'sunspot/rails' # == Examples: # # class Post # include Mongoid::Document # field :title # # include Sunspot::Mongoid # searchable do # text :title # end # end # module Sunspot module Mongoid def self.included(base) base.class_eval do extend Sunspot::Rails::Searchable::ActsAsMethods extend Sunspot::Mongoid::ActsAsMethods Sunspot::Adapters::DataAccessor.register(DataAccessor, base) Sunspot::Adapters::InstanceAdapter.register(InstanceAdapter, base) end end module ActsAsMethods # ClassMethods isn't loaded until searchable is called so we need # call it, then extend our own ClassMethods. def searchable (opt = {}, &block) super extend ClassMethods end end module ClassMethods # The sunspot solr_index method is very dependent on ActiveRecord, so # we'll change it to work more efficiently with Mongoid. def solr_index(opt={}) Sunspot.index!(all) end end class InstanceAdapter < Sunspot::Adapters::InstanceAdapter def id @instance.id end end class DataAccessor < Sunspot::Adapters::DataAccessor def load(id) @clazz.find(BSON::ObjectID.from_string(id)) rescue nil end def load_all(ids) @clazz.where(:_id.in => ids.map { |id| BSON::ObjectId.from_string(id) }) end end end end
require 'sunspot' require 'mongoid' require 'sunspot/rails' # == Examples: # # class Post # include Mongoid::Document # field :title # # include Sunspot::Mongoid # searchable do # text :title # end # end # module Sunspot module Mongoid def self.included(base) base.class_eval do extend Sunspot::Rails::Searchable::ActsAsMethods extend Sunspot::Mongoid::ActsAsMethods Sunspot::Adapters::DataAccessor.register(DataAccessor, base) Sunspot::Adapters::InstanceAdapter.register(InstanceAdapter, base) end end module ActsAsMethods # ClassMethods isn't loaded until searchable is called so we need # call it, then extend our own ClassMethods. def searchable (opt = {}, &block) super extend ClassMethods end end module ClassMethods # The sunspot solr_index method is very dependent on ActiveRecord, so # we'll change it to work more efficiently with Mongoid. def solr_index(opt={}) Sunspot.index!(all) end end class InstanceAdapter < Sunspot::Adapters::InstanceAdapter def id @instance.id end end class DataAccessor < Sunspot::Adapters::DataAccessor def load(id) - @clazz.find(id) rescue nil + @clazz.find(BSON::ObjectID.from_string(id)) rescue nil end def load_all(ids) @clazz.where(:_id.in => ids.map { |id| BSON::ObjectId.from_string(id) }) end end end end
2
0.031746
1
1
0f3203766b843aa4eabaa1e11011a4c945c34e3d
public/index.html
public/index.html
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, user-scalable=no"> <title></title> <link rel="stylesheet" href="./main.css" /> <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300' rel='stylesheet' type='text/css'> </head> <body> <script src="//code.jquery.com/jquery-2.0.3.min.js"></script> <!-- eventually remove jquery ui dependency? --> <script src="//code.jquery.com/ui/1.11.0/jquery-ui.min.js"></script> <script src="./main.js"></script> </body> </html>
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, user-scalable=no"> <title></title> <link rel="stylesheet" href="./main.css" /> <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300' rel='stylesheet' type='text/css'> </head> <body> <!-- Google Tag Manager --> <noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-WDW6V4" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-WDW6V4');</script> <!-- End Google Tag Manager --> <script src="//code.jquery.com/jquery-2.0.3.min.js"></script> <!-- eventually remove jquery ui dependency? --> <script src="//code.jquery.com/ui/1.11.0/jquery-ui.min.js"></script> <script src="./main.js"></script> </body> </html>
Add Google Tag Manager code
Add Google Tag Manager code
HTML
apache-2.0
zooniverse/Planet-Hunters-2
html
## Code Before: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, user-scalable=no"> <title></title> <link rel="stylesheet" href="./main.css" /> <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300' rel='stylesheet' type='text/css'> </head> <body> <script src="//code.jquery.com/jquery-2.0.3.min.js"></script> <!-- eventually remove jquery ui dependency? --> <script src="//code.jquery.com/ui/1.11.0/jquery-ui.min.js"></script> <script src="./main.js"></script> </body> </html> ## Instruction: Add Google Tag Manager code ## Code After: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, user-scalable=no"> <title></title> <link rel="stylesheet" href="./main.css" /> <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300' rel='stylesheet' type='text/css'> </head> <body> <!-- Google Tag Manager --> <noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-WDW6V4" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-WDW6V4');</script> <!-- End Google Tag Manager --> <script src="//code.jquery.com/jquery-2.0.3.min.js"></script> <!-- eventually remove jquery ui dependency? --> <script src="//code.jquery.com/ui/1.11.0/jquery-ui.min.js"></script> <script src="./main.js"></script> </body> </html>
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, user-scalable=no"> <title></title> <link rel="stylesheet" href="./main.css" /> <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300' rel='stylesheet' type='text/css'> </head> <body> + <!-- Google Tag Manager --> + <noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-WDW6V4" + height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> + <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': + new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], + j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= + '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); + })(window,document,'script','dataLayer','GTM-WDW6V4');</script> + <!-- End Google Tag Manager --> <script src="//code.jquery.com/jquery-2.0.3.min.js"></script> <!-- eventually remove jquery ui dependency? --> <script src="//code.jquery.com/ui/1.11.0/jquery-ui.min.js"></script> <script src="./main.js"></script> </body> </html>
9
0.473684
9
0
e81d328cc70720d1cac57b619273f264997ea868
pombola/south_africa/templates/site_header_logo.html
pombola/south_africa/templates/site_header_logo.html
{% load url from future %} <a href="{% url "home" %}" id="logo">Pombola South Africa</a> <div class="about-this-site-menu"> <ul> <li><a href="">About</a></li> <li><a href="">Subscribe</a></li> <li><a href="">Contact us</a></li> </ul> </div>
{% load url from future %} <a href="{% url "home" %}" id="logo">Pombola South Africa</a> <div class="about-this-site-menu"> <ul> <li><a href="{% url 'info_page' slug='about'%}">About</a></li> <li><a href="{% url 'info_page' slug='newsletter'%}">Subscribe</a></li> <li><a href="{% url 'info_page' slug='contact-us'%}">Contact us</a></li> </ul> </div>
Add in urls to links in the header menu
Add in urls to links in the header menu
HTML
agpl-3.0
mysociety/pombola,patricmutwiri/pombola,hzj123/56th,hzj123/56th,mysociety/pombola,hzj123/56th,ken-muturi/pombola,geoffkilpin/pombola,patricmutwiri/pombola,ken-muturi/pombola,geoffkilpin/pombola,mysociety/pombola,mysociety/pombola,patricmutwiri/pombola,hzj123/56th,ken-muturi/pombola,ken-muturi/pombola,ken-muturi/pombola,geoffkilpin/pombola,patricmutwiri/pombola,geoffkilpin/pombola,mysociety/pombola,mysociety/pombola,patricmutwiri/pombola,patricmutwiri/pombola,hzj123/56th,hzj123/56th,geoffkilpin/pombola,ken-muturi/pombola,geoffkilpin/pombola
html
## Code Before: {% load url from future %} <a href="{% url "home" %}" id="logo">Pombola South Africa</a> <div class="about-this-site-menu"> <ul> <li><a href="">About</a></li> <li><a href="">Subscribe</a></li> <li><a href="">Contact us</a></li> </ul> </div> ## Instruction: Add in urls to links in the header menu ## Code After: {% load url from future %} <a href="{% url "home" %}" id="logo">Pombola South Africa</a> <div class="about-this-site-menu"> <ul> <li><a href="{% url 'info_page' slug='about'%}">About</a></li> <li><a href="{% url 'info_page' slug='newsletter'%}">Subscribe</a></li> <li><a href="{% url 'info_page' slug='contact-us'%}">Contact us</a></li> </ul> </div>
{% load url from future %} <a href="{% url "home" %}" id="logo">Pombola South Africa</a> <div class="about-this-site-menu"> <ul> - <li><a href="">About</a></li> - <li><a href="">Subscribe</a></li> - <li><a href="">Contact us</a></li> + <li><a href="{% url 'info_page' slug='about'%}">About</a></li> + <li><a href="{% url 'info_page' slug='newsletter'%}">Subscribe</a></li> + <li><a href="{% url 'info_page' slug='contact-us'%}">Contact us</a></li> </ul> </div>
6
0.6
3
3
05056d99ade4e113419db11c4897fd1157774d81
src/Home.js
src/Home.js
import React, {Component} from "react"; import RaisedButton from "material-ui/RaisedButton"; const styles = { button: { margin: 12, }, } class Home extends Component { render() { return ( <div className="buttons"> <h1>Gregory N. Katchmar</h1> <h2>JavaScript Developer</h2> <hr></hr> <h4>More information at:</h4> <RaisedButton href="https://www.linkedin.com/in/gregory-katchmar-3a48275a" target="_blank" label="LinkedIn" primary={true} style={styles.button} /> <RaisedButton href="https://github.com/gnkatchmar" target="_blank" label="Github" primary={true} style={styles.button} /> <RaisedButton href="https://drive.google.com/open?id=0B-QmArVwrgLGSHJnbFN6VXZGb0k" target="_blank" label="Resume (PDF)" primary={true} style={styles.button} /> <hr></hr> <h4>Contact me at:</h4> <a href="mailto:[email protected]">[email protected]</a> <hr></hr> <p>Last updated August 26, 2017</p> <hr></hr> <p>A React/material-ui site</p> </div> ); } } export default Home;
import React, {Component} from "react"; import RaisedButton from "material-ui/RaisedButton"; const styles = { button: { margin: 12, }, } class Home extends Component { render() { return ( <div className="buttons"> <h1>Gregory N. Katchmar</h1> <h2>JavaScript Developer</h2> <hr></hr> <h4>More information at:</h4> <RaisedButton href="https://www.linkedin.com/in/gregory-katchmar-3a48275a" target="_blank" label="LinkedIn" primary={true} style={styles.button} /> <RaisedButton href="https://github.com/gnkatchmar" target="_blank" label="Github" primary={true} style={styles.button} /> <RaisedButton href="https://drive.google.com/open?id=0B-QmArVwrgLGSHJnbFN6VXZGb0k" target="_blank" label="Resume (PDF)" primary={true} style={styles.button} /> <hr></hr> <h4>Contact me at:</h4> <a href="mailto:[email protected]">[email protected]</a> <hr></hr> <p>Last updated September 6, 2017</p> <hr></hr> <p>A React/material-ui site</p> </div> ); } } export default Home;
Update date change for build
Update date change for build
JavaScript
isc
gnkatchmar/new-gkatchmar,gnkatchmar/new-gkatchmar
javascript
## Code Before: import React, {Component} from "react"; import RaisedButton from "material-ui/RaisedButton"; const styles = { button: { margin: 12, }, } class Home extends Component { render() { return ( <div className="buttons"> <h1>Gregory N. Katchmar</h1> <h2>JavaScript Developer</h2> <hr></hr> <h4>More information at:</h4> <RaisedButton href="https://www.linkedin.com/in/gregory-katchmar-3a48275a" target="_blank" label="LinkedIn" primary={true} style={styles.button} /> <RaisedButton href="https://github.com/gnkatchmar" target="_blank" label="Github" primary={true} style={styles.button} /> <RaisedButton href="https://drive.google.com/open?id=0B-QmArVwrgLGSHJnbFN6VXZGb0k" target="_blank" label="Resume (PDF)" primary={true} style={styles.button} /> <hr></hr> <h4>Contact me at:</h4> <a href="mailto:[email protected]">[email protected]</a> <hr></hr> <p>Last updated August 26, 2017</p> <hr></hr> <p>A React/material-ui site</p> </div> ); } } export default Home; ## Instruction: Update date change for build ## Code After: import React, {Component} from "react"; import RaisedButton from "material-ui/RaisedButton"; const styles = { button: { margin: 12, }, } class Home extends Component { render() { return ( <div className="buttons"> <h1>Gregory N. Katchmar</h1> <h2>JavaScript Developer</h2> <hr></hr> <h4>More information at:</h4> <RaisedButton href="https://www.linkedin.com/in/gregory-katchmar-3a48275a" target="_blank" label="LinkedIn" primary={true} style={styles.button} /> <RaisedButton href="https://github.com/gnkatchmar" target="_blank" label="Github" primary={true} style={styles.button} /> <RaisedButton href="https://drive.google.com/open?id=0B-QmArVwrgLGSHJnbFN6VXZGb0k" target="_blank" label="Resume (PDF)" primary={true} style={styles.button} /> <hr></hr> <h4>Contact me at:</h4> <a href="mailto:[email protected]">[email protected]</a> <hr></hr> <p>Last updated September 6, 2017</p> <hr></hr> <p>A React/material-ui site</p> </div> ); } } export default Home;
import React, {Component} from "react"; import RaisedButton from "material-ui/RaisedButton"; const styles = { button: { margin: 12, }, } class Home extends Component { render() { return ( <div className="buttons"> <h1>Gregory N. Katchmar</h1> <h2>JavaScript Developer</h2> <hr></hr> <h4>More information at:</h4> <RaisedButton href="https://www.linkedin.com/in/gregory-katchmar-3a48275a" target="_blank" label="LinkedIn" primary={true} style={styles.button} /> <RaisedButton href="https://github.com/gnkatchmar" target="_blank" label="Github" primary={true} style={styles.button} /> <RaisedButton href="https://drive.google.com/open?id=0B-QmArVwrgLGSHJnbFN6VXZGb0k" target="_blank" label="Resume (PDF)" primary={true} style={styles.button} /> <hr></hr> <h4>Contact me at:</h4> <a href="mailto:[email protected]">[email protected]</a> <hr></hr> - <p>Last updated August 26, 2017</p> ? ^^^^^ - + <p>Last updated September 6, 2017</p> ? ^^^ +++++ <hr></hr> <p>A React/material-ui site</p> </div> ); } } export default Home;
2
0.039216
1
1
fc8fbf0339555f30e6711595d78398304b5b210c
source/features/clean-rich-text-editor.css
source/features/clean-rich-text-editor.css
/* Hide unnecessary comment toolbar items */ .rgh-clean-rich-text-editor md-mention, .rgh-clean-rich-text-editor md-ref, .rgh-clean-rich-text-editor form#new_issue markdown-toolbar > :nth-last-child(5), .rgh-clean-rich-text-editor form:not(#new_issue) markdown-toolbar > :nth-last-child(4) { /* H1, B, I */ display: none !important; /* Has to override `.d-inline-block` */ }
/* Hide unnecessary comment toolbar items */ .rgh-clean-rich-text-editor md-mention, .rgh-clean-rich-text-editor md-ref, .rgh-clean-rich-text-editor md-header, .rgh-clean-rich-text-editor md-bold, .rgh-clean-rich-text-editor md-italic { display: none !important; /* Has to override `.d-inline-block` */ }
Hide the correct editor buttons on the New Issue page /2
Hide the correct editor buttons on the New Issue page /2 Fixes #2428 again
CSS
mit
busches/refined-github,busches/refined-github,sindresorhus/refined-github,sindresorhus/refined-github
css
## Code Before: /* Hide unnecessary comment toolbar items */ .rgh-clean-rich-text-editor md-mention, .rgh-clean-rich-text-editor md-ref, .rgh-clean-rich-text-editor form#new_issue markdown-toolbar > :nth-last-child(5), .rgh-clean-rich-text-editor form:not(#new_issue) markdown-toolbar > :nth-last-child(4) { /* H1, B, I */ display: none !important; /* Has to override `.d-inline-block` */ } ## Instruction: Hide the correct editor buttons on the New Issue page /2 Fixes #2428 again ## Code After: /* Hide unnecessary comment toolbar items */ .rgh-clean-rich-text-editor md-mention, .rgh-clean-rich-text-editor md-ref, .rgh-clean-rich-text-editor md-header, .rgh-clean-rich-text-editor md-bold, .rgh-clean-rich-text-editor md-italic { display: none !important; /* Has to override `.d-inline-block` */ }
/* Hide unnecessary comment toolbar items */ .rgh-clean-rich-text-editor md-mention, .rgh-clean-rich-text-editor md-ref, - .rgh-clean-rich-text-editor form#new_issue markdown-toolbar > :nth-last-child(5), - .rgh-clean-rich-text-editor form:not(#new_issue) markdown-toolbar > :nth-last-child(4) { /* H1, B, I */ + .rgh-clean-rich-text-editor md-header, + .rgh-clean-rich-text-editor md-bold, + .rgh-clean-rich-text-editor md-italic { display: none !important; /* Has to override `.d-inline-block` */ }
5
0.714286
3
2
77c245240fcccf1c7c6f3251168801de45182b8d
klaxer/__init__.py
klaxer/__init__.py
"""Entry point for all things Klaxer""" __author__ = 'Aru Sahni, Kevin Dwyer, Justin Shelton, Dylan Bernard, Will Schneider, et al' __version__ = '0.0.1' __license__ = 'MIT' APP_NAME = 'Klaxer'
"""Entry point for all things Klaxer""" __author__ = 'Aru Sahni, Kevin Dwyer, Justin Shelton, Dylan Bernard, et al' __version__ = '0.0.1' __license__ = 'MIT' APP_NAME = 'Klaxer'
Adjust author list to only include contributors.
Adjust author list to only include contributors.
Python
mit
klaxer/klaxer
python
## Code Before: """Entry point for all things Klaxer""" __author__ = 'Aru Sahni, Kevin Dwyer, Justin Shelton, Dylan Bernard, Will Schneider, et al' __version__ = '0.0.1' __license__ = 'MIT' APP_NAME = 'Klaxer' ## Instruction: Adjust author list to only include contributors. ## Code After: """Entry point for all things Klaxer""" __author__ = 'Aru Sahni, Kevin Dwyer, Justin Shelton, Dylan Bernard, et al' __version__ = '0.0.1' __license__ = 'MIT' APP_NAME = 'Klaxer'
"""Entry point for all things Klaxer""" - __author__ = 'Aru Sahni, Kevin Dwyer, Justin Shelton, Dylan Bernard, Will Schneider, et al' ? ---------------- + __author__ = 'Aru Sahni, Kevin Dwyer, Justin Shelton, Dylan Bernard, et al' __version__ = '0.0.1' __license__ = 'MIT' APP_NAME = 'Klaxer'
2
0.285714
1
1
9185fb56b748fe8dcf0d4e9d1b81880d335ec704
src/HaskellWorks/Data/Vector/Storable.hs
src/HaskellWorks/Data/Vector/Storable.hs
module HaskellWorks.Data.Vector.Storable where import Data.Word import qualified Data.ByteString.Internal as BSI import qualified Data.Vector.Storable as DVS import qualified Foreign.ForeignPtr as F import qualified Foreign.Marshal.Unsafe as F import qualified Foreign.Ptr as F {-# ANN module ("HLint: ignore Redundant do" :: String) #-} padded :: Int -> DVS.Vector Word8 -> DVS.Vector Word8 padded n v = F.unsafeLocalState $ do let (srcFptr, srcOffset, srcLen) = DVS.unsafeToForeignPtr v tgtFptr <- BSI.mallocByteString n F.withForeignPtr srcFptr $ \srcPtr -> do F.withForeignPtr tgtFptr $ \tgtPtr -> do let dataLen = n `min` srcLen let dataPtr = srcPtr `F.plusPtr` srcOffset let padPtr = dataPtr `F.plusPtr` dataLen BSI.memcpy tgtPtr dataPtr (n `min` srcLen) _ <- BSI.memset padPtr 0 $ fromIntegral ((n - srcLen) `max` 0) return $ DVS.unsafeFromForeignPtr tgtFptr 0 n
module HaskellWorks.Data.Vector.Storable where import Data.Word import qualified Data.Vector.Storable as DVS {-# ANN module ("HLint: ignore Redundant do" :: String) #-} padded :: Int -> DVS.Vector Word8 -> DVS.Vector Word8 padded n v = v <> DVS.replicate ((n - DVS.length v) `max` 0) 0 {-# INLINE padded #-}
Use simpler definition and rely on vector fusion to optimise. (Fingers crossed)
Use simpler definition and rely on vector fusion to optimise. (Fingers crossed)
Haskell
bsd-3-clause
haskell-works/hw-prim
haskell
## Code Before: module HaskellWorks.Data.Vector.Storable where import Data.Word import qualified Data.ByteString.Internal as BSI import qualified Data.Vector.Storable as DVS import qualified Foreign.ForeignPtr as F import qualified Foreign.Marshal.Unsafe as F import qualified Foreign.Ptr as F {-# ANN module ("HLint: ignore Redundant do" :: String) #-} padded :: Int -> DVS.Vector Word8 -> DVS.Vector Word8 padded n v = F.unsafeLocalState $ do let (srcFptr, srcOffset, srcLen) = DVS.unsafeToForeignPtr v tgtFptr <- BSI.mallocByteString n F.withForeignPtr srcFptr $ \srcPtr -> do F.withForeignPtr tgtFptr $ \tgtPtr -> do let dataLen = n `min` srcLen let dataPtr = srcPtr `F.plusPtr` srcOffset let padPtr = dataPtr `F.plusPtr` dataLen BSI.memcpy tgtPtr dataPtr (n `min` srcLen) _ <- BSI.memset padPtr 0 $ fromIntegral ((n - srcLen) `max` 0) return $ DVS.unsafeFromForeignPtr tgtFptr 0 n ## Instruction: Use simpler definition and rely on vector fusion to optimise. (Fingers crossed) ## Code After: module HaskellWorks.Data.Vector.Storable where import Data.Word import qualified Data.Vector.Storable as DVS {-# ANN module ("HLint: ignore Redundant do" :: String) #-} padded :: Int -> DVS.Vector Word8 -> DVS.Vector Word8 padded n v = v <> DVS.replicate ((n - DVS.length v) `max` 0) 0 {-# INLINE padded #-}
module HaskellWorks.Data.Vector.Storable where import Data.Word - import qualified Data.ByteString.Internal as BSI - import qualified Data.Vector.Storable as DVS ? ---- + import qualified Data.Vector.Storable as DVS - import qualified Foreign.ForeignPtr as F - import qualified Foreign.Marshal.Unsafe as F - import qualified Foreign.Ptr as F {-# ANN module ("HLint: ignore Redundant do" :: String) #-} padded :: Int -> DVS.Vector Word8 -> DVS.Vector Word8 + padded n v = v <> DVS.replicate ((n - DVS.length v) `max` 0) 0 + {-# INLINE padded #-} - padded n v = F.unsafeLocalState $ do - let (srcFptr, srcOffset, srcLen) = DVS.unsafeToForeignPtr v - tgtFptr <- BSI.mallocByteString n - F.withForeignPtr srcFptr $ \srcPtr -> do - F.withForeignPtr tgtFptr $ \tgtPtr -> do - let dataLen = n `min` srcLen - let dataPtr = srcPtr `F.plusPtr` srcOffset - let padPtr = dataPtr `F.plusPtr` dataLen - BSI.memcpy tgtPtr dataPtr (n `min` srcLen) - _ <- BSI.memset padPtr 0 $ fromIntegral ((n - srcLen) `max` 0) - return $ DVS.unsafeFromForeignPtr tgtFptr 0 n
19
0.791667
3
16
9d6d0890ba766408644e8bdf0b550be067bcb56d
README.md
README.md
[![Join the chat at https://gitter.im/clarus/coq-hello-world](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/clarus/coq-hello-world?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) A Hello World program in Coq. ## Run Install the extraction library for System effects: opam repo add coq-stable https://github.com/coq/repo-stable.git opam install -j4 coq:io:system Compile the Coq code: ./configure.sh make Compile and execute the generated OCaml: cd extraction/ make ./main.native
[![Join the chat at https://gitter.im/clarus/coq-hello-world](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/clarus/coq-hello-world?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) A Hello World program in Coq. ## Run Install the extraction library for System effects: opam repo add coq-released https://coq.inria.fr/opam/released opam install -j4 coq:io:system Compile the Coq code: ./configure.sh make Compile and execute the generated OCaml: cd extraction/ make ./main.native
Update to the new OPAM repo urls
Update to the new OPAM repo urls
Markdown
mit
coq-io/hello-world
markdown
## Code Before: [![Join the chat at https://gitter.im/clarus/coq-hello-world](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/clarus/coq-hello-world?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) A Hello World program in Coq. ## Run Install the extraction library for System effects: opam repo add coq-stable https://github.com/coq/repo-stable.git opam install -j4 coq:io:system Compile the Coq code: ./configure.sh make Compile and execute the generated OCaml: cd extraction/ make ./main.native ## Instruction: Update to the new OPAM repo urls ## Code After: [![Join the chat at https://gitter.im/clarus/coq-hello-world](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/clarus/coq-hello-world?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) A Hello World program in Coq. ## Run Install the extraction library for System effects: opam repo add coq-released https://coq.inria.fr/opam/released opam install -j4 coq:io:system Compile the Coq code: ./configure.sh make Compile and execute the generated OCaml: cd extraction/ make ./main.native
[![Join the chat at https://gitter.im/clarus/coq-hello-world](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/clarus/coq-hello-world?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) A Hello World program in Coq. ## Run Install the extraction library for System effects: - opam repo add coq-stable https://github.com/coq/repo-stable.git + opam repo add coq-released https://coq.inria.fr/opam/released opam install -j4 coq:io:system Compile the Coq code: ./configure.sh make Compile and execute the generated OCaml: cd extraction/ make ./main.native
2
0.1
1
1
6f079c3fb7366ab72734eb6e978e9ba5b68a45af
trunk/CVSROOT/org.mwc.cmap.plot3d/plugin.xml
trunk/CVSROOT/org.mwc.cmap.plot3d/plugin.xml
<?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.0"?> <plugin> <extension id="org.mwc.debrief.core.editors.DebriefActions" name="DebriefActions" point="org.eclipse.ui.actionSets"> <actionSet id="org.mwc.cmap.plot3d" label="Debrief 3D actions"> <action class="org.mwc.cmap.plot3d.actions.View3d" icon="icons/view3d.gif" id="org.mwc.cmap.plot3d.actions.View3d" label="&amp;View 3d (new)" menubarPath="org.mwc.debrief.core.EditorView/additions" style="push" toolbarPath="org.mwc.debrief.core.EditorView/additions"/> </actionSet> </extension> <extension point="org.eclipse.ui.views"> <view allowMultiple="true" class="org.mwc.cmap.plot3d.views.Plot3dView" icon="icons/view3d.gif" id="org.mwc.cmap.plot3d.views.Plot3dView" name="3D Plot"> </view> </extension> </plugin>
<?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.0"?> <plugin> <extension id="org.mwc.debrief.core.editors.DebriefActions" name="DebriefActions" point="org.eclipse.ui.actionSets"> <actionSet id="org.mwc.cmap.plot3d" label="Debrief 3D actions"> <action class="org.mwc.cmap.plot3d.actions.View3d" icon="icons/view3d.gif" id="org.mwc.cmap.plot3d.actions.View3d" label="&amp;View 3d (new)" menubarPath="org.mwc.debrief.core.EditorView/additions" style="push" toolbarPath="org.mwc.debrief.core.EditorView/additions"/> </actionSet> </extension> <extension point="org.eclipse.ui.views"> <view allowMultiple="true" class="org.mwc.cmap.plot3d.views.Plot3dView" category="org.mwc.cmap.plotViewer.CMAP" icon="icons/view3d.gif" id="org.mwc.cmap.plot3d.views.Plot3dView" name="3D Plot"> </view> </extension> </plugin>
Put us into a better view
Put us into a better view git-svn-id: d2601f1668e3cd2de409f5c059006a6eeada0abf@1130 cb33b658-6c9e-41a7-9690-cba343611204
XML
epl-1.0
theanuradha/debrief,debrief/debrief,debrief/debrief,pecko/debrief,theanuradha/debrief,alastrina123/debrief,debrief/debrief,theanuradha/debrief,alastrina123/debrief,debrief/debrief,pecko/debrief,pecko/debrief,theanuradha/debrief,alastrina123/debrief,theanuradha/debrief,pecko/debrief,debrief/debrief,alastrina123/debrief,theanuradha/debrief,debrief/debrief,alastrina123/debrief,alastrina123/debrief,pecko/debrief,alastrina123/debrief,theanuradha/debrief,pecko/debrief,pecko/debrief
xml
## Code Before: <?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.0"?> <plugin> <extension id="org.mwc.debrief.core.editors.DebriefActions" name="DebriefActions" point="org.eclipse.ui.actionSets"> <actionSet id="org.mwc.cmap.plot3d" label="Debrief 3D actions"> <action class="org.mwc.cmap.plot3d.actions.View3d" icon="icons/view3d.gif" id="org.mwc.cmap.plot3d.actions.View3d" label="&amp;View 3d (new)" menubarPath="org.mwc.debrief.core.EditorView/additions" style="push" toolbarPath="org.mwc.debrief.core.EditorView/additions"/> </actionSet> </extension> <extension point="org.eclipse.ui.views"> <view allowMultiple="true" class="org.mwc.cmap.plot3d.views.Plot3dView" icon="icons/view3d.gif" id="org.mwc.cmap.plot3d.views.Plot3dView" name="3D Plot"> </view> </extension> </plugin> ## Instruction: Put us into a better view git-svn-id: d2601f1668e3cd2de409f5c059006a6eeada0abf@1130 cb33b658-6c9e-41a7-9690-cba343611204 ## Code After: <?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.0"?> <plugin> <extension id="org.mwc.debrief.core.editors.DebriefActions" name="DebriefActions" point="org.eclipse.ui.actionSets"> <actionSet id="org.mwc.cmap.plot3d" label="Debrief 3D actions"> <action class="org.mwc.cmap.plot3d.actions.View3d" icon="icons/view3d.gif" id="org.mwc.cmap.plot3d.actions.View3d" label="&amp;View 3d (new)" menubarPath="org.mwc.debrief.core.EditorView/additions" style="push" toolbarPath="org.mwc.debrief.core.EditorView/additions"/> </actionSet> </extension> <extension point="org.eclipse.ui.views"> <view allowMultiple="true" class="org.mwc.cmap.plot3d.views.Plot3dView" category="org.mwc.cmap.plotViewer.CMAP" icon="icons/view3d.gif" id="org.mwc.cmap.plot3d.views.Plot3dView" name="3D Plot"> </view> </extension> </plugin>
<?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.0"?> <plugin> <extension id="org.mwc.debrief.core.editors.DebriefActions" name="DebriefActions" point="org.eclipse.ui.actionSets"> <actionSet id="org.mwc.cmap.plot3d" label="Debrief 3D actions"> <action class="org.mwc.cmap.plot3d.actions.View3d" icon="icons/view3d.gif" id="org.mwc.cmap.plot3d.actions.View3d" label="&amp;View 3d (new)" menubarPath="org.mwc.debrief.core.EditorView/additions" style="push" toolbarPath="org.mwc.debrief.core.EditorView/additions"/> </actionSet> </extension> <extension point="org.eclipse.ui.views"> <view allowMultiple="true" class="org.mwc.cmap.plot3d.views.Plot3dView" + category="org.mwc.cmap.plotViewer.CMAP" icon="icons/view3d.gif" id="org.mwc.cmap.plot3d.views.Plot3dView" name="3D Plot"> </view> </extension> </plugin>
1
0.03125
1
0
c037f405de773a3c9e9a7affedf2ee154a3c1766
django_q/migrations/0003_auto_20150708_1326.py
django_q/migrations/0003_auto_20150708_1326.py
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('django_q', '0002_auto_20150630_1624'), ] operations = [ migrations.AlterModelOptions( name='failure', options={'verbose_name_plural': 'Failed tasks', 'verbose_name': 'Failed task'}, ), migrations.AlterModelOptions( name='schedule', options={'verbose_name_plural': 'Scheduled tasks', 'ordering': ['next_run'], 'verbose_name': 'Scheduled task'}, ), migrations.AlterModelOptions( name='success', options={'verbose_name_plural': 'Successful tasks', 'verbose_name': 'Successful task'}, ), migrations.AlterField( model_name='task', name='id', field=models.CharField(max_length=32, primary_key=True, editable=False, serialize=False), ), ]
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('django_q', '0002_auto_20150630_1624'), ] operations = [ migrations.AlterModelOptions( name='failure', options={'verbose_name_plural': 'Failed tasks', 'verbose_name': 'Failed task'}, ), migrations.AlterModelOptions( name='schedule', options={'verbose_name_plural': 'Scheduled tasks', 'ordering': ['next_run'], 'verbose_name': 'Scheduled task'}, ), migrations.AlterModelOptions( name='success', options={'verbose_name_plural': 'Successful tasks', 'verbose_name': 'Successful task'}, ), migrations.RemoveField( model_name='task', name='id', ), migrations.AddField( model_name='task', name='id', field=models.CharField(max_length=32, primary_key=True, editable=False, serialize=False), ), ]
Remove and replace task.id field, instead of Alter
Remove and replace task.id field, instead of Alter
Python
mit
Koed00/django-q
python
## Code Before: from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('django_q', '0002_auto_20150630_1624'), ] operations = [ migrations.AlterModelOptions( name='failure', options={'verbose_name_plural': 'Failed tasks', 'verbose_name': 'Failed task'}, ), migrations.AlterModelOptions( name='schedule', options={'verbose_name_plural': 'Scheduled tasks', 'ordering': ['next_run'], 'verbose_name': 'Scheduled task'}, ), migrations.AlterModelOptions( name='success', options={'verbose_name_plural': 'Successful tasks', 'verbose_name': 'Successful task'}, ), migrations.AlterField( model_name='task', name='id', field=models.CharField(max_length=32, primary_key=True, editable=False, serialize=False), ), ] ## Instruction: Remove and replace task.id field, instead of Alter ## Code After: from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('django_q', '0002_auto_20150630_1624'), ] operations = [ migrations.AlterModelOptions( name='failure', options={'verbose_name_plural': 'Failed tasks', 'verbose_name': 'Failed task'}, ), migrations.AlterModelOptions( name='schedule', options={'verbose_name_plural': 'Scheduled tasks', 'ordering': ['next_run'], 'verbose_name': 'Scheduled task'}, ), migrations.AlterModelOptions( name='success', options={'verbose_name_plural': 'Successful tasks', 'verbose_name': 'Successful task'}, ), migrations.RemoveField( model_name='task', name='id', ), migrations.AddField( model_name='task', name='id', field=models.CharField(max_length=32, primary_key=True, editable=False, serialize=False), ), ]
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('django_q', '0002_auto_20150630_1624'), ] operations = [ migrations.AlterModelOptions( name='failure', options={'verbose_name_plural': 'Failed tasks', 'verbose_name': 'Failed task'}, ), migrations.AlterModelOptions( name='schedule', options={'verbose_name_plural': 'Scheduled tasks', 'ordering': ['next_run'], 'verbose_name': 'Scheduled task'}, ), migrations.AlterModelOptions( name='success', options={'verbose_name_plural': 'Successful tasks', 'verbose_name': 'Successful task'}, ), + migrations.RemoveField( + model_name='task', + name='id', + ), - migrations.AlterField( ? ^^^^ + migrations.AddField( ? ^^ model_name='task', name='id', field=models.CharField(max_length=32, primary_key=True, editable=False, serialize=False), ), ]
6
0.2
5
1
b35534010040018aa7e146510eecd21b83e2aa41
xos/openstack_observer/steps/sync_instances.yaml
xos/openstack_observer/steps/sync_instances.yaml
--- - hosts: 127.0.0.1 connection: local tasks: - nova_compute: auth_url: {{ endpoint }} login_username: {{ admin_user }} login_password: {{ admin_password }} login_tenant_name: {{ admin_tenant }} name: {{ name }} {% if delete -%} state: absent {% else -%} state: present availability_zone: {{ availability_zone }} image_name: {{ image_name }} wait_for: 200 flavor_name: {{ flavor_name }} user_data: "{{ user_data }}" nics: {% for net in nics %} - net-id: {{ net }} {% endfor %} {% for port in ports %} - port-id: {{ port }} {% endfor %} {% if meta %} meta: {% for k,v in meta.items() %} {{ k }} : "{{ v }}" {% endfor %} {% endif %} {% endif %}
--- - hosts: 127.0.0.1 connection: local tasks: - nova_compute: auth_url: {{ endpoint }} login_username: {{ admin_user }} login_password: {{ admin_password }} login_tenant_name: {{ admin_tenant }} name: {{ name }} {% if delete -%} state: absent {% else -%} state: present availability_zone: {{ availability_zone }} image_name: {{ image_name }} wait_for: 200 flavor_name: {{ flavor_name }} user_data: "{{ user_data }}" config_drive: yes nics: {% for net in nics %} - net-id: {{ net }} {% endfor %} {% for port in ports %} - port-id: {{ port }} {% endfor %} {% if meta %} meta: {% for k,v in meta.items() %} {{ k }} : "{{ v }}" {% endfor %} {% endif %} {% endif %}
Add config drive for metadata
Add config drive for metadata
YAML
apache-2.0
open-cloud/xos,cboling/xos,cboling/xos,open-cloud/xos,cboling/xos,open-cloud/xos,opencord/xos,cboling/xos,cboling/xos,zdw/xos,zdw/xos,opencord/xos,zdw/xos,zdw/xos,opencord/xos
yaml
## Code Before: --- - hosts: 127.0.0.1 connection: local tasks: - nova_compute: auth_url: {{ endpoint }} login_username: {{ admin_user }} login_password: {{ admin_password }} login_tenant_name: {{ admin_tenant }} name: {{ name }} {% if delete -%} state: absent {% else -%} state: present availability_zone: {{ availability_zone }} image_name: {{ image_name }} wait_for: 200 flavor_name: {{ flavor_name }} user_data: "{{ user_data }}" nics: {% for net in nics %} - net-id: {{ net }} {% endfor %} {% for port in ports %} - port-id: {{ port }} {% endfor %} {% if meta %} meta: {% for k,v in meta.items() %} {{ k }} : "{{ v }}" {% endfor %} {% endif %} {% endif %} ## Instruction: Add config drive for metadata ## Code After: --- - hosts: 127.0.0.1 connection: local tasks: - nova_compute: auth_url: {{ endpoint }} login_username: {{ admin_user }} login_password: {{ admin_password }} login_tenant_name: {{ admin_tenant }} name: {{ name }} {% if delete -%} state: absent {% else -%} state: present availability_zone: {{ availability_zone }} image_name: {{ image_name }} wait_for: 200 flavor_name: {{ flavor_name }} user_data: "{{ user_data }}" config_drive: yes nics: {% for net in nics %} - net-id: {{ net }} {% endfor %} {% for port in ports %} - port-id: {{ port }} {% endfor %} {% if meta %} meta: {% for k,v in meta.items() %} {{ k }} : "{{ v }}" {% endfor %} {% endif %} {% endif %}
--- - hosts: 127.0.0.1 connection: local tasks: - nova_compute: auth_url: {{ endpoint }} login_username: {{ admin_user }} login_password: {{ admin_password }} login_tenant_name: {{ admin_tenant }} name: {{ name }} {% if delete -%} state: absent {% else -%} state: present availability_zone: {{ availability_zone }} image_name: {{ image_name }} wait_for: 200 flavor_name: {{ flavor_name }} user_data: "{{ user_data }}" + config_drive: yes nics: {% for net in nics %} - net-id: {{ net }} {% endfor %} {% for port in ports %} - port-id: {{ port }} {% endfor %} {% if meta %} meta: {% for k,v in meta.items() %} {{ k }} : "{{ v }}" {% endfor %} {% endif %} {% endif %}
1
0.029412
1
0
0b83f5a820d824d9c4959844a5cb32f434c2724d
rust/archive-utils/Cargo.toml
rust/archive-utils/Cargo.toml
[package] name = "archive-utils" description = "Utilities for working with file archives" version = "0.0.0" edition = "2021" [features] tar-gz = ["tar", "flate2"] tar-xz = ["tar", "xz2"] tar-zst = ["tar", "zstd"] [dependencies] common = { path = "../common" } path-utils = { path = "../path-utils" } flate2 = { version = "1.0.22", optional = true } tar = { version = "0.4.37", optional = true } xz2 = { version = "0.1.6", optional = true } zip = { version = "0.5.13", optional = true } zstd = { version = "0.11.2", optional = true }
[package] name = "archive-utils" description = "Utilities for working with file archives" version = "0.0.0" edition = "2021" [features] tar-gz = ["tar", "flate2"] tar-xz = ["tar", "xz2"] tar-zst = ["tar", "zstd"] [dependencies] common = { path = "../common" } path-utils = { path = "../path-utils" } flate2 = { version = "1.0.22", optional = true } tar = { version = "0.4.37", optional = true } xz2 = { version = "0.1.6", optional = true } zip = { version = "0.5.13", optional = true, default-features = false, features = [ "deflate", "bzip2", "time", ] } zstd = { version = "0.11.2", optional = true }
Disable the `zstd` feature of `zip` to avoid clash with own import
chore(Rust): Disable the `zstd` feature of `zip` to avoid clash with own import
TOML
apache-2.0
stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila
toml
## Code Before: [package] name = "archive-utils" description = "Utilities for working with file archives" version = "0.0.0" edition = "2021" [features] tar-gz = ["tar", "flate2"] tar-xz = ["tar", "xz2"] tar-zst = ["tar", "zstd"] [dependencies] common = { path = "../common" } path-utils = { path = "../path-utils" } flate2 = { version = "1.0.22", optional = true } tar = { version = "0.4.37", optional = true } xz2 = { version = "0.1.6", optional = true } zip = { version = "0.5.13", optional = true } zstd = { version = "0.11.2", optional = true } ## Instruction: chore(Rust): Disable the `zstd` feature of `zip` to avoid clash with own import ## Code After: [package] name = "archive-utils" description = "Utilities for working with file archives" version = "0.0.0" edition = "2021" [features] tar-gz = ["tar", "flate2"] tar-xz = ["tar", "xz2"] tar-zst = ["tar", "zstd"] [dependencies] common = { path = "../common" } path-utils = { path = "../path-utils" } flate2 = { version = "1.0.22", optional = true } tar = { version = "0.4.37", optional = true } xz2 = { version = "0.1.6", optional = true } zip = { version = "0.5.13", optional = true, default-features = false, features = [ "deflate", "bzip2", "time", ] } zstd = { version = "0.11.2", optional = true }
[package] name = "archive-utils" description = "Utilities for working with file archives" version = "0.0.0" edition = "2021" [features] tar-gz = ["tar", "flate2"] tar-xz = ["tar", "xz2"] tar-zst = ["tar", "zstd"] [dependencies] common = { path = "../common" } path-utils = { path = "../path-utils" } flate2 = { version = "1.0.22", optional = true } tar = { version = "0.4.37", optional = true } xz2 = { version = "0.1.6", optional = true } - zip = { version = "0.5.13", optional = true } + zip = { version = "0.5.13", optional = true, default-features = false, features = [ + "deflate", + "bzip2", + "time", + ] } zstd = { version = "0.11.2", optional = true }
6
0.3
5
1
14e529cb9286378f5d2a1c53a2006f32d5618b54
cmake/AddBoost.cmake
cmake/AddBoost.cmake
set(Boost_USE_MULTITHREADED ON) if(BUILD_SHARED_LIBS) set(Boost_USE_STATIC_LIBS OFF) set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF) add_definitions(-DBOOST_ALL_DYN_LINK) else() set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF) endif() set(GTCLANG_BOOST_COMPONENTS system) find_package(Boost 1.58 COMPONENTS ${GTCLANG_BOOST_COMPONENTS} REQUIRED) dawn_export_package( NAME Boost FOUND ${Boost_FOUND} VERSION "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}" LIBRARIES ${Boost_LIBRARIES} INCLUDE_DIRS ${Boost_INCLUDE_DIRS} DEFINITIONS -DBOOST_ALL_NO_LIB )
find_package(Boost 1.58 REQUIRED) dawn_export_package( NAME Boost FOUND ${Boost_FOUND} VERSION "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}" INCLUDE_DIRS ${Boost_INCLUDE_DIRS} )
Remove boost_system as a dependency (only headers required)
Remove boost_system as a dependency (only headers required)
CMake
mit
MeteoSwiss-APN/dawn,MeteoSwiss-APN/dawn,MeteoSwiss-APN/dawn
cmake
## Code Before: set(Boost_USE_MULTITHREADED ON) if(BUILD_SHARED_LIBS) set(Boost_USE_STATIC_LIBS OFF) set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF) add_definitions(-DBOOST_ALL_DYN_LINK) else() set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF) endif() set(GTCLANG_BOOST_COMPONENTS system) find_package(Boost 1.58 COMPONENTS ${GTCLANG_BOOST_COMPONENTS} REQUIRED) dawn_export_package( NAME Boost FOUND ${Boost_FOUND} VERSION "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}" LIBRARIES ${Boost_LIBRARIES} INCLUDE_DIRS ${Boost_INCLUDE_DIRS} DEFINITIONS -DBOOST_ALL_NO_LIB ) ## Instruction: Remove boost_system as a dependency (only headers required) ## Code After: find_package(Boost 1.58 REQUIRED) dawn_export_package( NAME Boost FOUND ${Boost_FOUND} VERSION "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}" INCLUDE_DIRS ${Boost_INCLUDE_DIRS} )
+ find_package(Boost 1.58 REQUIRED) - set(Boost_USE_MULTITHREADED ON) - if(BUILD_SHARED_LIBS) - set(Boost_USE_STATIC_LIBS OFF) - set(Boost_USE_MULTITHREADED ON) - set(Boost_USE_STATIC_RUNTIME OFF) - add_definitions(-DBOOST_ALL_DYN_LINK) - else() - set(Boost_USE_STATIC_LIBS ON) - set(Boost_USE_MULTITHREADED ON) - set(Boost_USE_STATIC_RUNTIME OFF) - endif() - - set(GTCLANG_BOOST_COMPONENTS system) - find_package(Boost 1.58 COMPONENTS ${GTCLANG_BOOST_COMPONENTS} REQUIRED) dawn_export_package( NAME Boost FOUND ${Boost_FOUND} VERSION "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}" - LIBRARIES ${Boost_LIBRARIES} INCLUDE_DIRS ${Boost_INCLUDE_DIRS} - DEFINITIONS -DBOOST_ALL_NO_LIB )
17
0.708333
1
16
80fa5e4f89d4e0f860a4613d382f6d8c38a91994
tmuxinator/blog.yml
tmuxinator/blog.yml
name: blog root: ~/blogs/paulfioravanti.github.io on_project_first_start: - bundle install - bundle update - open --background https://analytics.google.com/analytics - open --background https://paulfioravanti.disqus.com - open --background http://localhost:4000 # Grip - open --background http://localhost:6419 # Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. pre_window: - asdf local ruby 2.5.0 - asdf local nodejs 9.6.1 # Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. startup_window: editor windows: - editor: vim - guard: bundle exec guard - server: bundle exec jekyll liveserve --drafts - grip: grip
<% jekyll_port = 5000 %> <% grip_port = 6419 %> name: blog root: ~/blogs/paulfioravanti.github.io on_project_first_start: - bundle install - bundle update - open --background https://analytics.google.com/analytics - open --background https://paulfioravanti.disqus.com # Jekyll server - open --background http://localhost:<%= jekyll_port %> # Grip server - open --background http://localhost:<%= grip_port %> # Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. pre_window: - asdf local ruby 2.5.0 - asdf local nodejs 9.6.1 # Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. startup_window: editor windows: - editor: vim - guard: bundle exec guard - server: bundle exec jekyll liveserve --drafts --port <%= jekyll_port %> - grip: grip
Change Jekyll server port so it doesn't conflict with Phoenix
Change Jekyll server port so it doesn't conflict with Phoenix
YAML
mit
paulfioravanti/dotfiles,paulfioravanti/dotfiles,paulfioravanti/dotfiles
yaml
## Code Before: name: blog root: ~/blogs/paulfioravanti.github.io on_project_first_start: - bundle install - bundle update - open --background https://analytics.google.com/analytics - open --background https://paulfioravanti.disqus.com - open --background http://localhost:4000 # Grip - open --background http://localhost:6419 # Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. pre_window: - asdf local ruby 2.5.0 - asdf local nodejs 9.6.1 # Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. startup_window: editor windows: - editor: vim - guard: bundle exec guard - server: bundle exec jekyll liveserve --drafts - grip: grip ## Instruction: Change Jekyll server port so it doesn't conflict with Phoenix ## Code After: <% jekyll_port = 5000 %> <% grip_port = 6419 %> name: blog root: ~/blogs/paulfioravanti.github.io on_project_first_start: - bundle install - bundle update - open --background https://analytics.google.com/analytics - open --background https://paulfioravanti.disqus.com # Jekyll server - open --background http://localhost:<%= jekyll_port %> # Grip server - open --background http://localhost:<%= grip_port %> # Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. pre_window: - asdf local ruby 2.5.0 - asdf local nodejs 9.6.1 # Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. startup_window: editor windows: - editor: vim - guard: bundle exec guard - server: bundle exec jekyll liveserve --drafts --port <%= jekyll_port %> - grip: grip
+ + <% jekyll_port = 5000 %> + <% grip_port = 6419 %> name: blog root: ~/blogs/paulfioravanti.github.io on_project_first_start: - bundle install - bundle update - open --background https://analytics.google.com/analytics - open --background https://paulfioravanti.disqus.com + # Jekyll server + - open --background http://localhost:<%= jekyll_port %> + # Grip server - - open --background http://localhost:4000 ? ^^^^ + - open --background http://localhost:<%= grip_port %> ? ^^^^^^^^^^^^^^^^ - # Grip - - open --background http://localhost:6419 # Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. pre_window: - asdf local ruby 2.5.0 - asdf local nodejs 9.6.1 # Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. startup_window: editor windows: - editor: vim - guard: bundle exec guard - - server: bundle exec jekyll liveserve --drafts + - server: bundle exec jekyll liveserve --drafts --port <%= jekyll_port %> ? ++++++++++++++++++++++++++ - grip: grip
12
0.461538
8
4
ebb8364e40feff143e5d96b9b75e558de2116eda
app/views/user/index.html.haml
app/views/user/index.html.haml
%h1 @#{current_user.username} #{link_to("Logout", destroy_user_session_path, method: :delete, style: "float: right;")} %hr{:style => "border-color: grey;"} .col-md-6 = render :partial => "shared/article_entry_form" .col-md-6 %h3 All the articles you have added: - @allArticles.each do |article| = render "shared/article_single", :object => article
%h1 @#{current_user.username} #{link_to(fa_icon("gear"), edit_user_registration_path)} #{link_to("Logout", destroy_user_session_path, method: :delete, style: "float: right;")} %hr{:style => "border-color: grey;"} .col-md-6 = render :partial => "shared/article_entry_form" .col-md-6 %h3 All the articles you have added: - @allArticles.each do |article| = render "shared/article_single", :object => article
Add link to the settings page
Add link to the settings page - where they should be able to export soon - users should be able to change passwords Signed-off-by: Siddharth Kannan <[email protected]>
Haml
mit
icyflame/cutouts,icyflame/cutouts,icyflame/cutouts,icyflame/cutouts,icyflame/cutouts
haml
## Code Before: %h1 @#{current_user.username} #{link_to("Logout", destroy_user_session_path, method: :delete, style: "float: right;")} %hr{:style => "border-color: grey;"} .col-md-6 = render :partial => "shared/article_entry_form" .col-md-6 %h3 All the articles you have added: - @allArticles.each do |article| = render "shared/article_single", :object => article ## Instruction: Add link to the settings page - where they should be able to export soon - users should be able to change passwords Signed-off-by: Siddharth Kannan <[email protected]> ## Code After: %h1 @#{current_user.username} #{link_to(fa_icon("gear"), edit_user_registration_path)} #{link_to("Logout", destroy_user_session_path, method: :delete, style: "float: right;")} %hr{:style => "border-color: grey;"} .col-md-6 = render :partial => "shared/article_entry_form" .col-md-6 %h3 All the articles you have added: - @allArticles.each do |article| = render "shared/article_single", :object => article
%h1 - @#{current_user.username} #{link_to("Logout", destroy_user_session_path, method: :delete, style: "float: right;")} + @#{current_user.username} #{link_to(fa_icon("gear"), edit_user_registration_path)} #{link_to("Logout", destroy_user_session_path, method: :delete, style: "float: right;")} ? +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %hr{:style => "border-color: grey;"} .col-md-6 = render :partial => "shared/article_entry_form" .col-md-6 %h3 All the articles you have added: - @allArticles.each do |article| = render "shared/article_single", :object => article
2
0.153846
1
1
b0aaeb9c5836e8a32daf993d4a198d90f843e54e
src/Kunstmaan/LanguageChooserBundle/LocaleGuesser/UrlLocaleGuesser.php
src/Kunstmaan/LanguageChooserBundle/LocaleGuesser/UrlLocaleGuesser.php
<?php namespace Kunstmaan\LanguageChooserBundle\LocaleGuesser; use Lunetics\LocaleBundle\LocaleGuesser\AbstractLocaleGuesser; use Lunetics\LocaleBundle\Validator\MetaValidator; use Symfony\Component\HttpFoundation\Request; /** * Locale Guesser for detecting the locale in the url * * @author Matthias Breddin <[email protected]> * @author Christophe Willemsen <[email protected]> */ class UrlLocaleGuesser extends AbstractLocaleGuesser { /** * @var MetaValidator */ private $metaValidator; /** * Constructor * * @param MetaValidator $metaValidator MetaValidator */ public function __construct(MetaValidator $metaValidator) { $this->metaValidator = $metaValidator; } /** * Method that guess the locale based on the Url * * @param Request $request * * @return boolean True if locale is detected, false otherwise */ public function guessLocale(Request $request) { $localeValidator = $this->metaValidator; if ($path = $request->attributes->get('path')) { $parts = array_filter(explode("/", $path)); $locale = array_shift($parts); if ($localeValidator->isAllowed($locale)) { $this->identifiedLocale = $locale; return true; } } return false; } }
<?php namespace Kunstmaan\LanguageChooserBundle\LocaleGuesser; use Lunetics\LocaleBundle\LocaleGuesser\AbstractLocaleGuesser; use Lunetics\LocaleBundle\Validator\MetaValidator; use Symfony\Component\HttpFoundation\Request; /** * Locale Guesser for detecting the locale in the url * * @author Matthias Breddin <[email protected]> * @author Christophe Willemsen <[email protected]> */ class UrlLocaleGuesser extends AbstractLocaleGuesser { /** * @var MetaValidator */ private $metaValidator; /** * Constructor * * @param MetaValidator $metaValidator MetaValidator */ public function __construct(MetaValidator $metaValidator) { $this->metaValidator = $metaValidator; } /** * Method that guess the locale based on the Url * * @param Request $request * * @return boolean True if locale is detected, false otherwise */ public function guessLocale(Request $request) { $localeValidator = $this->metaValidator; $path = $request->getPathInfo(); if ($request->attributes->has('path')) { $path = $request->attributes->get('path'); } if (!$path) { return false; } $parts = array_filter(explode("/", $path)); $locale = array_shift($parts); if ($localeValidator->isAllowed($locale)) { $this->identifiedLocale = $locale; return true; } return false; } }
Use request path info as fallback
Use request path info as fallback
PHP
mit
jverdeyen-forks/KunstmaanBundlesCMS,piotrbelina/KunstmaanBundlesCMS,Devolicious/KunstmaanBundlesCMS,woutervandamme/KunstmaanBundlesCMS,zizooboats/KunstmaanBundlesCMS,iBenito/KunstmaanBundlesCMS,kln3wrld/KunstmaanBundlesCMS,roderik/KunstmaanBundlesCMS,Devolicious/KunstmaanBundlesCMS,tarjei/KunstmaanBundlesCMS,jverdeyen-forks/KunstmaanBundlesCMS,mwoynarski/KunstmaanBundlesCMS,JoakimLofgren/KunstmaanBundlesCMS,dbeerten/KunstmaanBundlesCMS,IbeVanmeenen/KunstmaanBundlesCMS,tentwofour/KunstmaanBundlesCMS,jverdeyen-forks/KunstmaanBundlesCMS,mennowame/KunstmaanBundlesCMS,Devolicious/KunstmaanBundlesCMS,dbeerten/KunstmaanBundlesCMS,mlebkowski/KunstmaanBundlesCMS,diskwriter/KunstmaanBundlesCMS,mennowame/KunstmaanBundlesCMS,treeleaf/KunstmaanBundlesCMS,bureaublauwgeel/KunstmaanBundlesCMS,mennowame/KunstmaanBundlesCMS,woutervandamme/KunstmaanBundlesCMS,fchris82/KunstmaanBundlesCMS,virtualize/KunstmaanBundlesCMS,arneruy/KunstmaanBundlesCMS,bureaublauwgeel/KunstmaanBundlesCMS,kimausloos/KunstmaanBundlesCMS,usetreno/KunstmaanBundlesCMS,Sambego/KunstmaanBundlesCMS,FVKVN/KunstmaanBundlesCMS,virtualize/KunstmaanBundlesCMS,tarjei/KunstmaanBundlesCMS,diskwriter/KunstmaanBundlesCMS,wesleylancel/KunstmaanBundlesCMS,BranchBit/KunstmaanBundlesCMS,arneruy/KunstmaanBundlesCMS,woutervandamme/KunstmaanBundlesCMS,Numkil/KunstmaanBundlesCMS,jockri/KunstmaanBundlesCMS,kln3wrld/KunstmaanBundlesCMS,insiders/KunstmaanBundlesCMS,bureaublauwgeel/KunstmaanBundlesCMS,Amrit01/KunstmaanBundlesCMS,tarjei/KunstmaanBundlesCMS,webtown-php/KunstmaanBundlesCMS,bakie/KunstmaanBundlesCMS,diskwriter/KunstmaanBundlesCMS,wame/KunstmaanBundlesCMS,kln3wrld/KunstmaanBundlesCMS,dbeerten/KunstmaanBundlesCMS,treeleaf/KunstmaanBundlesCMS,umeku/KunstmaanBundlesCMS,kln3wrld/KunstmaanBundlesCMS,arsthanea/KunstmaanBundlesCMS,bakie/KunstmaanBundlesCMS,tentwofour/KunstmaanBundlesCMS,Amrit01/KunstmaanBundlesCMS,jverdeyen/KunstmaanBundlesCMS,fchris82/KunstmaanBundlesCMS,arneruy/KunstmaanBundlesCMS,piotrbelina/KunstmaanBundlesCMS,jverdeyen/KunstmaanBundlesCMS,mennowame/KunstmaanBundlesCMS,mwoynarski/KunstmaanBundlesCMS,woutervandamme/KunstmaanBundlesCMS,woutervandamme/KunstmaanBundlesCMS,umeku/KunstmaanBundlesCMS,bureaublauwgeel/KunstmaanBundlesCMS,sandergo90/KunstmaanBundlesCMS,roderik/KunstmaanBundlesCMS,Amrit01/KunstmaanBundlesCMS,jockri/KunstmaanBundlesCMS,JoakimLofgren/KunstmaanBundlesCMS,wesleylancel/KunstmaanBundlesCMS,sandergo90/KunstmaanBundlesCMS,usetreno/KunstmaanBundlesCMS,krispypen/KunstmaanBundlesCMS,umeku/KunstmaanBundlesCMS,mwoynarski/KunstmaanBundlesCMS,wame/KunstmaanBundlesCMS,jverdeyen/KunstmaanBundlesCMS,treeleaf/KunstmaanBundlesCMS,insiders/KunstmaanBundlesCMS,IbeVanmeenen/KunstmaanBundlesCMS,webtown-php/KunstmaanBundlesCMS,hgabka/KunstmaanBundlesCMS,joker806/KunstmaanBundlesCMS,JoakimLofgren/KunstmaanBundlesCMS,wimvds/KunstmaanBundlesCMS,bakie/KunstmaanBundlesCMS,hgabka/KunstmaanBundlesCMS,zizooboats/KunstmaanBundlesCMS,krispypen/KunstmaanBundlesCMS,mlebkowski/KunstmaanBundlesCMS,Devolicious/KunstmaanBundlesCMS,Amrit01/KunstmaanBundlesCMS,arsthanea/KunstmaanBundlesCMS,dbeerten/KunstmaanBundlesCMS,FVKVN/KunstmaanBundlesCMS,umeku/KunstmaanBundlesCMS,zizooboats/KunstmaanBundlesCMS,arneruy/KunstmaanBundlesCMS,BranchBit/KunstmaanBundlesCMS,iBenito/KunstmaanBundlesCMS,tentwofour/KunstmaanBundlesCMS,IbeVanmeenen/KunstmaanBundlesCMS,kimausloos/KunstmaanBundlesCMS,BranchBit/KunstmaanBundlesCMS,joker806/KunstmaanBundlesCMS,jverdeyen/KunstmaanBundlesCMS,insiders/KunstmaanBundlesCMS,kln3wrld/KunstmaanBundlesCMS,hgabka/KunstmaanBundlesCMS,mennowame/KunstmaanBundlesCMS,jockri/KunstmaanBundlesCMS,wesleylancel/KunstmaanBundlesCMS,virtualize/KunstmaanBundlesCMS,Kunstmaan/KunstmaanBundlesCMS,tentwofour/KunstmaanBundlesCMS,usetreno/KunstmaanBundlesCMS,Kunstmaan/KunstmaanBundlesCMS,Kunstmaan/KunstmaanBundlesCMS,arsthanea/KunstmaanBundlesCMS,kimausloos/KunstmaanBundlesCMS,zizooboats/KunstmaanBundlesCMS,krispypen/KunstmaanBundlesCMS,joker806/KunstmaanBundlesCMS,joker806/KunstmaanBundlesCMS,Numkil/KunstmaanBundlesCMS,virtualize/KunstmaanBundlesCMS,sandergo90/KunstmaanBundlesCMS,jockri/KunstmaanBundlesCMS,IbeVanmeenen/KunstmaanBundlesCMS,jverdeyen-forks/KunstmaanBundlesCMS,wimvds/KunstmaanBundlesCMS,krispypen/KunstmaanBundlesCMS,Sambego/KunstmaanBundlesCMS,tarjei/KunstmaanBundlesCMS,webtown-php/KunstmaanBundlesCMS,arsthanea/KunstmaanBundlesCMS,bureaublauwgeel/KunstmaanBundlesCMS,umeku/KunstmaanBundlesCMS,kimausloos/KunstmaanBundlesCMS,hgabka/KunstmaanBundlesCMS,usetreno/KunstmaanBundlesCMS,FVKVN/KunstmaanBundlesCMS,wesleylancel/KunstmaanBundlesCMS,Sambego/KunstmaanBundlesCMS,fchris82/KunstmaanBundlesCMS,hgabka/KunstmaanBundlesCMS,treeleaf/KunstmaanBundlesCMS,wimvds/KunstmaanBundlesCMS,insiders/KunstmaanBundlesCMS,iBenito/KunstmaanBundlesCMS,IbeVanmeenen/KunstmaanBundlesCMS,roderik/KunstmaanBundlesCMS,bakie/KunstmaanBundlesCMS,piotrbelina/KunstmaanBundlesCMS,roderik/KunstmaanBundlesCMS,diskwriter/KunstmaanBundlesCMS,Numkil/KunstmaanBundlesCMS,fchris82/KunstmaanBundlesCMS,webtown-php/KunstmaanBundlesCMS,Kunstmaan/KunstmaanBundlesCMS,webtown-php/KunstmaanBundlesCMS,iBenito/KunstmaanBundlesCMS,wame/KunstmaanBundlesCMS,piotrbelina/KunstmaanBundlesCMS,sandergo90/KunstmaanBundlesCMS,mlebkowski/KunstmaanBundlesCMS,arneruy/KunstmaanBundlesCMS,Numkil/KunstmaanBundlesCMS,wimvds/KunstmaanBundlesCMS,wame/KunstmaanBundlesCMS,mwoynarski/KunstmaanBundlesCMS,JoakimLofgren/KunstmaanBundlesCMS,Sambego/KunstmaanBundlesCMS,BranchBit/KunstmaanBundlesCMS,FVKVN/KunstmaanBundlesCMS,mlebkowski/KunstmaanBundlesCMS
php
## Code Before: <?php namespace Kunstmaan\LanguageChooserBundle\LocaleGuesser; use Lunetics\LocaleBundle\LocaleGuesser\AbstractLocaleGuesser; use Lunetics\LocaleBundle\Validator\MetaValidator; use Symfony\Component\HttpFoundation\Request; /** * Locale Guesser for detecting the locale in the url * * @author Matthias Breddin <[email protected]> * @author Christophe Willemsen <[email protected]> */ class UrlLocaleGuesser extends AbstractLocaleGuesser { /** * @var MetaValidator */ private $metaValidator; /** * Constructor * * @param MetaValidator $metaValidator MetaValidator */ public function __construct(MetaValidator $metaValidator) { $this->metaValidator = $metaValidator; } /** * Method that guess the locale based on the Url * * @param Request $request * * @return boolean True if locale is detected, false otherwise */ public function guessLocale(Request $request) { $localeValidator = $this->metaValidator; if ($path = $request->attributes->get('path')) { $parts = array_filter(explode("/", $path)); $locale = array_shift($parts); if ($localeValidator->isAllowed($locale)) { $this->identifiedLocale = $locale; return true; } } return false; } } ## Instruction: Use request path info as fallback ## Code After: <?php namespace Kunstmaan\LanguageChooserBundle\LocaleGuesser; use Lunetics\LocaleBundle\LocaleGuesser\AbstractLocaleGuesser; use Lunetics\LocaleBundle\Validator\MetaValidator; use Symfony\Component\HttpFoundation\Request; /** * Locale Guesser for detecting the locale in the url * * @author Matthias Breddin <[email protected]> * @author Christophe Willemsen <[email protected]> */ class UrlLocaleGuesser extends AbstractLocaleGuesser { /** * @var MetaValidator */ private $metaValidator; /** * Constructor * * @param MetaValidator $metaValidator MetaValidator */ public function __construct(MetaValidator $metaValidator) { $this->metaValidator = $metaValidator; } /** * Method that guess the locale based on the Url * * @param Request $request * * @return boolean True if locale is detected, false otherwise */ public function guessLocale(Request $request) { $localeValidator = $this->metaValidator; $path = $request->getPathInfo(); if ($request->attributes->has('path')) { $path = $request->attributes->get('path'); } if (!$path) { return false; } $parts = array_filter(explode("/", $path)); $locale = array_shift($parts); if ($localeValidator->isAllowed($locale)) { $this->identifiedLocale = $locale; return true; } return false; } }
<?php namespace Kunstmaan\LanguageChooserBundle\LocaleGuesser; use Lunetics\LocaleBundle\LocaleGuesser\AbstractLocaleGuesser; use Lunetics\LocaleBundle\Validator\MetaValidator; use Symfony\Component\HttpFoundation\Request; /** * Locale Guesser for detecting the locale in the url * * @author Matthias Breddin <[email protected]> * @author Christophe Willemsen <[email protected]> */ class UrlLocaleGuesser extends AbstractLocaleGuesser { /** * @var MetaValidator */ private $metaValidator; /** * Constructor * * @param MetaValidator $metaValidator MetaValidator */ public function __construct(MetaValidator $metaValidator) { $this->metaValidator = $metaValidator; } /** * Method that guess the locale based on the Url * * @param Request $request * * @return boolean True if locale is detected, false otherwise */ public function guessLocale(Request $request) { $localeValidator = $this->metaValidator; - if ($path = $request->attributes->get('path')) { - $parts = array_filter(explode("/", $path)); - $locale = array_shift($parts); - if ($localeValidator->isAllowed($locale)) { - $this->identifiedLocale = $locale; + $path = $request->getPathInfo(); + if ($request->attributes->has('path')) { + $path = $request->attributes->get('path'); + } + if (!$path) { + return false; + } + + $parts = array_filter(explode("/", $path)); + $locale = array_shift($parts); + + if ($localeValidator->isAllowed($locale)) { + $this->identifiedLocale = $locale; + - return true; ? ---- + return true; - } } return false; } }
22
0.4
15
7
38d99c471827c72602bc3d37506dddd8d22a4dbb
plans/control-plane.tf
plans/control-plane.tf
resource "azurerm_resource_group" "controlplane" { name = "codevalet" location = "${var.region}" }
resource "azurerm_resource_group" "controlplane" { name = "codevalet" location = "${var.region}" } resource "azurerm_container_registry" "registry" { name = "codevalet" resource_group_name = "${azurerm_resource_group.controlplane.name}" location = "${azurerm_resource_group.controlplane.location}" admin_enabled = true sku = "Standard" } resource "azurerm_storage_account" "storage" { name = "codevaletstorage" resource_group_name = "${azurerm_resource_group.controlplane.name}" location = "${azurerm_resource_group.controlplane.location}" account_tier = "Standard" account_replication_type = "GRS" }
Add an Azure Container Registry to the infra plane
Add an Azure Container Registry to the infra plane This is not yet being utilized by AKS, but should be
HCL
agpl-3.0
CodeValet/codevalet,CodeValet/codevalet,CodeValet/codevalet
hcl
## Code Before: resource "azurerm_resource_group" "controlplane" { name = "codevalet" location = "${var.region}" } ## Instruction: Add an Azure Container Registry to the infra plane This is not yet being utilized by AKS, but should be ## Code After: resource "azurerm_resource_group" "controlplane" { name = "codevalet" location = "${var.region}" } resource "azurerm_container_registry" "registry" { name = "codevalet" resource_group_name = "${azurerm_resource_group.controlplane.name}" location = "${azurerm_resource_group.controlplane.location}" admin_enabled = true sku = "Standard" } resource "azurerm_storage_account" "storage" { name = "codevaletstorage" resource_group_name = "${azurerm_resource_group.controlplane.name}" location = "${azurerm_resource_group.controlplane.location}" account_tier = "Standard" account_replication_type = "GRS" }
resource "azurerm_resource_group" "controlplane" { name = "codevalet" location = "${var.region}" } + + resource "azurerm_container_registry" "registry" { + name = "codevalet" + resource_group_name = "${azurerm_resource_group.controlplane.name}" + location = "${azurerm_resource_group.controlplane.location}" + admin_enabled = true + sku = "Standard" + } + + resource "azurerm_storage_account" "storage" { + name = "codevaletstorage" + resource_group_name = "${azurerm_resource_group.controlplane.name}" + location = "${azurerm_resource_group.controlplane.location}" + account_tier = "Standard" + account_replication_type = "GRS" + }
16
3.2
16
0
60a4fb6cca234ac057fa74b4bb5f451f7ff1ccfa
README.rst
README.rst
=========== whatsmyrank =========== Office table tennis tournament ranking system. Result of http://bit.ly/pyws-1 * Free software: BSD license Installation ============ :: pip install whatsmyrank Development =========== To run the all tests run:: py.test
=========== whatsmyrank =========== Office table tennis tournament ranking system. Result of http://bit.ly/pyws-1 * Free software: BSD license Installation ============ :: pip install whatsmyrank Development =========== To setup all dependencies:: pip install -r requirements.txt To run the all tests run:: py.test
Add note about setting up development dependencies
Add note about setting up development dependencies
reStructuredText
bsd-2-clause
abele/whatsmyrank,abele/whatsmyrank
restructuredtext
## Code Before: =========== whatsmyrank =========== Office table tennis tournament ranking system. Result of http://bit.ly/pyws-1 * Free software: BSD license Installation ============ :: pip install whatsmyrank Development =========== To run the all tests run:: py.test ## Instruction: Add note about setting up development dependencies ## Code After: =========== whatsmyrank =========== Office table tennis tournament ranking system. Result of http://bit.ly/pyws-1 * Free software: BSD license Installation ============ :: pip install whatsmyrank Development =========== To setup all dependencies:: pip install -r requirements.txt To run the all tests run:: py.test
=========== whatsmyrank =========== Office table tennis tournament ranking system. Result of http://bit.ly/pyws-1 * Free software: BSD license Installation ============ :: pip install whatsmyrank Development =========== + To setup all dependencies:: + + pip install -r requirements.txt To run the all tests run:: py.test
3
0.142857
3
0
d01f0d11ac44ea6e574c06fc57470143dd32809d
web/controllers/issue_controller.ex
web/controllers/issue_controller.ex
defmodule Slax.IssueController do use Slax.Web, :controller plug Slax.Plugs.VerifySlackToken, :issue plug Slax.Plugs.VerifyUser def start(conn, %{"text" => ""}) do text conn, """ *Issue commands:* /issue <org/repo> <issue title> [issue body preceded by a newline] """ end def start(conn, %{"text" => text}) do cond do [_, repo, title, body] = Regex.run(~r/(.+\/[^ ]+) (.*)\n?(.*)?/, text) -> github_response = Github.create_issue(%{ title: title, body: body, repo: repo, access_token: conn.assigns.current_user.github_access_token }) response = case github_response do {:ok, issue_link} -> "Issue created: #{issue_link}" {:error, message} -> "Uh oh! #{message}" end json conn, %{ response_type: "in_channel", text: response } true -> text conn, "Invalid parameters, org/repo combo and title is required" end end end
defmodule Slax.IssueController do use Slax.Web, :controller plug Slax.Plugs.VerifySlackToken, :issue plug Slax.Plugs.VerifyUser def start(conn, %{"text" => ""}) do text conn, """ *Issue commands:* /issue <org/repo> <issue title> [issue body preceded by a newline] """ end def start(conn, %{"text" => text}) do case Regex.run(~r/(.+\/[^ ]+) (.*)\n?(.*)?/, text) do [_, repo, title, body] -> github_response = Github.create_issue(%{ title: title, body: body, repo: repo, access_token: conn.assigns.current_user.github_access_token }) response = case github_response do {:ok, issue_link} -> "Issue created: #{issue_link}" {:error, message} -> "Uh oh! #{message}" end json conn, %{ response_type: "in_channel", text: response } _ -> text conn, "Invalid parameters, org/repo combo and title is required" end end end
Deal with invalid parameters even better
Deal with invalid parameters even better
Elixir
mit
revelrylabs/slax,revelrylabs/slax,revelrylabs/slax
elixir
## Code Before: defmodule Slax.IssueController do use Slax.Web, :controller plug Slax.Plugs.VerifySlackToken, :issue plug Slax.Plugs.VerifyUser def start(conn, %{"text" => ""}) do text conn, """ *Issue commands:* /issue <org/repo> <issue title> [issue body preceded by a newline] """ end def start(conn, %{"text" => text}) do cond do [_, repo, title, body] = Regex.run(~r/(.+\/[^ ]+) (.*)\n?(.*)?/, text) -> github_response = Github.create_issue(%{ title: title, body: body, repo: repo, access_token: conn.assigns.current_user.github_access_token }) response = case github_response do {:ok, issue_link} -> "Issue created: #{issue_link}" {:error, message} -> "Uh oh! #{message}" end json conn, %{ response_type: "in_channel", text: response } true -> text conn, "Invalid parameters, org/repo combo and title is required" end end end ## Instruction: Deal with invalid parameters even better ## Code After: defmodule Slax.IssueController do use Slax.Web, :controller plug Slax.Plugs.VerifySlackToken, :issue plug Slax.Plugs.VerifyUser def start(conn, %{"text" => ""}) do text conn, """ *Issue commands:* /issue <org/repo> <issue title> [issue body preceded by a newline] """ end def start(conn, %{"text" => text}) do case Regex.run(~r/(.+\/[^ ]+) (.*)\n?(.*)?/, text) do [_, repo, title, body] -> github_response = Github.create_issue(%{ title: title, body: body, repo: repo, access_token: conn.assigns.current_user.github_access_token }) response = case github_response do {:ok, issue_link} -> "Issue created: #{issue_link}" {:error, message} -> "Uh oh! #{message}" end json conn, %{ response_type: "in_channel", text: response } _ -> text conn, "Invalid parameters, org/repo combo and title is required" end end end
defmodule Slax.IssueController do use Slax.Web, :controller plug Slax.Plugs.VerifySlackToken, :issue plug Slax.Plugs.VerifyUser def start(conn, %{"text" => ""}) do text conn, """ *Issue commands:* /issue <org/repo> <issue title> [issue body preceded by a newline] """ end def start(conn, %{"text" => text}) do - cond do - [_, repo, title, body] = Regex.run(~r/(.+\/[^ ]+) (.*)\n?(.*)?/, text) -> ? ^^^^^^^ ------------------ ^^ + case Regex.run(~r/(.+\/[^ ]+) (.*)\n?(.*)?/, text) do ? ^^^ ^^ + [_, repo, title, body] -> github_response = Github.create_issue(%{ title: title, body: body, repo: repo, access_token: conn.assigns.current_user.github_access_token }) response = case github_response do {:ok, issue_link} -> "Issue created: #{issue_link}" {:error, message} -> "Uh oh! #{message}" end json conn, %{ response_type: "in_channel", text: response } + - true -> ? ^^^^ + _ -> ? ^ text conn, "Invalid parameters, org/repo combo and title is required" end end end
7
0.189189
4
3
95179e80f1a69c9515ab0c48cb3f6b5056902132
README.md
README.md
Unison File Synchronizer ======================== [![Build Status](https://travis-ci.org/paulp/unison.svg?branch=master)](https://travis-ci.org/paulp/unison) Unison is a file-synchronization tool for OSX, Unix, and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other. If you just want to use Unison, you can probably find a pre-built binary for your architecture either on your favorite package manager or here: http://www.cis.upenn.edu/~bcpierce/unison If you want to play with the internals, have a look at the file src/ROADMAP.txt for some basic orientation.
Unison File Synchronizer ======================== [![Build Status](https://travis-ci.org/bcpierce00/unison.svg?branch=master)](https://travis-ci.org/bcpierce00/unison) Unison is a file-synchronization tool for OSX, Unix, and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other. If you just want to use Unison, you can probably find a pre-built binary for your architecture either on your favorite package manager or here: http://www.cis.upenn.edu/~bcpierce/unison If you want to play with the internals, have a look at the file src/ROADMAP.txt for some basic orientation.
Update the build badge url post-transfer.
Update the build badge url post-transfer.
Markdown
mit
paulp/unison
markdown
## Code Before: Unison File Synchronizer ======================== [![Build Status](https://travis-ci.org/paulp/unison.svg?branch=master)](https://travis-ci.org/paulp/unison) Unison is a file-synchronization tool for OSX, Unix, and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other. If you just want to use Unison, you can probably find a pre-built binary for your architecture either on your favorite package manager or here: http://www.cis.upenn.edu/~bcpierce/unison If you want to play with the internals, have a look at the file src/ROADMAP.txt for some basic orientation. ## Instruction: Update the build badge url post-transfer. ## Code After: Unison File Synchronizer ======================== [![Build Status](https://travis-ci.org/bcpierce00/unison.svg?branch=master)](https://travis-ci.org/bcpierce00/unison) Unison is a file-synchronization tool for OSX, Unix, and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other. If you just want to use Unison, you can probably find a pre-built binary for your architecture either on your favorite package manager or here: http://www.cis.upenn.edu/~bcpierce/unison If you want to play with the internals, have a look at the file src/ROADMAP.txt for some basic orientation.
Unison File Synchronizer ======================== - [![Build Status](https://travis-ci.org/paulp/unison.svg?branch=master)](https://travis-ci.org/paulp/unison) ? ^^^^ ^^^^ + [![Build Status](https://travis-ci.org/bcpierce00/unison.svg?branch=master)](https://travis-ci.org/bcpierce00/unison) ? ++ ^^^^^^^ ++ ^^^^^^^ Unison is a file-synchronization tool for OSX, Unix, and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other. If you just want to use Unison, you can probably find a pre-built binary for your architecture either on your favorite package manager or here: http://www.cis.upenn.edu/~bcpierce/unison If you want to play with the internals, have a look at the file src/ROADMAP.txt for some basic orientation.
2
0.117647
1
1
446ac167053129d2c80033372fb6360ec8f1caa4
lib/twitter_pagination.rb
lib/twitter_pagination.rb
module TwitterPagination # TwitterPagination renderer for (Mislav) WillPaginate Plugin class LinkRenderer < WillPaginate::LinkRenderer def to_html pagination = '' if self.current_page < self.last_page pagination = @template.link_to_remote( 'More', :url => { :controller => @template.controller_name, :action => @template.action_name, :params => @template.params.merge!(:page => self.next_page)}, :method => @template.request.request_method, :html => { :class => 'twitter_pagination' }) end @template.content_tag(:div, pagination, :class => 'pagination', :id => self.html_attributes[:id]) end protected # Get current page number def current_page @collection.current_page end # Get last page number def last_page @last_page ||= WillPaginate::ViewHelpers.total_pages_for_collection(@collection) end # Get next page number def next_page @collection.next_page end end end
module TwitterPagination class LinkRenderer < WillPaginate::ViewHelpers::LinkRenderer protected def next_page previous_or_next_page(@collection.next_page, "More", 'twitter_pagination') end def pagination [ :next_page ] end # Override will_paginate's <tt>link</tt> method since it generates its own <tt>a</tt> # attribute and won't support <tt>:remote => true</tt> def link(text, target, attributes = {}) if target.is_a? Fixnum attributes[:rel] = rel_value(target) target = url(target) end @template.link_to(text, target, attributes.merge(:remote => true)) end end end
Update TwitterPagination class for new will_paginate
Update TwitterPagination class for new will_paginate And just as a side note, "Wow" at the new will_paginate. Made this stupid-easy.
Ruby
mit
tsigo/jugglf,tsigo/jugglf
ruby
## Code Before: module TwitterPagination # TwitterPagination renderer for (Mislav) WillPaginate Plugin class LinkRenderer < WillPaginate::LinkRenderer def to_html pagination = '' if self.current_page < self.last_page pagination = @template.link_to_remote( 'More', :url => { :controller => @template.controller_name, :action => @template.action_name, :params => @template.params.merge!(:page => self.next_page)}, :method => @template.request.request_method, :html => { :class => 'twitter_pagination' }) end @template.content_tag(:div, pagination, :class => 'pagination', :id => self.html_attributes[:id]) end protected # Get current page number def current_page @collection.current_page end # Get last page number def last_page @last_page ||= WillPaginate::ViewHelpers.total_pages_for_collection(@collection) end # Get next page number def next_page @collection.next_page end end end ## Instruction: Update TwitterPagination class for new will_paginate And just as a side note, "Wow" at the new will_paginate. Made this stupid-easy. ## Code After: module TwitterPagination class LinkRenderer < WillPaginate::ViewHelpers::LinkRenderer protected def next_page previous_or_next_page(@collection.next_page, "More", 'twitter_pagination') end def pagination [ :next_page ] end # Override will_paginate's <tt>link</tt> method since it generates its own <tt>a</tt> # attribute and won't support <tt>:remote => true</tt> def link(text, target, attributes = {}) if target.is_a? Fixnum attributes[:rel] = rel_value(target) target = url(target) end @template.link_to(text, target, attributes.merge(:remote => true)) end end end
module TwitterPagination + class LinkRenderer < WillPaginate::ViewHelpers::LinkRenderer + protected + def next_page + previous_or_next_page(@collection.next_page, "More", 'twitter_pagination') - # TwitterPagination renderer for (Mislav) WillPaginate Plugin - class LinkRenderer < WillPaginate::LinkRenderer - - def to_html - pagination = '' - - if self.current_page < self.last_page - pagination = @template.link_to_remote( - 'More', - :url => { :controller => @template.controller_name, - :action => @template.action_name, - :params => @template.params.merge!(:page => self.next_page)}, - :method => @template.request.request_method, - :html => { :class => 'twitter_pagination' }) - end - - @template.content_tag(:div, pagination, :class => 'pagination', :id => self.html_attributes[:id]) end - protected + def pagination + [ :next_page ] + end - # Get current page number - def current_page - @collection.current_page + # Override will_paginate's <tt>link</tt> method since it generates its own <tt>a</tt> + # attribute and won't support <tt>:remote => true</tt> + def link(text, target, attributes = {}) + if target.is_a? Fixnum + attributes[:rel] = rel_value(target) + target = url(target) end + @template.link_to(text, target, attributes.merge(:remote => true)) - - # Get last page number - def last_page - @last_page ||= WillPaginate::ViewHelpers.total_pages_for_collection(@collection) - end ? -- + end - - # Get next page number - def next_page - @collection.next_page - end - end - end
48
1.170732
15
33
7ea9f996db3d7172746a69fca9b97b7e62a00d17
metadata/de.drhoffmannsoft.pizza.yml
metadata/de.drhoffmannsoft.pizza.yml
Categories: - Money License: GPL-2.0-or-later WebSite: https://codeberg.org/kollo/PizzaCostCalculator SourceCode: https://codeberg.org/kollo/PizzaCostCalculator IssueTracker: https://codeberg.org/kollo/PizzaCostCalculator/issues AutoName: Pizza Cost Description: |- Calculate which pizza is the best offer, based on diameter and price. Use gestures to adjust price and diameter of three pizzas (small, medium, large) to compare. The winner will change color (turn green). RepoType: git Repo: https://codeberg.org/kollo/PizzaCostCalculator.git Builds: - versionName: 1.04-7 versionCode: 7 commit: 6dfa7b89306078db6597eaba751d26b0d0393440 gradle: - yes - versionName: 1.05-9 versionCode: 9 commit: b4b300edc38ad2e979c14df5bb0f9b7979d89d03 gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.05-9 CurrentVersionCode: 9
Categories: - Money License: GPL-2.0-or-later WebSite: https://codeberg.org/kollo/PizzaCostCalculator SourceCode: https://codeberg.org/kollo/PizzaCostCalculator IssueTracker: https://codeberg.org/kollo/PizzaCostCalculator/issues AutoName: Pizza Cost Description: |- Calculate which pizza is the best offer, based on diameter and price. Use gestures to adjust price and diameter of three pizzas (small, medium, large) to compare. The winner will change color (turn green). RepoType: git Repo: https://codeberg.org/kollo/PizzaCostCalculator.git Builds: - versionName: 1.04-7 versionCode: 7 commit: 6dfa7b89306078db6597eaba751d26b0d0393440 gradle: - yes - versionName: 1.05-9 versionCode: 9 commit: b4b300edc38ad2e979c14df5bb0f9b7979d89d03 gradle: - yes - versionName: 1.05-11 versionCode: 11 commit: 1.05-11 gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.05-11 CurrentVersionCode: 11
Update Pizza Cost to 1.05-11 (11)
Update Pizza Cost to 1.05-11 (11)
YAML
agpl-3.0
f-droid/fdroiddata,f-droid/fdroiddata
yaml
## Code Before: Categories: - Money License: GPL-2.0-or-later WebSite: https://codeberg.org/kollo/PizzaCostCalculator SourceCode: https://codeberg.org/kollo/PizzaCostCalculator IssueTracker: https://codeberg.org/kollo/PizzaCostCalculator/issues AutoName: Pizza Cost Description: |- Calculate which pizza is the best offer, based on diameter and price. Use gestures to adjust price and diameter of three pizzas (small, medium, large) to compare. The winner will change color (turn green). RepoType: git Repo: https://codeberg.org/kollo/PizzaCostCalculator.git Builds: - versionName: 1.04-7 versionCode: 7 commit: 6dfa7b89306078db6597eaba751d26b0d0393440 gradle: - yes - versionName: 1.05-9 versionCode: 9 commit: b4b300edc38ad2e979c14df5bb0f9b7979d89d03 gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.05-9 CurrentVersionCode: 9 ## Instruction: Update Pizza Cost to 1.05-11 (11) ## Code After: Categories: - Money License: GPL-2.0-or-later WebSite: https://codeberg.org/kollo/PizzaCostCalculator SourceCode: https://codeberg.org/kollo/PizzaCostCalculator IssueTracker: https://codeberg.org/kollo/PizzaCostCalculator/issues AutoName: Pizza Cost Description: |- Calculate which pizza is the best offer, based on diameter and price. Use gestures to adjust price and diameter of three pizzas (small, medium, large) to compare. The winner will change color (turn green). RepoType: git Repo: https://codeberg.org/kollo/PizzaCostCalculator.git Builds: - versionName: 1.04-7 versionCode: 7 commit: 6dfa7b89306078db6597eaba751d26b0d0393440 gradle: - yes - versionName: 1.05-9 versionCode: 9 commit: b4b300edc38ad2e979c14df5bb0f9b7979d89d03 gradle: - yes - versionName: 1.05-11 versionCode: 11 commit: 1.05-11 gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.05-11 CurrentVersionCode: 11
Categories: - Money License: GPL-2.0-or-later WebSite: https://codeberg.org/kollo/PizzaCostCalculator SourceCode: https://codeberg.org/kollo/PizzaCostCalculator IssueTracker: https://codeberg.org/kollo/PizzaCostCalculator/issues AutoName: Pizza Cost Description: |- Calculate which pizza is the best offer, based on diameter and price. Use gestures to adjust price and diameter of three pizzas (small, medium, large) to compare. The winner will change color (turn green). RepoType: git Repo: https://codeberg.org/kollo/PizzaCostCalculator.git Builds: - versionName: 1.04-7 versionCode: 7 commit: 6dfa7b89306078db6597eaba751d26b0d0393440 gradle: - yes - versionName: 1.05-9 versionCode: 9 commit: b4b300edc38ad2e979c14df5bb0f9b7979d89d03 gradle: - yes + - versionName: 1.05-11 + versionCode: 11 + commit: 1.05-11 + gradle: + - yes + AutoUpdateMode: Version %v UpdateCheckMode: Tags - CurrentVersion: 1.05-9 ? ^ + CurrentVersion: 1.05-11 ? ^^ - CurrentVersionCode: 9 ? ^ + CurrentVersionCode: 11 ? ^^
10
0.30303
8
2
7a7f3c35bcc8da59dd740ef618418759764a920f
README.md
README.md
Predict user ratings for anime-style images ## Requirements ### Python - tqdm - sklearn ### Other - GraphViz ## To Do - parameterize number of images instead of hardcoding it - convert the XML into CSV to make it accessible to pandas and (maybe?) easier to parse ## Pipeline - download all metadata - sample from that xml file so that amount of data is reasonable - select features - machine learn it up - regression tree - random forest of regression trees - PCA and K-means - naive bayes maybe - choose optimal regressor based on testing set - report accuracy found in validation set ## General notes - It took 5 hours and 12 minutes to download all the metadata - It took 59 minutes to count the number of occurrences of each score - Only about 28.9% of images have a score greater than 0. - It took 1 hour and 5 minutes to count the number of occurrences of each tag - Setting criterion="mae" makes the classifier train too slowly to be useable - Look into this: http://scikit-learn.org/stable/auto_examples/ensemble/plot_adaboost_multiclass.html
Predict user ratings for anime-style images ## Requirements ### Python - tqdm - sklearn ### Other - GraphViz ## Pipeline - download all metadata - sample from that xml file so that amount of data is reasonable - select features - machine learn it up - regression tree - random forest of regression trees - PCA and K-means - naive bayes maybe - choose optimal regressor based on testing set - report accuracy found in validation set ## General notes - It took 5 hours and 12 minutes to download all the metadata - It took 59 minutes to count the number of occurrences of each score - Only about 28.9% of images have a score greater than 0. - It took 1 hour and 5 minutes to count the number of occurrences of each tag - Setting criterion="mae" makes the classifier train too slowly to be useable - Look into this: http://scikit-learn.org/stable/auto_examples/ensemble/plot_adaboost_multiclass.html
Move "To Do" items to github issues
Move "To Do" items to github issues
Markdown
mit
AlexLamson/safebooru-predict
markdown
## Code Before: Predict user ratings for anime-style images ## Requirements ### Python - tqdm - sklearn ### Other - GraphViz ## To Do - parameterize number of images instead of hardcoding it - convert the XML into CSV to make it accessible to pandas and (maybe?) easier to parse ## Pipeline - download all metadata - sample from that xml file so that amount of data is reasonable - select features - machine learn it up - regression tree - random forest of regression trees - PCA and K-means - naive bayes maybe - choose optimal regressor based on testing set - report accuracy found in validation set ## General notes - It took 5 hours and 12 minutes to download all the metadata - It took 59 minutes to count the number of occurrences of each score - Only about 28.9% of images have a score greater than 0. - It took 1 hour and 5 minutes to count the number of occurrences of each tag - Setting criterion="mae" makes the classifier train too slowly to be useable - Look into this: http://scikit-learn.org/stable/auto_examples/ensemble/plot_adaboost_multiclass.html ## Instruction: Move "To Do" items to github issues ## Code After: Predict user ratings for anime-style images ## Requirements ### Python - tqdm - sklearn ### Other - GraphViz ## Pipeline - download all metadata - sample from that xml file so that amount of data is reasonable - select features - machine learn it up - regression tree - random forest of regression trees - PCA and K-means - naive bayes maybe - choose optimal regressor based on testing set - report accuracy found in validation set ## General notes - It took 5 hours and 12 minutes to download all the metadata - It took 59 minutes to count the number of occurrences of each score - Only about 28.9% of images have a score greater than 0. - It took 1 hour and 5 minutes to count the number of occurrences of each tag - Setting criterion="mae" makes the classifier train too slowly to be useable - Look into this: http://scikit-learn.org/stable/auto_examples/ensemble/plot_adaboost_multiclass.html
Predict user ratings for anime-style images ## Requirements ### Python - tqdm - sklearn ### Other - GraphViz - - ## To Do - - parameterize number of images instead of hardcoding it - - convert the XML into CSV to make it accessible to pandas and (maybe?) easier to parse - ## Pipeline - download all metadata - sample from that xml file so that amount of data is reasonable - select features - machine learn it up - regression tree - random forest of regression trees - PCA and K-means - naive bayes maybe - choose optimal regressor based on testing set - report accuracy found in validation set ## General notes - It took 5 hours and 12 minutes to download all the metadata - It took 59 minutes to count the number of occurrences of each score - Only about 28.9% of images have a score greater than 0. - It took 1 hour and 5 minutes to count the number of occurrences of each tag - Setting criterion="mae" makes the classifier train too slowly to be useable - Look into this: http://scikit-learn.org/stable/auto_examples/ensemble/plot_adaboost_multiclass.html
5
0.142857
0
5
d23b82fc79ee844f7a8d3e83d4ff3e6f28ee7872
download/install/thingplus_embedded_node_install.sh
download/install/thingplus_embedded_node_install.sh
NODE_VERSION=0.10.16 PREFIX=/usr/local node_install() { OS=$(uname) case $OS in 'Darwin') NODE_FILE=node-v$NODE_VERSION-darwin-x64.tar.gz ;; 'Linux') NODE_FILE=node-v$NODE_VERSION-linux-arm-pi.tar.gz ;; *) echo Invalid OS Version exit 1 ;; esac wget http://nodejs.org/dist/v$NODE_VERSION/$NODE_FILE tar xvfz $NODE_FILE rm $NODE_FILE cd $(basename $NODE_FILE ".tar.gz") rsync -a bin lib share $PREFIX cd - rm -rf $(basename $NODE_FILE ".tar.gz") } argument_parse() { while (( $# )); do echo $1 $2 case $1 in -nv|--node_version) NODE_VERSION=$2 ;; -p|--prefix) PREFIX=$2 ;; esac shift 2 done } ########## START ########## argument_parse $@ echo "Install node v$NODE_VERSION @$PREFIX" node_install node --version echo 'node installed'
NODE_VERSION=0.10.16 PREFIX=/usr/local node_install() { OS=$(uname) case $OS in 'Darwin') NODE_FILE=node-v$NODE_VERSION-darwin-x64.tar.gz ;; 'Linux') if [ $NODE_VERSION == '0.10.16' ] ; then NODE_FILE=node-v$NODE_VERSION-linux-arm-pi.tar.gz else NODE_FILE=node-v$NODE_VERSION-linux-armv7l.tar.gz fi ;; *) echo Invalid OS Version exit 1 ;; esac wget http://nodejs.org/dist/v$NODE_VERSION/$NODE_FILE tar xvfz $NODE_FILE rm $NODE_FILE cd $(basename $NODE_FILE ".tar.gz") rsync -a bin lib share $PREFIX cd - rm -rf $(basename $NODE_FILE ".tar.gz") } argument_parse() { while (( $# )); do echo $1 $2 case $1 in -nv|--node_version) NODE_VERSION=$2 ;; -p|--prefix) PREFIX=$2 ;; esac shift 2 done } ########## START ########## argument_parse $@ echo "Install node v$NODE_VERSION @$PREFIX" node_install node --version echo 'node installed'
Change node released file name for v4.2.4 nodejs.org changes released file name for arm. NEW : node-vVERSION-linux-armv7l.tar.gz OLD : node-vVERSION-linux-arm-pi.tar.gz
[NODE_INSTALLATION] Change node released file name for v4.2.4 nodejs.org changes released file name for arm. NEW : node-vVERSION-linux-armv7l.tar.gz OLD : node-vVERSION-linux-arm-pi.tar.gz
Shell
mit
bjkim/bjkim.github.io,thingplus/thingplus.github.io,thingplus/thingplus.github.io,bjkim/bjkim.github.io,thingplus/thingplus.github.io,bjkim/bjkim.github.io
shell
## Code Before: NODE_VERSION=0.10.16 PREFIX=/usr/local node_install() { OS=$(uname) case $OS in 'Darwin') NODE_FILE=node-v$NODE_VERSION-darwin-x64.tar.gz ;; 'Linux') NODE_FILE=node-v$NODE_VERSION-linux-arm-pi.tar.gz ;; *) echo Invalid OS Version exit 1 ;; esac wget http://nodejs.org/dist/v$NODE_VERSION/$NODE_FILE tar xvfz $NODE_FILE rm $NODE_FILE cd $(basename $NODE_FILE ".tar.gz") rsync -a bin lib share $PREFIX cd - rm -rf $(basename $NODE_FILE ".tar.gz") } argument_parse() { while (( $# )); do echo $1 $2 case $1 in -nv|--node_version) NODE_VERSION=$2 ;; -p|--prefix) PREFIX=$2 ;; esac shift 2 done } ########## START ########## argument_parse $@ echo "Install node v$NODE_VERSION @$PREFIX" node_install node --version echo 'node installed' ## Instruction: [NODE_INSTALLATION] Change node released file name for v4.2.4 nodejs.org changes released file name for arm. NEW : node-vVERSION-linux-armv7l.tar.gz OLD : node-vVERSION-linux-arm-pi.tar.gz ## Code After: NODE_VERSION=0.10.16 PREFIX=/usr/local node_install() { OS=$(uname) case $OS in 'Darwin') NODE_FILE=node-v$NODE_VERSION-darwin-x64.tar.gz ;; 'Linux') if [ $NODE_VERSION == '0.10.16' ] ; then NODE_FILE=node-v$NODE_VERSION-linux-arm-pi.tar.gz else NODE_FILE=node-v$NODE_VERSION-linux-armv7l.tar.gz fi ;; *) echo Invalid OS Version exit 1 ;; esac wget http://nodejs.org/dist/v$NODE_VERSION/$NODE_FILE tar xvfz $NODE_FILE rm $NODE_FILE cd $(basename $NODE_FILE ".tar.gz") rsync -a bin lib share $PREFIX cd - rm -rf $(basename $NODE_FILE ".tar.gz") } argument_parse() { while (( $# )); do echo $1 $2 case $1 in -nv|--node_version) NODE_VERSION=$2 ;; -p|--prefix) PREFIX=$2 ;; esac shift 2 done } ########## START ########## argument_parse $@ echo "Install node v$NODE_VERSION @$PREFIX" node_install node --version echo 'node installed'
NODE_VERSION=0.10.16 PREFIX=/usr/local node_install() { OS=$(uname) case $OS in 'Darwin') NODE_FILE=node-v$NODE_VERSION-darwin-x64.tar.gz ;; 'Linux') + if [ $NODE_VERSION == '0.10.16' ] ; then - NODE_FILE=node-v$NODE_VERSION-linux-arm-pi.tar.gz + NODE_FILE=node-v$NODE_VERSION-linux-arm-pi.tar.gz ? ++ + else + NODE_FILE=node-v$NODE_VERSION-linux-armv7l.tar.gz + fi ;; *) echo Invalid OS Version exit 1 ;; esac wget http://nodejs.org/dist/v$NODE_VERSION/$NODE_FILE tar xvfz $NODE_FILE rm $NODE_FILE cd $(basename $NODE_FILE ".tar.gz") rsync -a bin lib share $PREFIX cd - rm -rf $(basename $NODE_FILE ".tar.gz") } argument_parse() { while (( $# )); do echo $1 $2 case $1 in -nv|--node_version) NODE_VERSION=$2 ;; -p|--prefix) PREFIX=$2 ;; esac shift 2 done } ########## START ########## argument_parse $@ echo "Install node v$NODE_VERSION @$PREFIX" node_install node --version echo 'node installed'
6
0.107143
5
1
6a8382c1e7db41398e0ac2a703289ae481e32bd0
auto_backup/auto_backup.cmd
auto_backup/auto_backup.cmd
robocopy C:\Users\user\Documents F:\Backup\Documents /MIR /DCOPY:T /xj /np /tee /log:backup_log.txt robocopy C:\Users\user\Pictures F:\Backup\Pictures /MIR /DCOPY:T /xj /np /tee /log+:backup_log.txt robocopy C:\Users\user\Music F:\Backup\Music /MIR /DCOPY:T /xj /np /tee /log+:backup_log.txt robocopy C:\Users\user\Downloads F:\Backup\Downloads /MIR /DCOPY:T /xj /np /tee /log+:backup_log.txt pause
robocopy "C:\Users\user\Documents" "F:\Backup\Documents" /MIR /DCOPY:T /xj /np /tee /log:backup_log.txt robocopy "C:\Users\user\Pictures" "F:\Backup\Pictures" /MIR /DCOPY:T /xj /np /tee /log+:backup_log.txt robocopy "C:\Users\user\Music" "F:\Backup\Music" /MIR /DCOPY:T /xj /np /tee /log+:backup_log.txt robocopy "C:\Users\user\Downloads" "F:\Backup\Downloads" /MIR /DCOPY:T /xj /np /tee /log+:backup_log.txt pause
Add quotation around dir path.
Add quotation around dir path.
Batchfile
apache-2.0
shianchin/mini_projects,shianchin/mini_projects,shianchin/mini_projects
batchfile
## Code Before: robocopy C:\Users\user\Documents F:\Backup\Documents /MIR /DCOPY:T /xj /np /tee /log:backup_log.txt robocopy C:\Users\user\Pictures F:\Backup\Pictures /MIR /DCOPY:T /xj /np /tee /log+:backup_log.txt robocopy C:\Users\user\Music F:\Backup\Music /MIR /DCOPY:T /xj /np /tee /log+:backup_log.txt robocopy C:\Users\user\Downloads F:\Backup\Downloads /MIR /DCOPY:T /xj /np /tee /log+:backup_log.txt pause ## Instruction: Add quotation around dir path. ## Code After: robocopy "C:\Users\user\Documents" "F:\Backup\Documents" /MIR /DCOPY:T /xj /np /tee /log:backup_log.txt robocopy "C:\Users\user\Pictures" "F:\Backup\Pictures" /MIR /DCOPY:T /xj /np /tee /log+:backup_log.txt robocopy "C:\Users\user\Music" "F:\Backup\Music" /MIR /DCOPY:T /xj /np /tee /log+:backup_log.txt robocopy "C:\Users\user\Downloads" "F:\Backup\Downloads" /MIR /DCOPY:T /xj /np /tee /log+:backup_log.txt pause
- robocopy C:\Users\user\Documents F:\Backup\Documents /MIR /DCOPY:T /xj /np /tee /log:backup_log.txt + robocopy "C:\Users\user\Documents" "F:\Backup\Documents" /MIR /DCOPY:T /xj /np /tee /log:backup_log.txt ? + + + + - robocopy C:\Users\user\Pictures F:\Backup\Pictures /MIR /DCOPY:T /xj /np /tee /log+:backup_log.txt + robocopy "C:\Users\user\Pictures" "F:\Backup\Pictures" /MIR /DCOPY:T /xj /np /tee /log+:backup_log.txt ? + + + + - robocopy C:\Users\user\Music F:\Backup\Music /MIR /DCOPY:T /xj /np /tee /log+:backup_log.txt + robocopy "C:\Users\user\Music" "F:\Backup\Music" /MIR /DCOPY:T /xj /np /tee /log+:backup_log.txt ? + + + + - robocopy C:\Users\user\Downloads F:\Backup\Downloads /MIR /DCOPY:T /xj /np /tee /log+:backup_log.txt + robocopy "C:\Users\user\Downloads" "F:\Backup\Downloads" /MIR /DCOPY:T /xj /np /tee /log+:backup_log.txt ? + + + + pause
8
1.6
4
4
5320c3b34b1b1058456cf136fbe648be08c88cef
app/templates/views/returned-letter-summary.html
app/templates/views/returned-letter-summary.html
{% from "components/table.html" import list_table, field %} {% from "components/message-count-label.html" import message_count_label %} {% extends "withnav_template.html" %} {% block service_page_title %} Returned letters {% endblock %} {% block maincolumn_content %} <h1 class="heading-large"> Returned letters </h1> <div class="body-copy-table" id='pill-selected-item'> {% call(item, row_number) list_table( data, caption="Returned letters report", caption_visible=False, empty_message='If you have returned letter reports they will be listed here' ) %} {% call field() %} <a target="_blank" href="{{url_for('.returned_letters_report', service_id=current_service.id, reported_at=item.reported_at)}}">Returned letters reported on {{ item.reported_at | format_date}} - {{ item.returned_letter_count}} {{ message_count_label(item.returned_letter_count, 'letter', suffix='')}}</a> {% endcall %} {% endcall %} </div> {% endblock %}
{% from "components/table.html" import list_table, field %} {% from "components/message-count-label.html" import message_count_label %} {% extends "withnav_template.html" %} {% block service_page_title %} Returned letters {% endblock %} {% block maincolumn_content %} <h1 class="heading-large"> Returned letters </h1> <div class="body-copy-table" id='pill-selected-item'> {% call(item, row_number) list_table( data, caption="Returned letters report", caption_visible=False, empty_message='If you have returned letter reports they will be listed here' ) %} {% call field() %} <a target="_blank" class="govuk_link" href="{{url_for('.returned_letters_report', service_id=current_service.id, reported_at=item.reported_at)}}">Returned letters reported on {{ item.reported_at | format_date}} - {{ item.returned_letter_count}} {{ message_count_label(item.returned_letter_count, 'letter', suffix='')}}</a> {% endcall %} {% endcall %} </div> {% endblock %}
Add class to anchor tag
Add class to anchor tag
HTML
mit
alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin
html
## Code Before: {% from "components/table.html" import list_table, field %} {% from "components/message-count-label.html" import message_count_label %} {% extends "withnav_template.html" %} {% block service_page_title %} Returned letters {% endblock %} {% block maincolumn_content %} <h1 class="heading-large"> Returned letters </h1> <div class="body-copy-table" id='pill-selected-item'> {% call(item, row_number) list_table( data, caption="Returned letters report", caption_visible=False, empty_message='If you have returned letter reports they will be listed here' ) %} {% call field() %} <a target="_blank" href="{{url_for('.returned_letters_report', service_id=current_service.id, reported_at=item.reported_at)}}">Returned letters reported on {{ item.reported_at | format_date}} - {{ item.returned_letter_count}} {{ message_count_label(item.returned_letter_count, 'letter', suffix='')}}</a> {% endcall %} {% endcall %} </div> {% endblock %} ## Instruction: Add class to anchor tag ## Code After: {% from "components/table.html" import list_table, field %} {% from "components/message-count-label.html" import message_count_label %} {% extends "withnav_template.html" %} {% block service_page_title %} Returned letters {% endblock %} {% block maincolumn_content %} <h1 class="heading-large"> Returned letters </h1> <div class="body-copy-table" id='pill-selected-item'> {% call(item, row_number) list_table( data, caption="Returned letters report", caption_visible=False, empty_message='If you have returned letter reports they will be listed here' ) %} {% call field() %} <a target="_blank" class="govuk_link" href="{{url_for('.returned_letters_report', service_id=current_service.id, reported_at=item.reported_at)}}">Returned letters reported on {{ item.reported_at | format_date}} - {{ item.returned_letter_count}} {{ message_count_label(item.returned_letter_count, 'letter', suffix='')}}</a> {% endcall %} {% endcall %} </div> {% endblock %}
{% from "components/table.html" import list_table, field %} {% from "components/message-count-label.html" import message_count_label %} {% extends "withnav_template.html" %} {% block service_page_title %} Returned letters {% endblock %} {% block maincolumn_content %} <h1 class="heading-large"> Returned letters </h1> <div class="body-copy-table" id='pill-selected-item'> {% call(item, row_number) list_table( data, caption="Returned letters report", caption_visible=False, empty_message='If you have returned letter reports they will be listed here' ) %} {% call field() %} - <a target="_blank" + <a target="_blank" class="govuk_link" href="{{url_for('.returned_letters_report', service_id=current_service.id, reported_at=item.reported_at)}}">Returned letters reported on {{ item.reported_at | format_date}} - {{ item.returned_letter_count}} {{ message_count_label(item.returned_letter_count, 'letter', suffix='')}}</a> {% endcall %} {% endcall %} </div> {% endblock %}
2
0.074074
1
1
468354d562944ca8552782b2eb33602509c38bc9
config/sphinx.yml
config/sphinx.yml
development: enable_star: true min_prefix_len: 3 max_matches: 100000 port: 9312 test: enable_star: true min_prefix_len: 3 max_matches: 100000 port: 9313 production: enable_star: true min_prefix_len: 3 max_matches: 100000
development: enable_star: true min_prefix_len: 3 max_matches: 100000 port: 9312 test: enable_star: true min_prefix_len: 3 max_matches: 100000 port: 9313 cucumber: enable_star: true min_prefix_len: 3 max_matches: 100000 port: 9313 production: enable_star: true min_prefix_len: 3 max_matches: 100000
Add stuff for cucumber environment.
Add stuff for cucumber environment.
YAML
apache-2.0
lincompch/stizun,sabcio/stizun,lincompch/stizun,sabcio/stizun,lincompch/stizun,lincompch/stizun,sabcio/stizun,lincompch/stizun,sabcio/stizun
yaml
## Code Before: development: enable_star: true min_prefix_len: 3 max_matches: 100000 port: 9312 test: enable_star: true min_prefix_len: 3 max_matches: 100000 port: 9313 production: enable_star: true min_prefix_len: 3 max_matches: 100000 ## Instruction: Add stuff for cucumber environment. ## Code After: development: enable_star: true min_prefix_len: 3 max_matches: 100000 port: 9312 test: enable_star: true min_prefix_len: 3 max_matches: 100000 port: 9313 cucumber: enable_star: true min_prefix_len: 3 max_matches: 100000 port: 9313 production: enable_star: true min_prefix_len: 3 max_matches: 100000
development: enable_star: true min_prefix_len: 3 max_matches: 100000 port: 9312 test: enable_star: true min_prefix_len: 3 max_matches: 100000 port: 9313 + cucumber: + enable_star: true + min_prefix_len: 3 + max_matches: 100000 + port: 9313 production: enable_star: true min_prefix_len: 3 max_matches: 100000
5
0.357143
5
0
840df4ed3815624c0f31bc153df6e9467a4c3067
README.md
README.md
Logs all requests to command line console (stdout) and responds 200 OK. Useful for quickly viewing what kind of requests your app is sending. ## Usage ```sh $ npm install console-log-server --global $ console-log-server -p 8000 ``` <p align="center"> <img src="./resources/console-log-server-demo.gif" alt="Demo" width="700"/> </p> ## Command line options ```sh Usage $ console-log-server Options --port, -p Port Number --hostname, -h Host name --result-code, -c Response result code --result-body, -b Response content --result-header, -H Response header --no-color --version --help Examples # basic usage $ console-log-server -p 3000 # customized response $ console-log-server -p 3000 -c 201 -b 'cool type content' --result-header='Content-Type:application/cool' --result-header='key:value' ```
Logs all requests to command line console (stdout) and responds 200 OK. Useful for quickly viewing what kind of requests your app is sending. ## Usage ```sh $ npx console-log-server -p 8000 ``` or using the old fashioned way ```sh $ npm install console-log-server --global $ console-log-server -p 8000 ``` <p align="center"> <img src="./resources/console-log-server-demo.gif" alt="Demo" width="700"/> </p> ## Command line options ```sh Usage $ console-log-server Options --port, -p Port Number --hostname, -h Host name --result-code, -c Response result code --result-body, -b Response content --result-header, -H Response header --no-color --version --help Examples # basic usage $ console-log-server -p 3000 # customized response $ console-log-server -p 3000 -c 201 -b 'cool type content' --result-header='Content-Type:application/cool' --result-header='key:value' ```
Update to guide using npx by default
Update to guide using npx by default
Markdown
mit
jamonkko/console-log-server
markdown
## Code Before: Logs all requests to command line console (stdout) and responds 200 OK. Useful for quickly viewing what kind of requests your app is sending. ## Usage ```sh $ npm install console-log-server --global $ console-log-server -p 8000 ``` <p align="center"> <img src="./resources/console-log-server-demo.gif" alt="Demo" width="700"/> </p> ## Command line options ```sh Usage $ console-log-server Options --port, -p Port Number --hostname, -h Host name --result-code, -c Response result code --result-body, -b Response content --result-header, -H Response header --no-color --version --help Examples # basic usage $ console-log-server -p 3000 # customized response $ console-log-server -p 3000 -c 201 -b 'cool type content' --result-header='Content-Type:application/cool' --result-header='key:value' ``` ## Instruction: Update to guide using npx by default ## Code After: Logs all requests to command line console (stdout) and responds 200 OK. Useful for quickly viewing what kind of requests your app is sending. ## Usage ```sh $ npx console-log-server -p 8000 ``` or using the old fashioned way ```sh $ npm install console-log-server --global $ console-log-server -p 8000 ``` <p align="center"> <img src="./resources/console-log-server-demo.gif" alt="Demo" width="700"/> </p> ## Command line options ```sh Usage $ console-log-server Options --port, -p Port Number --hostname, -h Host name --result-code, -c Response result code --result-body, -b Response content --result-header, -H Response header --no-color --version --help Examples # basic usage $ console-log-server -p 3000 # customized response $ console-log-server -p 3000 -c 201 -b 'cool type content' --result-header='Content-Type:application/cool' --result-header='key:value' ```
+ Logs all requests to command line console (stdout) and responds 200 OK. Useful for quickly viewing what kind of requests your app is sending. ## Usage ```sh + $ npx console-log-server -p 8000 + ``` + + or using the old fashioned way + + ```sh $ npm install console-log-server --global $ console-log-server -p 8000 ``` + <p align="center"> <img src="./resources/console-log-server-demo.gif" alt="Demo" width="700"/> </p> ## Command line options + ```sh Usage $ console-log-server Options --port, -p Port Number --hostname, -h Host name --result-code, -c Response result code --result-body, -b Response content --result-header, -H Response header --no-color --version --help Examples # basic usage $ console-log-server -p 3000 # customized response $ console-log-server -p 3000 -c 201 -b 'cool type content' --result-header='Content-Type:application/cool' --result-header='key:value' ```
9
0.243243
9
0
6cd12acb71441004b81cd3a055543924b5b4dbbc
app/views/taxons/index.html.erb
app/views/taxons/index.html.erb
<%= display_header title: 'Taxons', breadcrumbs: ['Taxons'] do %> <%= link_to 'Add a taxon', new_taxon_path, class: 'btn btn-lg btn-default' %> <% end %> <table class="table queries-list table-bordered" data-module="filterable-table"> <thead> <tr class="table-header"> <th>Title</th> <th>Content ID</th> <th></th> <th></th> <th></th> </tr> <%= render partial: 'shared/table_filter' %> </thead> <tbody> <% taxons.each do |taxon| %> <tr> <td><%= taxon['title'] %></td> <td><%= taxon['content_id'] %></td> <td><%= link_to 'View tagged content', taxon_path(taxon['content_id']), class: 'view-tagged-content' %></td> <td><%= link_to 'Edit taxon', edit_taxon_path(taxon['content_id']) %></td> <td><%= link_to 'Delete', taxon_path(taxon['content_id']), method: :delete, data: { confirm: I18n.t('messages.views.confirm') }, class: 'btn btn-danger' %> </td> </tr> <% end %> </tbody> </table>
<%= display_header title: 'Taxons', breadcrumbs: ['Taxons'] do %> <%= link_to 'Add a taxon', new_taxon_path, class: 'btn btn-lg btn-default' %> <% end %> <table class="table queries-list table-bordered" data-module="filterable-table"> <thead> <tr class="table-header"> <th>Title</th> <th>Content ID</th> <th></th> <th></th> <th></th> </tr> <%= render partial: 'shared/table_filter' %> </thead> <tbody> <% taxons.each do |taxon| %> <tr> <td><%= taxon['title'] %></td> <td><%= link_to taxon['content_id'], "#{website_url('/api/content' + taxon['base_path'])}" %></td> <td><%= link_to 'View tagged content', taxon_path(taxon['content_id']), class: 'view-tagged-content' %></td> <td><%= link_to 'Edit taxon', edit_taxon_path(taxon['content_id']) %></td> <td><%= link_to 'Delete', taxon_path(taxon['content_id']), method: :delete, data: { confirm: I18n.t('messages.views.confirm') }, class: 'btn btn-danger' %> </td> </tr> <% end %> </tbody> </table>
Add link to content store in taxons list
Add link to content store in taxons list It's convenient to see the content store representation for these taxons. The content ID values aren't currently linked to anything so let's have them point to the content store until a better alternative emerges.
HTML+ERB
mit
alphagov/content-tagger,alphagov/content-tagger,alphagov/content-tagger
html+erb
## Code Before: <%= display_header title: 'Taxons', breadcrumbs: ['Taxons'] do %> <%= link_to 'Add a taxon', new_taxon_path, class: 'btn btn-lg btn-default' %> <% end %> <table class="table queries-list table-bordered" data-module="filterable-table"> <thead> <tr class="table-header"> <th>Title</th> <th>Content ID</th> <th></th> <th></th> <th></th> </tr> <%= render partial: 'shared/table_filter' %> </thead> <tbody> <% taxons.each do |taxon| %> <tr> <td><%= taxon['title'] %></td> <td><%= taxon['content_id'] %></td> <td><%= link_to 'View tagged content', taxon_path(taxon['content_id']), class: 'view-tagged-content' %></td> <td><%= link_to 'Edit taxon', edit_taxon_path(taxon['content_id']) %></td> <td><%= link_to 'Delete', taxon_path(taxon['content_id']), method: :delete, data: { confirm: I18n.t('messages.views.confirm') }, class: 'btn btn-danger' %> </td> </tr> <% end %> </tbody> </table> ## Instruction: Add link to content store in taxons list It's convenient to see the content store representation for these taxons. The content ID values aren't currently linked to anything so let's have them point to the content store until a better alternative emerges. ## Code After: <%= display_header title: 'Taxons', breadcrumbs: ['Taxons'] do %> <%= link_to 'Add a taxon', new_taxon_path, class: 'btn btn-lg btn-default' %> <% end %> <table class="table queries-list table-bordered" data-module="filterable-table"> <thead> <tr class="table-header"> <th>Title</th> <th>Content ID</th> <th></th> <th></th> <th></th> </tr> <%= render partial: 'shared/table_filter' %> </thead> <tbody> <% taxons.each do |taxon| %> <tr> <td><%= taxon['title'] %></td> <td><%= link_to taxon['content_id'], "#{website_url('/api/content' + taxon['base_path'])}" %></td> <td><%= link_to 'View tagged content', taxon_path(taxon['content_id']), class: 'view-tagged-content' %></td> <td><%= link_to 'Edit taxon', edit_taxon_path(taxon['content_id']) %></td> <td><%= link_to 'Delete', taxon_path(taxon['content_id']), method: :delete, data: { confirm: I18n.t('messages.views.confirm') }, class: 'btn btn-danger' %> </td> </tr> <% end %> </tbody> </table>
<%= display_header title: 'Taxons', breadcrumbs: ['Taxons'] do %> <%= link_to 'Add a taxon', new_taxon_path, class: 'btn btn-lg btn-default' %> <% end %> <table class="table queries-list table-bordered" data-module="filterable-table"> <thead> <tr class="table-header"> <th>Title</th> <th>Content ID</th> <th></th> <th></th> <th></th> </tr> <%= render partial: 'shared/table_filter' %> </thead> <tbody> <% taxons.each do |taxon| %> <tr> <td><%= taxon['title'] %></td> - <td><%= taxon['content_id'] %></td> + <td><%= link_to taxon['content_id'], "#{website_url('/api/content' + taxon['base_path'])}" %></td> <td><%= link_to 'View tagged content', taxon_path(taxon['content_id']), class: 'view-tagged-content' %></td> <td><%= link_to 'Edit taxon', edit_taxon_path(taxon['content_id']) %></td> <td><%= link_to 'Delete', taxon_path(taxon['content_id']), method: :delete, data: { confirm: I18n.t('messages.views.confirm') }, class: 'btn btn-danger' %> </td> </tr> <% end %> </tbody> </table>
2
0.060606
1
1
0692cea20d5936eb3e67a810b39972b0f9847a7f
.travis.yml
.travis.yml
sudo: false language: python python: - "2.6" - "2.7" - "3.3" - "3.4" - "3.5" - "pypy" - "pypy3" env: - PEP8_IGNORE="E731,W503,E402" # command to install dependencies install: - pip install coverage pep8 # command to run tests # require 100% coverage (not including test files) to pass Travis CI test # To skip pypy: - if [[ $TRAVIS_PYTHON_VERSION != 'pypy' ]]; then DOSTUFF ; fi script: - coverage run --source=toolz $(which nosetests) --with-doctest - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then coverage report --show-missing --fail-under=100 ; fi - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then pep8 --ignore=$PEP8_IGNORE --exclude=conf.py,tests,examples,bench -r --show-source . ; fi # load coverage status to https://coveralls.io after_success: - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then pip install coveralls --use-mirrors ; coveralls ; fi notifications: email: false
sudo: false language: python python: - "2.6" - "2.7" - "3.3" - "3.4" - "3.5" - "pypy" env: - PEP8_IGNORE="E731,W503,E402" # command to install dependencies install: - pip install coverage pep8 # command to run tests # require 100% coverage (not including test files) to pass Travis CI test # To skip pypy: - if [[ $TRAVIS_PYTHON_VERSION != 'pypy' ]]; then DOSTUFF ; fi script: - coverage run --source=toolz $(which nosetests) --with-doctest - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then coverage report --show-missing --fail-under=100 ; fi - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then pep8 --ignore=$PEP8_IGNORE --exclude=conf.py,tests,examples,bench -r --show-source . ; fi # load coverage status to https://coveralls.io after_success: - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then pip install coveralls --use-mirrors ; coveralls ; fi notifications: email: false
Remove pypy3 from the TravisCI build matrix. Python 3.2 is too old...
Remove pypy3 from the TravisCI build matrix. Python 3.2 is too old... because it doesn't have `inspect.signature`, which we need for Python 3.
YAML
bsd-3-clause
pombredanne/toolz,jdmcbr/toolz,jdmcbr/toolz,pombredanne/toolz
yaml
## Code Before: sudo: false language: python python: - "2.6" - "2.7" - "3.3" - "3.4" - "3.5" - "pypy" - "pypy3" env: - PEP8_IGNORE="E731,W503,E402" # command to install dependencies install: - pip install coverage pep8 # command to run tests # require 100% coverage (not including test files) to pass Travis CI test # To skip pypy: - if [[ $TRAVIS_PYTHON_VERSION != 'pypy' ]]; then DOSTUFF ; fi script: - coverage run --source=toolz $(which nosetests) --with-doctest - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then coverage report --show-missing --fail-under=100 ; fi - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then pep8 --ignore=$PEP8_IGNORE --exclude=conf.py,tests,examples,bench -r --show-source . ; fi # load coverage status to https://coveralls.io after_success: - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then pip install coveralls --use-mirrors ; coveralls ; fi notifications: email: false ## Instruction: Remove pypy3 from the TravisCI build matrix. Python 3.2 is too old... because it doesn't have `inspect.signature`, which we need for Python 3. ## Code After: sudo: false language: python python: - "2.6" - "2.7" - "3.3" - "3.4" - "3.5" - "pypy" env: - PEP8_IGNORE="E731,W503,E402" # command to install dependencies install: - pip install coverage pep8 # command to run tests # require 100% coverage (not including test files) to pass Travis CI test # To skip pypy: - if [[ $TRAVIS_PYTHON_VERSION != 'pypy' ]]; then DOSTUFF ; fi script: - coverage run --source=toolz $(which nosetests) --with-doctest - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then coverage report --show-missing --fail-under=100 ; fi - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then pep8 --ignore=$PEP8_IGNORE --exclude=conf.py,tests,examples,bench -r --show-source . ; fi # load coverage status to https://coveralls.io after_success: - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then pip install coveralls --use-mirrors ; coveralls ; fi notifications: email: false
sudo: false language: python python: - "2.6" - "2.7" - "3.3" - "3.4" - "3.5" - "pypy" - - "pypy3" env: - PEP8_IGNORE="E731,W503,E402" # command to install dependencies install: - pip install coverage pep8 # command to run tests # require 100% coverage (not including test files) to pass Travis CI test # To skip pypy: - if [[ $TRAVIS_PYTHON_VERSION != 'pypy' ]]; then DOSTUFF ; fi script: - coverage run --source=toolz $(which nosetests) --with-doctest - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then coverage report --show-missing --fail-under=100 ; fi - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then pep8 --ignore=$PEP8_IGNORE --exclude=conf.py,tests,examples,bench -r --show-source . ; fi # load coverage status to https://coveralls.io after_success: - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then pip install coveralls --use-mirrors ; coveralls ; fi notifications: email: false
1
0.030303
0
1
4aa666a35dc30b7b912ece51249e011a46feddd9
MicroReasoner/SMRPreprocessor.h
MicroReasoner/SMRPreprocessor.h
// // SMRPreprocessor.h // MicroReasoner // // Created by Ivano Bilenchi on 05/05/16. // Copyright © 2016 SisInf Lab. All rights reserved. // #ifndef SMRPreprocessor_h #define SMRPreprocessor_h // Pseudo-abstract class convenience macros. #define ABSTRACT_METHOD {\ @throw [NSException exceptionWithName:NSInternalInconsistencyException \ reason:@"This method should be overridden in a subclass." \ userInfo:nil]; \ } #endif /* SMRPreprocessor_h */
// // SMRPreprocessor.h // MicroReasoner // // Created by Ivano Bilenchi on 05/05/16. // Copyright © 2016 SisInf Lab. All rights reserved. // #ifndef SMRPreprocessor_h #define SMRPreprocessor_h /** * Use this directive to mark method implementations that should be overridden * by concrete subclasses. */ #define ABSTRACT_METHOD {\ @throw [NSException exceptionWithName:NSInternalInconsistencyException \ reason:@"This method should be overridden in a subclass." \ userInfo:nil]; \ } /** * Use this directive in place of @synthesize to automatically create a * lazy getter for the specified property. Example syntax: * * SYNTHESIZE_LAZY(NSMutableString, myMutableString) { * return [NSMutableString stringWithString:@"my mutable string"]; * } * * @param type The type of the property. * @param name The name of the property. */ #define SYNTHESIZE_LAZY(type, name) \ @synthesize name = _##name; \ - (type *)name { \ if (_##name == nil) { _##name = [self __##name##LazyInit]; } \ return _##name; \ } \ - (type *)__##name##LazyInit /** * Use this directive in place of @synthesize to automatically create a * lazy getter for the specified property. The getter calls the default * 'init' constructor. * * @param type The type of the property. * @param name The name of the property. */ #define SYNTHESIZE_LAZY_INIT(type, name) \ @synthesize name = _##name; \ - (type *)name { \ if (_##name == nil) { _##name = [[type alloc] init]; } \ return _##name; \ } #endif /* SMRPreprocessor_h */
Add lazy property synthesis directives
Add lazy property synthesis directives
C
epl-1.0
sisinflab-swot/OWL-API-for-iOS,sisinflab-swot/OWL-API-for-iOS,sisinflab-swot/OWL-API-for-iOS
c
## Code Before: // // SMRPreprocessor.h // MicroReasoner // // Created by Ivano Bilenchi on 05/05/16. // Copyright © 2016 SisInf Lab. All rights reserved. // #ifndef SMRPreprocessor_h #define SMRPreprocessor_h // Pseudo-abstract class convenience macros. #define ABSTRACT_METHOD {\ @throw [NSException exceptionWithName:NSInternalInconsistencyException \ reason:@"This method should be overridden in a subclass." \ userInfo:nil]; \ } #endif /* SMRPreprocessor_h */ ## Instruction: Add lazy property synthesis directives ## Code After: // // SMRPreprocessor.h // MicroReasoner // // Created by Ivano Bilenchi on 05/05/16. // Copyright © 2016 SisInf Lab. All rights reserved. // #ifndef SMRPreprocessor_h #define SMRPreprocessor_h /** * Use this directive to mark method implementations that should be overridden * by concrete subclasses. */ #define ABSTRACT_METHOD {\ @throw [NSException exceptionWithName:NSInternalInconsistencyException \ reason:@"This method should be overridden in a subclass." \ userInfo:nil]; \ } /** * Use this directive in place of @synthesize to automatically create a * lazy getter for the specified property. Example syntax: * * SYNTHESIZE_LAZY(NSMutableString, myMutableString) { * return [NSMutableString stringWithString:@"my mutable string"]; * } * * @param type The type of the property. * @param name The name of the property. */ #define SYNTHESIZE_LAZY(type, name) \ @synthesize name = _##name; \ - (type *)name { \ if (_##name == nil) { _##name = [self __##name##LazyInit]; } \ return _##name; \ } \ - (type *)__##name##LazyInit /** * Use this directive in place of @synthesize to automatically create a * lazy getter for the specified property. The getter calls the default * 'init' constructor. * * @param type The type of the property. * @param name The name of the property. */ #define SYNTHESIZE_LAZY_INIT(type, name) \ @synthesize name = _##name; \ - (type *)name { \ if (_##name == nil) { _##name = [[type alloc] init]; } \ return _##name; \ } #endif /* SMRPreprocessor_h */
// // SMRPreprocessor.h // MicroReasoner // // Created by Ivano Bilenchi on 05/05/16. // Copyright © 2016 SisInf Lab. All rights reserved. // #ifndef SMRPreprocessor_h #define SMRPreprocessor_h - // Pseudo-abstract class convenience macros. - + /** + * Use this directive to mark method implementations that should be overridden + * by concrete subclasses. + */ #define ABSTRACT_METHOD {\ @throw [NSException exceptionWithName:NSInternalInconsistencyException \ reason:@"This method should be overridden in a subclass." \ userInfo:nil]; \ } + /** + * Use this directive in place of @synthesize to automatically create a + * lazy getter for the specified property. Example syntax: + * + * SYNTHESIZE_LAZY(NSMutableString, myMutableString) { + * return [NSMutableString stringWithString:@"my mutable string"]; + * } + * + * @param type The type of the property. + * @param name The name of the property. + */ + #define SYNTHESIZE_LAZY(type, name) \ + @synthesize name = _##name; \ + - (type *)name { \ + if (_##name == nil) { _##name = [self __##name##LazyInit]; } \ + return _##name; \ + } \ + - (type *)__##name##LazyInit + + /** + * Use this directive in place of @synthesize to automatically create a + * lazy getter for the specified property. The getter calls the default + * 'init' constructor. + * + * @param type The type of the property. + * @param name The name of the property. + */ + #define SYNTHESIZE_LAZY_INIT(type, name) \ + @synthesize name = _##name; \ + - (type *)name { \ + if (_##name == nil) { _##name = [[type alloc] init]; } \ + return _##name; \ + } + #endif /* SMRPreprocessor_h */
40
2
38
2
0af31443ed5dc2bc93aa61a8d94c5a1dfde0d65c
metadata/de.cryptobitch.muelli.vouchercalc.txt
metadata/de.cryptobitch.muelli.vouchercalc.txt
Categories:Money License:GPLv3 Web Site:https://gitlab.com/muelli/vouchercalc Source Code:https://gitlab.com/muelli/vouchercalc/tree/HEAD Issue Tracker:https://gitlab.com/muelli/vouchercalc/issues Auto Name:Voucher Calc Summary:Calculates how many vouchers you need to use Description: If you receive vouchers (from, say, sodexo) which have a fixed value and you need to pay a certain amount, you may wonder how many vouchers you have to spend and how much tip you may be giving with an additional voucher. Features: * Enter price you need to pay * Select the maximum number of vouchers you carry * It shows how much you still have to pay * Or how much extra you'd give with an additional voucher . Repo Type:git Repo:https://gitlab.com/muelli/vouchercalc.git Build:0.1,1 disable=wrong versionname commit=565d45cf4b29b5cdc77922711a9a29a41cf94852 subdir=app gradle=yes Build:0.2,2 commit=0.2 subdir=app gradle=yes Auto Update Mode:Version %v Update Check Mode:Tags Current Version:0.2 Current Version Code:2
Categories:Money License:GPLv3 Web Site:https://gitlab.com/muelli/vouchercalc Source Code:https://gitlab.com/muelli/vouchercalc/tree/HEAD Issue Tracker:https://gitlab.com/muelli/vouchercalc/issues Auto Name:Voucher Calc Summary:Calculates how many vouchers you need to use Description: If you receive vouchers (from, say, sodexo) which have a fixed value and you need to pay a certain amount, you may wonder how many vouchers you have to spend and how much tip you may be giving with an additional voucher. Features: * Enter price you need to pay * Select the maximum number of vouchers you carry * It shows how much you still have to pay * Or how much extra you'd give with an additional voucher . Repo Type:git Repo:https://gitlab.com/muelli/vouchercalc.git Build:0.1,1 disable=wrong versionname commit=565d45cf4b29b5cdc77922711a9a29a41cf94852 subdir=app gradle=yes Build:0.2,2 commit=0.2 subdir=app gradle=yes Build:0.3,3 commit=0.3 subdir=app gradle=yes Auto Update Mode:Version %v Update Check Mode:Tags Current Version:0.3 Current Version Code:3
Update Voucher Calc to 0.3 (3)
Update Voucher Calc to 0.3 (3)
Text
agpl-3.0
f-droid/fdroiddata,f-droid/fdroiddata,f-droid/fdroid-data
text
## Code Before: Categories:Money License:GPLv3 Web Site:https://gitlab.com/muelli/vouchercalc Source Code:https://gitlab.com/muelli/vouchercalc/tree/HEAD Issue Tracker:https://gitlab.com/muelli/vouchercalc/issues Auto Name:Voucher Calc Summary:Calculates how many vouchers you need to use Description: If you receive vouchers (from, say, sodexo) which have a fixed value and you need to pay a certain amount, you may wonder how many vouchers you have to spend and how much tip you may be giving with an additional voucher. Features: * Enter price you need to pay * Select the maximum number of vouchers you carry * It shows how much you still have to pay * Or how much extra you'd give with an additional voucher . Repo Type:git Repo:https://gitlab.com/muelli/vouchercalc.git Build:0.1,1 disable=wrong versionname commit=565d45cf4b29b5cdc77922711a9a29a41cf94852 subdir=app gradle=yes Build:0.2,2 commit=0.2 subdir=app gradle=yes Auto Update Mode:Version %v Update Check Mode:Tags Current Version:0.2 Current Version Code:2 ## Instruction: Update Voucher Calc to 0.3 (3) ## Code After: Categories:Money License:GPLv3 Web Site:https://gitlab.com/muelli/vouchercalc Source Code:https://gitlab.com/muelli/vouchercalc/tree/HEAD Issue Tracker:https://gitlab.com/muelli/vouchercalc/issues Auto Name:Voucher Calc Summary:Calculates how many vouchers you need to use Description: If you receive vouchers (from, say, sodexo) which have a fixed value and you need to pay a certain amount, you may wonder how many vouchers you have to spend and how much tip you may be giving with an additional voucher. Features: * Enter price you need to pay * Select the maximum number of vouchers you carry * It shows how much you still have to pay * Or how much extra you'd give with an additional voucher . Repo Type:git Repo:https://gitlab.com/muelli/vouchercalc.git Build:0.1,1 disable=wrong versionname commit=565d45cf4b29b5cdc77922711a9a29a41cf94852 subdir=app gradle=yes Build:0.2,2 commit=0.2 subdir=app gradle=yes Build:0.3,3 commit=0.3 subdir=app gradle=yes Auto Update Mode:Version %v Update Check Mode:Tags Current Version:0.3 Current Version Code:3
Categories:Money License:GPLv3 Web Site:https://gitlab.com/muelli/vouchercalc Source Code:https://gitlab.com/muelli/vouchercalc/tree/HEAD Issue Tracker:https://gitlab.com/muelli/vouchercalc/issues Auto Name:Voucher Calc Summary:Calculates how many vouchers you need to use Description: If you receive vouchers (from, say, sodexo) which have a fixed value and you need to pay a certain amount, you may wonder how many vouchers you have to spend and how much tip you may be giving with an additional voucher. Features: * Enter price you need to pay * Select the maximum number of vouchers you carry * It shows how much you still have to pay * Or how much extra you'd give with an additional voucher . Repo Type:git Repo:https://gitlab.com/muelli/vouchercalc.git Build:0.1,1 disable=wrong versionname commit=565d45cf4b29b5cdc77922711a9a29a41cf94852 subdir=app gradle=yes Build:0.2,2 commit=0.2 subdir=app gradle=yes + Build:0.3,3 + commit=0.3 + subdir=app + gradle=yes + Auto Update Mode:Version %v Update Check Mode:Tags - Current Version:0.2 ? ^ + Current Version:0.3 ? ^ - Current Version Code:2 ? ^ + Current Version Code:3 ? ^
9
0.230769
7
2
1fc397f6bdcae29c13a621542b4308546bbd5e1c
app/views/root/_report_a_problem_form.html.erb
app/views/root/_report_a_problem_form.html.erb
<div class="report-a-problem"> <h2>Help us improve GOV.UK by telling us:</h2> <form accept-charset="UTF-8" action="/feedback" method="post"> <label for="what_doing"> What were you trying to do <input id="what_doing" name="what_doing" type="text" /> </label> <input type="hidden" id="what_wrong" name="what_wrong" value="broken link (404)" /> <input type="hidden" name="utf8" value="✓" /> <button name="commit" type="submit" class="button">Send</button> </form> </div>
<div class="report-a-problem"> <h2>Help us improve GOV.UK by telling us:</h2> <form accept-charset="UTF-8" action="/feedback" method="post"> <input id="source" name="source" type="hidden" value="page_not_found"> <label for="what_doing"> What were you trying to do <input id="what_doing" name="what_doing" type="text" /> </label> <input type="hidden" id="what_wrong" name="what_wrong" value="broken link (404)" /> <input type="hidden" name="utf8" value="✓" /> <button name="commit" type="submit" class="button">Send</button> </form> </div>
Include source in 404 report problem form
Include source in 404 report problem form
HTML+ERB
mit
robinwhittleton/static,tadast/static,tadast/static,kalleth/static,alphagov/static,kalleth/static,alphagov/static,tadast/static,tadast/static,kalleth/static,robinwhittleton/static,alphagov/static,robinwhittleton/static,kalleth/static,robinwhittleton/static
html+erb
## Code Before: <div class="report-a-problem"> <h2>Help us improve GOV.UK by telling us:</h2> <form accept-charset="UTF-8" action="/feedback" method="post"> <label for="what_doing"> What were you trying to do <input id="what_doing" name="what_doing" type="text" /> </label> <input type="hidden" id="what_wrong" name="what_wrong" value="broken link (404)" /> <input type="hidden" name="utf8" value="✓" /> <button name="commit" type="submit" class="button">Send</button> </form> </div> ## Instruction: Include source in 404 report problem form ## Code After: <div class="report-a-problem"> <h2>Help us improve GOV.UK by telling us:</h2> <form accept-charset="UTF-8" action="/feedback" method="post"> <input id="source" name="source" type="hidden" value="page_not_found"> <label for="what_doing"> What were you trying to do <input id="what_doing" name="what_doing" type="text" /> </label> <input type="hidden" id="what_wrong" name="what_wrong" value="broken link (404)" /> <input type="hidden" name="utf8" value="✓" /> <button name="commit" type="submit" class="button">Send</button> </form> </div>
<div class="report-a-problem"> <h2>Help us improve GOV.UK by telling us:</h2> <form accept-charset="UTF-8" action="/feedback" method="post"> + <input id="source" name="source" type="hidden" value="page_not_found"> <label for="what_doing"> What were you trying to do <input id="what_doing" name="what_doing" type="text" /> </label> <input type="hidden" id="what_wrong" name="what_wrong" value="broken link (404)" /> <input type="hidden" name="utf8" value="✓" /> <button name="commit" type="submit" class="button">Send</button> </form> </div>
1
0.071429
1
0
3fe4cb6fbafe69b9e7520466b7e7e2d405cf0ed0
bookmarks/forms.py
bookmarks/forms.py
from django import forms from django.utils.translation import ugettext_lazy as _ from tagging.forms import TagField from bookmarks.models import Bookmark, BookmarkInstance class BookmarkInstanceForm(forms.ModelForm): url = forms.URLField(label = "URL", verify_exists=True, widget=forms.TextInput(attrs={"size": 40})) description = forms.CharField(max_length=100, widget=forms.TextInput(attrs={"size": 40})) redirect = forms.BooleanField(label="Redirect", required=False) tags = TagField(label="Tags", required=False) def __init__(self, user=None, *args, **kwargs): self.user = user super(BookmarkInstanceForm, self).__init__(*args, **kwargs) # hack to order fields self.fields.keyOrder = ['url', 'description', 'note', 'tags', 'redirect'] def clean(self): if 'url' not in self.cleaned_data: return if BookmarkInstance.on_site.filter(bookmark__url=self.cleaned_data['url'], user=self.user).count() > 0: raise forms.ValidationError(_("You have already bookmarked this link.")) return self.cleaned_data def should_redirect(self): if self.cleaned_data["redirect"]: return True else: return False def save(self, commit=True): self.instance.url = self.cleaned_data['url'] return super(BookmarkInstanceForm, self).save(commit) class Meta: model = BookmarkInstance #fields = ('url', 'description', 'note', 'redirect')
from django import forms from django.utils.translation import ugettext_lazy as _ from tagging.forms import TagField from bookmarks.models import Bookmark, BookmarkInstance class BookmarkInstanceForm(forms.ModelForm): url = forms.URLField(label = "URL", widget=forms.TextInput(attrs={"size": 40})) description = forms.CharField(max_length=100, widget=forms.TextInput(attrs={"size": 40})) redirect = forms.BooleanField(label="Redirect", required=False) tags = TagField(label="Tags", required=False) def __init__(self, user=None, *args, **kwargs): self.user = user super(BookmarkInstanceForm, self).__init__(*args, **kwargs) # hack to order fields self.fields.keyOrder = ['url', 'description', 'note', 'tags', 'redirect'] def clean(self): if 'url' not in self.cleaned_data: return if BookmarkInstance.on_site.filter(bookmark__url=self.cleaned_data['url'], user=self.user).count() > 0: raise forms.ValidationError(_("You have already bookmarked this link.")) return self.cleaned_data def should_redirect(self): if self.cleaned_data["redirect"]: return True else: return False def save(self, commit=True): self.instance.url = self.cleaned_data['url'] return super(BookmarkInstanceForm, self).save(commit) class Meta: model = BookmarkInstance #fields = ('url', 'description', 'note', 'redirect')
Make URLField compatible with Django 1.4 and remove verify_exists attribute
Make URLField compatible with Django 1.4 and remove verify_exists attribute
Python
mit
incuna/incuna-bookmarks,incuna/incuna-bookmarks
python
## Code Before: from django import forms from django.utils.translation import ugettext_lazy as _ from tagging.forms import TagField from bookmarks.models import Bookmark, BookmarkInstance class BookmarkInstanceForm(forms.ModelForm): url = forms.URLField(label = "URL", verify_exists=True, widget=forms.TextInput(attrs={"size": 40})) description = forms.CharField(max_length=100, widget=forms.TextInput(attrs={"size": 40})) redirect = forms.BooleanField(label="Redirect", required=False) tags = TagField(label="Tags", required=False) def __init__(self, user=None, *args, **kwargs): self.user = user super(BookmarkInstanceForm, self).__init__(*args, **kwargs) # hack to order fields self.fields.keyOrder = ['url', 'description', 'note', 'tags', 'redirect'] def clean(self): if 'url' not in self.cleaned_data: return if BookmarkInstance.on_site.filter(bookmark__url=self.cleaned_data['url'], user=self.user).count() > 0: raise forms.ValidationError(_("You have already bookmarked this link.")) return self.cleaned_data def should_redirect(self): if self.cleaned_data["redirect"]: return True else: return False def save(self, commit=True): self.instance.url = self.cleaned_data['url'] return super(BookmarkInstanceForm, self).save(commit) class Meta: model = BookmarkInstance #fields = ('url', 'description', 'note', 'redirect') ## Instruction: Make URLField compatible with Django 1.4 and remove verify_exists attribute ## Code After: from django import forms from django.utils.translation import ugettext_lazy as _ from tagging.forms import TagField from bookmarks.models import Bookmark, BookmarkInstance class BookmarkInstanceForm(forms.ModelForm): url = forms.URLField(label = "URL", widget=forms.TextInput(attrs={"size": 40})) description = forms.CharField(max_length=100, widget=forms.TextInput(attrs={"size": 40})) redirect = forms.BooleanField(label="Redirect", required=False) tags = TagField(label="Tags", required=False) def __init__(self, user=None, *args, **kwargs): self.user = user super(BookmarkInstanceForm, self).__init__(*args, **kwargs) # hack to order fields self.fields.keyOrder = ['url', 'description', 'note', 'tags', 'redirect'] def clean(self): if 'url' not in self.cleaned_data: return if BookmarkInstance.on_site.filter(bookmark__url=self.cleaned_data['url'], user=self.user).count() > 0: raise forms.ValidationError(_("You have already bookmarked this link.")) return self.cleaned_data def should_redirect(self): if self.cleaned_data["redirect"]: return True else: return False def save(self, commit=True): self.instance.url = self.cleaned_data['url'] return super(BookmarkInstanceForm, self).save(commit) class Meta: model = BookmarkInstance #fields = ('url', 'description', 'note', 'redirect')
from django import forms from django.utils.translation import ugettext_lazy as _ from tagging.forms import TagField from bookmarks.models import Bookmark, BookmarkInstance class BookmarkInstanceForm(forms.ModelForm): - url = forms.URLField(label = "URL", verify_exists=True, widget=forms.TextInput(attrs={"size": 40})) ? -------------------- + url = forms.URLField(label = "URL", widget=forms.TextInput(attrs={"size": 40})) description = forms.CharField(max_length=100, widget=forms.TextInput(attrs={"size": 40})) redirect = forms.BooleanField(label="Redirect", required=False) tags = TagField(label="Tags", required=False) def __init__(self, user=None, *args, **kwargs): self.user = user super(BookmarkInstanceForm, self).__init__(*args, **kwargs) # hack to order fields self.fields.keyOrder = ['url', 'description', 'note', 'tags', 'redirect'] def clean(self): if 'url' not in self.cleaned_data: return if BookmarkInstance.on_site.filter(bookmark__url=self.cleaned_data['url'], user=self.user).count() > 0: raise forms.ValidationError(_("You have already bookmarked this link.")) return self.cleaned_data def should_redirect(self): if self.cleaned_data["redirect"]: return True else: return False def save(self, commit=True): self.instance.url = self.cleaned_data['url'] return super(BookmarkInstanceForm, self).save(commit) class Meta: model = BookmarkInstance #fields = ('url', 'description', 'note', 'redirect')
2
0.05
1
1
2454e795475603ba913b8a0c659a8f70b50e2b03
README.md
README.md
[![Build Status][travis-svg]][travis] [![Dependency Status][gemnasium-svg]][gemnasium] [Lombardi's formula][1] for one-repetition maximum. ## Example ``` javascript var lombardi = require('lombardi'); lombardi(100, 10); // => 125 ``` ## Installation ``` bash $ npm install lombardi ``` ## API ``` javascript var lombardi = require('lombardi'); ``` ### `lombardi(weight, reps)` Given _Number_ `weight` and _Number_ `reps`, returns the one-repetition maximum from Lombardi's formula as a _Number_. [travis]: https://travis-ci.org/KenanY/lombardi [travis-svg]: https://img.shields.io/travis/KenanY/lombardi.svg [gemnasium]: https://gemnasium.com/KenanY/lombardi [gemnasium-svg]: https://img.shields.io/gemnasium/KenanY/lombardi.svg
[![Build Status][travis-svg]][travis] [![Dependency Status][gemnasium-svg]][gemnasium] [Lombardi's formula][1] for one-repetition maximum. ## Example ``` javascript var lombardi = require('lombardi'); lombardi(100, 10); // => 125 ``` ## Installation ``` bash $ npm install lombardi ``` ## API ``` javascript var lombardi = require('lombardi'); ``` ### `lombardi(weight, reps)` Given _Number_ `weight` and _Number_ `reps`, returns the one-repetition maximum from Lombardi's formula as a _Number_. [1]: https://en.wikipedia.org/wiki/One-repetition_maximum#Lombardi [travis]: https://travis-ci.org/KenanY/lombardi [travis-svg]: https://img.shields.io/travis/KenanY/lombardi.svg [gemnasium]: https://gemnasium.com/KenanY/lombardi [gemnasium-svg]: https://img.shields.io/gemnasium/KenanY/lombardi.svg
Add link to Lombardi's formula
Add link to Lombardi's formula
Markdown
mit
KenanY/lombardi
markdown
## Code Before: [![Build Status][travis-svg]][travis] [![Dependency Status][gemnasium-svg]][gemnasium] [Lombardi's formula][1] for one-repetition maximum. ## Example ``` javascript var lombardi = require('lombardi'); lombardi(100, 10); // => 125 ``` ## Installation ``` bash $ npm install lombardi ``` ## API ``` javascript var lombardi = require('lombardi'); ``` ### `lombardi(weight, reps)` Given _Number_ `weight` and _Number_ `reps`, returns the one-repetition maximum from Lombardi's formula as a _Number_. [travis]: https://travis-ci.org/KenanY/lombardi [travis-svg]: https://img.shields.io/travis/KenanY/lombardi.svg [gemnasium]: https://gemnasium.com/KenanY/lombardi [gemnasium-svg]: https://img.shields.io/gemnasium/KenanY/lombardi.svg ## Instruction: Add link to Lombardi's formula ## Code After: [![Build Status][travis-svg]][travis] [![Dependency Status][gemnasium-svg]][gemnasium] [Lombardi's formula][1] for one-repetition maximum. ## Example ``` javascript var lombardi = require('lombardi'); lombardi(100, 10); // => 125 ``` ## Installation ``` bash $ npm install lombardi ``` ## API ``` javascript var lombardi = require('lombardi'); ``` ### `lombardi(weight, reps)` Given _Number_ `weight` and _Number_ `reps`, returns the one-repetition maximum from Lombardi's formula as a _Number_. [1]: https://en.wikipedia.org/wiki/One-repetition_maximum#Lombardi [travis]: https://travis-ci.org/KenanY/lombardi [travis-svg]: https://img.shields.io/travis/KenanY/lombardi.svg [gemnasium]: https://gemnasium.com/KenanY/lombardi [gemnasium-svg]: https://img.shields.io/gemnasium/KenanY/lombardi.svg
[![Build Status][travis-svg]][travis] [![Dependency Status][gemnasium-svg]][gemnasium] [Lombardi's formula][1] for one-repetition maximum. ## Example ``` javascript var lombardi = require('lombardi'); lombardi(100, 10); // => 125 ``` ## Installation ``` bash $ npm install lombardi ``` ## API ``` javascript var lombardi = require('lombardi'); ``` ### `lombardi(weight, reps)` Given _Number_ `weight` and _Number_ `reps`, returns the one-repetition maximum from Lombardi's formula as a _Number_. + [1]: https://en.wikipedia.org/wiki/One-repetition_maximum#Lombardi [travis]: https://travis-ci.org/KenanY/lombardi [travis-svg]: https://img.shields.io/travis/KenanY/lombardi.svg [gemnasium]: https://gemnasium.com/KenanY/lombardi [gemnasium-svg]: https://img.shields.io/gemnasium/KenanY/lombardi.svg
1
0.027027
1
0
1029f72d548d673fafe7831194dafa86b3ed6469
README.md
README.md
Idobata adapter for [Ruboty](https://github.com/r7kamura/ruboty). ## Usage Get your idobata bots api token - from organization setting page: https://idobata.io/#/organization/YOUR_ORGANIZATION/bots - or room setting page: https://idobata.io/#/organization/YOUR_ORGANIZATION/room/YOUR_ROOM/settings ``` ruby # Gemfile ruby '2.1.2' gem 'ruboty-idobata' ``` ## ENV ``` IDOBATA_URL - Idobata url IDOBATA_PUSHER_KEY - Idobata's pusher key IDOBATA_API_TOKEN - Idobata bots api token ``` ## Screenshot ![](https://raw.githubusercontent.com/hanachin/ruboty-idobata/master/images/screenshot.png) Notice: _The default robot name is `ruboty`, so if you want to use another name(e.x. `ellen`), you must be set `ROBOT_NAME` environment variable._ ## Contributing 1. Fork it ( http://github.com/hanachin/ruboty-idobata/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
Idobata adapter for [Ruboty](https://github.com/r7kamura/ruboty). ## Usage Get your idobata bots api token - from organization setting page: https://idobata.io/#/organization/YOUR_ORGANIZATION/bots - or room setting page: https://idobata.io/#/organization/YOUR_ORGANIZATION/room/YOUR_ROOM/settings ``` ruby # Gemfile ruby '2.1.2' gem 'ruboty-idobata' ``` ## ENV ``` IDOBATA_URL - Idobata url IDOBATA_PUSHER_KEY - Idobata's pusher key IDOBATA_API_TOKEN - Idobata bots api token ``` ## Screenshot ![](https://raw.githubusercontent.com/yasslab/ruboty-idobata/master/images/screenshot.png) Notice: _The default robot name is `ruboty`, so if you want to use another name(e.x. `ellen`), you must be set `ROBOT_NAME` environment variable._ ## Contributing 1. Fork it ( http://github.com/yasslab/ruboty-idobata/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
Update readme, hanachin/ruboty-idobata -> yasslab/ruboty-idobata
Update readme, hanachin/ruboty-idobata -> yasslab/ruboty-idobata
Markdown
mit
yasslab/ruboty-idobata
markdown
## Code Before: Idobata adapter for [Ruboty](https://github.com/r7kamura/ruboty). ## Usage Get your idobata bots api token - from organization setting page: https://idobata.io/#/organization/YOUR_ORGANIZATION/bots - or room setting page: https://idobata.io/#/organization/YOUR_ORGANIZATION/room/YOUR_ROOM/settings ``` ruby # Gemfile ruby '2.1.2' gem 'ruboty-idobata' ``` ## ENV ``` IDOBATA_URL - Idobata url IDOBATA_PUSHER_KEY - Idobata's pusher key IDOBATA_API_TOKEN - Idobata bots api token ``` ## Screenshot ![](https://raw.githubusercontent.com/hanachin/ruboty-idobata/master/images/screenshot.png) Notice: _The default robot name is `ruboty`, so if you want to use another name(e.x. `ellen`), you must be set `ROBOT_NAME` environment variable._ ## Contributing 1. Fork it ( http://github.com/hanachin/ruboty-idobata/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request ## Instruction: Update readme, hanachin/ruboty-idobata -> yasslab/ruboty-idobata ## Code After: Idobata adapter for [Ruboty](https://github.com/r7kamura/ruboty). ## Usage Get your idobata bots api token - from organization setting page: https://idobata.io/#/organization/YOUR_ORGANIZATION/bots - or room setting page: https://idobata.io/#/organization/YOUR_ORGANIZATION/room/YOUR_ROOM/settings ``` ruby # Gemfile ruby '2.1.2' gem 'ruboty-idobata' ``` ## ENV ``` IDOBATA_URL - Idobata url IDOBATA_PUSHER_KEY - Idobata's pusher key IDOBATA_API_TOKEN - Idobata bots api token ``` ## Screenshot ![](https://raw.githubusercontent.com/yasslab/ruboty-idobata/master/images/screenshot.png) Notice: _The default robot name is `ruboty`, so if you want to use another name(e.x. `ellen`), you must be set `ROBOT_NAME` environment variable._ ## Contributing 1. Fork it ( http://github.com/yasslab/ruboty-idobata/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
Idobata adapter for [Ruboty](https://github.com/r7kamura/ruboty). ## Usage Get your idobata bots api token - from organization setting page: https://idobata.io/#/organization/YOUR_ORGANIZATION/bots - or room setting page: https://idobata.io/#/organization/YOUR_ORGANIZATION/room/YOUR_ROOM/settings ``` ruby # Gemfile ruby '2.1.2' gem 'ruboty-idobata' ``` ## ENV ``` IDOBATA_URL - Idobata url IDOBATA_PUSHER_KEY - Idobata's pusher key IDOBATA_API_TOKEN - Idobata bots api token ``` ## Screenshot - ![](https://raw.githubusercontent.com/hanachin/ruboty-idobata/master/images/screenshot.png) ? ^ ^ ^^^^ + ![](https://raw.githubusercontent.com/yasslab/ruboty-idobata/master/images/screenshot.png) ? ^ ^^^ ^ Notice: _The default robot name is `ruboty`, so if you want to use another name(e.x. `ellen`), you must be set `ROBOT_NAME` environment variable._ ## Contributing - 1. Fork it ( http://github.com/hanachin/ruboty-idobata/fork ) ? ^ ^ ^^^^ + 1. Fork it ( http://github.com/yasslab/ruboty-idobata/fork ) ? ^ ^^^ ^ 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
4
0.111111
2
2
393153f9c282ed5eb8384a24072982a1a9f9e456
test/karma.conf.js
test/karma.conf.js
module.exports = function(config) { config.set({ plugins: [ 'karma-jasmine', 'karma-firefox-launcher', 'karma-phantomjs-launcher', require('../index') ], frameworks: ['jasmine', 'loud'], browsers: ['Firefox', 'PhantomJS'], files: ['test.js'] }); };
module.exports = function(config) { config.set({ plugins: [ 'karma-jasmine', 'karma-firefox-launcher', 'karma-phantomjs-launcher', require('../index') ], frameworks: ['jasmine', 'loud'], browsers: ['Firefox', 'PhantomJS'], files: ['test.js'], reporters: ['dots'] }); };
Change reporter for clean output
Change reporter for clean output
JavaScript
mit
ruslansagitov/karma-loud
javascript
## Code Before: module.exports = function(config) { config.set({ plugins: [ 'karma-jasmine', 'karma-firefox-launcher', 'karma-phantomjs-launcher', require('../index') ], frameworks: ['jasmine', 'loud'], browsers: ['Firefox', 'PhantomJS'], files: ['test.js'] }); }; ## Instruction: Change reporter for clean output ## Code After: module.exports = function(config) { config.set({ plugins: [ 'karma-jasmine', 'karma-firefox-launcher', 'karma-phantomjs-launcher', require('../index') ], frameworks: ['jasmine', 'loud'], browsers: ['Firefox', 'PhantomJS'], files: ['test.js'], reporters: ['dots'] }); };
module.exports = function(config) { config.set({ plugins: [ 'karma-jasmine', 'karma-firefox-launcher', 'karma-phantomjs-launcher', require('../index') ], frameworks: ['jasmine', 'loud'], browsers: ['Firefox', 'PhantomJS'], - files: ['test.js'] + files: ['test.js'], ? + + reporters: ['dots'] }); };
3
0.214286
2
1
a4f74b4b1ba72d41b9614e078852c29c185ecbe1
.travis-ci.sh
.travis-ci.sh
echo "build here" echo "Compiling new static content" cd ./src make echo "chmod" chmod 600 ../deploy-key echo "eval" eval `ssh-agent -s` echo "ssh" ssh-add ../deploy-key echo "git clone" git clone [email protected]:hazelgrove/hazel.git echo "git conf" git config --global user.email "[email protected]" git config --global user.name "Push From Travis" echo "move to hazel" cd hazel echo "switch to gh-pages" git checkout gh-pages echo "get latest files" cp -r ../www/* . echo "git add" git add . echo "commit" git commit -m "Travis Build" echo "push" git push origin gh-pages
echo "build here" echo "Compiling new static content" cd ./src make echo "chmod" chmod 600 ../deploy-key echo "eval" eval `ssh-agent -s` echo "ssh" ssh-add ../deploy-key echo "git clone" git clone [email protected]:hazelgrove/hazel.git echo "git conf" git config --global user.email "[email protected]" git config --global user.name "Push From Travis" echo "move to hazel" cd hazel echo "switch to gh-pages" git checkout gh-pages echo "get latest files" cp -r ../_build/default/www/* . echo "git add" git add . echo "commit" git commit -m "Travis Build" echo "push" git push origin gh-pages
Fix path to build directory in travis script
Fix path to build directory in travis script
Shell
mit
hazelgrove/hazel,hazelgrove/hazel,hazelgrove/hazel
shell
## Code Before: echo "build here" echo "Compiling new static content" cd ./src make echo "chmod" chmod 600 ../deploy-key echo "eval" eval `ssh-agent -s` echo "ssh" ssh-add ../deploy-key echo "git clone" git clone [email protected]:hazelgrove/hazel.git echo "git conf" git config --global user.email "[email protected]" git config --global user.name "Push From Travis" echo "move to hazel" cd hazel echo "switch to gh-pages" git checkout gh-pages echo "get latest files" cp -r ../www/* . echo "git add" git add . echo "commit" git commit -m "Travis Build" echo "push" git push origin gh-pages ## Instruction: Fix path to build directory in travis script ## Code After: echo "build here" echo "Compiling new static content" cd ./src make echo "chmod" chmod 600 ../deploy-key echo "eval" eval `ssh-agent -s` echo "ssh" ssh-add ../deploy-key echo "git clone" git clone [email protected]:hazelgrove/hazel.git echo "git conf" git config --global user.email "[email protected]" git config --global user.name "Push From Travis" echo "move to hazel" cd hazel echo "switch to gh-pages" git checkout gh-pages echo "get latest files" cp -r ../_build/default/www/* . echo "git add" git add . echo "commit" git commit -m "Travis Build" echo "push" git push origin gh-pages
echo "build here" echo "Compiling new static content" cd ./src make echo "chmod" chmod 600 ../deploy-key echo "eval" eval `ssh-agent -s` echo "ssh" ssh-add ../deploy-key echo "git clone" git clone [email protected]:hazelgrove/hazel.git echo "git conf" git config --global user.email "[email protected]" git config --global user.name "Push From Travis" echo "move to hazel" cd hazel echo "switch to gh-pages" git checkout gh-pages echo "get latest files" - cp -r ../www/* . + cp -r ../_build/default/www/* . echo "git add" git add . echo "commit" git commit -m "Travis Build" echo "push" git push origin gh-pages
2
0.064516
1
1
71983fc2b14d88f18cb137efbb7f273277e03e0a
app.rb
app.rb
$:.unshift '.' require 'sinatra' require "sinatra/activerecord" set :database, "sqlite3:///app.db" class People < ActiveRecord::Base end get '/people' do People.all.to_json end
$:.unshift '.' require 'sinatra' require "sinatra/activerecord" set :database, "sqlite3:///app.db" class People < ActiveRecord::Base end get '/' do send_file 'index.html' end get '/people' do People.all.to_json end
Load the HTML file through Sinatra.
Load the HTML file through Sinatra. This allows ajax to work. :)
Ruby
mit
RichGuk/AngularJS-demo
ruby
## Code Before: $:.unshift '.' require 'sinatra' require "sinatra/activerecord" set :database, "sqlite3:///app.db" class People < ActiveRecord::Base end get '/people' do People.all.to_json end ## Instruction: Load the HTML file through Sinatra. This allows ajax to work. :) ## Code After: $:.unshift '.' require 'sinatra' require "sinatra/activerecord" set :database, "sqlite3:///app.db" class People < ActiveRecord::Base end get '/' do send_file 'index.html' end get '/people' do People.all.to_json end
$:.unshift '.' require 'sinatra' require "sinatra/activerecord" set :database, "sqlite3:///app.db" class People < ActiveRecord::Base end + get '/' do + send_file 'index.html' + end + get '/people' do People.all.to_json end
4
0.363636
4
0
049afc3f15f074f4f4b3331bcdb221b8a26528c5
frappe/templates/includes/breadcrumbs.html
frappe/templates/includes/breadcrumbs.html
{% if not no_breadcrumbs and parents %} <div class="container mt-3"> <nav aria-label="breadcrumb"> <ol class="breadcrumb" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> {%- set parents = parents[-3:] %} {% for parent in parents %} <li class="breadcrumb-item"> <a href="{{ url_prefix }}{{ parent.route | abs_url }}" itemprop="url"> {{ parent.title or parent.label or parent.name or "" }} </a> </li> {% endfor %} <li class="breadcrumb-item active" aria-current="page"> {{ title or "" }} </li> </ol> </nav> </div> {% endif %}
{% if not no_breadcrumbs and parents %} <div class="container mt-3"> <nav aria-label="breadcrumb"> <ol class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"> {%- set parents = parents[-3:] %} {% for parent in parents %} <li class="breadcrumb-item"> <a href="{{ url_prefix }}{{ parent.route | abs_url }}" itemprop="url"> {{ parent.title or parent.label or parent.name or "" }} </a> </li> {% endfor %} <li class="breadcrumb-item active" aria-current="page"> {{ title or "" }} </li> </ol> </nav> </div> {% endif %}
Update breadcrumb itemtype to schema.org
fix: Update breadcrumb itemtype to schema.org
HTML
mit
vjFaLk/frappe,vjFaLk/frappe,vjFaLk/frappe,vjFaLk/frappe
html
## Code Before: {% if not no_breadcrumbs and parents %} <div class="container mt-3"> <nav aria-label="breadcrumb"> <ol class="breadcrumb" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> {%- set parents = parents[-3:] %} {% for parent in parents %} <li class="breadcrumb-item"> <a href="{{ url_prefix }}{{ parent.route | abs_url }}" itemprop="url"> {{ parent.title or parent.label or parent.name or "" }} </a> </li> {% endfor %} <li class="breadcrumb-item active" aria-current="page"> {{ title or "" }} </li> </ol> </nav> </div> {% endif %} ## Instruction: fix: Update breadcrumb itemtype to schema.org ## Code After: {% if not no_breadcrumbs and parents %} <div class="container mt-3"> <nav aria-label="breadcrumb"> <ol class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"> {%- set parents = parents[-3:] %} {% for parent in parents %} <li class="breadcrumb-item"> <a href="{{ url_prefix }}{{ parent.route | abs_url }}" itemprop="url"> {{ parent.title or parent.label or parent.name or "" }} </a> </li> {% endfor %} <li class="breadcrumb-item active" aria-current="page"> {{ title or "" }} </li> </ol> </nav> </div> {% endif %}
{% if not no_breadcrumbs and parents %} <div class="container mt-3"> <nav aria-label="breadcrumb"> - <ol class="breadcrumb" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> ? ^ ------------- + <ol class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"> ? ^^^^^ ++++ {%- set parents = parents[-3:] %} {% for parent in parents %} <li class="breadcrumb-item"> <a href="{{ url_prefix }}{{ parent.route | abs_url }}" itemprop="url"> {{ parent.title or parent.label or parent.name or "" }} </a> </li> {% endfor %} <li class="breadcrumb-item active" aria-current="page"> {{ title or "" }} </li> </ol> </nav> </div> {% endif %}
2
0.105263
1
1
2fd8e0cd6ee52f27cb1efac584dc86aaee752fda
scripts/fetch-library.sh
scripts/fetch-library.sh
set -o errexit set -o nounset if [ "$#" -ne 1 ]; then echo 'Usage: ./set-config.sh <config_path>' exit 1 fi config_path=${1} # Construct Ansible extra_vars flags. If `config_path` is set, all files # directly under the directory with extension `.yaml` or `.yml` will be added. # The search for config files _will not_ descend into subdirectories. extra_vars=() for config_file in $( find -L "${config_path}" -maxdepth 1 -type f -a \( -name '*.yaml' -o -name '*.yml' \) | sort ); do extra_vars+=( --extra-vars "@${config_file}") done echo "Extra vars:" echo " ${extra_vars[*]}" PYTHONPATH=../python-modules \ ANSIBLE_CONFIG=conf/ansible/ansible.cfg \ ansible-playbook provisioners/ansible/playbooks/fetch-library.yaml \ -i conf/ansible/inventory/hosts \ --module-path provisioners/ansible/library/ \ "${extra_vars[@]}"
set -o errexit set -o nounset if [ "$#" -ne 1 ]; then echo 'Usage: ./fetch-library.sh <config_path>' exit 1 fi config_path=${1} # Construct Ansible extra_vars flags. If `config_path` is set, all files # directly under the directory with extension `.yaml` or `.yml` will be added. # The search for config files _will not_ descend into subdirectories. extra_vars=() for config_file in $( find -L "${config_path}" -maxdepth 1 -type f -a \( -name '*.yaml' -o -name '*.yml' \) | sort ); do extra_vars+=( --extra-vars "@${config_file}") done echo "Extra vars:" echo " ${extra_vars[*]}" PYTHONPATH=../python-modules \ ANSIBLE_CONFIG=conf/ansible/ansible.cfg \ ansible-playbook provisioners/ansible/playbooks/fetch-library.yaml \ -i conf/ansible/inventory/hosts \ --module-path provisioners/ansible/library/ \ "${extra_vars[@]}"
Fix usage example script name.
Fix usage example script name.
Shell
apache-2.0
shinesolutions/aem-aws-stack-builder,shinesolutions/aem-aws-stack-builder
shell
## Code Before: set -o errexit set -o nounset if [ "$#" -ne 1 ]; then echo 'Usage: ./set-config.sh <config_path>' exit 1 fi config_path=${1} # Construct Ansible extra_vars flags. If `config_path` is set, all files # directly under the directory with extension `.yaml` or `.yml` will be added. # The search for config files _will not_ descend into subdirectories. extra_vars=() for config_file in $( find -L "${config_path}" -maxdepth 1 -type f -a \( -name '*.yaml' -o -name '*.yml' \) | sort ); do extra_vars+=( --extra-vars "@${config_file}") done echo "Extra vars:" echo " ${extra_vars[*]}" PYTHONPATH=../python-modules \ ANSIBLE_CONFIG=conf/ansible/ansible.cfg \ ansible-playbook provisioners/ansible/playbooks/fetch-library.yaml \ -i conf/ansible/inventory/hosts \ --module-path provisioners/ansible/library/ \ "${extra_vars[@]}" ## Instruction: Fix usage example script name. ## Code After: set -o errexit set -o nounset if [ "$#" -ne 1 ]; then echo 'Usage: ./fetch-library.sh <config_path>' exit 1 fi config_path=${1} # Construct Ansible extra_vars flags. If `config_path` is set, all files # directly under the directory with extension `.yaml` or `.yml` will be added. # The search for config files _will not_ descend into subdirectories. extra_vars=() for config_file in $( find -L "${config_path}" -maxdepth 1 -type f -a \( -name '*.yaml' -o -name '*.yml' \) | sort ); do extra_vars+=( --extra-vars "@${config_file}") done echo "Extra vars:" echo " ${extra_vars[*]}" PYTHONPATH=../python-modules \ ANSIBLE_CONFIG=conf/ansible/ansible.cfg \ ansible-playbook provisioners/ansible/playbooks/fetch-library.yaml \ -i conf/ansible/inventory/hosts \ --module-path provisioners/ansible/library/ \ "${extra_vars[@]}"
set -o errexit set -o nounset if [ "$#" -ne 1 ]; then - echo 'Usage: ./set-config.sh <config_path>' ? ^ ^^^^ ^ + echo 'Usage: ./fetch-library.sh <config_path>' ? ^ ++ ^ ^^^^^ exit 1 fi config_path=${1} # Construct Ansible extra_vars flags. If `config_path` is set, all files # directly under the directory with extension `.yaml` or `.yml` will be added. # The search for config files _will not_ descend into subdirectories. extra_vars=() for config_file in $( find -L "${config_path}" -maxdepth 1 -type f -a \( -name '*.yaml' -o -name '*.yml' \) | sort ); do extra_vars+=( --extra-vars "@${config_file}") done echo "Extra vars:" echo " ${extra_vars[*]}" PYTHONPATH=../python-modules \ ANSIBLE_CONFIG=conf/ansible/ansible.cfg \ ansible-playbook provisioners/ansible/playbooks/fetch-library.yaml \ -i conf/ansible/inventory/hosts \ --module-path provisioners/ansible/library/ \ "${extra_vars[@]}"
2
0.074074
1
1
b614e306f3a796e7dccf21865140207d124761ff
app/views/spree/admin/volume_prices/_edit_fields.html.erb
app/views/spree/admin/volume_prices/_edit_fields.html.erb
<% content_for :page_actions do %> <span id="new_add_volume_price" data-hook> <%= link_to I18n.t('spree.add_volume_price'), 'javascript:;', { :'data-target' => 'tbody#volume_prices', class: 'btn btn-primary spree_add_fields', id: 'add_volume_price' } %> </span> <% end %> <h3><%= I18n.t('spree.volume_prices') %></h3> <table class="table"> <thead> <tr> <th><%= I18n.t('spree.name') %></th> <th><%= I18n.t('spree.discount_type') %></th> <th><%= I18n.t('spree.range') %></th> <th><%= I18n.t('spree.amount') %></th> <th><%= I18n.t('spree.position') %></th> <th><%= I18n.t('spree.role') %></th> <th class="actions"></th> </tr> </thead> <tbody id="volume_prices"> <%= f.fields_for :volume_prices do |vp_form| %> <%= render partial: 'spree/admin/volume_prices/volume_price_fields', locals: { f: vp_form } %> <% end %> </tbody> </table> <br/><br/>
<h3><%= I18n.t('spree.volume_prices') %></h3> <table class="table"> <thead> <tr> <th><%= I18n.t('spree.name') %></th> <th><%= I18n.t('spree.discount_type') %></th> <th><%= I18n.t('spree.range') %></th> <th><%= I18n.t('spree.amount') %></th> <th><%= I18n.t('spree.position') %></th> <th><%= I18n.t('spree.role') %></th> <th class="actions"></th> </tr> </thead> <tbody id="volume_prices"> <%= f.fields_for :volume_prices do |vp_form| %> <%= render partial: 'spree/admin/volume_prices/volume_price_fields', locals: { f: vp_form } %> <% end %> </tbody> </table> <span id="new_add_volume_price" data-hook> <%= link_to t(:add_volume_price, scope: :spree), 'javascript:;', { data: { target: 'tbody#volume_prices' }, class: 'btn btn-primary spree_add_fields', id: 'add_volume_price' } %> </span>
Move the "Add volume price button" below the table
Move the "Add volume price button" below the table
HTML+ERB
bsd-3-clause
solidusio-contrib/solidus_volume_pricing,solidusio-contrib/solidus_volume_pricing,solidusio-contrib/solidus_volume_pricing,solidusio-contrib/solidus_volume_pricing
html+erb
## Code Before: <% content_for :page_actions do %> <span id="new_add_volume_price" data-hook> <%= link_to I18n.t('spree.add_volume_price'), 'javascript:;', { :'data-target' => 'tbody#volume_prices', class: 'btn btn-primary spree_add_fields', id: 'add_volume_price' } %> </span> <% end %> <h3><%= I18n.t('spree.volume_prices') %></h3> <table class="table"> <thead> <tr> <th><%= I18n.t('spree.name') %></th> <th><%= I18n.t('spree.discount_type') %></th> <th><%= I18n.t('spree.range') %></th> <th><%= I18n.t('spree.amount') %></th> <th><%= I18n.t('spree.position') %></th> <th><%= I18n.t('spree.role') %></th> <th class="actions"></th> </tr> </thead> <tbody id="volume_prices"> <%= f.fields_for :volume_prices do |vp_form| %> <%= render partial: 'spree/admin/volume_prices/volume_price_fields', locals: { f: vp_form } %> <% end %> </tbody> </table> <br/><br/> ## Instruction: Move the "Add volume price button" below the table ## Code After: <h3><%= I18n.t('spree.volume_prices') %></h3> <table class="table"> <thead> <tr> <th><%= I18n.t('spree.name') %></th> <th><%= I18n.t('spree.discount_type') %></th> <th><%= I18n.t('spree.range') %></th> <th><%= I18n.t('spree.amount') %></th> <th><%= I18n.t('spree.position') %></th> <th><%= I18n.t('spree.role') %></th> <th class="actions"></th> </tr> </thead> <tbody id="volume_prices"> <%= f.fields_for :volume_prices do |vp_form| %> <%= render partial: 'spree/admin/volume_prices/volume_price_fields', locals: { f: vp_form } %> <% end %> </tbody> </table> <span id="new_add_volume_price" data-hook> <%= link_to t(:add_volume_price, scope: :spree), 'javascript:;', { data: { target: 'tbody#volume_prices' }, class: 'btn btn-primary spree_add_fields', id: 'add_volume_price' } %> </span>
+ <h3><%= I18n.t('spree.volume_prices') %></h3> - <% content_for :page_actions do %> - <span id="new_add_volume_price" data-hook> - <%= link_to I18n.t('spree.add_volume_price'), 'javascript:;', { - :'data-target' => 'tbody#volume_prices', - class: 'btn btn-primary spree_add_fields', - id: 'add_volume_price' - } %> - </span> - <% end %> - <h3><%= I18n.t('spree.volume_prices') %></h3> <table class="table"> <thead> <tr> <th><%= I18n.t('spree.name') %></th> <th><%= I18n.t('spree.discount_type') %></th> <th><%= I18n.t('spree.range') %></th> <th><%= I18n.t('spree.amount') %></th> <th><%= I18n.t('spree.position') %></th> <th><%= I18n.t('spree.role') %></th> <th class="actions"></th> </tr> </thead> <tbody id="volume_prices"> <%= f.fields_for :volume_prices do |vp_form| %> <%= render partial: 'spree/admin/volume_prices/volume_price_fields', locals: { f: vp_form } %> <% end %> </tbody> </table> - <br/><br/> + + <span id="new_add_volume_price" data-hook> + <%= link_to t(:add_volume_price, scope: :spree), 'javascript:;', { + data: { target: 'tbody#volume_prices' }, + class: 'btn btn-primary spree_add_fields', + id: 'add_volume_price' + } %> + </span>
20
0.666667
9
11
e992c9c5f12f2375221144cfa000c891ce6732b8
lib/src/_shared/WithUtils.jsx
lib/src/_shared/WithUtils.jsx
import React from 'react'; import PropTypes from 'prop-types'; import { MuiPickersContextConsumer } from '../utils/MuiPickersUtilsProvider'; const WithUtils = () => (Component) => { const withUtils = ({ pickerRef, ...props }) => ( <MuiPickersContextConsumer> {utils => <Component ref={pickerRef} utils={utils} {...props} />} </MuiPickersContextConsumer> ); withUtils.displayName = `WithUtils(${Component.displayName || Component.name})`; withUtils.propTypes = { pickerRef: PropTypes.func, }; withUtils.defaultProps = { pickerRef: undefined, }; return withUtils; }; export default WithUtils;
import React from 'react'; import PropTypes from 'prop-types'; import { MuiPickersContextConsumer } from '../utils/MuiPickersUtilsProvider'; const WithUtils = () => (Component) => { const withUtils = props => ( <MuiPickersContextConsumer> {utils => <Component utils={utils} {...props} />} </MuiPickersContextConsumer> ); withUtils.displayName = `WithUtils(${Component.displayName || Component.name})`; withUtils.propTypes = { pickerRef: PropTypes.func, }; withUtils.defaultProps = { pickerRef: undefined, }; return withUtils; }; export default WithUtils;
Remove unused pickerRef prop forwarding
Remove unused pickerRef prop forwarding
JSX
mit
oliviertassinari/material-ui,mui-org/material-ui,mui-org/material-ui,dmtrKovalenko/material-ui-pickers,mbrookes/material-ui,rscnt/material-ui,mui-org/material-ui,callemall/material-ui,callemall/material-ui,mbrookes/material-ui,rscnt/material-ui,oliviertassinari/material-ui,dmtrKovalenko/material-ui-pickers,oliviertassinari/material-ui,callemall/material-ui,callemall/material-ui,mbrookes/material-ui,rscnt/material-ui
jsx
## Code Before: import React from 'react'; import PropTypes from 'prop-types'; import { MuiPickersContextConsumer } from '../utils/MuiPickersUtilsProvider'; const WithUtils = () => (Component) => { const withUtils = ({ pickerRef, ...props }) => ( <MuiPickersContextConsumer> {utils => <Component ref={pickerRef} utils={utils} {...props} />} </MuiPickersContextConsumer> ); withUtils.displayName = `WithUtils(${Component.displayName || Component.name})`; withUtils.propTypes = { pickerRef: PropTypes.func, }; withUtils.defaultProps = { pickerRef: undefined, }; return withUtils; }; export default WithUtils; ## Instruction: Remove unused pickerRef prop forwarding ## Code After: import React from 'react'; import PropTypes from 'prop-types'; import { MuiPickersContextConsumer } from '../utils/MuiPickersUtilsProvider'; const WithUtils = () => (Component) => { const withUtils = props => ( <MuiPickersContextConsumer> {utils => <Component utils={utils} {...props} />} </MuiPickersContextConsumer> ); withUtils.displayName = `WithUtils(${Component.displayName || Component.name})`; withUtils.propTypes = { pickerRef: PropTypes.func, }; withUtils.defaultProps = { pickerRef: undefined, }; return withUtils; }; export default WithUtils;
import React from 'react'; import PropTypes from 'prop-types'; import { MuiPickersContextConsumer } from '../utils/MuiPickersUtilsProvider'; const WithUtils = () => (Component) => { - const withUtils = ({ pickerRef, ...props }) => ( ? ----------------- --- + const withUtils = props => ( <MuiPickersContextConsumer> - {utils => <Component ref={pickerRef} utils={utils} {...props} />} ? ---------------- + {utils => <Component utils={utils} {...props} />} </MuiPickersContextConsumer> ); withUtils.displayName = `WithUtils(${Component.displayName || Component.name})`; withUtils.propTypes = { pickerRef: PropTypes.func, }; withUtils.defaultProps = { pickerRef: undefined, }; return withUtils; }; export default WithUtils;
4
0.153846
2
2
d5a919354a0684554879f2905facc9624f489af6
api/item.php
api/item.php
<?php header('Content-type:application/json'); require_once('./json.php'); /* routes */ switch ($_SERVER['REQUEST_METHOD']) { case 'GET': get(); break; default: http_response_code(405); header('Allow: GET'); } function get () { switch ( count($_GET) ) { case 0: getList(); break; case 1: getItem(); break; default: //http_response_code(400); } } /* end points */ function getItem () { $list = getJson('item'); foreach ($list as $i) { if ($_GET['id'] == $i['id']){ $item = new Item(); $item->createFromArray($item); exit($item->toJson()); } } exit(http_response_code(404)); } function getList () { $list = getJson('item'); exit(json_encode($list)); } ?>
<?php header('Content-type:application/json'); require_once('./json.php'); require_once('./objects/item.php'); /* routes */ switch ($_SERVER['REQUEST_METHOD']) { case 'GET': get(); break; default: http_response_code(405); header('Allow: GET'); } function get () { switch ( count($_GET) ) { case 0: getList(); break; case 1: getItem(); break; default: //http_response_code(400); } } /* end points */ function getItem () { $list = getJson('item'); foreach ($list as $i) { if ($_GET['id'] == $i['id']){ $item = new Item(); $item->createFromArray($i); exit($item->toJson()); } } exit(http_response_code(404)); } function getList () { $list = getJson('item'); exit(json_encode($list)); } ?>
Fix single Item retrieval in Item api
Fix single Item retrieval in Item api
PHP
mit
nklnkl/csc226-lab2,nklnkl/csc226-lab2
php
## Code Before: <?php header('Content-type:application/json'); require_once('./json.php'); /* routes */ switch ($_SERVER['REQUEST_METHOD']) { case 'GET': get(); break; default: http_response_code(405); header('Allow: GET'); } function get () { switch ( count($_GET) ) { case 0: getList(); break; case 1: getItem(); break; default: //http_response_code(400); } } /* end points */ function getItem () { $list = getJson('item'); foreach ($list as $i) { if ($_GET['id'] == $i['id']){ $item = new Item(); $item->createFromArray($item); exit($item->toJson()); } } exit(http_response_code(404)); } function getList () { $list = getJson('item'); exit(json_encode($list)); } ?> ## Instruction: Fix single Item retrieval in Item api ## Code After: <?php header('Content-type:application/json'); require_once('./json.php'); require_once('./objects/item.php'); /* routes */ switch ($_SERVER['REQUEST_METHOD']) { case 'GET': get(); break; default: http_response_code(405); header('Allow: GET'); } function get () { switch ( count($_GET) ) { case 0: getList(); break; case 1: getItem(); break; default: //http_response_code(400); } } /* end points */ function getItem () { $list = getJson('item'); foreach ($list as $i) { if ($_GET['id'] == $i['id']){ $item = new Item(); $item->createFromArray($i); exit($item->toJson()); } } exit(http_response_code(404)); } function getList () { $list = getJson('item'); exit(json_encode($list)); } ?>
<?php header('Content-type:application/json'); require_once('./json.php'); + require_once('./objects/item.php'); /* routes */ switch ($_SERVER['REQUEST_METHOD']) { case 'GET': get(); break; default: http_response_code(405); header('Allow: GET'); } function get () { switch ( count($_GET) ) { case 0: getList(); break; case 1: getItem(); break; default: //http_response_code(400); } } /* end points */ function getItem () { $list = getJson('item'); foreach ($list as $i) { if ($_GET['id'] == $i['id']){ $item = new Item(); - $item->createFromArray($item); ? --- + $item->createFromArray($i); exit($item->toJson()); } } exit(http_response_code(404)); } function getList () { $list = getJson('item'); exit(json_encode($list)); } ?>
3
0.06
2
1
85f8906cc71ead61df45d8a4367be551e500dbca
.travis.yml
.travis.yml
language: r sudo: required warnings_are_errors: true r_github_packages: - kirillseva/covr - hadley/devtools - smbache/magrittr - hadley/testthat - kirillseva/objectdiff@stagerunner_debug_message - robertzk/testthatsomemore after_success: - "Rscript -e 'library(covr);coveralls()'" notifications: email: on_success: change on_failure: change hipchat: rooms: secure: mrJnMQv+nNC2lbEBlsS9q3Uaqevt0bRSMp8Nw7OBLQwVP+gfqkz6omvlatYhMwumiZxUZZdb1qPggx0gx8N0C3galJoaq9U1fjtZnX0nAL519uYbwNGlK6Z0Pq/27BW3014ZVrRcTKQa0xJM5/LfN1tzD+hyAyJiocOEIkdABAA= on_success: change on_failure: change template: - "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message} | Details: %{build_url} | Changes: %{compare_url}"
language: r sudo: required warnings_are_errors: true r_github_packages: - kirillseva/covr - hadley/devtools - smbache/magrittr - hadley/testthat - robertzk/objectdiff - robertzk/testthatsomemore after_success: - "Rscript -e 'library(covr);coveralls()'" notifications: email: on_success: change on_failure: change hipchat: rooms: secure: mrJnMQv+nNC2lbEBlsS9q3Uaqevt0bRSMp8Nw7OBLQwVP+gfqkz6omvlatYhMwumiZxUZZdb1qPggx0gx8N0C3galJoaq9U1fjtZnX0nAL519uYbwNGlK6Z0Pq/27BW3014ZVrRcTKQa0xJM5/LfN1tzD+hyAyJiocOEIkdABAA= on_success: change on_failure: change template: - "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message} | Details: %{build_url} | Changes: %{compare_url}"
Install objectdiff from master for CI.
Install objectdiff from master for CI.
YAML
mit
syberia/stagerunner,robertzk/stagerunner,robertzk/stagerunner,syberia/stagerunner
yaml
## Code Before: language: r sudo: required warnings_are_errors: true r_github_packages: - kirillseva/covr - hadley/devtools - smbache/magrittr - hadley/testthat - kirillseva/objectdiff@stagerunner_debug_message - robertzk/testthatsomemore after_success: - "Rscript -e 'library(covr);coveralls()'" notifications: email: on_success: change on_failure: change hipchat: rooms: secure: mrJnMQv+nNC2lbEBlsS9q3Uaqevt0bRSMp8Nw7OBLQwVP+gfqkz6omvlatYhMwumiZxUZZdb1qPggx0gx8N0C3galJoaq9U1fjtZnX0nAL519uYbwNGlK6Z0Pq/27BW3014ZVrRcTKQa0xJM5/LfN1tzD+hyAyJiocOEIkdABAA= on_success: change on_failure: change template: - "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message} | Details: %{build_url} | Changes: %{compare_url}" ## Instruction: Install objectdiff from master for CI. ## Code After: language: r sudo: required warnings_are_errors: true r_github_packages: - kirillseva/covr - hadley/devtools - smbache/magrittr - hadley/testthat - robertzk/objectdiff - robertzk/testthatsomemore after_success: - "Rscript -e 'library(covr);coveralls()'" notifications: email: on_success: change on_failure: change hipchat: rooms: secure: mrJnMQv+nNC2lbEBlsS9q3Uaqevt0bRSMp8Nw7OBLQwVP+gfqkz6omvlatYhMwumiZxUZZdb1qPggx0gx8N0C3galJoaq9U1fjtZnX0nAL519uYbwNGlK6Z0Pq/27BW3014ZVrRcTKQa0xJM5/LfN1tzD+hyAyJiocOEIkdABAA= on_success: change on_failure: change template: - "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message} | Details: %{build_url} | Changes: %{compare_url}"
language: r sudo: required warnings_are_errors: true r_github_packages: - kirillseva/covr - hadley/devtools - smbache/magrittr - hadley/testthat - - kirillseva/objectdiff@stagerunner_debug_message + - robertzk/objectdiff - robertzk/testthatsomemore after_success: - "Rscript -e 'library(covr);coveralls()'" notifications: email: on_success: change on_failure: change hipchat: rooms: secure: mrJnMQv+nNC2lbEBlsS9q3Uaqevt0bRSMp8Nw7OBLQwVP+gfqkz6omvlatYhMwumiZxUZZdb1qPggx0gx8N0C3galJoaq9U1fjtZnX0nAL519uYbwNGlK6Z0Pq/27BW3014ZVrRcTKQa0xJM5/LfN1tzD+hyAyJiocOEIkdABAA= on_success: change on_failure: change template: - "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message} | Details: %{build_url} | Changes: %{compare_url}"
2
0.074074
1
1
bb3be03633a3506d5d8eba99a88e75925d036be7
docs/README.md
docs/README.md
This is a collection of necessary GoCD plugins to enable publishing, polling and fetching artifacts from Amazon S3. We built these at Indix due to our need to share artifacts across many Go servers. (we have a lot of them!) There are two task plugins and one material plugin that enable artifacts on S3: 1. **indix.s3publish** - Task plugin to push artifacts to S3. 2. **indix.s3fetch** - Task plugin to fetch artifacts from S3. 3. **indix.s3material** - Package poller plugin to poll for new artifacts in S3. While the plugins could be used independently of each other, they work best together as a collection of plugins. If you are interested in a multi-server setup, note that it is not be necessary to install all the three plugins to all the Go servers. If a Go server is going to be only a source of artifacts, only the publish plugin needs to be installed on it. If a Go server is going to need artifacts from other servers, then only the fetch and material plugins are needed on it.
<p align="center"> <img src="resources/images/banner.png" width="750" height="200"/> </p> This is a collection of necessary GoCD plugins to enable publishing, polling and fetching artifacts from Amazon S3. We built these at Indix due to our need to share artifacts across many Go servers. (we have a lot of them!) There are two task plugins and one material plugin that enable artifacts on S3: 1. **indix.s3publish** - Task plugin to push artifacts to S3. 2. **indix.s3fetch** - Task plugin to fetch artifacts from S3. 3. **indix.s3material** - Package poller plugin to poll for new artifacts in S3. While the plugins could be used independently of each other, they work best together as a collection of plugins. If you are interested in a multi-server setup, note that it is not be necessary to install all the three plugins to all the Go servers. If a Go server is going to be only a source of artifacts, only the publish plugin needs to be installed on it. If a Go server is going to need artifacts from other servers, then only the fetch and material plugins are needed on it.
Add the banner to the intro page of our book as well.
[DOCS] Add the banner to the intro page of our book as well.
Markdown
apache-2.0
ind9/gocd-s3-artifacts,ind9/gocd-s3-artifacts,ind9/gocd-s3-artifacts
markdown
## Code Before: This is a collection of necessary GoCD plugins to enable publishing, polling and fetching artifacts from Amazon S3. We built these at Indix due to our need to share artifacts across many Go servers. (we have a lot of them!) There are two task plugins and one material plugin that enable artifacts on S3: 1. **indix.s3publish** - Task plugin to push artifacts to S3. 2. **indix.s3fetch** - Task plugin to fetch artifacts from S3. 3. **indix.s3material** - Package poller plugin to poll for new artifacts in S3. While the plugins could be used independently of each other, they work best together as a collection of plugins. If you are interested in a multi-server setup, note that it is not be necessary to install all the three plugins to all the Go servers. If a Go server is going to be only a source of artifacts, only the publish plugin needs to be installed on it. If a Go server is going to need artifacts from other servers, then only the fetch and material plugins are needed on it. ## Instruction: [DOCS] Add the banner to the intro page of our book as well. ## Code After: <p align="center"> <img src="resources/images/banner.png" width="750" height="200"/> </p> This is a collection of necessary GoCD plugins to enable publishing, polling and fetching artifacts from Amazon S3. We built these at Indix due to our need to share artifacts across many Go servers. (we have a lot of them!) There are two task plugins and one material plugin that enable artifacts on S3: 1. **indix.s3publish** - Task plugin to push artifacts to S3. 2. **indix.s3fetch** - Task plugin to fetch artifacts from S3. 3. **indix.s3material** - Package poller plugin to poll for new artifacts in S3. While the plugins could be used independently of each other, they work best together as a collection of plugins. If you are interested in a multi-server setup, note that it is not be necessary to install all the three plugins to all the Go servers. If a Go server is going to be only a source of artifacts, only the publish plugin needs to be installed on it. If a Go server is going to need artifacts from other servers, then only the fetch and material plugins are needed on it.
+ + <p align="center"> + <img src="resources/images/banner.png" width="750" height="200"/> + </p> This is a collection of necessary GoCD plugins to enable publishing, polling and fetching artifacts from Amazon S3. We built these at Indix due to our need to share artifacts across many Go servers. (we have a lot of them!) There are two task plugins and one material plugin that enable artifacts on S3: 1. **indix.s3publish** - Task plugin to push artifacts to S3. 2. **indix.s3fetch** - Task plugin to fetch artifacts from S3. 3. **indix.s3material** - Package poller plugin to poll for new artifacts in S3. While the plugins could be used independently of each other, they work best together as a collection of plugins. If you are interested in a multi-server setup, note that it is not be necessary to install all the three plugins to all the Go servers. If a Go server is going to be only a source of artifacts, only the publish plugin needs to be installed on it. If a Go server is going to need artifacts from other servers, then only the fetch and material plugins are needed on it.
4
0.25
4
0
2bfb9af6589c3ed23ef610feaa608afb35bc734a
app/common-components/directives/ng-fade-menu_module.js
app/common-components/directives/ng-fade-menu_module.js
'use strict'; var fadeMenuDirective = angular.module('ngFadeMenu', [ ] ); fadeMenuDirective.directive( 'ngFadeMenu', function( $timeout, screenSize ) { return { restrict: 'A', link: function( scope, element, attr ) { scope.mobile = screenSize.on( 'xs, sm', function( match ){ scope.mobile = match; }); scope.$watch( 'mobile' ); if ( !scope.mobile ) { var timeoutPromise; // resetFadeTimeout(); element.parent( ).parent( ).parent( ).parent( ).parent( ).bind( 'mousemove', function( e ) { resetFadeTimeout( ); } ); scope.$watch( 'stateName', function( newValue, oldValue ) { resetFadeTimeout( ); } ); scope.$watch( 'stateParams.section', function( newValue, oldValue ) { resetFadeTimeout( ); } ); function resetFadeTimeout( ) { element.removeClass( 'hidden' ); $timeout.cancel( timeoutPromise ); if ( scope.stateName === "root" || ( scope.stateName === "root.section-state" && scope.stateParams.section !== "news" && scope.stateParams.section !== "search" ) ) { timeoutPromise = $timeout( function ( e ) { element.addClass( 'hidden' ); }, 3000 ); } } } } } });
'use strict'; var fadeMenuDirective = angular.module('ngFadeMenu', [ ] ); fadeMenuDirective.directive( 'ngFadeMenu', function( $timeout, screenSize ) { return { restrict: 'A', link: function( scope, element, attr ) { scope.mobile = screenSize.on( 'xs, sm', function( match ){ scope.mobile = match; }); var timeoutPromise; // resetFadeTimeout(); element.parent( ).parent( ).parent( ).parent( ).parent( ).bind( 'mousemove', function( e ) { resetFadeTimeout( ); } ); scope.$watch( 'stateName', function( newValue, oldValue ) { resetFadeTimeout( ); } ); scope.$watch( 'stateParams.section', function( newValue, oldValue ) { resetFadeTimeout( ); } ); function resetFadeTimeout( ) { if( !scope.mobile ) { element.removeClass( 'hidden' ); $timeout.cancel( timeoutPromise ); if ( scope.stateName === "root" || ( scope.stateName === "root.section-state" && scope.stateParams.section !== "news" && scope.stateParams.section !== "search" ) ) { timeoutPromise = $timeout( function ( e ) { element.addClass( 'hidden' ); }, 3000 ); } } } } } });
Fix menu fade mobile detection iOS bug
Fix menu fade mobile detection iOS bug
JavaScript
mit
awanderingorill/morph_frontend,awanderingorill/morph_frontend
javascript
## Code Before: 'use strict'; var fadeMenuDirective = angular.module('ngFadeMenu', [ ] ); fadeMenuDirective.directive( 'ngFadeMenu', function( $timeout, screenSize ) { return { restrict: 'A', link: function( scope, element, attr ) { scope.mobile = screenSize.on( 'xs, sm', function( match ){ scope.mobile = match; }); scope.$watch( 'mobile' ); if ( !scope.mobile ) { var timeoutPromise; // resetFadeTimeout(); element.parent( ).parent( ).parent( ).parent( ).parent( ).bind( 'mousemove', function( e ) { resetFadeTimeout( ); } ); scope.$watch( 'stateName', function( newValue, oldValue ) { resetFadeTimeout( ); } ); scope.$watch( 'stateParams.section', function( newValue, oldValue ) { resetFadeTimeout( ); } ); function resetFadeTimeout( ) { element.removeClass( 'hidden' ); $timeout.cancel( timeoutPromise ); if ( scope.stateName === "root" || ( scope.stateName === "root.section-state" && scope.stateParams.section !== "news" && scope.stateParams.section !== "search" ) ) { timeoutPromise = $timeout( function ( e ) { element.addClass( 'hidden' ); }, 3000 ); } } } } } }); ## Instruction: Fix menu fade mobile detection iOS bug ## Code After: 'use strict'; var fadeMenuDirective = angular.module('ngFadeMenu', [ ] ); fadeMenuDirective.directive( 'ngFadeMenu', function( $timeout, screenSize ) { return { restrict: 'A', link: function( scope, element, attr ) { scope.mobile = screenSize.on( 'xs, sm', function( match ){ scope.mobile = match; }); var timeoutPromise; // resetFadeTimeout(); element.parent( ).parent( ).parent( ).parent( ).parent( ).bind( 'mousemove', function( e ) { resetFadeTimeout( ); } ); scope.$watch( 'stateName', function( newValue, oldValue ) { resetFadeTimeout( ); } ); scope.$watch( 'stateParams.section', function( newValue, oldValue ) { resetFadeTimeout( ); } ); function resetFadeTimeout( ) { if( !scope.mobile ) { element.removeClass( 'hidden' ); $timeout.cancel( timeoutPromise ); if ( scope.stateName === "root" || ( scope.stateName === "root.section-state" && scope.stateParams.section !== "news" && scope.stateParams.section !== "search" ) ) { timeoutPromise = $timeout( function ( e ) { element.addClass( 'hidden' ); }, 3000 ); } } } } } });
'use strict'; var fadeMenuDirective = angular.module('ngFadeMenu', [ ] ); fadeMenuDirective.directive( 'ngFadeMenu', function( $timeout, screenSize ) { return { restrict: 'A', link: function( scope, element, attr ) { scope.mobile = screenSize.on( 'xs, sm', function( match ){ scope.mobile = match; }); - scope.$watch( 'mobile' ); + var timeoutPromise; + // resetFadeTimeout(); + element.parent( ).parent( ).parent( ).parent( ).parent( ).bind( 'mousemove', function( e ) + { + resetFadeTimeout( ); + } ); - if ( !scope.mobile ) + scope.$watch( 'stateName', function( newValue, oldValue ) - { ? - + { - var timeoutPromise; - // resetFadeTimeout(); - element.parent( ).parent( ).parent( ).parent( ).parent( ).bind( 'mousemove', function( e ) - { - resetFadeTimeout( ); ? - + resetFadeTimeout( ); - } ); ? - + } ); - scope.$watch( 'stateName', function( newValue, oldValue ) ? - ^ + scope.$watch( 'stateParams.section', function( newValue, oldValue ) ? ^^^ +++ +++++ - { ? - + { - resetFadeTimeout( ); ? - + resetFadeTimeout( ); - } ); ? - + } ); - scope.$watch( 'stateParams.section', function( newValue, oldValue ) - { - resetFadeTimeout( ); - } ); - - function resetFadeTimeout( ) ? - + function resetFadeTimeout( ) + { + if( !scope.mobile ) { element.removeClass( 'hidden' ); $timeout.cancel( timeoutPromise ); if ( scope.stateName === "root" || ( scope.stateName === "root.section-state" && scope.stateParams.section !== "news" && scope.stateParams.section !== "search" ) ) { timeoutPromise = $timeout( function ( e ) { element.addClass( 'hidden' ); }, 3000 ); } } - } + } ? ++ - - } } });
40
0.754717
18
22
fd69f44933c736defbdd48adac3c7cb950455a01
src/FOM/UserBundle/Resources/views/ACL/edit.html.twig
src/FOM/UserBundle/Resources/views/ACL/edit.html.twig
{% extends "MapbenderManagerBundle::manager.html.twig" %} {% block title %}{{ "fom.user.acl.edit.edit_class_acl" | trans({'%name%': class_name}) }}{% endblock %} {% block manager_content %} {{ form_start(form, { 'action': path('fom_user_acl_update', { 'class': class }), 'method': 'POST', 'attr': { novalidate: 'novalidate', autocomplete: 'off', name: form_name }}) }} <div id="aclTabContainer" class="tabContainer aclTabContainer"> <ul class="tabs"> <li id="tabSecurity" class="tab active">{{"fom.user.acl.edit.security" | trans }}</li> </ul> <div id="containerSecurity" class="container containerSecurity active"> <a id="addPermission" href="{{path('fom_user_acl_overview')}}" class="iconAdd iconBig right" title="{{'fom.user.acl.edit.add_users_groups'|trans}}"></a> {{ form_widget(form) }} </div> <div class="clearContainer"></div> {{ form_row(form._token) }} </div> <div class="right"> <input type="submit" value="{{ 'fom.user.acl.edit.save' | trans }}" class="button"/> <a href="{{ path('fom_user_acl_index') }}" class="button critical">{{ 'fom.user.acl.edit.cancel' | trans}}</a> </div> {{ form_end(form) }} {% endblock %}
{% extends "MapbenderManagerBundle::manager.html.twig" %} {% block title %}{{ "fom.user.acl.edit.edit_class_acl" | trans({'%name%': class_name}) }}{% endblock %} {% block manager_content %} {{ form_start(form, { 'action': path('fom_user_acl_update', { 'class': class }), 'method': 'POST', 'attr': { novalidate: 'novalidate', autocomplete: 'off', name: form_name }}) }} <div id="aclTabContainer" class="tabContainer aclTabContainer"> <ul class="tabs"> <li id="tabSecurity" class="tab active">{{"fom.user.acl.edit.security" | trans }}</li> </ul> <div id="containerSecurity" class="container containerSecurity active"> <a id="addPermission" href="{{path('fom_user_acl_overview')}}" class="iconAdd iconBig right" title="{{'fom.user.acl.edit.add_users_groups'|trans}}"></a> {{ form_widget(form) }} </div> <div class="clearContainer"></div> {{ form_row(form._token) }} </div> <div class="right"> <input type="submit" value="{{ 'fom.user.acl.edit.save' | trans }}" class="button"/> <a href="{{ path('fom_user_acl_index') }}" class="button critical">{{ 'fom.user.acl.edit.cancel' | trans}}</a> </div> {{ form_end(form, {'render_rest': false}) }} {% endblock %}
Remove dangling nonfunctional collection item add icon under ACL widgets with empty ACE content
Remove dangling nonfunctional collection item add icon under ACL widgets with empty ACE content
Twig
mit
mapbender/fom,mapbender/fom,mapbender/fom
twig
## Code Before: {% extends "MapbenderManagerBundle::manager.html.twig" %} {% block title %}{{ "fom.user.acl.edit.edit_class_acl" | trans({'%name%': class_name}) }}{% endblock %} {% block manager_content %} {{ form_start(form, { 'action': path('fom_user_acl_update', { 'class': class }), 'method': 'POST', 'attr': { novalidate: 'novalidate', autocomplete: 'off', name: form_name }}) }} <div id="aclTabContainer" class="tabContainer aclTabContainer"> <ul class="tabs"> <li id="tabSecurity" class="tab active">{{"fom.user.acl.edit.security" | trans }}</li> </ul> <div id="containerSecurity" class="container containerSecurity active"> <a id="addPermission" href="{{path('fom_user_acl_overview')}}" class="iconAdd iconBig right" title="{{'fom.user.acl.edit.add_users_groups'|trans}}"></a> {{ form_widget(form) }} </div> <div class="clearContainer"></div> {{ form_row(form._token) }} </div> <div class="right"> <input type="submit" value="{{ 'fom.user.acl.edit.save' | trans }}" class="button"/> <a href="{{ path('fom_user_acl_index') }}" class="button critical">{{ 'fom.user.acl.edit.cancel' | trans}}</a> </div> {{ form_end(form) }} {% endblock %} ## Instruction: Remove dangling nonfunctional collection item add icon under ACL widgets with empty ACE content ## Code After: {% extends "MapbenderManagerBundle::manager.html.twig" %} {% block title %}{{ "fom.user.acl.edit.edit_class_acl" | trans({'%name%': class_name}) }}{% endblock %} {% block manager_content %} {{ form_start(form, { 'action': path('fom_user_acl_update', { 'class': class }), 'method': 'POST', 'attr': { novalidate: 'novalidate', autocomplete: 'off', name: form_name }}) }} <div id="aclTabContainer" class="tabContainer aclTabContainer"> <ul class="tabs"> <li id="tabSecurity" class="tab active">{{"fom.user.acl.edit.security" | trans }}</li> </ul> <div id="containerSecurity" class="container containerSecurity active"> <a id="addPermission" href="{{path('fom_user_acl_overview')}}" class="iconAdd iconBig right" title="{{'fom.user.acl.edit.add_users_groups'|trans}}"></a> {{ form_widget(form) }} </div> <div class="clearContainer"></div> {{ form_row(form._token) }} </div> <div class="right"> <input type="submit" value="{{ 'fom.user.acl.edit.save' | trans }}" class="button"/> <a href="{{ path('fom_user_acl_index') }}" class="button critical">{{ 'fom.user.acl.edit.cancel' | trans}}</a> </div> {{ form_end(form, {'render_rest': false}) }} {% endblock %}
{% extends "MapbenderManagerBundle::manager.html.twig" %} {% block title %}{{ "fom.user.acl.edit.edit_class_acl" | trans({'%name%': class_name}) }}{% endblock %} {% block manager_content %} {{ form_start(form, { 'action': path('fom_user_acl_update', { 'class': class }), 'method': 'POST', 'attr': { novalidate: 'novalidate', autocomplete: 'off', name: form_name }}) }} <div id="aclTabContainer" class="tabContainer aclTabContainer"> <ul class="tabs"> <li id="tabSecurity" class="tab active">{{"fom.user.acl.edit.security" | trans }}</li> </ul> <div id="containerSecurity" class="container containerSecurity active"> <a id="addPermission" href="{{path('fom_user_acl_overview')}}" class="iconAdd iconBig right" title="{{'fom.user.acl.edit.add_users_groups'|trans}}"></a> {{ form_widget(form) }} </div> <div class="clearContainer"></div> {{ form_row(form._token) }} </div> <div class="right"> <input type="submit" value="{{ 'fom.user.acl.edit.save' | trans }}" class="button"/> <a href="{{ path('fom_user_acl_index') }}" class="button critical">{{ 'fom.user.acl.edit.cancel' | trans}}</a> </div> - {{ form_end(form) }} + {{ form_end(form, {'render_rest': false}) }} {% endblock %}
2
0.071429
1
1
0fc6b9922db01d3c4d71f51120bdbcb2c52df489
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { 'use strict'; grunt.initConfig({ less: { development: { options: { paths: ['velvet'] }, files: { 'build/style.css': 'velvet/velvet.less' } }, production: { options: { paths: ['less'], yuicompress: true }, files: { 'css/style.css': 'less/main.less' } } }, copy: { options: { processContentExcluded: ['**/*.{png,gif}'] }, main: { files: [ { expand: true , cwd: 'velvet/' , src: ['*.{png,gif}'] , dest: 'build/' } ] } }, watch: { files: 'velvet/*.less', tasks: ['less:development'] } }); grunt.loadNpmTasks('grunt-contrib-less'); grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.registerTask('default', ['less:development', 'copy']); grunt.registerTask('release', ['less:production', 'copy']); };
module.exports = function(grunt) { 'use strict'; grunt.initConfig({ less: { development: { options: { paths: ['velvet'] }, files: { 'build/style.css': 'velvet/velvet.less' } }, production: { options: { paths: ['less'], yuicompress: true }, files: { 'build/style.css': 'velvet/velvet.less' } } }, copy: { options: { processContentExcluded: ['**/*.{png,gif}'] }, main: { files: [ { expand: true , cwd: 'velvet/' , src: ['*.{png,gif}'] , dest: 'build/' } ] } }, watch: { files: 'velvet/*.less', tasks: ['less:development'] } }); grunt.loadNpmTasks('grunt-contrib-less'); grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.registerTask('default', ['less:development', 'copy']); grunt.registerTask('release', ['less:production', 'copy']); };
Change production build for input/output files
Change production build for input/output files
JavaScript
bsd-3-clause
sourrust/velvet
javascript
## Code Before: module.exports = function(grunt) { 'use strict'; grunt.initConfig({ less: { development: { options: { paths: ['velvet'] }, files: { 'build/style.css': 'velvet/velvet.less' } }, production: { options: { paths: ['less'], yuicompress: true }, files: { 'css/style.css': 'less/main.less' } } }, copy: { options: { processContentExcluded: ['**/*.{png,gif}'] }, main: { files: [ { expand: true , cwd: 'velvet/' , src: ['*.{png,gif}'] , dest: 'build/' } ] } }, watch: { files: 'velvet/*.less', tasks: ['less:development'] } }); grunt.loadNpmTasks('grunt-contrib-less'); grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.registerTask('default', ['less:development', 'copy']); grunt.registerTask('release', ['less:production', 'copy']); }; ## Instruction: Change production build for input/output files ## Code After: module.exports = function(grunt) { 'use strict'; grunt.initConfig({ less: { development: { options: { paths: ['velvet'] }, files: { 'build/style.css': 'velvet/velvet.less' } }, production: { options: { paths: ['less'], yuicompress: true }, files: { 'build/style.css': 'velvet/velvet.less' } } }, copy: { options: { processContentExcluded: ['**/*.{png,gif}'] }, main: { files: [ { expand: true , cwd: 'velvet/' , src: ['*.{png,gif}'] , dest: 'build/' } ] } }, watch: { files: 'velvet/*.less', tasks: ['less:development'] } }); grunt.loadNpmTasks('grunt-contrib-less'); grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.registerTask('default', ['less:development', 'copy']); grunt.registerTask('release', ['less:production', 'copy']); };
module.exports = function(grunt) { 'use strict'; grunt.initConfig({ less: { development: { options: { paths: ['velvet'] }, files: { 'build/style.css': 'velvet/velvet.less' } }, production: { options: { paths: ['less'], yuicompress: true }, files: { - 'css/style.css': 'less/main.less' + 'build/style.css': 'velvet/velvet.less' } } }, copy: { options: { processContentExcluded: ['**/*.{png,gif}'] }, main: { files: [ { expand: true , cwd: 'velvet/' , src: ['*.{png,gif}'] , dest: 'build/' } ] } }, watch: { files: 'velvet/*.less', tasks: ['less:development'] } }); grunt.loadNpmTasks('grunt-contrib-less'); grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.registerTask('default', ['less:development', 'copy']); grunt.registerTask('release', ['less:production', 'copy']); };
2
0.04
1
1
1dceb87e054ba07f5a7edb188a4cd8d4f0a9c229
lib/cramp/generators/templates/application/config.ru
lib/cramp/generators/templates/application/config.ru
require './application' <%= app_const %>.initialize! # Development middlewares if <%= app_const %>.env == 'development' require 'async-rack' use AsyncRack::CommonLogger end # Running thin : # # bundle exec thin --max-persistent-conns 1024 -R config.ru start # # Vebose mode : # # Very useful when you want to view all the data being sent/received by thin # # bundle exec thin --max-persistent-conns 1024 -R -V config.ru start # run <%= app_const %>.routes
require './application' <%= app_const %>.initialize! # Development middlewares if <%= app_const %>.env == 'development' require 'async-rack' use AsyncRack::CommonLogger # Enable code reloading on every request use Rack::Reloader, 0 end # Running thin : # # bundle exec thin --max-persistent-conns 1024 -R config.ru start # # Vebose mode : # # Very useful when you want to view all the data being sent/received by thin # # bundle exec thin --max-persistent-conns 1024 -R -V config.ru start # run <%= app_const %>.routes
Use Rack::Reloader in dev mode
Use Rack::Reloader in dev mode
Ruby
mit
matiasinsaurralde/cramp,koudelka/cramp,whoward/cramp,dhh/cramp,koudelka/cramp,whoward/cramp,lifo/cramp,OSSystems/cramp,rightscale/rightscale-cramp,rightscale/rightscale-cramp,lifo/cramp,matiasinsaurralde/cramp,dhh/cramp
ruby
## Code Before: require './application' <%= app_const %>.initialize! # Development middlewares if <%= app_const %>.env == 'development' require 'async-rack' use AsyncRack::CommonLogger end # Running thin : # # bundle exec thin --max-persistent-conns 1024 -R config.ru start # # Vebose mode : # # Very useful when you want to view all the data being sent/received by thin # # bundle exec thin --max-persistent-conns 1024 -R -V config.ru start # run <%= app_const %>.routes ## Instruction: Use Rack::Reloader in dev mode ## Code After: require './application' <%= app_const %>.initialize! # Development middlewares if <%= app_const %>.env == 'development' require 'async-rack' use AsyncRack::CommonLogger # Enable code reloading on every request use Rack::Reloader, 0 end # Running thin : # # bundle exec thin --max-persistent-conns 1024 -R config.ru start # # Vebose mode : # # Very useful when you want to view all the data being sent/received by thin # # bundle exec thin --max-persistent-conns 1024 -R -V config.ru start # run <%= app_const %>.routes
require './application' <%= app_const %>.initialize! # Development middlewares if <%= app_const %>.env == 'development' require 'async-rack' use AsyncRack::CommonLogger + + # Enable code reloading on every request + use Rack::Reloader, 0 end # Running thin : # # bundle exec thin --max-persistent-conns 1024 -R config.ru start # # Vebose mode : # # Very useful when you want to view all the data being sent/received by thin # # bundle exec thin --max-persistent-conns 1024 -R -V config.ru start # run <%= app_const %>.routes
3
0.15
3
0
721a101f120897e46e685460cac51a46bfb665c1
puppet/zulip/templates/uwsgi.ini.template.erb
puppet/zulip/templates/uwsgi.ini.template.erb
[uwsgi] socket=/home/zulip/deployments/uwsgi-socket module=zproject.wsgi:application chdir=/home/zulip/deployments/current/ master=true chmod-socket=700 chown-socket=zulip:zulip processes=<%= @uwsgi_processes %> harakiri=20 buffer-size=<%= @uwsgi_buffer_size %> listen=<%= @uwsgi_listen_backlog_limit %> post-buffering=4096 env= LANG=C.UTF-8 uid=zulip gid=zulip stats=/home/zulip/deployments/uwsgi-stats <% if @uwsgi_rolling_restart != '' -%> master-fifo=/home/zulip/deployments/uwsgi-control hook-post-fork=chdir:/home/zulip/deployments/current # lazy-apps are required for rolling restarts: # https://uwsgi-docs.readthedocs.io/en/latest/articles/TheArtOfGracefulReloading.html#preforking-vs-lazy-apps-vs-lazy lazy-apps=true <% end -%> ignore-sigpipe = true ignore-write-errors = true disable-write-exception = true
[uwsgi] # Basic environment env=LANG=C.UTF-8 uid=zulip gid=zulip # Where the main application is located chdir=/home/zulip/deployments/current/ module=zproject.wsgi:application # Start a master process listening on this socket master=true chmod-socket=700 chown-socket=zulip:zulip socket=/home/zulip/deployments/uwsgi-socket listen=<%= @uwsgi_listen_backlog_limit %> # How many serving processes to fork processes=<%= @uwsgi_processes %> # Longest response allowed, in seconds, before killing the worker harakiri=20 # Size of HTTP headers to read buffer-size=<%= @uwsgi_buffer_size %> # The master process will buffer requests with bodies longer than 4096 # bytes, freeing up workers from hanging around waiting to read them. post-buffering=4096 # Create a socket to serve very basic UWSGI stats stats=/home/zulip/deployments/uwsgi-stats <% if @uwsgi_rolling_restart != '' -%> # If we are doing a rolling restart, re-chdir to the current "current" # directory in each forked process hook-post-fork=chdir:/home/zulip/deployments/current # lazy-apps are required for rolling restarts: # https://uwsgi-docs.readthedocs.io/en/latest/articles/TheArtOfGracefulReloading.html#preforking-vs-lazy-apps-vs-lazy lazy-apps=true # Create a control socket, allowing fancier runtime control master-fifo=/home/zulip/deployments/uwsgi-control <% end -%> # Silence warnings from clients closing their connection early ignore-sigpipe = true ignore-write-errors = true disable-write-exception = true
Reorganize and comment uwsgi.ini file.
puppet: Reorganize and comment uwsgi.ini file. As the uwsgi documentation is somewhat obtuse, more comments are added here than might usually be.
HTML+ERB
apache-2.0
rht/zulip,andersk/zulip,rht/zulip,rht/zulip,zulip/zulip,zulip/zulip,zulip/zulip,andersk/zulip,rht/zulip,andersk/zulip,zulip/zulip,andersk/zulip,zulip/zulip,zulip/zulip,rht/zulip,andersk/zulip,rht/zulip,andersk/zulip,andersk/zulip,rht/zulip,zulip/zulip
html+erb
## Code Before: [uwsgi] socket=/home/zulip/deployments/uwsgi-socket module=zproject.wsgi:application chdir=/home/zulip/deployments/current/ master=true chmod-socket=700 chown-socket=zulip:zulip processes=<%= @uwsgi_processes %> harakiri=20 buffer-size=<%= @uwsgi_buffer_size %> listen=<%= @uwsgi_listen_backlog_limit %> post-buffering=4096 env= LANG=C.UTF-8 uid=zulip gid=zulip stats=/home/zulip/deployments/uwsgi-stats <% if @uwsgi_rolling_restart != '' -%> master-fifo=/home/zulip/deployments/uwsgi-control hook-post-fork=chdir:/home/zulip/deployments/current # lazy-apps are required for rolling restarts: # https://uwsgi-docs.readthedocs.io/en/latest/articles/TheArtOfGracefulReloading.html#preforking-vs-lazy-apps-vs-lazy lazy-apps=true <% end -%> ignore-sigpipe = true ignore-write-errors = true disable-write-exception = true ## Instruction: puppet: Reorganize and comment uwsgi.ini file. As the uwsgi documentation is somewhat obtuse, more comments are added here than might usually be. ## Code After: [uwsgi] # Basic environment env=LANG=C.UTF-8 uid=zulip gid=zulip # Where the main application is located chdir=/home/zulip/deployments/current/ module=zproject.wsgi:application # Start a master process listening on this socket master=true chmod-socket=700 chown-socket=zulip:zulip socket=/home/zulip/deployments/uwsgi-socket listen=<%= @uwsgi_listen_backlog_limit %> # How many serving processes to fork processes=<%= @uwsgi_processes %> # Longest response allowed, in seconds, before killing the worker harakiri=20 # Size of HTTP headers to read buffer-size=<%= @uwsgi_buffer_size %> # The master process will buffer requests with bodies longer than 4096 # bytes, freeing up workers from hanging around waiting to read them. post-buffering=4096 # Create a socket to serve very basic UWSGI stats stats=/home/zulip/deployments/uwsgi-stats <% if @uwsgi_rolling_restart != '' -%> # If we are doing a rolling restart, re-chdir to the current "current" # directory in each forked process hook-post-fork=chdir:/home/zulip/deployments/current # lazy-apps are required for rolling restarts: # https://uwsgi-docs.readthedocs.io/en/latest/articles/TheArtOfGracefulReloading.html#preforking-vs-lazy-apps-vs-lazy lazy-apps=true # Create a control socket, allowing fancier runtime control master-fifo=/home/zulip/deployments/uwsgi-control <% end -%> # Silence warnings from clients closing their connection early ignore-sigpipe = true ignore-write-errors = true disable-write-exception = true
[uwsgi] - socket=/home/zulip/deployments/uwsgi-socket + # Basic environment + env=LANG=C.UTF-8 + uid=zulip + gid=zulip + + # Where the main application is located + chdir=/home/zulip/deployments/current/ module=zproject.wsgi:application - chdir=/home/zulip/deployments/current/ + + # Start a master process listening on this socket master=true chmod-socket=700 chown-socket=zulip:zulip + socket=/home/zulip/deployments/uwsgi-socket + listen=<%= @uwsgi_listen_backlog_limit %> + + + + # How many serving processes to fork processes=<%= @uwsgi_processes %> + + # Longest response allowed, in seconds, before killing the worker harakiri=20 + + + + # Size of HTTP headers to read buffer-size=<%= @uwsgi_buffer_size %> - listen=<%= @uwsgi_listen_backlog_limit %> + + # The master process will buffer requests with bodies longer than 4096 + # bytes, freeing up workers from hanging around waiting to read them. post-buffering=4096 - env= LANG=C.UTF-8 - uid=zulip - gid=zulip + + + # Create a socket to serve very basic UWSGI stats stats=/home/zulip/deployments/uwsgi-stats + <% if @uwsgi_rolling_restart != '' -%> - master-fifo=/home/zulip/deployments/uwsgi-control + # If we are doing a rolling restart, re-chdir to the current "current" + # directory in each forked process hook-post-fork=chdir:/home/zulip/deployments/current + # lazy-apps are required for rolling restarts: # https://uwsgi-docs.readthedocs.io/en/latest/articles/TheArtOfGracefulReloading.html#preforking-vs-lazy-apps-vs-lazy lazy-apps=true + + # Create a control socket, allowing fancier runtime control + master-fifo=/home/zulip/deployments/uwsgi-control + + + <% end -%> - + # Silence warnings from clients closing their connection early ignore-sigpipe = true ignore-write-errors = true disable-write-exception = true
46
1.586207
38
8
6f9fa8d5781dd877c2b7530399293224ebd7b5f9
travis/run.sh
travis/run.sh
cd spec/dummy export BUNDLE_GEMFILE=$PWD/Gemfile xvfb-run -a bundle exec cucumber EXIT_1=$? xvfb-run -a bundle exec rspec EXIT_2=$? if [[ $EXIT_1 != 0 || $EXIT_2 != 0 ]]; then echo "Failed" exit 1 fi
cd spec/dummy export BUNDLE_GEMFILE=$PWD/Gemfile echo "cucumber - poltergeist" xvfb-run -a export CAPYBARA_DRIVER=poltergeist && bundle exec cucumber EXIT_1=$? echo "cucumber - webkit" xvfb-run -a export CAPYBARA_DRIVER=webkit && bundle exec cucumber EXIT_2=$? echo "rspec - poltergeist" xvfb-run -a export CAPYBARA_DRIVER=poltergeist && bundle exec rspec EXIT_3=$? echo "rspec - webkit" xvfb-run -a export CAPYBARA_DRIVER=webkit && bundle exec rspec EXIT_4=$? if [[ $EXIT_1 != 0 || $EXIT_2 != 0 || $EXIT_3 != 0 || $EXIT_4 != 0 ]]; then echo "Failed" exit 1 fi
Test different drivers in travis
Test different drivers in travis
Shell
mit
ldodds/capybara-ng,kikonen/capybara-ng,kikonen/capybara-ng,ldodds/capybara-ng,kikonen/capybara-ng,ldodds/capybara-ng,kikonen/capybara-ng,javimey/capybara-ng,ldodds/capybara-ng,javimey/capybara-ng,javimey/capybara-ng,javimey/capybara-ng
shell
## Code Before: cd spec/dummy export BUNDLE_GEMFILE=$PWD/Gemfile xvfb-run -a bundle exec cucumber EXIT_1=$? xvfb-run -a bundle exec rspec EXIT_2=$? if [[ $EXIT_1 != 0 || $EXIT_2 != 0 ]]; then echo "Failed" exit 1 fi ## Instruction: Test different drivers in travis ## Code After: cd spec/dummy export BUNDLE_GEMFILE=$PWD/Gemfile echo "cucumber - poltergeist" xvfb-run -a export CAPYBARA_DRIVER=poltergeist && bundle exec cucumber EXIT_1=$? echo "cucumber - webkit" xvfb-run -a export CAPYBARA_DRIVER=webkit && bundle exec cucumber EXIT_2=$? echo "rspec - poltergeist" xvfb-run -a export CAPYBARA_DRIVER=poltergeist && bundle exec rspec EXIT_3=$? echo "rspec - webkit" xvfb-run -a export CAPYBARA_DRIVER=webkit && bundle exec rspec EXIT_4=$? if [[ $EXIT_1 != 0 || $EXIT_2 != 0 || $EXIT_3 != 0 || $EXIT_4 != 0 ]]; then echo "Failed" exit 1 fi
cd spec/dummy export BUNDLE_GEMFILE=$PWD/Gemfile - xvfb-run -a bundle exec cucumber + echo "cucumber - poltergeist" + xvfb-run -a export CAPYBARA_DRIVER=poltergeist && bundle exec cucumber EXIT_1=$? - xvfb-run -a bundle exec rspec + echo "cucumber - webkit" + xvfb-run -a export CAPYBARA_DRIVER=webkit && bundle exec cucumber EXIT_2=$? - if [[ $EXIT_1 != 0 || $EXIT_2 != 0 ]]; then + echo "rspec - poltergeist" + xvfb-run -a export CAPYBARA_DRIVER=poltergeist && bundle exec rspec + EXIT_3=$? + + echo "rspec - webkit" + xvfb-run -a export CAPYBARA_DRIVER=webkit && bundle exec rspec + EXIT_4=$? + + if [[ $EXIT_1 != 0 || $EXIT_2 != 0 || $EXIT_3 != 0 || $EXIT_4 != 0 ]]; then echo "Failed" exit 1 fi
16
1.230769
13
3
706c6fc647ea1746ba043418810323611c98eb2e
src/main/java/org/springframework/samples/petclinic/system/CacheConfig.java
src/main/java/org/springframework/samples/petclinic/system/CacheConfig.java
package org.springframework.samples.petclinic.system; import java.util.concurrent.TimeUnit; import javax.cache.CacheManager; import org.ehcache.config.CacheConfiguration; import org.ehcache.config.builders.CacheConfigurationBuilder; import org.ehcache.config.builders.ResourcePoolsBuilder; import org.ehcache.config.units.EntryUnit; import org.ehcache.expiry.Duration; import org.ehcache.expiry.Expirations; import org.ehcache.jsr107.Eh107Configuration; import org.springframework.boot.autoconfigure.cache.JCacheManagerCustomizer; import org.springframework.cache.annotation.EnableCaching; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; /** * Cache could be disable in unit test. */ @Configuration @EnableCaching @Profile("production") class CacheConfig { @Bean public JCacheManagerCustomizer cacheManagerCustomizer() { return new JCacheManagerCustomizer() { @Override public void customize(CacheManager cacheManager) { CacheConfiguration<Object, Object> config = CacheConfigurationBuilder .newCacheConfigurationBuilder(Object.class, Object.class, ResourcePoolsBuilder.newResourcePoolsBuilder() .heap(100, EntryUnit.ENTRIES)) .withExpiry(Expirations.timeToLiveExpiration(Duration.of(60, TimeUnit.SECONDS))) .build(); cacheManager.createCache("vets", Eh107Configuration.fromEhcacheCacheConfiguration(config)); } }; } }
package org.springframework.samples.petclinic.system; import java.util.concurrent.TimeUnit; import javax.cache.CacheManager; import org.ehcache.config.CacheConfiguration; import org.ehcache.config.builders.CacheConfigurationBuilder; import org.ehcache.config.builders.ResourcePoolsBuilder; import org.ehcache.config.units.EntryUnit; import org.ehcache.expiry.Duration; import org.ehcache.expiry.Expirations; import org.ehcache.jsr107.Eh107Configuration; import org.springframework.boot.autoconfigure.cache.JCacheManagerCustomizer; import org.springframework.cache.annotation.EnableCaching; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; /** * Cache could be disable in unit test. */ @Configuration @EnableCaching @Profile("production") class CacheConfig { @Bean public JCacheManagerCustomizer cacheManagerCustomizer() { return cacheManager -> { CacheConfiguration<Object, Object> config = CacheConfigurationBuilder .newCacheConfigurationBuilder(Object.class, Object.class, ResourcePoolsBuilder.newResourcePoolsBuilder() .heap(100, EntryUnit.ENTRIES)) .withExpiry(Expirations.timeToLiveExpiration(Duration.of(60, TimeUnit.SECONDS))) .build(); cacheManager.createCache("vets", Eh107Configuration.fromEhcacheCacheConfiguration(config)); }; } }
Replace anonymous class with lambda
Replace anonymous class with lambda
Java
apache-2.0
pkudevops/spring-petclinic-changed,pkudevops/spring-petclinic-changed
java
## Code Before: package org.springframework.samples.petclinic.system; import java.util.concurrent.TimeUnit; import javax.cache.CacheManager; import org.ehcache.config.CacheConfiguration; import org.ehcache.config.builders.CacheConfigurationBuilder; import org.ehcache.config.builders.ResourcePoolsBuilder; import org.ehcache.config.units.EntryUnit; import org.ehcache.expiry.Duration; import org.ehcache.expiry.Expirations; import org.ehcache.jsr107.Eh107Configuration; import org.springframework.boot.autoconfigure.cache.JCacheManagerCustomizer; import org.springframework.cache.annotation.EnableCaching; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; /** * Cache could be disable in unit test. */ @Configuration @EnableCaching @Profile("production") class CacheConfig { @Bean public JCacheManagerCustomizer cacheManagerCustomizer() { return new JCacheManagerCustomizer() { @Override public void customize(CacheManager cacheManager) { CacheConfiguration<Object, Object> config = CacheConfigurationBuilder .newCacheConfigurationBuilder(Object.class, Object.class, ResourcePoolsBuilder.newResourcePoolsBuilder() .heap(100, EntryUnit.ENTRIES)) .withExpiry(Expirations.timeToLiveExpiration(Duration.of(60, TimeUnit.SECONDS))) .build(); cacheManager.createCache("vets", Eh107Configuration.fromEhcacheCacheConfiguration(config)); } }; } } ## Instruction: Replace anonymous class with lambda ## Code After: package org.springframework.samples.petclinic.system; import java.util.concurrent.TimeUnit; import javax.cache.CacheManager; import org.ehcache.config.CacheConfiguration; import org.ehcache.config.builders.CacheConfigurationBuilder; import org.ehcache.config.builders.ResourcePoolsBuilder; import org.ehcache.config.units.EntryUnit; import org.ehcache.expiry.Duration; import org.ehcache.expiry.Expirations; import org.ehcache.jsr107.Eh107Configuration; import org.springframework.boot.autoconfigure.cache.JCacheManagerCustomizer; import org.springframework.cache.annotation.EnableCaching; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; /** * Cache could be disable in unit test. */ @Configuration @EnableCaching @Profile("production") class CacheConfig { @Bean public JCacheManagerCustomizer cacheManagerCustomizer() { return cacheManager -> { CacheConfiguration<Object, Object> config = CacheConfigurationBuilder .newCacheConfigurationBuilder(Object.class, Object.class, ResourcePoolsBuilder.newResourcePoolsBuilder() .heap(100, EntryUnit.ENTRIES)) .withExpiry(Expirations.timeToLiveExpiration(Duration.of(60, TimeUnit.SECONDS))) .build(); cacheManager.createCache("vets", Eh107Configuration.fromEhcacheCacheConfiguration(config)); }; } }
package org.springframework.samples.petclinic.system; import java.util.concurrent.TimeUnit; import javax.cache.CacheManager; import org.ehcache.config.CacheConfiguration; import org.ehcache.config.builders.CacheConfigurationBuilder; import org.ehcache.config.builders.ResourcePoolsBuilder; import org.ehcache.config.units.EntryUnit; import org.ehcache.expiry.Duration; import org.ehcache.expiry.Expirations; import org.ehcache.jsr107.Eh107Configuration; import org.springframework.boot.autoconfigure.cache.JCacheManagerCustomizer; import org.springframework.cache.annotation.EnableCaching; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; /** * Cache could be disable in unit test. */ @Configuration @EnableCaching @Profile("production") class CacheConfig { @Bean public JCacheManagerCustomizer cacheManagerCustomizer() { + return cacheManager -> { - return new JCacheManagerCustomizer() { - @Override - public void customize(CacheManager cacheManager) { - CacheConfiguration<Object, Object> config = CacheConfigurationBuilder ? ---- + CacheConfiguration<Object, Object> config = CacheConfigurationBuilder - .newCacheConfigurationBuilder(Object.class, Object.class, ? ---- + .newCacheConfigurationBuilder(Object.class, Object.class, - ResourcePoolsBuilder.newResourcePoolsBuilder() ? ---- + ResourcePoolsBuilder.newResourcePoolsBuilder() - .heap(100, EntryUnit.ENTRIES)) ? ---- + .heap(100, EntryUnit.ENTRIES)) - .withExpiry(Expirations.timeToLiveExpiration(Duration.of(60, TimeUnit.SECONDS))) ? ---- + .withExpiry(Expirations.timeToLiveExpiration(Duration.of(60, TimeUnit.SECONDS))) - .build(); ? ---- + .build(); - cacheManager.createCache("vets", Eh107Configuration.fromEhcacheCacheConfiguration(config)); ? ---- + cacheManager.createCache("vets", Eh107Configuration.fromEhcacheCacheConfiguration(config)); - } }; } }
19
0.431818
8
11