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
#!/usr/bin/python | |
from subprocess import call | |
import sys | |
import urllib2 | |
import hashlib | |
import struct | |
import shutil | |
OLDFILE = '/tmp/newcolor.txt' | |
NEWFILE = '/tmp/oldcolor.txt' |
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
select c.name, m.serialnumber, | |
first_value(l.username) over (order by l.timestamp desc) as username | |
from machines m | |
inner join computersmachine cm on (m.id=cm.machineid) | |
inner join computers c on (cm.computerid=c.id) | |
left join logins l on (l.machineid=m.id) |
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
libname frc 'u:\public\frc'; | |
data frc.records(keep=team_id opponent_id result); | |
set frc.results; | |
array red(1:3) red1-red3; | |
array blue(1:3) blue1-blue3; | |
select; | |
when(redScore > blueScore) result = 2; | |
when(redScore < blueScore) result = 0; | |
when(redScore = blueScore) result = 1; | |
end; |
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
package sos; | |
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.Map.Entry; | |
import java.util.Set; |
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
/*** | |
Calculating the odds of the 3-strike game on The Price Is Right | |
***/ | |
data trials(keep=outcome j strikes); | |
outcome = 0; | |
do i=1 to 10000000; | |
bag = 8; | |
strikes = 3; |
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
import org.apache.struts.action.*; | |
import com.google.gson.*; | |
import org.scribe.builder.*; | |
import org.scribe.builder.api.*; | |
import org.scribe.model.*; | |
import org.scribe.oauth.*; | |
public class Authenticate extends Action { | |
public ActionForward execute(ActionMapping mapping, ActionForm form, |
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
switch(suit) { | |
case "club": | |
case "diamond": | |
trickValue = 20; | |
break; | |
case "heart": | |
case "spade": | |
trickValue = 30; | |
break; | |
case "no-trump": |
NewerOlder