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
Host: app.plusplus.com | |
User-Agent: Skee-Ball-HD-Free/2.5 PlusPlus/2.5.0.7 iPhone OS/5.1.1 | |
Accept: application/binary-plist, application/json | |
Accept-Encoding: gzip | |
If-None-Match: | |
Authoriza |
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
code/cs645-hg/project4% ./run.sh | |
make: Nothing to be done for `target'. | |
Initializing SSL proxy with the parameters: | |
Local host: localhost | |
Local port: 8001 | |
Admin port: 8002 | |
(SSL setup could take a few seconds) | |
Proxy initialized, listening on port 8001 | |
Admin server initialized, listening on port 8002 | |
Starting MITM Proxy Server. |
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
SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1"); | |
KeySpec keyspec = new PBEKeySpec("password".toCharArray(), salt, 1000, 128); | |
Key key = factory.generateSecret(keyspec); | |
System.out.println(key.getClass().getName()); | |
System.out.println(Arrays.toString(key.getEncoded())); |
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
int unitLeft = unit.getPosition().getX() - unitInfo.getDimensionLeft() - 8; | |
int unitRight = unit.getPosition().getX() + unitInfo.getDimensionRight() + 8; | |
int unitTop = unit.getPosition().getY() - unitInfo.getDimensionUp() - 8; | |
int unitBottom = unit.getPosition().getY() + unitInfo.getDimensionDown() + 8; |
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
@@ -132,8 +132,9 @@ | |
while (OPEN != null && OPEN.size() > 0) { | |
cycleCount++; | |
Node current = OPEN.remove(); | |
+ openSet.remove(current.getTile()); | |
- // If this is the end node, we are done searching | |
+ // If this is the end node or we ran out of cycles | |
if (current.getTile().equals(endNode.getTile()) || cycles == 0) { | |
if (current.getTile().equals(endNode.getTile())) { |
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
List<MapTile> toCheck = new ArrayList<MapTile> (Arrays.asList(tile.getSurroundingTiles())); | |
toCheck.add(tile); | |
final UnitInfo unitInfo = bwapi.getUnitInfo(unit.getType()); | |
int unitLeft = unit.getPosition().getX() - unitInfo.getDimensionLeft()-16; | |
int unitRight = unit.getPosition().getX() + unitInfo.getDimensionRight()+16; | |
int unitTop = unit.getPosition().getY() - unitInfo.getDimensionUp()-16; | |
int unitBottom = unit.getPosition().getY() + unitInfo.getDimensionDown()+16; | |
for (MapTile mt : toCheck) { | |
int tileLeft = mt.getX()*8; |
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
public Collection<Node> getNeighbors() { | |
final List<Node> neighbors = new ArrayList<Node>(); | |
int x = this.coord.x; | |
int y = this.coord.y; | |
Coord[] coords = new Coord[8]; | |
coords[0] = new Coord(x - 1, y - 1); | |
coords[1] = new Coord(x, y - 1); | |
coords[2] = new Coord(x + 1, y - 1); | |
coords[3] = new Coord(x + 1, y); | |
coords[4] = new Coord(x + 1, y + 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
...xxxx....................................................................................xxxxxxxxxx...................................................................................xxxxxxxxxxxxxxxxxx.................xxxxxxxx.....xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx............................................................................................................xxxxxxxxxxxxxxxxxx......................................................................................... | |
.xxxxxx........................................................................................xxxxxxxxx..................................................................................xxxxxxxxxxxxxxxxx.x..................xxxxxx...xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.......................................................................................................xxxxxxxxxxxxxxxxxxx.......................................................................................... |
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
..............ttttt.......... | |
............................. | |
t......ttt................ttt | |
....tt....tt................. | |
..................ttt...ttttt | |
wwwwwwwwwwwwtttttt.....tttwww | |
.........ttttttt............. | |
t............................ | |
wwwwwwwwwwwwttttttttt........ | |
.............wwwwwwwwwwwwwwww |
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
#list comprehension to evaluate each item in the list | |
if not self: | |
return List([]) | |
else: | |
lis = [item.eval(variables, functions) for item in self] | |
#elem = lis.pop() | |
lis.reverse() | |
cell = -1 | |
#cell = BuiltinCall.cons([],elem) | |
for x in lis: |