3,892 Posted Topics
Re: > [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. | |
Re: > 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 … | |
Re: > 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. > … | |
Re: > 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 … | |
Re: 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 … | |
Re: 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. | |
Re: 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 … | |
Re: 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. | |
Re: [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 … | |
Re: [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 … | |
Re: [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 … | |
Re: [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 ♥ ) 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 … | |
Re: 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. | |
Re: 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 … | |
Re: 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] | |
Re: 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]. | |
Re: 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. | |
Re: 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 … | |
Re: Questions related to specific Javascript libraries are better asked in the [URL="http://dojotoolkit.org/forum"]respective forums[/URL] for a quicker response. | |
Re: 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 … | |
Re: > 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. … ![]() | |
Re: 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 … | |
Re: 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 … | |
Re: > 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 … | |
Re: > 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. | |
Re: Javascript, at least broswer embedded Javascript can't do this in a standard compliant way; moving to VB section. | |
Re: 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. | |
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 … | |
Re: [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 … | |
Re: 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 ) … | |
Re: *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. … | |
Re: > 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 … | |
Re: 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 | |
Re: > 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: > 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: > 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 … | |
Re: 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. | |
Re: [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. | |
Re: > is this... your homework? Seems that way; anyways without a decent effort, getting any kind of help is difficult. | |
Re: 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. | |
Re: Merry Christmas to all the members of Daniweb; hope Santa gives you all the gifts you ever wished for. ;-) | |
Re: > 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 … | |
Re: Its working in my case....just made a slight modification: [code=visualbasic]fso.CopyFolder src, dest, 1[/code] Removed the quotes around dest .... | |
![]() | Re: > 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. … |
Re: 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 … | |
Re: > 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 … |
The End.