User Profile
Collapse
-
Ok. tell me one thing when File.deleted throws Exception and when returns false? -
Then i think program would have an security exception or IO exception.Is not it?Leave a comment:
-
File.delete returns false.
How does this happen? Could anyone explain?Code:File l_file = new File(path); System.out.println(l_file.exists()); //returns true System.out.println(l_file.delete()); //returns false
-
-
This link is real GEM. Some absurd/typical things just used to go beyond my brain. Those things, exactly those things...contex t of execution, this in different context and more over apply and call, the clear concept of those hazy things are now clear.
It would be grateful, if you do little more help...
...Code:<input type=button value=' Button ' onclick='e_handler(12,34,"debasis jana")' />
Leave a comment:
-
event handling error
my HTML code ...
and my JS code ..Code:<table border="0" cellpadding="0" cellspacing="0"> <tr> <td id=tabbed_TD>Debasis Jana</td> </tr> </table>
...Code:function TDClass(){ this.handle = function(){ alert(this); } } function test(){ document.getElementById('tabbed_TD').addEventListener('click',new -
-
java synchronization
the method is synchronized, means only one thread runs the method fully and returns...now my question when a method is synchronized then instance members(data/method) used inside it, are synchronized or not?Code:synchronized void method(){ this.x = 100; this.y = 200; } -
Is it safe to call a instance method from constructor?
Is it safe to call a instance method from constructor? -
-
How to deploy common library in Tomcat
Tomcat has got several applications and several application use shared library, so same library carried across each application. Where should I place the shared library? $CATALINA_HOME/lib ? -
Match a part of String using Reg Exp
Can't i match part of the string using Reg Exp?Code:String input = "Mozila"; System.out.println(Pattern.matches("^Moz")); //returns false System.out.println(Pattern.matches("^Moz.+")); //returns true -
Yea .. i solved the problem.
Code:while((line = br.readLine()) != null){ js_text.append(line.trim().replaceAll("//.*", "")); //gets the file text(removed comments //) }...Code:int start=0,end=0 ; while((start = js_text.indexOf("/*")) != -1){ end = js_text.indexOf("*/"); if(end !=Leave a comment:
-
Then how should I remove /** */? Actually i m trying to remove the documentation part from my JS file when i expose this on web.Leave a comment:
-
Regularexpression not working.
It prints test instead of testtest. How regular expression is working here?Code:String text = "/** */test/** */test"; System.out.println(text.replaceAll("/\\*\\*.*\\*/")); -
How to enable select multiple file while uploading files.
It allows select single file at a time, but is it possible to open file dialog box which allows to select multiple files at a time?Code:<input type=file />
-
Writing my own MultipartResolver
My code works fine when i am uploading plain text file, because i use InputStreamRead er to read the line without giving much effort ;)
What i thought that when i store the file content, it will be in String and append the newLine(OS dependant-System.getPrope rty("line.depar ator")) after each line then i convert it into bytes(String.ge tBytes()). And my concept was, if i convert it into bytes then what would be the problem? But in case... -
CMS using java
Two three days earlier i tested a code, single and double inverted comma represented differently in MS word and Notepad; actually what happened, i was writing something on MS word and finally put it in a TEXTAREA then i trying to save the data into database and so as a result some invalid characters getting saved instead of single and double inverted comma. If i wrte it in TEXTAREA directly then it won't happen. So what i did, take the character... -
can't i re-utilize the xmlhttprequest object? what's the wrong with that?
one more thing .... what does it mean ..NS_ERROR_FAIL URE?Leave a comment:
-
NS_ERROR_FAILURE with code 0x80004005 when using xmlhttprequest.send
Can anyone explain where my code goes wrong ?Code:xmlhttprequest request = ....; for(var i=0;i<app_size;i++){ request.open('GET',url[i],false); request.send(null); }
No activity results to display
Show More
Leave a comment: