Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.9.1a is out! (05/10/19); Blog post: Skills and Story Points (07/08/19)

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - sdmike1

Pages: [1] 2 3 ... 5
1
Discussions / Whelp
« on: June 12, 2014, 06:12:51 PM »
Because this seems to be the the place where I write down major events in my life. In the past 24 hours I have gone from the top of the world to the bottom, I started the day learning that I got an amazing internship in a great industry.  45 minutes ago the girl who I love to the end of the earth ended our relationship. :/

2
Discussions / Paper help
« on: December 08, 2013, 11:21:40 AM »
Hey im writing a paper on net neutrality I was hoping that some of you could give it a lookover and make sure that my garbled mess of a brain is staying coherent. :)

linkage

3
Discussions / Risk Of Rain
« on: November 16, 2013, 02:24:43 PM »
I just for risk of rain and is is totally freakin awesome! If anyone is willing to host multiplayer i would totally play.

4
Discussions / Amazeing tracert
« on: November 13, 2013, 06:08:04 AM »
Code
tracert -h 90 216.81.59.173

One of the reasons we are running out of IPv4 addresses. :)

The neat stuff starts around hop 9 or 10.

5
Discussions / Burnout Paradise
« on: September 09, 2013, 12:50:34 PM »
Would anyone like to play Burnout Paradise with me? If you grabbed the humble origin bundle than you have the game.

To add me as a friend in the game send a request to (as always): "sdmike1"  Will be around till 3:45 pm US Central time and i will be back around 7:00 pm US Central time.

It should be noted that the game has a built in Voip system so mute it or use it accordingly I will have mine unmuted.

6
Discussions / Bitcoin
« on: May 29, 2013, 10:16:27 PM »
I kinda went on a random knowledge rampage and came across bitcoin i had heard about it earlier but i thought "what the heck run a miner while i am asleep and AFK." Does anyone else mine or use bitcoin? If so, what pool would you recommend i am more than a little bit confused and some guidance and opinion would be helpful. :)

EDIT:
If you may be so kind, to consider joining my minipool over at triplemining It would be very nice :)
http://sdmike1.triplemining.com

7
Discussions / I graduated, DUCK YA!
« on: May 18, 2013, 01:03:11 PM »
I finally graduated from high school! Sad because i will miss some of my teachers. Mr. Hofflander in particular, the best computer teacher I ever met, after the semester test he said he would give us extra credit if we could break the program (called lanSchool) that he was going to use to keep the computer apps class in line next year (think basic computers class, learn to use word powerpoint, excel, access, ect.).  But i am certainly excited for college.  If anyone has any fun stories from school please feel free to share them. :)

8
Discussions / Doctor Who Exactly?
« on: April 26, 2013, 10:25:06 PM »
Well, i just finished watching all 6 seasons of new who on netflix and lets just say that I am quite impressed.

Season 6 spoilers (seriously this is actually a giant spoiler so if you haven't watched it, DON'T open the spoiler tag.)
Spoiler
The way which he survived was genius writing on their part, I didn't see it coming in a milion years it was so great! and i love the dynmaic between river song and amy pond it is so good!
[close]

9
Discussions / Requesting Java Help (Highly Confused)
« on: April 25, 2013, 10:03:53 AM »
I am in a group trying to write a program to that tells you the amount of money you have left in your lunch account.  I am writing the networking code for the program and have run into a strange issue, both ports are connected the int value is sent but the float value is never sent, has anyone run into this before?

In the coarse of debugging it today I found that the server thread appeared to be going back and performing step 1 strangely, it would say:
Code
True: 1
True: 2
(it would print the username here which in my case was 102090)
True: 1
True: 3
True: 4
(if another client connected)
true: 1
true: 2
Server: 102090
true: 3
true: 4
true: 1
(the pattern holds true for a third client as well.)
true: 1
true: 2
Server: 102090
true: 3
true: 4
true: 1
(and a forth)
true: 1
true: 2
Server: 102090
true: 3
true: 4
true: 1


It may help to know that yesterday we ran in to the error, “Software caused connection abort: socket write error” Google searches for this error have given few results. Any and all help is appreciated, i will post the code below.


The client class, this gets the person's student id, sends it to the server and receives the balance as a float.
Code
import java.io.*;
import java.net.*;
import java.util.*;

public class Client
{
public static void main(String[] args)
{
//declares the DataOutputStream
DataOutputStream out;
//declares the ServerSocket
ServerSocket serverSocket = null;
//gets the username
String Username = System.getProperty("user.name");
//parses the username into an int
int StudetIDNumber = Integer.parseInt(Username);
//declares the socket
Socket sock = null;
//dummy data for the client to desplay if the server doesn't send the float
float Balance = 404.0f;

try
{
//open a network socket
sock = new Socket("localhost", 4444);
//create write stream to send information
out=new DataOutputStream(sock.getOutputStream());
//writes the Int to the network stream
out.writeInt(StudetIDNumber);
//for debuging
System.out.println(sock.isConnected() + ": 1"); }
catch (IOException e)
{
//Bail out
e.printStackTrace();
System.out.println("Client: 2");
}
System.out.println(StudetIDNumber);
DataInputStream in;
try
{
//opens a socket
sock = new Socket("localhost", 4444);
//for debuging
System.out.println(sock.isConnected() + ": 2");
//gets the InputStream
in = new DataInputStream(sock.getInputStream());
//For debuging
System.out.println(sock.isConnected() + ": 3");
//Reads the float, the client gets stuck here.
Balance = in.readFloat();
//for debuging
System.out.println(sock.isConnected() + ": 4");
}
catch (IOException e)
{
//She's going to blow *dives for cover*
e.printStackTrace();
System.out.println("Client: 2");
}
System.out.println(Balance);


}
}


This is the server class, it is desgined to accept the connection from the client and spin off a septet thread which then handles the client.
Code
import java.net.*;
import java.io.*;
import java.nio.channels.*;

public class Server
{
    public static void main(String[] args) throws IOException
    {
//begins to declare the ServerSocket object
        ServerSocket serverSocket = null;
        //Is the server lisnting
        boolean listening = true;

        try
       {
//creates the ServerSocket
            serverSocket = new ServerSocket(4444);
        }
        catch (IOException e)
        {
            System.err.println("Could not listen on port: 4444.");
            System.exit(-1);
        }
//the ServerThread runs in this loop while the server is listening
        while (listening)
        new ServerThread(serverSocket.accept()).start();

        serverSocket.close();
    }
}

This is the class which contains the thread which the server will spin off, it takes the connection from the server, receives the information, and sends dummy test information back to the client, in the future it will call a class that will search a .csv file for the appropriate users balance and return that to the thread. The problem is probably in this class.
Code
import java.net.*;
import java.io.*;
import java.util.*;

public class ServerThread extends Thread
{
//Begins to declare the socket
    private Socket socket = null;
//Holds the account balance
float AccoutnBalance = 12.34f;
//Used to hold the ID number
int StudentIdNumber;

    public ServerThread(Socket socket)
    {
     super("ServerThread");
     this.socket = socket;
    }

    public void run()
    {
DataInputStream in;
     try
     {
//opens the DataInputStream
in =new DataInputStream(socket.getInputStream());
//For debuging
System.out.println(socket.isConnected() + ": 1");
//reads the int that the client sends
StudentIdNumber = in.readInt();
//For debuging
System.out.println(socket.isConnected() + ": 2");
//desplays the student id number
System.out.println("Server: " + StudentIdNumber);

     }
     catch (IOException e)
     {
        e.printStackTrace();
        System.out.println("Server: 1");

     }
     DataOutputStream out;
     try
     {
//opens the DataInputStream
out = new DataOutputStream(socket.getOutputStream());
//for debuging
System.out.println(socket.isConnected() + ": 3");
//Sends the float
out.writeFloat(12.34f);
//for debuging
System.out.println(socket.isConnected() + ": 4");

}
catch(IOException e)
{
e.printStackTrace();
System.out.println("Server: 2");
}

}
}

As i said before any and all help is greatly appreciated :)

10
Discussions / Java help (serialization and networking)
« on: April 19, 2013, 07:35:36 AM »
My friends and i are making a tic tac toe game that you can play on different computers, we decided to serialize the objects of the JButtons and send send them over the network to do this, at this point we can't get them to work as we get this error "Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.swing
.JButton cannot be cast to TicButton" anyone have any ideas, i have posted the code below
Thanks! anything helps :)

The class that does the transfer.
Code
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class Transfer
{
    public static void Transfer(String FileName)
    {
    final String largeFile = FileName;
    final int BUFFER_SIZE = 65536;
    new Thread(new Runnable()
    {
    public void run()
    {
    try
    {
    ServerSocket serverSocket = new ServerSocket(12345);
    Socket clientSocket = serverSocket.accept();
    long startTime = System.currentTimeMillis();
    byte[] buffer = new byte[BUFFER_SIZE];
    String read;
    String totalRead = 0;
    InputStream clientInputStream = clientSocket.getInputStream();
    while ((read = clientInputStream.read(buffer)) != -1)
    {
    totalRead += read;
    }
    long endTime = System.currentTimeMillis();
    System.out.println(totalRead + " bytes read in " + (endTime - startTime) + " ms.");
    }
    catch (IOException e)
    {
System.out.println(e);
    }
    }
    }
    ).start();


    new Thread(new Runnable()
    {
    public void run()
    {
    try
    {
    Thread.sleep(5000);
    Socket socket = new Socket("192.168.24.203", 12345);
    FileInputStream fileInputStream = new FileInputStream(largeFile);
    OutputStream socketOutputStream = socket.getOutputStream();
    long startTime = System.currentTimeMillis();
    byte[] buffer = new byte[BUFFER_SIZE];
    int read;
    int readTotal = 0;
    while ((read = fileInputStream.read(buffer)) != -1)
    {
    socketOutputStream.write(buffer, 0, read);
    readTotal += read;
    }
    socketOutputStream.close();
    fileInputStream.close();
    socket.close();
    long endTime = System.currentTimeMillis();
    System.out.println(readTotal + " bytes written in " + (endTime - startTime) + " ms.");
    }
    catch (Exception e)
    {
System.out.println(e);
    }
    }
    }
    ).start();

    }
}
the "actual" game portion.
Code
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import java.nio.ByteBuffer;
import java.nio.channels.*;

public class TicTacToe3 implements ActionListener
{
JFrame window = new JFrame("TicTacToe");
private JButton buttons[] = new JButton[9];
private String letter;
private int count = 0;
private int[][] wins = new int[][]
{
{0,1,2},{3,4,5},{6,7,8},{0,3,6},{1,4,7},{2,5,8},{0,4,8},{2,4,6}
};
private boolean win = false;
public TicTacToe3()
{
window.setSize(300,300);
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
window.setLayout(new GridLayout(3,3));
for(int i=0; i <= 8; i++)
{
buttons[i] = new JButton();
window.add(buttons[i]);
buttons[i].addActionListener(this);
}
window.setVisible(true);
}

public void actionPerformed(ActionEvent a)
{

++count;
if(count % 2 == 0)
{
letter = "O";
}
else
{
letter = "X";
}
JButton buttonPressed = (JButton)a.getSource();
buttonPressed.setText(letter);
buttonPressed.setEnabled(false);


//My Stuff
//From this line to line 59 serializes the object
try{

ObjectOutputStream output = new ObjectOutputStream(new FileOutputStream("TicButton.dat"));
TicButton button;
int buttonLoc;
String buttonSym;
output.writeObject(buttonPressed);

Transfer.Transfer("TicButton.dat");

}
catch (IOException z)
{
System.out.println(z);
}
//end of the serialization. the data file is now saved
//start of the reading of the data file where the object is stored --- goes until line 86
try{
ObjectInputStream inR = new ObjectInputStream(new FileInputStream("TicButton.dat"));
TicButton button;
try
{
while(true)
{
button = (TicButton)inR.readObject();
}
}
catch(EOFException e)
{
System.out.println(e);
inR.close();
}
}
catch(IOException z)
{
System.out.println(z);
}
catch(ClassNotFoundException y)
{
System.out.println(y);
}

//end of the reading of the data file where the object is saved

//My Stuff

for(int i = 0; i<= 7; i++)
{
if(buttons[wins[i][0]].getText().equals(buttons[wins[i][1]].getText()) && buttons[wins[i][1]].getText().equals(buttons[wins[i][2]].getText()) && buttons[wins[i][0]].getText() != "")
{
win = true;
}
}
if(win == true)
{
JOptionPane.showMessageDialog(null, letter + " Wins!");
System.exit(0);
}
else if(count == 9 && win == false)
{
JOptionPane.showMessageDialog(null, "Tie!");
System.exit(0);
}
}
}
and the "launcher"
Code
public class Test
{
public static void main(String []args)
{
TicTacToe3 TTT = new TicTacToe3();
}
}

11
Discussions / Ice Storms
« on: April 10, 2013, 07:10:43 AM »
So we got off school today, which never hapens by the way, because of freezing rain for the past 2 days, it is so icey that i can skate on my lawn! :P

12
Discussions / Use Old Spice
« on: April 08, 2013, 06:28:03 PM »

13
Discussions / Youtube is Shutting down
« on: March 31, 2013, 04:59:07 PM »
Although it is unfortunate, it is true :(
Proof!

14
Discussions / Essay on password security
« on: March 25, 2013, 04:57:01 PM »
The more people who look this over the better so ya... anything that doesn't make seance/is incorrect just say it here :)

I have to write on this for non-computer nerds so if it seams a little patronizing, well it is ;)

link

15
Discussions / Family history
« on: March 14, 2013, 07:50:26 AM »
What cool stories do you have about your family history?

This is about my great great grandfather (so my mother's mother's father)

Spoiler
Edward Butler was the man behind the political machine in St. Louis for many years, in the late 19th century.

He was said to have been born in Ireland "in the Year of the Big Wind" which was 1839. His death certificate gave his birthdate as Jan 3, 1840, but there were other sources that differed with that. "The Book of St. Louisans" gave his birth year as 1838.

Update: His baptismal record has been located in Ireland. He was born Jan 3, 1834, and baptized 3 days later, at the Catholic Church in Rathdrum, Wicklow. His parents' address was given as "Garrymore".

There were a total of 5 siblings found in Rathdrum parish records. Baptismal dates were: Patt Butler March 19, 1820; Eliza Butler March 2, 1825; Catherine Butler Oct 11, 1830; Essy Butler April 15, 1832; and Edward Butler Jan 6, 1934.

Ed's sister Catherine was found in St. Louis, Missouri marriage records for St. Patrick's church, marriage to Daniel McCormack Nov 24, 1861. Edward was a witness.

His parents according to both the birth certificate and the death certificate were James Butler and Mary Coughlan who married on June 25, 1819, at the Catholic church in Rathdrum. The address given for James was Kilquade, and for Mary it was Garrymore. James the father may have come over to America, because there is an older man named James Butler, age 78, who died in 1866, who is buried in the same plot as Ed.

Ed's occupation on his death cert. was recorded as Master Horse Shoer and Capitalist.

Ed Butler came to America as a young boy in his early teens, and lived in New York (one news article said Harlem which would have been the country in the mid 19th c.) where he learned the blacksmith and horse shoe trade. Ed eventually made his way to St. Louis where he was possibly spotted as early as the 1860 census working as a horse shoer. There was an Ed Butler recorded as age 26 that year in the census, so if that was him, he was a bit older than he should have been if his death certificate is accurate. (Yes, he would have been 26 that year, now we know.)

A year or so later Ed married Ellen O'Neill on Oct 11, 1860 at St. John the Baptist in St. Louis, Missouri. They had a number of children over the years, including two whose graves at Calvary are listed on this site, James and Edward Jr. Another grave at Calvary is the one of their daughter Anastasia Linchey. Anastasia died at the age of 28 in 1896, a young wife to Peter Linchey, also buried in the large Butler gravesite.

"Boss Butler" as he was known, was written about extensively by Lincoln Steffens in muckraking articles of the time, because Col. Butler sent out his "Boodle Boys" (sometimes called "Butler's Indians") to influence the vote.

Ed owned several horse shoe shops in St. Louis, and became a wealthy man over the years. His son Ed Jr. was quoted in the newspaper in about 1883 saying that ladies and fire deparment horses would never wait a minute at their shops to get their horses shoed. It was usually first come first served, except for the ladies and the fire department. The shops prided themselves on shoeing a horse in four minutes, and charged $2 a horse.

Boss Butler, though the subject of much political scandal during his career, had the largest funeral ever in St. Louis, it was said in the newspapers of the time. He also had quietly helped many of the poor in St. Louis, which was not learned until after his death, when throngs lined the streets for his funeral procession. The crowd was estimated at 10,000.

He could perhaps be considered "Famous" for this website, but no one today would know who he was.

As a side note, Ed's death certificate was signed, as most were in those days, by Max Starkloff, the coroner/medical examiner for the city of St. Louis. Max Starkloff was the brother of Irma Rombauer, who wrote one of the first of the great modern cookbooks, The Joy of Cooking.

Ed Butler was in the horse business with Michael Butler (who was buried at St. Joseph's in Manchester, Mo.). They were once thought to be cousins by some in Michael's family, though perhaps they just knew each other from being in the same business, which does now seem to be the case, since their birth records have been located, and they do not come from the same Irish counties.

Ed Butler and Michael Butler jointly owned the Butler Stock Farm in Manchester, Mo., in the 1880s, boarding horses at Michael Butler's property, which Michael had bought from Ed's wife Ellen in 1884, and which remains in Michael's family to this day.

tl;dr?
he was a crime boss in St. Louis, Mo.  So go back and read it!  ;)


[close]

Pages: [1] 2 3 ... 5