@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4



Comments:

<0> if you still didnt get it, then may be someone else here can help you:) iam out.
<1> so it will read the list or only stop at the first one
<2> Hey xtra
<2> LLyric, Clackwell :-)
<0> hello thunder.dk
<1> hmm i really don't understand why it cannot find it
<1> it return null all the time
<0> return value is int, yet it returns null for you??
<1> yes... well i'm trying to search for a String in a object, so i have some difficulties converting the String to an object hehe
<2> Hey talios :-)
<3> mornin
<4> Toaster_: umm, a String *is* an object, surely?
<3> smsie, yes it is.
<3> I guess I missed the start of the conversation thou
<3> 'lo Bryin



<5> morning talios
<5> (Toaster_): yes... well i'm trying to search for a String in a object, so i have some difficulties converting the String to an object hehe
<4> the statement makes no sense to me
<4> I was hping for clarification :)
<1> well
<3> smsie, i'm lost on it as well ;p
<1> i have an ArrayList, with 9 elements in it. So i want to search in it, for a particular value. To do that i need to convert the String to another Type of object
<1> argh i don't know how to explain that
<3> are each of those 9 elements String's?
<1> no they are all type object "Tools"
<4> Toaster_: and what is a Tool? Does Tool have a equals method?
<3> and have no toString() method? or no properties you want to check? i.e. tool.getMethod().equals(searchString)?
<1> yes i have a toString method
<4> anArrayList.indexOf(someObject); calls someObject.equals() against each of the members of the arraylist in turn
<6> you know, I must say. I -like- Access.
<3> wlfshmn, heathen
<1> talios: why do i need an toString methode, because the value i want to search in the element is aready aString that i have to Read into a String
<6> talios: It's just so darn comfortable to draw database relationships in ;)
<4> wlfshmn: I agree...I find access an *excellent* design tool. Wouldn't use it for real *work*, but it's very handy for designing stuff fast :)
<3> Toaster_, you don't need one - but its handy. either way - you'd iterate the list of elements, checking each Tool matched what you want to search for?
<6> smsie: precisly. I keep a model of sorts in there but I wouldn't use it as a -database-
<6> smsie: although, we do at work agaisnt better judgement
<4> wlfshmn: at my work, the lusers are m***ively fond of using Excel as a database. Against that I'll even encourage them to use Access :)
<1> talios : this is the part i don't know how to do that... do i need a while or for to search in the list of element?
<6> smsie: doctors will be doctors ;)
<3> Toaster_, read the Collections tutorial - has all you need to know - http://java.sun.com/docs/books/tutorial/collections/index.html
<4> wlfshmn: yeah yeah. The *doctors* I can handle (most of them recognise that they don't tell me about writing code and I don't tell them how to do multiple heart byp*** surgery or whatever. It's the finance people I have the horrors with
<1> talios: check your priv msg
<6> smsie: hmm. OOo Base seems to be almost as usefull for prototyping
<6> smsie: mostly because it appears to be a feature-byfeature replica of Access though ;)
<4> wlfshmn: I only looked at it for about 3 minutes. Once I worked out it stored the data in xml I ran away screaming (maybe that was only in the betas though...)
<6> smsie: no, the database structure here is some near-xml format
<4> wlfshmn: ah. I need something somewhat larger...xml is just too high an overhead. 'orrible seems to be the thing in work (it being freee)
<6> smsie: as I said though, I'm only looking for something ot provide a graphical representation of the database model
<4> wlfshmn: I didn't look into how it does that much. I use Access for that :)
<6> smsie: supposed to unconfuse me a bit, thats all, and a free tool is nicer than a commercial one, if it gets the same job done
<4> or Business Objects (although I don't realy like that)
<6> smsie: the OOo document is also a 20th the size of Access ;)
<4> wlfshmn: well, yeah. Nobody accused access of being efficient I guess
<6> smsie: it would be more relevant to check size with data in there I suppose, but oh well
<6> smsie: I'm mostly trying to figure out the proper place for things and proper relationships
<4> wlfshmn: yeah, that's what I use access for mostly. Sketch a design together quickly, tell access to normalise it for me, fix the screwups it makes and then deploy on a real platform
<6> smsie: I'm converting this lot into hibernate annotations anyway
<4> wlfshmn: that's the thing rhowe is always raving about. I must have a proper look at it someday
<6> smsie: I like it. a lot. ;)
<6> smsie: anything that means I write less SQL is good in my book ;)
<4> I'll take a look at it...someday :)
<4> wlfshmn: oh, I don't write SQL...I have 'people' who do that for me :)
<6> smsie: you have seen my queries. I have a hate-hate relationship with SQL ;)
<6> smsie: I don't eaither really. I write code that does it for me.
<7> Hello, can anyone tell me if there's a method/Cl*** method that validates a character to know if it's a number or a char ?
<6> smsie: the problem is making the code write sql that actually -works- ;)
<4> wlfshmn: and if I *do* need to write SQL, that's where Access comes in again. Drag and drop the query you want, then cut and paste it into sql-commander or wherever :)
<7> Instead of doing if(c != 0 && c != 1....).
<4> dom^: Character.isDigit(someChar);
<7> Thank you smsie.
<7> Is there one for positiv number?
<4> dom^: no. You have to change it to a number and test that: if (Character.getNumericValue(someChar) >= 0) { // it's positive }
<7> getNumericValue(someChar) is the same as Integer.parseInt(someChar) ?
<4> well, methods in different cl***es, but they do the same thing, yes
<4> oh



<4> it doesn't
<4> ignore me...use the Integer method
<7> Okay but does it throw an exception if someChar can't be converted into number ?
<4> hang on
<7> ok ok
<4> I'm on crack
<4> let me start again
<7> lol
<4> a char is a *single* character
<7> yes
<4> how the HELL can a single character be anything *but* positive if it's a number?
<7> You're damn true lol i'm bad sorry.
<4> Character.getNumericValue() returns a negative number (-1 or -2 depending) if it can't be converted. Look at the api docs for Character
<8> I'm here exclusively to help
<8> so ask me anything
<4> what's the unladen airspeed of a swallow?
<8> depends on the girl's experience
<6> smsie: african or american swallow?
<6> err, s/american/european/
<8> no java questions^
<8> ?
<4> wlfshmn: :)
<4> kinematix: yeah. What fool decided to NOT have a goto? :)
<8> well there are tons of gotos
<8> it's juste a name
<6> sure. why do my hibernate onetomany mappings produce an extra keyfield in the source table?
<8> ***embly code is composed of many gotos
<8> wlfshmn: I can help you with that
<4> no, it's composed of jumps
<4> not the same thing
<6> nah, not a single goto. lots and lots og JMPS ;)
<6> smsie: well, there unconditional branch is pretty darn close to a goto ;)
<8> wlfshmn: what you call the source table, is the "one" end ?
<4> there's no unconditional "go here" construct in java
<6> kinematix: yeah, it's the "one" table
<4> wlfshmn: yeah, I know. You use a labelled break which does the same thing. It's not the same though :)
<8> you should only have columsn in the "many" table
<8> what's the column name that is generated?
<6> keyname_keyname
<8> you are generating the script with SchemaExport ?
<6> hang on I'll check, but I think without the key field defined the other sides manytoone mapping won't be successfull.
<8> there are absolutely no reason to have a column in the source table, only in the target table, do yo have the generated column in the target table, at least
<6> kinematix: yeah, i am using the hbm2ddl stuff
<8> wlfshmn: ok, so you have a one-to-many, and a many-to-one
<8> it's a bidirectional relation right ? (declared in your mappings, reflected in your OO code)
<8> (coz in relational, any relation is bidirectional)
<8> I really don't see the point, are you sure you didn't forget something else in the mapping files
<8> elsewhere
<6> kinematix: I'm quite certain I'm confused ;)
<6> kinematix: and indeed, I've probably fogotten something in there, I'm playing with several thing I don't know jack about at once for the heck of it ;)
<8> I can help you with hibernate
<8> even for advanced subject
<8> I<ve been working with it for 2 years now, I ***isted a cl*** in NYC given by gavin king
<8> I would be really happy to help you, and we should discuss a bit
<8> I should understand your project better to make sure you do the right design decisions
<6> part of my problem is that I never got to learn proper database design, I was just tossed in the middle of a project using an existing one and forced to learn form there
<8> for example, if you want to perform m***ive inserts (batches) and you choose to use a native ID generator (generated by the database) you won<t be able to use batching
<6> anyway, let's simplify the problem
<4> best way to learn
<8> because hibernate relys on the Domain Model Enterprise Application Design pattern and it requires it to have the id in the object as soon as you call session.save
<6> I have two tables, one named 'item' and one named 'price'. an item can have multiple prices, since it maintains a price history
<8> normally, calling session.save simply add the objet to the batch, and the batch is executed upon session.flush (tx.commit does call session.flush )
<8> are you using xml mapping files or annotations ^
<6> kinematix: I'm not that far along on this project that I'm actually running the -code- yet. first things first ;)
<8> ?
<6> kinematix: annotations
<8> ok
<8> you should drop all the fields that are not necessary yet
<8> and we should both concentrate on the relation you are attempting to describe
<6> on the 'item' cl***, i've defined a List<Price>, and a getter, annoted as @OneToMany(mappedBy = "itemKey");@OrderBy("createdAt")
<6> this mapping seems to work fine and produced no unexpected side effects that I can see
<6> both the tables have itemKey defined, and 'price' also has a 'priceKey' for it's own identity
<6> now then that I one the 'price' cl*** define Item item;, annoted simply as @ManyToOne, I get an extra keyfield called item_itemKey in 'price'
<6> smsie: and yes, I like learning from within an existing project, but sometimes it means you end up with an incomplete or patch knowledge of some subjects


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #java
or
Go to some related logs:

alsamixer: function snd_ctl_open failed for default: No such file or directory f
#AllNiteCafe
which chinese region is nicknamed the roof on the world
Lagu Rosa
#london
str_time C++
Libertine undernet
xml descendants internal method
#javascript
#gentoo



Home  |  disclaimer  |  contact  |  submit quotes