Top.Mail.Ru
May 12th, 2004 - Java developers — LiveJournal
? ?

Java developers

May 12th, 2004
Image

09:02 am - Imagealistairg

Hey guys, another irritating question:

Is there any way you can get StringTokenizer to ignore commas inside quotation marks?

I have a file with values seperated by commas, but there are also commas inside the values (which are inclosed in double qoutes)

an example of the file is this:

@property{
photo = "6.jpg",
location = "Sweetbrier Lane",
type = "detached house",
parking = "garage",
bedrooms = "4",
heating = "gas",
rooms = "20ft lounge, dining room, breakfast room, cloakroom, study",
gardens = "lovely",
price = "oiro 300000",
also = "galleried landing"
}

@property
{
location = "Bow", price = "139950", type = "link house",
bedrooms = "2", heating = "oil", parking = "for 2 cars",
also = "double glazing", photo = "18.jpg"
}

I had the file parsing fine until the properties without line breaks, so I tried splitting them using the commas, but it was also splitting the variables apart.
Image

04:28 pm - Imagekorgan - quick, simple question

hey all

im not new to java or anything
but i am, unfortunately, a bit rusty on it
not to mention the fact
that im running on very little sleep right now
so my brain isnt exactly working right

anyway... to my question

all im trying to figure out
is how to generate a simple random number
anywhere between zero and 1000

i looked in the java documentation
but all i found was a Math.random() method
that says it generates a number between zero and one

not exactly what im looking for...




so yeah...
any help would be greatly appreciated

im sure its a real simple problem, for you guys, anyhow :)
Image

06:05 pm - Imageicey - The Concept of Double Buffering

We're doing a graphics project in Comp Sci and i was wondering how I implement Double Buffering in an application (i dun wanna do an applet). I understand the concept of drawing the off screen image and then flipping it to the one screen image by updating or whatever... but how do I implement all of this into my source code? code for double buffer babyCollapse )
Powered by LiveJournal.com
Image