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
PLEASE REFER TO https://github.com/BaReinhard/pod-installer-utils |
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
PLEASE REFER TO https://github.com/BaReinhard/pod-installer-utils |
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
PLEASE REFER TO https://github.com/BaReinhard/pod-installer-utils |
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
//Program: RGB Color Change | |
//Programmer: Brett Reinhard | |
//Date: 10/20/2016 | |
//Description: Changes color of LED's within the Pumpkin, with smooth transitions. | |
int const Red = 9, /* Pin 3 */ Blue = 11, /* Pin 5 */ Green = 10; /* Pin 6 */ | |
class Pumpkin | |
{ | |
private: | |
int *_r; | |
int *_g; |
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
//Program: RGB Color Change | |
//Programmer: Brett Reinhard | |
//Date: 03/12/2016 | |
//Description: Changes color of rgb led by use of a potentiator knob. | |
int prevR = 0, prevG = 0, prevB = 0; // all of the previous RGB values | |
int const Red = 3; //pin 3 | |
int const Blue = 5; // pin 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
/* | |
* LedBrightness sketch | |
* controls the brightness of LEDs on "analog" (PWM) output ports. | |
*/ | |
#include <LiquidCrystal.h> | |
LiquidCrystal lcd(12,11,9,4,8,7); | |
class rgb_color { | |
private: | |
int my_r; |
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
// pseudo code | |
// strip string of white space | |
// check first character for sign | |
// loop through remaining string until the end or a non integer value | |
// check ascii value of each character and ensure it falls in proper range | |
// then offset the ascii value from the ascii of 0 | |
// return new integer with sign 1 or -1 | |
func myAtoi(str string) int { | |
finalString:= "" | |
sign:= 1 |
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
func reverse(x int) int { | |
// calc minimum and maximum values | |
max:= int(math.Pow(2,31)) | |
min:= int(math.Pow(-2,31)) -1 | |
tmp := x | |
reverse:= 0 | |
for{ | |
digit := tmp % 10 | |
reverse = reverse * 10 + digit | |
tmp = tmp / 10 |
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
/** | |
* Definition for singly-linked list. | |
* type ListNode struct { | |
* Val int | |
* Next *ListNode | |
* } | |
*/ | |
func addTwoNumbers(l1 *ListNode, l2 *ListNode) *ListNode { | |
// Check that l1 and l2 are not empty |
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
func threeSum(nums []int) [][]int { | |
sort.Ints(nums[:]) | |
used:= map[string]bool{} | |
if !(len(nums)>2){ | |
fmt.Printf("Not enough integers in array") | |
return [][]int{} | |
} | |
firstNum:= nums[0] | |
lastNum:= nums[len(nums)-1] | |
// Check that the sorted list to see if its a long array of 0's |
NewerOlder