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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <style> | |
| body { | |
| background-color: #ffd2d2; | |
| } | |
| section { |
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.util.Objects; | |
| public class ComplexNumber implements Comparable<ComplexNumber> { | |
| private final float real; | |
| private final float complex; | |
| private ComplexNumber(float real, float complex) { | |
| this.real = real; | |
| this.complex = complex; |
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 BitFilteringTester { | |
| InteractingObject a = new InteractingObject('a'); | |
| InteractingObject b = new InteractingObject('b'); | |
| InteractingObject c = new InteractingObject('c'); | |
| InteractingObject d = new InteractingObject('d'); | |
| InteractingObject e = new InteractingObject('e'); | |
| InteractingObject f = new InteractingObject('f'); | |
| public BitFilteringTester() { |
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 interface Function { | |
| public double f(double x); | |
| } |
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 FontAwesome { | |
| /* | |
| ================================= | |
| http://fontawesome.io/cheatsheet/ | |
| ================================= | |
| */ | |
| public static final String FA_500PX = "\uF26E"; | |
| public static final String FA_ADDRESS_BOOK = "\uF2B9"; |
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 Color { | |
| float r, g, b; | |
| public Color(int color) { | |
| this.r = ((color >> 16) & 0xFF) / 255f; | |
| this.g = ((color >> 8) & 0xFF) / 255f; | |
| this.b = ((color >> 0) & 0xFF) / 255f; | |
| } | |
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
| function checkerBoard() { | |
| cube.twist('MMEESS'); | |
| } | |
| function wire() { | |
| cube.twist('RLFB'.multiply(3)); | |
| cube.twist('RRBBLLRRBBLL'); | |
| } | |
| function wireInverse() { |
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
| <iframe src="http://site.santasusana.org/embedtwitter.html" width="300" height="350" frameborder="0"></iframe> |
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
| <?php | |
| $uri = $_SERVER["REQUEST_URI"]; | |
| $sapi_type = php_sapi_name(); | |
| $resp = 404; | |
| if(strcasecmp($uri, '/test/hello.php') == 0) { | |
| $resp = 200; | |
| } | |
| if (substr($sapi_type, 0, 3) == 'cgi') { | |
| if($resp == 200) { | |
| header("Status: 200 OK"); |
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
| /** | |
| * Allows you to remove punctuation from a string | |
| * @param s The String you will be removing the punctuation from | |
| * @return A new String without punctuation | |
| */ | |
| public static String removePunctuation(String s) { | |
| String removed = s; | |
| for(int i = 33; i <= 47; i++) { | |
| removed = removed.replace(String.valueOf((char) i), ""); | |
| } |
NewerOlder