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
function to8bitString(input){ | |
//clamp the value to 8-bits by and with 0xFF | |
var clampedValue = (input&0xFF).toString(2); | |
//pad the string to make it easier to read. | |
return String("00000000" + clampedValue).slice(-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
function fullBinaryString(input){ | |
//coerce javascript to show full 32bit integer underneath. | |
return (input>>>0).toString(2); | |
} |
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
# Add this to a Maven project. | |
<dependency> | |
<groupId>io.github.bonigarcia</groupId> | |
<artifactId>webdrivermanager</artifactId> | |
<version>1.4.10</version> | |
</dependency> | |
# Add this to a Gradle project. | |
compile 'io.github.bonigarcia:webdrivermanager:1.4.10' |
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
<h2>test</h2> | |
<% | |
response.setHeader("Set-Cookie", "test=62CBD73375A66446766D698B3890BBB1; Path=/test; HttpOnly; Secure;"); | |
response.setHeader("Set-Cookie", "none=62CBD73375A66446766D698B3890BBB1; Path=/test; HttpOnly; Secure; SameSite=none"); | |
Cookie cookie = new Cookie("key","value"); | |
response.addCookie(cookie); | |
Cookie[] cookies = request.getCookies(); | |
for(int i = 0; i < cookies.length; i++){ | |
out.print(cookies[i].getName() + " -> " + cookies[i].getValue()); | |
out.println("</br>"); |