Skip to content

Instantly share code, notes, and snippets.

View stevehenderson's full-sized avatar

Steve Henderson stevehenderson

View GitHub Profile
@stevehenderson
stevehenderson / index.html
Created July 25, 2015 03:44 — forked from anonymous/index.html
JS Bin basic paygrade // source http://jsbin.com/dopiva
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="basic paygrade">
<script src="https://code.jquery.com/jquery-1.6.4.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<script>
var myArr = $.parseJSON('["E1","E2","E3","E4","E5","E6","E7","E8","E9","E10","O1","O2","O3","O4","O5","O6","O7","O8","O9","O10","O1E","O2E","O3E","W1","W2","W3","W4","W5"]');
console.log(myArr[0])
@stevehenderson
stevehenderson / ValuePL1
Created April 22, 2015 16:17
Malone capstone
'Now check result
If (closestDiff = 0) Then
'Perfect match
result = closestValue
Else
'Interpolate
Dim gap As Double
gap = closestDiff + closestDiff2
result = (1 - (closestDiff / gap)) * closestValue + (closestDiff2 / gap) * closestValue2
@stevehenderson
stevehenderson / hero4.md
Last active August 29, 2015 14:18 — forked from KonradIT/hero4.md

#GoPro HERO4 (A tale of firmware leaks and marketing)

Written by /u/konrad-iturbe (Konrad Iturbe) and with help of /u/OverByThere's leaked firmware.


The GoPro HERO4 Black Adventure edition is 4x times more powerful than ever.

HERO4 cameras:

  • HERO4 Black (BANZAI)
@stevehenderson
stevehenderson / wrapString.vb
Created January 27, 2015 00:26
A VBA function to wrap a long string with newline characters
Function wrapString(incomingStr) As String
Dim pParts() As String
pParts = Split(incomingStr, " ")
Dim result As String
Dim k As Integer
For k = LBound(pParts) To UBound(pParts)
result = result & pParts(k)
@stevehenderson
stevehenderson / countDecimals.vb
Last active August 29, 2015 14:14
A VBA function to count decimal points in text
Function countDecimals(incomingStr) As Integer
Dim stringParts() As String
stringParts() = Split(incomingStr, ".")
Dim i As Integer
i = UBound(stringParts)
countDecimals = i
End Function
#add interaction columns -- TODO: Programticcaly do this later
#c12
dd<-cbind(binary.factors.matrix[,5]*binary.factors.matrix[,4],binary.factors.matrix)
#c13
dd<-cbind(binary.factors.matrix[,5]*binary.factors.matrix[,3],dd)
#c14
dd<-cbind(binary.factors.matrix[,5]*binary.factors.matrix[,2],dd)
#c15
dd<-cbind(binary.factors.matrix[,5]*binary.factors.matrix[,1],dd)
#c23
@stevehenderson
stevehenderson / lm_program
Created September 23, 2014 02:42
doe lm programatically build linear model
#This line creates a linear model with all variables and 2 way interaction
LinearModel.1 <- lm(result~(.)^2,data=Design.2)
import st.Prompt;
public class Lift {
public static void printShaft(String[] a) {
for (int i = 0; i < 10; i++) {
System.out.println(a[i] + (10 - i));
}
System.out.println();
}
import st.Prompt;
public class Lift
{
public static void printShaft(String [] a){
for (int i=0; i < 10; i++){
System.out.println(a[i]+(10 - i));
}
@stevehenderson
stevehenderson / gist:8f76e9b9cc8896e4fa2f
Last active August 29, 2015 14:05
Simple java guessing game
//I MADE A CHANGE!! HI EVA
package hendo;
//We need two packages for reading and handling IO errors
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class JavaGame {