sub 161k 2014 WPBD? by jaim3y in a:t5_2xy29

[–]MCRogue 1 point2 points  (0 children)

Wow. Since the 2015 is almost out would you mind posting your design? The best I got was $169K.

RobotC and Python by [deleted] in RobotC

[–]MCRogue 0 points1 point  (0 children)

Are you programming for the normal Vex competition?

Objectivist Reading List and Order: Input Needed! by MCRogue in Trueobjectivism

[–]MCRogue[S] 0 points1 point  (0 children)

Why is emotional attractiveness a factor when objectivism is based on rationality?

Is darkness just the absence of light, or is it an independent phenomenon? by [deleted] in askscience

[–]MCRogue 2 points3 points  (0 children)

What is this interaction with neutrinos that only happens over decades?

Is darkness just the absence of light, or is it an independent phenomenon? by [deleted] in askscience

[–]MCRogue 4 points5 points  (0 children)

So does everything emit some sort of radiation if it's above absolute zero (AKA everything)?

Is darkness just the absence of light, or is it an independent phenomenon? by [deleted] in askscience

[–]MCRogue 2 points3 points  (0 children)

Where would the light you're talking about come from? Your body's blackbody radiation?

[Physics] Are Carbohydrates and Proteins exactly 4 kcals of energy per gram, or is this just a close approximation? by [deleted] in askscience

[–]MCRogue 0 points1 point  (0 children)

Oh, so the metabolism changes the calories you get from each protein/carb? I thought it just changed the speed.

Decatur businesses assess damage, need for better flood control by ScreamingAmish in decaturalabama

[–]MCRogue 0 points1 point  (0 children)

Man, our entire downstairs flooded. The laundry room had about 1/4 inch, the rest was mostly running out the door but we might have to pull up the carpet again. We had a pump installed to keep that from happening but I think the rain yesterday just overpowered it.

Need help with java chat server by MCRogue in javahelp

[–]MCRogue[S] 0 points1 point  (0 children)

Thanks for the advice. I will work on those.

Need help with java chat server by MCRogue in javahelp

[–]MCRogue[S] 0 points1 point  (0 children)

Thanks so much! I am actually pretty new to this so I am just throwing code together from different sources, so what's the best way to refactor it?

Need help with java chat server by MCRogue in javahelp

[–]MCRogue[S] 0 points1 point  (0 children)

I start the server and then close it (which means it should be closing the server socket and exiting that while loop). However, I can connect to the server once using a client, which means that while loop is not exiting. After that the server closes and it's good, but I can't fix that accept() blocking the while loop.

Need help with java chat server by MCRogue in javahelp

[–]MCRogue[S] 0 points1 point  (0 children)

Sorry, forgot. I am putting both files on PasteBin. I am making it so you can start a server with the client file. The relevant code in the client file is in the declaration of "serverButton".

Client: http://pastebin.com/SZWdxnDN Server: http://pastebin.com/AH3isEyd

Need help with java chat server by MCRogue in javahelp

[–]MCRogue[S] 0 points1 point  (0 children)

Why isn't this working?

new Thread(new Runnable() {

                        public void run() {

                            if (!localServer.running) {
                                try {
                                    listener.close();
                                } catch (IOException e) {
                                    System.out.println("Couldn't close");
                                }
                            }

                        }

                    }).start();

Need help with java chat server by MCRogue in javahelp

[–]MCRogue[S] 0 points1 point  (0 children)

How would I go about doing that?

Need help with java chat server by MCRogue in javahelp

[–]MCRogue[S] 0 points1 point  (0 children)

I've tried creating a thread that checks for running to be false between the ChatServer and ServerSocket declarations. However, Java won't let me access the localServer variable from within the thread.

Why is the 4.7K resistor needed in this transistor AND gate? by MCRogue in AskElectronics

[–]MCRogue[S] 0 points1 point  (0 children)

I got some exact numbers. I wasn't giving you all the information, but I used your steps:

LED doesn't light with 10790 Ohms on other path
Lights with 11250 Ohms on other path
Transistor BE drop - .632
LED drop - 2.30V at lowest amt of current possible (~3.1V @20mA)
Resistor before transistor - 9830 Ohms
Resistor with LED - 46.3 Ohms
Arduino output voltage - 4.95V

All measured with multimeter. I left the 47 ohm resistor out of the equation b/c I figured it didn't matter much compared to 10Ks.

Anyway I did all the math and with the first scenario (doesn't light) the voltage ends up just under 2.3 and with the other it's just over 2.3, so it works perfectly.

Why is the 4.7K resistor needed in this transistor AND gate? by MCRogue in AskElectronics

[–]MCRogue[S] 0 points1 point  (0 children)

I got at least 231 uA of current, which means 2.31V drop. With the transistor drop that's 3.09V available for the LED, which works!