Search the web
Sign In
New User? Sign Up
straight_talking_java · Former JDJ Straight Talking list
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 56377 - 56406 of 60580   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Simplify | Expand   (Group by Topic) Author Sort by Date ^
56377
Hi all, I'm working with images. I don't need to visualize them, just batch process them. So I've tried loading them into the Image class but this lazy loads...
Kirk Pepperdine
kcpeppe
Offline Send Email
Dec 3, 2007
5:33 pm
56378
Kirk, Here is an example using a byte[] data to create an Image. http://www.exampledepot.com/egs/java.awt.image/Mandelbrot2.html?l=rel That should allow you to...
Mica Cooper
mica.cooper
Offline Send Email
Dec 3, 2007
6:14 pm
56379
Kirk, Why don't you use ImageIO to load the images in a BufferedImage? I do lots of image processing without displaying them (the regular way). And I've never...
Geert Van Damme
darlingvandamme
Offline Send Email
Dec 3, 2007
8:05 pm
56380
Gosh, the list is quite lately. Here's a little puzzler that I faced today - for the sake of sparking discussion, any discussion, let's see how the ST-J...
Eric Rizzo
asmalltalker
Online Now Send Email
Dec 4, 2007
6:35 pm
56381
Yeah, it has been quite. How about this, it is time O(N) and memory O(1) but doesn't try and allocate into gaps in the sequence. public class IdGen { static...
Matt Quail
matt_quail
Offline Send Email
Dec 4, 2007
11:31 pm
56382
It was a fairly ho-hum mornng until a co-workers machine came up with this gem. The SQL Server Agent (MSSQLSERVER) service depends on the SQL Server ...
Burnett, David
daviburn
Offline Send Email
Dec 5, 2007
5:09 am
56383
... lol! You just can't make this stuff up! DR...
David Rosenstrauch
darose2
Offline Send Email
Dec 5, 2007
2:35 pm
56384
... Bill must have shown up late to class on the day they were talking about an infinite number of monkeys using an infinite number of typewriters given an...
Curtis Cooley
TheDarkSavant
Offline Send Email
Dec 5, 2007
4:14 pm
56385
... That's a clever idea - it didn't even cross my mind to use regex Pattern to detect conflicts in the name. I'm disappointed in the lack of response -...
Eric Rizzo
asmalltalker
Online Now Send Email
Dec 6, 2007
8:03 pm
56386
... Apologies - just been a bit busy lately. I took a quick look at the code, but wasn't able to quickly grok what the problem was all about and had to move...
David Rosenstrauch
darose2
Offline Send Email
Dec 6, 2007
8:12 pm
56387
Matt's is much better. His is O(n), yours is O(n^2). But that only describes one call to generateUniqueID. Now suppose you are doing this in a loop, generating...
Bob Foster
xmlbob
Offline Send Email
Dec 7, 2007
6:49 am
56388
Some odd things about this interface are that it's mutable, the baseName is independent of the collection and not preserved within the Element, and there is no...
gjfdh
Offline Send Email
Dec 7, 2007
4:00 pm
56389
So, I'm sitting here in my hotel room in London, paying for internet access (!), fighting jetlag and waiting 'till it's a decent hour to go to the pub. Here's...
Matt Quail
matt_quail
Offline Send Email
Dec 8, 2007
3:27 pm
56390
Is this the tortoise and hare algorithm? Basically, you have the first "checker" move every two nodes and the second checker moves to every node. If they ever...
Rob Diana
rob_diana
Offline Send Email
Dec 8, 2007
5:24 pm
56391
... If there is a constant time algorithm that solves that problem I'll buy you a beer. It would be worth it to learn the algorithm. :-) -- Esse Quam Videre ...
Jon Strayer
jstrayer2
Offline Send Email
Dec 8, 2007
7:38 pm
56392
... That would still seem to be an O(n) algorithm. And it doesn't tell you that the node you started with is in the loop, just that there is one. -- Esse Quam...
Jon Strayer
jstrayer2
Offline Send Email
Dec 8, 2007
7:40 pm
56393
... The tortoise/hare approach is O(n) in time, but O(1) in memory, which all Matt was hinting at - you only need to keep track of two nodes. (and the task was...
Brendan Humphreys
brendan_hump...
Offline Send Email
Dec 9, 2007
12:36 am
56394
A little late to the party (I just re-found ST-J after a mail client reorganisation), and making all sorts of assumptions about the longevity/portability of...
Brendan Humphreys
brendan_hump...
Offline Send Email
Dec 9, 2007
1:04 am
56395
yes, this was meant as a joke. albeit a bad one ;-)...
Brendan Humphreys
brendan_hump...
Offline Send Email
Dec 9, 2007
1:35 am
56396
Shouldn't it be static String generateUniqueID(String base, Collection<Elements> elements) { Thread.sleep(1); return base + System.currentTimeMillis(); } ;-) ...
Geert Van Damme
darlingvandamme
Offline Send Email
Dec 9, 2007
10:27 am
56397
... <...> ... It does not surprise me at all, because IME this kind of puzzle has very little to do with producing useful, quality software that meets everyday...
Eric Rizzo
asmalltalker
Online Now Send Email
Dec 10, 2007
3:35 am
56398
... Given the limited context I provided about the use of this, that is a reasonable response. But given the real context (generating new items in response to...
Eric Rizzo
asmalltalker
Online Now Send Email
Dec 10, 2007
4:13 am
56399
... It was just a poor specification. I didn't give any context about what it is actually for; but that was intentional on my part - I wanted to leave as much...
Eric Rizzo
asmalltalker
Online Now Send Email
Dec 10, 2007
4:20 am
56400
... Heh, given the actual context where I use it (GUI), I might insert this for the next demo just to see how the VP likes seeing names like ...
Eric Rizzo
asmalltalker
Online Now Send Email
Dec 10, 2007
4:23 am
56401
... Ah hem. The problem statement was "Write an algorithm that given a Node, determines if that Node is part of a circularly linked list." We need to know of...
Jon Strayer
jstrayer2
Offline Send Email
Dec 10, 2007
4:36 pm
56402
Is N known ahead of time? And what does "part of a circularly linked list" mean? A circular list can have leader nodes and loop nodes. If isCircular(start)...
gjfdh
Offline Send Email
Dec 10, 2007
4:36 pm
56403
Sorry, it's *not* circular if you end before N nodes. ... linked ... internet ... to ... memory? ... time...
gjfdh
Offline Send Email
Dec 10, 2007
4:38 pm
56404
Using the system clock is equivalent to ... only your "n" ticks faster. It assumes that all clocks are in synch, that all ids are assigned using the same...
gjfdh
Offline Send Email
Dec 10, 2007
4:57 pm
56405
I think the base should not be part of the ID and you should separate the ID generation/assignment from ID presentation. If the IDs are presented to the user,...
gjfdh
Offline Send Email
Dec 10, 2007
5:05 pm
56406
That is such a popular question that they wrote a book about it. It made for an interesting read and as Eric says in a later post knowing how to solve these...
Simon MacDonald
macdonst
Offline Send Email
Dec 11, 2007
3:09 am
Messages 56377 - 56406 of 60580   Oldest  |  < Older  |  Newer >  |  Newest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help