## Search found 171 matches

Fri Feb 04, 2011 2:12 am UTC
Forum: The Help Desk
Topic: What's the point with Linux?
Replies: 45
Views: 10368

### Re: What's the point with Linux?

Most of what I have to say on the subject has been said. My primary environment is an Ubuntu install with a Win 7 partition for gaming, I'm extremely in favor of linux for most of the reasons stated here. That said, one thing I haven't seen mentioned yet is Cygwin . Cygwin is the only way I survive ...
Thu Feb 03, 2011 7:32 am UTC
Forum: Coding
Replies: 5
Views: 963

In the real world I probably would use something like ConcurrentHashmap or more likely just use solution #2. I'm really rather interested in the fundamental question though. @Dropzone Thanks for the response. Is there any way to articulate the difference between 3 and 4 even if they're functionally ...
Thu Feb 03, 2011 2:45 am UTC
Forum: Coding
Replies: 5
Views: 963

Here's a question that floated across my desk today, and I wasn't immediately sure of the answer (in fact I'm still not). I have a gut feeling, but I can't quite articulate why I think it's better. Can anyone shed any light on which of these is the best way to write this method and why (phrased like...
Mon Dec 27, 2010 8:00 pm UTC
Forum: Mathematics
Topic: A simple puzzle (hopefully)
Replies: 6
Views: 1726

### Re: A simple puzzle (hopefully)

For all of the examples given so far this seems to work: for each byte, b, the new byte, n, is given by the nearest integer to 0.5685*b or n=round(0.5685*b) if that helps... edit: java code public static int convert(int in){ int out=0; for(int i = 0; in > 0; i++){ out += ((int)Math.round((in & 0...
Fri Nov 19, 2010 5:04 am UTC
Forum: Coding
Topic: Renaming a bunch of .javas
Replies: 11
Views: 1737

### Re: Renaming a bunch of .javas

Well, barring using something like Eclipse's refactor->rename functionality (much safer than what I'm about to do) you could always appeal to the powers of bash. All this does is change Test1.java to Test01.java and so on, but the theory is sound. Backup your code base before you try something like ...
Fri Nov 19, 2010 4:47 am UTC
Forum: Science
Topic: Is gravity really weak?
Replies: 18
Views: 2749

### Re: Is gravity really weak?

I was always given this example for gravity being "weak" You find ourself in a precarious position 1 mile above the surface of the earth (transformation into a pot of petunias or a whale optional). As is natural in this situation you begin to fall. Imagine that there is no atmosphere, so t...
Thu Oct 28, 2010 2:31 am UTC
Forum: Computer Science
Topic: Can you train a neural network to recognize prime numbers?
Replies: 35
Views: 17303

### Re: Can you train a neural network to recognize prime number

As I understand them neural networks operate with a predefined storage capacity, and I doubt there is any function/algorithm that does primality testing (for unbounded primes) that can operate in constant space. I saw a documentary once about a savant who "had a feel" for primes, but only...
Tue May 11, 2010 12:44 am UTC
Forum: Coding
Topic: coworker rants
Replies: 92
Views: 14301

### Re: coworker rants

Speaking of, I went around and around with a guy who couldn't understand why one of our 3rd party apps was writing files that were twice as big as what they "should" be. The concept of Unicode characters was far beyond him.
Sun May 09, 2010 3:51 am UTC
Forum: Coding
Topic: coworker rants
Replies: 92
Views: 14301

### Re: coworker rants

Agreed, Xanthir, the question I asked was not necessarily the question I wanted to ask. Input "123L4" should throw NumberFormatException due to the incorrect usage of String's replace method. Replace spits out a new String with the requested replacement, but does not modify the original, s...
Sun May 09, 2010 2:22 am UTC
Forum: Coding
Topic: coworker rants
Replies: 92
Views: 14301

### Re: coworker rants

I'm now tasked with overhauling one of our oldest apps. It's all coded in java 1.3 and running on an app sever that's been end-of-lifed since before I entered college. I was going through for just some basic code clean up when I came across this gem: /** * This method will replace string containing ...
Mon Apr 19, 2010 5:15 am UTC
Forum: Science
Topic: Gyroscopes
Replies: 14
Views: 2669

### Re: Gyroscopes

I found Eric Laithwaite's talks on gyroscopes to be very entertaining.
Fri Apr 09, 2010 4:43 am UTC
Forum: Coding
Topic: coworker rants
Replies: 92
Views: 14301

### Re: coworker rants

Hot off the presses. The same guy as in the first example from the first post and I were making some changes to a message object. There is an instance variable called messageType (a String), all we needed to do was send a message to check the availability of our server, so I suggested just using a n...
Wed Mar 17, 2010 5:01 am UTC
Forum: Coding
Topic: coworker rants
Replies: 92
Views: 14301

### coworker rants

If this isn't the right place, please feel free to move it. I would like to take this opportunity to open the door for rants about coworkers / co-coders and others that you are generally a little tired of dealing with. If you need to vent, please feel free. [Disclaimer] While you are free to post as...
Fri Feb 26, 2010 12:54 am UTC
Forum: Mathematics
Topic: Calculator Hacking
Replies: 8
Views: 2856

### Re: Calculator Hacking

I have a TI-89 with a "Go-baby-go" switch. I found instructions a long time ago that told how you could replace a certain capacitor on the main board and it would overclock the processor. I put the new capacitor on a flip switch so I could compare the two speeds. It's ~ 150% faster with th...
Fri Feb 12, 2010 3:32 am UTC
Forum: Mathematics
Topic: Wanted to share: 3D Graph Layout Tool
Replies: 3
Views: 1368

### Re: Wanted to share: 3D Graph Layout Tool

I was just looking for a graph visualization API for a project I'm working on. I'll definitely give this a go! Probably won't get to until the weekend, but I'm excited to try it out, thanks!
Tue Dec 15, 2009 1:43 am UTC
Forum: Coding
Topic: So Brainfuck Looks Pretty Interesting...
Replies: 13
Views: 4880

### Re: So Brainfuck Looks Pretty Interesting...

As for which compiler... if you know any other languages, why not write your own! It helps cement the meanings of the symbols in your head. In fact I created a whole java ide for brainfuck once, with a debugger and everything. Then I found out about bfdev, which of course did everything way better t...
Fri Dec 11, 2009 3:26 am UTC
Forum: Mathematics
Topic: Weird Calculus Problem (laying out a 400m track)
Replies: 11
Views: 3016

### Re: Weird Calculus Problem

BlackSails wrote:Why is the center 2Lr? The area of a rectangle is just length*width.

and the radius of each end is r, so the width is the diameter of the end, or 2*r
Tue Dec 08, 2009 4:31 am UTC
Forum: Coding
Topic: Java - How The Heck Do I Do Between (S1,s2)?
Replies: 4
Views: 856

### Re: Java - How The Heck Do I Do Between (S1,s2)?

Also, fun with regex... // Don't actually do it this way. public static String getContents(String main, String s1, String s2){ return main.replaceFirst(".*"+s1+"(.*)"+s2+".*","\$1"); } This is really touchy and breaks spectacularly if your main string or search...
Mon Dec 07, 2009 5:32 am UTC
Forum: Coding
Topic: JAVA dev on UBUNTU LINUX
Replies: 11
Views: 1740

### Re: JAVA dev on UBUNTU LINUX

My linux install usually goes something like: Download the jdk (call it java.jdk.bin for example purposes), to the Desktop, then open a terminal and do: cd /usr/local sudo mkdir java cd java sudo mv ~/Desktop/java.jdk.bin sudo chmod a+x java.jdk.bin sudo ./java.jdk.bin # Then I usually do the follow...
Fri Dec 04, 2009 2:32 am UTC
Forum: Coding
Topic: Java Swing
Replies: 3
Views: 907

### Re: Java Swing

In addition to what jaap said, your constructor for TheGui doesn't actually add any elements to the window, nor does it set anything visible. This is why you're not seeing a GUI now.
Once you have that addressed you still need to wait for the user to input something before you try to read it.
Mon Nov 09, 2009 7:11 am UTC
Forum: Science
Topic: Kepler's 1st Law - Why Earth revolves in Ellipse,not circle?
Replies: 39
Views: 7481

### Re: Kepler's 1st Law - Why Earth revolves in Ellipse,not circle?

One of my favorite things from college was deriving the possible shapes of orbits using nothing but Newton's laws and vector calculus. If you have experience with those two things, it's not too difficult and I found it very satisfying...
Wed Nov 04, 2009 3:03 am UTC
Forum: Science
Topic: Open source cladistics software for macs?
Replies: 2
Views: 528

### Re: Open source cladistics software for macs?

I know it's not very helpful, but man there are a lot of great words in this thread...
Wed Nov 04, 2009 3:01 am UTC
Forum: Science
Topic: Physical distance between stars
Replies: 4
Views: 913

### Re: Physical distance between stars

I think you may need to clarify the question a little. The obvious (maybe?) answer is yes, get a really really really really really really long tape measure and go nuts. If you mean can you do this only by standing on the surface of the Earth and taking measurements, the answer is also yes depending...
Tue Oct 27, 2009 1:49 am UTC
Forum: Coding
Topic: File Conversion confusion
Replies: 1
Views: 653

### Re: File Conversion confusion

You should just be able to: 1. Copy the code block from the site you linked under "Converting to a standard zip file: " and paste that into a text file, save as tns2zip.pl 2. Install perl 3. Put the tns2zip.pl and the tns file you're trying to convert in the same directory, might I suggest...
Wed Oct 21, 2009 2:29 pm UTC
Forum: Coding
Topic: Java SFTP suggestions?
Replies: 3
Views: 684

### Re: Java SFTP suggestions?

I've had some success with JCraft's Jsch package. There's a a bit of a learning curve, but you should look into it for sure.
Wed Oct 21, 2009 1:08 am UTC
Forum: Mathematics
Topic: Explaining a Mandelbrot set to n00bs
Replies: 46
Views: 4903

### Re: Explaining a Mandelbrot set to n00bs

And you could always play them this catchy tune.

(Edit: I forgot there is a little bit of bad language in that video... so just be aware)
Sun Oct 11, 2009 6:30 am UTC
Forum: Mathematics
Replies: 66
Views: 8323

lordatog wrote:...and the chances of you answering yes to it increase as the number of aces in your hand increase.

This was the light switch that I needed flipped, thank you!
Sun Oct 11, 2009 4:08 am UTC
Forum: Mathematics
Replies: 66
Views: 8323

Alright, probability was never really my strong suit, can someone help me wrap my head around this?

It is violently unintuitive to me at the moment, and I can't quite figure out how to attack the numbers.
Thu Sep 17, 2009 1:09 am UTC
Forum: Coding
Topic: Programming Science Projects
Replies: 9
Views: 1225

### Re: Programming Science Projects

Build a Lego Turing Machine. Sure, it's been done, but something similar might be cool. You could do a lego brainfuck interpreter... though that might not be school appropriate.
Wed Sep 16, 2009 2:23 am UTC
Forum: Science
Topic: Miscellaneous Science Questions
Replies: 2958
Views: 720723

### Re: So why can't an object go faster than light?

While some extremely good moderately technical responses have been given, I will try to put a few key points in a nutshell: 1. Einstein showed that as your velocity increases, so does your mass. 2. Newton showed that Force = Mass X Acceleration, or equivalently, Acceleration = Force / Mass 3. So if ...
Thu Sep 10, 2009 3:13 am UTC
Forum: The Help Desk
Topic: looking for a better torrent client on linux
Replies: 7
Views: 893

### Re: looking for a better torrent client on linux

uTorrent actually runs quite well under wine. That's what I've been using.
Fri Sep 04, 2009 3:35 am UTC
Forum: The Help Desk
Topic: Ping in MSDOS
Replies: 4
Views: 847

### Re: Ping in MSDOS

Something like this works, though I do not remember much about conditional syntax so it's pretty inelegant: @echo off ping -n 1 www.google.com > NUL if %ERRORLEVEL%==0 ( echo Google Lives: %ERRORLEVEL% goto nextTest ) echo Google is dead, long live Google: %ERRORLEVEL% :nextTest ping -n 1 www.IAmNot...
Tue Sep 01, 2009 2:34 pm UTC
Forum: The Help Desk
Topic: Windows HD Partition weirdness
Replies: 2
Views: 441

### Re: Windows HD Partition weirdness

No worries. Thanks for the input.

The drive is SATA, but I did a fresh install of XP with a SP3 injected disc. And as I said, it recognizes the full partition after I've mounted it in linux and rebooted. I will scour for different / more recent drivers to see if that doesn't fix it.
Tue Sep 01, 2009 6:04 am UTC
Forum: The Help Desk
Topic: Windows HD Partition weirdness
Replies: 2
Views: 441

### Windows HD Partition weirdness

Hey guys, here's a weird one. I recently had a hard drive crash and had to do a clean install of Win XP. Before I had 3 drives partitioned like so: 75 GB Windows - 40 GB linux /- 5 GB linux /swap - 120 GB hard drive (this is the one that failed) 80 GB Document storage (ntfs) - 150 GB linux /home - 2...
Tue Sep 01, 2009 5:35 am UTC
Forum: Mathematics
Topic: Need help with Logarithms
Replies: 7
Views: 1233

### Re: Need help with Logarithms

solve (for x) log(base 3) 68 = 2x The simplest of algebra yields answer for x as (1/2)*log 3 (68)... I see no immediately obvious way to simplify this any further. As for converting logarithm bases, remember that a b =c is the same as saying log a c=b So we can say log e c = log e (a b ) = b*log e (...
Mon Aug 17, 2009 3:52 am UTC
Forum: Coding
Topic: Simple Java exercises
Replies: 6
Views: 5037

### Re: Simple Java exercises

javabat has some nice simple beginner exercises.
Thu Jul 30, 2009 1:05 am UTC
Forum: Mathematics
Topic: Is my calculator wrong?
Replies: 13
Views: 2493

### Re: Is my calculator wrong?

Another supporter of a^b^c = a^(b^c) . The way I learned order of operations, this makes sense to me (see Mr-Mitch's post, I'm right about where he is on the explanation).

You could avoid the whole mess of confusion and go with RPN: abc^^ vs ab^c^
Tue Jul 28, 2009 12:48 am UTC
Forum: Mathematics
Topic: x^y=y^x
Replies: 6
Views: 2013

### Re: x^y=y^x

You can also always check out what Wolfram Alpha has to say on the subject. I'm not sure how much it will help, but it's pretty cool none the less.
Sat Jul 18, 2009 1:03 am UTC
Forum: Coding
Topic: Geek Flirt
Replies: 29
Views: 3524

### Re: Geek Flirt

You, sir, name?, you are my new king.
Mon Jul 13, 2009 5:37 am UTC
Forum: Mathematics
Topic: Integrals--Substitution Rule
Replies: 9
Views: 2069

### Re: Integrals--Substitution Rule

For the second integral, shouldn't it be u 2 = x instead of u = x 2 ? Try it with that and you might have an easier time. I disagree, u = x 2 looks like the right call to me. You have a correct, but less than useful statement here: du/2x=dx Don't "simplify" this quite as much and you shou...