This file contains hidden or 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 Bits{ | |
public static void main(String[] args){ | |
long val = -12435L; | |
System.out.println(longBits(val)); | |
// 1111111111111111111111111111111111111111111111111100111101101101 | |
System.out.println(longBitsSpaced(val)); | |
// 11111111 11111111 11111111 11111111 11111111 11111111 11001111 01101101 | |
} | |
This file contains hidden or 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.io.BufferedReader; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.io.OutputStream; | |
import java.net.InetSocketAddress; | |
import java.net.ServerSocket; | |
import java.net.Socket; | |
public class Highlander { |
This file contains hidden or 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
/** any tag | |
- () - any alement that is a tag and not TextElement | |
- (func) - matching decided by the provided function | |
- (tag) - element with that tag | |
- (attr,value) - element with attribute and value for it | |
- (tag,attr,value) */ | |
function matcher(p1,p2,p3){ | |
if(typeof(p1) == 'function') return p1; | |
if(!p3){ | |
if(!p2){ |
NewerOlder