3,892 Posted Topics
...and don't let anyone convince you otherwise; we have got [URL="http://67.19.222.106/humor/graphics/idiots.jpg"]prooof[/URL] [sic]. ;-) | |
Re: No, at least not when using the standard library because in *nix, the creation time isn't stored anywhere. If you are running on a windows box, you have two options: - spawn a shell process which fires the command 'dir /a' and extract the creation time [easiest] - Use JNI, … | |
Re: In Java, everything is passed by value; in case of primitive types, a copy of the value is created and then passed as an argument to the method invoked.[code] private void mutateItNot(int v) { v = 10; // no effect on the original integer value // this `v' is just … | |
Re: One of the important things you should know as a Java developer is to find the classes in the standard library which contain the functionality you desire. As an example, since you need to operate on Strings and need to generate a char array, looking into the documentation of [ICODE]String … | |
Re: > Thread.getThread().sleep(3000); //Pause for 3 s [icode]Thread.currentThread().sleep(3000);[/icode] | |
Re: Tsk tsk, let's not get into unproductive discussion here. I am pretty sure you both understand that there is no point in nitpicking each others' post to the point that it turns into name calling. | |
Re: Terms like efficiency make little sense when used in an absolute context. For finding the most efficient way to solve a problem you first need to track down your applications' usage pattern i.e. what kind of file reading does your application need? Is the data read promptly consumed or is … | |
Re: I felt a bump was in order for this one... > Unfortunately, the implementation of ArrayList<T> looks > [something] like this-- Doesn't seem unfortunate to me; as long as the state is persisted and can be recovered from the flattened representation of the object, it doesn't matter which approach is … | |
Re: > XMLHttpRequestObject = new ActiveXObject(“Microsoft.XMLHTTP”); If this is how your code looks in your Text Editor / IDE, you need to change the special character ” to double quotes ("). Avoid copy / pasting the code from your ebook into the editor since it might introduce such special characters. A … | |
Re: [URL="http://www.codeblocks.org/downloads.shtml"]Code blocks IDE[/URL] [URL="http://msdn.microsoft.com/vstudio/express/visualc/"]Microsoft Visual Studio Express Edition[/URL] | |
Re: Since a 2D char array is nothing but an array of char arrays, you can convert the char array to a String using [ICODE]String.valueOf()[/ICODE] and write it out to a file using [ICODE]PrintWriter[/ICODE]. When reading in data, just read in lines of data and recreate your 2d char array using … | |
Re: > Eric Cartman is my hero.. I want to be just like him. Then you must be really a dangerous guy to know and make friends with. Yes, he really is special, he is the most demented person I have ever seen on my TV screen. :-) | |
Re: AFAICT, when in search for a blogging service, people normally look for the ones which provide complete freedom in terms of blog posts. They might have blog posts related to their day to day happenings or on technical topics. Since Daniweb blogs, AFAIK, don't allow non-technical content and people normally … | |
Re: [QUOTE=jobojo;744856]I was wondering if someone could explain to me how to merge two arrays so that one is not simply appended to the other, but they need to be merged into one sorted array. I could simply append the two arrays and then sort the result, but that would be … | |
Re: Some points: • You need to tell us a bit more than the normal "this doesn't work" thing. What do you mean when you are not able to generate unique numbers? Is the array not filled completely or the numbers are getting repeated. • You need to break out of … | |
Re: > What is it supposed to mean by " sort, by hand, the folllowing > array... using a)merge sort b)quicksort [url]http://www.iti.fh-flensburg.de/lang/algorithmen/sortieren/[/url] | |
Re: Vector and hence Stack are legacy/by default thread safe classes. Consider using ArrayList and LinkedList in lieu of the above mentioned classes. And as for your problem, replace:[code] Vector<String> temp= new Vector<String>(); temp =vVariables; variables.push(temp);[/code] with[code] variables.push(new Vector<String>(vVariables));[/code] In your code, you create a new Vector instance referenced by `temp' … | |
Re: No l33t speak and use of code tags on the very first post; this has given me happiness indeed. Anyways, the problem with your approach is that you attempt to read in `int' from the file but don't test for it i.e. instead of [ICODE]fileRead.hasNext()[/ICODE] test for [ICODE]fileRead.hasNextInt()[/ICODE]. Also, your … | |
Re: *Not working* is not a very helpful description of the problem. You should try debugging your script and inspecting variables to see if they are causing a problem. Use the Microsoft Script Debugger if using IE and Firebug if using Firefox. Also, onclick works: [code] <!DOCTYPE html PUBLIC "-//W3C//DTD HTML … | |
Re: Yes there are better ways of editing data at a random position; look into RandomAccessFile, though things can get complicated pretty soon. | |
Re: > ['Code=Java] > //yourCodeHere > ['/Code] Use the [noparse][noparse][/noparse][/noparse] tag for writing out tags without interpreting them. E.g.: [noparse][noparse][code=java]code-here[/code][/noparse][/noparse] | |
Re: > "Device busy" Most probably this means that the device is still in use i.e. all the communication channels opened to the device have not been properly closed. In case you are playing around with streams obtained obtained from the port, you should try closing them. But then again, this … | |
Re: Pretty simple: - Create a minimalistic HTML document - Attach a handler to the onclick event listener which performs all the work - Make a asynchronous call [using XHR or XMLHttpRequest object] to the server - Retrieve the data in case the request is successful and show it to the … | |
Re: Use a Firefox addon, Firebug, to debug your Javascript applications. Move the semicolon separated statements in the onclick handler of the INPUT element to a separate function for easier debugging. | |
Re: Like it has been already suggested, keep pushing the items in a Set until the size of the set is 25 [since you are attempting to fill a 5 x 5 array]. Since a Set rejects duplicate elements, the only time the size of a Set will be 25 is … | |
| |
Re: > I have tried reading: Struts 2 In Action, but I wasn't very thrilled > about it Reading anyways isn't as thrilling as getting your hands dirty with the real stuff. Try some sample projects you can think of when learning Struts and practice as you read. The online documentation … | |
Re: [QUOTE=mahaboob Basha;743422]Hi i created one jsp form with 2 fields..now in the first servlet i want check whether those 2 fields values are presented in the Database or not..if not then i want move those values to another servlet .. how can i do this?how to get the values (parameter … | |
Re: [URL="http://www.ibm.com/developerworks/java/library/j-jstl0415/"]JSTL and fmt tags.[/URL] | |
Re: [QUOTE=stephen84s;744523]Honestly I do not see anything of JSP in your page, just Javascript. And following is what you can use to encode your field [code=javascript] var encoded_data = escape("<string_data_to_encode>"); [/code][/QUOTE] The [ICODE]escape [/ICODE]/ [ICODE]unescape [/ICODE]functions have been deprecated since they don't work well with non-ASCII characters. Use [ICODE]encodeURI [/ICODE]/ [ICODE]encodeURIComponent[/ICODE]. | |
Re: > the method I need is:public static Person binarySearch(Person[] > people, String target) Is this a school assignment for implementing binary search? If not, then use the binarySearch method of the Arrays class. And you don't need another method; what you need is just an instanceof check along with an … | |
Re: [QUOTE=javaAddict;743482] [CODE] String s1="a"; String s2="a"; //2 Different objects. (s1==s2) //false (s1.equals(s2)) //true [/CODE][/QUOTE] Think again; hint: String pool. | |
Re: [QUOTE=eve.olambo;738559]develop a simple application that when run welcomes the users and tells them the name of the last person to run the application, this information should be retrieved from a file. Use the Class Loader and Properties classes to load the file[/QUOTE] Aye aye Captain! | |
I just couldn't wait to share this masterpiece with you; [URL="http://www.itcontractor.com/Articles_IR35_News_Advice/view_article.asp?id_no=4842"]The IT Contract from Hell[/URL] Hope it makes you all go LOL! ;-) | |
Re: [QUOTE=123468743867143;724115]One tiny question do you think exchanging %20 with dashes help with SEO? Have a fantastic day.[/QUOTE] Most of the search engines out there treat dashes as spaces when indexing sites/urls. Hence a search for "order of phoenix" might just show you [url]http://somesite.com/order-of-phoenix[/url] but not [url]http://someothersite.com/order_of_phoenix[/url] That being said, I … | |
Re: [url]http://www.mredkj.com/tutorials/tableaddrow.html[/url] Please consider using a search engine before posting such obvious queries. | |
Re: There is no reliable/standard way of detecting a browser close event. Though there are non-supported workarounds, a browser close event is not something you should rely on. Anyways, here is a snippet which seems to be working fine on IE. If you are new to Ajax, I recommend using the … | |
Re: [QUOTE=jwaldron82;737269][B[B][/B]]I just joined this site and I notice that most of the questions asked by members are either viewed alot and left unanswered or answered by one or two persons. So I'm just wondering are these questions a little bit too complicated for some people to answer of are everyone … | |
Re: > But I don't want to place all the content into the JSP page. > This should load the targeting content stored in another JSP file (not simple XML) The above two lines are contradictory; you still end up placing the content if your JSP file. > I also know … | |
Re: Enough of this name calling already, please. It has been observed that many of the Geek's Lounge threads on debatable topics like Politics are taking a nasty turn which comes in the form of name calling, giving out negative reputation etc. Let's keep this discussion a healthy one which everyone … | |
Re: [QUOTE=sillyboy;735535]Just wondering why remember me is checked by default. I usually don't want it ticked and generally I think sites have it un-ticked. It's only 1 click of the mouse and so its definitely no bid deal, just something I notice :)[/QUOTE] If using Firefox, just throw in a trivial … | |
Re: You need to set the JBOSS_CLASSPATH system property. Read the JBoss manual along with the contents of run.bat for more instructions. Also, if these classes are required by your application, consider putting them in the applications' classpath instead. Read the JBoss application deployment guide for more details. In case of … | |
Re: > Now I wish to cut out the middle man (xml) and refer straight to the database. You can't, that's the entire point in choosing a data interchange format for the interface exposed. You can cut down the fat by choosing alternate formats like the very primitive comma separated values … | |
Re: Congratulations on using: - Code tags for your first post. - [ICODE]int main(void)[/ICODE] instead of the usual [ICODE]void main()[/ICODE] for your first post. You have a bright future ahead! :-) Anyways, your problem is a rogue semi-colon sitting at the end of your [ICODE]while [/ICODE]construct. Remove it and surround your … | |
Re: You need to control the form submission based on the result of the validation. [code] <form name="frm" id="frm" action="action.jsp" onsubmit="return validate(this);"> <!-- form elements go here --> </form>[/code] where [ICODE]validate [/ICODE]returns a [ICODE]true [/ICODE]or [ICODE]false [/ICODE]depending on the outcome of the validation. | |
Re: > I doubt its that complicated, probably a few lines of code. I doubt it is simple given that the method is Unicode aware hence would involve a lot of Unicode jargon like code points, planes etc. If you are interested, you can take a peek at the source code … | |
Re: > How do I call the three different values entered and output them to the screen in the file > test.jsp? Don't process form data in JSP's which are meant for view purposes; use a servlet instead which would then delegate the responsibility to a JSP. |
The End.