3,892 Posted Topics

Member Avatar for BestJewSinceJC

> For example, if I have an Animal named germanShephard, is there some way I could say > String gerSh = "germanShephard"; and then treat gerSh as if it was the equivalent of > saying germanShephard in my program? You can't because gerSh is now a String. The closest you …

Member Avatar for ~s.o.s~
0
199
Member Avatar for crono5788

I agree with the OP there; Ruby is much more than just another web development language. It falls in the same league as Python, Perl and the other scripting languages out there. Moving it to the Software Development Category would be a good decision.

Member Avatar for ~s.o.s~
0
148
Member Avatar for OmniX

It can be done using HTML only; just use the `size' attribute of the SELECT element.

Member Avatar for OmniX
0
112
Member Avatar for IMtheBESTatJAVA

> If anyone can do this I will spam +rep on your for the remainder of your DaniWeb life Pity, you haven't got any left.

Member Avatar for peter_budo
-1
176
Member Avatar for rickya100

Use the Error Console feature of Firefox to track down Javascript errors. Use the Firebug extension of Firefox for debugging Javascript application. Also don't search for parent elements of node, just use the parentNode property of the Node.

Member Avatar for rickya100
0
153
Member Avatar for adaykin

The simplest way would be to use the [URL="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collections.html#shuffle(java.util.List)"]Collections#shuffle(List<?> list)[/URL] method which delivers decent performance and output. If you have an assignment to create such a shuffling algorithm, then look at the source code of the Collections class for hints.

Member Avatar for adaykin
0
3K
Member Avatar for The Dude

> makes me wonder if they somehow cheated Yes, sort of. Inserting a few records in the database ain't that tough. ;-)

Member Avatar for The Dude
2
220
Member Avatar for gangsta1903

[QUOTE=gangsta1903;733171]As far as I know, exceptions that are not subclasses of runtime exception or error should be caught (handled). When a file exception occurs, it should be caught because its a subclass of exception class, but how can it be recovered? If file is not found,it sounds silly to recover …

Member Avatar for gangsta1903
0
102
Member Avatar for cmills83
Member Avatar for Ancient Dragon

> In a few years that won't be a joke. And we would have a band of outlaws who would be completely against this. Good setting for an anime, can't wait for this one... ;-)

Member Avatar for Alex Edwards
1
211
Member Avatar for kahaj

No, both your usages of isNaN won't work since they would also work for input such as "3E3". A better way would be to make sure that your form field only contains dots and digits. Also in both the cases, there is an implicit conversion from Javscript String object to …

Member Avatar for TnWbDzgnr1996
0
158
Member Avatar for LAPIII

Apache Tomcat is the most mature and stable servlet container out there used in a lot of production deployments. There are a lot of Tomcat resources out there and all Servlet / JSP books out there use Tomcat to showcase their examples.

Member Avatar for ~s.o.s~
0
150
Member Avatar for OreWaChoOtakuDa

For anyone out there who wants to have a nice dinner with a hot chick and that too for free: - Ask a chick out for a date in a four/five star hotel. (preferably one who doesn't know where you live) - Take her to a hotel far away from …

Member Avatar for Kokimail
0
1K
Member Avatar for joshmo

Don't create multiple threads for the same problem if you don't intend on reading the replies given in your previous threads. In [URL="http://www.daniweb.com/forums/post721873.html#post721873"]this [/URL]thread, you were given a thorough explanation of how arrays work; if you still don't get it then maybe this assignment is too tough for you.

Member Avatar for joshmo
0
377
Member Avatar for antaryami

..or use EJB's to simplify your task. For each of the two applications, create an equivalent local Home and Remote interfaces and you are good to go. Incase you don't know EJB's, try out the alternative suggested to you by Masijade.

Member Avatar for stephen84s
0
223
Member Avatar for bobocqu

Don't override [ICODE]service[/ICODE]; just override the method which you want to support and accordingly override the [ICODE]doGet()[/ICODE] or [ICODE]doPost()[/ICODE] method. The `action' attribute of the [ICODE]FORM [/ICODE]tag is mandatory. You don't need to use Javascript, just use the action attribute of [ICODE]FORM [/ICODE]tag with a normal submit button. Also there …

Member Avatar for bobocqu
0
505
Member Avatar for jazza_hayward

[ICODE]return[/ICODE] in looping constructs is considered conditional and hence the given compiler error. The compiler acts pretty much as a pessimist here and assumes the loop will never be entered unless the condition includes only literals. [code] // Won't work public int doIt() { final int min = 0; final …

Member Avatar for bobocqu
0
126
Member Avatar for gowrishg

> Is it possible to establish a jdbc connection within the jar. > The jar I will be using has the database file. Just reference the file inside your jar [in your case required for a standalone database like SQLite] like any other resource. Read [URL="http://www.cejug.org/display/~htmfilho/How+a+jar+file+application+can+access+files+in+itself"]this[/URL].

Member Avatar for peter_budo
0
87
Member Avatar for tonief

> and the meaning of this is that in this case we must call the base constructor with super() > but my question is how in th first class CounterDemo extends Counteexample we do not > need super(); In case you don't provide a constructor for your class, the compiler …

Member Avatar for tonief
0
452
Member Avatar for britto

> This should be an easy project You have seriously got to be joking... > Also executing packaged-classes might be a bit tricky. Take a look at how Ant handles such things.

Member Avatar for stultuske
0
167
Member Avatar for MrDiaz

> Hello, I'd like to create a function _______________________^^^^^ Method would be the correct terminology here. > that accepts two objects and compares properties between them. That largely depends on the type of those properties. If they are primitives, the comparison operator will do the job. If they are reference …

Member Avatar for MrDiaz
0
116
Member Avatar for vladdy191

> I'm trying to read in a text file character by character. However, when I try to read it in it > using the readChar method in DataInputStream it gives me a IOException. Heres what I > have so far You are using a wrong approach IMO. Even though you …

Member Avatar for destin
0
446
Member Avatar for jobojo

The script in case of a SCRIPT element may be defined inside the contents of the SCRIPT element or in an external file. The only difference here is that an additional request is made in the case of an external script file. Hence you can treat your script as though …

Member Avatar for jobojo
0
310
Member Avatar for smilyswapna10

Attach a function to the onclick and onfocus event handlers which would do something like this: [code=javascript] function focusChild() { if(my_window) my_window.focus(); }[/code] Here my_window is a global variable which holds the reference to the newly created popup window. It follows that as long as the child window is alive …

Member Avatar for demudubabu
-1
5K
Member Avatar for DeadJustice

I guess this is because your last two Readers end up using the same underlying stream to read from the source; here [icode]file[/icode]. Because of this, when the third [ICODE]BufferedReader [/ICODE]finishes, the end of stream has already being reached for the [icode]file[/icode] and further reading obviously returns [icode]null[/icode]. Either create …

Member Avatar for DeadJustice
0
106
Member Avatar for dipsn
Member Avatar for destin
0
74
Member Avatar for tanha

> 1. Should we use any FrameWorks ? if yes. which one is better and simpe ? Yes, using one of the Frameworks out there would be far better a choice, no point in reinventing the wheel as long as you know what goes behind the scenes. I have worked …

Member Avatar for abheinav
0
113
Member Avatar for complexcodes

@stephen84s To exclude a piece of text as being interpreted as BBCode, use the `noparse` tag. With the use of noparse, you can write something along the lines of `[noparse][code=java]your code here[/code][/noparse]` and be sure it won't be interpreted by the BBCode parser of vBulletin.

Member Avatar for BestJewSinceJC
0
573
Member Avatar for Salem

I guess the same is with `IT Professionals'. ;-) I still wonder how many of the regular posters here code for a living; but maybe that's a question which demands its own thread.

Member Avatar for GrimJack
0
110
Member Avatar for new_2_java

Two reasons come to mind: - A rogue implementation which manifests itself as the number of documents to be transferred increases. Profile the application thoroughly looking for memory leaks and unintentional object retention. - The default heap size doesn't suit well for your current processing needs. Tune your JVM by …

Member Avatar for ~s.o.s~
0
139
Member Avatar for Chaster

You don't need `session' to display the request parameters; just use [ICODE]request.getParameter("parameterName")[/ICODE] inside your servlets' [ICODE]doGet[/ICODE]/[ICODE]doPost [/ICODE]and you should be good to go. BTW, you can get a reference to the `session' using the [ICODE]HttpServletRequest[/ICODE]; read the API docs.

Member Avatar for ~s.o.s~
0
105
Member Avatar for Gaspacho

If possible, set up a version control system so that at every point in time the entire team has a view of the functionality currently existing in the system. Follow good J2EE practices by making use of JSTL instead of using scriptlets so that you don't end up creating messy …

Member Avatar for ~s.o.s~
0
120
Member Avatar for zanzo

> here it is impossible to add variables to the url and success Why is it impossible? What prevents you from creating a URL of the form [icode]http://somesite.net/en/page?name=somename&age=someage[/icode]? Anyways, if the operation involves POSTing data rather than GETting it, consider using POST requests rather than GET ones when making asynchronous …

Member Avatar for zanzo
0
110
Member Avatar for regent_royal

Look into the DOM methods [ICODE]createElement [/ICODE]and [ICODE]createTextNode [/ICODE](a simple google search should give you a lot of food for thought).

Member Avatar for ~s.o.s~
0
242
Member Avatar for carlcarman

> use a for loop for a known size Not necessary; while loops can be completely avoided. A `for' loop can easily replace a `while' and `do while' looping constructs.[code] // while equivalent String line = null; for( ; (line = reader.readLine()) != null; ) { // process the line …

Member Avatar for ~s.o.s~
0
101
Member Avatar for ZZucker

> "Why do they sterilize the needles for lethal injections?" How many lethal injection sessions have you witnessed to state that with conviction? > If electricity comes from electrons, does morality come from morons? No, morals. > "If Wile E. Coyote had enough money to buy all that ACME crap, …

Member Avatar for Lardmeister
0
1K
Member Avatar for codered152
Re: list

> can somebody give me some good example of how to iterate over list, Just use an [ICODE]Iterator[/ICODE]/[ICODE]ListIterator [/ICODE]for iterating over a List in a implementation agnostic manner. Iterators have the benefit of being able to allow you to add / remove an element without any additional effort. Using a …

Member Avatar for ~s.o.s~
0
100
Member Avatar for ming97

Dear Ming, We are also very much interested in helping you study Java programming, but we strongly feel that handing out source code hinders the learning process. We recommend you start something and come back again to this message board once you are stuck. If you still feel that grabbing …

Member Avatar for ~s.o.s~
0
101
Member Avatar for No1unoin98

> I would really appreciate it if anyone could help me as i understand most of the concepts of > java Are you sure? The line [icode] while (operationS != 'q') && (operationS != 'Q');[/icode] is choke full of syntactic errors. Make sure you concentrate on understanding the concepts rather …

Member Avatar for No1unoin98
0
93
Member Avatar for paul_1234

Don't use scriptlets; use JSP's only for view purposes. Use JSTL along with servlet. > whenever i retrieve that data in my jsp page, it only shows this > Ljava.lang.String@123EGa something similar to this.. This is because you are trying to print a [ICODE]String [/ICODE]array and the above just happens …

Member Avatar for ~s.o.s~
0
110
Member Avatar for Grub

>The problem is, I am not the author of the original and as such have not clue as to what > methods the classes have and in which class. Then how do you propose on adding additional functionality as mentioned in your first post?

Member Avatar for Grub
0
125
Member Avatar for Alex Edwards

> Don't be shy! Share some information for my Survey! %_% OK, here is an interesting fact for your survey; I don't have a credit card. :-)

Member Avatar for Alex Edwards
0
158
Member Avatar for Achupa

Whenever in need of a sane string representation of your instance, override the [ICODE]toString()[/ICODE] method for the given class. This makes sure that each class is responsible for giving out its own representation without having to write the same temporary code again and again. For pretty printing arrays, convert them …

Member Avatar for ~s.o.s~
0
132
Member Avatar for ZZucker

...struggling to keep a straight face after reading all those; priceless. :-)

Member Avatar for sneekula
0
83
Member Avatar for ranam

> If this means anything to anyone here I think it will be a small miracle. IMO, it isn't that difficult given the keywords in that post; most probably an assignment to create a simple compiler. *miracle*

Member Avatar for ~s.o.s~
0
114
Member Avatar for ming97

> You are using the value "X" in the .equals(Object) method which expects an Object as a > parameter. Huh? Firstly, the equals method is overridden in the String class. Secondly, if a method accepts an Object, you can pass any reference type to that method. The problem here is …

Member Avatar for darkagn
0
94
Member Avatar for brr

Use the [ICODE]tabindex [/ICODE]property supported by the [ICODE]A[/ICODE], [ICODE]AREA[/ICODE], [ICODE]BUTTON[/ICODE], [ICODE]SELECT[/ICODE], [ICODE]INPUT[/ICODE], [ICODE]OBJECT [/ICODE]and [ICODE]TEXTAREA [/ICODE]elements. BTW, this has got nothing to do with JSP or in fact any server side language; it's a pure markup question.

Member Avatar for ~s.o.s~
0
56
Member Avatar for mineko_panda

Your HTML document is not valid; it lacks a DOCTYPE. Also your question isn't very clear here. What kind of an help do you need since except for a few problems it pretty much looks OK. As for the formula, you would be the best person to come up with …

Member Avatar for mineko_panda
0
162
Member Avatar for joshmo

Post a compilable piece of code; what you posted isn't even remotely a valid Java program. In Java, multi-dimensional arrays are represented as array of array. This allows you to ignore the second dimension when defining a two dimensional array. Generically speaking, this concept allows you to ignore all the …

Member Avatar for ~s.o.s~
0
594
Member Avatar for AdventureX

[code] for(int number = 10; number >= 0; --number) { oRocket.countDown(number); }[/code] No? But this seems to be logically wrong since the `driver' class shouldn't be the one performing the countdown; the rocket instance should be provided with a default counter which would be decremented and the rocket would take …

Member Avatar for ~s.o.s~
0
90

The End.