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
package sciOlympics; | |
import java.awt.*; | |
import javax.swing.*; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
/* This class makes a pop-up dialog box. It works as an application or JApplet. | |
The code for this is based on http://www.jguru.com/faq/view.jsp?EID=27423 |
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.awt.*; | |
import javax.swing.*; | |
import java.awt.event.*; | |
/********************************** | |
This is the main class of a Java program to play a game based on hexagonal tiles. | |
The mechanism of handling hexes is in the file hexmech.java. | |
Written by: M.H. | |
Date: December 2012 |
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
#!/bin/bash | |
#set up constants | |
TIME1=12 #start hour (24 hour clock) | |
TIME2=20 #end hour (24 hr clock) | |
TIMELIMIT=60 #mintues | |
PGMNAME="mahjongg" #exact name used for killall and for TIMEFILE | |
PGMPATH="/usr/games/$PGMNAME" | |
TIMEFILE="$HOME/.local/$PGMNAME.elapsed" | |
STARTTIME=`date +%s` #seconds since 0000 UTC |
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.awt.*; | |
import java.awt.event.*; | |
import javax.swing.*; | |
import javax.swing.border.*; | |
// Make it a JFrame instead | |
//public class Layout2 extends JApplet { | |
public class Layout2 extends JFrame { | |
public static void main(String args[]){ |
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.awt.*; | |
import java.awt.event.*; | |
import javax.swing.*; | |
import javax.swing.border.*; | |
public class Layout2 extends JApplet { | |
// string array for jlist | |
private String[] receiptList = new String[15]; | |
{ |
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 SplittingUp { | |
public static void main(String args[]) { | |
String str = "this is a long string. With lots of words. And other stuff. It just goes on and on and on"; | |
String[] strArray = str.split(" "); | |
int slen = 20; | |
String newStr = ""; | |
for (int i=0; i< strArray.length; i++) { | |
newStr += strArray[i] + " "; |