I hereby claim:
- I am volker48 on github.
- I am marcusmccurdy (https://keybase.io/marcusmccurdy) on keybase.
- I have a public key whose fingerprint is E3B1 C64D 9433 6BEC 7F0C 4139 7369 B29E 7655 B659
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
@Override | |
public void focusLost(FocusEvent e) { | |
final String textOnExit = textArea.getText(); | |
if (textOnEntry.equals(textOnExit)) { | |
return; | |
} | |
content.saveNewVersion(textOnExit); | |
} |
#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: |
..............ttttt.......... | |
............................. | |
t......ttt................ttt | |
....tt....tt................. | |
..................ttt...ttttt | |
wwwwwwwwwwwwtttttt.....tttwww | |
.........ttttttt............. | |
t............................ | |
wwwwwwwwwwwwttttttttt........ | |
.............wwwwwwwwwwwwwwww |
...xxxx....................................................................................xxxxxxxxxx...................................................................................xxxxxxxxxxxxxxxxxx.................xxxxxxxx.....xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx............................................................................................................xxxxxxxxxxxxxxxxxx......................................................................................... | |
.xxxxxx........................................................................................xxxxxxxxx..................................................................................xxxxxxxxxxxxxxxxx.x..................xxxxxx...xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.......................................................................................................xxxxxxxxxxxxxxxxxxx.......................................................................................... |
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); |
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; |
@@ -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())) { |
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; |
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())); |