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
<project name="mybot" basedir="."> | |
<path id="cp"> | |
<pathelement path="${basedir}" /> | |
</path> | |
<echo>deleting old jar file...</echo> | |
<delete file="MyBot.jar" /> | |
<echo>deleting class files...</echo> |
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
# got this from this page | |
# put this here so i would not lose it! | |
# http://www.piotrbuda.eu/2012/05/installing-google-play-on-android.html | |
# command to start emulator | |
# the important thing is the 200 need more space on system | |
emulator -avd am -partition-size 200 -no-audio -no-boot-anim | |
# now the loading of the apks | |
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system |
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
// see this page | |
// http://www.kavoir.com/2009/08/css-rotate-text-image-elements-by-90-180-or-270-degrees.html | |
// here is the javascript | |
// 1. get the element | |
// 2. get the style | |
// 3. get the webkitTransform and assign it a value of the rotation degree you want | |
document.getElementsByTagName("img")[0] |
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 urllib | |
import httplib | |
httplib.debuglevel = 1 | |
httplib.HTTPConnection.debuglevel = 1 | |
u = urllib.urlopen("http://yahoo.com") | |
data = u.read() | |
u.close() |
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 urllib, urllib2, httplib, base64, json, time | |
class CBTAPI: | |
def setup_auth(self): | |
self.b64string = base64.encodestring("%s:%s" % | |
(self.username, self.password)) | |
self.b64string = self.b64string.replace("\n","") | |
def add_auth(self, req): | |
req.add_header("Authorization", "Basic %s" % self.b64string) | |
def __init__(self, username, password): |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
</head> | |
<body> | |
<form action="wow_onefile.php" method="POST"> | |
<label>realm name</label> | |
<input type="text" size="30" name="realm" id="realm"> |
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 moo; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.ObjectInputStream; | |
import java.io.ObjectOutputStream; | |
import java.io.Serializable; | |
public class CowTester { |
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 java.awt.*; | |
import javax.swing.*; | |
class DrawPanel extends JPanel { | |
public void paintComponent(final Graphics g) { | |
System.out.println("paintComponent called now!"); | |
} | |
} |
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
Peanutty.loadLevel() | |
peanutty.wait(1000) | |
peanutty.createBall | |
x: 365.23741007194246 | |
y: 421.705035971223 | |
radius: 20 | |
static: false | |
peanutty.wait(2000) | |
level.fireCannon |
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
EOL = "\x0d\x0a" | |
class PDFMaker: | |
def __init__(self, filename): | |
self.outf = open(filename,"wb") | |
self.pos = 0 | |
self.trans = [] | |
self.objs = [] | |
def incpos(self, size): | |
self.pos = self.pos + size |