This file contains hidden or 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
| float temp; | |
| int tempPin = 0; | |
| int ledAnalogOne[] = {3, 5, 6}; | |
| const byte RED[] = {255, 0, 0}; | |
| const byte ORANGE[] = {83, 4, 0}; | |
| const byte YELLOW[] = {255, 255, 0}; | |
| const byte GREEN[] = {0, 255, 0}; | |
| const byte BLUE[] = {0, 0, 255}; | |
| const byte INDIGO[] = {4, 0, 19}; |
This file contains hidden or 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
| -(void) updateTime { | |
| activeTotalBrewTime = 0; | |
| for (CTStage *stage in allStages) | |
| { | |
| activeTotalBrewTime = [stage getIntOfTimeLeft]; | |
| } | |
| } |
This file contains hidden or 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
| -(void) createDictionaryFromTimers { | |
| timersDict = [[NSMutableDictionary alloc] init]; | |
| NSArray *keys = @[@"name", @"steep", @"brew", @"position"]; | |
| for (CTTimer *item in coffeeTimers) { | |
| NSArray *values = @[[item title], [NSNumber numberWithInteger:[item steepTime]], [NSNumber numberWithInteger:[item brewTime]], [item listPosition]]; | |
| NSMutableDictionary *timerDict = [NSMutableDictionary dictionaryWithObjects:values | |
| forKeys:keys]; | |
| [timersDict setValue:timerDict |
This file contains hidden or 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
| - (void)loadTimersFromFile{ | |
| NSLog(@"loading..."); | |
| NSString *writableFilePath = [self getTimerFilePath:@"timersDict"]; | |
| timersDict = [NSMutableDictionary dictionaryWithContentsOfFile:writableFilePath]; | |
| coffeeTimers = [[NSMutableArray alloc] init]; | |
| for (NSString *item in [timersDict allKeys]) { | |
| [coffeeTimers addObject:[[CTTimer alloc] initWithName:[[timersDict valueForKey:item] valueForKey:@"name"] | |
| steepTime:[[[timersDict valueForKey:item] valueForKey:@"steep"] integerValue] | |
| brewTime:[[[timersDict valueForKey:item] valueForKey:@"brew"] integerValue]]]; |
This file contains hidden or 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
| -(void) createDictionaryFromTimers { | |
| timersDict = [[NSMutableDictionary alloc] init]; | |
| NSArray *keys = [NSArray arrayWithObjects:@"name", | |
| @"steep", | |
| @"brew", | |
| nil]; | |
| for (id item in coffeeTimers) { | |
| NSArray *values = [NSArray arrayWithObjects:[item title], |
This file contains hidden or 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
| #include <iostream> | |
| #include <stdlib.h> | |
| #include <time.h> | |
| using namespace std; | |
| int main(){ | |
| int guess; | |
| int guess_attempts = 0 ; | |
| srand (time(NULL)); |
This file contains hidden or 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
| #include <iostream> | |
| using namespace std; | |
| int main(){ | |
| int guess = 50; | |
| int guess_attempts = 0; | |
| int answer ; | |
| int helper = guess / 2; |
This file contains hidden or 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
| <html> | |
| <head> | |
| <title> | |
| Kieran's Blog | |
| </title> | |
| </head> | |
| <body> | |
| <h1 align="center">Kieran's Blog</h1> | |
| {% for post in posts %} | |
| <a href='/blog/{{post.key().id()}}'<h2>{{post.subject}}</h2></a> |
This file contains hidden or 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
| import os | |
| import datetime | |
| import webapp2 | |
| import jinja2 | |
| from google.appengine.ext import db | |
| template_dir = os.path.join((os.path.dirname(__file__), 'templates')) | |
| jinja_env = jinja2.Environment(loader = jinja2.FileSystemLoader(template_dir), | |
| autoescape = True) |
This file contains hidden or 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
| <html> | |
| <head> | |
| <title> | |
| New post | |
| </title> | |
| <style type="text/css"> | |
| .label {text-align: right} | |
| .error {color: red} | |
| </style> | |
| </head> |