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
/** | |
* Creates the delta that would take this state to the newer state | |
*/ | |
public GameStateDelta getDeltaTo(GameState newer) { | |
GameStateDelta delta = new GameStateDelta(); | |
Set<GameObject> dissapeared = Sets.difference(this.getGameObjects(), newer.getGameObjects()); | |
Set<GameObject> appeared = Sets.difference(newer.getGameObjects(), this.getGameObjects()); | |
Set<Long> continued = Sets.intersection(this.getGameObjectIds(), newer.getGameObjectIds()); |
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 class Fireball extends GameObject implements Updatable { | |
private static final int VELOCITY = 5; | |
@NetworkData | |
private Vector2D pos; | |
@NetworkData | |
private final Vector2D speed; | |
@NetworkData |
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
/* create and sign */ | |
var tx = TransactionBuilder.init(opts) | |
.addUtxos(utxos) | |
.addOutputs(outs) | |
.addKeys(keys) | |
.build(); | |
broadcast(tx.serialize()); | |
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
Traceback (most recent call last): | |
File "/testling/bin/node-v0.10.24/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module> | |
sys.exit(gyp.script_main()) | |
File "/testling/bin/node-v0.10.24/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 534, in script_main | |
return main(sys.argv[1:]) | |
File "/testling/bin/node-v0.10.24/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 527, in main | |
return gyp_main(args) | |
File "/testling/bin/node-v0.10.24/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 503, in gyp_main | |
options.circular_check) | |
File "/testling/bin/node-v0.10.24/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 129, in Load |
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
var Hasher = (function(){ | |
var secret = 42; | |
var Hasher = function() { | |
}; | |
Hasher.prototype.setSecret = function(s) { | |
secret = s; | |
}; | |
Hasher.prototype.hash = function(x) { |
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
case 1-of-1 | |
max size: 113 | |
case 1-of-2 | |
max size: 147 | |
case 2-of-2 | |
max size: 221 | |
case 1-of-3 | |
max size: 182 | |
case 2-of-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
var hk = new HierarchicalKey('tprv8ZgxMBicQKsPdSF1avR6mXyDj5Uv1XY2UyUHSDpAXQ5TvPN7prGeDppjy4562rBB9gMMAhRfFdJrNDpQ4t69kkqHNEEen3PX1zBJqSehJDH'); | |
console.log(hk.derive('m/45/0/0/0').extendedPrivateKeyString()); | |
console.log(hk.derive('m/45/0/0/0').extendedPrivateKeyString()); | |
console.log(hk.derive('m/45\'/0/0/0').extendedPrivateKeyString()); | |
console.log(hk.derive('m/45\'/0/0/0').extendedPrivateKeyString()); | |
Outputs: | |
tprv8iDdrJ7doYBh2MpWDAPHopqUZ8jftExnk3v98yGFfEJPAfUBszoswxqg5doKrQS7whF6q5Q4cdK2Bdn3HWA4tURnjdPyPv83fpuamjELFmP | |
tprv8iDdrJ7doYBh2MpWDAPHopqUZ8jftExnk3v98yGFfEJPAfUBszoswxqg5doKrQS7whF6q5Q4cdK2Bdn3HWA4tURnjdPyPv83fpuamjELFmP |
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
var bitcore = require('bitcore'); | |
var password = 'an example of an insecure password'; | |
var privateKey = bitcore.util.sha256(password); | |
var key = new bitcore.Key(); | |
key.private = privateKey; | |
key.regenerateSync(); | |
var addr = new bitcore.Address.fromKey(key); |
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
The objectives are: | |
- make copay work in all platforms. | |
- make it as decentralized as possible. | |
- allow async operations (mainly transaction proposals) | |
- allow remote encrypted key storage |
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
### Keybase proof | |
I hereby claim: | |
* I am maraoz on github. | |
* I am maraoz (https://keybase.io/maraoz) on keybase. | |
* I have a public key whose fingerprint is B27B D36C DF12 AA21 2788 E780 64F3 727B FE0B 3196 | |
To claim this, I am signing this object: |
OlderNewer