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.


Messages - Taters343

Pages: [1] 2 3 ... 130
1
Arts & Entertainment / Re: The IRL Collaboration.
« on: February 12, 2013, 12:31:29 PM »
So...?

2
Technology, Science & Alt Science / Construct a binary tree from a text file
« on: September 26, 2012, 09:00:50 PM »
I have a text file, and each line represents data in a node. I have to construct a binary tree of it. Also, I have to do it in C#.

The format of the text file is, I think, a preorder traversal or whatever.
Quote
Root
Root.left
Root.left.left
Root.left.right
Root.right
Root.right.left
Root.right.right

Each node will always have two children or no children, but the tree must be able to be any size and still be created using the same program.

So far I've managed to mostly just fuck up. I had something that I think was close, but that was several hours ago, and now I can't remember what I had done.

What I do still have is this:

Code: [Select]
Node root;

public void ReadFile()      //Puts every line of the file into an array.
        {
            String[] allLines = File.ReadLines("nodeFile.txt").ToArray();
            root = WriteTree(allLines, 0);
        }
        public Node WriteTree(String[] fileContents, int arrayItem)
        {
            Node node = new Node();
            if (fileContents.Length - 1 >= arrayItem)
            {
                node.Text = fileContents[arrayItem]; //Adds current string to current node.
                //Console.WriteLine(fileContents[arrayItem] + " added");
                // Need stuff here that adds node.Left and node.Right
               // I'm more or less entirely sure this method needs to be recursive
            }

            return node;
        }

I'm lost and can't keep my thoughts straight any more, so I figured I'd ask here.

3
The Lounge / Re: Post your height/weight
« on: September 13, 2012, 06:24:28 PM »
I've been back at school for 3 weeks and I don't want to weigh myself because I know I've gotten fatter.

4
The Lounge / Re: Post an image of yourself!
« on: September 08, 2012, 10:07:13 AM »
So you're saying I should post more?

5
Technology, Science & Alt Science / Re: Another post your desktop thread
« on: August 24, 2012, 02:55:16 PM »
Weird.  I can't wait to go back to school on Monday. Crazy fast internet there.

6
Technology, Science & Alt Science / Re: Another post your desktop thread
« on: August 24, 2012, 02:05:40 PM »
Why is your internet so slow?

7
Technology, Science & Alt Science / Re: Another post your desktop thread
« on: August 24, 2012, 01:42:23 PM »
Since I don't have visible desktop icons and auto hide the task bar, I figured I'd just post the original image instead of a screenshot.


8
The Lounge / Re: Post an image of yourself!
« on: August 20, 2012, 06:48:55 AM »
I lost 8 pounds this summer. But I gained 3 pounds before that. And I gained 30 pounds before that.

9
The Lounge / Re: Post an image of yourself!
« on: August 18, 2012, 09:52:34 AM »
Pics or gtfo.

10
The Lounge / Re: Post an image of yourself!
« on: August 15, 2012, 06:22:22 PM »
You can be athletic with me, if you know what I mean.

11
The Lounge / Re: Post an image of yourself!
« on: July 11, 2012, 05:03:22 PM »


Took this with my new phone to try out the front facing camera.

12
Cool.

13
Samsung Galaxy S III. It hasn't been out very long, so I don't expect anyone to know about it specifically, but if anyone has tried it with a different device it'd be nice to know how it worked out.

14
Anyone know if these two products can be used together? I can't find anything about it online.

15
Technology, Science & Alt Science / Re: Google Now
« on: July 03, 2012, 02:53:31 PM »

So lets say you go eat at fast food restaurants regularly. Do you trust them enough not to tell a life insurance company about that?


Yes.


You have your phone in your car. Do you trust them not to tell the police that you were speeding?


Yes.


You took a sick day off work to go to a theme park with your family. You trust google not to tell your employers?


Yes.


The other makes money by selling information about you to other companies.


Herp derp.
http://www.androidcentral.com/google-responds-congress-about-its-updated-privacy-policy

16
Technology, Science & Alt Science / Re: Google Now
« on: July 03, 2012, 02:22:39 PM »
I dislike a lot of companies. Google is the only one I love. Personally, I don't care what Google knows about me. They only know as much as I tell them, and I trust them enough to tell them anything they might want to know.

18
The Lounge / Re: Post an image of yourself!
« on: June 27, 2012, 06:39:08 AM »
I have two questions, since I don't feel like lurking moar.

1. Who is Pearl?
2. Rooster is attractive.


That is all.

19
The Lounge / Re: Post an image of yourself!
« on: June 06, 2012, 03:07:05 PM »
It's the font used in the 1980's miniseries.

20
The Lounge / Re: Post an image of yourself!
« on: June 06, 2012, 03:01:02 PM »

21
Arts & Entertainment / Re: The IRL Collaboration.
« on: June 02, 2012, 04:32:50 PM »
I still remember a little bit of what I wrote.

22
Arts & Entertainment / Re: I made some Art yesterday
« on: May 19, 2012, 07:54:48 AM »
I could revise that, I suppose.
Your"art" is pitiful.       Please tell me what I missed.

ART GARFUNKEL!

23
Arts & Entertainment / Re: I made some Art yesterday
« on: May 18, 2012, 10:32:16 AM »
I could revise that, I suppose.

24
Arts & Entertainment / Re: I made some Art yesterday
« on: May 16, 2012, 04:21:33 AM »
I seriously hope I'm not the only one that gets it.

Most people haven't gotten it. I was really surprised.

25
Arts & Entertainment / I made some Art yesterday
« on: May 15, 2012, 09:18:39 PM »
And today I uploaded it into an album on imgur. Here it is: http://imgur.com/a/ynkn2

26
I didn't declare each individual Player in the Player array, I guess? I didn't think I had to, but when I changed it to

Code: [Select]
Player[] playerArray = new Player[5];
playerArray[0] = new Player();
playerArray[0].Name = "hello";


it worked.

27
In C#, I'm creating an array of "Player" objects. Each player has two attributes, and name and a score, which are left blank when the player is created to be set later. The code compiles, but when it tries to set the name or score of a player in the array I get a null reference exception. The code looks something like this, substituting the variables I'm using with constants for the sake of simplification:

Code: [Select]
Player[] playerArray = new Player[5];
playerArray[0].Name = "hello";

I tried creating a Player object that wasn't in an array and it worked fine, but for some reason it won't work in the array. Am I just missing a step or something? I feel like it should be an easy fix and that I'm just missing something obvious.

Never mind, I figured it out. I tried deleting the thread, but it won't let me.

28
Arts & Entertainment / Re: Animations I made
« on: May 04, 2012, 09:02:53 AM »
The first two were done in Photoshop, and the last one was done in Flash.

29
The Lounge / Re: Post an image of yourself!
« on: May 04, 2012, 08:58:01 AM »
Lol Beats.

30
Arts & Entertainment / Re: Animations I made
« on: May 03, 2012, 09:44:21 PM »
I didn't use the run sequence in the story. He didn't seem to care, though.

I liked how "The" morphed into "End" in the first one.

Very clever.

Thanks.

Pages: [1] 2 3 ... 130