3,892 Posted Topics

Member Avatar for Narue

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 …

Member Avatar for lllllIllIlllI
0
698
Member Avatar for GDICommander

> 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 …

Member Avatar for ~s.o.s~
0
209
Member Avatar for Nitz
Member Avatar for ~s.o.s~
0
217
Member Avatar for suretd

> 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 …

Member Avatar for ~s.o.s~
0
251
Member Avatar for ndeniche

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'. :)

Member Avatar for ditz
0
1K
Member Avatar for MasterGoGo

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 …

Member Avatar for JamesCherrill
0
491
Member Avatar for BestJewSinceJC

> 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 …

Member Avatar for BestJewSinceJC
0
375
Member Avatar for mimsc

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()) { …

Member Avatar for ~s.o.s~
0
163
Member Avatar for kuay

Duplicate thread; closed. Refer the above post for the original version.

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

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 …

Member Avatar for ~s.o.s~
0
367
Member Avatar for jaepi

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.

Member Avatar for CasTex
0
134
Member Avatar for MidiMagic

> 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 …

Member Avatar for MidiMagic
0
173
Member Avatar for KirkPatrick

> 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 …

Member Avatar for ~s.o.s~
0
97
Member Avatar for exzibit23

> 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 …

Member Avatar for ~s.o.s~
0
4K
Member Avatar for peter_budo

The application looks good as such. Hope you get the summer placement in your company. Best of luck. :-)

Member Avatar for Nick Evan
0
160
Member Avatar for drjay1627

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]

Member Avatar for ~s.o.s~
0
208
Member Avatar for k2k

Write the primitive data [long data in your case] using DataOutputStream and read the same if required using DataInputStream.

Member Avatar for masijade
0
154
Member Avatar for kingarthur

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.

Member Avatar for kingarthur
0
136
Member Avatar for localp

BTW, consider using prepared statements / parameterized queries instead of creating queries on fly using string concatenation to avoid SQL Injection.

Member Avatar for ~s.o.s~
0
260
Member Avatar for MidiMagic

> 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 …

Member Avatar for MidiMagic
0
206
Member Avatar for kaluxx

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]

Member Avatar for masijade
0
103
Member Avatar for Majestics
Re: JNI

> 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 …

Member Avatar for Majestics
0
120
Member Avatar for Mushy-pea
Member Avatar for Mushy-pea
0
152
Member Avatar for Ancient Dragon

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.

Member Avatar for Ancient Dragon
0
57
Member Avatar for jdbarry

> 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.

Member Avatar for ~s.o.s~
0
83
Member Avatar for sgsawant

> 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 …

Member Avatar for sgsawant
0
393
Member Avatar for Kelicula
Member Avatar for FlamingClaw

> 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 …

Member Avatar for FlamingClaw
0
114
Member Avatar for kanodi

> 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 …

Member Avatar for kanodi
0
216
Member Avatar for dazzclub

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. …

Member Avatar for siddhant3s
1
123
Member Avatar for MrDiaz

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 …

Member Avatar for JamesCherrill
0
192
Member Avatar for FlamingClaw

> 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. ;-)

Member Avatar for FlamingClaw
0
151
Member Avatar for jephthah

> 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. :-)

Member Avatar for jephthah
0
106
Member Avatar for Xlphos

> 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, …

Member Avatar for Dani
0
395
Member Avatar for serkan sendur

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.

Member Avatar for ~s.o.s~
0
534
Member Avatar for xponse

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.

Member Avatar for ~s.o.s~
2
458
Member Avatar for all blacks

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 …

Member Avatar for ~s.o.s~
0
89
Member Avatar for FisherGraphics

> 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 …

Member Avatar for FisherGraphics
0
171
Member Avatar for Ancient Dragon

AFAIK, no. But is there any reason why someone would require that kind of functionality?

Member Avatar for almostbob
0
129
Member Avatar for KirkPatrick

> 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 …

Member Avatar for KirkPatrick
0
161
Member Avatar for serkan sendur

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.

Member Avatar for ~s.o.s~
0
318
Member Avatar for grisha83

> 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 …

Member Avatar for BestJewSinceJC
0
103
Member Avatar for grisha83

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 …

Member Avatar for grisha83
0
111
Member Avatar for serkan sendur

> 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].

Member Avatar for serkan sendur
-1
417
Member Avatar for OmniX

> [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, …

Member Avatar for LaLuz
0
792
Member Avatar for roryt

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.

Member Avatar for jephthah
0
534
Member Avatar for abhi_elementx

> 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 …

Member Avatar for abhi_elementx
0
125
Member Avatar for Ramy Mahrous

> please check this! Whenever I get the feeling of alien intervention when browsing Daniweb, I normally press CTRL + F5 ... ;-)

Member Avatar for ~s.o.s~
1
87
Member Avatar for kevin12

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 …

Member Avatar for ~s.o.s~
0
508
Member Avatar for Rastabot

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 …

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

The End.