This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Pete's Beginners plan", | |
"description": "The 24 week training plan set out here is aimed at the beginner to intermediate indoor rower. The training plan is set out in a simple to follow format, with each week containing 3 core sessions, and for the keen trainer, 2 additional optional sessions. See the next section where this training plan is reproduced along with explanations for how to complete each session, and the key aims behind them.", | |
"schedule": [ | |
{ | |
"distance": 5000, | |
"description": "The three key points you want to concentrate on during all of your erg sessions are technique, relaxation, and efficiency. Use the single distance pieces to work on the different elements of the stroke you read about in the technique section. Aim for a feeling of smooth acceleration through the drive, and to be slow and relaxed during the recovery." | |
}, { | |
"interval": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********************************************************************* | |
*********************************************************************/ | |
static int | |
__vers_digit_for_char(char c) { | |
switch (c) { | |
case '0': return 0; | |
case '1': return 1; | |
case '2': return 2; | |
case '3': return 3; | |
case '4': return 4; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Input: 1 2 2 5 | |
// Issue; println(pair), line 12, is not being printed in the console | |
def setupNormalRegions(regions: String) { | |
// Remove spaces from input | |
val groupedRegions: String = regions.replaceAll(" ", ""); | |
// Group regions by 2 numbers (id, value) and loop over them | |
groupedRegions.grouped(2).map { pair => | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test gist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Crud_Base_Controller extends Base_Controller { | |
// Yes, i want restfull, god yesssss | |
public $restful = true; | |
public function __construct() | |
{ | |
echo 'test'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function __construct() | |
{ | |
parent::__construct(); | |
$this->filter('before', 'auth')->only(array('get_single')); | |
} | |
// Get Single news item | |
public function get_single($id, $slug = null) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get Single news item | |
public function get_single($id, $slug = null) | |
{ | |
// Get single news item | |
$news = news::single($id); | |
// Check if the news is protected and if the user is logged | |
if ($news->secure == 1 && !Auth::check()) | |
{ | |
// News is protected and user is not logged in | |
Return Redirect::to('gebruiker/inloggen'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Login controller | |
public function get_inloggen() | |
{ | |
Return View::make('back/login'); | |
} | |
public function post_inloggen() | |
{ | |
if (Auth::attempt(Input::get('email'), Input::get('password'))) | |
{ |