3,892 Posted Topics

Member Avatar for jjaunich

> [icode]String Name = new String (employee);[/icode] Strings in Java are immutable, you don't need to use [icode]new String()[/icode], ever. > [icode]if (name = "Mark Jones")[/icode] I think you should try reading the basic Java tutorials hosted by Sun and do a bit of practice.

Member Avatar for verruckt24
0
152
Member Avatar for zaraeleus

> Where 'this' as mentioned above refers to the current object. Since > static members do not belong to any particular object/instance as > such, for them 'this' does not make any sense. ...but is still valid though is ignored. It is completely legal to invoke a static method using …

Member Avatar for zaraeleus
0
689
Member Avatar for Dani

> Beside all the obvious whining some members can restrain them > self s. Oh come on, whining is the worst word you could have come up with. After all this is the Community Feedback Section, let everyone express their thoughts on how they feel about the new layout. > …

Member Avatar for William Hemsworth
0
866
Member Avatar for JoeK

> I don't know which class to use. Use the Scanner class to read the textual data in a line oriented manner. Create your own input processor class which operates on a given line and creates a class instance which represents the given business entity or a primitive depending on …

Member Avatar for JoeK
0
148
Member Avatar for RobSpurr

What do you mean by *doesn't work*? No output, doesn't work as expected? Use Firefox with the Firebug addon for development which provides a means of debugging Javascript code, inspecting variables etc. If you have any Javascript errors, they would be shown in the Firebug console. Search the web for …

Member Avatar for sid78669
0
171
Member Avatar for caps_lock

length() method returns a long [primitive] and you are trying to dereference it by trying to invoke a method on it. Use use the == operator for comparing primitives.

Member Avatar for ~s.o.s~
0
374
Member Avatar for l_03

Either make the String array as a member of [ICODE]ReadFile [/ICODE]or make the method [ICODE]isReadFile [/ICODE]static. Anyways, if your code looks the same way as you have posted, you are missing the invocation of [ICODE]isReadFile [/ICODE]in [ICODE]main()[/ICODE] which actually initializes the two dimensional String array. If all you need to …

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

People are normally averse to opening attachments; it would be better to paste the *relevant* piece of code and describe a *single* problem at a time rather than confusing the reader with a lot of details.

Member Avatar for quuba
0
393
Member Avatar for dalbirsingh

[QUOTE=dalbirsingh;780476]Can u people help me in getting java code to transfer files (FTP) over the LAN.Give me the complete code for this. I wan that a FTP request to be send to the desired host and if the host accept the request then the browse menu be opened that allows …

Member Avatar for ~s.o.s~
0
169
Member Avatar for letlet_pogs

[QUOTE=letlet_pogs;780436]Hello, have a good day everyone. I am confused if what elements are to be inserted in a queue. Are only numbers can be inserted in a queue? Are letters or word(e.g."Subject") can be inserted in a queue? Thank you ahead everyone. Have a nice day.[/QUOTE] Learning by doing is …

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

[QUOTE=l_03;778949]hello guyz,,i just want to ask if you know a site that have a free ebook that would explain best the data structures..we have a problem to code..and it is about queues,,and sorting,,and i hope to find a best ebook that will explain best about the sorting and the queues,,,thanks …

Member Avatar for verruckt24
0
143
Member Avatar for sgbender

[QUOTE=sgbender;762683]Hi, I am kind of new to JSP. I am having trouble outputing something: <%=request.getParameter("UserName")%> now if [I]UserName [/I]has special Characters (i.e &hearts; ) it does not get outputed corectly. that code above should display the heart symbol, but instead I get something like this: âÂ... is there some kind …

Member Avatar for dreamer14
0
2K
Member Avatar for caps_lock

Detection of duplicate files isn't that simple; refer [URL="http://www.daniweb.com/forums/thread157432.html"]a similar thread[/URL]. If that's not what you intend, a bit more explanation is needed.

Member Avatar for caps_lock
0
188
Member Avatar for PhiberOptik

Though I don't do standalone application development using Swing, a few obvious comments. > [ICODE]Class.forName("com.mysql.jdbc.Driver").newInstance();[/ICODE]. You don't need to do this for every invocation. As soon as the Driver class is loaded, it registers itself with the [ICODE]DriverManager [/ICODE]and that's it; no more [ICODE]Class.forName()[/ICODE] required. Also, you don't need to …

Member Avatar for PhiberOptik
0
111
Member Avatar for JaggyGT

Try using forward slashes ( / ) instead of back slashes ( \ ). Read [URL="http://www.cs.queensu.ca/software_docs/gnudev/gcl-ansi/gcl_1378.html"]this.[/URL]

Member Avatar for rockout690
0
338
Member Avatar for srs_grp

Why would you want to dump a byte array in a log file? Anyways, use a FileWriter in append mode and if it is *really* required, write out the byte array as a string [by looping over individual bytes and converting them to their String representation; use a StringBuilder].

Member Avatar for ~s.o.s~
0
147
Member Avatar for gauravmishra

Are you sure you are not overwriting the file by not providing a unique file name for each image? Also, a working sample of the code which showcases your problem might go a long way in getting people to respond to your queries.

Member Avatar for ~s.o.s~
0
960
Member Avatar for kevintse

Indeed, given that the underlying protocol used in almost all the cases, viz. TCP is connection oriented i.e. following the request/response model, you have to resort to some sort of callbacks or regular polling. Frankly speaking, asynchronous I/O, push pull technology etc. are pretty advanced concepts, not to be messed …

Member Avatar for PoovenM
0
143
Member Avatar for kimhanu

Questions related to specific Javascript libraries are better asked in the [URL="http://dojotoolkit.org/forum"]respective forums[/URL] for a quicker response.

Member Avatar for ~s.o.s~
0
81
Member Avatar for bulger2503

There are many classes in the [ICODE]java.nio[/ICODE] package which have package visibility and hence don't show up in the Javadocs. Look into the Java standard library source in the java.nio package for more details on how to extend the [ICODE]ByteBuffer[/ICODE]/[ICODE]MappedByteBuffer [/ICODE]classes. BTW, clicking on the [URL="http://java.sun.com/j2se/1.5.0/docs/api/java/nio/class-use/ByteBuffer.html"]USE [/URL]link when browsing the …

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

> I worked with ajax, I can do this with a submit button, but when I i > put the form tag, not work any more. It worked because Ajax doesn't depend on a FORM element for shipping data to and fro; it uses the [ICODE]XMLHttpRequest [/ICODE]object for this purpose. …

Member Avatar for fatihpiristine
0
147
Member Avatar for peter_budo

A piece of advice: use a debugger, given that we have no way of reproducing the scenario and the code posted so far looks OK. BTW, why are you catching a [ICODE]NullPointerException[/ICODE]? Catching unchecked exceptions without any kind of processing is *always* a bad practice and screams of a pre-condition …

Member Avatar for peter_budo
0
194
Member Avatar for Dr_Gonzo

Given that the problem description is pretty abstract, there isn't much I can comment on though here are a few thoughts. I am pretty sure there is nothing which an advanced Javascript toolkit like YUI/jQuery/Dojo *can't* do. Have you tried asking your queries in the concerned forums since there are …

Member Avatar for ~s.o.s~
0
74
Member Avatar for Salem

> How at that point is it not possible to figure out that sending a PM > to xxx will fail? Technically, it's pretty much possible. I guess what you speak of is a default vBulletin behavior and hence remains that way. Though such things don't happen very often, it's …

Member Avatar for John A
0
179
Member Avatar for alpha_gamma

> Eclipse and it gave me a red box error message saying "the import > java.xml can not be resolved" ...because a package by the name [ICODE]java.xml.*[/ICODE] doesn't exist; it's [ICODE]javax.xml.*[/ICODE] Refer the [URL="http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/package-summary.html"]Javadocs [/URL]for more details.

Member Avatar for Ezzaral
0
150
Member Avatar for sumit-saini

Javascript, at least broswer embedded Javascript can't do this in a standard compliant way; moving to VB section.

Member Avatar for Comatose
0
316
Member Avatar for jacline

As per the rules laid down, we provide help only to those who put in some effort to solve their problems; handing out free code is not encouraged here. Give your lab assignment a go, post the problems you face and then someone might help you out on this.

Member Avatar for Salem
0
91
Member Avatar for ~s.o.s~

The 2009 Winter Preview is [URL="http://www.animevice.com/news/the-2009-winter-preview/145/"]here[/URL]! Though I would be shameful enough watching each one them, eagerly awaited would be: [LIST] [*]Akikan [since I am a harem/romance lover at heart] [*]Asu no Yoichi! [*]Birdy the Mighty Decode:02 [*]Tower of Druaga ~Sword of Uruk~ [/LIST] ...and the best of them all …

Member Avatar for ~s.o.s~
1
172
Member Avatar for l_03

[QUOTE=l_03;774868]hello...i am confused,,it is possible that a linkedstack will be full??i only implement a method that isEmpty(),,and it reads the method if the stack is empty..but if the stack is full, it do not even read the method i made....would someone help me?/,,,thank you ahead...[/QUOTE] The Collection classes of Java …

Member Avatar for ~s.o.s~
0
128
Member Avatar for roryt

When Google first came out with Gmail, it was total chaos. Everyone wanted an invitation so that they could have an email account with 1 GB !!! of space. (obviously it was a marketing gimmic on part of google to create fictious scarcity of accounts by asking for invitations ) …

Member Avatar for roryt
0
264
Member Avatar for kinjal1717u

*Ahem*, time to bring this thing on topic. > i have to submit project in java....next month..... > please help me..... [URL="http://www.daniweb.com/forums/announcement8-2.html"]As per the rules laid down[/URL], we provide help only to those who put in some effort to solve their problems; handing out free code is not encouraged here. …

Member Avatar for verruckt24
0
331
Member Avatar for caps_lock

> it's designed to be a secure hash function, and trades > performance for that security Maybe you got that the other way around since a lot of vulnerabilities or staged attacks have been found with MD5 making it a unsafe choice for security applications. > a good-quality 64-bit hash …

Member Avatar for jbennet
0
257
Member Avatar for Kostas Theof

If you want to execute an action [i.e. send a HTTP request] without reloading the page, you have two options: - [URL="http://developer.apple.com/internet/webcontent/iframe.html"]Remote scripting via hidden IFRAME[/URL] - [URL="http://www.jibbering.com/2002/4/httprequest.html"]Using the XMLHttpRequest object to make async requests[/URL] ./sos

Member Avatar for Kostas Theof
0
133
Member Avatar for srs_grp

> I want to insert byte array in database schema as follows Where is this byte array coming from? If you are reading the contents of a file into a byte array which you are then trying to insert into the database, better use the method[URL="http://java.sun.com/javase/6/docs/api/java/sql/PreparedStatement.html#setBlob(int,%20java.io.InputStream,%20long)"]setBlob(int, InputStream, long)[/URL] to avoid …

Member Avatar for ~s.o.s~
0
128
Member Avatar for wwwmadeasy

The check for [icode]email == undefined[/icode] is superfluous since a value of text form field, if it exists will never be [ICODE]`undefined'[/ICODE] or [ICODE]`null'[/ICODE] but always a empty string if nothing was entered. You should rather check the return value of [ICODE]getElementById()[/ICODE] so that you don't end up trying to …

Member Avatar for wwwmadeasy
0
325
Member Avatar for vibeman

Nailing down the problem would be very difficult given that we can't reproduce the scenario here. Maybe looking into something along the lines of a Javascript debugger which helps you step thru your application and at the same time show the HTML markup which was dynamically rendered might work out …

Member Avatar for vibeman
0
108
Member Avatar for vinayakshukre

> Only limitation I found .... in parameter which has default value must > be the last one in the param list AFAIK, this is not a limitation but a logically sound decision. If this wasn't the case, it would be difficult to distinguish between an invocation which uses default …

Member Avatar for vinayakshukre
0
947
Member Avatar for bhob

It's pretty simple. [LIST] [*]Parse the expression entered and iterate over it on a character by character basis. [*]If the given character is not a parenthesis or bracket, move over to the next one. If it is an opening parenthesis or bracket, push it on to the stack and move …

Member Avatar for verruckt24
0
194
Member Avatar for *amy*

On the mentioned web page there are no frames, only inline frames; they are different things and also handled differently. In the second URL you posted, the function invoked on a link click is [ICODE]loadintoIframe()[/ICODE] while for the first URL you posted, the function invoked is [ICODE]getPages()[/ICODE]. Changing the function …

Member Avatar for ~s.o.s~
0
169
Member Avatar for frankytee

> i came on this web site thinking i could get genuine help . ...which most people here get, really. > within minutes of posting a question you mark it solved and > forget about it Only a moderator or the one who posted the thread can mark the thread …

Member Avatar for The Dude
0
109
Member Avatar for protonix

Reading the [URL="http://en.wikipedia.org/wiki/Base64"]Base64 [/URL]article along with [URL="http://www.google.com/codesearch?hl=en&lr=&q=%22class+base64encoder%22+lang%3Ajava&sbtn=Search"]some sample implementation[/URL] should give you a start; if you still have a query, post a specific question.

Member Avatar for ~s.o.s~
0
268
Member Avatar for ezkonekgal

[URL="http://www.netmanners.com/email-etiquette/is-this-shouting-too/"]Bold is considered shouting[/URL]; please keep formatting to a minimum. In case you are quoting a article, consider using [noparse][quote][/quote][/noparse] tags.

Member Avatar for ezkonekgal
0
218
Member Avatar for Madeehaz

> is this... your homework? Seems that way; anyways without a decent effort, getting any kind of help is difficult.

Member Avatar for ~s.o.s~
0
87
Member Avatar for srs_grp

Look into the [URL="http://java.sun.com/j2se/1.4.2/docs/api/java/nio/ByteBuffer.html#array()"]array()[/URL] method of ByteBuffer class.

Member Avatar for ~s.o.s~
0
135
Member Avatar for cohen

Merry Christmas to all the members of Daniweb; hope Santa gives you all the gifts you ever wished for. ;-)

Member Avatar for stephen84s
0
127
Member Avatar for andrepezzo

> any variable not declared as "transient" (even static variables) > would be serialized and their state stored. No, not really.[code]public class StaticTester implements Serializable { public static int gaga = 1; private int gogo; public static void main(String[] args) throws Exception { doTest(); } private static void doTest() throws …

Member Avatar for ~s.o.s~
0
1K
Member Avatar for Phreak

Its working in my case....just made a slight modification: [code=visualbasic]fso.CopyFolder src, dest, 1[/code] Removed the quotes around dest ....

Member Avatar for Comatose
0
301
Member Avatar for xander85

> Whenever possible, you should always use the W3C > 'document.getElements...' methods rather than collections such as > document.links, .forms or .images [links](http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-7068919) is a standard property of the `document` DOM element. It would be interesting to know the reasons of preferring the long winded and probably expensive `document.getElementsByTagName()` route. …

Member Avatar for ~s.o.s~
0
623
Member Avatar for jmasta

Maybe something like [untested]:[code]var reg = /(<span[^/>]+)\/>/gi; var str = "<span id='d'/><div id='3'>d</div>" + "<span id='j' style='blah: 10px'/>"; var a = str.replace(reg, "$1><\/span>"); alert(a);[/code] But this would mean looking away from the actual problem; the problem here is that SPAN HTML tags need to have a ending tag. What is …

Member Avatar for jmasta
0
135
Member Avatar for shaikh_mshariq

> How can I achieve this ? In case of a GET request, the data is embedded in the query string while in case of POST request, it is passed as a argument to the send method of XHR object. Read [URL="https://developer.mozilla.org/en/AJAX/Getting_Started"]this[/URL]. > Is POST method can read a large …

Member Avatar for hielo
0
247

The End.