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 adammika on github. | |
* I am adammika (https://keybase.io/adammika) on keybase. | |
* I have a public key whose fingerprint is 7750 DB6E BF51 59B1 5F03 F165 4311 8A3A 2FB2 5FB1 | |
To claim this, I am signing this object: |
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
for (int i = 0; i < (int)peers.size(); i++) { | |
char* peer; | |
bzero((char *) &peer, sizeof(peer)); | |
peer = peers.at(i); | |
char* ip = strtok(peer," "); | |
char* port = strtok(NULL," "); | |
server_address.sin_port = htons(atoi(port)); | |
if (inet_pton(AF_INET,ip,&server_address.sin_addr) != 0) { | |
ostringstream xval; | |
xval << posx; |
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
// Check whether the regex is in the compareTo string | |
private boolean contains(String regex, String compareTo) | |
{ | |
Pattern p = Pattern.compile(regex); | |
Matcher m = p.matcher(compareTo); | |
return m.matches(); | |
} |