3,892 Posted Topics
Re: I do get to see a couple of new faces in the Daniweb IRC channel these days, so I guess the efforts are kinda paying off. :-) > I got kicked.. Plus the bot is crappy(because I say so). Swearing / use of cuss words is not allowed in the … | |
Re: > but it seems to work with a "real" file system on a "client side". I'm not really sure what you mean by a `real' file system; the File class provides an `abstract filesystem independent view' of the path names i.e. your File object does *not* map to a real … | |
Re: > Are you going to edit my post or not? As per the site rules, no. Locked. | |
Re: > When I run my servlet in my web browser, everything runs fine ... > until i press one of the option buttons, Deposit, Withdraw or > Balance, then i get the following error: This is because HTML doesn't know anything about your servlet project. Is the name of your … | |
Re: An option of 'both of them' is missing so I would assume that by keeping 'none of them' you mean 'neither this nor that but the best'. So I would go with 'none of them'. :) | |
Re: Use of StringTokennizer and Vector isn't recommended; use String.split and ArrayList as their alternatives. What do you mean by "extract file into columns"? You can represent the entire file in-memory as a list of lists or a list of objects of your custom class where each object would represent one … | |
Re: > Is the best way to do this using a Trie? Judging by its description, it does seem to be a good way of doing things, better than regular expressions at least when used over a large data set. A simple program to get the ball rolling:[code] package net.sos.playground; import … | |
Re: A simple way would be to remove all opening brackets "(" in your String and then split on ")," to get the desired result. Another way would be to use the Pattern and Matcher object to do the same job.[code] Pattern p = Pattern.compile("\\(([^)]+)\\)"); Matcher m = p.matcher(s); while(m.find()) { … | |
Re: Duplicate thread; closed. Refer the above post for the original version. | |
Re: Converting a String like "12" to an integer shouldn't be a problem; just make sure you trim() your strings before parsing them. By the looks of your stacktrace, it seems that your program is trying to parse an integer out of the string ""0 8 02 22 97 38 15 … | |
Re: You would need a third party API to achieve since standard C/C++ doesn't cater to GUI requirements of the programmer like modern languages. [URL="http://www.wxwidgets.org/"]wxWidgets[/URL] and [URL="http://www.gtk.org/"]GTK+[/URL] are a few famous names you get to hear. | |
Re: > When will ad makers realize that their stupid tricks intended to ruin > attempts to navigate make people mad at the sponsors? Probably never since everyone who surfs the web is not as er... smart as you. You have two choices: - Get some addons installed so that this … | |
Re: > My conclusion was perhaps a hashtable Doesn't seem logical since there are no "key => value" semantics here, just data which could be stuffed in a hash map. The solution here would be to let the DAO layer handle the querying of data, the controller handle the merging of … | |
Re: > The Java API can easily put you in that situation, for example if you > are using the Scanner class to parse user input then nextInt() > throws InputMismatchException if the user has mis-typed The onus lies on the code which uses exceptions to do business processing rather than … | |
Re: The application looks good as such. Hope you get the summer placement in your company. Best of luck. :-) | |
Re: Guess I'm late for the party but a simpler way of doing it would be: [code=ruby] require 'fileutils' FileUtils.copy_file(ARGV[0], ARGV[1])[/code] | |
Re: Write the primitive data [long data in your case] using DataOutputStream and read the same if required using DataInputStream. | |
Re: Look into the [URL="http://java.sun.com/j2se/1.3/docs/guide/jdbc/spec2/jdbc2.1.frame6.html"]batch execution capabilities[/URL] of JDBC. | |
Re: BTW, consider using prepared statements / parameterized queries instead of creating queries on fly using string concatenation to avoid SQL Injection. | |
Re: > Why do some of the "similar threads" listings under this post box > point to threads from 5 years ago? Because it says "similar threads" and not "recent similar threads"... > Did you not read my post? I have no permission to install > anything. AFAIK, if you already … | |
Re: A small program to get you started: [code=java] import java.io.*; public class Test { public static void main(String[] args) { try { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String userInput = in.readLine(); System.out.println("\n\nUser entered -> " + userInput); } catch(IOException e) { System.out.println("IOException has been caught"); } } }[/code] | |
Re: > want to learn JNI , please suggest me some basic guide. If you are doing it for fun, refer to the links posted above. But if you actually plan on writing a *real* application which requires interfacing with native code with the least possible fuss, try out some of … | |
Re: Walk towards town to kill some time before your house mate gets home. | |
Re: Does the server migration problem still exist since I can't seem to access Daniweb from my home most of the times? The request just times out. All other sites just work fine. | |
Re: > I am asking that you delete all of my postings You posted here when you were in a pinch, got others to help you out and now you want the time and effort put in by others to be "deleted" just like that? Sorry, it doesn't work that way. | |
Re: > So you would have to execute the command in this way : > javac HelloWorldApp the class loader would look for a file with that > name and a .class extension A typo maybe? It should be [I]java HelloWorldApp[/I] > Exception in thread "main" java.lang.noclassdef This question has been … | |
Re: > It's RegEx() NOT RegExe() It's `RegExp' not `RegEx'. | |
Re: > Or is this affection that I'm hungary? Don't turn this into a country thingy; reputation is a subjective concept so it can't be helped if someone thinks that your post was eligible for a bad one. But if you feel that someone is abusing the reputation system by repeatedly … | |
Re: > I really can't suss this one out, any help would be greatly > appreciated. A small example/project which demonstrates the problem at hand might help others in hacking on the issue. Without knowing the way you have organized your project, it would be difficult to come up with a … | |
Re: Maybe you are talking about an internet bot. They can be used for both malicious and normal purposes , so what exactly you thinking about :P Even google uses a Bot known as google bot to extract the detailed information from the website when you search for somthing in google. … | |
Re: Is this a web application or a desktop application? If it's a standalone desktop application, then consider using a serverless & embeddable database which is most suitable for replacing such ad-hoc file/folder storage. An embeddable database like SQLite uses a single file for storage which is *really* minimalistic. If it's … | |
Re: > Can we see how many guy(s) look at our profile? AFAIK, you can't. This feature is much more common with social networking sites than programming forums. Join one in case you are more interested in stalking those who stalk you. ;-) | |
Re: > i'm just wondering, "where's the love?" It's a bit complicated; you probably won't understand even if I told you so let's just leave it at that, KTHXBI. :-) | |
Re: > How about restricting the tutorial section for members with a > certain amount of (useful) posts and reputation Two points: [LIST] [*]useful is subjective term. [*](Reputation + Post count) =/= (measure of ones' technical expertise) [/LIST] Reviewing technical content is time consuming and can't be done by *anyone*. Heck, … | |
Re: The talk of vajinas[sic], strip clubs, mod infractions and tetris in a thread meant to *bring* Rashakil back does a bit of injustice to the "keep it on topic" and "daytime television" rules. Locked to preserve the sanity of the remaining Daniweb members. KTHXBI. | |
Re: Why not try something else which also supports "mouse" as you wanted: Here is list of some free compilers and IDE which you may find really good and programmer friendly: [URL]http://www.daniweb.com/techtalkforums/thread50370.html[/URL] Hope it helped, bye. | |
Re: Sorry, but message boards don't work that way. You can't delete a thread you created just because you managed to solve the problem and no longer need the thread. Imagine the chaos if everyone started requesting deletion of the threads they started... Please exercise caution next time when asking for … | |
Re: > if(w.blur)w.focus(); This checks the `blur' property of the window object and not if the window is having focus or not. Anyways, this isn't required, you can directly invoke the focus() function. > pageURL = (!pageURL) ? '' : pageURL; > imageURL = (!imgURL) ? '' : imgURL; > if(pageURL … | |
Re: AFAIK, no. But is there any reason why someone would require that kind of functionality? | |
Re: > it duplicates the information its printing out by 3 Because you print out the information in a loop. The solution here is pretty simple; split the string read from the file/stdin using the given delimiter. If the length of the resulting array is not equal to 3, it means … | |
Re: OK, thanks for finally getting the point. BTW, this thread is going down on grounds that it might again turn into a "hail narue" chant by Serkan and for going a bit too off-topic. | |
Re: > I was wondering why do we need constructors with arguments? [LIST] [*]Creation of an object based on an existing one [though this can be done the `Cloneable' way, constructor based approach is also pretty flexible] [*]Creation of an object with known state [bind the ServerSocket to port XXX] [*]Prevent … | |
Re: I think the OP is talking about the "copy constructor" like functionality which exists in C++ and can be implemented in Java by: - implementing the Cloneable interface - overriding the clone() method of the Object class @grisha83 Read the documentation of the clone() method of the Object class and … | |
Re: > what is wrong with being "Narue obsessed"? Nothing is wrong in being obsessed with 'XXX'; just make sure you don't end up causing inconvenience and chaos with your *obsession*[which you just did by posting this thread in C++ forum, making it an off-topic thread]. | |
Re: > [icode]var numeric = /^[0-9]*$/[/icode] This isn't a valid RegExp since it also validates a blank string. Numeric RegExp validation would go something along the lines of [icode]/^[0-9]+$/[/icode] or simply [icode]/^\d+$/[/icode]. [icode][0-9][/icode] stands for any numeric character (0-9) where - is the range operator. Regular expressions are different beasts altogether, … | |
Re: A ban is a result of a member gathering up 10 infraction points. Each infraction has a time duration till which it is active. Once the duration expires, the member is automatically unbanned and can start posting again. I think that this pretty much serves as a decent "rehabilitation" measure. | |
Re: > Why should I do this(in bold)? : Because we require the hex equivalent a generated byte and not the integer this byte gets up-casted to. When converting to hex string, we would want our toHexString() method work on an integer which represents the sequence of bytes generated by md5 … | |
Re: > please check this! Whenever I get the feeling of alien intervention when browsing Daniweb, I normally press CTRL + F5 ... ;-) | |
Re: You don't need to make your servlet implement the Runnable interface; each request is anyways handled and served in a separate thread. The destroy method of a servlet is called when the servlet is put out of commission. As an exercise, try shutting down Tomcat and monitor the SDTOUT or … | |
Re: Don't use generics for your InfiniteInt class; it will *always* be a DLL of type Integer [or in general Number]. Instead create your InifiniteInt class by extending the DLL class and specifying Integer as the type parameter.[code] class DLL<T> { // A DLL of objects of type T } class … |
The End.