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
package com.moomoohk.ThreeD; | |
import java.util.prefs.Preferences; | |
public class Config | |
{ | |
public static Preferences prefs = Preferences.userNodeForPackage(Config.class); | |
public void save(String key, int val) | |
{ |
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
public class OSUtils | |
{ | |
private static String cachedUserHome; | |
public static enum OS | |
{ | |
WINDOWS, UNIX, MACOSX, OTHER, | |
} | |
static |
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
package psi; | |
import java.awt.Color; | |
import java.awt.Font; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import java.awt.event.FocusEvent; | |
import java.awt.event.FocusListener; | |
import java.awt.event.KeyEvent; | |
import java.awt.event.KeyListener; |
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
package mishael; | |
import java.util.ArrayList; | |
import java.util.Random; | |
public class CircularArrayList<Generic> | |
{ | |
private ArrayList<Generic> a; | |
public CircularArrayList() |
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
package dylan; | |
import java.awt.Color; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import javax.swing.JButton; | |
import javax.swing.JFrame; | |
import javax.swing.JLabel; |
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
package networking; | |
import java.awt.Color; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import java.awt.event.KeyAdapter; | |
import java.awt.event.KeyEvent; | |
import java.awt.event.KeyListener; | |
import java.io.BufferedReader; | |
import java.io.EOFException; |
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
package gridCheck; | |
import java.util.Scanner; | |
public class Grid | |
{ | |
private boolean[][] grid; | |
public Grid(int row, int col) | |
{ |
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
public matrix mul(matrix B) | |
{ | |
// Return a new matrix which is the matrix product of this | |
// with B. | |
if((rows()!=B.rows()) || (cols()!=B.cols())) | |
{ | |
System.out.println("Error, cannot add since the 2 matrices do not have the same dimensions."); | |
System.exit(0); | |
} | |
matrix M = new matrix(rows(), cols()); |
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
// return C = A * B | |
public static double[][] multiply(double[][] A, double[][] B) | |
{ | |
int mA = A.length; //row | |
int nA = A[0].length; //col | |
int mB = B.length; | |
int nB = A[0].length; | |
if (nA != mB) | |
throw new RuntimeException("Illegal matrix dimensions."); | |
double[][] C = new double[mA][nB]; |
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
/** | |
* | |
* @author Meshulam Silk ([email protected]) | |
* @since Aug 4, 2014 | |
*/ | |
public class BrokerTest | |
{ | |
public static void main(String[] args) | |
{ | |
/* |
OlderNewer