Jump to content

Baddox

Active Members
  • Posts

    33
  • Joined

  • Last visited

Everything posted by Baddox

  1. public static int jumpIt(int[] a, int counter) { int score = 0; if (counter == a.length - 1 || counter == a.length-2 || counter==a.length-3) { cost += a[a.length-1]; return score; } else { return score + Math.min(jumpIt(a, counter + 1), jumpIt(a, counter + 2)); } } This is my current code, which is obviously not right, because it just returns the last number in each array. It is however, obviously reaching the else statement multiple times before getting to the if part. I'm just getting lost in the way the recursion is operating, obviously I'm never adding to the cost variable.
  2. I believe daemonSiege's solution is correct. I haven't quite coded it all yet, but in pseudo-pseudo code, it's roughly this: if (counter == a.length - 1 || counter == a.length - 2 || counter == a.length - 3) { return score + last item in array; } else { return score + Math.min(jumpIt(a, counter + 1), jumpIt(a, counter + 2)); } The if part handles the last 3 items in the array. The else opens up two recursive executions (which of course in turn potentially open up two more recursive executions). Score is just the integer variable keeping track of the sum. I haven't worked enough on it yet, because right now my code is iterating through all the recursions, but isn't totalling the sum, it's just returning the last number from the array. If anyone can explain how to get the sum working I would appreciate it.
  3. My Java2 class is usually a breeze and often even a joke, but for some reason I am having trouble this week with what should be a simple algorithm. What we're doing is taking a list (an array actually) of integers and determining a minimum score for "jumping" through the numbers. The first (left-most) number is always 0, and we must move to the last (right-most) number by either moving one number to the right, or "jumping" over one number and landing two numbers to the right. Any number we land on gets added to the score. When we land on the last number, it gets added as well. Our algorithm must, given the array of numbers, return the best (minimum) possible score. For example, given the numbers: 0 3 80 6 57 10 , the best solution is 19, because we land on the underlined numbers: 0 3 80 6 57 10 . This one's easy to figure out just by looking at it, but for larger lists I'm having trouble finding an algorithm. I don't need help with any of the coding, just the algorithm itself to solve the puzzle. The instructor provided some other lists with the solutions given to help test our code: 0 98 7 44 25 3 5 85 46 4 answer is 87 0 57 59 83 9 42 70 answer is 138 0 20 49 96 53 7 43 77 answer is 186 0 24 17 15 61 49 61 8 65 43 26 99 7 57 97 50 93 6 82 52 answer is 330
  4. I've got an old Treo 650, that has finally been replaced by my new HTC Fuze (AT&T's version of the Touch Pro). It's not in the best of shape, missing some case screws, and one of the SIM slot pins is bent, meaning it's pretty finicky as an actual phone. However, I'm sure someone out there has an idea for some interesting hack or mod I could do with this Treo, perhaps utilizing its bluetooth connection or something of the sort. All ideas welcome.
  5. Yeah, that's really the only elegant solution. I'll probably just have to wait for some affordable 1.5 TB drives, since all but 3 of my drives are 750 gig already (2 500 gig and 1 74 gig Raptor).
  6. Easy bro, just saying, not only is my motherboard full, but my existing case already has some spare 5.25" bays, so a new case doesn't fix anything.
  7. They're 5.25 inch bays, which, unless that particular case comes with the hardware, would require something like this http://shopping.msn.com/prices/startech-co...age-bay-adapter . I'm looking at sata controllers, but not seem to have more than 2 ports.
  8. It looks like the Antec 1200 just has tons of 5.25 drive bays, which doesn't help for hard drives. My case is nearly that big anyway, plus, the point is, my motherboard only has 6 SATA slots, and I don't know if any other mobos have more than that.
  9. Getting a bigger case won't help anything, since I'm using all my mobo's sata slots. Also, my case is this, http://www.newegg.com/Product/Product.aspx...N82E16811133011 pretty huge (and a great case by the way). I like the idea of getting a small case and doing the usb hub thing, but the cost and performance hit would be unfortunate. I might just try to get my hands on some old computer to use as a file server, that's probably the easiest and cheapest way.
  10. I have 7 hard drives in my main machine right now, and it's causing some problems with heat. The drives are packed close together right behind the intake fan, and you can really feel the heat coming off of them. I'm worried about the heat effecting the drives, not to mention heating up the rest of my computer. (I plan to purchase a new GPU soon which will further increase the heat of my machine, so I'm looking for an external SATA hard drive solution.) Obviously there exist external USB/eSATA enclosures, but they only accept one drive per. Ideally I would like some sort of rack/enclosure that can hold at least 2 drives. I know there are NAS's like the drobo, but they're expensive, and I really don't need RAID or any such thing. I think I've also seen some enclosures that hold ~3 drives and occupy a 5.25" bay or two--those would at least move some drives out from behind the intake fan. Thanks for your recommendations.
  11. Thanks. Good advice from everyone. I assume to achieve this goal I could start by spending less time on this forum. I'll try it for a while and get back to you all with the results.
  12. Hey everyone. I'm planning a trip from Missouri (where I live) to South Carolina. The trip will send me through St. Louis (obviously), Nashville, and Knoxville. I'm looking for ideas of stuff to do along the way (or out of the way even), geeky or otherwise.
  13. Even if the laptop card is something standard like AGP or PCI Express (most are), not only will the physical connection be incompatible, I wouldn't be surprised if there's soft/firm protection in the card to prevent it from being used in a normal desktop. I know with my Dell Inspiron 9300, there was talk that the BIOS'es on the video cards that would prevent them from even being used on different models of the same product line (however, I never confirmed this). If it's feasible to pull off this hack, I would only do it if I wanted something to be proud of. There's no way it's time- or money-efficient to do this hack for actually using it. It'd probably be cheaper in the end to either fix your laptop or buy a new video card and/or monitor.
  14. Thanks for the help. Does anyone happen to know the actual thread size for the antenna jack on these types of cards? There's two seemingly identical gold jacks on the card, both very small.
  15. Alright, here's my dilemma, and hopefully it's a simple one. I have a Cisco Aironet AIR-LMC352 card, which I believe uses the Prism2 chipset and can be used to do fun things with people's wireless access points :-). Unfortunately, the card I have looks like this http://www.amazon.com/Cisco-Aironet-11Mbps...2/dp/B00006HSS2 , without the end part like this http://www.amazon.com/Cisco-Aironet-Wirele...2/dp/B00006HOZB . The card currently fits into a PCMCIA slow, but it goes ALL the way in, plus there's not much of a signal. Is there any way to obtain the little grey end part (that's the technical term for it)?
  16. dlss, With DC++ in a LAN environment, do you know if you need to install a separate hub software on the computer that's to be the hub? Or is there an option within the DC client to turn your computer into a hub?
  17. A more detailed example of a common problem I encounter: Let's say I want to get a file that you have shared. I type in the address bar your.comp.name.or.ip.address. It will simply give an error like "This does not exist, or you do not have permission to access this, blahblahblah." So it's not a permissions problem with individual shares, it won't even let me view the directory of shares on a given computer. Whenever this occurs (which it does all the time at work), the ONLY remedy I've found is to add a user to the intended server ("you") with the same name and password as the intended client ("me"). This obviously is not a secure or feasible means.
  18. This is news to me that folks don't have trouble with windows filesharing. Everyone I've EVER talked to has had unending trouble with it. It's not DNS, because it fails often even when going to ipaddress in an address bar. The school I work for has completely giving up using it for file and printer sharing due to its unreliability. There's got to be some P2P app that does the same thing, only works.
  19. I'm surprised to hear that windows filesharing works well for you. Samba, indeed, works fine, but when several of my friends get together with their windows xp boxes, things get hairy. I've found, for example, that if I disable Simply File Sharing (which is required to get the Security tab on shares), my whole directory structure by default does not give Everyone read access, so I have to add Everyone to every new share I make. Also, windows does not integrate pausing or resuming, nor does it make it easy to see what files people are getting from you. Ever since XP added the Simple File Sharing garbage, I've had nothing but trouble with it, whether it's enabled or not.
  20. When my buddies get together with our comps, we never fail to have Windows filesharing problems. Does anyone know of a good P2P app to install that would serve this purpose? Obviously some of my friends aren't going to install FTP servers or anything like that, so something easy would be preferable. I know some big LANs use DirectConnect, so I'll be looking into that, but I don't like that it requires a central hub. Any ideas out there?
  21. The links still work for me... I don't have a girlfriend, but if I did, I'd still have plenty of money to keep her happy (quiet?).
  22. All in all, my computer was about 1600 US bucks. I've got no pic of mine, but this is the case. Those Rebel cases look swell (does anyone say "swell"?). Reminds me of the Antec 900 case, which also sports a 250mm fan (on top). I almost got the 900, until I realized its appearance sickened me. That SATA multibay interests me---I too have been wanting a file server for some time (USB external enclosures get REALLY old, I think I've racked up around 2 TB in total storage between enclosures and internal). I'm not understanding how that hooks up though, is there a larger SATA plug that's not on standard mobos? As for your mini-itx system, I'm also jealous, since I've toyed with the idea of getting one for a while now. I'd love to have one just to stream videos (movies, tv shows, etc.) off the network and display on my TV.[/url] Cooper: fixed broken link
  23. So my newegg shipment came in yesterday evening, I spent last night installing all the hardware and software. I got a Core 2 Duo e6600, 2 gigs of DDR2-800 RAM, an AMAZING evga 8800GTS GPU with 640 meg of RAM, and a 10k RPM WD Raptor drive. Put everything in my new full-tower Thermaltake Eureka case, which was very spacious and easy to work with. I was slightly worried about cooling, since it's a server case and not technically a "gaming" case, but so far, everything seems cool. All in all, I stayed up till about 2:30 am last night, got up at 7:30 am for work today, and here we are (it's 8:11 am now). I haven't run any benchmarks, but I got 80+ fps in CoD2 at my highest resolution (1650x1080) with ALL settings turned to max. Also, at highest res and settings, the Half-Life 2 Lost Coast stress test got an average of 141 fps. I'm gunna try Company of Heroes this evening, and perhaps Age of Empires 3 (a game which murdered my previous single-core AMD64, 6800GT system). In conclusion, this system is amazing, met all my expectations. I can't wait to try some divx encoding with that processor, it's going to pwn my previous one. If you're still skeptical about the WD 10k rpm drives, in my one-day experience with it, I most definitely notice improvement in loading times for the few games I've tried so far (CoD2, HL2 games), and Windows seems incredibly responsive and quick as well (granted, a new install always seems quicker). I'm also impressed with the new Corsair line of PSU's, I picked up the 520-watt one. It's modular, with nice cabling, nice whisper-quiet cooling (a big 120-mm fan), and clean looks.
×
×
  • Create New...