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
| const weekdays = [ 'mon', 'tue', 'wed', 'thu', 'fri' ]; | |
| const weekends = [ 'sat', 'sun' ]; | |
| const everyday = [ ...weekdays, ...weekends ]; | |
| const allButtons = { | |
| MON: 'mon', | |
| TUE: 'tue', | |
| WED: 'wed', | |
| THU: 'thu', | |
| FRI: 'fri', |
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 sys | |
| # Check the command line argument; if there's no value, make sure we get one | |
| # from user input; if it's invalid, we will let the user know. | |
| try: | |
| max_value = int(sys.argv[1]) | |
| except IndexError: | |
| invalid_value = True | |
| except ValueError: | |
| print('You did not pass a valid argument (a positive whole number).\n') |
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
| /* Jon Edwards | |
| v 2.6, 1Nov2014 | |
| This program will operate the squid sphere which consists of three | |
| three-color LEDs; because the three-color LEDs have a common anode, | |
| setting them HIGH will turn them off while setting them LOW will turn | |
| them on. This will need to be kept in mind when setting the analogWrite | |
| values that will be backwards (255 for off and 0 for on) */ | |
| // a new month, a new rewrite | |
| // simple things are often better things |
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
| /******************************************************************* | |
| * Arduino Uno-based Solid State Relay Controller, uses 74HC595 * | |
| * 24Nov13 * | |
| * Rev 0.3 * | |
| * by Jon Edwards * | |
| * 74HC595 pins: * | |
| * 1 out2, 2 out3, 3 out4, 4 out5, 5 out6, 6 out7, 7 out8, 8 gnd * | |
| * 9 serout, 10 MR (high), 11 SH_CP, 12 ST_CP, 13 OE (low), 14 DS, * | |
| * 15 out 1, 16 VCC * * | |
| *******************************************************************/ |
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
| function CheckForQuotationMarksAndCommas(textToCheck) | |
| // add functionality to check for commas | |
| { | |
| //console.log(textToCheck + " is a " + typeof(textToCheck)); | |
| textToCheck = textToCheck.replace(/,/g, ' '); | |
| if (textToCheck == '\"') | |
| { | |
| return "\'"; | |
| } | |
| else |