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
import java.math.BigInteger; | |
import java.security.SecureRandom; | |
import java.util.HashSet; | |
import java.util.Random; | |
import java.util.Set; | |
/** | |
* An efficient implementation of the RSA public-key cipher. All generated | |
* exponents used for encryption and decryption are greater than <code>5</code> | |
* (to secure against basic attacks, e.g. Chinese Remainder Theorem). The |
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
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.nio.file.FileVisitResult; | |
import java.nio.file.FileVisitor; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.nio.file.SimpleFileVisitor; | |
import java.nio.file.attribute.BasicFileAttributes; | |
import java.util.ArrayList; |
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
import java.awt.Font; | |
import java.awt.event.KeyAdapter; | |
import java.awt.event.KeyEvent; | |
import javax.swing.InputMap; | |
import javax.swing.JFrame; | |
import javax.swing.JScrollPane; | |
import javax.swing.JTextArea; | |
import javax.swing.KeyStroke; | |
import javax.swing.SwingUtilities; |
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
/** | |
* | |
* Defines a default handler for notification callbacks. | |
* | |
* @author Ryan Beckett | |
* @version 1.0 | |
* | |
*/ | |
public abstract class NotificationHandler { |
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
import java.util.*; | |
public class ControllerTest { | |
private static Controller controller = Controller.getInstance(); | |
private static View view = new View(); | |
private static LoginHandler loginHandler = new LoginHandler(); | |
public static void main(String[] args) { | |
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
import java.util.*; | |
public class CommentStripper { | |
private StaticTransitionTable transitions; | |
private StringBuilder sb; | |
private int index; | |
private int state; | |
private final char EOF = '@'; |
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
import java.io.*; | |
import java.net.*; | |
import java.util.*; | |
/** | |
* A Java statement interpreter. Add a list of statements with | |
* <code>newStatement</code> and run them with | |
* <code>run</code>. After running the interpreter, all | |
* previously added statements are forgotten. | |
*/ |
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
import java.io.BufferedInputStream; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.net.URL; | |
import javax.xml.XMLConstants; | |
import javax.xml.transform.Source; | |
import javax.xml.transform.stream.StreamSource; | |
import javax.xml.validation.Schema; | |
import javax.xml.validation.SchemaFactory; |
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
import java.util.*; | |
import java.lang.*; | |
//////////////////////////////////////////////////////////////// | |
// A quick and dirty implementation that parses and evaluates a | |
// logical expression in post-fix form. From left to right binary | |
// expressions are extracted (3 tokens), evaluated, and it's result | |
// is inserted into its place. This is done until the expression is | |
// gone. E.g. | |
// |
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
.text | |
main: | |
li $t4, 1, #t4 = counter | |
i1: ori $t0, $0, 1000 | |
i2: ori $t1, $0, 2000 | |
i3: addi $t2, $t0, 100 | |
i4: #lw $t3, 0($t1) | |
i5: #lw $t4, 0($t0) | |
i6: add $t3, $t3, $t4 |
NewerOlder